(svn r3073) int/byte -> EngineID/PlayerID/VehicleID

0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
This commit is contained in:
tron
2005-10-20 17:43:13 +00:00
parent 6a5c0fabdd
commit 2b91f55b32
7 changed files with 51 additions and 53 deletions

View File

@@ -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;