station.h
changeset 2049 ad0d49c916d4
parent 1977 4392ae3d8e31
child 2154 63a6b880b4c0
--- a/station.h	Wed Jul 13 09:51:01 2005 +0000
+++ b/station.h	Wed Jul 13 18:04:01 2005 +0000
@@ -270,7 +270,7 @@
 RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
 static inline int GetRoadStopType(TileIndex tile)
 {
-	return (_map5[tile] < 0x47) ? RS_TRUCK : RS_BUS;
+	return (_m[tile].m5 < 0x47) ? RS_TRUCK : RS_BUS;
 }
 
 uint GetNumRoadStops(const Station *st, RoadStopType type);
@@ -280,7 +280,7 @@
 
 static inline bool IsTrainStationTile(TileIndex tile)
 {
-	return IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0, 8);
+	return IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_m[tile].m5, 0, 8);
 }
 
 static inline bool IsCompatibleTrainStationTile(TileIndex tile, TileIndex ref)
@@ -288,12 +288,12 @@
 	assert(IsTrainStationTile(ref));
 	return
 		IsTrainStationTile(tile) &&
-		(_map3_lo[tile] & 0x0F) == (_map3_lo[ref] & 0x0F) && // same rail type?
-		(_map5[tile] & 0x01) == (_map5[ref] & 0x01); // same direction?
+		(_m[tile].m3 & 0x0F) == (_m[ref].m3 & 0x0F) && // same rail type?
+		(_m[tile].m5 & 0x01) == (_m[ref].m5 & 0x01); // same direction?
 }
 
 static inline bool IsRoadStationTile(TileIndex tile) {
-	return IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0x43, 0x4B);
+	return IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_m[tile].m5, 0x43, 0x4B);
 }
 
 /**
@@ -310,7 +310,7 @@
 }
 
 static inline bool IsBuoyTile(TileIndex tile) {
-	return IsTileType(tile, MP_STATION) && _map5[tile] == 0x52;
+	return IsTileType(tile, MP_STATION) && _m[tile].m5 == 0x52;
 }
 
 /* Get's the direction the station exit points towards. Ie, returns 0 for a
@@ -318,7 +318,7 @@
 static inline byte GetRoadStationDir(TileIndex tile)
 {
 	assert(IsRoadStationTile(tile));
-	return (_map5[tile] - 0x43) & 3;
+	return (_m[tile].m5 - 0x43) & 3;
 }
 
 #endif /* STATION_H */