diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-30 15:30:18 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-30 15:30:18 -0700 |
commit | 197f6fedf46c866123ddb37872708baf9bb2dc3f (patch) | |
tree | 6494753c9bc2e449c776e65415d1345a7de0eead /src/proto2 | |
parent | de0944f0bcbc3107071293c370833c39f71ab33d (diff) | |
download | tmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.tar.gz tmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.tar.bz2 tmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.tar.xz tmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.zip |
Finish packet naming
Diffstat (limited to 'src/proto2')
-rw-r--r-- | src/proto2/char-map.hpp | 38 | ||||
-rw-r--r-- | src/proto2/fwd.hpp | 10 | ||||
-rw-r--r-- | src/proto2/login-char.hpp | 43 |
3 files changed, 0 insertions, 91 deletions
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 @@ -648,16 +648,6 @@ struct Packet_Fixed<0x3025> }; 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> { static const uint16_t PACKET_ID = 0x3027; @@ -1663,17 +1653,6 @@ static_assert(sizeof(NetPacket_Fixed<0x3025>) == 29, "sizeof(NetPacket_Fixed<0x3 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> { Little16 magic_packet_id; @@ -3062,23 +3041,6 @@ bool network_to_native(Packet_Fixed<0x3025> *native, NetPacket_Fixed<0x3025> net } 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) { bool rv = true; 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 @@ -66,11 +66,6 @@ template<> struct NetPacket_Fixed<0x2714>; template<> -struct Packet_Fixed<0x2715>; -template<> -struct NetPacket_Fixed<0x2715>; - -template<> struct Packet_Fixed<0x2716>; template<> struct NetPacket_Fixed<0x2716>; @@ -716,11 +711,6 @@ template<> struct NetPacket_Fixed<0x3025>; template<> -struct Packet_Fixed<0x3026>; -template<> -struct NetPacket_Fixed<0x3026>; - -template<> struct Packet_Head<0x3027>; template<> struct NetPacket_Head<0x3027>; 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 @@ -103,17 +103,6 @@ struct Packet_Fixed<0x2714> }; 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> { static const uint16_t PACKET_ID = 0x2716; @@ -430,19 +419,6 @@ static_assert(sizeof(NetPacket_Fixed<0x2714>) == 6, "sizeof(NetPacket_Fixed<0x27 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<sizeof(AccountEmail)> 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> { Little16 magic_packet_id; @@ -831,25 +807,6 @@ bool network_to_native(Packet_Fixed<0x2714> *native, NetPacket_Fixed<0x2714> net } 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) { bool rv = true; |