diff --git a/include/bedrock/command/command_origin_identity.h b/include/bedrock/command/command_origin_identity.h index 515da0daa..ff4ea7ad4 100644 --- a/include/bedrock/command/command_origin_identity.h +++ b/include/bedrock/command/command_origin_identity.h @@ -17,6 +17,6 @@ #include struct CommandOriginIdentity { - std::string mXuid; - std::string mPlatformOnlineId; + std::string xuid; + std::string platform_id; }; diff --git a/include/bedrock/hashed_string.h b/include/bedrock/hashed_string.h index 057fcb656..e771e6440 100644 --- a/include/bedrock/hashed_string.h +++ b/include/bedrock/hashed_string.h @@ -21,5 +21,5 @@ class HashedString { public: std::uint64_t hash; std::string str; - const HashedString* mLastMatch; + const HashedString *last_match; }; diff --git a/include/bedrock/network/network_peer.h b/include/bedrock/network/network_peer.h index ca19b5122..8c9672c65 100644 --- a/include/bedrock/network/network_peer.h +++ b/include/bedrock/network/network_peer.h @@ -14,7 +14,6 @@ #pragma once #include -// Only defined as a class to make sure that name mangling happens the same class NetworkPeer { public: enum class Reliability { @@ -23,6 +22,6 @@ class NetworkPeer { Unreliable = 0x2, UnreliableSequenced = 0x3, }; - + using PacketRecvTimepoint = std::chrono::steady_clock::time_point; }; diff --git a/include/bedrock/network/compressibility.h b/include/bedrock/network/protocol/compressibility.h similarity index 96% rename from include/bedrock/network/compressibility.h rename to include/bedrock/network/protocol/compressibility.h index b4193fe17..41e1fd6ff 100644 --- a/include/bedrock/network/compressibility.h +++ b/include/bedrock/network/protocol/compressibility.h @@ -14,6 +14,6 @@ #pragma once enum class Compressibility { - Compressible = 0x0, + Compressible = 0x0, Incompressible = 0x1, -}; \ No newline at end of file +}; diff --git a/include/bedrock/network/protocol/packet.h b/include/bedrock/network/protocol/packet.h index e23d07f5f..948df85f9 100644 --- a/include/bedrock/network/protocol/packet.h +++ b/include/bedrock/network/protocol/packet.h @@ -13,21 +13,21 @@ // limitations under the License. #pragma once -#include "bedrock/network/packet_priority.h" #include "bedrock/network/network_peer.h" +#include "bedrock/network/protocol/compressibility.h" #include "bedrock/network/protocol/sub_client_id.h" -#include "bedrock/network/compressibility.h" +#include "bedrock/network/raknet/packet_priority.h" class Packet { public: virtual ~Packet() = default; private: - PacketPriority mPriority; // + 8 - NetworkPeer::Reliability mReliability; // + 12 - SubClientId mSubClientId; // + 16 - bool mIsHandled; // + 17 - NetworkPeer::PacketRecvTimepoint mReceiveTimepoint; // + 24 - void* mHandler; // + 32 - Compressibility mCompressible; // + 40 + PacketPriority priority_; // + 8 + NetworkPeer::Reliability reliability_; // + 12 + SubClientId sub_client_id_; // + 16 + bool is_handled_; // + 17 + NetworkPeer::PacketRecvTimepoint recv_timepoint_; // + 24 + void *handler_; // + 32 + Compressibility compressibility_; // + 40 }; BEDROCK_STATIC_ASSERT_SIZE(Packet, 48, 48); diff --git a/include/bedrock/network/packet_priority.h b/include/bedrock/network/raknet/packet_priority.h similarity index 83% rename from include/bedrock/network/packet_priority.h rename to include/bedrock/network/raknet/packet_priority.h index 1bfc16b41..6f448077e 100644 --- a/include/bedrock/network/packet_priority.h +++ b/include/bedrock/network/raknet/packet_priority.h @@ -13,11 +13,10 @@ // limitations under the License. #pragma once - enum class PacketPriority { - IMMEDIATE_PRIORITY = 0x0, - HIGH_PRIORITY = 0x1, - MEDIUM_PRIORITY = 0x2, - LOW_PRIORITY = 0x3, - NUMBER_OF_PRIORITIES = 0x4, -}; \ No newline at end of file + IMMEDIATE_PRIORITY = 0x0, + HIGH_PRIORITY = 0x1, + MEDIUM_PRIORITY = 0x2, + LOW_PRIORITY = 0x3, + NUMBER_OF_PRIORITIES = 0x4, +}; diff --git a/include/bedrock/social.h b/include/bedrock/social.h index 1be091f8e..9d5dd4151 100644 --- a/include/bedrock/social.h +++ b/include/bedrock/social.h @@ -21,8 +21,8 @@ class MultiplayerServiceObserver { virtual ~MultiplayerServiceObserver() = 0; private: - void *mpSubject; - // Real type of this is Core::Observer::SubjectType + // Core::Observer::SubjectType + void *subject_; }; class XboxLiveUserObserver { @@ -30,8 +30,8 @@ class XboxLiveUserObserver { virtual ~XboxLiveUserObserver() = 0; private: - void *mpSubject; - // Real type of this is Core::Observer::SubjectType ; + // Core::Observer::SubjectType + void *subject_; }; } // namespace Social