From ae796740aab0ee480759d2015014b29e2a7aedb4 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 16 Jan 2005 11:24:58 +0000 Subject: (svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts --- disaster_cmd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'disaster_cmd.c') 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); -- cgit v1.2.3-54-g00ecf