diff --git a/ai/ai.c b/ai/ai.c index 06c4c88ff1..fcef151696 100644 --- a/ai/ai.c +++ b/ai/ai.c @@ -11,7 +11,7 @@ /** * Dequeues commands put in the queue via AI_PutCommandInQueue. */ -static void AI_DequeueCommands(byte player) +static void AI_DequeueCommands(PlayerID player) { AICommand *com, *entry_com; diff --git a/main_gui.c b/main_gui.c index bcd03de08b..71c77d001d 100644 --- a/main_gui.c +++ b/main_gui.c @@ -580,7 +580,7 @@ static void UpdatePlayerMenuHeight(Window *w) } } -extern void DrawPlayerIcon(int p, int x, int y); +extern void DrawPlayerIcon(PlayerID pid, int x, int y); static void PlayerMenuWndProc(Window *w, WindowEvent *e) { diff --git a/misc_gui.c b/misc_gui.c index c39cfb067a..8bd360e414 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -1719,7 +1719,7 @@ static const Widget _cheat_widgets[] = { { WIDGETS_END}, }; -extern void DrawPlayerIcon(int p, int x, int y); +extern void DrawPlayerIcon(PlayerID pid, int x, int y); static void CheatsWndProc(Window *w, WindowEvent *e) { diff --git a/network.h b/network.h index 0165b62c67..280de1fab9 100644 --- a/network.h +++ b/network.h @@ -222,7 +222,7 @@ VARDEF bool _networking; VARDEF bool _network_available; // is network mode available? VARDEF bool _network_server; // network-server is active VARDEF bool _network_dedicated; // are we a dedicated server? -VARDEF byte _network_playas; // an id to play as.. +VARDEF PlayerID _network_playas; // an id to play as.. void ParseConnectionString(const char **player, const char **port, char *connection_string); void NetworkUpdateClientInfo(uint16 client_index); diff --git a/network_client.c b/network_client.c index da4256db72..e1390568ef 100644 --- a/network_client.c +++ b/network_client.c @@ -327,7 +327,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO) { NetworkClientInfo *ci; uint16 index = NetworkRecv_uint16(MY_CLIENT, p); - byte playas = NetworkRecv_uint8(MY_CLIENT, p); + PlayerID playas = NetworkRecv_uint8(MY_CLIENT, p); char name[NETWORK_NAME_LENGTH]; char unique_id[NETWORK_NAME_LENGTH]; diff --git a/network_gui.c b/network_gui.c index 59496e4508..1ad3643b82 100644 --- a/network_gui.c +++ b/network_gui.c @@ -27,7 +27,7 @@ #define BTC 15 typedef struct network_d { - byte company; // select company in network lobby + PlayerID company; // select company in network lobby byte field; // select text-field in start-server and game-listing NetworkGameList *server; // selected server in lobby and game-listing FiosItem *map; // selected map in start-server @@ -1004,7 +1004,7 @@ static void ShowNetworkLobbyWindow(NetworkGameList *ngl) // and also makes able to give money to them, kick them (if server) // and stuff like that. -extern void DrawPlayerIcon(int p, int x, int y); +extern void DrawPlayerIcon(PlayerID pid, int x, int y); // Every action must be of this form typedef void ClientList_Action_Proc(byte client_no); diff --git a/town_gui.c b/town_gui.c index 124be37dcc..6512c42fcc 100644 --- a/town_gui.c +++ b/town_gui.c @@ -29,7 +29,7 @@ static const Widget _town_authority_widgets[] = { }; extern const byte _town_action_costs[8]; -extern void DrawPlayerIcon(int p, int x, int y); +extern void DrawPlayerIcon(PlayerID pid, int x, int y); /** Get a list of available actions to do at a town. * @param *nump if not NULL add put the number of available actions in it