train_cmd.c
changeset 926 bd4312619522
parent 919 b0d6c7642f99
child 954 4d052517a993
--- a/train_cmd.c	Fri Jan 07 12:33:28 2005 +0000
+++ b/train_cmd.c	Fri Jan 07 17:02:43 2005 +0000
@@ -266,8 +266,8 @@
 			v->direction = (byte)(dir*2+1);
 			v->tile = (TileIndex)tile;
 
-			x = GET_TILE_X(tile)*16 | _vehicle_initial_x_fract[dir];
-			y = GET_TILE_Y(tile)*16 | _vehicle_initial_y_fract[dir];
+			x = TileX(tile) * 16 | _vehicle_initial_x_fract[dir];
+			y = TileY(tile) * 16 | _vehicle_initial_y_fract[dir];
 
 			v->x_pos = x;
 			v->y_pos = y;
@@ -1846,8 +1846,8 @@
 
 static int GetNewVehicleDirectionByTile(uint new_tile, uint old_tile)
 {
-	uint offs = (GET_TILE_Y(new_tile) - GET_TILE_Y(old_tile) + 1) * 4 +
-							GET_TILE_X(new_tile) - GET_TILE_X(old_tile) + 1;
+	uint offs = (TileY(new_tile) - TileY(old_tile) + 1) * 4 +
+							TileX(new_tile) - TileX(old_tile) + 1;
 	assert(offs < 11);
 	return _new_vehicle_direction_table[offs];
 }