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 | 61a6bc544d9e656feb4458b6f9a86f7b7e01e7d6 (patch) | |
tree | bc9e7bccf2119556badf2efe43aca901dfc0a76e /vehicle.c | |
parent | 0c587b1a6098ba546d6e05930ba54b05ec930dd4 (diff) | |
download | openttd-61a6bc544d9e656feb4458b6f9a86f7b7e01e7d6.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 'vehicle.c')
-rw-r--r-- | vehicle.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -604,7 +604,7 @@ static void EffectTick_0(Vehicle *v) BeginVehicleMove(v); tile = TILE_FROM_XY(v->x_pos, v->y_pos); - if (!IS_TILETYPE(tile, MP_INDUSTRY)) { + if (!IsTileType(tile, MP_INDUSTRY)) { EndVehicleMove(v); DeleteVehicle(v); return; @@ -1074,7 +1074,7 @@ again: SndPlayVehicleFx(SND_31_EXTRACT, v); tile = TILE_FROM_XY(v->x_pos, v->y_pos); - if (IS_TILETYPE(tile, MP_INDUSTRY) && + if (IsTileType(tile, MP_INDUSTRY) && _map5[tile]==0xA2) { AddAnimatedTile(tile); } @@ -1642,13 +1642,13 @@ byte GetDirectionTowards(Vehicle *v, int x, int y) uint32 VehicleEnterTile(Vehicle *v, uint tile, int x, int y) { uint old_tile = v->tile; - uint32 result = _tile_type_procs[GET_TILETYPE(tile)]->vehicle_enter_tile_proc(v, tile, x, y); + uint32 result = _tile_type_procs[TileType(tile)]->vehicle_enter_tile_proc(v, tile, x, y); /* When vehicle_enter_tile_proc returns 8, that apparently means that * we cannot enter the tile at all. In that case, don't call * leave_tile. */ if (!(result & 8) && old_tile != tile) { - VehicleLeaveTileProc *proc = _tile_type_procs[GET_TILETYPE(old_tile)]->vehicle_leave_tile_proc; + VehicleLeaveTileProc *proc = _tile_type_procs[TileType(old_tile)]->vehicle_leave_tile_proc; if (proc != NULL) proc(v, old_tile, x, y); } |