diff --git a/base/fwExtensibleBase.hpp b/base/fwExtensibleBase.hpp index 7911a69..9abdf79 100644 --- a/base/fwExtensibleBase.hpp +++ b/base/fwExtensibleBase.hpp @@ -6,8 +6,8 @@ namespace rage class fwExtensibleBase : public fwRefAwareBase { public: - void* m_extension_container; // 0x0010 - void* m_extensible_unk; // 0x0018 + void* m_ExtensionContainer; // 0x0010 + void* m_ExtensibleUnk; // 0x0018 }; //Size: 0x0020 static_assert(sizeof(fwExtensibleBase) == 0x20); } diff --git a/base/fwRefAwareBaseImpl.hpp b/base/fwRefAwareBaseImpl.hpp index beb988f..238da64 100644 --- a/base/fwRefAwareBaseImpl.hpp +++ b/base/fwRefAwareBaseImpl.hpp @@ -6,6 +6,6 @@ namespace rage class fwRefAwareBaseImpl : public T { private: - void *m_ref; // 0x08 + void *m_Ref; // 0x08 }; } \ No newline at end of file diff --git a/base/pgBase.hpp b/base/pgBase.hpp index 37d7bc6..fb0505c 100644 --- a/base/pgBase.hpp +++ b/base/pgBase.hpp @@ -76,7 +76,7 @@ public: } private: - uint32_t m_map_size; + uint32_t m_MapSize; }; class pgBaseRefCounted : public pgBase { @@ -86,44 +86,44 @@ public: class pgBaseMetaDataType { public: - static pgBaseMetaDataType* m_first; + static pgBaseMetaDataType* m_First; pgBaseMetaDataType(uint32_t id, uintptr_t value) - : m_id(id), m_value(value), m_next(nullptr) { - if (!m_first) { - m_first = this; + : m_Id(id), m_Value(value), m_Next(nullptr) { + if (!m_First) { + m_First = this; } } ~pgBaseMetaDataType() { - if (m_first == this) { - m_first = m_next; + if (m_First == this) { + m_First = m_Next; } else { - pgBaseMetaDataType* current = m_first; - while (current && current->m_next != this) { - current = current->m_next; + pgBaseMetaDataType* current = m_First; + while (current && current->m_Next != this) { + current = current->m_Next; } if (current) { - current->m_next = m_next; + current->m_Next = m_Next; } } } static pgBaseMetaDataType* Lookup(uint32_t id) { - pgBaseMetaDataType* current = m_first; + pgBaseMetaDataType* current = m_First; while (current != nullptr) { - if (current->m_id == id) { + if (current->m_Id == id) { return current; } - current = current->m_next; + current = current->m_Next; } return nullptr; } private: - uint32_t m_id; - uintptr_t m_value; - pgBaseMetaDataType* m_next; + uint32_t m_Id; + uintptr_t m_Value; + pgBaseMetaDataType* m_Next; }; } \ No newline at end of file diff --git a/event/CEvent.hpp b/event/CEvent.hpp index 1bf7408..a452492 100644 --- a/event/CEvent.hpp +++ b/event/CEvent.hpp @@ -12,6 +12,6 @@ public: virtual bool IsEventScriptCommand() { return false; } virtual bool ExtractData(void* data, int size) { return false; } - char m_pad[0x58]; + char m_Pad[0x58]; }; static_assert(sizeof(CEvent) == 0x60); \ No newline at end of file diff --git a/network/sync/vehicle/CVehicleGadgetData.hpp b/network/sync/vehicle/CVehicleGadgetData.hpp index c6fa037..d018279 100644 --- a/network/sync/vehicle/CVehicleGadgetData.hpp +++ b/network/sync/vehicle/CVehicleGadgetData.hpp @@ -4,19 +4,20 @@ class CGadgetData { public: - uint32_t m_type; - uint8_t m_data[0xF3]; + uint32_t m_Type; + uint8_t m_Data[0xF3]; }; static_assert(sizeof(CGadgetData) == 0xF8); -class alignas(16) CVehicleGadgetNodeData +// TODO: Fix this +class CVehicleGadgetDataNode { public: - bool m_has_position; + bool m_HasPosition; char pad_0001[15]; - float m_position[4]; - uint32_t m_num_gadgets; + float m_Position[4]; + uint32_t m_NumGadgets; char pad_0002[12]; - CGadgetData m_gadgets[2]; + CGadgetData m_Gadgets[2]; }; -static_assert(sizeof(CVehicleGadgetNodeData) == 0x220); \ No newline at end of file +static_assert(sizeof(CVehicleGadgetDataNode) == 0x220); \ No newline at end of file diff --git a/rage/atArray.hpp b/rage/atArray.hpp index 9d2a80a..2828402 100644 --- a/rage/atArray.hpp +++ b/rage/atArray.hpp @@ -12,41 +12,41 @@ namespace rage { public: atArray() : - m_data(nullptr), - m_size(0), - m_count(0) + m_Data(nullptr), + m_Size(0), + m_Count(0) { } T* begin() const { - return &m_data[0]; + return &m_Data[0]; } T* end() const { - return &m_data[m_size]; + return &m_Data[m_Size]; } T* data() const { - return m_data; + return m_Data; } std::uint16_t size() const { - return m_size; + return m_Size; } std::uint16_t count() const { - return m_count; + return m_Count; } T& operator[](std::uint16_t index) const { - return m_data[index]; + return m_Data[index]; } bool contains(T comparator) @@ -62,9 +62,9 @@ namespace rage } private: - T* m_data; - std::uint16_t m_size; - std::uint16_t m_count; + T* m_Data; + std::uint16_t m_Size; + std::uint16_t m_Count; }; static_assert(sizeof(rage::atArray) == 0x10, "rage::atArray is not properly sized"); #pragma pack(pop) diff --git a/rage/joaat.hpp b/rage/joaat.hpp index e631b88..859ef49 100644 --- a/rage/joaat.hpp +++ b/rage/joaat.hpp @@ -6,17 +6,17 @@ namespace rage { using joaat_t = std::uint32_t; - inline constexpr char joaat_to_lower(char c) + inline constexpr char JoaatToLower(char c) { return c >= 'A' && c <= 'Z' ? c | 1 << 5 : c; } - inline constexpr joaat_t joaat(const std::string_view str) + inline constexpr joaat_t Joaat(const std::string_view str) { joaat_t hash = 0; for (auto c : str) { - hash += joaat_to_lower(c); + hash += JoaatToLower(c); hash += (hash << 10); hash ^= (hash >> 6); } diff --git a/rage/rlJson.hpp b/rage/rlJson.hpp index 44b1235..1cc8bb7 100644 --- a/rage/rlJson.hpp +++ b/rage/rlJson.hpp @@ -8,29 +8,29 @@ namespace rage { uint32_t unk0; // 0x00 uint32_t unk1; // 0x04 - char* buffer; // 0x08 - uint32_t curlen;// 0x10 - uint32_t maxlen;// 0x14 + char* m_Buffer; // 0x08 + uint32_t m_Curlen;// 0x10 + uint32_t m_Maxlen;// 0x14 uint32_t unk4; // 0x18 - uint32_t flags; // 0x1C - uint8_t flags2; // 0x20 + uint32_t m_Flags; // 0x1C + uint8_t m_Flags2; // 0x20 public: rlJson(char* _buffer, uint32_t _length) : - buffer(_buffer), - maxlen(_length) + m_Buffer(_buffer), + m_Maxlen(_length) { unk0 = 0; unk1 = 0; - curlen = 0; + m_Curlen = 0; unk4 = 1; - flags = 0; - flags2 = 0; + m_Flags = 0; + m_Flags2 = 0; } inline char* GetBuffer() const { - return buffer; + return m_Buffer; } }; static_assert(sizeof(rage::rlJson) == 0x24); diff --git a/script/scrNativeHandler.hpp b/script/scrNativeHandler.hpp index 6cf1ff3..df7d856 100644 --- a/script/scrNativeHandler.hpp +++ b/script/scrNativeHandler.hpp @@ -10,48 +10,48 @@ namespace rage public: constexpr void reset() { - m_arg_count = 0; - m_data_count = 0; + m_ArgCount = 0; + m_DataCount = 0; } template - constexpr void push_arg(T&& value) + constexpr void PushArg(T&& value) { static_assert(sizeof(T) <= sizeof(std::uint64_t)); - *reinterpret_cast>*>(reinterpret_cast(m_args) + (m_arg_count++)) = std::forward(value); + *reinterpret_cast>*>(reinterpret_cast(m_Args) + (m_ArgCount++)) = std::forward(value); } template - constexpr T& get_arg(std::size_t index) + constexpr T& GetArg(std::size_t index) { static_assert(sizeof(T) <= sizeof(std::uint64_t)); - return *reinterpret_cast(reinterpret_cast(m_args) + index); + return *reinterpret_cast(reinterpret_cast(m_Args) + index); } template - constexpr void set_arg(std::size_t index, T&& value) + constexpr void SetArg(std::size_t index, T&& value) { static_assert(sizeof(T) <= sizeof(std::uint64_t)); - *reinterpret_cast>*>(reinterpret_cast(m_args) + index) = std::forward(value); + *reinterpret_cast>*>(reinterpret_cast(m_Args) + index) = std::forward(value); } template - constexpr T* get_return_value() + constexpr T* GetReturnValue() { - return reinterpret_cast(m_return_value); + return reinterpret_cast(m_ReturnValue); } template - constexpr void set_return_value(T&& value) + constexpr void SetReturnValue(T&& value) { - *reinterpret_cast>*>(m_return_value) = std::forward(value); + *reinterpret_cast>*>(m_ReturnValue) = std::forward(value); } protected: - void* m_return_value; - std::uint32_t m_arg_count; - void* m_args; - std::int32_t m_data_count; - std::uint32_t m_data[48]; + void* m_ReturnValue; + std::uint32_t m_ArgCount; + void* m_Args; + std::int32_t m_DataCount; + std::uint32_t m_Data[48]; }; static_assert(sizeof(scrNativeCallContext) == 0xE0); diff --git a/script/scrProgram.hpp b/script/scrProgram.hpp index f58b7e1..87a06e0 100644 --- a/script/scrProgram.hpp +++ b/script/scrProgram.hpp @@ -30,7 +30,7 @@ public: char m_Breakpoints[0x0C]; // 0x74 This is an atMap, which we don't have the // class for ATM. - bool is_valid() const { return m_CodeSize != 0; } + bool IsValid() const { return m_CodeSize != 0; } std::uint32_t GetNumCodePages() const { return (m_CodeSize + 0x3FFF) >> 14; } diff --git a/script/scrVector.hpp b/script/scrVector.hpp index b88fd77..0016f97 100644 --- a/script/scrVector.hpp +++ b/script/scrVector.hpp @@ -67,7 +67,7 @@ namespace rage return this->x != other.x || this->y != other.y || this->z != other.z; } - std::string to_string() const + std::string ToString() const { std::stringstream ss; ss << *this; diff --git a/script/scriptHandlerNetComponent.hpp b/script/scriptHandlerNetComponent.hpp index 55e81f7..5a9416f 100644 --- a/script/scriptHandlerNetComponent.hpp +++ b/script/scriptHandlerNetComponent.hpp @@ -5,11 +5,11 @@ class CNetGamePlayer; class CScriptParticipant { public: - char pad_0000[16]; // 0x0000 - class CNetGamePlayer *m_net_game_player; // 0x0010 - char pad_0018[2]; // 0x0018 - int16_t m_participant_index; // 0x001A - char pad_001C[12]; // 0x001C + char m_Pad[16]; // 0x0000 + class CNetGamePlayer *m_NetGamePlayer; // 0x0010 + char m_Pad2[2]; // 0x0018 + int16_t m_ParticipantIndex; // 0x001A + char m_Pad3[12]; // 0x001C }; static_assert(sizeof(CScriptParticipant) == 0x28); @@ -77,7 +77,7 @@ public: if (!m_Host) return nullptr; - return m_Host->m_net_game_player; + return m_Host->m_NetGamePlayer; } }; static_assert(sizeof(rage::scriptHandlerNetComponent) == 0x170);