From 7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 7 Jan 2005 17:02:43 +0000 Subject: (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY] --- vehicle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vehicle.c') diff --git a/vehicle.c b/vehicle.c index f58d05cfa..f6bb1d39e 100644 --- a/vehicle.c +++ b/vehicle.c @@ -105,10 +105,10 @@ bool EnsureNoVehicleZ(TileIndex tile, byte z) Vehicle *FindVehicleBetween(TileIndex from, TileIndex to, byte z) { - int x1 = GET_TILE_X(from); - int y1 = GET_TILE_Y(from); - int x2 = GET_TILE_X(to); - int y2 = GET_TILE_Y(to); + int x1 = TileX(from); + int y1 = TileY(from); + int x2 = TileX(to); + int y2 = TileY(to); Vehicle *veh; /* Make sure x1 < x2 or y1 < y2 */ @@ -148,7 +148,7 @@ void VehiclePositionChanged(Vehicle *v) void UpdateWaypointSign(Waypoint *cp) { - Point pt = RemapCoords2(GET_TILE_X(cp->xy)*16, GET_TILE_Y(cp->xy)*16); + Point pt = RemapCoords2(TileX(cp->xy) * 16, TileY(cp->xy) * 16); SetDParam(0, cp - _waypoints); UpdateViewportSignPos(&cp->sign, pt.x, pt.y - 0x20, STR_WAYPOINT_VIEWPORT); } @@ -263,7 +263,7 @@ void *VehicleFromPos(TileIndex tile, void *data, VehicleFromPosProc *proc) { int x,y,x2,y2; VehicleID veh; - Point pt = RemapCoords(GET_TILE_X(tile) * 16, GET_TILE_Y(tile) * 16, 0); + Point pt = RemapCoords(TileX(tile) * 16, TileY(tile) * 16, 0); x2 = ((pt.x + 104) & 0x1F80) >> 7; x = ((pt.x - 174) & 0x1F80) >> 7; -- cgit v1.2.3-54-g00ecf