diff options
author | frosch <frosch@openttd.org> | 2011-05-14 12:38:10 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-05-14 12:38:10 +0000 |
commit | fdd2f8447eb2a6fedb42180f5dc5367a14c0f2bf (patch) | |
tree | 9ce86762fc147f169651bbdb030f8577c41bae6d /src/newgrf_station.cpp | |
parent | 930d0c97021d9ec9d3acf37d916b236de0c1ca3a (diff) | |
download | openttd-fdd2f8447eb2a6fedb42180f5dc5367a14c0f2bf.tar.xz |
(svn r22453) -Feature(ette): Implement variable 18 for custom station foundations.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 4cc68e2a4..7465d5283 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -604,14 +604,23 @@ SpriteID GetCustomStationGroundRelocation(const StationSpec *statspec, const Bas return group->GetResult() - 0x42D; } - -SpriteID GetCustomStationFoundationRelocation(const StationSpec *statspec, const BaseStation *st, TileIndex tile) +/** + * Resolve the sprites for custom station foundations. + * @param statspec Station spec + * @param st Station + * @param tile Station tile being drawn + * @param layout Spritelayout as returned by previous callback + * @param edge_info Information about northern tile edges; whether they need foundations or merge into adjacent tile's foundations. + * @return First sprite of a set of foundation sprites for various slopes. + */ +SpriteID GetCustomStationFoundationRelocation(const StationSpec *statspec, const BaseStation *st, TileIndex tile, uint layout, uint edge_info) { const SpriteGroup *group; ResolverObject object; NewStationResolver(&object, statspec, st, tile); object.callback_param1 = 2; // Indicate we are resolving the foundation sprites + object.callback_param2 = layout | (edge_info << 16); ClearRegister(0x100); group = ResolveStation(&object); |