(svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player
authortron
Sun, 21 May 2006 16:18:58 +0000
changeset 3887 ece644bbf459
parent 3886 80caa2b88ecf
child 3888 3cbfc7edbc2b
(svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player
ai/ai.c
ai/ai.h
ai/trolly/build.c
aircraft_gui.c
roadveh_gui.c
ship_gui.c
train_gui.c
--- a/ai/ai.c	Sun May 21 15:27:10 2006 +0000
+++ b/ai/ai.c	Sun May 21 16:18:58 2006 +0000
@@ -45,7 +45,7 @@
  * Needed for SP; we need to delay DoCommand with 1 tick, because else events
  *  will make infinite loops (AIScript).
  */
-static void AI_PutCommandInQueue(byte player, uint tile, uint32 p1, uint32 p2, uint procc)
+static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uint32 p2, uint procc)
 {
 	AICommand *com;
 
@@ -80,7 +80,7 @@
 /**
  * Executes a raw DoCommand for the AI.
  */
-int32 AI_DoCommand(uint tile, uint32 p1, uint32 p2, uint32 flags, uint procc)
+int32 AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc)
 {
 	PlayerID old_lp;
 	int32 res = 0;
--- a/ai/ai.h	Sun May 21 15:27:10 2006 +0000
+++ b/ai/ai.h	Sun May 21 16:18:58 2006 +0000
@@ -45,7 +45,7 @@
 void AI_RunGameLoop(void);
 void AI_Initialize(void);
 void AI_Uninitialize(void);
-int32 AI_DoCommand(uint tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
+int32 AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
 
 /** Is it allowed to start a new AI.
  * This function checks some boundries to see if we should launch a new AI.
--- a/ai/trolly/build.c	Sun May 21 15:27:10 2006 +0000
+++ b/ai/trolly/build.c	Sun May 21 16:18:58 2006 +0000
@@ -233,11 +233,12 @@
 
 		// Let's check it backwards.. we simply want to best engine available..
 		for (i = end - 1; i >= start; i--) {
+			const Engine* e = GetEngine(i);
 			int32 ret;
 
 			// Is it availiable?
 			// Also, check if the reliability of the vehicle is above the AI_VEHICLE_MIN_RELIABILTY
-			if (!HASBIT(GetEngine(i)->player_avail, _current_player) || GetEngine(i)->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
+			if (!HASBIT(e->player_avail, _current_player) || e->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
 			// Can we build it?
 			ret = AI_DoCommand(0, i, 0, DC_QUERY_COST, CMD_BUILD_ROAD_VEH);
 			if (!CmdFailed(ret)) return i;
--- a/aircraft_gui.c	Sun May 21 15:27:10 2006 +0000
+++ b/aircraft_gui.c	Sun May 21 16:18:58 2006 +0000
@@ -86,7 +86,7 @@
 	}
 }
 
-void CcCloneAircraft(bool success, uint tile, uint32 p1, uint32 p2)
+void CcCloneAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
 	if (success) ShowAircraftViewWindow(GetVehicle(_new_aircraft_id));
 }
--- a/roadveh_gui.c	Sun May 21 15:27:10 2006 +0000
+++ b/roadveh_gui.c	Sun May 21 16:18:58 2006 +0000
@@ -222,7 +222,7 @@
 	w->caption_color = v->owner;
 }
 
-void CcCloneRoadVeh(bool success, uint tile, uint32 p1, uint32 p2)
+void CcCloneRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
 	if (success) ShowRoadVehViewWindow(GetVehicle(_new_roadveh_id));
 }
--- a/ship_gui.c	Sun May 21 15:27:10 2006 +0000
+++ b/ship_gui.c	Sun May 21 16:18:58 2006 +0000
@@ -312,7 +312,7 @@
 	ShowShipViewWindow(v);
 }
 
-void CcCloneShip(bool success, uint tile, uint32 p1, uint32 p2)
+void CcCloneShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
 	if (success) ShowShipViewWindow(GetVehicle(_new_ship_id));
 }
--- a/train_gui.c	Sun May 21 15:27:10 2006 +0000
+++ b/train_gui.c	Sun May 21 16:18:58 2006 +0000
@@ -171,7 +171,7 @@
 	ShowTrainViewWindow(v);
 }
 
-void CcCloneTrain(bool success, uint tile, uint32 p1, uint32 p2)
+void CcCloneTrain(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
 	if (success) ShowTrainViewWindow(GetVehicle(_new_train_id));
 }