summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-16 12:29:37 +0000
committertron <tron@openttd.org>2005-11-16 12:29:37 +0000
commit3c0179dd079244a1c1a9d3489c7d2ccc8dce0b5f (patch)
treeb3e137e03c662657548c47d92f38d5ec443b14e2
parent2001577f8f752560fb26fc7edab022f9462c9b9f (diff)
downloadopenttd-3c0179dd079244a1c1a9d3489c7d2ccc8dce0b5f.tar.xz
(svn r3202) If cascade -> switch
-rw-r--r--station_cmd.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/station_cmd.c b/station_cmd.c
index fe98f0aa5..4e18b1eef 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -2170,25 +2170,26 @@ static uint32 GetTileTrackStatus_Station(TileIndex tile, TransportType mode)
return j;
}
+
static void TileLoop_Station(TileIndex tile)
{
- //FIXME -- GetTileTrackStatus_Station -> animated stationtiles
- // hardcoded.....not good
- // 0x27 - large big airport (39)
- // 0x66 - radar metropolitan airport (102)
- // 0x5A - radar international airport (90)
- // 0x3A - flag small airport (58)
- if (_m[tile].m5 == 39 || _m[tile].m5 == 58 || _m[tile].m5 == 90 || _m[tile].m5 == 102)
- AddAnimatedTile(tile);
-
- // treat a bouy tile as water.
- else if (_m[tile].m5 == 0x52)
- TileLoop_Water(tile);
+ // FIXME -- GetTileTrackStatus_Station -> animated stationtiles
+ // hardcoded.....not good
+ switch (_m[tile].m5) {
+ case 0x27: // large big airport
+ case 0x3A: // flag small airport
+ case 0x5A: // radar international airport
+ case 0x66: // radar metropolitan airport
+ AddAnimatedTile(tile);
+ break;
- // treat a oilrig (the station part) as water
- else if (_m[tile].m5 == 0x4B)
- TileLoop_Water(tile);
+ case 0x4B: // oilrig (station part)
+ case 0x52: // bouy
+ TileLoop_Water(tile);
+ break;
+ default: break;
+ }
}