diff --git a/Source/Network/Connection/ConnectionBuffer.h b/Source/Network/Connection/ConnectionBuffer.h index dded330..e21fc2b 100644 --- a/Source/Network/Connection/ConnectionBuffer.h +++ b/Source/Network/Connection/ConnectionBuffer.h @@ -24,10 +24,10 @@ public: } private: - char* m_data; - int m_read; - int m_write; - std::vector m_storage; + /* 0000 */ char* m_data; + /* 0004 */ int m_read; + /* 0008 */ int m_write; + /* 000C */ std::vector m_storage; ConnectionBuffer(const ConnectionBuffer&) = delete; ConnectionBuffer& operator=(const ConnectionBuffer&) = delete; }; diff --git a/Source/Network/Http/CURLMgr.h b/Source/Network/Http/CURLMgr.h index 61f8702..51f402a 100644 --- a/Source/Network/Http/CURLMgr.h +++ b/Source/Network/Http/CURLMgr.h @@ -1,6 +1,7 @@ #ifndef RAGNAROK_SOURCE_NETWORK_HTTP_CURLMGR_H #define RAGNAROK_SOURCE_NETWORK_HTTP_CURLMGR_H +#include #include struct curl_slist; @@ -13,25 +14,38 @@ public: static bool Initialize(); static void Shutdown(); - int(__cdecl* globalInit)(long); - void(__cdecl* globalCleanup)(); - curl_slist*(__cdecl* slistAppend)(curl_slist*, const char*); - int(__cdecl* formAdd)(curl_httppost**, curl_httppost**, ...); - void*(__cdecl* easyInit)(); - int(__cdecl* easySetopt)(void*, int, ...); - int(__cdecl* easyPerform)(void*); - void(__cdecl* easyCleanup)(void*); - void(__cdecl* formFree)(curl_httppost*); - void(__cdecl* slistFreeAll)(curl_slist*); - int(__cdecl* easyGetinfo)(void*, int, ...); - bool m_enabled; - HMODULE m_module; + /* 0004 */ int(__cdecl* globalInit)(long); + /* 0008 */ void(__cdecl* globalCleanup)(); + /* 000C */ curl_slist*(__cdecl* slistAppend)(curl_slist*, const char*); + /* 0010 */ int(__cdecl* formAdd)(curl_httppost**, curl_httppost**, ...); + /* 0014 */ void*(__cdecl* easyInit)(); + /* 0018 */ int(__cdecl* easySetopt)(void*, int, ...); + /* 001C */ int(__cdecl* easyPerform)(void*); + /* 0020 */ void(__cdecl* easyCleanup)(void*); + /* 0024 */ void(__cdecl* formFree)(curl_httppost*); + /* 0028 */ void(__cdecl* slistFreeAll)(curl_slist*); + /* 002C */ int(__cdecl* easyGetinfo)(void*, int, ...); + /* 0030 */ bool m_enabled; + /* 0034 */ HMODULE m_module; }; extern CCURLMgr* g_curlMgr; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CCURLMgr) == 56); +static_assert(offsetof(CCURLMgr, globalInit) == 0x0004); +static_assert(offsetof(CCURLMgr, globalCleanup) == 0x0008); +static_assert(offsetof(CCURLMgr, slistAppend) == 0x000C); +static_assert(offsetof(CCURLMgr, formAdd) == 0x0010); +static_assert(offsetof(CCURLMgr, easyInit) == 0x0014); +static_assert(offsetof(CCURLMgr, easySetopt) == 0x0018); +static_assert(offsetof(CCURLMgr, easyPerform) == 0x001C); +static_assert(offsetof(CCURLMgr, easyCleanup) == 0x0020); +static_assert(offsetof(CCURLMgr, formFree) == 0x0024); +static_assert(offsetof(CCURLMgr, slistFreeAll) == 0x0028); +static_assert(offsetof(CCURLMgr, easyGetinfo) == 0x002C); +static_assert(offsetof(CCURLMgr, m_enabled) == 0x0030); +static_assert(offsetof(CCURLMgr, m_module) == 0x0034); #endif #endif diff --git a/Source/Network/Packets/PacketLengths.h b/Source/Network/Packets/PacketLengths.h index f26bd1e..6d132d4 100644 --- a/Source/Network/Packets/PacketLengths.h +++ b/Source/Network/Packets/PacketLengths.h @@ -1,17 +1,18 @@ #ifndef RAGNAROK_SOURCE_NETWORK_PACKETS_PACKETLENGTHS_H #define RAGNAROK_SOURCE_NETWORK_PACKETS_PACKETLENGTHS_H +#include #include struct PacketLengthValue { - int length; - int variable; - int record; + /* 0000 */ int length; + /* 0004 */ int variable; + /* 0008 */ int record; }; struct PacketLengthResult { - int kind; - int length; + /* 0000 */ int kind; + /* 0004 */ int length; }; struct PacketLengths { @@ -22,4 +23,12 @@ struct PacketLengths { static void Initialize(std::map& values); }; +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(PacketLengthValue) == 0x0C); +static_assert(offsetof(PacketLengthValue, variable) == 0x04); +static_assert(offsetof(PacketLengthValue, record) == 0x08); +static_assert(sizeof(PacketLengthResult) == 0x08); +static_assert(offsetof(PacketLengthResult, length) == 0x04); +#endif + #endif