Changeset - r8956:f2a77d2b73be
[Not reviewed]
master
0 1 0
peter1138 - 16 years ago 2008-04-17 06:53:52
peter1138@openttd.org
(svn r12747) -Codechange: Add varaction retrieval of station animation frame
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_station.cpp
Show inline comments
 
@@ -420,9 +420,16 @@ static uint32 StationGetVariable(const R
 
			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
0 comments (0 inline, 0 general)