summaryrefslogtreecommitdiff
path: root/depot.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-13 18:04:01 +0000
committertron <tron@openttd.org>2005-07-13 18:04:01 +0000
commit8c1d74162f1544e351ae6308cbcca06f324c2c36 (patch)
treeb36523450a7bccf37ca126b6f857d1529d44c67b /depot.h
parent1a1dde7c8d0cf18e49b5af7fef1368216120eed1 (diff)
downloadopenttd-8c1d74162f1544e351ae6308cbcca06f324c2c36.tar.xz
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
Diffstat (limited to 'depot.h')
-rw-r--r--depot.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/depot.h b/depot.h
index d26a09cef..f60124a2c 100644
--- a/depot.h
+++ b/depot.h
@@ -72,13 +72,13 @@ static inline bool IsTileDepotType(TileIndex tile, TransportType type)
switch(type)
{
case TRANSPORT_RAIL:
- return IsTileType(tile, MP_RAILWAY) && (_map5[tile] & 0xFC) == 0xC0;
+ return IsTileType(tile, MP_RAILWAY) && (_m[tile].m5 & 0xFC) == 0xC0;
case TRANSPORT_ROAD:
- return IsTileType(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x20;
+ return IsTileType(tile, MP_STREET) && (_m[tile].m5 & 0xF0) == 0x20;
case TRANSPORT_WATER:
- return IsTileType(tile, MP_WATER) && (_map5[tile] & ~3) == 0x80;
+ return IsTileType(tile, MP_WATER) && (_m[tile].m5 & ~3) == 0x80;
default:
assert(0);
@@ -98,10 +98,10 @@ static inline DiagDirection GetDepotDirection(TileIndex tile, TransportType type
case TRANSPORT_RAIL:
case TRANSPORT_ROAD:
/* Rail and road store a diagonal direction in bits 0 and 1 */
- return (DiagDirection)(_map5[tile] & 3);
+ return (DiagDirection)(_m[tile].m5 & 3);
case TRANSPORT_WATER:
/* Water is stubborn, it stores the directions in a different order. */
- switch (_map5[tile] & 3) {
+ switch (_m[tile].m5 & 3) {
case 0: return DIAGDIR_NE;
case 1: return DIAGDIR_SW;
case 2: return DIAGDIR_NW;