diff options
author | tron <tron@openttd.org> | 2005-01-16 11:24:58 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-16 11:24:58 +0000 |
commit | ae796740aab0ee480759d2015014b29e2a7aedb4 (patch) | |
tree | bc9e7bccf2119556badf2efe43aca901dfc0a76e /road_cmd.c | |
parent | d2643dc483abbd086441b126912f466127253b06 (diff) | |
download | openttd-ae796740aab0ee480759d2015014b29e2a7aedb4.tar.xz |
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
Diffstat (limited to 'road_cmd.c')
-rw-r--r-- | road_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/road_cmd.c b/road_cmd.c index f46f3a0f5..b78a832ab 100644 --- a/road_cmd.c +++ b/road_cmd.c @@ -25,7 +25,7 @@ bool HasTileRoadAt(uint tile, int i) int mask; byte b; - switch(GET_TILETYPE(tile)) { + switch (TileType(tile)) { case MP_STREET: b = _map5[tile]; @@ -76,7 +76,7 @@ static bool CheckAllowRemoveRoad(uint tile, uint br, bool *edge_road) return true; // A railway crossing has the road owner in the map3_lo byte. - if (IS_TILETYPE(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x10) { + if (IsTileType(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x10) { owner = _map3_lo[tile]; } else { owner = _map_owner[tile]; @@ -117,7 +117,7 @@ static bool CheckAllowRemoveRoad(uint tile, uint br, bool *edge_road) bool IsRoadDepotTile(TileIndex tile) { - return IS_TILETYPE(tile, MP_STREET) && + return IsTileType(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x20; } @@ -164,7 +164,7 @@ int32 CmdRemoveRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2) } if (ti.type == MP_TUNNELBRIDGE) { - if (!EnsureNoVehicleZ(tile, GET_TILEHEIGHT(tile))) + if (!EnsureNoVehicleZ(tile, TileHeight(tile))) return CMD_ERROR; if ((ti.map5 & 0xE9) == 0xE8) { |