MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetStationSpec

Function GetStationSpec

src/newgrf_station.cpp:871–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869
870
871const StationSpec *GetStationSpec(TileIndex t)
872{
873 if (!IsCustomStationSpecIndex(t)) return nullptr;
874
875 const BaseStation *st = BaseStation::GetByTile(t);
876 uint specindex = GetCustomStationSpecIndex(t);
877 return specindex < st->speclist.size() ? st->speclist[specindex].spec : nullptr;
878}
879
880/** Wrapper for animation control, see GetStationCallback. */
881uint16_t GetAnimStationCallback(CallbackID callback, uint32_t param1, uint32_t param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int)

Callers 11

AnimateStationTileFunction · 0.85
TriggerStationAnimationFunction · 0.85
FillTileDescRailStationFunction · 0.85
CheckBuildAbove_StationFunction · 0.85
IsInspectableMethod · 0.85
GetSpecMethod · 0.85
GetGRFIDMethod · 0.85
GetBadgesMethod · 0.85
ResolveMethod · 0.85
AfterLoadStationsFunction · 0.85

Calls 3

IsCustomStationSpecIndexFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected