diff options
author | tron <tron@openttd.org> | 2005-07-13 18:04:01 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-07-13 18:04:01 +0000 |
commit | 8c1d74162f1544e351ae6308cbcca06f324c2c36 (patch) | |
tree | b36523450a7bccf37ca126b6f857d1529d44c67b /station.h | |
parent | 1a1dde7c8d0cf18e49b5af7fef1368216120eed1 (diff) | |
download | openttd-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 'station.h')
-rw-r--r-- | station.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -270,7 +270,7 @@ int GetCustomStationsCount(StationClass sclass); 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 @@ void ClearSlot(Vehicle *v, RoadStop *rs); 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 @@ static inline bool IsCompatibleTrainStationTile(TileIndex tile, TileIndex ref) 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 IsBuoy(const Station* st) } 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 bool IsBuoyTile(TileIndex tile) { static inline byte GetRoadStationDir(TileIndex tile) { assert(IsRoadStationTile(tile)); - return (_map5[tile] - 0x43) & 3; + return (_m[tile].m5 - 0x43) & 3; } #endif /* STATION_H */ |