rail.c
changeset 2049 ad0d49c916d4
parent 2030 e8dc7fb0f728
child 2133 098c9da8292e
--- a/rail.c	Wed Jul 13 09:51:01 2005 +0000
+++ b/rail.c	Wed Jul 13 18:04:01 2005 +0000
@@ -113,28 +113,28 @@
 	switch (GetTileType(tile)) {
 		case MP_RAILWAY:
 			/* railway track */
-			type = _map3_lo[tile] & RAILTYPE_MASK;
+			type = _m[tile].m3 & RAILTYPE_MASK;
 			break;
 		case MP_STREET:
 			/* rail/road crossing */
 			if (IsLevelCrossing(tile))
-				type = _map3_hi[tile] & RAILTYPE_MASK;
+				type = _m[tile].m4 & RAILTYPE_MASK;
 			break;
 		case MP_STATION:
 			if (IsTrainStationTile(tile))
-				type = _map3_lo[tile] & RAILTYPE_MASK;
+				type = _m[tile].m3 & RAILTYPE_MASK;
 			break;
 		case MP_TUNNELBRIDGE:
 			/* railway tunnel */
-			if ((_map5[tile] & 0xFC) == 0) type = _map3_lo[tile] & RAILTYPE_MASK;
+			if ((_m[tile].m5 & 0xFC) == 0) type = _m[tile].m3 & RAILTYPE_MASK;
 			/* railway bridge ending */
-			if ((_map5[tile] & 0xC6) == 0x80) type = _map3_lo[tile] & RAILTYPE_MASK;
+			if ((_m[tile].m5 & 0xC6) == 0x80) type = _m[tile].m3 & RAILTYPE_MASK;
 			/* on railway bridge */
-			if ((_map5[tile] & 0xC6) == 0xC0 && ((DiagDirection)(_map5[tile] & 0x1)) == (exitdir & 0x1))
-				type = (_map3_lo[tile] >> 4) & RAILTYPE_MASK;
+			if ((_m[tile].m5 & 0xC6) == 0xC0 && ((DiagDirection)(_m[tile].m5 & 0x1)) == (exitdir & 0x1))
+				type = (_m[tile].m3 >> 4) & RAILTYPE_MASK;
 			/* under bridge (any type) */
-			if ((_map5[tile] & 0xC0) == 0xC0 && ((uint)_map5[tile] & 0x1) != (exitdir & 0x1))
-				type = _map3_lo[tile] & RAILTYPE_MASK;
+			if ((_m[tile].m5 & 0xC0) == 0xC0 && ((uint)_m[tile].m5 & 0x1) != (exitdir & 0x1))
+				type = _m[tile].m3 & RAILTYPE_MASK;
 			break;
 		default:
 			break;