From 5ab64809fe72c38d373bdbed6ffa9b6660dd69d6 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 3 Jan 2010 22:44:57 +0000 Subject: (svn r18708) -Feature: [NewGRF] Add support for custom station foundation graphics. --- src/newgrf_station.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/newgrf_station.cpp') diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 0a0c711f5..5aa42d022 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -742,6 +742,20 @@ SpriteID GetCustomStationGroundRelocation(const StationSpec *statspec, const Bas } +SpriteID GetCustomStationFoundationRelocation(const StationSpec *statspec, const BaseStation *st, TileIndex tile) +{ + const SpriteGroup *group; + ResolverObject object; + + NewStationResolver(&object, statspec, st, tile); + object.callback_param1 = 2; // Indicate we are resolving the foundation sprites + + group = ResolveStation(&object); + if (group == NULL || group->type != SGT_RESULT) return 0; + return group->GetResult() + GetRegister(0x100); +} + + uint16 GetStationCallback(CallbackID callback, uint32 param1, uint32 param2, const StationSpec *statspec, const BaseStation *st, TileIndex tile) { const SpriteGroup *group; -- cgit v1.2.3-54-g00ecf