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 /disaster_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 'disaster_cmd.c')
-rw-r--r-- | disaster_cmd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/disaster_cmd.c b/disaster_cmd.c index cac58ac03..d6d10bf0c 100644 --- a/disaster_cmd.c +++ b/disaster_cmd.c @@ -164,7 +164,7 @@ static void DisasterTick_Zeppeliner(Vehicle *v) } else if (v->current_order.station == 0) { tile = v->tile; /**/ - if (IS_TILETYPE(tile, MP_STATION) && + if (IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 8, 0x43) && IS_HUMAN_PLAYER(_map_owner[tile])) { @@ -189,7 +189,7 @@ static void DisasterTick_Zeppeliner(Vehicle *v) tile = v->tile; /**/ - if (IS_TILETYPE(tile, MP_STATION) && + if (IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 8, 0x43) && IS_HUMAN_PLAYER(_map_owner[tile])) { @@ -231,7 +231,7 @@ static void DisasterTick_Zeppeliner(Vehicle *v) } tile = v->tile;/**/ - if (IS_TILETYPE(tile, MP_STATION) && + if (IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 8, 0x43) && IS_HUMAN_PLAYER(_map_owner[tile])) { @@ -325,7 +325,7 @@ static void DestructIndustry(Industry *i) uint tile; for(tile=0; tile != MapSize(); tile++) { - if (IS_TILETYPE(tile, MP_INDUSTRY) && _map2[tile] == i->index) { + if (IsTileType(tile, MP_INDUSTRY) && _map2[tile] == i->index) { _map_owner[tile] = 0; MarkTileDirtyByTile(tile); } @@ -391,7 +391,7 @@ static void DisasterTick_2(Vehicle *v) return; tile = TILE_FROM_XY(x,y); - if (!IS_TILETYPE(tile, MP_INDUSTRY)) + if (!IsTileType(tile, MP_INDUSTRY)) return; v->dest_tile = ind = _map2[tile]; @@ -462,7 +462,7 @@ static void DisasterTick_3(Vehicle *v) return; tile = TILE_FROM_XY(x,y); - if (!IS_TILETYPE(tile, MP_INDUSTRY)) + if (!IsTileType(tile, MP_INDUSTRY)) return; v->dest_tile = ind = _map2[tile]; @@ -570,7 +570,7 @@ static void DisasterTick_4(Vehicle *v) tile_org = tile = TILE_MASK(Random()); do { - if (IS_TILETYPE(tile, MP_RAILWAY) && + if (IsTileType(tile, MP_RAILWAY) && (_map5[tile]&~3)!=0xC0 && IS_HUMAN_PLAYER(_map_owner[tile])) break; tile = TILE_MASK(tile+1); |