summaryrefslogtreecommitdiff
path: root/src/newgrf_station.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-04-19 23:19:12 +0000
committerpeter1138 <peter1138@openttd.org>2008-04-19 23:19:12 +0000
commit3b7558b89c2c491b61b9fe41e93bb80f400aecb5 (patch)
treeb590f481987fb948fc51c4d6da6e843f20b8c979 /src/newgrf_station.h
parentfa4967d8459b1626348ff62342e77c8bd14720c0 (diff)
downloadopenttd-3b7558b89c2c491b61b9fe41e93bb80f400aecb5.tar.xz
(svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes)
Diffstat (limited to 'src/newgrf_station.h')
-rw-r--r--src/newgrf_station.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/newgrf_station.h b/src/newgrf_station.h
index 81443577c..124e71b56 100644
--- a/src/newgrf_station.h
+++ b/src/newgrf_station.h
@@ -83,6 +83,11 @@ struct StationSpec {
StationLayout **layouts;
bool copied_layouts;
+ uint8 anim_frames;
+ uint8 anim_status;
+ uint8 anim_speed;
+ uint16 anim_triggers;
+
/**
* NUM_CARGO real cargo plus three pseudo cargo sprite groups.
* Used for obtaining the sprite offset of custom sprites, and for
@@ -132,4 +137,18 @@ void DeallocateSpecFromStation(Station* st, byte specindex);
/* Draw representation of a station tile for GUI purposes. */
bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID sclass, uint station);
+enum StatAnimTrigger {
+ STAT_ANIM_BUILT,
+ STAT_ANIM_NEW_CARGO,
+ STAT_ANIM_CARGO_TAKEN,
+ STAT_ANIM_TRAIN_ARRIVES,
+ STAT_ANIM_TRAIN_DEPARTS,
+ STAT_ANIM_TRAIN_LOADS,
+ STAT_ANIM_250_TICKS,
+};
+
+void AnimateStationTile(TileIndex tile);
+void StationAnimationTrigger(const Station *st, TileIndex tile, StatAnimTrigger trigger, CargoID cargo_type = CT_INVALID);
+void StationUpdateAnimTriggers(Station *st);
+
#endif /* NEWGRF_STATION_H */