summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-20 17:43:13 +0000
committertron <tron@openttd.org>2005-10-20 17:43:13 +0000
commit2b91f55b320256a9653920f0b395879c1012d158 (patch)
tree904818203b322c8fca47da358ab42c2f254d2280 /players.c
parent6a5c0fabddadee4a95b075a21856eb8afbf93c57 (diff)
downloadopenttd-2b91f55b320256a9653920f0b395879c1012d158.tar.xz
(svn r3073) int/byte -> EngineID/PlayerID/VehicleID
0/-1 -> INVALID_ENGINE 0x10 -> OWNER_NONE
Diffstat (limited to 'players.c')
-rw-r--r--players.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/players.c b/players.c
index 6c6ec6ae7..7de4c13a7 100644
--- a/players.c
+++ b/players.c
@@ -603,21 +603,19 @@ void PlayersYearlyLoop(void)
}
}
-void DeletePlayerWindows(int pi)
+void DeletePlayerWindows(PlayerID pi)
{
DeleteWindowById(WC_COMPANY, pi);
DeleteWindowById(WC_FINANCES, pi);
DeleteWindowById(WC_STATION_LIST, pi);
- /* The vehicle list windows also have station in the window_number
- * A stationindex of -1 means the global vehicle list */
- DeleteWindowById(WC_TRAINS_LIST, (-1 << 16) | pi);
- DeleteWindowById(WC_ROADVEH_LIST, (-1 << 16) | pi);
- DeleteWindowById(WC_SHIPS_LIST, (-1 << 16) | pi);
- DeleteWindowById(WC_AIRCRAFT_LIST, (-1 << 16) | pi);
+ DeleteWindowById(WC_TRAINS_LIST, (INVALID_STATION << 16) | pi);
+ DeleteWindowById(WC_ROADVEH_LIST, (INVALID_STATION << 16) | pi);
+ DeleteWindowById(WC_SHIPS_LIST, (INVALID_STATION << 16) | pi);
+ DeleteWindowById(WC_AIRCRAFT_LIST, (INVALID_STATION << 16) | pi);
DeleteWindowById(WC_BUY_COMPANY, pi);
}
-byte GetPlayerRailtypes(int p)
+byte GetPlayerRailtypes(PlayerID p)
{
Engine *e;
int rt = 0;
@@ -638,7 +636,7 @@ byte GetPlayerRailtypes(int p)
return rt;
}
-static void DeletePlayerStuff(int pi)
+static void DeletePlayerStuff(PlayerID pi)
{
Player *p;