(svn r12747) -Codechange: Add varaction retrieval of station animation frame
authorpeter1138
Thu, 17 Apr 2008 06:53:52 +0000
changeset 8956 359bcdf14389
parent 8955 701809dd5b33
child 8957 ef3f499ff423
(svn r12747) -Codechange: Add varaction retrieval of station animation frame
src/newgrf_station.cpp
--- a/src/newgrf_station.cpp	Thu Apr 17 06:52:56 2008 +0000
+++ b/src/newgrf_station.cpp	Thu Apr 17 06:53:52 2008 +0000
@@ -420,9 +420,16 @@
 			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