summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-05-21 16:18:58 +0000
committertron <tron@openttd.org>2006-05-21 16:18:58 +0000
commitd9e968e759b6b904f289d7f51aa60a511c220fa6 (patch)
tree49a1ba035d8221d5cb20296fb4a24283fdbb7d42
parentf233b89efdfc3395bea4bc7ff442a3b6daedc62a (diff)
downloadopenttd-d9e968e759b6b904f289d7f51aa60a511c220fa6.tar.xz
(svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player
-rw-r--r--ai/ai.c4
-rw-r--r--ai/ai.h2
-rw-r--r--ai/trolly/build.c3
-rw-r--r--aircraft_gui.c2
-rw-r--r--roadveh_gui.c2
-rw-r--r--ship_gui.c2
-rw-r--r--train_gui.c2
7 files changed, 9 insertions, 8 deletions
diff --git a/ai/ai.c b/ai/ai.c
index ac8c067a1..6754dc82e 100644
--- a/ai/ai.c
+++ b/ai/ai.c
@@ -45,7 +45,7 @@ static void AI_DequeueCommands(PlayerID player)
* 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 @@ static void AI_PutCommandInQueue(byte player, uint tile, uint32 p1, uint32 p2, u
/**
* 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;
diff --git a/ai/ai.h b/ai/ai.h
index dd036fea1..76e2dc035 100644
--- a/ai/ai.h
+++ b/ai/ai.h
@@ -45,7 +45,7 @@ void AI_PlayerDied(PlayerID player);
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.
diff --git a/ai/trolly/build.c b/ai/trolly/build.c
index 66728c29a..2b6342604 100644
--- a/ai/trolly/build.c
+++ b/ai/trolly/build.c
@@ -233,11 +233,12 @@ EngineID AiNew_PickVehicle(Player *p)
// 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;
diff --git a/aircraft_gui.c b/aircraft_gui.c
index fe3441b04..8b13e6d35 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -86,7 +86,7 @@ void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2)
}
}
-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));
}
diff --git a/roadveh_gui.c b/roadveh_gui.c
index 035333c7b..573fda32d 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -222,7 +222,7 @@ static void ShowRoadVehDetailsWindow(const Vehicle* v)
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));
}
diff --git a/ship_gui.c b/ship_gui.c
index 1f9feb9c1..00a364934 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -312,7 +312,7 @@ void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
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));
}
diff --git a/train_gui.c b/train_gui.c
index e9635ef0e..9ba5e2076 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -171,7 +171,7 @@ void CcBuildLoco(bool success, TileIndex tile, uint32 p1, uint32 p2)
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));
}