diff options
author | michi_cc <michi_cc@openttd.org> | 2011-10-31 22:31:35 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-10-31 22:31:35 +0000 |
commit | f66cd97776cd73c653fad685c9a74538b4d8a2a8 (patch) | |
tree | 1226809074a7d42317fa5523336ad72dd049a4e2 /src/newgrf_station.cpp | |
parent | e7f7a749e80348f22f3927acd1a7c79b924d4b58 (diff) | |
download | openttd-f66cd97776cd73c653fad685c9a74538b4d8a2a8.tar.xz |
(svn r23071) -Codechange: [NewGRF] Allow passing custom extra data through the generic NewGRF animation helper class.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index f5ab8cfb2..b33259d32 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -908,8 +908,14 @@ bool IsStationTileElectrifiable(TileIndex tile) !HasBit(statspec->wires, GetStationGfx(tile)); } +/** Wrapper for animation control, see #GetStationCallback. */ +uint16 GetAnimStationCallback(CallbackID callback, uint32 param1, uint32 param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int extra_data) +{ + return GetStationCallback(callback, param1, param2, statspec, st, tile); +} + /** Helper class for animation control. */ -struct StationAnimationBase : public AnimationBase<StationAnimationBase, StationSpec, BaseStation, GetStationCallback> { +struct StationAnimationBase : public AnimationBase<StationAnimationBase, StationSpec, BaseStation, int, GetAnimStationCallback> { static const CallbackID cb_animation_speed = CBID_STATION_ANIMATION_SPEED; static const CallbackID cb_animation_next_frame = CBID_STATION_ANIM_NEXT_FRAME; |