diff options
author | peter1138 <peter1138@openttd.org> | 2010-01-03 22:44:57 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2010-01-03 22:44:57 +0000 |
commit | 5ab64809fe72c38d373bdbed6ffa9b6660dd69d6 (patch) | |
tree | 49b0a7ac404ffab434ecb124ee9931f0e11d8c7e /src/newgrf_station.cpp | |
parent | 9e2ccca327b309da98217e92f133619a30cc4038 (diff) | |
download | openttd-5ab64809fe72c38d373bdbed6ffa9b6660dd69d6.tar.xz |
(svn r18708) -Feature: [NewGRF] Add support for custom station foundation graphics.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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; |