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 /unmovable_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 'unmovable_cmd.c')
-rw-r--r-- | unmovable_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unmovable_cmd.c b/unmovable_cmd.c index 66c8a38f4..9b6075c93 100644 --- a/unmovable_cmd.c +++ b/unmovable_cmd.c @@ -240,7 +240,7 @@ static bool checkRadioTowerNearby(uint tile) BEGIN_TILE_LOOP(tile, 9, 9, tile_s) // already a radio tower here? - if (IS_TILETYPE(tile, MP_UNMOVABLE) && _map5[tile] == 0) + if (IsTileType(tile, MP_UNMOVABLE) && _map5[tile] == 0) return false; END_TILE_LOOP(tile, 9, 9, tile_s) return true; @@ -265,7 +265,7 @@ void GenerateUnmovables() tile = r % MapSize(); // TILE_MASK seems to be not working correctly. Radio masts accumulate in one area. // tile = TILE_MASK(r); - if (IS_TILETYPE(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h >= 32) { + if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h >= 32) { if(!checkRadioTowerNearby(tile)) continue; _map_type_and_height[tile] |= MP_UNMOVABLE << 4; @@ -296,7 +296,7 @@ restart: if (--j == 0) goto restart; tile = TILE_MASK(tile + ToTileIndexDiff(_tile_add[dir])); - } while (!(IS_TILETYPE(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h <= 16)); + } while (!(IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h <= 16)); assert(tile == TILE_MASK(tile)); |