aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/r2engine.h
diff options
context:
space:
mode:
authorEmma Miler <emma.pi@protonmail.com>2022-11-14 01:11:59 +0100
committerGitHub <noreply@github.com>2022-11-14 00:11:59 +0000
commit0c6d1f4e79d31de6fde4979a72afacdd6d13ca60 (patch)
tree06a9f21b76ac94d8ee11cf109ea3a32ac584982c /NorthstarDLL/r2engine.h
parent2139e0ec6d95ed7c5f673b53dec71f39a013dd93 (diff)
downloadNorthstarLauncher-0c6d1f4e79d31de6fde4979a72afacdd6d13ca60.tar.gz
NorthstarLauncher-0c6d1f4e79d31de6fde4979a72afacdd6d13ca60.zip
New syntax for reversed structs (#324)
* Initial commit Co-Authored-By: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> * Format change * Revert `VPKData` definition * Add `FIELDS` macro Co-authored-by: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
Diffstat (limited to 'NorthstarDLL/r2engine.h')
-rw-r--r--NorthstarDLL/r2engine.h40
1 files changed, 9 insertions, 31 deletions
diff --git a/NorthstarDLL/r2engine.h b/NorthstarDLL/r2engine.h
index e428e1cc..2614b4cc 100644
--- a/NorthstarDLL/r2engine.h
+++ b/NorthstarDLL/r2engine.h
@@ -157,39 +157,17 @@ namespace R2
READY_REMOTE
};
-#pragma pack(push, 1)
- struct CBaseClient // 0x2D728 bytes
+ // clang-format off
+ OFFSET_STRUCT(CBaseClient)
{
- char pad0[0x16];
-
- // +0x16
- char m_Name[64];
-
- // +0x56
- char pad1[0x202];
-
- KeyValues* m_ConVars; // this is a KeyValues* object but not got that struct mapped out atm
-
- char pad2[0x240];
-
- // +0x4A0
- ePersistenceReady m_iPersistenceReady;
- // +0x4A1
-
- char pad3[0x59];
-
- // +0x4FA
- char m_PersistenceBuffer[PERSISTENCE_MAX_SIZE];
-
- char pad4[0x1239];
-
- // +0xF500
- char m_UID[32];
- // +0xF520
-
- char pad5[0x1E208];
+ STRUCT_SIZE(0x2D728)
+ FIELD(0x16, char m_Name[64])
+ FIELD(0x258, KeyValues* m_ConVars)
+ FIELD(0x4A0, ePersistenceReady m_iPersistenceReady)
+ FIELD(0x4FA, char m_PersistenceBuffer[PERSISTENCE_MAX_SIZE])
+ FIELD(0xF500, char m_UID[32])
};
-#pragma pack(pop)
+ // clang-format on
extern CBaseClient* g_pClientArray;