Codechange: Make TileLayoutSpriteGroup::ProcessRegisters return a DrawTileSpriteSpan on the stack, instead of a reference to a global.
This commit is contained in:
@@ -293,12 +293,12 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
|
||||
RoadStopResolverObject object(spec, nullptr, INVALID_TILE, roadtype, type, view);
|
||||
const auto *group = object.Resolve<TileLayoutSpriteGroup>();
|
||||
if (group == nullptr) return;
|
||||
const DrawTileSprites *dts = group->ProcessRegisters(nullptr);
|
||||
auto dts = group->ProcessRegisters(nullptr);
|
||||
|
||||
PaletteID palette = GetCompanyPalette(_local_company);
|
||||
|
||||
SpriteID image = dts->ground.sprite;
|
||||
PaletteID pal = dts->ground.pal;
|
||||
SpriteID image = dts.ground.sprite;
|
||||
PaletteID pal = dts.ground.pal;
|
||||
|
||||
RoadStopDrawModes draw_mode;
|
||||
if (spec->flags.Test(RoadStopSpecFlag::DrawModeRegister)) {
|
||||
@@ -340,7 +340,7 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
|
||||
}
|
||||
}
|
||||
|
||||
DrawCommonTileSeqInGUI(x, y, dts, 0, 0, palette, true);
|
||||
DrawCommonTileSeqInGUI(x, y, &dts, 0, 0, palette, true);
|
||||
}
|
||||
|
||||
const TileLayoutSpriteGroup *GetRoadStopLayout(TileInfo *ti, const RoadStopSpec *spec, BaseStation *st, StationType type, int view)
|
||||
|
||||
Reference in New Issue
Block a user