From 757d61b22f51919149dc01f23fcf9665f0b1622d Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 17 Apr 2008 06:52:56 +0000 Subject: (svn r12746) -Codechange: Add map storage for station animation frame --- docs/landscape.html | 1 + docs/landscape_grid.html | 2 +- src/station_map.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/landscape.html b/docs/landscape.html index 32f91af71..9493f35a2 100644 --- a/docs/landscape.html +++ b/docs/landscape.html @@ -899,6 +899,7 @@
  • m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy)
  • m6 bit 2: 1 when a drive through road stop is built over a town owned road, otherwise 0
  • m6 bits 1..0 : Tropic zone definition
  • +
  • m7: animation frame
  • diff --git a/docs/landscape_grid.html b/docs/landscape_grid.html index 123dcda6c..f47b7f43a 100644 --- a/docs/landscape_grid.html +++ b/docs/landscape_grid.html @@ -198,7 +198,7 @@ the array so you can quickly see what is used and what is not. XXXX XXXX XXXX XXXX OOXX XOXX - OOOO OOOO + XXXX XXXX road stop diff --git a/src/station_map.h b/src/station_map.h index e06221bab..0c255a942 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -68,6 +68,18 @@ static inline void SetStationGfx(TileIndex t, StationGfx gfx) _m[t].m5 = gfx; } +static inline uint8 GetStationAnimationFrame(TileIndex t) +{ + assert(IsTileType(t, MP_STATION)); + return _me[t].m7; +} + +static inline void SetStationAnimationFrame(TileIndex t, uint8 frame) +{ + assert(IsTileType(t, MP_STATION)); + _me[t].m7 = frame; +} + static inline bool IsRailwayStation(TileIndex t) { return GetStationType(t) == STATION_RAIL; -- cgit v1.2.3-54-g00ecf