From 197f6fedf46c866123ddb37872708baf9bb2dc3f Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 30 Jun 2014 15:30:18 -0700 Subject: Finish packet naming --- src/proto2/char-map.hpp | 38 -------------------------------------- src/proto2/fwd.hpp | 10 ---------- src/proto2/login-char.hpp | 43 ------------------------------------------- 3 files changed, 91 deletions(-) (limited to 'src/proto2') diff --git a/src/proto2/char-map.hpp b/src/proto2/char-map.hpp index 23798b2..8a23be6 100644 --- a/src/proto2/char-map.hpp +++ b/src/proto2/char-map.hpp @@ -647,16 +647,6 @@ struct Packet_Fixed<0x3025> uint16_t level = {}; }; -template<> -struct Packet_Fixed<0x3026> -{ - static const uint16_t PACKET_ID = 0x3026; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; -}; - template<> struct Packet_Head<0x3027> { @@ -1662,17 +1652,6 @@ static_assert(offsetof(NetPacket_Fixed<0x3025>, level) == 27, "offsetof(NetPacke static_assert(sizeof(NetPacket_Fixed<0x3025>) == 29, "sizeof(NetPacket_Fixed<0x3025>) == 29"); static_assert(alignof(NetPacket_Fixed<0x3025>) == 1, "alignof(NetPacket_Fixed<0x3025>) == 1"); -template<> -struct NetPacket_Fixed<0x3026> -{ - Little16 magic_packet_id; - Little32 party_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x3026>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3026>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3026>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3026>, party_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x3026>) == 6, "sizeof(NetPacket_Fixed<0x3026>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x3026>) == 1, "alignof(NetPacket_Fixed<0x3026>) == 1"); - template<> struct NetPacket_Head<0x3027> { @@ -3061,23 +3040,6 @@ bool network_to_native(Packet_Fixed<0x3025> *native, NetPacket_Fixed<0x3025> net return rv; } -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3026> *network, Packet_Fixed<0x3026> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3026> *native, NetPacket_Fixed<0x3026> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - return rv; -} - inline __attribute__((warn_unused_result)) bool native_to_network(NetPacket_Head<0x3027> *network, Packet_Head<0x3027> native) { diff --git a/src/proto2/fwd.hpp b/src/proto2/fwd.hpp index 6077913..e1e0161 100644 --- a/src/proto2/fwd.hpp +++ b/src/proto2/fwd.hpp @@ -65,11 +65,6 @@ struct Packet_Fixed<0x2714>; template<> struct NetPacket_Fixed<0x2714>; -template<> -struct Packet_Fixed<0x2715>; -template<> -struct NetPacket_Fixed<0x2715>; - template<> struct Packet_Fixed<0x2716>; template<> @@ -715,11 +710,6 @@ struct Packet_Fixed<0x3025>; template<> struct NetPacket_Fixed<0x3025>; -template<> -struct Packet_Fixed<0x3026>; -template<> -struct NetPacket_Fixed<0x3026>; - template<> struct Packet_Head<0x3027>; template<> diff --git a/src/proto2/login-char.hpp b/src/proto2/login-char.hpp index 6bd939c..00fe2ac 100644 --- a/src/proto2/login-char.hpp +++ b/src/proto2/login-char.hpp @@ -102,17 +102,6 @@ struct Packet_Fixed<0x2714> uint32_t users = {}; }; -template<> -struct Packet_Fixed<0x2715> -{ - static const uint16_t PACKET_ID = 0x2715; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountEmail email = {}; -}; - template<> struct Packet_Fixed<0x2716> { @@ -429,19 +418,6 @@ static_assert(offsetof(NetPacket_Fixed<0x2714>, users) == 2, "offsetof(NetPacket static_assert(sizeof(NetPacket_Fixed<0x2714>) == 6, "sizeof(NetPacket_Fixed<0x2714>) == 6"); static_assert(alignof(NetPacket_Fixed<0x2714>) == 1, "alignof(NetPacket_Fixed<0x2714>) == 1"); -template<> -struct NetPacket_Fixed<0x2715> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString email; -}; -static_assert(offsetof(NetPacket_Fixed<0x2715>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2715>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2715>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2715>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2715>, email) == 6, "offsetof(NetPacket_Fixed<0x2715>, email) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2715>) == 46, "sizeof(NetPacket_Fixed<0x2715>) == 46"); -static_assert(alignof(NetPacket_Fixed<0x2715>) == 1, "alignof(NetPacket_Fixed<0x2715>) == 1"); - template<> struct NetPacket_Fixed<0x2716> { @@ -830,25 +806,6 @@ bool network_to_native(Packet_Fixed<0x2714> *native, NetPacket_Fixed<0x2714> net return rv; } -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2715> *network, Packet_Fixed<0x2715> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->email, native.email); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2715> *native, NetPacket_Fixed<0x2715> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->email, network.email); - return rv; -} - inline __attribute__((warn_unused_result)) bool native_to_network(NetPacket_Fixed<0x2716> *network, Packet_Fixed<0x2716> native) { -- cgit v1.2.3-70-g09d2