diff options
-rw-r--r-- | src/command.cpp | 2 | ||||
-rw-r--r-- | src/command_func.h | 2 | ||||
-rw-r--r-- | src/company_cmd.cpp | 2 | ||||
-rw-r--r-- | src/network/core/core.cpp | 4 | ||||
-rw-r--r-- | src/network/core/core.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp_admin.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp_admin.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp_content.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp_content.h | 2 | ||||
-rw-r--r-- | src/network/core/tcp_game.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp_game.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp_listen.h | 2 | ||||
-rw-r--r-- | src/network/core/udp.cpp | 8 | ||||
-rw-r--r-- | src/network/core/udp.h | 4 | ||||
-rw-r--r-- | src/network/network.cpp | 10 | ||||
-rw-r--r-- | src/network/network_admin.cpp | 42 | ||||
-rw-r--r-- | src/network/network_client.cpp | 50 | ||||
-rw-r--r-- | src/network/network_command.cpp | 6 | ||||
-rw-r--r-- | src/network/network_content.cpp | 12 | ||||
-rw-r--r-- | src/network/network_server.cpp | 70 | ||||
-rw-r--r-- | src/network/network_udp.cpp | 14 | ||||
-rw-r--r-- | src/settings.cpp | 2 | ||||
-rw-r--r-- | src/toolbar_gui.cpp | 2 |
25 files changed, 141 insertions, 141 deletions
diff --git a/src/command.cpp b/src/command.cpp index 1894244fc..e331d6069 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -627,7 +627,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, * send it to the command-queue and abort execution */ if (_networking && !(cmd & CMD_NETWORK_COMMAND)) { - NetworkSend_Command(tile, p1, p2, cmd & ~CMD_FLAGS_MASK, callback, text, _current_company); + NetworkSendCommand(tile, p1, p2, cmd & ~CMD_FLAGS_MASK, callback, text, _current_company); cur_company.Restore(); /* Don't return anything special here; no error, no costs. diff --git a/src/command_func.h b/src/command_func.h index 462867a38..3ed4d1e60 100644 --- a/src/command_func.h +++ b/src/command_func.h @@ -53,7 +53,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, /** * Send a command over the network */ -void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company); +void NetworkSendCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company); #endif /* ENABLE_NETWORK */ extern Money _additional_cash_required; diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 8e424165d..e5eeea939 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -845,7 +845,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 * TODO: Perhaps this could be improved by when the client is ready * with joining to let it send itself the command, and not the server? * For example in network_client.c:534? */ - NetworkSend_Command(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name, ci->client_playas); + NetworkSendCommand(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name, ci->client_playas); } /* Announce new company on network, if the client was a SPECTATOR before */ diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp index 4c724e47e..fc1bbf954 100644 --- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -103,7 +103,7 @@ void NetworkCoreShutdown() * @param p the packet to write the data to * @param grf the GRFIdentifier to serialize */ -void NetworkSocketHandler::Send_GRFIdentifier(Packet *p, const GRFIdentifier *grf) +void NetworkSocketHandler::SendGRFIdentifier(Packet *p, const GRFIdentifier *grf) { uint j; p->Send_uint32(grf->grfid); @@ -117,7 +117,7 @@ void NetworkSocketHandler::Send_GRFIdentifier(Packet *p, const GRFIdentifier *gr * @param p the packet to read the data from * @param grf the GRFIdentifier to deserialize */ -void NetworkSocketHandler::Recv_GRFIdentifier(Packet *p, GRFIdentifier *grf) +void NetworkSocketHandler::ReceiveGRFIdentifier(Packet *p, GRFIdentifier *grf) { uint j; grf->grfid = p->Recv_uint32(); diff --git a/src/network/core/core.h b/src/network/core/core.h index bf013909a..932199a9c 100644 --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -74,9 +74,9 @@ public: */ void Reopen() { this->has_quit = false; } - void Send_GRFIdentifier(Packet *p, const GRFIdentifier *grf); - void Recv_GRFIdentifier(Packet *p, GRFIdentifier *grf); - void Send_CompanyInformation(Packet *p, const struct Company *c, const struct NetworkCompanyStats *stats); + void SendGRFIdentifier(Packet *p, const GRFIdentifier *grf); + void ReceiveGRFIdentifier(Packet *p, GRFIdentifier *grf); + void SendCompanyInformation(Packet *p, const struct Company *c, const struct NetworkCompanyStats *stats); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index c35b029a2..66f19107c 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -56,7 +56,7 @@ NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection(bool error) * if the OS-network-buffer is full) * @param packet the packet to send */ -void NetworkTCPSocketHandler::Send_Packet(Packet *packet) +void NetworkTCPSocketHandler::SendPacket(Packet *packet) { Packet *p; assert(packet != NULL); @@ -90,7 +90,7 @@ void NetworkTCPSocketHandler::Send_Packet(Packet *packet) * @return \c true if a (part of a) packet could be sent and * the connection is not closed yet. */ -bool NetworkTCPSocketHandler::Send_Packets(bool closing_down) +bool NetworkTCPSocketHandler::SendPackets(bool closing_down) { ssize_t res; Packet *p; @@ -141,7 +141,7 @@ bool NetworkTCPSocketHandler::Send_Packets(bool closing_down) * @param status the variable to store the status into * @return the received packet (or NULL when it didn't receive one) */ -Packet *NetworkTCPSocketHandler::Recv_Packet() +Packet *NetworkTCPSocketHandler::ReceivePacket() { ssize_t res; diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index 86c568edf..899eba771 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -35,11 +35,11 @@ public: bool IsConnected() const { return this->sock != INVALID_SOCKET; } virtual NetworkRecvStatus CloseConnection(bool error = true); - void Send_Packet(Packet *packet); - bool Send_Packets(bool closing_down = false); + void SendPacket(Packet *packet); + bool SendPackets(bool closing_down = false); bool IsPacketQueueEmpty(); - Packet *Recv_Packet(); + Packet *ReceivePacket(); bool CanSendReceive(); diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp index e3235eebe..aaa3c425a 100644 --- a/src/network/core/tcp_admin.cpp +++ b/src/network/core/tcp_admin.cpp @@ -100,11 +100,11 @@ NetworkRecvStatus NetworkAdminSocketHandler::HandlePacket(Packet *p) * HandlePacket is returned. * @return #NetworkRecvStatus of the last handled packet. */ -NetworkRecvStatus NetworkAdminSocketHandler::Recv_Packets() +NetworkRecvStatus NetworkAdminSocketHandler::ReceivePackets() { Packet *p; - while ((p = this->Recv_Packet()) != NULL) { - NetworkRecvStatus res = HandlePacket(p); + while ((p = this->ReceivePacket()) != NULL) { + NetworkRecvStatus res = this->HandlePacket(p); if (res != NETWORK_RECV_STATUS_OKAY) return res; } diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h index 82121ce73..ee1e6f2db 100644 --- a/src/network/core/tcp_admin.h +++ b/src/network/core/tcp_admin.h @@ -347,10 +347,10 @@ public: NetworkAdminSocketHandler(SOCKET s); ~NetworkAdminSocketHandler(); - NetworkRecvStatus Recv_Packets(); + NetworkRecvStatus ReceivePackets(); - const char *Recv_Command(Packet *p, CommandPacket *cp); - void Send_Command(Packet *p, const CommandPacket *cp); + const char *ReceiveCommand(Packet *p, CommandPacket *cp); + void SendCommand(Packet *p, const CommandPacket *cp); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp_content.cpp b/src/network/core/tcp_content.cpp index 0cf03d7fa..17b7da048 100644 --- a/src/network/core/tcp_content.cpp +++ b/src/network/core/tcp_content.cpp @@ -117,11 +117,11 @@ bool NetworkContentSocketHandler::HandlePacket(Packet *p) /** * Receive a packet at TCP level */ -void NetworkContentSocketHandler::Recv_Packets() +void NetworkContentSocketHandler::ReceivePackets() { Packet *p; - while ((p = this->Recv_Packet()) != NULL) { - bool cont = HandlePacket(p); + while ((p = this->ReceivePacket()) != NULL) { + bool cont = this->HandlePacket(p); delete p; if (!cont) return; } diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h index 24f9f648b..f9ff4be35 100644 --- a/src/network/core/tcp_content.h +++ b/src/network/core/tcp_content.h @@ -210,7 +210,7 @@ public: virtual ~NetworkContentSocketHandler() { this->Close(); } /** Do the actual receiving of packets. */ - void Recv_Packets(); + void ReceivePackets(); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 258f9c6b2..6c68217fc 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -34,7 +34,7 @@ NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) } /** - * Functions to help NetworkRecv_Packet/NetworkSend_Packet a bit + * Functions to help ReceivePacket/SendPacket a bit * A socket can make errors. When that happens this handles what to do. * For clients: close connection and drop back to main-menu * For servers: close connection and that is it @@ -136,10 +136,10 @@ NetworkRecvStatus NetworkGameSocketHandler::HandlePacket(Packet *p) * HandlePacket is returned. * @return #NetworkRecvStatus of the last handled packet. */ -NetworkRecvStatus NetworkGameSocketHandler::Recv_Packets() +NetworkRecvStatus NetworkGameSocketHandler::ReceivePackets() { Packet *p; - while ((p = this->Recv_Packet()) != NULL) { + while ((p = this->ReceivePacket()) != NULL) { NetworkRecvStatus res = HandlePacket(p); delete p; if (res != NETWORK_RECV_STATUS_OKAY) return res; diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index b4a6999cd..be737554e 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -482,10 +482,10 @@ public: inline void SetInfo(NetworkClientInfo *info) { assert(info != NULL && this->info == NULL); this->info = info; } inline NetworkClientInfo *GetInfo() const { return this->info; } - NetworkRecvStatus Recv_Packets(); + NetworkRecvStatus ReceivePackets(); - const char *Recv_Command(Packet *p, CommandPacket *cp); - void Send_Command(Packet *p, const CommandPacket *cp); + const char *ReceiveCommand(Packet *p, CommandPacket *cp); + void SendCommand(Packet *p, const CommandPacket *cp); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp_listen.h b/src/network/core/tcp_listen.h index 83a7f2fd8..0223ad42f 100644 --- a/src/network/core/tcp_listen.h +++ b/src/network/core/tcp_listen.h @@ -129,7 +129,7 @@ public: FOR_ALL_ITEMS_FROM(Tsocket, idx, cs, 0) { cs->writable = !!FD_ISSET(cs->sock, &write_fd); if (FD_ISSET(cs->sock, &read_fd)) { - cs->Recv_Packets(); + cs->ReceivePackets(); } } return _networking; diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index b153cdf88..54b00f30e 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -151,7 +151,7 @@ void NetworkUDPSocketHandler::ReceivePackets() * @param p the packet to write the data to * @param info the NetworkGameInfo struct to serialize */ -void NetworkUDPSocketHandler::Send_NetworkGameInfo(Packet *p, const NetworkGameInfo *info) +void NetworkUDPSocketHandler::SendNetworkGameInfo(Packet *p, const NetworkGameInfo *info) { p->Send_uint8 (NETWORK_GAME_INFO_VERSION); @@ -180,7 +180,7 @@ void NetworkUDPSocketHandler::Send_NetworkGameInfo(Packet *p, const NetworkGameI /* Send actual GRF Identifications */ for (c = info->grfconfig; c != NULL; c = c->next) { - if (!HasBit(c->flags, GCF_STATIC)) this->Send_GRFIdentifier(p, &c->ident); + if (!HasBit(c->flags, GCF_STATIC)) this->SendGRFIdentifier(p, &c->ident); } } @@ -213,7 +213,7 @@ void NetworkUDPSocketHandler::Send_NetworkGameInfo(Packet *p, const NetworkGameI * @param p the packet to read the data from * @param info the NetworkGameInfo to deserialize into */ -void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *info) +void NetworkUDPSocketHandler::ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo *info) { static const Date MAX_DATE = ConvertYMDToDate(MAX_YEAR, 11, 31); // December is month 11 @@ -238,7 +238,7 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i for (i = 0; i < num_grfs; i++) { GRFConfig *c = new GRFConfig(); - this->Recv_GRFIdentifier(p, &c->ident); + this->ReceiveGRFIdentifier(p, &c->ident); this->HandleIncomingNetworkGameInfoGRFConfig(c); /* Append GRFConfig to the list */ diff --git a/src/network/core/udp.h b/src/network/core/udp.h index 82435d9ff..b94fb4738 100644 --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -153,8 +153,8 @@ public: void SendPacket(Packet *p, NetworkAddress *recv, bool all = false, bool broadcast = false); void ReceivePackets(); - void Send_NetworkGameInfo(Packet *p, const NetworkGameInfo *info); - void Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *info); + void SendNetworkGameInfo(Packet *p, const NetworkGameInfo *info); + void ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo *info); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/network.cpp b/src/network/network.cpp index 812217cc1..242f89acf 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -698,13 +698,13 @@ void NetworkReboot() NetworkClientSocket *cs; FOR_ALL_CLIENT_SOCKETS(cs) { cs->SendNewGame(); - cs->Send_Packets(); + cs->SendPackets(); } ServerNetworkAdminSocketHandler *as; FOR_ALL_ADMIN_SOCKETS(as) { as->SendNewGame(); - as->Send_Packets(); + as->SendPackets(); } } @@ -724,14 +724,14 @@ void NetworkDisconnect(bool blocking, bool close_admins) NetworkClientSocket *cs; FOR_ALL_CLIENT_SOCKETS(cs) { cs->SendShutdown(); - cs->Send_Packets(); + cs->SendPackets(); } if (close_admins) { ServerNetworkAdminSocketHandler *as; FOR_ALL_ADMIN_SOCKETS(as) { as->SendShutdown(); - as->Send_Packets(); + as->SendPackets(); } } } @@ -823,7 +823,7 @@ void NetworkGameLoop() while (f != NULL && !feof(f)) { if (_date == next_date && _date_fract == next_date_fract) { if (cp != NULL) { - NetworkSend_Command(cp->tile, cp->p1, cp->p2, cp->cmd & ~CMD_FLAGS_MASK, NULL, cp->text, cp->company); + NetworkSendCommand(cp->tile, cp->p1, cp->p2, cp->cmd & ~CMD_FLAGS_MASK, NULL, cp->text, cp->company); DEBUG(net, 0, "injecting: %08x; %02x; %02x; %06x; %08x; %08x; %08x; \"%s\" (%s)", _date, _date_fract, (int)_current_company, cp->tile, cp->p1, cp->p2, cp->cmd, cp->text, GetCommandName(cp->cmd)); free(cp); cp = NULL; diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp index faf663d7a..bec206e30 100644 --- a/src/network/network_admin.cpp +++ b/src/network/network_admin.cpp @@ -94,7 +94,7 @@ ServerNetworkAdminSocketHandler::~ServerNetworkAdminSocketHandler() continue; } if (as->writable) { - as->Send_Packets(); + as->SendPackets(); } } } @@ -114,7 +114,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendError(NetworkErrorCode er Packet *p = new Packet(ADMIN_PACKET_SERVER_ERROR); p->Send_uint8(error); - this->Send_Packet(p); + this->SendPacket(p); char str[100]; StringID strid = GetNetworkErrorMsg(error); @@ -139,7 +139,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendProtocol() } p->Send_bool(false); - this->Send_Packet(p); + this->SendPacket(p); return this->SendWelcome(); } @@ -161,7 +161,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendWelcome() p->Send_uint16(MapSizeX()); p->Send_uint16(MapSizeY()); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -169,14 +169,14 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendWelcome() NetworkRecvStatus ServerNetworkAdminSocketHandler::SendNewGame() { Packet *p = new Packet(ADMIN_PACKET_SERVER_NEWGAME); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } NetworkRecvStatus ServerNetworkAdminSocketHandler::SendShutdown() { Packet *p = new Packet(ADMIN_PACKET_SERVER_SHUTDOWN); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -185,7 +185,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendDate() Packet *p = new Packet(ADMIN_PACKET_SERVER_DATE); p->Send_uint32(_date); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -195,7 +195,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendClientJoin(ClientID clien Packet *p = new Packet(ADMIN_PACKET_SERVER_CLIENT_JOIN); p->Send_uint32(client_id); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -211,7 +211,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendClientInfo(const NetworkC p->Send_uint32(ci->join_date); p->Send_uint8 (ci->client_playas); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -224,7 +224,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendClientUpdate(const Networ p->Send_string(ci->client_name); p->Send_uint8 (ci->client_playas); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -234,7 +234,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendClientQuit(ClientID clien Packet *p = new Packet(ADMIN_PACKET_SERVER_CLIENT_QUIT); p->Send_uint32(client_id); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -245,7 +245,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendClientError(ClientID clie p->Send_uint32(client_id); p->Send_uint8 (error); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -255,7 +255,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyNew(CompanyID comp Packet *p = new Packet(ADMIN_PACKET_SERVER_COMPANY_NEW); p->Send_uint8(company_id); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -281,7 +281,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyInfo(const Company p->Send_uint32(c->inaugurated_year); p->Send_bool (c->is_ai); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -310,7 +310,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyUpdate(const Compa p->Send_uint8(c->share_owners[i]); } - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -322,7 +322,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyRemove(CompanyID c p->Send_uint8(company_id); p->Send_uint8(acrr); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -354,7 +354,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyEconomy() p->Send_uint16(company->old_economy[i].delivered_cargo); } - this->Send_Packet(p); + this->SendPacket(p); } @@ -384,7 +384,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyStats() p->Send_uint16(company_stats->num_station[i]); } - this->Send_Packet(p); + this->SendPacket(p); } return NETWORK_RECV_STATUS_OKAY; @@ -400,7 +400,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendChat(NetworkAction action p->Send_string(msg); p->Send_uint64(data); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -410,7 +410,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendRcon(uint16 colour, const p->Send_uint16(colour); p->Send_string(result); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -443,7 +443,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendConsole(const char *origi p->Send_string(origin); p->Send_string(string); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 6a0254b44..07b1cfb98 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -62,9 +62,9 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::CloseConnection(NetworkRecvSta { assert(status != NETWORK_RECV_STATUS_OKAY); /* - * Sending a message just before leaving the game calls cs->Send_Packets. + * Sending a message just before leaving the game calls cs->SendPackets. * This might invoke this function, which means that when we close the - * connection after cs->Send_Packets we will close an already closed + * connection after cs->SendPackets we will close an already closed * connection. This handles that case gracefully without having to make * that code any more complex or more aware of the validity of the socket. */ @@ -72,7 +72,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::CloseConnection(NetworkRecvSta DEBUG(net, 1, "Closed client connection %d", this->client_id); - this->Send_Packets(true); + this->SendPackets(true); delete this->GetInfo(); delete this; @@ -127,7 +127,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res) /*static */ bool ClientNetworkGameSocketHandler::Receive() { if (my_client->CanSendReceive()) { - NetworkRecvStatus res = my_client->Recv_Packets(); + NetworkRecvStatus res = my_client->ReceivePackets(); if (res != NETWORK_RECV_STATUS_OKAY) { /* The client made an error of which we can not recover * close the client and drop back to main menu */ @@ -141,7 +141,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res) /** Send the packets of this socket handler. */ /*static */ void ClientNetworkGameSocketHandler::Send() { - my_client->Send_Packets(); + my_client->SendPackets(); my_client->CheckConnection(); } @@ -277,7 +277,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendCompanyInformationQuery() SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0); Packet *p = new Packet(PACKET_CLIENT_COMPANY_INFO); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -292,14 +292,14 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendJoin() p->Send_string(_settings_client.network.client_name); // Client name p->Send_uint8 (_network_join_as); // PlayAs p->Send_uint8 (NETLANG_ANY); // Language - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } NetworkRecvStatus ClientNetworkGameSocketHandler::SendNewGRFsOk() { Packet *p = new Packet(PACKET_CLIENT_NEWGRFS_CHECKED); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -307,7 +307,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendGamePassword(const char *p { Packet *p = new Packet(PACKET_CLIENT_GAME_PASSWORD); p->Send_string(password); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -315,7 +315,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendCompanyPassword(const char { Packet *p = new Packet(PACKET_CLIENT_COMPANY_PASSWORD); p->Send_string(GenerateCompanyPasswordHash(password)); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -331,7 +331,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendGetMap() * will have the lower bits set to 0. As such they would become * incompatible, which we would like to prevent by this. */ if (HasBit(_openttd_newgrf_version, 19)) p->Send_uint32(_openttd_newgrf_version); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -340,7 +340,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendMapOk() my_client->status = STATUS_ACTIVE; Packet *p = new Packet(PACKET_CLIENT_MAP_OK); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -349,7 +349,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendAck() Packet *p = new Packet(PACKET_CLIENT_ACK); p->Send_uint32(_frame_counter); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -357,9 +357,9 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendAck() NetworkRecvStatus ClientNetworkGameSocketHandler::SendCommand(const CommandPacket *cp) { Packet *p = new Packet(PACKET_CLIENT_COMMAND); - my_client->Send_Command(p, cp); + my_client->NetworkGameSocketHandler::SendCommand(p, cp); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -374,7 +374,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendChat(NetworkAction action, p->Send_string(msg); p->Send_uint64(data); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -384,7 +384,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendError(NetworkErrorCode err Packet *p = new Packet(PACKET_CLIENT_ERROR); p->Send_uint8(errorno); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -393,7 +393,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendSetPassword(const char *pa Packet *p = new Packet(PACKET_CLIENT_SET_PASSWORD); p->Send_string(GenerateCompanyPasswordHash(password)); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -402,7 +402,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendSetName(const char *name) Packet *p = new Packet(PACKET_CLIENT_SET_NAME); p->Send_string(name); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -410,7 +410,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendQuit() { Packet *p = new Packet(PACKET_CLIENT_QUIT); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -419,7 +419,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendRCon(const char *pass, con Packet *p = new Packet(PACKET_CLIENT_RCON); p->Send_string(pass); p->Send_string(command); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -428,7 +428,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendMove(CompanyID company, co Packet *p = new Packet(PACKET_CLIENT_MOVE); p->Send_uint8(company); p->Send_string(GenerateCompanyPasswordHash(pass)); - my_client->Send_Packet(p); + my_client->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -597,7 +597,7 @@ DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_CHECK_NEWGRFS) /* Check all GRFs */ for (; grf_count > 0; grf_count--) { GRFIdentifier c; - this->Recv_GRFIdentifier(p, &c); + this->ReceiveGRFIdentifier(p, &c); /* Check whether we know this GRF */ const GRFConfig *f = FindGRFConfig(c.grfid, FGCM_EXACT, c.md5sum); @@ -779,7 +779,7 @@ DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_MAP_DONE) * the server will give us a client-id and let us in */ _network_join_status = NETWORK_JOIN_STATUS_REGISTERING; ShowJoinStatusWindow(); - NetworkSend_Command(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); + NetworkSendCommand(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); } } else { /* take control over an existing company */ @@ -837,7 +837,7 @@ DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_COMMAND) if (this->status != STATUS_ACTIVE) return NETWORK_RECV_STATUS_MALFORMED_PACKET; CommandPacket cp; - const char *err = this->Recv_Command(p, &cp); + const char *err = this->ReceiveCommand(p, &cp); cp.frame = p->Recv_uint32(); cp.my_cmd = p->Recv_bool(); diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index ccdee89d6..91c4689e7 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -121,7 +121,7 @@ static CommandQueue _local_execution_queue; * @param text The text to pass * @param company The company that wants to send the command */ -void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company) +void NetworkSendCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company) { assert((cmd & CMD_FLAGS_MASK) == 0); @@ -275,7 +275,7 @@ void NetworkDistributeCommands() * @param cp the struct to write the data to. * @return an error message. When NULL there has been no error. */ -const char *NetworkGameSocketHandler::Recv_Command(Packet *p, CommandPacket *cp) +const char *NetworkGameSocketHandler::ReceiveCommand(Packet *p, CommandPacket *cp) { cp->company = (CompanyID)p->Recv_uint8(); cp->cmd = p->Recv_uint32(); @@ -300,7 +300,7 @@ const char *NetworkGameSocketHandler::Recv_Command(Packet *p, CommandPacket *cp) * @param p the packet to send it in. * @param cp the packet to actually send. */ -void NetworkGameSocketHandler::Send_Command(Packet *p, const CommandPacket *cp) +void NetworkGameSocketHandler::SendCommand(Packet *p, const CommandPacket *cp) { p->Send_uint8 (cp->company); p->Send_uint32(cp->cmd); diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index ad59c6e51..a60e10784 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -185,7 +185,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentType type) p->Send_uint8 ((byte)type); p->Send_uint32(_openttd_newgrf_version); - this->Send_Packet(p); + this->SendPacket(p); } void ClientNetworkContentSocketHandler::RequestContentList(uint count, const ContentID *content_ids) @@ -207,7 +207,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(uint count, const Con p->Send_uint32(content_ids[i]); } - this->Send_Packet(p); + this->SendPacket(p); count -= p_count; content_ids += p_count; } @@ -237,7 +237,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentVector *cv, bo } } - this->Send_Packet(p); + this->SendPacket(p); for (ContentIterator iter = cv->Begin(); iter != cv->End(); iter++) { ContentInfo *ci = *iter; @@ -327,7 +327,7 @@ void ClientNetworkContentSocketHandler::DownloadSelectedContentFallback(const Co p->Send_uint32(content_ids[i]); } - this->Send_Packet(p); + this->SendPacket(p); count -= p_count; content_ids += p_count; } @@ -736,11 +736,11 @@ void ClientNetworkContentSocketHandler::SendReceive() } if (this->CanSendReceive()) { - this->Recv_Packets(); + this->ReceivePackets(); this->lastActivity = _realtime_tick; } - this->Send_Packets(); + this->SendPackets(); } /** diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 705528727..442df0b69 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -80,9 +80,9 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta { assert(status != NETWORK_RECV_STATUS_OKAY); /* - * Sending a message just before leaving the game calls cs->Send_Packets. + * Sending a message just before leaving the game calls cs->SendPackets. * This might invoke this function, which means that when we close the - * connection after cs->Send_Packets we will close an already closed + * connection after cs->SendPackets we will close an already closed * connection. This handles that case gracefully without having to make * that code any more complex or more aware of the validity of the socket. */ @@ -114,7 +114,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta SetWindowDirty(WC_CLIENT_LIST, 0); - this->Send_Packets(true); + this->SendPackets(true); delete this->GetInfo(); delete this; @@ -138,7 +138,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta NetworkClientSocket *cs; FOR_ALL_CLIENT_SOCKETS(cs) { if (cs->writable) { - if (cs->Send_Packets() && cs->status == STATUS_MAP) { + if (cs->SendPackets() && cs->status == STATUS_MAP) { /* This client is in the middle of a map-send, call the function for that */ cs->SendMap(); } @@ -161,7 +161,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendClientInfo(NetworkClientIn p->Send_uint8 (ci->client_playas); p->Send_string(ci->client_name); - this->Send_Packet(p); + this->SendPacket(p); } return NETWORK_RECV_STATUS_OKAY; } @@ -208,7 +208,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCompanyInfo() p->Send_uint8 (NETWORK_COMPANY_INFO_VERSION); p->Send_bool (true); - this->Send_CompanyInformation(p, company, &company_stats[company->index]); + this->SendCompanyInformation(p, company, &company_stats[company->index]); if (StrEmpty(clients[company->index])) { p->Send_string("<none>"); @@ -216,7 +216,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCompanyInfo() p->Send_string(clients[company->index]); } - this->Send_Packet(p); + this->SendPacket(p); } p = new Packet(PACKET_SERVER_COMPANY_INFO); @@ -224,7 +224,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCompanyInfo() p->Send_uint8 (NETWORK_COMPANY_INFO_VERSION); p->Send_bool (false); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -234,7 +234,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendError(NetworkErrorCode err Packet *p = new Packet(PACKET_SERVER_ERROR); p->Send_uint8(error); - this->Send_Packet(p); + this->SendPacket(p); StringID strid = GetNetworkErrorMsg(error); GetString(str, strid, lastof(str)); @@ -282,10 +282,10 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNewGRFCheck() p->Send_uint8 (grf_count); for (c = _grfconfig; c != NULL; c = c->next) { - if (!HasBit(c->flags, GCF_STATIC)) this->Send_GRFIdentifier(p, &c->ident); + if (!HasBit(c->flags, GCF_STATIC)) this->SendGRFIdentifier(p, &c->ident); } - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -297,7 +297,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNeedGamePassword() this->status = STATUS_AUTH_GAME; Packet *p = new Packet(PACKET_SERVER_NEED_GAME_PASSWORD); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -311,7 +311,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNeedCompanyPassword() Packet *p = new Packet(PACKET_SERVER_NEED_COMPANY_PASSWORD); p->Send_uint32(_settings_game.game_creation.generation_seed); p->Send_string(_settings_client.network.network_id); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -330,7 +330,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendWelcome() p->Send_uint32(this->client_id); p->Send_uint32(_settings_game.game_creation.generation_seed); p->Send_string(_settings_client.network.network_id); - this->Send_Packet(p); + this->SendPacket(p); /* Transmit info about all the active clients */ FOR_ALL_CLIENT_SOCKETS(new_cs) { @@ -355,7 +355,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendWait() p = new Packet(PACKET_SERVER_WAIT); p->Send_uint8(waiting); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -390,7 +390,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap() Packet *p = new Packet(PACKET_SERVER_MAP_BEGIN); p->Send_uint32(_frame_counter); p->Send_uint32(ftell(file_pointer)); - this->Send_Packet(p); + this->SendPacket(p); fseek(file_pointer, 0, SEEK_SET); @@ -413,11 +413,11 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap() if (ferror(file_pointer)) usererror("Error reading temporary network savegame!"); p->size += res; - this->Send_Packet(p); + this->SendPacket(p); if (feof(file_pointer)) { /* Done reading! */ Packet *p = new Packet(PACKET_SERVER_MAP_DONE); - this->Send_Packet(p); + this->SendPacket(p); /* Set the status to DONE_MAP, no we will wait for the client * to send it is ready (maybe that happens like never ;)) */ @@ -450,7 +450,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap() } /* Send all packets (forced) and check if we have send it all */ - if (this->Send_Packets() && this->IsPacketQueueEmpty()) { + if (this->SendPackets() && this->IsPacketQueueEmpty()) { /* All are sent, increase the sent_packets */ sent_packets *= 2; } else { @@ -467,7 +467,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendJoin(ClientID client_id) p->Send_uint32(client_id); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -483,7 +483,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendFrame() p->Send_uint32(_sync_seed_2); #endif #endif - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -496,7 +496,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendSync() #ifdef NETWORK_SEND_DOUBLE_SEED p->Send_uint32(_sync_seed_2); #endif - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -504,11 +504,11 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCommand(const CommandPacke { Packet *p = new Packet(PACKET_SERVER_COMMAND); - this->Send_Command(p, cp); + this->NetworkGameSocketHandler::SendCommand(p, cp); p->Send_uint32(cp->frame); p->Send_bool (cp->my_cmd); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -522,7 +522,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendChat(NetworkAction action, p->Send_string(msg); p->Send_uint64(data); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -533,7 +533,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendErrorQuit(ClientID client_ p->Send_uint32(client_id); p->Send_uint8 (errorno); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -543,21 +543,21 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendQuit(ClientID client_id) p->Send_uint32(client_id); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } NetworkRecvStatus ServerNetworkGameSocketHandler::SendShutdown() { Packet *p = new Packet(PACKET_SERVER_SHUTDOWN); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } NetworkRecvStatus ServerNetworkGameSocketHandler::SendNewGame() { Packet *p = new Packet(PACKET_SERVER_NEWGAME); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -567,7 +567,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendRConResult(uint16 colour, p->Send_uint16(colour); p->Send_string(command); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -577,7 +577,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMove(ClientID client_id, C p->Send_uint32(client_id); p->Send_uint8(company_id); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -586,7 +586,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCompanyUpdate() Packet *p = new Packet(PACKET_SERVER_COMPANY_UPDATE); p->Send_uint16(_network_company_passworded); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -596,7 +596,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendConfigUpdate() p->Send_uint8(_settings_client.network.max_companies); p->Send_uint8(_settings_client.network.max_spectators); - this->Send_Packet(p); + this->SendPacket(p); return NETWORK_RECV_STATUS_OKAY; } @@ -854,7 +854,7 @@ DEF_GAME_RECEIVE_COMMAND(Server, PACKET_CLIENT_COMMAND) } CommandPacket cp; - const char *err = this->Recv_Command(p, &cp); + const char *err = this->ReceiveCommand(p, &cp); if (this->HasClientQuit()) return NETWORK_RECV_STATUS_CONN_LOST; @@ -1239,7 +1239,7 @@ DEF_GAME_RECEIVE_COMMAND(Server, PACKET_CLIENT_MOVE) return NETWORK_RECV_STATUS_OKAY; } -void NetworkSocketHandler::Send_CompanyInformation(Packet *p, const Company *c, const NetworkCompanyStats *stats) +void NetworkSocketHandler::SendCompanyInformation(Packet *p, const Company *c, const NetworkCompanyStats *stats) { /* Grab the company name */ char company_name[NETWORK_COMPANY_NAME_LENGTH]; diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index eb4fa4c3c..11e27d749 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -115,7 +115,7 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_FIND_SERVER) strecpy(ngi.server_revision, _openttd_revision, lastof(ngi.server_revision)); Packet packet(PACKET_UDP_SERVER_RESPONSE); - this->Send_NetworkGameInfo(&packet, &ngi); + this->SendNetworkGameInfo(&packet, &ngi); /* Let the client know that we are here */ this->SendPacket(&packet, client_addr); @@ -142,7 +142,7 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_DETAIL_INFO) /* Go through all the companies */ FOR_ALL_COMPANIES(company) { /* Send the information */ - this->Send_CompanyInformation(&packet, company, &company_stats[company->index]); + this->SendCompanyInformation(&packet, company, &company_stats[company->index]); } this->SendPacket(&packet, client_addr); @@ -179,7 +179,7 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_GET_NEWGRFS) GRFIdentifier c; const GRFConfig *f; - this->Recv_GRFIdentifier(p, &c); + this->ReceiveGRFIdentifier(p, &c); /* Find the matching GRF file */ f = FindGRFConfig(c.grfid, FGCM_EXACT, c.md5sum); @@ -206,7 +206,7 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_GET_NEWGRFS) /* The name could be an empty string, if so take the filename */ strecpy(name, in_reply[i]->GetName(), lastof(name)); - this->Send_GRFIdentifier(&packet, &in_reply[i]->ident); + this->SendGRFIdentifier(&packet, &in_reply[i]->ident); packet.Send_string(name); } @@ -238,7 +238,7 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE) item = NetworkGameListAddItem(*client_addr); ClearGRFConfigList(&item->info.grfconfig); - this->Recv_NetworkGameInfo(p, &item->info); + this->ReceiveNetworkGameInfo(p, &item->info); item->info.compatible = true; { @@ -267,7 +267,7 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE) packet.Send_uint8(in_request_count); for (i = 0; i < in_request_count; i++) { - this->Send_GRFIdentifier(&packet, &in_request[i]->ident); + this->SendGRFIdentifier(&packet, &in_request[i]->ident); } this->SendPacket(&packet, &item->address); @@ -342,7 +342,7 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_NEWGRFS) char name[NETWORK_GRF_NAME_LENGTH]; GRFIdentifier c; - this->Recv_GRFIdentifier(p, &c); + this->ReceiveGRFIdentifier(p, &c); p->Recv_string(name, sizeof(name)); /* An empty name is not possible under normal circumstances diff --git a/src/settings.cpp b/src/settings.cpp index 229ed5ebe..fa64abc73 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1770,7 +1770,7 @@ void SyncCompanySettings() const void *new_var = GetVariableAddress(&_settings_client.company, &sd->save); uint32 old_value = (uint32)ReadValue(old_var, sd->save.conv); uint32 new_value = (uint32)ReadValue(new_var, sd->save.conv); - if (old_value != new_value) NetworkSend_Command(0, i, new_value, CMD_CHANGE_COMPANY_SETTING, NULL, NULL, _local_company); + if (old_value != new_value) NetworkSendCommand(0, i, new_value, CMD_CHANGE_COMPANY_SETTING, NULL, NULL, _local_company); } } #endif /* ENABLE_NETWORK */ diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 2dbfcb054..9841d3b66 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -487,7 +487,7 @@ static void MenuClickCompany(int index) if (_network_server) { DoCommandP(0, 0, _network_own_client_id, CMD_COMPANY_CTRL); } else { - NetworkSend_Command(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); + NetworkSendCommand(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company); } return; |