Codechange: Move usage of ResolverObjects to newgrf_xxx.cpp (#14116)

This commit is contained in:
frosch
2025-04-26 20:53:50 +02:00
committed by GitHub
parent be39a05327
commit f62f728187
6 changed files with 55 additions and 43 deletions

View File

@@ -3328,16 +3328,15 @@ draw_default_foundation:
if (stopspec != nullptr) {
stop_draw_mode = stopspec->draw_mode;
st = BaseStation::GetByTile(ti->tile);
RoadStopResolverObject object(stopspec, st, ti->tile, INVALID_ROADTYPE, type, view);
const SpriteGroup *group = object.Resolve();
if (group != nullptr && group->type == SGT_TILELAYOUT) {
const TileLayoutSpriteGroup *group = GetRoadStopLayout(ti, stopspec, st, type, view);
if (group != nullptr) {
if (stopspec->flags.Test(RoadStopSpecFlag::DrawModeRegister)) {
stop_draw_mode = static_cast<RoadStopDrawMode>(GetRegister(0x100));
}
if (type == StationType::RoadWaypoint && stop_draw_mode.Test(RoadStopDrawMode::WaypGround)) {
draw_ground = true;
}
t = ((const TileLayoutSpriteGroup *)group)->ProcessRegisters(nullptr);
t = group->ProcessRegisters(nullptr);
}
}