diff options
author | tron <tron@openttd.org> | 2005-10-20 17:43:13 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-10-20 17:43:13 +0000 |
commit | 2b91f55b320256a9653920f0b395879c1012d158 (patch) | |
tree | 904818203b322c8fca47da358ab42c2f254d2280 /players.c | |
parent | 6a5c0fabddadee4a95b075a21856eb8afbf93c57 (diff) | |
download | openttd-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.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -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; |