src/rail_cmd.cpp
branchnoai
changeset 10645 8cbdb511a674
parent 10513 33cb70ff2f5d
child 10715 6bdf79ffb022
--- a/src/rail_cmd.cpp	Mon May 19 14:14:33 2008 +0000
+++ b/src/rail_cmd.cpp	Mon May 19 15:13:58 2008 +0000
@@ -777,7 +777,7 @@
 		d->town_index = ClosestTownFromTile(tile, (uint)-1)->index;
 
 		AddSideToSignalBuffer(tile, INVALID_DIAGDIR, _current_player);
-		YapfNotifyTrackLayoutChange(tile, TrackdirToTrack(DiagdirToDiagTrackdir(dir)));
+		YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir));
 	}
 
 	return cost.AddCost(_price.build_train_depot);
@@ -1246,7 +1246,7 @@
 						case RAIL_TILE_WAYPOINT:
 							if (flags & DC_EXEC) {
 								/* notify YAPF about the track layout change */
-								YapfNotifyTrackLayoutChange(tile, AxisToTrack(GetWaypointAxis(tile)));
+								YapfNotifyTrackLayoutChange(tile, GetRailWaypointTrack(tile));
 							}
 							cost.AddCost(RailConvertCost(type, totype));
 							break;
@@ -1254,7 +1254,7 @@
 						case RAIL_TILE_DEPOT:
 							if (flags & DC_EXEC) {
 								/* notify YAPF about the track layout change */
-								YapfNotifyTrackLayoutChange(tile, AxisToTrack(DiagDirToAxis(GetRailDepotDirection(tile))));
+								YapfNotifyTrackLayoutChange(tile, GetRailDepotTrack(tile));
 
 								/* Update build vehicle window related to this depot */
 								InvalidateWindowData(WC_VEHICLE_DEPOT, tile);
@@ -1295,7 +1295,7 @@
 						VehicleFromPos(tile, NULL, &UpdateTrainPowerProc);
 						VehicleFromPos(endtile, NULL, &UpdateTrainPowerProc);
 
-						Track track = AxisToTrack(DiagDirToAxis(GetTunnelBridgeDirection(tile)));
+						Track track = DiagDirToDiagTrack(GetTunnelBridgeDirection(tile));
 
 						YapfNotifyTrackLayoutChange(tile, track);
 						YapfNotifyTrackLayoutChange(endtile, track);
@@ -1344,7 +1344,7 @@
 		DoClearSquare(tile);
 		delete GetDepotByTile(tile);
 		AddSideToSignalBuffer(tile, dir, owner);
-		YapfNotifyTrackLayoutChange(tile, TrackdirToTrack(DiagdirToDiagTrackdir(dir)));
+		YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir));
 	}
 
 	return CommandCost(EXPENSES_CONSTRUCTION, _price.remove_train_depot);
@@ -2149,7 +2149,7 @@
 
 			if (side != INVALID_DIAGDIR && side != dir) break;
 
-			trackbits = AxisToTrackBits(DiagDirToAxis(dir));
+			trackbits = DiagDirToDiagTrackBits(dir);
 			break;
 		}