diff options
author | rubidium <rubidium@openttd.org> | 2007-01-21 17:29:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-01-21 17:29:38 +0000 |
commit | cf83a9f065eaeb01a5f4ce804ba52ed0b43bb4fe (patch) | |
tree | 5a44a4c1db6458d0c84701360bed493c40353da1 /src/network | |
parent | d82304ccab8f9f8e363139c2c4ea2b303e81b29e (diff) | |
download | openttd-cf83a9f065eaeb01a5f4ce804ba52ed0b43bb4fe.tar.xz |
(svn r8316) -Codechange: move the GRF ID and MD5 checksum from GRFConfig to GRFIdentifier so it can be reused.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/core/udp.cpp | 24 | ||||
-rw-r--r-- | src/network/core/udp.h | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index c3709aa10..8474c65f3 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -149,29 +149,29 @@ void NetworkUDPSocketHandler::ReceivePackets() /** * Serializes the GRFIdentifier (GRF ID and MD5 checksum) to the packet - * @param p the packet to write the data to - * @param c the configuration to write the GRF ID and MD5 checksum from + * @param p the packet to write the data to + * @param grf the GRFIdentifier to serialize */ -void NetworkUDPSocketHandler::Send_GRFIdentifier(Packet *p, const GRFConfig *c) +void NetworkUDPSocketHandler::Send_GRFIdentifier(Packet *p, const GRFIdentifier *grf) { uint j; - NetworkSend_uint32(p, c->grfid); - for (j = 0; j < sizeof(c->md5sum); j++) { - NetworkSend_uint8 (p, c->md5sum[j]); + NetworkSend_uint32(p, grf->grfid); + for (j = 0; j < sizeof(grf->md5sum); j++) { + NetworkSend_uint8 (p, grf->md5sum[j]); } } /** * Deserializes the GRFIdentifier (GRF ID and MD5 checksum) from the packet - * @param p the packet to read the data from - * @param c the configuration to write the GRF ID and MD5 checksum to + * @param p the packet to read the data from + * @param grf the GRFIdentifier to deserialize */ -void NetworkUDPSocketHandler::Recv_GRFIdentifier(Packet *p, GRFConfig *c) +void NetworkUDPSocketHandler::Recv_GRFIdentifier(Packet *p, GRFIdentifier *grf) { uint j; - c->grfid = NetworkRecv_uint32(this, p); - for (j = 0; j < sizeof(c->md5sum); j++) { - c->md5sum[j] = NetworkRecv_uint8(this, p); + grf->grfid = NetworkRecv_uint32(this, p); + for (j = 0; j < sizeof(grf->md5sum); j++) { + grf->md5sum[j] = NetworkRecv_uint8(this, p); } } diff --git a/src/network/core/udp.h b/src/network/core/udp.h index 9bb743841..bd8f4c2ad 100644 --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -129,10 +129,10 @@ public: void SendPacket(Packet *p, const struct sockaddr_in *recv); void ReceivePackets(); - void Send_GRFIdentifier(Packet *p, const GRFConfig *c); + void Send_GRFIdentifier(Packet *p, const GRFIdentifier *grf); void Send_NetworkGameInfo(Packet *p, const NetworkGameInfo *info); - void Recv_GRFIdentifier(Packet *p, GRFConfig *c); + void Recv_GRFIdentifier(Packet *p, GRFIdentifier *grf); void Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *info); }; |