Codechange: Move usage of ResolverObjects to newgrf_xxx.cpp (#14116)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "window_type.h"
|
||||
#include "timer/timer_game_calendar.h"
|
||||
#include "town.h"
|
||||
#include "tile_cmd.h"
|
||||
#include "viewport_func.h"
|
||||
#include "newgrf_animation_base.h"
|
||||
#include "newgrf_sound.h"
|
||||
@@ -349,6 +350,14 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
|
||||
DrawCommonTileSeqInGUI(x, y, dts, 0, 0, palette, true);
|
||||
}
|
||||
|
||||
const TileLayoutSpriteGroup *GetRoadStopLayout(TileInfo *ti, const RoadStopSpec *spec, BaseStation *st, StationType type, int view)
|
||||
{
|
||||
RoadStopResolverObject object(spec, st, ti->tile, INVALID_ROADTYPE, type, view);
|
||||
const SpriteGroup *group = object.Resolve();
|
||||
if (group == nullptr || group->type != SGT_TILELAYOUT) return nullptr;
|
||||
return static_cast<const TileLayoutSpriteGroup *>(group);
|
||||
}
|
||||
|
||||
/** Wrapper for animation control, see GetRoadStopCallback. */
|
||||
uint16_t GetAnimRoadStopCallback(CallbackID callback, uint32_t param1, uint32_t param2, const RoadStopSpec *roadstopspec, BaseStation *st, TileIndex tile, int)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user