summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-04-17 06:52:56 +0000
committerpeter1138 <peter1138@openttd.org>2008-04-17 06:52:56 +0000
commitb2095f37ac42bb2676e110a57ade0fd3b6d6f6f5 (patch)
tree242c8a648279c13f672e7bb5f15a838268b0b555
parent9488db56d4994cb653129e7d82973ae827537e05 (diff)
downloadopenttd-b2095f37ac42bb2676e110a57ade0fd3b6d6f6f5.tar.xz
(svn r12746) -Codechange: Add map storage for station animation frame
-rw-r--r--docs/landscape.html1
-rw-r--r--docs/landscape_grid.html2
-rw-r--r--src/station_map.h12
3 files changed, 14 insertions, 1 deletions
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 @@
<li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy)</li>
<li>m6 bit 2: 1 when a drive through road stop is built over a town owned road, otherwise 0</li>
<li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
+ <li>m7: animation frame</li>
</ul>
</td>
</tr>
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.
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
- <td class="bits"><span class="free">OOOO OOOO</span></td>
+ <td class="bits">XXXX XXXX</td>
</tr>
<tr>
<td class="caption">road stop</td>
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;