summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-04-17 06:53:52 +0000
committerpeter1138 <peter1138@openttd.org>2008-04-17 06:53:52 +0000
commit0cd14f9ebb535ff4b30d14cb816de608fd21a40e (patch)
treed3acbd4013b25520f5d1f2d717f6a92b7f92db50 /src
parentb2095f37ac42bb2676e110a57ade0fd3b6d6f6f5 (diff)
downloadopenttd-0cd14f9ebb535ff4b30d14cb816de608fd21a40e.tar.xz
(svn r12747) -Codechange: Add varaction retrieval of station animation frame
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_station.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index 39e381a88..98c93c62c 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -420,9 +420,16 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
if (!HasBit(_svc.valid, 5)) { _svc.v49 = GetPlatformInfoHelper(tile, false, true, false); SetBit(_svc.valid, 5); }
return _svc.v49;
+ case 0x4A: // Animation frame of tile
+ return GetStationAnimationFrame(tile);
+
/* Variables which use the parameter */
/* Variables 0x60 to 0x65 are handled separately below */
- case 0x67: { // Land info of nearby tiles
+ case 0x66: // Animation frame of nearby tile
+ if (parameter != 0) tile = GetNearbyTile(parameter, tile);
+ return st->TileBelongsToRailStation(tile) ? GetStationAnimationFrame(tile) : UINT_MAX;
+
+ case 0x67: { // Land info of nearby tile
Axis axis = GetRailStationAxis(tile);
if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required