diff --git a/include/SmSdk/AreaTriggerManager.hpp b/include/SmSdk/AreaTriggerManager.hpp index 8843d21..b52bbc1 100644 --- a/include/SmSdk/AreaTriggerManager.hpp +++ b/include/SmSdk/AreaTriggerManager.hpp @@ -14,32 +14,23 @@ SMSDK_BEGIN_NAMESPACE struct AreaTrigger { - /* 0x0000 */ std::int32_t m_iId; - /* 0x0004 */ std::int16_t m_iWorldId; -private: - /* 0x0006 */ char pad_0x6[0xE]; -public: - /* 0x0014 */ uint32_t m_uFilter; -private: - /* 0x0018 */ char pad_0x18[0xC]; - /* 0x0024 */ uint32_t m_uSomeFlag; - /* 0x0028 */ char pad_0x28[0x4]; -public: - /* 0x002C */ bool m_bWaterTrigger; -private: - /* 0x002D */ char pad_0x2D[0x3]; -public: - /* 0x0030 */ btBoxShape* m_pBoxShape; - /* 0x0038 */ btPairCachingGhostObject* m_pGhostObject; - /* 0x0040 */ AreaTriggerProxy* m_pPhysicsProxy; -private: - /* 0x0048 */ char pad_0x48[0x100]; -public: - /* 0x0148 */ DirectX::XMFLOAT3 m_position; - /* 0x0154 */ DirectX::XMFLOAT4 m_rotation; - /* 0x0164 */ DirectX::XMFLOAT3 m_size; -private: - /* 0x0170 */ char pad_0x170[0x8]; + /* 0x0000 */ SDK_PUB std::int32_t m_iId; + /* 0x0004 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x0006 */ SDK_PRI char pad_0x6[0xE]; + /* 0x0014 */ SDK_PUB std::uint32_t m_uFilter; + /* 0x0018 */ SDK_PRI char pad_0x18[0xC]; + /* 0x0024 */ SDK_PRI std::uint32_t m_uSomeFlag; + /* 0x0028 */ SDK_PRI char pad_0x28[0x4]; + /* 0x002C */ SDK_PUB bool m_bWaterTrigger; + /* 0x002D */ SDK_PRI char pad_0x2D[0x3]; + /* 0x0030 */ SDK_PUB btBoxShape* m_pBoxShape; + /* 0x0038 */ SDK_PUB btPairCachingGhostObject* m_pGhostObject; + /* 0x0040 */ SDK_PUB AreaTriggerProxy* m_pPhysicsProxy; + /* 0x0048 */ SDK_PRI char pad_0x48[0x100]; + /* 0x0148 */ SDK_PUB DirectX::XMFLOAT3 m_position; + /* 0x0154 */ SDK_PUB DirectX::XMFLOAT4 m_rotation; + /* 0x0164 */ SDK_PUB DirectX::XMFLOAT3 m_size; + /* 0x0170 */ SDK_PRI char pad_0x170[0x8]; }; // Size: 0x178 static_assert(offsetof(AreaTrigger, AreaTrigger::m_iId) == 0x0, "AreaTrigger::m_iId: Incorrect offset"); diff --git a/include/SmSdk/AudioManager.hpp b/include/SmSdk/AudioManager.hpp index 3024235..5072e52 100644 --- a/include/SmSdk/AudioManager.hpp +++ b/include/SmSdk/AudioManager.hpp @@ -13,27 +13,22 @@ SMSDK_BEGIN_NAMESPACE struct EventData { - /* 0x0000 */ std::int16_t m_iWorldId; -private: - /* 0x0002 */ char pad_0x2[0x2]; -public: - /* 0x0004 */ std::int32_t m_iSomeVal; -private: - /* 0x0008 */ char pad_0x8[0x18]; -public: - /* 0x0020 */ std::string m_eventName; - /* 0x0040 */ std::map m_mapTemporary; - /* 0x0050 */ std::shared_ptr m_pAudioEvent; + /* 0x0000 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x0002 */ SDK_PRI char pad_0x2[0x2]; + /* 0x0004 */ SDK_PUB std::int32_t m_iSomeVal; + /* 0x0008 */ SDK_PRI char pad_0x8[0x18]; + /* 0x0020 */ SDK_PUB std::string m_eventName; + /* 0x0040 */ SDK_PUB std::map m_mapTemporary; + /* 0x0050 */ SDK_PUB std::shared_ptr m_pAudioEvent; }; // Size: 0x60 static_assert(sizeof(EventData) == 0x60, "EventData: Incorrect Size"); class AudioManager : public Task { -public: - static AudioManager* GetInstance(); + SDK_PUB static AudioManager* GetInstance(); - inline void _playSound(const std::string& soundName, uint16_t uWorldId = 0xFFFF) + SDK_PUB inline void _playSound(const std::string& soundName, uint16_t uWorldId = 0xFFFF) { std::lock_guard lock(m_mutex); @@ -45,7 +40,7 @@ class AudioManager : public Task m_deqEventQueue.push_back(newEvent); } - inline static void PlaySound(const std::string& soundName, uint16_t uWorldId = 0xFFFF) + SDK_PUB inline static void PlaySound(const std::string& soundName, uint16_t uWorldId = 0xFFFF) { AudioManager* pAudioMgr = AudioManager::GetInstance(); if (!pAudioMgr) @@ -54,29 +49,22 @@ class AudioManager : public Task pAudioMgr->_playSound(soundName, uWorldId); } - /* 0x0008 */ std::shared_ptr pAudioEventManager; - /* 0x0018 */ std::mutex m_mutex; - /* 0x0068 */ FMOD::Studio::System* m_pFmodStudioSystem; - /* 0x0070 */ FMOD::System* m_pFmodSystem; - /* 0x0078 */ FMOD_ADVANCEDSETTINGS m_fmodAdvancedSettings; - /* 0x00E0 */ float m_fMasterVolume; - /* 0x00E4 */ float m_fOldMasterVolume; -private: - /* 0x00E8 */ char pad_0xE8[0x10]; -public: - /* 0x00F8 */ std::deque m_deqEventQueue; -private: - /* 0x0120 */ char pad_0x120[0x78]; -public: - /* 0x0198 */ std::map m_mapNameToFmodPath; - /* 0x01A8 */ std::map m_someHashToFmodPath; - /* 0x01B8 */ std::map> m_nameToEventPtr; -private: - /* 0x01C8 */ char pad_0x1C8[0x100]; -public: - /* 0x02C8 */ std::int32_t m_iFmodInitFlags; -private: - /* 0x02CC */ char pad_0x2CC[0xC]; + /* 0x0008 */ SDK_PUB std::shared_ptr pAudioEventManager; + /* 0x0018 */ SDK_PUB std::mutex m_mutex; + /* 0x0068 */ SDK_PUB FMOD::Studio::System* m_pFmodStudioSystem; + /* 0x0070 */ SDK_PUB FMOD::System* m_pFmodSystem; + /* 0x0078 */ SDK_PUB FMOD_ADVANCEDSETTINGS m_fmodAdvancedSettings; + /* 0x00E0 */ SDK_PUB float m_fMasterVolume; + /* 0x00E4 */ SDK_PUB float m_fOldMasterVolume; + /* 0x00E8 */ SDK_PRI char pad_0xE8[0x10]; + /* 0x00F8 */ SDK_PUB std::deque m_deqEventQueue; + /* 0x0120 */ SDK_PRI char pad_0x120[0x78]; + /* 0x0198 */ SDK_PUB std::map m_mapNameToFmodPath; + /* 0x01A8 */ SDK_PUB std::map m_someHashToFmodPath; + /* 0x01B8 */ SDK_PUB std::map> m_nameToEventPtr; + /* 0x01C8 */ SDK_PRI char pad_0x1C8[0x100]; + /* 0x02C8 */ SDK_PUB std::int32_t m_iFmodInitFlags; + /* 0x02CC */ SDK_PRI char pad_0x2CC[0xC]; }; // Size: 0x2D8 static_assert(sizeof(AudioManager) == 0x2D8, "AudioManager: Incorrect Size"); diff --git a/include/SmSdk/Base/InputTarget.hpp b/include/SmSdk/Base/InputTarget.hpp index 51d1346..bca1945 100644 --- a/include/SmSdk/Base/InputTarget.hpp +++ b/include/SmSdk/Base/InputTarget.hpp @@ -7,14 +7,12 @@ SMSDK_BEGIN_NAMESPACE class InputTarget { -public: - virtual void onKeyPress(int key) { SMSDK_UNREF(key); /* implemented by the game */ } - virtual void onKeyRelease(int key) { SMSDK_UNREF(key); /* implemented by the game */ } - virtual void onMouseKeyPress(int mouseKey) { SMSDK_UNREF(mouseKey); /* implemented by the game */ } - virtual void onMouseKeyRelease(int mouseKey) { SMSDK_UNREF(mouseKey); /* implemented by the game */ } -private: - virtual void func5() { /* implemented by the game */ } - virtual void func6() { /* implemented by the game */ } + SDK_PUB virtual void onKeyPress(int key) { SMSDK_UNREF(key); /* implemented by the game */ } + SDK_PUB virtual void onKeyRelease(int key) { SMSDK_UNREF(key); /* implemented by the game */ } + SDK_PUB virtual void onMouseKeyPress(int mouseKey) { SMSDK_UNREF(mouseKey); /* implemented by the game */ } + SDK_PUB virtual void onMouseKeyRelease(int mouseKey) { SMSDK_UNREF(mouseKey); /* implemented by the game */ } + SDK_PRI virtual void func5() { /* implemented by the game */ } + SDK_PRI virtual void func6() { /* implemented by the game */ } }; // Size: 0x8 static_assert(sizeof(InputTarget) == 0x8, "InputTarget: Incorrect Size"); diff --git a/include/SmSdk/Base/NetObj.hpp b/include/SmSdk/Base/NetObj.hpp index cc544b9..155df45 100644 --- a/include/SmSdk/Base/NetObj.hpp +++ b/include/SmSdk/Base/NetObj.hpp @@ -1,24 +1,22 @@ #pragma once +#include "SmSdk/config.hpp" + #include SMSDK_BEGIN_NAMESPACE class NetObj { -public: - virtual ~NetObj() = default; -private: - virtual void func2() {} -public: - virtual char getObjectType() { return 0; } - virtual void updateObject() {} -private: - /* 0x0008 */ char pad_0x8[0x8]; -public: - /* 0x0010 */ std::shared_ptr m_pSelf; - /* 0x0020 */ std::int32_t m_iId; - /* 0x0024 */ std::int32_t m_iRevision; + SDK_PUB virtual ~NetObj() = default; + SDK_PRI virtual void func2() {} + SDK_PUB virtual char getObjectType() { return 0; } + SDK_PUB virtual void updateObject() {} + + /* 0x0008 */ SDK_PRI char pad_0x8[0x8]; + /* 0x0010 */ SDK_PUB std::shared_ptr m_pSelf; + /* 0x0020 */ SDK_PUB std::int32_t m_iId; + /* 0x0024 */ SDK_PUB std::int32_t m_iRevision; }; // Size: 0x28 static_assert(sizeof(NetObj) == 0x28, "NetObj: Incorrect Size"); diff --git a/include/SmSdk/Base/Task.hpp b/include/SmSdk/Base/Task.hpp index 676e27c..d0be653 100644 --- a/include/SmSdk/Base/Task.hpp +++ b/include/SmSdk/Base/Task.hpp @@ -7,9 +7,8 @@ SMSDK_BEGIN_NAMESPACE class Task { -public: - virtual ~Task() {} - virtual std::int64_t update(float fDeltaTime) + SDK_PUB virtual ~Task() {} + SDK_PUB virtual std::int64_t update(float fDeltaTime) { SMSDK_UNREF(fDeltaTime); return 0; diff --git a/include/SmSdk/BlobData.hpp b/include/SmSdk/BlobData.hpp index 4c8c689..2406e8f 100644 --- a/include/SmSdk/BlobData.hpp +++ b/include/SmSdk/BlobData.hpp @@ -11,10 +11,9 @@ SMSDK_BEGIN_NAMESPACE struct BlobDataKey { -public: - /* 0x0000 */ boost::uuids::uuid m_uuid; - /* 0x0010 */ uint8_t m_data[14]; - /* 0x001E */ uint16_t m_uSize; + /* 0x0000 */ SDK_PUB boost::uuids::uuid m_uuid; + /* 0x0010 */ SDK_PUB std::uint8_t m_data[14]; + /* 0x001E */ SDK_PUB std::uint16_t m_uSize; }; // Size: 0x20 static_assert(offsetof(BlobDataKey, BlobDataKey::m_uuid) == 0x0, "BlobDataKey::m_uuid: Incorrect offset"); @@ -26,19 +25,14 @@ static_assert(sizeof(BlobDataKey) == 0x20, "BlobDataKey: Incorrect Size"); struct BlobData { -public: - /* 0x0000 */ BlobDataKey m_key; - /* 0x0020 */ uint16_t m_uWorldId; - /* 0x0022 */ uint8_t m_uFlags; -private: - /* 0x0023 */ char pad_0x23[0x5]; -public: - /* 0x0028 */ uint64_t m_uSteamId; - /* 0x0030 */ uint32_t m_uBlobSize; // might actually be 64 bit, gotta verify this later at some point -private: - /* 0x0034 */ char pad_0x34[0x4]; -public: - /* 0x0038 */ void* m_pBlobData; + /* 0x0000 */ SDK_PUB BlobDataKey m_key; + /* 0x0020 */ SDK_PUB std::uint16_t m_uWorldId; + /* 0x0022 */ SDK_PUB std::uint8_t m_uFlags; + /* 0x0023 */ SDK_PRI char pad_0x23[0x5]; + /* 0x0028 */ SDK_PUB std::uint64_t m_uSteamId; + /* 0x0030 */ SDK_PUB std::uint32_t m_uBlobSize; // might actually be 64 bit, gotta verify this later at some point + /* 0x0034 */ SDK_PRI char pad_0x34[0x4]; + /* 0x0038 */ SDK_PUB void* m_pBlobData; }; // Size: 0x40 static_assert(offsetof(BlobData, BlobData::m_key) == 0x0, "BlobData::m_key: Incorrect offset"); diff --git a/include/SmSdk/Character.hpp b/include/SmSdk/Character.hpp index 20daacd..0d22322 100644 --- a/include/SmSdk/Character.hpp +++ b/include/SmSdk/Character.hpp @@ -15,78 +15,56 @@ SMSDK_BEGIN_NAMESPACE struct CharacterScriptData { - /* 0x0000 */ bool m_bHasClientOnGraphicsLoaded; - /* 0x0001 */ bool m_bHasClientOnGraphicsUnloaded; - /* 0x0002 */ bool m_bHasClientCanInteract; - /* 0x0003 */ bool m_bHasClientOnInteract; - /* 0x0004 */ bool m_bHasClientOnProjectile; - /* 0x0005 */ bool m_bHasClientOnMelee; - /* 0x0006 */ bool m_bHasClientOnCollision; - /* 0x0007 */ char pad_0x7[0x1]; + /* 0x0000 */ SDK_PUB bool m_bHasClientOnGraphicsLoaded; + /* 0x0001 */ SDK_PUB bool m_bHasClientOnGraphicsUnloaded; + /* 0x0002 */ SDK_PUB bool m_bHasClientCanInteract; + /* 0x0003 */ SDK_PUB bool m_bHasClientOnInteract; + /* 0x0004 */ SDK_PUB bool m_bHasClientOnProjectile; + /* 0x0005 */ SDK_PUB bool m_bHasClientOnMelee; + /* 0x0006 */ SDK_PUB bool m_bHasClientOnCollision; + /* 0x0007 */ SDK_PRI char pad_0x7[0x1]; }; // Size: 0x8 static_assert(sizeof(CharacterScriptData) == 0x8, "CharacterScriptData: Incorrect Size"); class CharacterController : public btActionInterface { -private: - /* 0x0008 */ char pad_0x8[0x8]; -public: - /* 0x0010 */ float m_fGroundTraction; - /* 0x0014 */ float m_fAirTraction; -private: - /* 0x0018 */ std::int32_t m_iUnk1; - /* 0x001C */ float m_fUnk1; - /* 0x0020 */ float m_fUnk2; -public: - /* 0x0024 */ float m_fStepOverHeight; -private: - /* 0x0028 */ float m_fUnk3; -public: - /* 0x002C */ float m_fGravity; - /* 0x0030 */ float m_fMass; -private: - /* 0x0034 */ float m_fUnk4; -public: - /* 0x0038 */ btPairCachingGhostObject* m_pPairCachingGhostObject; - /* 0x0040 */ float m_fFallVelocity; - /* 0x0044 */ float m_fFallAcceleration; - /* 0x0048 */ float m_fJumpStrength; -private: - /* 0x004C */ float m_fUnk5; - /* 0x0050 */ char pad_0x50[0x10]; -public: - /* 0x0060 */ btVector3 m_targetMovementVelocity; - /* 0x0070 */ btVector3 m_movementVelocity; -private: - /* 0x0080 */ char pad_0x80[0x20]; -public: - /* 0x00A0 */ btVector3 m_targetFinalWorldMovement; - /* 0x00B0 */ btVector3 m_finalWorldMovement; - /* 0x00C0 */ btVector3 m_worldMovement2; -private: - /* 0x00D0 */ char pad_0xD0[0x40]; -public: - /* 0x0110 */ btVector3 m_surfaceNormal; - /* 0x0120 */ float m_fStepOverHeightCpy; - /* 0x0124 */ uint32_t m_uTicksInAir; -private: - /* 0x0128 */ char pad_0x128[0x8]; -public: - /* 0x0130 */ uint8_t m_eSurfaceType; -private: - /* 0x0131 */ char pad_0x131[0x7]; -public: - /* 0x0138 */ uint32_t m_uBodyId; -private: - /* 0x013C */ char pad_0x13C[0x14]; -public: - /* 0x0150 */ btVector3 m_lastTouchedGlobalPos; - /* 0x0160 */ btVector3 m_lastTouchedLocalPos; - /* 0x0170 */ bool m_bInAir; -private: - /* 0x0171 */ char pad_0x171[0x2F]; - + /* 0x0008 */ SDK_PRI char pad_0x8[0x8]; + /* 0x0010 */ SDK_PUB float m_fGroundTraction; + /* 0x0014 */ SDK_PUB float m_fAirTraction; + /* 0x0018 */ SDK_PRI std::int32_t m_iUnk1; + /* 0x001C */ SDK_PRI float m_fUnk1; + /* 0x0020 */ SDK_PRI float m_fUnk2; + /* 0x0024 */ SDK_PUB float m_fStepOverHeight; + /* 0x0028 */ SDK_PRI float m_fUnk3; + /* 0x002C */ SDK_PUB float m_fGravity; + /* 0x0030 */ SDK_PUB float m_fMass; + /* 0x0034 */ SDK_PRI float m_fUnk4; + /* 0x0038 */ SDK_PUB btPairCachingGhostObject* m_pPairCachingGhostObject; + /* 0x0040 */ SDK_PUB float m_fFallVelocity; + /* 0x0044 */ SDK_PUB float m_fFallAcceleration; + /* 0x0048 */ SDK_PUB float m_fJumpStrength; + /* 0x004C */ SDK_PRI float m_fUnk5; + /* 0x0050 */ SDK_PRI char pad_0x50[0x10]; + /* 0x0060 */ SDK_PUB btVector3 m_targetMovementVelocity; + /* 0x0070 */ SDK_PUB btVector3 m_movementVelocity; + /* 0x0080 */ SDK_PRI char pad_0x80[0x20]; + /* 0x00A0 */ SDK_PUB btVector3 m_targetFinalWorldMovement; + /* 0x00B0 */ SDK_PUB btVector3 m_finalWorldMovement; + /* 0x00C0 */ SDK_PUB btVector3 m_worldMovement2; + /* 0x00D0 */ SDK_PRI char pad_0xD0[0x40]; + /* 0x0110 */ SDK_PUB btVector3 m_surfaceNormal; + /* 0x0120 */ SDK_PUB float m_fStepOverHeightCpy; + /* 0x0124 */ SDK_PUB std::uint32_t m_uTicksInAir; + /* 0x0128 */ SDK_PRI char pad_0x128[0x8]; + /* 0x0130 */ SDK_PUB std::uint8_t m_eSurfaceType; + /* 0x0131 */ SDK_PRI char pad_0x131[0x7]; + /* 0x0138 */ SDK_PUB std::uint32_t m_uBodyId; + /* 0x013C */ SDK_PRI char pad_0x13C[0x14]; + /* 0x0150 */ SDK_PUB btVector3 m_lastTouchedGlobalPos; + /* 0x0160 */ SDK_PUB btVector3 m_lastTouchedLocalPos; + /* 0x0170 */ SDK_PUB bool m_bInAir; + /* 0x0171 */ SDK_PRI char pad_0x171[0x2F]; }; // Size: 0x1A0 static_assert(offsetof(CharacterController, CharacterController::m_fGroundTraction) == 0x10, "CharacterController::m_fGroundTraction: Incorrect offset"); @@ -145,114 +123,76 @@ enum ECharacterMovementState : std::int8_t class Character : public NetObj { - /* 0x0028 */ char pad_0x28[0x8]; -public: - /* 0x0030 */ std::int16_t m_iWorldId; -private: - /* 0x0032 */ char pad_0x32[0x6]; -public: - /* 0x0038 */ std::int64_t m_iOwnerSteamId; - /* 0x0040 */ bool m_bIsPlayer; -private: - /* 0x0041 */ char pad_0x41[0x3]; -public: - /* 0x0044 */ std::int32_t m_iUnitId; - /* 0x0048 */ boost::uuids::uuid m_uuid; - /* 0x0058 */ bool m_bDowned; - /* 0x0059 */ bool m_bSwimming; - /* 0x005A */ bool m_bDiving; -private: - /* 0x005B */ char pad_0x5B[0x1]; -public: - /* 0x005C */ bool m_bClimbing; - /* 0x005D */ bool m_bTumbling; -private: - /* 0x005E */ char pad_0x5E[0x2]; -public: - /* 0x0060 */ float m_fMovementSpeedFraction; -private: - /* 0x0064 */ char pad_0x64[0x4]; -public: - /* 0x0068 */ std::vector m_vecAnimations; - /* 0x0080 */ DirectX::XMFLOAT3 m_spawnPosition; -private: - /* 0x008C */ char pad_0x8C[0x1C]; -public: - /* 0x00A8 */ DirectX::XMFLOAT3 m_position; - /* 0x00B4 */ DirectX::XMFLOAT3 m_velocityDirection; - /* 0x00C0 */ DirectX::XMFLOAT3 m_velocity; - /* 0x00CC */ DirectX::XMFLOAT3 m_acceleration; -private: - /* 0x00D8 */ char pad_0xD8[0x7CC]; -public: - /* 0x08A4 */ DirectX::XMFLOAT3 m_upDirection; -private: - /* 0x08B0 */ char pad_0x8B0[0x8]; -public: - /* 0x08B8 */ std::int32_t m_iNextLockingInteractableId; - /* 0x08BC */ std::int32_t m_iLockingInteractableId; -private: - /* 0x08C0 */ char pad_0x8C0[0x18]; -public: - /* 0x08D8 */ bool m_bIsOnGround; -private: - /* 0x08D9 */ char pad_0x8D9[0x3]; -public: - /* 0x08DC */ float m_fAirTime; - /* 0x08E0 */ DirectX::XMFLOAT3 m_groundNormal; -private: - /* 0x08EC */ char pad_0x8EC[0xC]; -public: - /* 0x08F8 */ boost::uuids::uuid m_selectedToolUuid; - /* 0x0908 */ std::int32_t m_iSelectedToolId; - /* 0x090C */ boost::uuids::uuid m_prevSelectedToolUuid; - /* 0x091C */ std::int32_t m_iPrevSelectedToolId; -private: - /* 0x0920 */ char pad_0x920[0x2]; -public: - /* 0x0922 */ ECharacterMovementState m_charMovementState; -private: - /* 0x0923 */ char pad_0x923[0x225]; -public: - /* 0x0B48 */ std::shared_ptr m_pController; - /* 0x0B58 */ std::shared_ptr m_pPhysicsProxy; - /* 0x0B68 */ std::shared_ptr m_pRagdollPhysicsProxy; -private: - /* 0x0B78 */ char pad_0xB78[0xAC]; -public: - /* 0x0C24 */ CharacterControllerData m_controllerData; - /* 0x0C58 */ CharacterScriptData m_scriptData; - /* 0x0C60 */ bool m_bCanSwim; -private: - /* 0x0C61 */ char pad_0xC61[0xF]; -public: - /* 0x0C70 */ std::string m_scriptPath; - /* 0x0C90 */ std::string m_scriptClass; - /* 0x0CB0 */ std::int32_t m_iScriptRef; - /* 0x0CB4 */ std::int32_t m_iPublicDataScriptRef; -private: - /* 0x0CB8 */ char pad_0xCB8[0x88]; -public: - /* 0x0D40 */ DirectX::XMFLOAT4 m_color; - /* 0x0D50 */ DirectX::XMFLOAT3 m_tumblingExtent; - /* 0x0D5C */ DirectX::XMFLOAT3 m_tumblingWorldPosition; - /* 0x0D68 */ DirectX::XMFLOAT4 m_tumblingWorldRotation; - /* 0x0D78 */ DirectX::XMFLOAT3 m_tumblingLinearVelocity; -private: - /* 0x0D84 */ char pad_0xD84[0x1C]; -public: - /* 0x0DA0 */ std::string m_nameTag; - /* 0x0DC0 */ bool m_nameTagRequiresLineOfSight; -private: - /* 0x0DC1 */ char pad_0xDC1[0x3]; -public: - /* 0x0DC4 */ DirectX::XMFLOAT4 m_nameTagColor; - /* 0x0DD4 */ float m_fNameTagFadeDistance; - /* 0x0DD8 */ float m_fNameTagRenderDistance; - /* 0x0DDC */ std::int32_t m_iNameTagUpdateCounter; + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; + /* 0x0030 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x0032 */ SDK_PRI char pad_0x32[0x6]; + /* 0x0038 */ SDK_PUB std::int64_t m_iOwnerSteamId; + /* 0x0040 */ SDK_PUB bool m_bIsPlayer; + /* 0x0041 */ SDK_PRI char pad_0x41[0x3]; + /* 0x0044 */ SDK_PUB std::int32_t m_iUnitId; + /* 0x0048 */ SDK_PUB boost::uuids::uuid m_uuid; + /* 0x0058 */ SDK_PUB bool m_bDowned; + /* 0x0059 */ SDK_PUB bool m_bSwimming; + /* 0x005A */ SDK_PUB bool m_bDiving; + /* 0x005B */ SDK_PRI char pad_0x5B[0x1]; + /* 0x005C */ SDK_PUB bool m_bClimbing; + /* 0x005D */ SDK_PUB bool m_bTumbling; + /* 0x005E */ SDK_PRI char pad_0x5E[0x2]; + /* 0x0060 */ SDK_PUB float m_fMovementSpeedFraction; + /* 0x0064 */ SDK_PRI char pad_0x64[0x4]; + /* 0x0068 */ SDK_PUB std::vector m_vecAnimations; + /* 0x0080 */ SDK_PUB DirectX::XMFLOAT3 m_spawnPosition; + /* 0x008C */ SDK_PRI char pad_0x8C[0x1C]; + /* 0x00A8 */ SDK_PUB DirectX::XMFLOAT3 m_position; + /* 0x00B4 */ SDK_PUB DirectX::XMFLOAT3 m_velocityDirection; + /* 0x00C0 */ SDK_PUB DirectX::XMFLOAT3 m_velocity; + /* 0x00CC */ SDK_PUB DirectX::XMFLOAT3 m_acceleration; + /* 0x00D8 */ SDK_PRI char pad_0xD8[0x7CC]; + /* 0x08A4 */ SDK_PUB DirectX::XMFLOAT3 m_upDirection; + /* 0x08B0 */ SDK_PRI char pad_0x8B0[0x8]; + /* 0x08B8 */ SDK_PUB std::int32_t m_iNextLockingInteractableId; + /* 0x08BC */ SDK_PUB std::int32_t m_iLockingInteractableId; + /* 0x08C0 */ SDK_PRI char pad_0x8C0[0x18]; + /* 0x08D8 */ SDK_PUB bool m_bIsOnGround; + /* 0x08D9 */ SDK_PRI char pad_0x8D9[0x3]; + /* 0x08DC */ SDK_PUB float m_fAirTime; + /* 0x08E0 */ SDK_PUB DirectX::XMFLOAT3 m_groundNormal; + /* 0x08EC */ SDK_PRI char pad_0x8EC[0xC]; + /* 0x08F8 */ SDK_PUB boost::uuids::uuid m_selectedToolUuid; + /* 0x0908 */ SDK_PUB std::int32_t m_iSelectedToolId; + /* 0x090C */ SDK_PUB boost::uuids::uuid m_prevSelectedToolUuid; + /* 0x091C */ SDK_PUB std::int32_t m_iPrevSelectedToolId; + /* 0x0920 */ SDK_PRI char pad_0x920[0x2]; + /* 0x0922 */ SDK_PUB ECharacterMovementState m_charMovementState; + /* 0x0923 */ SDK_PRI char pad_0x923[0x225]; + /* 0x0B48 */ SDK_PUB std::shared_ptr m_pController; + /* 0x0B58 */ SDK_PUB std::shared_ptr m_pPhysicsProxy; + /* 0x0B68 */ SDK_PUB std::shared_ptr m_pRagdollPhysicsProxy; + /* 0x0B78 */ SDK_PRI char pad_0xB78[0xAC]; + /* 0x0C24 */ SDK_PUB CharacterControllerData m_controllerData; + /* 0x0C58 */ SDK_PUB CharacterScriptData m_scriptData; + /* 0x0C60 */ SDK_PUB bool m_bCanSwim; + /* 0x0C61 */ SDK_PRI char pad_0xC61[0xF]; + /* 0x0C70 */ SDK_PUB std::string m_scriptPath; + /* 0x0C90 */ SDK_PUB std::string m_scriptClass; + /* 0x0CB0 */ SDK_PUB std::int32_t m_iScriptRef; + /* 0x0CB4 */ SDK_PUB std::int32_t m_iPublicDataScriptRef; + /* 0x0CB8 */ SDK_PRI char pad_0xCB8[0x88]; + /* 0x0D40 */ SDK_PUB DirectX::XMFLOAT4 m_color; + /* 0x0D50 */ SDK_PUB DirectX::XMFLOAT3 m_tumblingExtent; + /* 0x0D5C */ SDK_PUB DirectX::XMFLOAT3 m_tumblingWorldPosition; + /* 0x0D68 */ SDK_PUB DirectX::XMFLOAT4 m_tumblingWorldRotation; + /* 0x0D78 */ SDK_PUB DirectX::XMFLOAT3 m_tumblingLinearVelocity; + /* 0x0D84 */ SDK_PRI char pad_0xD84[0x1C]; + /* 0x0DA0 */ SDK_PUB std::string m_nameTag; + /* 0x0DC0 */ SDK_PUB bool m_nameTagRequiresLineOfSight; + /* 0x0DC1 */ SDK_PRI char pad_0xDC1[0x3]; + /* 0x0DC4 */ SDK_PUB DirectX::XMFLOAT4 m_nameTagColor; + /* 0x0DD4 */ SDK_PUB float m_fNameTagFadeDistance; + /* 0x0DD8 */ SDK_PUB float m_fNameTagRenderDistance; + /* 0x0DDC */ SDK_PUB std::int32_t m_iNameTagUpdateCounter; }; // Size: 0xDE0 - static_assert(offsetof(Character, Character::m_iWorldId) == 0x30, "Character::m_iWorldId: Incorrect offset"); static_assert(offsetof(Character, Character::m_iOwnerSteamId) == 0x38, "Character::m_iOwnerSteamId: Incorrect offset"); static_assert(offsetof(Character, Character::m_bIsPlayer) == 0x40, "Character::m_bIsPlayer: Incorrect offset"); @@ -307,131 +247,89 @@ static_assert(sizeof(Character) == 0xDE0, "Character: Incorrect Size"); #else class Character : public NetObj { -private: - /* 0x0028 */ char pad_0x28[0x8]; -public: - /* 0x0030 */ std::int16_t m_iWorldId; -private: - /* 0x0032 */ char pad_0x32[0x6]; -public: - /* 0x0038 */ std::int64_t m_iOwnerSteamId; - /* 0x0040 */ bool m_bIsPlayer; -private: - /* 0x0041 */ char pad_0x41[0x3]; -public: - /* 0x0044 */ std::int32_t m_iUnitId; - /* 0x0048 */ boost::uuids::uuid m_uuid; - /* 0x0058 */ bool m_bIsDowned; - /* 0x0059 */ bool m_bIsSwimming; - /* 0x005A */ bool m_bIsDiving; -private: - /* 0x005B */ char pad_0x5B[0x1]; -public: - /* 0x005C */ bool m_bIsClimbing; - /* 0x005D */ bool m_bIsTumbling; -private: - /* 0x005E */ char pad_0x5E[0x2]; -public: - /* 0x0060 */ float m_fMovementSpeedFraction; -private: - /* 0x0064 */ char pad_0x64[0x4]; -public: - /* 0x0068 */ std::vector m_vecAnimations; - /* 0x0080 */ DirectX::XMFLOAT3 m_spawnPosition; -private: - /* 0x008C */ char pad_0x8C[0x1C]; -public: - /* 0x00A8 */ DirectX::XMFLOAT3 m_velocity; - /* 0x00B4 */ DirectX::XMFLOAT3 m_acceleration; -private: - /* 0x00C0 */ char pad_0xC0[0x14]; -public: - /* 0x00D4 */ std::int32_t m_iControlKeySum; - /* 0x00D8 */ float m_fWalkDirectionRadians; - /* 0x00DC */ float m_fYaw; - /* 0x00E0 */ float m_fPitch; - /* 0x00E4 */ float m_fYaw2; - /* 0x00E8 */ float m_fPitch2; - /* 0x00EC */ DirectX::XMFLOAT3 m_upDirectionCpy; - /* 0x00F8 */ DirectX::XMFLOAT3 m_upDirection; - /* 0x0104 */ float m_fYaw3; - /* 0x0108 */ float m_fPitch3; -private: - /* 0x010C */ char pad_0x10C[0x4]; -public: - /* 0x0110 */ std::int32_t m_iLockingInteractableId; -private: - /* 0x0114 */ char pad_0x114[0x1C]; -public: - /* 0x0130 */ bool m_bIsOnGround; -private: - /* 0x0131 */ char pad_0x131[0x3]; -public: - /* 0x0134 */ float m_fAirTime; - /* 0x0138 */ DirectX::XMFLOAT3 m_groundNormal; -private: - /* 0x0144 */ char pad_0x144[0xC]; -public: - /* 0x0150 */ boost::uuids::uuid m_selectedToolUuid; - /* 0x0160 */ std::int32_t m_iSelectedToolId; - /* 0x0164 */ boost::uuids::uuid m_prevSelectedToolUuid; - /* 0x0174 */ std::int32_t m_iPrevSelectedToolId; -private: - /* 0x0178 */ char pad_0x178[0x2]; -public: - /* 0x017A */ std::int8_t m_iCrouchState; -private: - /* 0x017B */ char pad_0x17B[0x1D]; -public: - /* 0x0198 */ std::shared_ptr m_pController; - /* 0x01A8 */ std::shared_ptr m_pPhysicsProxy; - /* 0x01B8 */ std::shared_ptr m_pRagdollPhysicsProxy; -private: - /* 0x01C8 */ char pad_0x1C8[0xB8]; -public: - /* 0x0280 */ float m_fWalkSpeed; - /* 0x0284 */ float m_fAimSpeed; - /* 0x0288 */ float m_fCrouchSpeed; - /* 0x028C */ float m_fSprintSpeed; - /* 0x0290 */ float m_fJumpStrength; - /* 0x0294 */ float m_fRadius; - /* 0x0298 */ float m_fHeight; - /* 0x029C */ float m_fHeightCrouch; - /* 0x02A0 */ float m_fMass; -private: - /* 0x02A4 */ char pad_0x2A4[0xC]; -public: - /* 0x02B0 */ bool m_bCanSwim; -private: - /* 0x02B1 */ char pad_0x2B1[0x3]; -public: - /* 0x02B4 */ CharacterScriptData m_scriptData; -private: - /* 0x02BC */ char pad_0x2BC[0x4]; -public: - /* 0x02C0 */ std::string m_scriptPath; - /* 0x02E0 */ std::string m_scriptClass; - /* 0x0300 */ std::int32_t m_iScriptRef; -private: - /* 0x0304 */ char pad_0x304[0x8]; -public: - /* 0x030C */ DirectX::XMFLOAT4 m_color; - /* 0x031C */ DirectX::XMFLOAT3 m_tumblingExtent; - /* 0x0328 */ DirectX::XMFLOAT3 m_tumblingWorldPosition; - /* 0x0334 */ DirectX::XMFLOAT4 m_tumblingWorldRotation; - /* 0x0344 */ DirectX::XMFLOAT3 m_tumblingLinearVelocity; -private: - /* 0x0350 */ char pad_0x350[0x20]; -public: - /* 0x0370 */ std::string m_nameTag; - /* 0x0390 */ bool m_nameTagRequiresLineOfSight; -private: - /* 0x0391 */ char pad_0x391[0x3]; -public: - /* 0x0394 */ DirectX::XMFLOAT4 m_nameTagColor; - /* 0x03A4 */ float m_fNameTagFadeDistance; - /* 0x03A8 */ float m_fNameTagRenderDistance; - /* 0x03AC */ std::int32_t m_iNameTagUpdateCounter; + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; + /* 0x0030 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x0032 */ SDK_PRI char pad_0x32[0x6]; + /* 0x0038 */ SDK_PUB std::int64_t m_iOwnerSteamId; + /* 0x0040 */ SDK_PUB bool m_bIsPlayer; + /* 0x0041 */ SDK_PRI char pad_0x41[0x3]; + /* 0x0044 */ SDK_PUB std::int32_t m_iUnitId; + /* 0x0048 */ SDK_PUB boost::uuids::uuid m_uuid; + /* 0x0058 */ SDK_PUB bool m_bIsDowned; + /* 0x0059 */ SDK_PUB bool m_bIsSwimming; + /* 0x005A */ SDK_PUB bool m_bIsDiving; + /* 0x005B */ SDK_PRI char pad_0x5B[0x1]; + /* 0x005C */ SDK_PUB bool m_bIsClimbing; + /* 0x005D */ SDK_PUB bool m_bIsTumbling; + /* 0x005E */ SDK_PRI char pad_0x5E[0x2]; + /* 0x0060 */ SDK_PUB float m_fMovementSpeedFraction; + /* 0x0064 */ SDK_PRI char pad_0x64[0x4]; + /* 0x0068 */ SDK_PUB std::vector m_vecAnimations; + /* 0x0080 */ SDK_PUB DirectX::XMFLOAT3 m_spawnPosition; + /* 0x008C */ SDK_PRI char pad_0x8C[0x1C]; + /* 0x00A8 */ SDK_PUB DirectX::XMFLOAT3 m_velocity; + /* 0x00B4 */ SDK_PUB DirectX::XMFLOAT3 m_acceleration; + /* 0x00C0 */ SDK_PRI char pad_0xC0[0x14]; + /* 0x00D4 */ SDK_PUB std::int32_t m_iControlKeySum; + /* 0x00D8 */ SDK_PUB float m_fWalkDirectionRadians; + /* 0x00DC */ SDK_PUB float m_fYaw; + /* 0x00E0 */ SDK_PUB float m_fPitch; + /* 0x00E4 */ SDK_PUB float m_fYaw2; + /* 0x00E8 */ SDK_PUB float m_fPitch2; + /* 0x00EC */ SDK_PUB DirectX::XMFLOAT3 m_upDirectionCpy; + /* 0x00F8 */ SDK_PUB DirectX::XMFLOAT3 m_upDirection; + /* 0x0104 */ SDK_PUB float m_fYaw3; + /* 0x0108 */ SDK_PUB float m_fPitch3; + /* 0x010C */ SDK_PRI char pad_0x10C[0x4]; + /* 0x0110 */ SDK_PUB std::int32_t m_iLockingInteractableId; + /* 0x0114 */ SDK_PRI char pad_0x114[0x1C]; + /* 0x0130 */ SDK_PUB bool m_bIsOnGround; + /* 0x0131 */ SDK_PRI char pad_0x131[0x3]; + /* 0x0134 */ SDK_PUB float m_fAirTime; + /* 0x0138 */ SDK_PUB DirectX::XMFLOAT3 m_groundNormal; + /* 0x0144 */ SDK_PRI char pad_0x144[0xC]; + /* 0x0150 */ SDK_PUB boost::uuids::uuid m_selectedToolUuid; + /* 0x0160 */ SDK_PUB std::int32_t m_iSelectedToolId; + /* 0x0164 */ SDK_PUB boost::uuids::uuid m_prevSelectedToolUuid; + /* 0x0174 */ SDK_PUB std::int32_t m_iPrevSelectedToolId; + /* 0x0178 */ SDK_PRI char pad_0x178[0x2]; + /* 0x017A */ SDK_PUB std::int8_t m_iCrouchState; + /* 0x017B */ SDK_PRI char pad_0x17B[0x1D]; + /* 0x0198 */ SDK_PUB std::shared_ptr m_pController; + /* 0x01A8 */ SDK_PUB std::shared_ptr m_pPhysicsProxy; + /* 0x01B8 */ SDK_PUB std::shared_ptr m_pRagdollPhysicsProxy; + /* 0x01C8 */ SDK_PRI char pad_0x1C8[0xB8]; + /* 0x0280 */ SDK_PUB float m_fWalkSpeed; + /* 0x0284 */ SDK_PUB float m_fAimSpeed; + /* 0x0288 */ SDK_PUB float m_fCrouchSpeed; + /* 0x028C */ SDK_PUB float m_fSprintSpeed; + /* 0x0290 */ SDK_PUB float m_fJumpStrength; + /* 0x0294 */ SDK_PUB float m_fRadius; + /* 0x0298 */ SDK_PUB float m_fHeight; + /* 0x029C */ SDK_PUB float m_fHeightCrouch; + /* 0x02A0 */ SDK_PUB float m_fMass; + /* 0x02A4 */ SDK_PRI char pad_0x2A4[0xC]; + /* 0x02B0 */ SDK_PUB bool m_bCanSwim; + /* 0x02B1 */ SDK_PRI char pad_0x2B1[0x3]; + /* 0x02B4 */ SDK_PUB CharacterScriptData m_scriptData; + /* 0x02BC */ SDK_PRI char pad_0x2BC[0x4]; + /* 0x02C0 */ SDK_PUB std::string m_scriptPath; + /* 0x02E0 */ SDK_PUB std::string m_scriptClass; + /* 0x0300 */ SDK_PUB std::int32_t m_iScriptRef; + /* 0x0304 */ SDK_PRI char pad_0x304[0x8]; + /* 0x030C */ SDK_PUB DirectX::XMFLOAT4 m_color; + /* 0x031C */ SDK_PUB DirectX::XMFLOAT3 m_tumblingExtent; + /* 0x0328 */ SDK_PUB DirectX::XMFLOAT3 m_tumblingWorldPosition; + /* 0x0334 */ SDK_PUB DirectX::XMFLOAT4 m_tumblingWorldRotation; + /* 0x0344 */ SDK_PUB DirectX::XMFLOAT3 m_tumblingLinearVelocity; + /* 0x0350 */ SDK_PRI char pad_0x350[0x20]; + /* 0x0370 */ SDK_PUB std::string m_nameTag; + /* 0x0390 */ SDK_PUB bool m_nameTagRequiresLineOfSight; + /* 0x0391 */ SDK_PRI char pad_0x391[0x3]; + /* 0x0394 */ SDK_PUB DirectX::XMFLOAT4 m_nameTagColor; + /* 0x03A4 */ SDK_PUB float m_fNameTagFadeDistance; + /* 0x03A8 */ SDK_PUB float m_fNameTagRenderDistance; + /* 0x03AC */ SDK_PUB std::int32_t m_iNameTagUpdateCounter; }; // Size: 0x3B0 static_assert(sizeof(Character) == 0x3B0, "Character: Incorrect Size"); diff --git a/include/SmSdk/CharacterManager.hpp b/include/SmSdk/CharacterManager.hpp index 7bb5bed..303d1ba 100644 --- a/include/SmSdk/CharacterManager.hpp +++ b/include/SmSdk/CharacterManager.hpp @@ -15,37 +15,35 @@ SMSDK_BEGIN_NAMESPACE class CharacterManager { REMOVE_COPY_CONSTRUCTORS(CharacterManager); -public: - virtual ~CharacterManager() = default; - static CharacterManager* GetInstance(); + SDK_PUB virtual ~CharacterManager() = default; - inline Character* _getCharacter(int iCharId) + SDK_PUB static CharacterManager* GetInstance(); + + SDK_PUB inline Character* _getCharacter(const std::uint32_t uCharId) { - auto iter = m_mapCharacterState.find(iCharId); + auto iter = m_mapCharacterState.find(uCharId); if (iter == m_mapCharacterState.end()) return nullptr; return iter->second.get(); } - inline static Character* GetCharacter(int iCharId) + SDK_PUB inline static Character* GetCharacter(const std::uint32_t uCharId) { CharacterManager* pCharacterManager = CharacterManager::GetInstance(); if (!pCharacterManager) return nullptr; - return pCharacterManager->_getCharacter(iCharId); + return pCharacterManager->_getCharacter(uCharId); } - /* 0x0008 */ std::unordered_map> m_mapCharacterState; - /* 0x0048 */ std::unordered_map> m_worldLiftMap; -private: - /* 0x0088 */ std::int32_t m_iSomeId; -public: - /* 0x008C */ std::int32_t m_iTick; - /* 0x0090 */ std::map m_mapCharacterData; - /* 0x00A0 */ std::vector> m_vecCharacters; + /* 0x0008 */ SDK_PUB std::unordered_map> m_mapCharacterState; + /* 0x0048 */ SDK_PUB std::unordered_map> m_worldLiftMap; + /* 0x0088 */ SDK_PRI std::int32_t m_iSomeId; + /* 0x008C */ SDK_PUB std::int32_t m_iTick; + /* 0x0090 */ SDK_PUB std::map m_mapCharacterData; + /* 0x00A0 */ SDK_PUB std::vector> m_vecCharacters; }; // Size: 0xB8 static_assert(sizeof(CharacterManager) == 0xB8, "CharacterManager: Incorrect Size"); diff --git a/include/SmSdk/ContainerManager.hpp b/include/SmSdk/ContainerManager.hpp index e6b1d76..bffc19f 100644 --- a/include/SmSdk/ContainerManager.hpp +++ b/include/SmSdk/ContainerManager.hpp @@ -7,9 +7,9 @@ SMSDK_BEGIN_NAMESPACE struct ContainerEntry { - /* 0x0000 */ boost::uuids::uuid m_itemUuid; - /* 0x0010 */ std::int32_t m_iItemId; - /* 0x0014 */ std::int32_t m_iItemQuantity; + /* 0x0000 */ SDK_PUB boost::uuids::uuid m_itemUuid; + /* 0x0010 */ SDK_PUB std::int32_t m_iItemId; + /* 0x0014 */ SDK_PUB std::int32_t m_iItemQuantity; }; // Size: 0x18 static_assert(offsetof(ContainerEntry, ContainerEntry::m_itemUuid) == 0x0, "ContainerEntry::m_itemUuid: Incorrect offset"); @@ -21,11 +21,9 @@ static_assert(sizeof(ContainerEntry) == 0x18, "ContainerEntry: Incorrect Size"); struct ContainerItems { - /* 0x0000 */ uint16_t m_uMaxStackSize; -private: - /* 0x0002 */ char pad_0x2[0x6]; -public: - /* 0x0008 */ std::vector m_vecEntries; + /* 0x0000 */ SDK_PUB std::uint16_t m_uMaxStackSize; + /* 0x0002 */ SDK_PRI char pad_0x2[0x6]; + /* 0x0008 */ SDK_PUB std::vector m_vecEntries; }; // Size: 0x20 static_assert(offsetof(ContainerItems, ContainerItems::m_uMaxStackSize) == 0x0, "ContainerItems::m_uMaxStackSize: Incorrect offset"); @@ -36,24 +34,17 @@ static_assert(sizeof(ContainerItems) == 0x20, "ContainerItems: Incorrect Size"); struct Container2 : public NetObj { -private: - /* 0x0028 */ char pad_0x28[0x8]; -public: - /* 0x0030 */ ContainerItems m_clientItems; - /* 0x0050 */ ContainerItems m_serverItems; - /* 0x0070 */ ContainerItems m_containerItems3; -private: - /* 0x0090 */ char pad_0x90[0x4]; -public: - /* 0x0094 */ std::int32_t m_iUpdateCounter; - /* 0x0098 */ std::int32_t m_iLastUpdateTick; -private: - /* 0x009C */ char pad_0x9C[0x34]; -public: - /* 0x00D0 */ std::vector m_vecFilters; - /* 0x00E8 */ bool m_bAllowSpend; -private: - /* 0x00E9 */ char pad_0xE9[0x7]; + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; + /* 0x0030 */ SDK_PUB ContainerItems m_clientItems; + /* 0x0050 */ SDK_PUB ContainerItems m_serverItems; + /* 0x0070 */ SDK_PUB ContainerItems m_containerItems3; + /* 0x0090 */ SDK_PRI char pad_0x90[0x4]; + /* 0x0094 */ SDK_PUB std::int32_t m_iUpdateCounter; + /* 0x0098 */ SDK_PUB std::int32_t m_iLastUpdateTick; + /* 0x009C */ SDK_PRI char pad_0x9C[0x34]; + /* 0x00D0 */ SDK_PUB std::vector m_vecFilters; + /* 0x00E8 */ SDK_PUB bool m_bAllowSpend; + /* 0x00E9 */ SDK_PRI char pad_0xE9[0x7]; }; // Size: 0xF0 static_assert(offsetof(Container2, Container2::m_clientItems) == 0x30, "Container2::m_clientItems: Incorrect offset"); @@ -69,19 +60,14 @@ static_assert(sizeof(Container2) == 0xF0, "Container2: Incorrect Size"); struct ContainerManager { - static ContainerManager* GetInstance(); -private: - /* 0x0000 */ char pad_0x0[0x28]; -public: - /* 0x0028 */ bool m_bOngoingTransaction; -private: - /* 0x0029 */ char pad_0x29[0x7]; -private: - /* 0x0030 */ std::shared_ptr m_pSomeContainer; -public: - /* 0x0040 */ std::unordered_map> m_worldContainerMap; // NOTE: this naming inconsistency is intentional to match the original binary -private: - /* 0x0080 */ char pad_0x80[0x18]; + SDK_PUB static ContainerManager* GetInstance(); + + /* 0x0000 */ SDK_PRI char pad_0x0[0x28]; + /* 0x0028 */ SDK_PUB bool m_bOngoingTransaction; + /* 0x0029 */ SDK_PRI char pad_0x29[0x7]; + /* 0x0030 */ SDK_PRI std::shared_ptr m_pSomeContainer; + /* 0x0040 */ SDK_PUB std::unordered_map> m_worldContainerMap; // NOTE: this naming inconsistency is intentional to match the original binary + /* 0x0080 */ SDK_PRI char pad_0x80[0x18]; }; // Size: 0x98 static_assert(offsetof(ContainerManager, ContainerManager::m_bOngoingTransaction) == 0x28, "ContainerManager::m_bOngoingTransaction: Incorrect offset"); diff --git a/include/SmSdk/Creation/BodyJointPhysicsProxy.hpp b/include/SmSdk/Creation/BodyJointPhysicsProxy.hpp index 76749ca..795fef5 100644 --- a/include/SmSdk/Creation/BodyJointPhysicsProxy.hpp +++ b/include/SmSdk/Creation/BodyJointPhysicsProxy.hpp @@ -7,10 +7,8 @@ SMSDK_BEGIN_NAMESPACE class BodyJointPhysicsProxy : public PhysicsProxy { -public: - /* 0x0030 */ btCompoundShape m_compoundShape; -private: - /* 0x00B0 */ char pad_0xB0[0x20]; + /* 0x0030 */ SDK_PUB btCompoundShape m_compoundShape; + /* 0x00B0 */ SDK_PRI char pad_0xB0[0x20]; }; // Size: 0xD0 static_assert(sizeof(BodyJointPhysicsProxy) == 0xD0, "BodyJointPhysicsProxy: Incorrect Size"); diff --git a/include/SmSdk/Creation/ChildShape.hpp b/include/SmSdk/Creation/ChildShape.hpp index 605a601..4f4f056 100644 --- a/include/SmSdk/Creation/ChildShape.hpp +++ b/include/SmSdk/Creation/ChildShape.hpp @@ -11,14 +11,13 @@ class RigidBody; class ChildShape : public NetObj { -public: - inline Color getColor() const + SDK_PUB inline Color getColor() const { return m_pShape->m_shapeColor; } // SERVER ONLY - inline void setColor(Color newColor) + SDK_PUB inline void setColor(Color newColor) { if (m_pShape->m_shapeColor == newColor) return; @@ -26,21 +25,15 @@ class ChildShape : public NetObj m_pShape->m_shapeColor = newColor; this->updateObject(); } -private: - /* 0x0028 */ char pad_0x0028[0x30]; -public: - /* 0x0058 */ std::shared_ptr m_pShape; -private: - /* 0x0068 */ char pad_0x0068[0x8]; -public: - /* 0x0070 */ std::int32_t m_iCurrentIdx; -private: - /* 0x0074 */ char pad_0x0074[0xC]; -public: - /* 0x0080 */ std::shared_ptr m_pParentBody; - /* 0x0090 */ std::shared_ptr m_pController; -private: - /* 0x00A0 */ char pad_0x00A0[0x30]; + + /* 0x0028 */ SDK_PRI char pad_0x0028[0x30]; + /* 0x0058 */ SDK_PUB std::shared_ptr m_pShape; + /* 0x0068 */ SDK_PRI char pad_0x0068[0x8]; + /* 0x0070 */ SDK_PUB std::int32_t m_iCurrentIdx; + /* 0x0074 */ SDK_PRI char pad_0x0074[0xC]; + /* 0x0080 */ SDK_PUB std::shared_ptr m_pParentBody; + /* 0x0090 */ SDK_PUB std::shared_ptr m_pController; + /* 0x00A0 */ SDK_PRI char pad_0x00A0[0x30]; }; // Size: 0x00D0 static_assert(sizeof(ChildShape) == 0xD0, "ChildShape: Incorrect Size"); diff --git a/include/SmSdk/Creation/ControllerBase.hpp b/include/SmSdk/Creation/ControllerBase.hpp index e1a3a95..d8e51ce 100644 --- a/include/SmSdk/Creation/ControllerBase.hpp +++ b/include/SmSdk/Creation/ControllerBase.hpp @@ -38,29 +38,20 @@ enum ControllerType : uint32_t class ControllerBase : public NetObj { -private: - /* 0x0028 */ char pad_0x28[0x10]; -public: - /* 0x0038 */ ControllerType m_controllerType; -private: - /* 0x003C */ char pad_0x3C[0xC]; -public: - /* 0x0048 */ std::shared_ptr m_pParentShape; -private: - /* 0x0058 */ char pad_0x58[0x10]; -public: - /* 0x0068 */ std::int32_t m_iMaxParentCount; -private: - /* 0x006C */ char pad_0x6C[0x14]; -public: - /* 0x0080 */ std::shared_ptr m_pGuiInterface; - /* 0x0090 */ std::list> m_listParents; - /* 0x00A0 */ std::list> m_listChildControllers; - /* 0x00B0 */ std::list> m_listChildJoints; - /* 0x00C0 */ std::map m_mapAnimatedBones; - /* 0x00D0 */ bool m_bUpdateFlag; -private: - /* 0x00D1 */ char pad_0xD1[0xF]; + /* 0x0028 */ SDK_PRI char pad_0x28[0x10]; + /* 0x0038 */ SDK_PUB ControllerType m_controllerType; + /* 0x003C */ SDK_PRI char pad_0x3C[0xC]; + /* 0x0048 */ SDK_PUB std::shared_ptr m_pParentShape; + /* 0x0058 */ SDK_PRI char pad_0x58[0x10]; + /* 0x0068 */ SDK_PUB std::int32_t m_iMaxParentCount; + /* 0x006C */ SDK_PRI char pad_0x6C[0x14]; + /* 0x0080 */ SDK_PUB std::shared_ptr m_pGuiInterface; + /* 0x0090 */ SDK_PUB std::list> m_listParents; + /* 0x00A0 */ SDK_PUB std::list> m_listChildControllers; + /* 0x00B0 */ SDK_PUB std::list> m_listChildJoints; + /* 0x00C0 */ SDK_PUB std::map m_mapAnimatedBones; + /* 0x00D0 */ SDK_PUB bool m_bUpdateFlag; + /* 0x00D1 */ SDK_PRI char pad_0xD1[0xF]; }; // Size: 0xE0 static_assert(sizeof(ControllerBase) == 0xE0, "ControllerBase: Incorrect Size"); diff --git a/include/SmSdk/Creation/CreationManager.hpp b/include/SmSdk/Creation/CreationManager.hpp index 32f25de..658aebe 100644 --- a/include/SmSdk/Creation/CreationManager.hpp +++ b/include/SmSdk/Creation/CreationManager.hpp @@ -11,13 +11,13 @@ SMSDK_BEGIN_NAMESPACE -struct BodyStructure +struct BodyState { std::shared_ptr m_pBody; std::shared_ptr m_pPhysicsProxy; }; -struct JointStructure +struct JointState { std::shared_ptr m_pJoint; std::shared_ptr m_pPhysicsProxy; @@ -26,22 +26,31 @@ struct JointStructure class CreationManager { REMOVE_COPY_CONSTRUCTORS(CreationManager); -public: - virtual ~CreationManager() = default; - static CreationManager* GetInstance(); + SDK_PUB virtual ~CreationManager() = default; - BodyStructure* _getBodyData(int iId); - JointStructure* _getJointData(int iId); + SDK_PUB static CreationManager* GetInstance(); - static BodyStructure* GetBodyData(int iId); - static JointStructure* GetJointData(int iId); + SDK_PUB BodyState* _getBodyState(const std::uint32_t uId); + SDK_PUB JointState* _getJointState(const std::uint32_t uId); - std::unordered_map m_mapBodies; - std::unordered_map> m_mapChildShapes; - std::unordered_map m_mapJoints; - std::unordered_map> m_mapInteractiveParts; - std::unordered_map m_mapCreations; -}; + SDK_PUB static BodyState* GetBodyState(const std::uint32_t uId); + SDK_PUB static JointState* GetJointState(const std::uint32_t uId); + + /* 0x0008 */ SDK_PUB std::unordered_map m_mapBodyStates; + /* 0x0048 */ SDK_PUB std::unordered_map> m_mapChildShapes; + /* 0x0088 */ SDK_PUB std::unordered_map m_mapJointStates; + /* 0x00C8 */ SDK_PUB std::unordered_map> m_mapControllerStates; + /* 0x0108 */ SDK_PUB std::unordered_map m_mapCreations; + /* 0x0148 */ SDK_PRI char pad_0x148[0x118]; +}; // Size: 0x260 + +static_assert(offsetof(CreationManager, CreationManager::m_mapBodyStates) == 0x8, "CreationManager::m_mapBodyState: Incorrect offset"); +static_assert(offsetof(CreationManager, CreationManager::m_mapChildShapes) == 0x48, "CreationManager::child_shape_map: Incorrect offset"); +static_assert(offsetof(CreationManager, CreationManager::m_mapJointStates) == 0x88, "CreationManager::joint_map: Incorrect offset"); +static_assert(offsetof(CreationManager, CreationManager::m_mapControllerStates) == 0xC8, "CreationManager::interactive_part_map: Incorrect offset"); +static_assert(offsetof(CreationManager, CreationManager::m_mapCreations) == 0x108, "CreationManager::creation_map: Incorrect offset"); + +static_assert(sizeof(CreationManager) == 0x260, "CreationManager: Incorrect Size"); SMSDK_END_NAMESPACE \ No newline at end of file diff --git a/include/SmSdk/Creation/Joint.hpp b/include/SmSdk/Creation/Joint.hpp index e8ed73f..a300392 100644 --- a/include/SmSdk/Creation/Joint.hpp +++ b/include/SmSdk/Creation/Joint.hpp @@ -7,22 +7,36 @@ SMSDK_BEGIN_NAMESPACE struct Joint : public NetObj { -private: - /* 0x0028 */ char pad_0x28[0x20]; -public: - /* 0x0048 */ Color m_color; -private: - /* 0x004C */ char pad_0x4C[0x4]; -public: - /* 0x0050 */ std::shared_ptr m_pParentChild; -private: - /* 0x0060 */ char pad_0x60[0x68]; -public: - /* 0x00C8 */ std::shared_ptr m_pController; -private: - /* 0x00D8 */ char pad_0xD8[0x8]; + /* 0x0028 */ SDK_PRI char pad_0x28[0x10]; + /* 0x0038 */ SDK_PUB boost::uuids::uuid m_uuid; + /* 0x0048 */ SDK_PUB Color m_color; + /* 0x004C */ SDK_PRI char pad_0x4C[0x4]; + /* 0x0050 */ SDK_PUB std::shared_ptr m_pChildShapeA; + /* 0x0060 */ SDK_PUB std::shared_ptr m_pChildShapeB; + /* 0x0070 */ SDK_PUB DirectX::XMINT3 m_positionA; + /* 0x007C */ SDK_PUB DirectX::XMINT3 m_positionB; + /* 0x0088 */ SDK_PUB DirectX::XMINT3 m_zAxisA; + /* 0x0094 */ SDK_PUB DirectX::XMINT3 m_zAxisB; + /* 0x00A0 */ SDK_PUB DirectX::XMINT3 m_xAxisA; + /* 0x00AC */ SDK_PUB DirectX::XMINT3 m_xAxisB; + /* 0x00B8 */ SDK_PUB std::shared_ptr m_pParentController; + /* 0x00C8 */ SDK_PUB std::shared_ptr m_pController; + /* 0x00D8 */ SDK_PRI char pad_0xD8[0x8]; }; // Size: 0xE0 +static_assert(offsetof(Joint, Joint::m_uuid) == 0x38, "Joint::m_uuid: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_color) == 0x48, "Joint::m_color: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_pChildShapeA) == 0x50, "Joint::m_pChildShapeA: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_pChildShapeB) == 0x60, "Joint::m_pChildShapeB: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_positionA) == 0x70, "Joint::m_positionA: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_positionB) == 0x7C, "Joint::m_positionB: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_zAxisA) == 0x88, "Joint::m_zAxisA: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_zAxisB) == 0x94, "Joint::m_zAxisB: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_xAxisA) == 0xA0, "Joint::m_xAxisA: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_xAxisB) == 0xAC, "Joint::m_xAxisB: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_pParentController) == 0xB8, "Joint::m_pParentController: Incorrect offset"); +static_assert(offsetof(Joint, Joint::m_pController) == 0xC8, "Joint::m_pController: Incorrect offset"); + static_assert(sizeof(Joint) == 0xE0, "Joint: Incorrect Size"); SMSDK_END_NAMESPACE \ No newline at end of file diff --git a/include/SmSdk/Creation/JointPhysicsProxy.hpp b/include/SmSdk/Creation/JointPhysicsProxy.hpp index 3c7969b..61d6599 100644 --- a/include/SmSdk/Creation/JointPhysicsProxy.hpp +++ b/include/SmSdk/Creation/JointPhysicsProxy.hpp @@ -7,10 +7,8 @@ SMSDK_BEGIN_NAMESPACE struct JointPhysicsProxy : public PhysicsProxy { -private: - /* 0x0030 */ char pad_0x30[0x8]; -public: - /* 0x0038 */ btHingeConstraint* m_pHingeConstraint; + /* 0x0030 */ SDK_PRI char pad_0x30[0x8]; + /* 0x0038 */ SDK_PUB btHingeConstraint* m_pHingeConstraint; }; // Size: 0x40 static_assert(sizeof(JointPhysicsProxy) == 0x40, "JointPhysicsProxy: Incorrect Size"); diff --git a/include/SmSdk/Creation/RigidBody.hpp b/include/SmSdk/Creation/RigidBody.hpp index 8a16877..5c7ad78 100644 --- a/include/SmSdk/Creation/RigidBody.hpp +++ b/include/SmSdk/Creation/RigidBody.hpp @@ -13,39 +13,28 @@ SMSDK_BEGIN_NAMESPACE class RigidBody : public NetObj { -public: - inline ChildShape* getChildShape(int iChildId) + SDK_PUB inline ChildShape* getChildShape(const std::size_t uChildId) { - if (iChildId < 0 || iChildId >= m_vecChildShapes.size()) + if (uChildId >= m_vecChildShapes.size()) return nullptr; - return m_vecChildShapes[iChildId].get(); + return m_vecChildShapes[uChildId].get(); } -private: - /* 0x0028 */ char pad_0x28[0xC]; -public: - /* 0x0034 */ std::int16_t m_iWorldId; -private: - /* 0x0036 */ char pad_0x36[0xA]; -public: - /* 0x0040 */ DirectX::XMMATRIX m_transform; -private: - /* 0x0080 */ char pad_0x80[0x8]; -public: - /* 0x0088 */ std::shared_ptr m_pShapeGridData; - /* 0x0098 */ DirectX::XMFLOAT3 m_localAabbMin; - /* 0x00A4 */ DirectX::XMFLOAT3 m_localAabbMax; -private: - /* 0x00B0 */ char pad_0xB0[0x20]; -public: - /* 0x00D0 */ btCompoundShape m_compoundShape; - /* 0x0150 */ std::vector> m_vecChildShapes; -private: - /* 0x0168 */ char pad_0x168[0x18]; -public: - /* 0x0180 */ std::unordered_set> m_setJointStorage; -private: - /* 0x01C0 */ char pad_0x1C0[0x10]; + + /* 0x0028 */ SDK_PRI char pad_0x28[0xC]; + /* 0x0034 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x0036 */ SDK_PRI char pad_0x36[0xA]; + /* 0x0040 */ SDK_PUB DirectX::XMMATRIX m_transform; + /* 0x0080 */ SDK_PRI char pad_0x80[0x8]; + /* 0x0088 */ SDK_PUB std::shared_ptr m_pShapeGridData; + /* 0x0098 */ SDK_PUB DirectX::XMFLOAT3 m_localAabbMin; + /* 0x00A4 */ SDK_PUB DirectX::XMFLOAT3 m_localAabbMax; + /* 0x00B0 */ SDK_PRI char pad_0xB0[0x20]; + /* 0x00D0 */ SDK_PUB btCompoundShape m_compoundShape; + /* 0x0150 */ SDK_PUB std::vector> m_vecChildShapes; + /* 0x0168 */ SDK_PRI char pad_0x168[0x18]; + /* 0x0180 */ SDK_PUB std::unordered_set> m_setJointStorage; + /* 0x01C0 */ SDK_PRI char pad_0x1C0[0x10]; }; // Size: 0x1D0 static_assert(sizeof(RigidBody) == 0x1D0, "RigidBody: Incorrect Size"); diff --git a/include/SmSdk/Creation/Shape.hpp b/include/SmSdk/Creation/Shape.hpp index 4cf3205..e6db7e1 100644 --- a/include/SmSdk/Creation/Shape.hpp +++ b/include/SmSdk/Creation/Shape.hpp @@ -9,23 +9,17 @@ SMSDK_BEGIN_NAMESPACE class Shape { -private: - virtual void func1() {} - virtual void func2() {} -public: - virtual uint32_t getCollisionShapeType() { return 0; } -private: - /* 0x0008 */ char pad_0x8[0x8]; -public: - /* 0x0010 */ boost::uuids::uuid m_shapeUuid; - /* 0x0020 */ std::int32_t m_iShapeType; - /* 0x0024 */ Color m_shapeColor; -private: - /* 0x0028 */ char pad_0x28[0x4]; -public: - /* 0x002C */ DirectX::XMFLOAT3 m_shapeSize; -private: - /* 0x0038 */ char pad_0x38[0x28]; + SDK_PRI virtual void func1() {} + SDK_PRI virtual void func2() {} + SDK_PUB virtual std::uint32_t getCollisionShapeType() { return 0; } + + /* 0x0008 */ SDK_PRI char pad_0x8[0x8]; + /* 0x0010 */ SDK_PUB boost::uuids::uuid m_shapeUuid; + /* 0x0020 */ SDK_PUB std::int32_t m_iShapeType; + /* 0x0024 */ SDK_PUB Color m_shapeColor; + /* 0x0028 */ SDK_PRI char pad_0x28[0x4]; + /* 0x002C */ SDK_PUB DirectX::XMFLOAT3 m_shapeSize; + /* 0x0038 */ SDK_PRI char pad_0x38[0x28]; }; // Size: 0x60 static_assert(sizeof(Shape) == 0x60, "Shape: Incorrect Size"); diff --git a/include/SmSdk/DirectoryManager.hpp b/include/SmSdk/DirectoryManager.hpp index cad3f72..eeeec6d 100644 --- a/include/SmSdk/DirectoryManager.hpp +++ b/include/SmSdk/DirectoryManager.hpp @@ -10,18 +10,21 @@ SMSDK_BEGIN_NAMESPACE class DirectoryManager { SINGLETON_CLASS(DirectoryManager); -public: - static DirectoryManager* GetInstance(); - - bool getReplacement(const std::string& key, std::string& replacement); - bool replacePathR(std::string& path); - - static bool ReplacePathR(std::string& path); - static bool GetReplacement(const std::string& key, std::string& replacement); -private: - char unk_data1[8]; -public: - std::unordered_map m_mapContentKeyToPathList; -}; + + SDK_PUB static DirectoryManager* GetInstance(); + + SDK_PUB bool getReplacement(const std::string& key, std::string& replacement); + SDK_PUB bool replacePathR(std::string& path); + + SDK_PUB static bool ReplacePathR(std::string& path); + SDK_PUB static bool GetReplacement(const std::string& key, std::string& replacement); + + /* 0x0000 */ SDK_PRI char pad_0x0[8]; + /* 0x0008 */ SDK_PUB std::unordered_map m_mapContentKeyToPathList; +}; // Size: 0x48 + +static_assert(offsetof(DirectoryManager, DirectoryManager::m_mapContentKeyToPathList) == 0x8, "DirectoryManager::m_pathReplacements: Incorrect offset"); + +static_assert(sizeof(DirectoryManager) == 0x48, "DirectoryManager: Incorrect Size"); SMSDK_END_NAMESPACE \ No newline at end of file diff --git a/include/SmSdk/GameSettings.hpp b/include/SmSdk/GameSettings.hpp index 8bbde13..c31cb51 100644 --- a/include/SmSdk/GameSettings.hpp +++ b/include/SmSdk/GameSettings.hpp @@ -1,5 +1,7 @@ #pragma once +#include "SmSdk/config.hpp" + #include #include @@ -7,10 +9,9 @@ SMSDK_BEGIN_NAMESPACE class GameSettings { -public: - static GameSettings* GetInstance(); + SDK_PUB static GameSettings* GetInstance(); - inline float _getFloatSetting(const std::string& name, float fDefaultValue = 1.0f) const + SDK_PUB inline float _getFloatSetting(const std::string& name, float fDefaultValue = 1.0f) const { auto iter = m_mapFloatSettings.find(name); if (iter != m_mapFloatSettings.end()) @@ -19,12 +20,12 @@ class GameSettings return fDefaultValue; } - inline float _getMasterVolume() const + SDK_PUB inline float _getMasterVolume() const { return this->_getFloatSetting("MasterVolume", 1.0f); } - inline static float GetEffectsVolume() + SDK_PUB inline static float GetEffectsVolume() { GameSettings* pGameSettings = GameSettings::GetInstance(); if (!pGameSettings) @@ -36,7 +37,7 @@ class GameSettings return fEffectVolume * fMasterVolume; } - inline static float GetMasterVolume() + SDK_PUB inline static float GetMasterVolume() { GameSettings* pGameSettings = GameSettings::GetInstance(); if (!pGameSettings) @@ -44,13 +45,12 @@ class GameSettings return pGameSettings->_getFloatSetting("MasterVolume", 1.0f); } -public: - /* 0x0000 */ std::unordered_map m_mapIntSettings; - /* 0x0040 */ std::unordered_map m_mapFloatSettings; - /* 0x0080 */ std::unordered_map m_mapStringSettings; - /* 0x00C0 */ std::int32_t m_appliedSettings; -private: - /* 0x00C4 */ char pad_0xC4[0x4]; + + /* 0x0000 */ SDK_PUB std::unordered_map m_mapIntSettings; + /* 0x0040 */ SDK_PUB std::unordered_map m_mapFloatSettings; + /* 0x0080 */ SDK_PUB std::unordered_map m_mapStringSettings; + /* 0x00C0 */ SDK_PUB std::int32_t m_appliedSettings; + /* 0x00C4 */ SDK_PRI char pad_0xC4[0x4]; }; // Size: 0xC8 static_assert(offsetof(GameSettings, GameSettings::m_mapIntSettings) == 0x0, "GameSettings::m_mapIntSettings: Incorrect offset"); diff --git a/include/SmSdk/GameState.hpp b/include/SmSdk/GameState.hpp index 9cf4ac7..f0e160a 100644 --- a/include/SmSdk/GameState.hpp +++ b/include/SmSdk/GameState.hpp @@ -24,88 +24,73 @@ enum EGameStateType : uint32_t struct GameState : public InputTarget { -public: - virtual ~GameState() = default; -private: - virtual void func8() { /* implemented by the game */ } - virtual void func9() { /* implemented by the game */ } -public: - virtual void update(float delta_time) { SMSDK_UNREF(delta_time); /* implemented by the game */ } -private: - virtual void func11() { /* implemented by the game */ } - virtual void func12() { /* implemented by the game */ } - virtual void func13() { /* implemented by the game */ } - virtual void func14() { /* implemented by the game */ } - virtual void func15() { /* implemented by the game */ } - virtual void func16() { /* implemented by the game */ } - virtual void func17() { /* implemented by the game */ } - virtual void func18() { /* implemented by the game */ } - virtual void func19() { /* implemented by the game */ } - virtual void func20() { /* implemented by the game */ } - virtual void func21() { /* implemented by the game */ } - virtual void func22() { /* implemented by the game */ } - virtual void func23() { /* implemented by the game */ } - virtual void func24() { /* implemented by the game */ } - virtual void func25() { /* implemented by the game */ } -public: - virtual EGameStateType getGameStateType() { /* implemented by the game */ } - virtual EGameStateType getNextGameStateType() { /* implemented by the game */ } -private: - virtual void func28() { /* implemented by the game */ } -public: - static GameState* GetCurrentState(); - static bool IsCurrentGameState(EGameStateType gsType); - static bool IsCurrentOrNextGameState(EGameStateType gsType); - static SteamNetworkClient* GetSteamNetworkClient(); -private: - /* 0x0008 */ char pad_0x8[0x110]; + SDK_PUB virtual ~GameState() = default; + SDK_PRI virtual void func8() { /* implemented by the game */ } + SDK_PRI virtual void func9() { /* implemented by the game */ } + SDK_PUB virtual void update(float delta_time) { SMSDK_UNREF(delta_time); /* implemented by the game */ } + SDK_PRI virtual void func11() { /* implemented by the game */ } + SDK_PRI virtual void func12() { /* implemented by the game */ } + SDK_PRI virtual void func13() { /* implemented by the game */ } + SDK_PRI virtual void func14() { /* implemented by the game */ } + SDK_PRI virtual void func15() { /* implemented by the game */ } + SDK_PRI virtual void func16() { /* implemented by the game */ } + SDK_PRI virtual void func17() { /* implemented by the game */ } + SDK_PRI virtual void func18() { /* implemented by the game */ } + SDK_PRI virtual void func19() { /* implemented by the game */ } + SDK_PRI virtual void func20() { /* implemented by the game */ } + SDK_PRI virtual void func21() { /* implemented by the game */ } + SDK_PRI virtual void func22() { /* implemented by the game */ } + SDK_PRI virtual void func23() { /* implemented by the game */ } + SDK_PRI virtual void func24() { /* implemented by the game */ } + SDK_PRI virtual void func25() { /* implemented by the game */ } + SDK_PUB virtual EGameStateType getGameStateType() { /* implemented by the game */ } + SDK_PUB virtual EGameStateType getNextGameStateType() { /* implemented by the game */ } + SDK_PRI virtual void func28() { /* implemented by the game */ } + + SDK_PUB static GameState* GetCurrentState(); + SDK_PUB static bool IsCurrentGameState(EGameStateType gsType); + SDK_PUB static bool IsCurrentOrNextGameState(EGameStateType gsType); + SDK_PUB static SteamNetworkClient* GetSteamNetworkClient(); + + /* 0x0008 */ SDK_PRI char pad_0x8[0x110]; }; // Size: 0x118 static_assert(sizeof(GameState) == 0x118, "GameState: Incorrect Size"); struct SimpleTimer { -private: - virtual void func1() { /* implemented by the game */ } - virtual void func2() { /* implemented by the game */ } - virtual void func3() { /* implemented by the game */ } - virtual void func4() { /* implemented by the game */ } - - /* 0x0008 */ char pad_0x8[0xC]; -public: - /* 0x0014 */ float m_fElapsedTime; + SDK_PRI virtual void func1() { /* implemented by the game */ } + SDK_PRI virtual void func2() { /* implemented by the game */ } + SDK_PRI virtual void func3() { /* implemented by the game */ } + SDK_PRI virtual void func4() { /* implemented by the game */ } + + /* 0x0008 */ SDK_PRI char pad_0x8[0xC]; + /* 0x0014 */ SDK_PUB float m_fElapsedTime; }; // Size: 0x18 + static_assert(sizeof(SimpleTimer) == 0x18, "SimpleTimer: Incorrect Size"); struct PlayState : public GameState { -private: - /* 0x0118 */ char pad_0x118[0x8]; -public: - /* 0x0120 */ std::shared_ptr m_pListenServer; - /* 0x0130 */ std::shared_ptr m_pSteamNetworkClient; -private: - /* 0x0140 */ char pad_0x140[0x8]; -public: - /* 0x0148 */ std::shared_ptr m_pGameInstance; - /* 0x0158 */ SimpleTimer m_someTimer; -public: - /* 0x0170 */ std::int32_t m_iConnectionTimeoutIdx; -private: - /* 0x0174 */ char pad_0x174[0x1C]; + /* 0x0118 */ SDK_PRI char pad_0x118[0x8]; + /* 0x0120 */ SDK_PUB std::shared_ptr m_pListenServer; + /* 0x0130 */ SDK_PUB std::shared_ptr m_pSteamNetworkClient; + /* 0x0140 */ SDK_PRI char pad_0x140[0x8]; + /* 0x0148 */ SDK_PUB std::shared_ptr m_pGameInstance; + /* 0x0158 */ SDK_PUB SimpleTimer m_someTimer; + /* 0x0170 */ SDK_PUB std::int32_t m_iConnectionTimeoutIdx; + /* 0x0174 */ SDK_PRI char pad_0x174[0x1C]; }; // Size: 0x190 + static_assert(sizeof(PlayState) == 0x190, "PlayState: Incorrect Size"); struct LoadState : public GameState { -private: - /* 0x0118 */ char pad_0x118[0x8]; -public: - /* 0x0120 */ std::shared_ptr m_pNextState; - /* 0x0130 */ std::shared_ptr m_pPrevState; - /* 0x0140 */ struct LoadingScreen* m_pLoadingScreen; -private: - /* 0x0148 */ char pad_0x148[0x10]; + /* 0x0118 */ SDK_PRI char pad_0x118[0x8]; + /* 0x0120 */ SDK_PUB std::shared_ptr m_pNextState; + /* 0x0130 */ SDK_PUB std::shared_ptr m_pPrevState; + /* 0x0140 */ SDK_PUB struct LoadingScreen* m_pLoadingScreen; + /* 0x0148 */ SDK_PRI char pad_0x148[0x10]; }; // Size: 0x158 static_assert(offsetof(LoadState, LoadState::m_pNextState) == 0x120, "LoadState::m_pNextState: Incorrect offset"); diff --git a/include/SmSdk/Gui/AudioOptionsMenu.hpp b/include/SmSdk/Gui/AudioOptionsMenu.hpp index 0584312..69c4cff 100644 --- a/include/SmSdk/Gui/AudioOptionsMenu.hpp +++ b/include/SmSdk/Gui/AudioOptionsMenu.hpp @@ -9,15 +9,14 @@ SMSDK_BEGIN_NAMESPACE class AudioOptionsMenu : public OptionsSubMenuBase { -public: - AudioOptionsMenu() + SDK_PUB AudioOptionsMenu() { OptionsSubMenuBase::GameConstructor(this); Memory::OverwriteVftable(this, SM_VTBL_AUDIO_OPTIONS_MENU_OFFSET); } - virtual ~AudioOptionsMenu() = default; - void restoreDefaults() override { /* implemented by the game */ } + SDK_PUB virtual ~AudioOptionsMenu() = default; + SDK_PUB void restoreDefaults() override { /* implemented by the game */ } }; // Size: 0x168 static_assert(sizeof(AudioOptionsMenu) == 0x168, "AudioOptionsMenu: Incorrect Size"); diff --git a/include/SmSdk/Gui/CompoundButton.hpp b/include/SmSdk/Gui/CompoundButton.hpp index 939b06a..950ad08 100644 --- a/include/SmSdk/Gui/CompoundButton.hpp +++ b/include/SmSdk/Gui/CompoundButton.hpp @@ -1,23 +1,22 @@ #pragma once +#include "SmSdk/mygui_include.hpp" + #include "SmSdk/Util/Memory.hpp" #include "SmSdk/offsets.hpp" -#include - SMSDK_BEGIN_NAMESPACE class CompoundButton { -public: - CompoundButton(MyGUI::Widget* parent) + SDK_PUB CompoundButton(MyGUI::Widget* parent) { using fSelfConstructor = void (*)(CompoundButton*, MyGUI::Widget*); Memory::Read(SM_CONSTRUCTOR_COMPOUND_BUTTON_OFFSET)(this, parent); } -public: - /* 0x0000 */ MyGUI::Widget* m_pBaseWidget; - /* 0x0008 */ MyGUI::Button* m_pButton; + + /* 0x0000 */ SDK_PUB MyGUI::Widget* m_pBaseWidget; + /* 0x0008 */ SDK_PUB MyGUI::Button* m_pButton; }; // Size: 0x10 static_assert(offsetof(CompoundButton, CompoundButton::m_pBaseWidget) == 0x0, "CompoundButton::m_pBaseWidget: Incorrect offset"); diff --git a/include/SmSdk/Gui/ControlOptionsMenu.hpp b/include/SmSdk/Gui/ControlOptionsMenu.hpp index d058369..3a6f9f9 100644 --- a/include/SmSdk/Gui/ControlOptionsMenu.hpp +++ b/include/SmSdk/Gui/ControlOptionsMenu.hpp @@ -9,17 +9,15 @@ SMSDK_BEGIN_NAMESPACE class ControlOptionsMenu : public OptionsSubMenuBase { -public: - ControlOptionsMenu() + SDK_PUB ControlOptionsMenu() { using fSelfConstructor = void (*)(ControlOptionsMenu*); Memory::Read(SM_CONSTRUCTOR_CONTROL_OPTIONS_MENU_OFFSET)(this); } - virtual ~ControlOptionsMenu() = default; - void restoreDefaults() override { /* implemented by the game */ } -private: - /* 0x0168 */ char pad_0x168[0x20]; + SDK_PUB virtual ~ControlOptionsMenu() = default; + SDK_PUB void restoreDefaults() override { /* implemented by the game */ } + /* 0x0168 */ SDK_PRI char pad_0x168[0x20]; }; // Size: 0x188 static_assert(sizeof(ControlOptionsMenu) == 0x188, "ControlOptionsMenu: Incorrect Size"); diff --git a/include/SmSdk/Gui/DisplayOptionsMenu.hpp b/include/SmSdk/Gui/DisplayOptionsMenu.hpp index e0caab2..20f032b 100644 --- a/include/SmSdk/Gui/DisplayOptionsMenu.hpp +++ b/include/SmSdk/Gui/DisplayOptionsMenu.hpp @@ -9,17 +9,16 @@ SMSDK_BEGIN_NAMESPACE class DisplayOptionsMenu : public OptionsSubMenuBase { -public: - DisplayOptionsMenu() + SDK_PUB DisplayOptionsMenu() { using fSelfConstructor = void (*)(DisplayOptionsMenu*); Memory::Read(SM_CONSTRUCTOR_DISPLAY_OPTIONS_MENU_OFFSET)(this); } - virtual ~DisplayOptionsMenu() = default; - void restoreDefaults() override { /* implemented by the game */ } -private: - /* 0x0168 */ char pad_0x168[0xD0]; + SDK_PUB virtual ~DisplayOptionsMenu() = default; + SDK_PUB void restoreDefaults() override { /* implemented by the game */ } + + /* 0x0168 */ SDK_PRI char pad_0x168[0xD0]; }; // Size: 0x238 static_assert(sizeof(DisplayOptionsMenu) == 0x238, "DisplayOptionsMenu: Incorrect Size"); diff --git a/include/SmSdk/Gui/GameplayOptionsMenu.hpp b/include/SmSdk/Gui/GameplayOptionsMenu.hpp index 42a6e7b..19310cd 100644 --- a/include/SmSdk/Gui/GameplayOptionsMenu.hpp +++ b/include/SmSdk/Gui/GameplayOptionsMenu.hpp @@ -7,8 +7,7 @@ SMSDK_BEGIN_NAMESPACE class GameplayOptionsMenu : public OptionsSubMenuBase { -public: - GameplayOptionsMenu() + SDK_PUB GameplayOptionsMenu() { OptionsSubMenuBase::GameConstructor(this); #if _SM_VERSION_NUM >= 070771 @@ -17,12 +16,11 @@ class GameplayOptionsMenu : public OptionsSubMenuBase Memory::OverwriteVftable(this, SM_VTBL_GAMEPLAY_OPTIONS_MENU_OFFSET); } - virtual ~GameplayOptionsMenu() = default; - void restoreDefaults() override { /* implemented by the game */ } + SDK_PUB virtual ~GameplayOptionsMenu() = default; + SDK_PUB void restoreDefaults() override { /* implemented by the game */ } #if _SM_VERSION_NUM >= 070771 -private: - char m_someData[16]; + SDK_PRI char m_someData[16]; #endif }; // Size: 0x168 diff --git a/include/SmSdk/Gui/GraphicsOptionsMenu.hpp b/include/SmSdk/Gui/GraphicsOptionsMenu.hpp index a9a8c92..37e88ea 100644 --- a/include/SmSdk/Gui/GraphicsOptionsMenu.hpp +++ b/include/SmSdk/Gui/GraphicsOptionsMenu.hpp @@ -1,8 +1,9 @@ #pragma once #include "SmSdk/Gui/OptionsSubMenuBase.hpp" - #include "SmSdk/Util/Memory.hpp" + +#include "SmSdk/mygui_include.hpp" #include "SmSdk/offsets.hpp" #include @@ -22,22 +23,20 @@ class GraphicsOptionsMenu : public OptionsSubMenuBase virtual ~GraphicsOptionsMenu() = default; void restoreDefaults() override { /* implemented by the game */ } -private: - /* 0x0168 */ MyGUI::Button* m_pSomeButton; -public: - /* 0x0170 */ std::shared_ptr m_pShaderQualityDropdown; - /* 0x0180 */ std::shared_ptr m_pReflectionQualityDropdown; - /* 0x0190 */ std::shared_ptr m_pShadowResolutionDropdown; - /* 0x01A0 */ std::shared_ptr m_pShadowQualityDropdown; - /* 0x01B0 */ std::shared_ptr m_pSsaoDropdown; - /* 0x01C0 */ std::shared_ptr m_pFoliageDropdown; - /* 0x01D0 */ std::shared_ptr m_pTextureQualityDropdown; - /* 0x01E0 */ std::shared_ptr m_pDrawDistanceDropdown; - /* 0x01F0 */ std::shared_ptr m_pTexFilteringDropdown; - /* 0x0200 */ std::shared_ptr m_pParticleQualityDropdown; - /* 0x0210 */ std::vector m_vecQualityLevelLabels; -private: - /* 0x0228 */ char pad_0x228[0x20]; + + /* 0x0168 */ SDK_PRI MyGUI::Button* m_pSomeButton; + /* 0x0170 */ SDK_PUB std::shared_ptr m_pShaderQualityDropdown; + /* 0x0180 */ SDK_PUB std::shared_ptr m_pReflectionQualityDropdown; + /* 0x0190 */ SDK_PUB std::shared_ptr m_pShadowResolutionDropdown; + /* 0x01A0 */ SDK_PUB std::shared_ptr m_pShadowQualityDropdown; + /* 0x01B0 */ SDK_PUB std::shared_ptr m_pSsaoDropdown; + /* 0x01C0 */ SDK_PUB std::shared_ptr m_pFoliageDropdown; + /* 0x01D0 */ SDK_PUB std::shared_ptr m_pTextureQualityDropdown; + /* 0x01E0 */ SDK_PUB std::shared_ptr m_pDrawDistanceDropdown; + /* 0x01F0 */ SDK_PUB std::shared_ptr m_pTexFilteringDropdown; + /* 0x0200 */ SDK_PUB std::shared_ptr m_pParticleQualityDropdown; + /* 0x0210 */ SDK_PUB std::vector m_vecQualityLevelLabels; + /* 0x0228 */ SDK_PRI char pad_0x228[0x20]; }; // Size: 0x248 static_assert(offsetof(GraphicsOptionsMenu, GraphicsOptionsMenu::m_pShaderQualityDropdown) == 0x170, "GraphicsOptionsMenu::m_pShaderQualityDropdown: Incorrect offset"); diff --git a/include/SmSdk/Gui/GuiBase.hpp b/include/SmSdk/Gui/GuiBase.hpp index 0181344..a4bd94b 100644 --- a/include/SmSdk/Gui/GuiBase.hpp +++ b/include/SmSdk/Gui/GuiBase.hpp @@ -9,14 +9,13 @@ SMSDK_BEGIN_NAMESPACE class GuiBase { -public: - virtual ~GuiBase() = default; - - virtual void initialize() { /* implemented by the game */ } - virtual void destroyWidgets() { /* implemented by the game */ } - virtual void open() { /* implemented by the game */ } - virtual void close() { /* implemented by the game */ } - virtual bool isActive() + SDK_PUB virtual ~GuiBase() = default; + + SDK_PUB virtual void initialize() { /* implemented by the game */ } + SDK_PUB virtual void destroyWidgets() { /* implemented by the game */ } + SDK_PUB virtual void open() { /* implemented by the game */ } + SDK_PUB virtual void close() { /* implemented by the game */ } + SDK_PUB virtual bool isActive() #if defined(SMSDK_ENABLE_MYGUI) { return m_pMainPanel && m_pMainPanel->getVisible(); @@ -27,10 +26,10 @@ class GuiBase } #endif - virtual void setFocus(const std::string& widget) { SMSDK_UNREF(widget); /* implemented by the game */ } + SDK_PUB virtual void setFocus(const std::string& widget) { SMSDK_UNREF(widget); /* implemented by the game */ } - /* 0x0008 */ MyGUI::Widget* m_pMainPanel; - /* 0x0010 */ GuiInterface* m_pGuiInterface; + /* 0x0008 */ SDK_PUB MyGUI::Widget* m_pMainPanel; + /* 0x0010 */ SDK_PUB GuiInterface* m_pGuiInterface; }; // Size: 0x18 static_assert(sizeof(GuiBase) == 0x18, "GuiBase: Incorrect Size"); diff --git a/include/SmSdk/Gui/GuiInterface.hpp b/include/SmSdk/Gui/GuiInterface.hpp index 26d104f..fe5cfc9 100644 --- a/include/SmSdk/Gui/GuiInterface.hpp +++ b/include/SmSdk/Gui/GuiInterface.hpp @@ -15,8 +15,8 @@ class GuiBase; struct GuiDeferredCallback { - /* 0x0000 */ std::string m_identifier; - /* 0x0020 */ std::function m_callback; + /* 0x0000 */ SDK_PUB std::string m_identifier; + /* 0x0020 */ SDK_PUB std::function m_callback; }; // Size: 0x60 static_assert(offsetof(GuiDeferredCallback, GuiDeferredCallback::m_identifier) == 0x0, "GuiDeferredCallback::m_identifier: Incorrect offset"); @@ -26,41 +26,32 @@ static_assert(sizeof(GuiDeferredCallback) == 0x60, "GuiDeferredCallback: Incorre class GuiInterface { -public: - virtual ~GuiInterface() = default; - virtual void open() {} - virtual void close() {} -private: - virtual void func4() {} - virtual void func5(const std::string& str) { SMSDK_UNREF(str); } - virtual void func6(const std::string& str, std::int64_t a3) { SMSDK_UNREF2(str, a3); } - virtual void func7(const std::string& str, const std::string& str2) { SMSDK_UNREF2(str, str2); } - virtual void func8(const std::string& str, const std::string& str2) { SMSDK_UNREF2(str, str2); } - virtual void func9(const std::string& str, const std::string& str2, const Json::Value& json_val) { SMSDK_UNREF3(str, str2, json_val); } - virtual void func10(const std::string& str, const std::string& str2, size_t idx, const Json::Value& json_val) { SMSDK_UNREF4(str, str2, idx, json_val); } - virtual void func11() {} - virtual void func12() {} -public: - virtual void processDeferredCallbacks() {} + SDK_PUB virtual ~GuiInterface() = default; + SDK_PUB virtual void open() {} + SDK_PUB virtual void close() {} + SDK_PRI virtual void func4() {} + SDK_PRI virtual void func5(const std::string& str) { SMSDK_UNREF(str); } + SDK_PRI virtual void func6(const std::string& str, std::int64_t a3) { SMSDK_UNREF2(str, a3); } + SDK_PRI virtual void func7(const std::string& str, const std::string& str2) { SMSDK_UNREF2(str, str2); } + SDK_PRI virtual void func8(const std::string& str, const std::string& str2) { SMSDK_UNREF2(str, str2); } + SDK_PRI virtual void func9(const std::string& str, const std::string& str2, const Json::Value& json_val) { SMSDK_UNREF3(str, str2, json_val); } + SDK_PRI virtual void func10(const std::string& str, const std::string& str2, size_t idx, const Json::Value& json_val) { SMSDK_UNREF4(str, str2, idx, json_val); } + SDK_PRI virtual void func11() {} + SDK_PRI virtual void func12() {} + SDK_PUB virtual void processDeferredCallbacks() {} - /* 0x0008 */ std::shared_ptr m_pGuiBase; -private: - /* 0x0018 */ bool m_bSomeBool; - /* 0x0019 */ char pad_0x19[0x7]; -public: - /* 0x0020 */ std::function m_closeCallback; - /* 0x0060 */ std::unordered_map> m_mapEmptyFunctionCallbacks; - /* 0x00A0 */ std::unordered_map> m_mapOneArgFunctionCallbacks; - /* 0x00E0 */ std::unordered_map> m_mapStringToFunction; -private: - /* 0x0120 */ char pad_0x120[0x80]; -public: - /* 0x01A0 */ std::unordered_map>> m_mapMapCallbackStorage; -private: - /* 0x01E0 */ char pad_0x1E0[0x80]; -public: - /* 0x0260 */ std::deque> m_deferredCallbackDeque; - /* 0x0288 */ std::vector m_vecDeferredCallbacks; + /* 0x0008 */ SDK_PUB std::shared_ptr m_pGuiBase; + /* 0x0018 */ SDK_PRI bool m_bSomeBool; + /* 0x0019 */ SDK_PRI char pad_0x19[0x7]; + /* 0x0020 */ SDK_PUB std::function m_closeCallback; + /* 0x0060 */ SDK_PUB std::unordered_map> m_mapEmptyFunctionCallbacks; + /* 0x00A0 */ SDK_PUB std::unordered_map> m_mapOneArgFunctionCallbacks; + /* 0x00E0 */ SDK_PUB std::unordered_map> m_mapStringToFunction; + /* 0x0120 */ SDK_PRI char pad_0x120[0x80]; + /* 0x01A0 */ SDK_PUB std::unordered_map>> m_mapMapCallbackStorage; + /* 0x01E0 */ SDK_PRI char pad_0x1E0[0x80]; + /* 0x0260 */ SDK_PUB std::deque> m_deferredCallbackDeque; + /* 0x0288 */ SDK_PUB std::vector m_vecDeferredCallbacks; }; // Size: 0x2A0 static_assert(offsetof(GuiInterface, GuiInterface::m_pGuiBase) == 0x8, "GuiInterface::m_pGuiBase: Incorrect offset"); diff --git a/include/SmSdk/Gui/GuiSystemManager.hpp b/include/SmSdk/Gui/GuiSystemManager.hpp index 9cf50b6..9057a52 100644 --- a/include/SmSdk/Gui/GuiSystemManager.hpp +++ b/include/SmSdk/Gui/GuiSystemManager.hpp @@ -13,10 +13,9 @@ SMSDK_BEGIN_NAMESPACE class GuiSystemManager { -public: - static GuiSystemManager* GetInstance(); + SDK_PUB static GuiSystemManager* GetInstance(); - static bool IsMouseVisible() + SDK_PUB static bool IsMouseVisible() { GuiSystemManager* pGuiSystemManager = GuiSystemManager::GetInstance(); if (!pGuiSystemManager) @@ -25,17 +24,17 @@ class GuiSystemManager return pGuiSystemManager->m_bMouseVisible; } - float getOptionItemSize() const + SDK_PUB float getOptionItemSize() const { return float(m_iScreenHeight) * (1.0f / 720.0f); } - float getOptionItemSize2() const + SDK_PUB float getOptionItemSize2() const { return float(m_iScreenHeight) * (1.0f / 1080.0f); } - static int ProcessScroll( + SDK_PRI static int ProcessScroll( int unknownVal, int scrollDistance, int topPos, @@ -53,38 +52,30 @@ class GuiSystemManager return std::min(std::max(-unknownVal, vVal), 0); } -private: - /* 0x0000 */ char pad_0x0[0x18]; -public: - /* 0x0018 */ std::shared_ptr m_pMyGUIDx11Platform; - /* 0x0028 */ std::shared_ptr m_pGui; - /* 0x0038 */ struct CreateTextureCallback* m_pCreateTextureCallback; - /* 0x0040 */ std::shared_ptr m_pCommonGuiAdditions; -private: - /* 0x0050 */ char pad_0x50[0x10]; -public: - /* 0x0060 */ std::vector m_vecFontNames; - /* 0x0078 */ std::vector m_vecFonts; - /* 0x0090 */ std::vector m_vecFontTextures; - /* 0x00A8 */ std::unordered_map m_mapFontNameToTexture; - /* 0x00E8 */ std::int32_t m_iScreenWidth; - /* 0x00EC */ std::int32_t m_iScreenHeight; - /* 0x00F0 */ std::int32_t m_iScreenLeft; - /* 0x00F4 */ std::int32_t m_iScreenTop; - /* 0x00F8 */ std::string m_guiLanguage; -private: - /* 0x0118 */ char pad_0x118[0x28]; -public: - /* 0x0140 */ std::map m_mapPathToTexture; -private: - /* 0x0150 */ char pad_0x150[0x10]; -public: - /* 0x0160 */ std::unordered_map m_mapWidgetNameToPath; - /* 0x01A0 */ std::unordered_map m_mapCursors; - /* 0x01E0 */ bool m_bMouseState; - /* 0x01E1 */ bool m_bMouseVisible; -private: - /* 0x01E2 */ char pad_0x1E2[0x6]; + + /* 0x0000 */ SDK_PRI char pad_0x0[0x18]; + /* 0x0018 */ SDK_PUB std::shared_ptr m_pMyGUIDx11Platform; + /* 0x0028 */ SDK_PUB std::shared_ptr m_pGui; + /* 0x0038 */ SDK_PUB struct CreateTextureCallback* m_pCreateTextureCallback; + /* 0x0040 */ SDK_PUB std::shared_ptr m_pCommonGuiAdditions; + /* 0x0050 */ SDK_PRI char pad_0x50[0x10]; + /* 0x0060 */ SDK_PUB std::vector m_vecFontNames; + /* 0x0078 */ SDK_PUB std::vector m_vecFonts; + /* 0x0090 */ SDK_PUB std::vector m_vecFontTextures; + /* 0x00A8 */ SDK_PUB std::unordered_map m_mapFontNameToTexture; + /* 0x00E8 */ SDK_PUB std::int32_t m_iScreenWidth; + /* 0x00EC */ SDK_PUB std::int32_t m_iScreenHeight; + /* 0x00F0 */ SDK_PUB std::int32_t m_iScreenLeft; + /* 0x00F4 */ SDK_PUB std::int32_t m_iScreenTop; + /* 0x00F8 */ SDK_PUB std::string m_guiLanguage; + /* 0x0118 */ SDK_PRI char pad_0x118[0x28]; + /* 0x0140 */ SDK_PUB std::map m_mapPathToTexture; + /* 0x0150 */ SDK_PRI char pad_0x150[0x10]; + /* 0x0160 */ SDK_PUB std::unordered_map m_mapWidgetNameToPath; + /* 0x01A0 */ SDK_PUB std::unordered_map m_mapCursors; + /* 0x01E0 */ SDK_PUB bool m_bMouseState; + /* 0x01E1 */ SDK_PUB bool m_bMouseVisible; + /* 0x01E2 */ SDK_PRI char pad_0x1E2[0x6]; }; // Size: 0x1E8 static_assert(offsetof(GuiSystemManager, GuiSystemManager::m_pMyGUIDx11Platform) == 0x18, "GuiSystemManager::m_pMyGUIDx11Platform: Incorrect offset"); diff --git a/include/SmSdk/Gui/HudGui2.hpp b/include/SmSdk/Gui/HudGui2.hpp index 8fe67d0..d565699 100644 --- a/include/SmSdk/Gui/HudGui2.hpp +++ b/include/SmSdk/Gui/HudGui2.hpp @@ -9,17 +9,12 @@ SMSDK_BEGIN_NAMESPACE class HudGui2 : public GuiBase { -private: - /* 0x0018 */ char pad_0x18[0x80]; -public: - /* 0x0098 */ std::vector> m_vecInteractionTexts; -private: - /* 0x00B0 */ char pad_0xB0[0x24]; -public: - /* 0x00D4 */ float m_fAlertTextTimer; - /* 0x00D8 */ std::string m_alertText; -private: - /* 0x00F8 */ char pad_0xF8[0x30]; + /* 0x0018 */ SDK_PRI char pad_0x18[0x80]; + /* 0x0098 */ SDK_PUB std::vector> m_vecInteractionTexts; + /* 0x00B0 */ SDK_PRI char pad_0xB0[0x24]; + /* 0x00D4 */ SDK_PUB float m_fAlertTextTimer; + /* 0x00D8 */ SDK_PUB std::string m_alertText; + /* 0x00F8 */ SDK_PRI char pad_0xF8[0x30]; }; // Size: 0x128 static_assert(sizeof(HudGui2) == 0x128, "HudGui2: Incorrect Size"); diff --git a/include/SmSdk/Gui/InGameGuiManager.hpp b/include/SmSdk/Gui/InGameGuiManager.hpp index 3024295..956cb56 100644 --- a/include/SmSdk/Gui/InGameGuiManager.hpp +++ b/include/SmSdk/Gui/InGameGuiManager.hpp @@ -11,12 +11,12 @@ SMSDK_BEGIN_NAMESPACE class InGameGuiManager : public InGameGuiManagerInterface { REMOVE_COPY_CONSTRUCTORS(InGameGuiManager); -public: - virtual ~InGameGuiManager() = default; - static InGameGuiManager* GetInstance(); + SDK_PUB virtual ~InGameGuiManager() = default; - inline void _displayAlertText(const std::string& text, float duration = 4.0f) + SDK_PUB static InGameGuiManager* GetInstance(); + + SDK_PUB inline void _displayAlertText(const std::string& text, float duration = 4.0f) { if (!m_pHudGui) return; @@ -25,7 +25,7 @@ class InGameGuiManager : public InGameGuiManagerInterface m_pHudGui->m_fAlertTextTimer = duration; } - inline void _setInteractionText(const std::vector& vec) + SDK_PUB inline void _setInteractionText(const std::vector& vec) { if (!m_pHudGui) return; @@ -36,7 +36,7 @@ class InGameGuiManager : public InGameGuiManagerInterface m_pHudGui->m_vecInteractionTexts[lastEntry].push_back("\n"); } - inline static void DisplayAlertText(const std::string& text, float duration = 4.0f) + SDK_PUB inline static void DisplayAlertText(const std::string& text, float duration = 4.0f) { InGameGuiManager* pInGameGuiManager = InGameGuiManager::GetInstance(); if (!pInGameGuiManager) @@ -45,7 +45,7 @@ class InGameGuiManager : public InGameGuiManagerInterface pInGameGuiManager->_displayAlertText(text, duration); } - inline static void SetInteractionText(const std::vector& vec) + SDK_PUB inline static void SetInteractionText(const std::vector& vec) { InGameGuiManager* pInGameGuiManager = InGameGuiManager::GetInstance(); if (!pInGameGuiManager) @@ -53,14 +53,12 @@ class InGameGuiManager : public InGameGuiManagerInterface pInGameGuiManager->_setInteractionText(vec); } -private: - /* 0x0008 */ char pad_0x8[0x18]; -public: - /* 0x0020 */ std::shared_ptr m_pHudGui; - /* 0x0030 */ std::shared_ptr m_pInventory; -private: - /* 0x0040 */ char pad_0x40[0x18]; - /* 0x0058 */ char pad_0x58[0x198]; + + /* 0x0008 */ SDK_PRI char pad_0x8[0x18]; + /* 0x0020 */ SDK_PUB std::shared_ptr m_pHudGui; + /* 0x0030 */ SDK_PUB std::shared_ptr m_pInventory; + /* 0x0040 */ SDK_PRI char pad_0x40[0x18]; + /* 0x0058 */ SDK_PRI char pad_0x58[0x198]; }; // Size: 0x1F0 static_assert(sizeof(InGameGuiManager) == 0x1F0, "InGameGuiManager: Incorrect Size"); diff --git a/include/SmSdk/Gui/InGameGuiManagerInterface.hpp b/include/SmSdk/Gui/InGameGuiManagerInterface.hpp index 3aac0c3..883c55f 100644 --- a/include/SmSdk/Gui/InGameGuiManagerInterface.hpp +++ b/include/SmSdk/Gui/InGameGuiManagerInterface.hpp @@ -1,11 +1,12 @@ #pragma once +#include "SmSdk/config.hpp" + SMSDK_BEGIN_NAMESPACE class InGameGuiManagerInterface { -public: - virtual ~InGameGuiManagerInterface() = default; + SDK_PUB virtual ~InGameGuiManagerInterface() = default; }; // Size: 0x8 static_assert(sizeof(InGameGuiManagerInterface) == 0x8, "InGameGuiManagerInterface: Incorrect Size"); diff --git a/include/SmSdk/Gui/InventoryGui.hpp b/include/SmSdk/Gui/InventoryGui.hpp index ea3d9ae..3a21c5a 100644 --- a/include/SmSdk/Gui/InventoryGui.hpp +++ b/include/SmSdk/Gui/InventoryGui.hpp @@ -7,12 +7,9 @@ SMSDK_BEGIN_NAMESPACE struct InventoryGui : public GuiBase { -private: - /* 0x0018 */ char pad_0x18[0x7B0]; -public: - /* 0x07C8 */ MyGUI::IntCoord m_pos; -private: - /* 0x07D8 */ char pad_0x7D8[0x20]; + /* 0x0018 */ SDK_PRI char pad_0x18[0x7B0]; + /* 0x07C8 */ SDK_PUB MyGUI::IntCoord m_pos; + /* 0x07D8 */ SDK_PRI char pad_0x7D8[0x20]; }; // Size: 0x7F8 static_assert(sizeof(InventoryGui) == 0x7F8, "InventoryGui: Incorrect Size"); diff --git a/include/SmSdk/Gui/MainMenuRootGui.hpp b/include/SmSdk/Gui/MainMenuRootGui.hpp index 7f118cf..2677d84 100644 --- a/include/SmSdk/Gui/MainMenuRootGui.hpp +++ b/include/SmSdk/Gui/MainMenuRootGui.hpp @@ -7,23 +7,19 @@ SMSDK_BEGIN_NAMESPACE class MainMenuRootGui : public GuiBase { -private: - /* 0x0018 */ char pad_0x18[0x8]; -public: - /* 0x0020 */ struct MenuState* m_pMenuState; -private: - /* 0x0028 */ char pad_0x28[0x10]; -public: - /* 0x0038 */ std::vector> m_vecCompoundButtons; - /* 0x0050 */ std::vector m_vecGuis; - /* 0x0068 */ GuiBase* m_pCurrentGuiElement; - /* 0x0070 */ struct ChooseGameModeMenu* m_pChooseGameModeMenu; - /* 0x0078 */ struct CreativeModeMenu* m_pCreativeModeMenu; - /* 0x0080 */ struct SurvivalModeMenu* m_pSurvivalModeMenu; - /* 0x0088 */ struct ChallengeModeMenu* m_pChallengeModeMenu; - /* 0x0090 */ struct CustomGameModeMenu* m_pCustomGameModeMenu; - /* 0x0098 */ struct CharacterCustomizationMenu* m_pCharacterCustomizationMenu; - /* 0x00A0 */ class OptionsMenu* m_pOptionsMenu; + /* 0x0018 */ SDK_PRI char pad_0x18[0x8]; + /* 0x0020 */ SDK_PUB struct MenuState* m_pMenuState; + /* 0x0028 */ SDK_PRI char pad_0x28[0x10]; + /* 0x0038 */ SDK_PUB std::vector> m_vecCompoundButtons; + /* 0x0050 */ SDK_PUB std::vector m_vecGuis; + /* 0x0068 */ SDK_PUB GuiBase* m_pCurrentGuiElement; + /* 0x0070 */ SDK_PUB struct ChooseGameModeMenu* m_pChooseGameModeMenu; + /* 0x0078 */ SDK_PUB struct CreativeModeMenu* m_pCreativeModeMenu; + /* 0x0080 */ SDK_PUB struct SurvivalModeMenu* m_pSurvivalModeMenu; + /* 0x0088 */ SDK_PUB struct ChallengeModeMenu* m_pChallengeModeMenu; + /* 0x0090 */ SDK_PUB struct CustomGameModeMenu* m_pCustomGameModeMenu; + /* 0x0098 */ SDK_PUB struct CharacterCustomizationMenu* m_pCharacterCustomizationMenu; + /* 0x00A0 */ SDK_PUB class OptionsMenu* m_pOptionsMenu; }; // Size: 0xA8 static_assert(offsetof(MainMenuRootGui, MainMenuRootGui::m_pMenuState) == 0x20, "MainMenuRootGui::m_pMenuState: Incorrect offset"); diff --git a/include/SmSdk/Gui/OptionsItemBase.hpp b/include/SmSdk/Gui/OptionsItemBase.hpp index 5a23433..650a70d 100644 --- a/include/SmSdk/Gui/OptionsItemBase.hpp +++ b/include/SmSdk/Gui/OptionsItemBase.hpp @@ -6,13 +6,12 @@ SMSDK_BEGIN_NAMESPACE class OptionsItemBase { -public: - virtual ~OptionsItemBase() = default; - OptionsItemBase() : m_pBaseWidget(nullptr) {} + SDK_PUB virtual ~OptionsItemBase() = default; + SDK_PUB OptionsItemBase() : m_pBaseWidget(nullptr) {} - virtual void update() = 0; -public: - /* 0x0008 */ MyGUI::Widget* m_pBaseWidget; + SDK_PUB virtual void update() = 0; + + /* 0x0008 */ SDK_PUB MyGUI::Widget* m_pBaseWidget; }; // Size: 0x10 static_assert(offsetof(OptionsItemBase, OptionsItemBase::m_pBaseWidget) == 0x8, "OptionsItemBase::m_pBaseWidget: Incorrect offset"); diff --git a/include/SmSdk/Gui/OptionsItemSlider.hpp b/include/SmSdk/Gui/OptionsItemSlider.hpp index 1a37969..ea77f5c 100644 --- a/include/SmSdk/Gui/OptionsItemSlider.hpp +++ b/include/SmSdk/Gui/OptionsItemSlider.hpp @@ -12,29 +12,28 @@ SMSDK_BEGIN_NAMESPACE class OptionsItemSlider : public OptionsItemBase { -public: - virtual ~OptionsItemSlider() = default; + SDK_PUB virtual ~OptionsItemSlider() = default; #if defined(SMSDK_ENABLE_MYGUI) - OptionsItemSlider( + SDK_PUB OptionsItemSlider( MyGUI::Widget* pWidget, const std::string& caption, float fMinValue, float fMaxValue, size_t iScrollRange); - void initializeSlider(MyGUI::Widget* pParent, const std::string& caption); - void updateValueText(); - float getFraction() const; + SDK_PUB void initializeSlider(MyGUI::Widget* pParent, const std::string& caption); + SDK_PUB void updateValueText(); + SDK_PUB float getFraction() const; #endif - void update() override {} -public: - MyGUI::ScrollBar* m_pSlider; - MyGUI::TextBox* m_pValueTextBox; - size_t m_uSteps; - float m_fMinValue; - float m_fMaxValue; + SDK_PUB void update() override {} + + SDK_PUB MyGUI::ScrollBar* m_pSlider; + SDK_PUB MyGUI::TextBox* m_pValueTextBox; + SDK_PUB size_t m_uSteps; + SDK_PUB float m_fMinValue; + SDK_PUB float m_fMaxValue; }; static_assert(offsetof(OptionsItemSlider, OptionsItemSlider::m_pSlider) == 0x10, "OptionsItemSlider::m_pSlider: Incorrect offset"); diff --git a/include/SmSdk/Gui/OptionsMenu.hpp b/include/SmSdk/Gui/OptionsMenu.hpp index d404f0e..0438c90 100644 --- a/include/SmSdk/Gui/OptionsMenu.hpp +++ b/include/SmSdk/Gui/OptionsMenu.hpp @@ -9,19 +9,14 @@ SMSDK_BEGIN_NAMESPACE class OptionsMenu : public GuiBase { -public: - /* 0x0018 */ class MainMenuRootGui* m_pMenuRootGui; -private: - /* 0x0020 */ bool m_bSomeFlag; -public: - /* 0x0021 */ bool m_bIsServer; -private: - /* 0x0022 */ char pad_0x22[0x6]; -public: - /* 0x0028 */ std::shared_ptr m_pCompoundButton; - /* 0x0038 */ std::shared_ptr m_pRadioButtonSet; - /* 0x0048 */ std::shared_ptr m_pCurrentTab; - /* 0x0058 */ std::map> m_mapSubMenus; + /* 0x0018 */ SDK_PUB class MainMenuRootGui* m_pMenuRootGui; + /* 0x0020 */ SDK_PRI bool m_bSomeFlag; + /* 0x0021 */ SDK_PUB bool m_bIsServer; + /* 0x0022 */ SDK_PRI char pad_0x22[0x6]; + /* 0x0028 */ SDK_PUB std::shared_ptr m_pCompoundButton; + /* 0x0038 */ SDK_PUB std::shared_ptr m_pRadioButtonSet; + /* 0x0048 */ SDK_PUB std::shared_ptr m_pCurrentTab; + /* 0x0058 */ SDK_PUB std::map> m_mapSubMenus; }; // Size: 0x68 static_assert(offsetof(OptionsMenu, OptionsMenu::m_pMenuRootGui) == 0x18, "OptionsMenu::m_pMenuRootGui: Incorrect offset"); diff --git a/include/SmSdk/Gui/OptionsSubMenuBase.hpp b/include/SmSdk/Gui/OptionsSubMenuBase.hpp index 739a3a6..a69065a 100644 --- a/include/SmSdk/Gui/OptionsSubMenuBase.hpp +++ b/include/SmSdk/Gui/OptionsSubMenuBase.hpp @@ -14,59 +14,55 @@ SMSDK_BEGIN_NAMESPACE class OptionsSubMenuBase { -public: - static void GameConstructor(OptionsSubMenuBase* self) + SDK_PUB static void GameConstructor(OptionsSubMenuBase* self) { using fSubMenuBaseConstructor = void (*)(OptionsSubMenuBase*); Memory::Read(SM_CONSTRUCTOR_OPTIONS_SUB_MENU_BASE_OFFSET)(self); } #if defined(SMSDK_ENABLE_MYGUI) - OptionsSubMenuBase(); + SDK_PUB OptionsSubMenuBase(); #endif - virtual ~OptionsSubMenuBase() = default; + SDK_PUB virtual ~OptionsSubMenuBase() = default; #if defined(SMSDK_ENABLE_MYGUI) - void onScrollChangePos(MyGUI::ScrollBar* pCaller, size_t iPos); - void onScroll(MyGUI::Widget* pCaller, int iScrollVal); - void updateScrollArea(); - void updateScrollAreaAndScrollBar(); + SDK_PUB void onScrollChangePos(MyGUI::ScrollBar* pCaller, size_t iPos); + SDK_PUB void onScroll(MyGUI::Widget* pCaller, int iScrollVal); + SDK_PUB void updateScrollArea(); + SDK_PUB void updateScrollAreaAndScrollBar(); //Does not update the scroll bar - void clearSilent(); - void clear(); + SDK_PUB void clearSilent(); + SDK_PUB void clear(); #endif - virtual void initialize(MyGUI::Widget* pParent) DEFAULT_IMPL_UNREF(pParent); + SDK_PUB virtual void initialize(MyGUI::Widget* pParent) DEFAULT_IMPL_UNREF(pParent); - virtual void cleanOptionItems() DEFAULT_IMPL(); - virtual void openMenu() DEFAULT_IMPL(); - virtual void closeMenu() DEFAULT_IMPL(); + SDK_PUB virtual void cleanOptionItems() DEFAULT_IMPL(); + SDK_PUB virtual void openMenu() DEFAULT_IMPL(); + SDK_PUB virtual void closeMenu() DEFAULT_IMPL(); + + SDK_PUB virtual void onUpdate() {} + + SDK_PRI virtual bool someFunc2() { return 0; } + SDK_PRI virtual bool someFunc3() { return 0; } + SDK_PUB virtual void restoreDefaults() = 0; - virtual void onUpdate() {} -private: - virtual bool someFunc2() { return 0; } - virtual bool someFunc3() { return 0; } -public: - virtual void restoreDefaults() = 0; -private: #if _SM_VERSION_NUM >= 070771 - virtual void someFunc5() {} + SDK_PRI virtual void someFunc5() {} #endif - virtual void someFunc4() {} -public: - /* 0x0008 */ MyGUI::Widget* m_pSubMenuWidget; - /* 0x0010 */ MyGUI::Widget* m_pContainerHostPanel; - /* 0x0018 */ MyGUI::Widget* m_pContainer; - /* 0x0020 */ MyGUI::ScrollBar* m_pScrollBar; - /* 0x0028 */ MyGUI::IntSize m_itemSize; - /* 0x0030 */ VerticalStackBox m_leftStackBox; - /* 0x00B8 */ VerticalStackBox m_rightStackBox; - /* 0x0140 */ std::vector> m_vecOptionItems; - /* 0x0158 */ std::int32_t m_iScrollValue; - /* 0x015C */ MyGUI::IntPoint m_containerPos; -private: - /* 0x0164 */ char pad_0x164[0x4]; + SDK_PRI virtual void someFunc4() {} + /* 0x0008 */ SDK_PUB MyGUI::Widget* m_pSubMenuWidget; + /* 0x0010 */ SDK_PUB MyGUI::Widget* m_pContainerHostPanel; + /* 0x0018 */ SDK_PUB MyGUI::Widget* m_pContainer; + /* 0x0020 */ SDK_PUB MyGUI::ScrollBar* m_pScrollBar; + /* 0x0028 */ SDK_PUB MyGUI::IntSize m_itemSize; + /* 0x0030 */ SDK_PUB VerticalStackBox m_leftStackBox; + /* 0x00B8 */ SDK_PUB VerticalStackBox m_rightStackBox; + /* 0x0140 */ SDK_PUB std::vector> m_vecOptionItems; + /* 0x0158 */ SDK_PUB std::int32_t m_iScrollValue; + /* 0x015C */ SDK_PUB MyGUI::IntPoint m_containerPos; + /* 0x0164 */ SDK_PRI char pad_0x164[0x4]; }; // Size: 0x168 static_assert(offsetof(OptionsSubMenuBase, OptionsSubMenuBase::m_pSubMenuWidget) == 0x8, "OptionsSubMenuBase::m_pSubMenuWidget: Incorrect offset"); diff --git a/include/SmSdk/Gui/PaintToolGui.hpp b/include/SmSdk/Gui/PaintToolGui.hpp index d4476b4..fbe89bf 100644 --- a/include/SmSdk/Gui/PaintToolGui.hpp +++ b/include/SmSdk/Gui/PaintToolGui.hpp @@ -1,13 +1,13 @@ #pragma once +#include "SmSdk/mygui_include.hpp" #include "SmSdk/Gui/GuiBase.hpp" SMSDK_BEGIN_NAMESPACE class PaintToolGui : public GuiBase { -public: - /* 0x0018 */ MyGUI::ItemBox* m_pItemBox; + /* 0x0018 */ SDK_PUB MyGUI::ItemBox* m_pItemBox; }; // Size: 0x20 static_assert(sizeof(PaintToolGui) == 0x20, "PaintToolGui: Incorrect Size"); diff --git a/include/SmSdk/Gui/RadioButtonSet.hpp b/include/SmSdk/Gui/RadioButtonSet.hpp index 06fe636..405ad36 100644 --- a/include/SmSdk/Gui/RadioButtonSet.hpp +++ b/include/SmSdk/Gui/RadioButtonSet.hpp @@ -1,9 +1,9 @@ #pragma once #include "SmSdk/Util/Memory.hpp" -#include "SmSdk/offsets.hpp" -#include +#include "SmSdk/mygui_include.hpp" +#include "SmSdk/offsets.hpp" #include #include @@ -12,17 +12,15 @@ SMSDK_BEGIN_NAMESPACE class RadioButtonSet { -public: - RadioButtonSet(const std::vector& buttons) + SDK_PUB RadioButtonSet(const std::vector& buttons) { - using fSelfConstructor = void (*)(RadioButtonSet*, - const std::function&, const std::vector&); + using fSelfConstructor = void (*)(RadioButtonSet*, const std::function&, const std::vector&); Memory::Read(SM_CONSTRUCTOR_RADIO_BUTTON_SET_OFFSET)( this, [](MyGUI::Widget*) -> void {}, buttons); } -private: - /* 0x0000 */ char pad_0x0[0x60]; + + /* 0x0000 */ SDK_PRI char pad_0x0[0x60]; }; // Size: 0x60 static_assert(sizeof(RadioButtonSet) == 0x60, "RadioButtonSet: Incorrect Size"); diff --git a/include/SmSdk/Gui/VerticalStackBox.hpp b/include/SmSdk/Gui/VerticalStackBox.hpp index 990514c..7a8c9e8 100644 --- a/include/SmSdk/Gui/VerticalStackBox.hpp +++ b/include/SmSdk/Gui/VerticalStackBox.hpp @@ -1,47 +1,42 @@ #pragma once #include "SmSdk/mygui_include.hpp" +#include "SmSdk/config.hpp" SMSDK_BEGIN_NAMESPACE class VerticalStackBox { -public: #if defined(SMSDK_ENABLE_MYGUI) - VerticalStackBox(MyGUI::IntSize item_sz); - - void onParentChangeCoord(MyGUI::Widget* pCaller); - void onPanelScroll(MyGUI::Widget* pCaller, int iScrollVal); - void onScrollbarChangePosition(MyGUI::ScrollBar* pCaller, size_t uPos); - void initialize(MyGUI::Widget* pParent, MyGUI::ScrollBar* pScrollBar); - - void onItemChangeCoord(MyGUI::Widget* pCaller); - void onItemScroll(MyGUI::Widget* pCaller, int iScrollVal); - void updateScrollBar(); - MyGUI::Widget* createNewOption(); - void clearItems(); + SDK_PUB VerticalStackBox(MyGUI::IntSize item_sz); + + SDK_PUB void onParentChangeCoord(MyGUI::Widget* pCaller); + SDK_PUB void onPanelScroll(MyGUI::Widget* pCaller, int iScrollVal); + SDK_PUB void onScrollbarChangePosition(MyGUI::ScrollBar* pCaller, size_t uPos); + SDK_PUB void initialize(MyGUI::Widget* pParent, MyGUI::ScrollBar* pScrollBar); + + SDK_PUB void onItemChangeCoord(MyGUI::Widget* pCaller); + SDK_PUB void onItemScroll(MyGUI::Widget* pCaller, int iScrollVal); + SDK_PUB void updateScrollBar(); + SDK_PUB MyGUI::Widget* createNewOption(); + SDK_PUB void clearItems(); #endif -public: - /* 0x0000 */ MyGUI::IntSize m_itemSize; - /* 0x0008 */ std::string m_skin; - /* 0x0028 */ MyGUI::Widget* m_pParent; - /* 0x0030 */ MyGUI::Widget* m_pEmptyPanel; - /* 0x0038 */ MyGUI::ScrollBar* m_pScrollBar; - /* 0x0040 */ bool m_bEnableSeparators; -private: - /* 0x0041 */ char pad_0x41[0x3]; -private: - /* 0x0044 */ std::int32_t m_iSomeVal3; - /* 0x0048 */ std::int32_t m_iSomeVal4; -public: - /* 0x004C */ std::int32_t m_iScrollDistance; - /* 0x0050 */ std::int32_t m_iScrollValue; -private: - /* 0x0054 */ std::int32_t m_iSomeVal7; -public: - /* 0x0058 */ MyGUI::IntPoint m_panelPos; - /* 0x0060 */ std::vector m_vecWidgets; - /* 0x0078 */ MyGUI::Colour m_separatorColor; + + /* 0x0000 */ SDK_PUB MyGUI::IntSize m_itemSize; + /* 0x0008 */ SDK_PUB std::string m_skin; + /* 0x0028 */ SDK_PUB MyGUI::Widget* m_pParent; + /* 0x0030 */ SDK_PUB MyGUI::Widget* m_pEmptyPanel; + /* 0x0038 */ SDK_PUB MyGUI::ScrollBar* m_pScrollBar; + /* 0x0040 */ SDK_PUB bool m_bEnableSeparators; + /* 0x0041 */ SDK_PRI char pad_0x41[0x3]; + /* 0x0044 */ SDK_PRI std::int32_t m_iSomeVal3; + /* 0x0048 */ SDK_PRI std::int32_t m_iSomeVal4; + /* 0x004C */ SDK_PUB std::int32_t m_iScrollDistance; + /* 0x0050 */ SDK_PUB std::int32_t m_iScrollValue; + /* 0x0054 */ SDK_PRI std::int32_t m_iSomeVal7; + /* 0x0058 */ SDK_PUB MyGUI::IntPoint m_panelPos; + /* 0x0060 */ SDK_PUB std::vector m_vecWidgets; + /* 0x0078 */ SDK_PUB MyGUI::Colour m_separatorColor; }; // Size: 0x88 static_assert(offsetof(VerticalStackBox, VerticalStackBox::m_itemSize) == 0x0, "VerticalStackBox::m_itemSize: Incorrect offset"); diff --git a/include/SmSdk/Harvestable/Harvestable.hpp b/include/SmSdk/Harvestable/Harvestable.hpp index 66d0458..decfe62 100644 --- a/include/SmSdk/Harvestable/Harvestable.hpp +++ b/include/SmSdk/Harvestable/Harvestable.hpp @@ -9,40 +9,27 @@ SMSDK_BEGIN_NAMESPACE struct Harvestable : public NetObj { -private: - /* 0x0028 */ char pad_0x28[0x8]; -public: - /* 0x0030 */ bool m_bPoseWeightUpdateFlag; - /* 0x0031 */ bool m_bColorUpdateFlag; - /* 0x0032 */ bool m_bUVUpdateFlag; - /* 0x0033 */ bool m_bTransformUpdateFlag; -private: - /* 0x0034 */ char pad_0x34[0x4]; -public: - /* 0x0038 */ std::shared_ptr m_pHarvestableData; - /* 0x0048 */ std::int16_t m_iWorldId; - /* 0x004A */ boost::uuids::uuid m_uuid; -private: - /* 0x005A */ char pad_0x5A[0x1E]; -public: - /* 0x0078 */ DirectX::XMFLOAT3 m_position; - /* 0x0084 */ DirectX::XMFLOAT4 m_rotation; - /* 0x0094 */ DirectX::XMFLOAT3 m_scale; -private: - /* 0x00A0 */ char pad_0xA0[0x4]; -public: - /* 0x00A4 */ bool m_bKinematic; -private: - /* 0x00A5 */ char pad_0xA5[0x12B]; -public: - /* 0x01D0 */ float m_fPoseWeights[3]; -private: - /* 0x01DC */ char pad_0x1DC[0xC]; -public: - /* 0x01E8 */ DirectX::XMFLOAT4 m_color; - /* 0x01F8 */ std::int8_t m_iUVFrameIndex; -private: - /* 0x01F9 */ char pad_0x1F9[0x37]; + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; + /* 0x0030 */ SDK_PUB bool m_bPoseWeightUpdateFlag; + /* 0x0031 */ SDK_PUB bool m_bColorUpdateFlag; + /* 0x0032 */ SDK_PUB bool m_bUVUpdateFlag; + /* 0x0033 */ SDK_PUB bool m_bTransformUpdateFlag; + /* 0x0034 */ SDK_PRI char pad_0x34[0x4]; + /* 0x0038 */ SDK_PUB std::shared_ptr m_pHarvestableData; + /* 0x0048 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x004A */ SDK_PUB boost::uuids::uuid m_uuid; + /* 0x005A */ SDK_PRI char pad_0x5A[0x1E]; + /* 0x0078 */ SDK_PUB DirectX::XMFLOAT3 m_position; + /* 0x0084 */ SDK_PUB DirectX::XMFLOAT4 m_rotation; + /* 0x0094 */ SDK_PUB DirectX::XMFLOAT3 m_scale; + /* 0x00A0 */ SDK_PRI char pad_0xA0[0x4]; + /* 0x00A4 */ SDK_PUB bool m_bKinematic; + /* 0x00A5 */ SDK_PRI char pad_0xA5[0x12B]; + /* 0x01D0 */ SDK_PUB float m_fPoseWeights[3]; + /* 0x01DC */ SDK_PRI char pad_0x1DC[0xC]; + /* 0x01E8 */ SDK_PUB DirectX::XMFLOAT4 m_color; + /* 0x01F8 */ SDK_PUB std::int8_t m_iUVFrameIndex; + /* 0x01F9 */ SDK_PRI char pad_0x1F9[0x37]; }; // Size: 0x230 static_assert(sizeof(Harvestable) == 0x230, "Harvestable: Incorrect Size"); diff --git a/include/SmSdk/Harvestable/HarvestableManager.hpp b/include/SmSdk/Harvestable/HarvestableManager.hpp index a872dde..e2458db 100644 --- a/include/SmSdk/Harvestable/HarvestableManager.hpp +++ b/include/SmSdk/Harvestable/HarvestableManager.hpp @@ -11,40 +11,36 @@ SMSDK_BEGIN_NAMESPACE class HarvestableManager { REMOVE_COPY_CONSTRUCTORS(HarvestableManager); -public: - virtual ~HarvestableManager() = default; - static HarvestableManager* GetInstance(); + SDK_PUB virtual ~HarvestableManager() = default; - inline Harvestable* _getHarvestable(int iHarvestableIdx) + SDK_PUB static HarvestableManager* GetInstance(); + + SDK_PUB inline Harvestable* _getHarvestable(const std::uint32_t uHvsIdx) { - auto iter = this->m_mapHarvestables.find(iHarvestableIdx); - if (iter == this->m_mapHarvestables.end()) + auto iter = m_mapHarvestables.find(uHvsIdx); + if (iter == m_mapHarvestables.end()) return nullptr; return iter->second.get(); } - inline static Harvestable* GetHarvestable(int iHarvestableIdx) + SDK_PUB inline static Harvestable* GetHarvestable(const std::uint32_t uHvsIdx) { HarvestableManager* pHarvestableManager = HarvestableManager::GetInstance(); if (!pHarvestableManager) return nullptr; - return pHarvestableManager->_getHarvestable(iHarvestableIdx); + return pHarvestableManager->_getHarvestable(uHvsIdx); } -private: - /* 0x0008 */ char pad_0x8[0x8]; -public: - /* 0x0010 */ std::unordered_map> m_mapHarvestables; -private: - /* 0x0050 */ char pad_0x50[0x50]; -public: - /* 0x00A0 */ std::unordered_map m_mapHarvestableCollisions; - /* 0x00E0 */ std::unordered_map> m_mapHarvestableData; - /* 0x0120 */ std::shared_ptr m_pHarvestableData; -private: - /* 0x0130 */ char pad_0x130[0x70]; + + /* 0x0008 */ SDK_PRI char pad_0x8[0x8]; + /* 0x0010 */ SDK_PUB std::unordered_map> m_mapHarvestables; + /* 0x0050 */ SDK_PRI char pad_0x50[0x50]; + /* 0x00A0 */ SDK_PUB std::unordered_map m_mapHarvestableCollisions; + /* 0x00E0 */ SDK_PUB std::unordered_map> m_mapHarvestableData; + /* 0x0120 */ SDK_PUB std::shared_ptr m_pHarvestableData; + /* 0x0130 */ SDK_PRI char pad_0x130[0x70]; }; // Size: 0x1A0 static_assert(sizeof(HarvestableManager) == 0x1A0, "HarvestableManager: Incorrect Size"); diff --git a/include/SmSdk/Harvestable/HarvestablePhysicsProxy.hpp b/include/SmSdk/Harvestable/HarvestablePhysicsProxy.hpp index bb0f8f6..12d9d23 100644 --- a/include/SmSdk/Harvestable/HarvestablePhysicsProxy.hpp +++ b/include/SmSdk/Harvestable/HarvestablePhysicsProxy.hpp @@ -1,15 +1,14 @@ #pragma once #include "SmSdk/Physics/PhysicsProxy.hpp" +#include "SmSdk/config.hpp" SMSDK_BEGIN_NAMESPACE class HarvestablePhysicsProxy : public PhysicsProxy { -public: - /* 0x0030 */ std::int32_t m_iHarvestableId; -private: - /* 0x0034 */ char pad_0x34[0x8C]; + /* 0x0030 */ SDK_PUB std::int32_t m_iHarvestableId; + /* 0x0034 */ SDK_PRI char pad_0x34[0x8C]; }; // Size: 0xC0 static_assert(sizeof(HarvestablePhysicsProxy) == 0xC0, "HarvestablePhysicsProxy: Incorrect Size"); diff --git a/include/SmSdk/InputManager.hpp b/include/SmSdk/InputManager.hpp index 9918fef..09b9db3 100644 --- a/include/SmSdk/InputManager.hpp +++ b/include/SmSdk/InputManager.hpp @@ -34,22 +34,19 @@ enum EInputEventType : uint32_t struct MouseData { - /* 0x0000 */ std::int32_t m_x; - /* 0x0004 */ std::int32_t m_y; - /* 0x0008 */ std::int32_t m_scroll; + /* 0x0000 */ SDK_PUB std::int32_t m_x; + /* 0x0004 */ SDK_PUB std::int32_t m_y; + /* 0x0008 */ SDK_PUB std::int32_t m_scroll; }; // Size: 0xC static_assert(sizeof(MouseData) == 0xC, "MouseData: Incorrect Size"); struct InputEvent { - /* 0x0000 */ EInputEventType m_eventType; -private: - /* 0x0004 */ char pad_0x4[0x4]; -public: - /* 0x0008 */ std::wstring m_someName; -private: - /* 0x0028 */ char pad_0x28[0x18]; + /* 0x0000 */ SDK_PUB EInputEventType m_eventType; + /* 0x0004 */ SDK_PRI char pad_0x4[0x4]; + /* 0x0008 */ SDK_PUB std::wstring m_someName; + /* 0x0028 */ SDK_PRI char pad_0x28[0x18]; }; // Size: 0x40 static_assert(sizeof(InputEvent) == 0x40, "InputEvent: Incorrect Size"); @@ -57,30 +54,30 @@ static_assert(sizeof(InputEvent) == 0x40, "InputEvent: Incorrect Size"); class InputManager { REMOVE_COPY_CONSTRUCTORS(InputManager); -public: - static InputManager* GetInstance(); - inline bool _isKeyPressed(char cKey) const + SDK_PUB static InputManager* GetInstance(); + + SDK_PUB inline bool _isKeyPressed(char cKey) const { return m_eKeyStates[cKey] == EKeyState_Press; } - inline bool _isKeyHeld(char cKey) const + SDK_PUB inline bool _isKeyHeld(char cKey) const { return m_eKeyStates[cKey] == EKeyState_Hold; } - inline bool _isMouseButtonPressed(EMouseButton eBtn) const + SDK_PUB inline bool _isMouseButtonPressed(EMouseButton eBtn) const { return m_eMouseBtnStates[eBtn] == EKeyState_Press; } - inline bool _isMouseButtonHeld(EMouseButton eBtn) const + SDK_PUB inline bool _isMouseButtonHeld(EMouseButton eBtn) const { return m_eMouseBtnStates[eBtn] == EKeyState_Hold; } - inline static bool IsKeyPressed(char cKey) + SDK_PUB inline static bool IsKeyPressed(char cKey) { InputManager* pInputManager = InputManager::GetInstance(); if (!pInputManager) @@ -89,7 +86,7 @@ class InputManager return pInputManager->_isKeyPressed(cKey); } - inline static bool IsKeyHeld(char cKey) + SDK_PUB inline static bool IsKeyHeld(char cKey) { InputManager* pInputManager = InputManager::GetInstance(); if (!pInputManager) @@ -98,7 +95,7 @@ class InputManager return pInputManager->_isKeyHeld(cKey); } - inline static bool IsMouseButtonPressed(EMouseButton eBtn) + SDK_PUB inline static bool IsMouseButtonPressed(EMouseButton eBtn) { InputManager* pInputManager = InputManager::GetInstance(); if (!pInputManager) @@ -107,7 +104,7 @@ class InputManager return pInputManager->_isMouseButtonPressed(eBtn); } - inline static bool IsMouseButtonHeld(EMouseButton eBtn) + SDK_PUB inline static bool IsMouseButtonHeld(EMouseButton eBtn) { InputManager* pInputManager = InputManager::GetInstance(); if (!pInputManager) @@ -116,7 +113,7 @@ class InputManager return pInputManager->_isMouseButtonHeld(eBtn); } - inline static std::int32_t GetMouseScrollDelta() + SDK_PUB inline static std::int32_t GetMouseScrollDelta() { InputManager* pInputManager = InputManager::GetInstance(); if (!pInputManager) @@ -124,36 +121,26 @@ class InputManager return pInputManager->m_deltaMouseData.m_scroll; } -private: - /* 0x0000 */ char pad_0x0[0xC]; -public: - /* 0x000C */ std::int32_t m_iCharacterCode; -private: - /* 0x0010 */ char pad_0x10[0x18]; -public: - /* 0x0028 */ struct Contraption* m_pContraption; - /* 0x0030 */ MouseData m_currentMouseData; - /* 0x003C */ MouseData m_prevMouseData; - /* 0x0048 */ MouseData m_deltaMouseData; - /* 0x0054 */ bool m_bKeyPressStates[256]; - /* 0x0154 */ bool m_bPrevKeyPressStates[256]; - /* 0x0254 */ EKeyState m_eKeyStates[256]; - /* 0x0654 */ bool m_bMouseBtnPressStates[5]; - /* 0x0659 */ bool m_bMousePrevBtnPressStates[5]; -private: - /* 0x065E */ char pad_0x65E[0x2]; -public: - /* 0x0660 */ EMouseButton m_eMouseBtnStates[5]; -private: - /* 0x0674 */ char pad_0x674[0x4]; -public: - /* 0x0678 */ std::deque m_deqInputQueue; -private: - /* 0x06A0 */ char pad_0x6A0[0x4]; -public: - /* 0x06A4 */ float m_fCrashTimer; -private: - /* 0x06A8 */ char pad_0x6A8[0x8]; + + /* 0x0000 */ SDK_PRI char pad_0x0[0xC]; + /* 0x000C */ SDK_PUB std::int32_t m_iCharacterCode; + /* 0x0010 */ SDK_PRI char pad_0x10[0x18]; + /* 0x0028 */ SDK_PUB struct Contraption* m_pContraption; + /* 0x0030 */ SDK_PUB MouseData m_currentMouseData; + /* 0x003C */ SDK_PUB MouseData m_prevMouseData; + /* 0x0048 */ SDK_PUB MouseData m_deltaMouseData; + /* 0x0054 */ SDK_PUB bool m_bKeyPressStates[256]; + /* 0x0154 */ SDK_PUB bool m_bPrevKeyPressStates[256]; + /* 0x0254 */ SDK_PUB EKeyState m_eKeyStates[256]; + /* 0x0654 */ SDK_PUB bool m_bMouseBtnPressStates[5]; + /* 0x0659 */ SDK_PUB bool m_bMousePrevBtnPressStates[5]; + /* 0x065E */ SDK_PRI char pad_0x65E[0x2]; + /* 0x0660 */ SDK_PUB EMouseButton m_eMouseBtnStates[5]; + /* 0x0674 */ SDK_PRI char pad_0x674[0x4]; + /* 0x0678 */ SDK_PUB std::deque m_deqInputQueue; + /* 0x06A0 */ SDK_PRI char pad_0x6A0[0x4]; + /* 0x06A4 */ SDK_PUB float m_fCrashTimer; + /* 0x06A8 */ SDK_PRI char pad_0x6A8[0x8]; }; // Size: 0x6B0 static_assert(sizeof(InputManager) == 0x6B0, "InputManager: Incorrect Size"); diff --git a/include/SmSdk/MyPlayer.hpp b/include/SmSdk/MyPlayer.hpp index 14aa27a..14b9979 100644 --- a/include/SmSdk/MyPlayer.hpp +++ b/include/SmSdk/MyPlayer.hpp @@ -15,43 +15,39 @@ SMSDK_BEGIN_NAMESPACE struct PlayerCamera { - /* 0x0000 */ DirectX::XMFLOAT3 cam_character_pos; - /* 0x000C */ DirectX::XMFLOAT3 some_vector; - /* 0x0018 */ DirectX::XMFLOAT3 position; - /* 0x0024 */ DirectX::XMFLOAT3 direction; - /* 0x0030 */ DirectX::XMFLOAT3 up; - /* 0x003C */ DirectX::XMFLOAT3 some_vector2; - /* 0x0048 */ DirectX::XMFLOAT4 some_quat; - /* 0x0058 */ float up_offset; - /* 0x005C */ float pullback; - /* 0x0060 */ float fov; - /* 0x0064 */ float shake; + /* 0x0000 */ SDK_PUB DirectX::XMFLOAT3 cam_character_pos; + /* 0x000C */ SDK_PUB DirectX::XMFLOAT3 some_vector; + /* 0x0018 */ SDK_PUB DirectX::XMFLOAT3 position; + /* 0x0024 */ SDK_PUB DirectX::XMFLOAT3 direction; + /* 0x0030 */ SDK_PUB DirectX::XMFLOAT3 up; + /* 0x003C */ SDK_PUB DirectX::XMFLOAT3 some_vector2; + /* 0x0048 */ SDK_PUB DirectX::XMFLOAT4 some_quat; + /* 0x0058 */ SDK_PUB float up_offset; + /* 0x005C */ SDK_PUB float pullback; + /* 0x0060 */ SDK_PUB float fov; + /* 0x0064 */ SDK_PUB float shake; }; // Size: 0x68 static_assert(sizeof(PlayerCamera) == 0x68, "PlayerCamera: Incorrect Size"); class Viewer : public Aligned16Base { -public: - virtual ~Viewer() = default; - - /* 0x0010 */ bool going_forwards; - /* 0x0011 */ bool going_backwards; - /* 0x0012 */ bool going_left; - /* 0x0013 */ bool going_right; -private: - /* 0x0014 */ char pad_0x14[0x4]; -public: - /* 0x0018 */ double yaw; - /* 0x0020 */ double pitch; - /* 0x0028 */ double delta_yaw; - /* 0x0030 */ double delta_pitch; - /* 0x0038 */ double yaw_no_clamp; - /* 0x0040 */ double pitch_no_clamp; - /* 0x0048 */ double delta_yaw2; - /* 0x0050 */ double delta_pitch2; -private: - /* 0x0058 */ char pad_0x58[0x8]; + SDK_PUB virtual ~Viewer() = default; + + /* 0x0010 */ SDK_PUB bool going_forwards; + /* 0x0011 */ SDK_PUB bool going_backwards; + /* 0x0012 */ SDK_PUB bool going_left; + /* 0x0013 */ SDK_PUB bool going_right; + /* 0x0014 */ SDK_PRI char pad_0x14[0x4]; + /* 0x0018 */ SDK_PUB double yaw; + /* 0x0020 */ SDK_PUB double pitch; + /* 0x0028 */ SDK_PUB double delta_yaw; + /* 0x0030 */ SDK_PUB double delta_pitch; + /* 0x0038 */ SDK_PUB double yaw_no_clamp; + /* 0x0040 */ SDK_PUB double pitch_no_clamp; + /* 0x0048 */ SDK_PUB double delta_yaw2; + /* 0x0050 */ SDK_PUB double delta_pitch2; + /* 0x0058 */ SDK_PRI char pad_0x58[0x8]; }; // Size: 0x60 static_assert(sizeof(Viewer) == 0x60, "Viewer: Incorrect Size"); @@ -61,67 +57,45 @@ class Character; class MyPlayer : public InputTarget, public Viewer { REMOVE_COPY_CONSTRUCTORS(MyPlayer); -public: - static MyPlayer* GetInstance(); - - Character* getCharacter() const; - - /* 0x0070 */ std::shared_ptr m_player; - /* 0x0080 */ std::int8_t m_controlCharacterSum; -private: - /* 0x0081 */ char pad_0x81[0x3]; -public: - /* 0x0084 */ float m_walkDirectionRadians; - /* 0x0088 */ float m_fYawFloat; - /* 0x008C */ float m_fPitchFloat; - /* 0x0090 */ PlayerCamera camera; -private: - /* 0x00F8 */ std::shared_ptr m_someEffect; -public: - /* 0x0108 */ char pad_0x108[0x28]; - /* 0x0130 */ DirectX::XMMATRIX m_cameraMatrix; - /* 0x0170 */ float m_fCameraFov2; -private: - /* 0x0174 */ char pad_0x174[0x4]; -public: - /* 0x0178 */ std::shared_ptr m_pFirstPersonHands; -private: - /* 0x0188 */ char pad_0x188[0x38]; -public: - /* 0x01C0 */ std::shared_ptr m_pInventory; - /* 0x01D0 */ std::shared_ptr m_pToolBox; - /* 0x01E0 */ std::shared_ptr m_pConstruction; - /* 0x01F0 */ std::shared_ptr m_pDestruction; -private: - /* 0x0200 */ char pad_0x200[0x10]; -public: - /* 0x0210 */ bool m_bIsRaycastValid; -private: - /* 0x0211 */ char pad_0x211[0xD7]; -public: - /* 0x02E8 */ std::int32_t m_iOwnedLiftId; -private: - /* 0x02EC */ char pad_0x2EC[0x34]; -public: - /* 0x0320 */ std::int32_t m_iCameraPullbackIdx; -private: - /* 0x0324 */ char pad_0x324[0x4]; -public: - /* 0x0328 */ std::shared_ptr m_pAudioEvent; -private: - /* 0x0338 */ char pad_0x338[0x1]; -public: - /* 0x0339 */ bool m_bIsDowned; -private: - /* 0x033A */ char pad_0x33A[0x6]; -public: - /* 0x0340 */ boost::uuids::uuid m_selectedToolUuid; - /* 0x0350 */ std::int32_t m_iSelectedToolId; - /* 0x0354 */ boost::uuids::uuid m_prevSelectedToolUuid; - /* 0x0364 */ std::int32_t m_iPrevSelectedToolId; -private: - /* 0x0368 */ char pad_0x368[0x8]; + SDK_PUB static MyPlayer* GetInstance(); + + SDK_PUB Character* getCharacter() const; + + /* 0x0070 */ SDK_PUB std::shared_ptr m_player; + /* 0x0080 */ SDK_PUB std::int8_t m_controlCharacterSum; + /* 0x0081 */ SDK_PRI char pad_0x81[0x3]; + /* 0x0084 */ SDK_PUB float m_walkDirectionRadians; + /* 0x0088 */ SDK_PUB float m_fYawFloat; + /* 0x008C */ SDK_PUB float m_fPitchFloat; + /* 0x0090 */ SDK_PUB PlayerCamera camera; + /* 0x00F8 */ SDK_PRI std::shared_ptr m_someEffect; + /* 0x0108 */ SDK_PRI char pad_0x108[0x28]; + /* 0x0130 */ SDK_PUB DirectX::XMMATRIX m_cameraMatrix; + /* 0x0170 */ SDK_PUB float m_fCameraFov2; + /* 0x0174 */ SDK_PRI char pad_0x174[0x4]; + /* 0x0178 */ SDK_PUB std::shared_ptr m_pFirstPersonHands; + /* 0x0188 */ SDK_PRI char pad_0x188[0x38]; + /* 0x01C0 */ SDK_PUB std::shared_ptr m_pInventory; + /* 0x01D0 */ SDK_PUB std::shared_ptr m_pToolBox; + /* 0x01E0 */ SDK_PUB std::shared_ptr m_pConstruction; + /* 0x01F0 */ SDK_PUB std::shared_ptr m_pDestruction; + /* 0x0200 */ SDK_PRI char pad_0x200[0x10]; + /* 0x0210 */ SDK_PUB bool m_bIsRaycastValid; + /* 0x0211 */ SDK_PRI char pad_0x211[0xD7]; + /* 0x02E8 */ SDK_PUB std::int32_t m_iOwnedLiftId; + /* 0x02EC */ SDK_PRI char pad_0x2EC[0x34]; + /* 0x0320 */ SDK_PUB std::int32_t m_iCameraPullbackIdx; + /* 0x0324 */ SDK_PRI char pad_0x324[0x4]; + /* 0x0328 */ SDK_PUB std::shared_ptr m_pAudioEvent; + /* 0x0338 */ SDK_PRI char pad_0x338[0x1]; + /* 0x0339 */ SDK_PUB bool m_bIsDowned; + /* 0x033A */ SDK_PRI char pad_0x33A[0x6]; + /* 0x0340 */ SDK_PUB boost::uuids::uuid m_selectedToolUuid; + /* 0x0350 */ SDK_PUB std::int32_t m_iSelectedToolId; + /* 0x0354 */ SDK_PUB boost::uuids::uuid m_prevSelectedToolUuid; + /* 0x0364 */ SDK_PUB std::int32_t m_iPrevSelectedToolId; + /* 0x0368 */ SDK_PRI char pad_0x368[0x8]; }; // Size: 0x370 static_assert(sizeof(MyPlayer) == 0x370, "MyPlayer: Incorrect Size"); diff --git a/include/SmSdk/NetObjManager.hpp b/include/SmSdk/NetObjManager.hpp index b569c32..27a543b 100644 --- a/include/SmSdk/NetObjManager.hpp +++ b/include/SmSdk/NetObjManager.hpp @@ -6,8 +6,7 @@ SMSDK_BEGIN_NAMESPACE class NetObjManager { -public: - static NetObjManager* GetInstance(); + SDK_PUB static NetObjManager* GetInstance(); }; SMSDK_END_NAMESPACE \ No newline at end of file diff --git a/include/SmSdk/Network/ListenServer.hpp b/include/SmSdk/Network/ListenServer.hpp index a7e26c0..ed50ed0 100644 --- a/include/SmSdk/Network/ListenServer.hpp +++ b/include/SmSdk/Network/ListenServer.hpp @@ -1,15 +1,14 @@ #pragma once -#include "SmSdk/config.hpp" #include "SteamNetworkServer.hpp" +#include "SmSdk/config.hpp" SMSDK_BEGIN_NAMESPACE struct ListenServer { - /* 0x0000 */ SteamNetworkServer* m_pNetworkServer; -private: - /* 0x0008 */ char pad_0x8[0x1B8]; + /* 0x0000 */ SDK_PUB SteamNetworkServer* m_pNetworkServer; + /* 0x0008 */ SDK_PRI char pad_0x8[0x1B8]; }; // Size: 0x1C0 static_assert(sizeof(ListenServer) == 0x1C0, "ListenServer: Incorrect Size"); diff --git a/include/SmSdk/Network/NetworkClient.hpp b/include/SmSdk/Network/NetworkClient.hpp index cc90ff6..a692769 100644 --- a/include/SmSdk/Network/NetworkClient.hpp +++ b/include/SmSdk/Network/NetworkClient.hpp @@ -10,27 +10,22 @@ SMSDK_BEGIN_NAMESPACE class NetworkClient { -private: - /* 0x0000 */ char pad_0x0[0x8]; -public: - /* 0x0008 */ std::shared_ptr m_pNetworkSend; - /* 0x0018 */ std::int32_t m_iConnectionState; -private: - /* 0x001C */ char pad_0x1C[0x2C]; - /* 0x0048 */ std::string m_someString1; - /* 0x0068 */ char pad_0x68[0x80]; -public: - /* 0x00E8 */ std::shared_ptr m_pTickLag; -private: - /* 0x00F8 */ char pad_0xF8[0x38]; -public: - HSteamNetConnection getConnectionFromSteamId(uint64_t steamId) const + SDK_PUB HSteamNetConnection getConnectionFromSteamId(const std::uint64_t steamId) const { - if (this->m_pNetworkSend == nullptr) + if (m_pNetworkSend == nullptr) return 0; - return this->m_pNetworkSend->getConnectionFromSteamId(steamId); + return m_pNetworkSend->getConnectionFromSteamId(steamId); } + + /* 0x0000 */ SDK_PRI char pad_0x0[0x8]; + /* 0x0008 */ SDK_PUB std::shared_ptr m_pNetworkSend; + /* 0x0018 */ SDK_PUB std::int32_t m_iConnectionState; + /* 0x001C */ SDK_PRI char pad_0x1C[0x2C]; + /* 0x0048 */ SDK_PRI std::string m_someString1; + /* 0x0068 */ SDK_PRI char pad_0x68[0x80]; + /* 0x00E8 */ SDK_PUB std::shared_ptr m_pTickLag; + /* 0x00F8 */ SDK_PRI char pad_0xF8[0x38]; }; // Size: 0x130 static_assert(sizeof(NetworkClient) == 0x130, "NetworkClient: Incorrect Size"); diff --git a/include/SmSdk/Network/NetworkServer.hpp b/include/SmSdk/Network/NetworkServer.hpp index e3d5903..fd28ce3 100644 --- a/include/SmSdk/Network/NetworkServer.hpp +++ b/include/SmSdk/Network/NetworkServer.hpp @@ -1,7 +1,7 @@ #pragma once -#include "SmSdk/config.hpp" #include "SmSdk/Network/SteamNetworkSend.hpp" +#include "SmSdk/config.hpp" #include @@ -9,13 +9,10 @@ SMSDK_BEGIN_NAMESPACE struct NetworkServer { -private: - /* 0x0000 */ virtual void func1() {} -public: - /* 0x0008 */ std::shared_ptr m_pNetworkSend; - /* 0x0018 */ std::shared_ptr m_pClientCommunication; -private: - /* 0x0028 */ char pad_0x28[0x8]; + /* 0x0000 */ SDK_PRI virtual void func1() {} + /* 0x0008 */ SDK_PUB std::shared_ptr m_pNetworkSend; + /* 0x0018 */ SDK_PUB std::shared_ptr m_pClientCommunication; + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; }; // Size: 0x30 static_assert(sizeof(NetworkServer) == 0x30, "NetworkServer: Incorrect Size"); diff --git a/include/SmSdk/Network/SteamNetworkClient.hpp b/include/SmSdk/Network/SteamNetworkClient.hpp index aef390d..6b255be 100644 --- a/include/SmSdk/Network/SteamNetworkClient.hpp +++ b/include/SmSdk/Network/SteamNetworkClient.hpp @@ -8,20 +8,13 @@ SMSDK_BEGIN_NAMESPACE struct SteamNetworkClient : public NetworkClient { -private: - /* 0x0130 */ char pad_0x130[0x8]; -public: - /* 0x0138 */ std::int64_t m_iHostSteamId; -private: - /* 0x0140 */ char pad_0x140[0x78]; -public: - /* 0x01B8 */ HSteamNetConnection m_hostConnection; -private: - /* 0x01BC */ char pad_0x1BC[0x2C]; -public: - /* 0x01E8 */ std::string m_passphrase; -private: - /* 0x0208 */ char pad_0x208[0x28]; + /* 0x0130 */ SDK_PRI char pad_0x130[0x8]; + /* 0x0138 */ SDK_PUB std::int64_t m_iHostSteamId; + /* 0x0140 */ SDK_PRI char pad_0x140[0x78]; + /* 0x01B8 */ SDK_PUB HSteamNetConnection m_hostConnection; + /* 0x01BC */ SDK_PRI char pad_0x1BC[0x2C]; + /* 0x01E8 */ SDK_PUB std::string m_passphrase; + /* 0x0208 */ SDK_PRI char pad_0x208[0x28]; }; // Size: 0x230 static_assert(sizeof(SteamNetworkClient) == 0x230, "SteamNetworkClient: Incorrect Size"); diff --git a/include/SmSdk/Network/SteamNetworkSend.hpp b/include/SmSdk/Network/SteamNetworkSend.hpp index 03d251b..e6dbf19 100644 --- a/include/SmSdk/Network/SteamNetworkSend.hpp +++ b/include/SmSdk/Network/SteamNetworkSend.hpp @@ -2,37 +2,35 @@ #include "SmSdk/steamapi_include.hpp" #include "SmSdk/config.hpp" + #include SMSDK_BEGIN_NAMESPACE struct NetworkSendInterface { -private: - /* 0x0000 */ virtual void func1() {} + /* 0x0000 */ SDK_PRI virtual void func1() {} - /* 0x0008 */ char pad_0x8[0x10]; -public: - /* 0x0018 */ std::int64_t m_iTick; - /* 0x0020 */ std::int64_t m_iTick2; + /* 0x0008 */ SDK_PRI char pad_0x8[0x10]; + /* 0x0018 */ SDK_PUB std::int64_t m_iTick; + /* 0x0020 */ SDK_PUB std::int64_t m_iTick2; }; // Size: 0x28 static_assert(sizeof(NetworkSendInterface) == 0x28, "NetworkSendInterface: Incorrect Size"); struct SteamNetworkSend : public NetworkSendInterface { - /* 0x0028 */ std::unordered_map m_mapSteamIdToConnection; -private: - /* 0x0068 */ char pad_0x68[0xC0]; -public: - HSteamNetConnection getConnectionFromSteamId(uint64_t uSteamId) const + HSteamNetConnection getConnectionFromSteamId(const std::uint64_t uSteamId) const { - auto iter = this->m_mapSteamIdToConnection.find(uSteamId); - if (iter == this->m_mapSteamIdToConnection.end()) + auto iter = m_mapSteamIdToConnection.find(uSteamId); + if (iter == m_mapSteamIdToConnection.end()) return 0; return iter->second; } + + /* 0x0028 */ SDK_PUB std::unordered_map m_mapSteamIdToConnection; + /* 0x0068 */ SDK_PRI char pad_0x68[0xC0]; }; // Size: 0x128 static_assert(sizeof(SteamNetworkSend) == 0x128, "SteamNetworkSend: Incorrect Size"); diff --git a/include/SmSdk/Network/SteamNetworkServer.hpp b/include/SmSdk/Network/SteamNetworkServer.hpp index a64e67d..5c5debc 100644 --- a/include/SmSdk/Network/SteamNetworkServer.hpp +++ b/include/SmSdk/Network/SteamNetworkServer.hpp @@ -6,8 +6,7 @@ SMSDK_BEGIN_NAMESPACE struct SteamNetworkServer : public NetworkServer { -private: - /* 0x0030 */ char pad_0x30[0xF8]; + /* 0x0030 */ SDK_PRI char pad_0x30[0xF8]; }; // Size: 0x128 static_assert(sizeof(SteamNetworkServer) == 0x128, "SteamNetworkServer: Incorrect Size"); diff --git a/include/SmSdk/Pathfinder.hpp b/include/SmSdk/Pathfinder.hpp index 82d6eb5..1f705b6 100644 --- a/include/SmSdk/Pathfinder.hpp +++ b/include/SmSdk/Pathfinder.hpp @@ -11,16 +11,11 @@ SMSDK_BEGIN_NAMESPACE struct PathNode : public NetObj { -private: - /* 0x0028 */ char pad_0x28[0x8]; -public: - /* 0x0030 */ std::int16_t m_iWorldId; -private: - /* 0x0032 */ char pad_0x32[0x1E]; -public: - /* 0x0050 */ DirectX::XMFLOAT3 m_position; -private: - /* 0x005C */ char pad_0x5C[0x4]; + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; + /* 0x0030 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x0032 */ SDK_PRI char pad_0x32[0x1E]; + /* 0x0050 */ SDK_PUB DirectX::XMFLOAT3 m_position; + /* 0x005C */ SDK_PRI char pad_0x5C[0x4]; }; // Size: 0x60 static_assert(offsetof(PathNode, PathNode::m_iWorldId) == 0x30, "PathNode::m_iWorldId: Incorrect offset"); @@ -31,13 +26,11 @@ static_assert(sizeof(PathNode) == 0x60, "PathNode: Incorrect Size"); struct Pathfinder { - static Pathfinder* GetInstance(); - - /* 0x0000 */ std::unordered_map> m_mapPathNodes; - /* 0x0040 */ std::vector> m_vecPathNodes; -private: - /* 0x0058 */ char pad_0x58[0x48]; + SDK_PUB static Pathfinder* GetInstance(); + /* 0x0000 */ SDK_PUB std::unordered_map> m_mapPathNodes; + /* 0x0040 */ SDK_PUB std::vector> m_vecPathNodes; + /* 0x0058 */ SDK_PRI char pad_0x58[0x48]; }; // Size: 0xA0 static_assert(offsetof(Pathfinder, Pathfinder::m_mapPathNodes) == 0x0, "Pathfinder::m_mapPathNodes: Incorrect offset"); diff --git a/include/SmSdk/Physics/AreaTriggerProxy.hpp b/include/SmSdk/Physics/AreaTriggerProxy.hpp index 521a993..deae027 100644 --- a/include/SmSdk/Physics/AreaTriggerProxy.hpp +++ b/include/SmSdk/Physics/AreaTriggerProxy.hpp @@ -6,9 +6,8 @@ SMSDK_BEGIN_NAMESPACE struct AreaTriggerProxy : public PhysicsProxy { - /* 0x0030 */ std::int32_t m_iAreaTriggerId; -private: - /* 0x0034 */ char pad_0x34[0xC]; + /* 0x0030 */ SDK_PUB std::int32_t m_iAreaTriggerId; + /* 0x0034 */ SDK_PRI char pad_0x34[0xC]; }; // Size: 0x40 static_assert(offsetof(AreaTriggerProxy, AreaTriggerProxy::m_iAreaTriggerId) == 0x30, "AreaTriggerProxy::m_iAreaTriggerId: Incorrect offset"); diff --git a/include/SmSdk/Physics/CharacterPhysicsProxy.hpp b/include/SmSdk/Physics/CharacterPhysicsProxy.hpp index 31394c5..59c7767 100644 --- a/include/SmSdk/Physics/CharacterPhysicsProxy.hpp +++ b/include/SmSdk/Physics/CharacterPhysicsProxy.hpp @@ -8,21 +8,14 @@ SMSDK_BEGIN_NAMESPACE struct CharacterPhysicsProxy : public PhysicsProxy { -private: - /* 0x0030 */ char pad_0x30[0x8]; -public: - /* 0x0038 */ struct CharacterController* m_pController; -private: - /* 0x0040 */ char pad_0x40[0x38]; -public: - /* 0x0078 */ btCollisionObject* m_pCollisionObj2; - /* 0x0080 */ btCollisionObject* m_pCollisionObj3; -private: - /* 0x0088 */ char pad_0x88[0x8]; -public: - /* 0x0090 */ DirectX::XMFLOAT3 m_position; -private: - /* 0x009C */ char pad_0x9C[0x34]; + /* 0x0030 */ SDK_PRI char pad_0x30[0x8]; + /* 0x0038 */ SDK_PUB struct CharacterController* m_pController; + /* 0x0040 */ SDK_PRI char pad_0x40[0x38]; + /* 0x0078 */ SDK_PUB btCollisionObject* m_pCollisionObj2; + /* 0x0080 */ SDK_PUB btCollisionObject* m_pCollisionObj3; + /* 0x0088 */ SDK_PRI char pad_0x88[0x8]; + /* 0x0090 */ SDK_PUB DirectX::XMFLOAT3 m_position; + /* 0x009C */ SDK_PRI char pad_0x9C[0x34]; }; // Size: 0xD0 static_assert(sizeof(CharacterPhysicsProxy) == 0xD0, "CharacterPhysicsProxy: Incorrect Size"); diff --git a/include/SmSdk/Physics/Physics.hpp b/include/SmSdk/Physics/Physics.hpp index 740dc99..b9af0aa 100644 --- a/include/SmSdk/Physics/Physics.hpp +++ b/include/SmSdk/Physics/Physics.hpp @@ -7,35 +7,21 @@ SMSDK_BEGIN_NAMESPACE struct PhysicsBase : public Task { -private: - /* 0x0008 */ char pad_0x8[0x8]; -public: - /* 0x0010 */ struct World* m_pWorld; -private: - /* 0x0018 */ char pad_0x18[0x48]; -public: - /* 0x0060 */ btNullPairCache* m_pNullPairCache; -private: - /* 0x0068 */ char pad_0x68[0x8]; -public: - /* 0x0070 */ struct ParallelDispatcher* m_pParallelDispatcher; -private: - /* 0x0078 */ char pad_0x78[0x8]; -public: - /* 0x0080 */ struct SolverPool* m_pSolverPool; - /* 0x0088 */ struct TickDynamicsWorld* m_pTickDynamicsWorld; - /* 0x0090 */ btGhostPairCallback* m_pGhostPairCallback; -private: - /* 0x0098 */ char pad_0x98[0xD8]; -public: - /* 0x0170 */ btCollisionWorld* m_pCollisionWorld2; -private: - /* 0x0178 */ char pad_0x178[0x18]; -public: - /* 0x0190 */ btCollisionWorld* m_pCollisionWorld; -private: - /* 0x0198 */ char pad_0x198[0x1A8]; - + /* 0x0008 */ SDK_PRI char pad_0x8[0x8]; + /* 0x0010 */ SDK_PUB struct World* m_pWorld; + /* 0x0018 */ SDK_PRI char pad_0x18[0x48]; + /* 0x0060 */ SDK_PUB btNullPairCache* m_pNullPairCache; + /* 0x0068 */ SDK_PRI char pad_0x68[0x8]; + /* 0x0070 */ SDK_PUB struct ParallelDispatcher* m_pParallelDispatcher; + /* 0x0078 */ SDK_PRI char pad_0x78[0x8]; + /* 0x0080 */ SDK_PUB struct SolverPool* m_pSolverPool; + /* 0x0088 */ SDK_PUB struct TickDynamicsWorld* m_pTickDynamicsWorld; + /* 0x0090 */ SDK_PUB btGhostPairCallback* m_pGhostPairCallback; + /* 0x0098 */ SDK_PRI char pad_0x98[0xD8]; + /* 0x0170 */ SDK_PUB btCollisionWorld* m_pCollisionWorld2; + /* 0x0178 */ SDK_PRI char pad_0x178[0x18]; + /* 0x0190 */ SDK_PUB btCollisionWorld* m_pCollisionWorld; + /* 0x0198 */ SDK_PRI char pad_0x198[0x1A8]; }; // Size: 0x340 static_assert(sizeof(PhysicsBase) == 0x340, "PhysicsBase: Incorrect Size"); @@ -56,14 +42,13 @@ enum PhysicsFilterMask class Physics { -public: - static Physics* GetInstance(); + SDK_PUB static Physics* GetInstance(); - /* 0x0000 */ PhysicsBase* m_pPhysicsBase; - /* 0x0008 */ btNullPairCache* m_pNullPairCache; - /* 0x0010 */ char pad_0x10[0x10]; - /* 0x0020 */ btCollisionDispatcher* m_pDispatcher; - /* 0x0028 */ btCollisionWorld* m_pCollisionWorld; + /* 0x0000 */ SDK_PUB PhysicsBase* m_pPhysicsBase; + /* 0x0008 */ SDK_PUB btNullPairCache* m_pNullPairCache; + /* 0x0010 */ SDK_PRI char pad_0x10[0x10]; + /* 0x0020 */ SDK_PUB btCollisionDispatcher* m_pDispatcher; + /* 0x0028 */ SDK_PUB btCollisionWorld* m_pCollisionWorld; }; // Size: 0x30 static_assert(sizeof(Physics) == 0x30, "Physics: Incorrect Size"); diff --git a/include/SmSdk/Physics/PhysicsProxy.hpp b/include/SmSdk/Physics/PhysicsProxy.hpp index f428562..3b112f5 100644 --- a/include/SmSdk/Physics/PhysicsProxy.hpp +++ b/include/SmSdk/Physics/PhysicsProxy.hpp @@ -19,17 +19,14 @@ enum PhysicsProxyType : unsigned char __declspec(align(16)) class PhysicsProxy { -public: - virtual char getProxyType() { return 0; } -private: - /* 0x0008 */ char pad_0x8[0x8]; -public: - /* 0x0010 */ btRigidBody* m_pDynamicsWorldRigidBody; - /* 0x0018 */ btRigidBody* m_pTickRaycastCollisionObject; - /* 0x0020 */ btCollisionObject* m_pInterpolatedRaycastCollisionObject; - /* 0x0028 */ std::int16_t m_iWorldId; -private: - /* 0x002A */ char pad_0x2A[0x6]; + SDK_PUB virtual char getProxyType() { return 0; } + + /* 0x0008 */ SDK_PRI char pad_0x8[0x8]; + /* 0x0010 */ SDK_PUB btRigidBody* m_pDynamicsWorldRigidBody; + /* 0x0018 */ SDK_PUB btRigidBody* m_pTickRaycastCollisionObject; + /* 0x0020 */ SDK_PUB btCollisionObject* m_pInterpolatedRaycastCollisionObject; + /* 0x0028 */ SDK_PUB std::int16_t m_iWorldId; + /* 0x002A */ SDK_PRI char pad_0x2A[0x6]; }; // Size: 0x30 static_assert(sizeof(PhysicsProxy) == 0x30, "PhysicsProxy: Incorrect Size"); diff --git a/include/SmSdk/Player.hpp b/include/SmSdk/Player.hpp index a6327d9..e698d0c 100644 --- a/include/SmSdk/Player.hpp +++ b/include/SmSdk/Player.hpp @@ -10,40 +10,40 @@ SMSDK_BEGIN_NAMESPACE struct PlayerGarments { - /* 0x0000 */ bool m_bIsFemale; - /* 0x0001 */ boost::uuids::uuid m_headUuid; - /* 0x0011 */ boost::uuids::uuid m_hairUuid; - /* 0x0021 */ boost::uuids::uuid m_facialHairUuid; - /* 0x0031 */ boost::uuids::uuid m_torsoUuid; - /* 0x0041 */ boost::uuids::uuid m_glovesUuid; - /* 0x0051 */ boost::uuids::uuid m_shoesUuid; - /* 0x0061 */ boost::uuids::uuid m_legsUuid; - /* 0x0071 */ boost::uuids::uuid m_hatUuid; - /* 0x0081 */ boost::uuids::uuid m_backpackUuid; - /* 0x0091 */ char pad_0x91[0x3]; - /* 0x0094 */ std::int32_t m_headColor; - /* 0x0098 */ std::int32_t m_hairColor; - /* 0x009C */ std::int32_t m_facialHairColor; - /* 0x00A0 */ std::int32_t m_torsoColor; - /* 0x00A4 */ std::int32_t m_glovesColor; - /* 0x00A8 */ std::int32_t m_shoesColor; - /* 0x00AC */ std::int32_t m_legsColor; - /* 0x00B0 */ std::int32_t m_hatColor; - /* 0x00B4 */ std::int32_t m_backpackColor; + /* 0x0000 */ SDK_PUB bool m_bIsFemale; + /* 0x0001 */ SDK_PUB boost::uuids::uuid m_headUuid; + /* 0x0011 */ SDK_PUB boost::uuids::uuid m_hairUuid; + /* 0x0021 */ SDK_PUB boost::uuids::uuid m_facialHairUuid; + /* 0x0031 */ SDK_PUB boost::uuids::uuid m_torsoUuid; + /* 0x0041 */ SDK_PUB boost::uuids::uuid m_glovesUuid; + /* 0x0051 */ SDK_PUB boost::uuids::uuid m_shoesUuid; + /* 0x0061 */ SDK_PUB boost::uuids::uuid m_legsUuid; + /* 0x0071 */ SDK_PUB boost::uuids::uuid m_hatUuid; + /* 0x0081 */ SDK_PUB boost::uuids::uuid m_backpackUuid; + /* 0x0091 */ SDK_PUB char pad_0x91[0x3]; + /* 0x0094 */ SDK_PUB std::int32_t m_headColor; + /* 0x0098 */ SDK_PUB std::int32_t m_hairColor; + /* 0x009C */ SDK_PUB std::int32_t m_facialHairColor; + /* 0x00A0 */ SDK_PUB std::int32_t m_torsoColor; + /* 0x00A4 */ SDK_PUB std::int32_t m_glovesColor; + /* 0x00A8 */ SDK_PUB std::int32_t m_shoesColor; + /* 0x00AC */ SDK_PUB std::int32_t m_legsColor; + /* 0x00B0 */ SDK_PUB std::int32_t m_hatColor; + /* 0x00B4 */ SDK_PUB std::int32_t m_backpackColor; }; // Size: 0xB8 static_assert(sizeof(PlayerGarments) == 0xB8, "PlayerGarments: Incorrect Size"); struct PlayerScriptData { - /* 0x0000 */ bool m_bHasServerOnRefresh; - /* 0x0001 */ bool m_bHasServerOnProjectile; - /* 0x0002 */ bool m_bHasServerOnExplosion; - /* 0x0003 */ bool m_bHasServerOnMelee; - /* 0x0004 */ bool m_bHasServerOnCollision; - /* 0x0005 */ bool m_bHasServerOnCollisionCrush; - /* 0x0006 */ bool m_bHasServerOnShapeRemoved; - /* 0x0007 */ bool m_bHasServerOnInventoryChanges; + /* 0x0000 */ SDK_PUB bool m_bHasServerOnRefresh; + /* 0x0001 */ SDK_PUB bool m_bHasServerOnProjectile; + /* 0x0002 */ SDK_PUB bool m_bHasServerOnExplosion; + /* 0x0003 */ SDK_PUB bool m_bHasServerOnMelee; + /* 0x0004 */ SDK_PUB bool m_bHasServerOnCollision; + /* 0x0005 */ SDK_PUB bool m_bHasServerOnCollisionCrush; + /* 0x0006 */ SDK_PUB bool m_bHasServerOnShapeRemoved; + /* 0x0007 */ SDK_PUB bool m_bHasServerOnInventoryChanges; }; // Size: 0x8 static_assert(sizeof(PlayerScriptData) == 0x8, "PlayerScriptData: Incorrect Size"); @@ -52,39 +52,28 @@ class Character; class Player { -public: - Character* getCharacter() const; - bool characterExists() const; - - /* 0x0000 */ std::shared_ptr m_pSelf; - /* 0x0010 */ std::int32_t m_iId; - /* 0x0014 */ std::int32_t m_iCharacterId; - /* 0x0018 */ std::int16_t m_worldId; -private: - /* 0x001A */ char pad_0x1A[0x2]; -public: - /* 0x001C */ DirectX::XMFLOAT3 m_characterPosition; - /* 0x0028 */ DirectX::XMFLOAT3 m_characterVelocity; - /* 0x0034 */ float m_fCharacterYaw; - /* 0x0038 */ float m_fCharacterPitch; -private: - /* 0x003C */ char pad_0x3C[0x4]; -public: - /* 0x0040 */ std::int64_t m_steamId; - /* 0x0048 */ std::string m_name; -private: - /* 0x0068 */ char pad_0x68[0x4]; -public: - /* 0x006C */ PlayerGarments m_garments; - /* 0x0124 */ std::int32_t m_iGarmentChangeCounter; -private: - /* 0x0128 */ char pad_0x128[0x10]; -public: - /* 0x0138 */ std::int32_t m_scriptRef; - /* 0x013C */ PlayerScriptData m_scriptData; -private: - /* 0x0144 */ char pad_0x144[0xC]; + SDK_PUB Character* getCharacter() const; + SDK_PUB bool characterExists() const; + /* 0x0000 */ SDK_PUB std::shared_ptr m_pSelf; + /* 0x0010 */ SDK_PUB std::int32_t m_iId; + /* 0x0014 */ SDK_PUB std::int32_t m_iCharacterId; + /* 0x0018 */ SDK_PUB std::int16_t m_worldId; + /* 0x001A */ SDK_PRI char pad_0x1A[0x2]; + /* 0x001C */ SDK_PUB DirectX::XMFLOAT3 m_characterPosition; + /* 0x0028 */ SDK_PUB DirectX::XMFLOAT3 m_characterVelocity; + /* 0x0034 */ SDK_PUB float m_fCharacterYaw; + /* 0x0038 */ SDK_PUB float m_fCharacterPitch; + /* 0x003C */ SDK_PRI char pad_0x3C[0x4]; + /* 0x0040 */ SDK_PUB std::int64_t m_steamId; + /* 0x0048 */ SDK_PUB std::string m_name; + /* 0x0068 */ SDK_PRI char pad_0x68[0x4]; + /* 0x006C */ SDK_PUB PlayerGarments m_garments; + /* 0x0124 */ SDK_PUB std::int32_t m_iGarmentChangeCounter; + /* 0x0128 */ SDK_PRI char pad_0x128[0x10]; + /* 0x0138 */ SDK_PUB std::int32_t m_scriptRef; + /* 0x013C */ SDK_PUB PlayerScriptData m_scriptData; + /* 0x0144 */ SDK_PRI char pad_0x144[0xC]; }; // Size: 0x150 static_assert(sizeof(Player) == 0x150, "Player: Incorrect Size"); diff --git a/include/SmSdk/PlayerManager.hpp b/include/SmSdk/PlayerManager.hpp index ef47af5..3175a66 100644 --- a/include/SmSdk/PlayerManager.hpp +++ b/include/SmSdk/PlayerManager.hpp @@ -9,10 +9,9 @@ SMSDK_BEGIN_NAMESPACE class PlayerManager { -public: - static PlayerManager* GetInstance(); + SDK_PUB static PlayerManager* GetInstance(); - inline Player* _getPlayer(int player_id) + SDK_PUB inline Player* _getPlayer(int player_id) { auto iter = m_mapIdToPlayers.find(player_id); if (iter == m_mapIdToPlayers.end()) @@ -21,7 +20,7 @@ class PlayerManager return iter->second.get(); } - inline Player* _getPlayerFromSteamId(uint64_t steam_id) + SDK_PUB inline Player* _getPlayerFromSteamId(uint64_t steam_id) { auto iter = m_mapSteamIdToPlayer.find(steam_id); if (iter == m_mapSteamIdToPlayer.end()) @@ -30,7 +29,7 @@ class PlayerManager return this->_getPlayer(iter->second); } - inline static Player* GetPlayer(int player_id) + SDK_PUB inline static Player* GetPlayer(int player_id) { PlayerManager* pPlayerMgr = PlayerManager::GetInstance(); if (!pPlayerMgr) @@ -39,7 +38,7 @@ class PlayerManager return pPlayerMgr->_getPlayer(player_id); } - inline static Player* GetPlayerFromSteamId(uint64_t steam_id) + SDK_PUB inline static Player* GetPlayerFromSteamId(uint64_t steam_id) { PlayerManager* pPlayerMgr = PlayerManager::GetInstance(); if (!pPlayerMgr) @@ -48,14 +47,11 @@ class PlayerManager return pPlayerMgr->_getPlayerFromSteamId(steam_id); } - /* 0x0000 */ std::int32_t m_iTick; -private: - /* 0x0004 */ char pad_0x4[0x4]; -public: - /* 0x0008 */ std::unordered_map> m_mapIdToPlayers; - /* 0x0048 */ std::unordered_map m_mapSteamIdToPlayer; -private: - /* 0x0088 */ char pad_0x88[0xC0]; + /* 0x0000 */ SDK_PUB std::int32_t m_iTick; + /* 0x0004 */ SDK_PRI char pad_0x4[0x4]; + /* 0x0008 */ SDK_PUB std::unordered_map> m_mapIdToPlayers; + /* 0x0048 */ SDK_PUB std::unordered_map m_mapSteamIdToPlayer; + /* 0x0088 */ SDK_PRI char pad_0x88[0xC0]; }; // Size: 0x148 static_assert(sizeof(PlayerManager) == 0x148, "PlayerManager: Incorrect Size"); diff --git a/include/SmSdk/PortalManager.hpp b/include/SmSdk/PortalManager.hpp index 36d2f4d..9260bf8 100644 --- a/include/SmSdk/PortalManager.hpp +++ b/include/SmSdk/PortalManager.hpp @@ -11,15 +11,11 @@ SMSDK_BEGIN_NAMESPACE struct Portal : public NetObj { -private: - /* 0x0028 */ char pad_0x28[0x8]; -public: - /* 0x0030 */ DirectX::XMFLOAT3 m_position; -private: - /* 0x003C */ char pad_0x3C[0x4]; -public: - /* 0x0040 */ AreaTrigger* m_pAreaTriggerA; - /* 0x0048 */ AreaTrigger* m_pAreaTriggerB; + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; + /* 0x0030 */ SDK_PUB DirectX::XMFLOAT3 m_position; + /* 0x003C */ SDK_PRI char pad_0x3C[0x4]; + /* 0x0040 */ SDK_PUB AreaTrigger* m_pAreaTriggerA; + /* 0x0048 */ SDK_PUB AreaTrigger* m_pAreaTriggerB; }; // Size: 0x50 static_assert(offsetof(Portal, Portal::m_position) == 0x30, "Portal::m_position: Incorrect offset"); @@ -31,12 +27,10 @@ static_assert(sizeof(Portal) == 0x50, "Portal: Incorrect Size"); struct PortalManager { - static PortalManager* GetInstance(); - - /* 0x0000 */ std::unordered_map> m_mapPortals; -private: - /* 0x0040 */ char pad_0x40[0x58]; + SDK_PUB static PortalManager* GetInstance(); + /* 0x0000 */ SDK_PUB std::unordered_map> m_mapPortals; + /* 0x0040 */ SDK_PRI char pad_0x40[0x58]; }; // Size: 0x98 static_assert(offsetof(PortalManager, PortalManager::m_mapPortals) == 0x0, "PortalManager::m_mapPortals: Incorrect offset"); diff --git a/include/SmSdk/Rendering/Material.hpp b/include/SmSdk/Rendering/Material.hpp index 00b3b6c..aad5976 100644 --- a/include/SmSdk/Rendering/Material.hpp +++ b/include/SmSdk/Rendering/Material.hpp @@ -10,18 +10,13 @@ SMSDK_BEGIN_NAMESPACE struct LayoutParameter { -public: - /* 0x0000 */ std::string m_defineString; - /* 0x0020 */ std::int8_t m_iSemanticIdx; -private: - /* 0x0021 */ char pad_0x21[0x3]; -public: - /* 0x0024 */ DXGI_FORMAT m_format; - /* 0x0028 */ std::int8_t m_iInputSlot; -private: - /* 0x0029 */ bool m_bSomeBool2; -private: - /* 0x002A */ char pad_0x2A[0x6]; + /* 0x0000 */ SDK_PUB std::string m_defineString; + /* 0x0020 */ SDK_PUB std::int8_t m_iSemanticIdx; + /* 0x0021 */ SDK_PRI char pad_0x21[0x3]; + /* 0x0024 */ SDK_PUB DXGI_FORMAT m_format; + /* 0x0028 */ SDK_PUB std::int8_t m_iInputSlot; + /* 0x0029 */ SDK_PRI bool m_bSomeBool2; + /* 0x002A */ SDK_PRI char pad_0x2A[0x6]; }; // Size: 0x30 static_assert(offsetof(LayoutParameter, LayoutParameter::m_defineString) == 0x0, "LayoutParameter::m_defineString: Incorrect offset"); @@ -33,13 +28,11 @@ static_assert(sizeof(LayoutParameter) == 0x30, "LayoutParameter: Incorrect Size" class MaterialData { -public: - /* 0x0000 */ std::string m_vsEntry; - /* 0x0020 */ std::string m_psEntry; - /* 0x0040 */ std::string m_shaderPath; - /* 0x0060 */ std::vector m_vecDefines; - /* 0x0078 */ std::vector m_vecLayoutParams; - + /* 0x0000 */ SDK_PUB std::string m_vsEntry; + /* 0x0020 */ SDK_PUB std::string m_psEntry; + /* 0x0040 */ SDK_PUB std::string m_shaderPath; + /* 0x0060 */ SDK_PUB std::vector m_vecDefines; + /* 0x0078 */ SDK_PUB std::vector m_vecLayoutParams; }; // Size: 0x90 static_assert(offsetof(MaterialData, MaterialData::m_vsEntry) == 0x0, "MaterialData::m_vsEntry: Incorrect offset"); @@ -52,11 +45,9 @@ static_assert(sizeof(MaterialData) == 0x90, "MaterialData: Incorrect Size"); struct Material { -public: - /* 0x0000 */ MaterialData m_data; - /* 0x0090 */ rend::D3D11Layout* m_pLayout; - /* 0x0098 */ rend::D3D11ShaderProgram* m_pShaderProgram; - + /* 0x0000 */ SDK_PUB MaterialData m_data; + /* 0x0090 */ SDK_PUB rend::D3D11Layout* m_pLayout; + /* 0x0098 */ SDK_PUB rend::D3D11ShaderProgram* m_pShaderProgram; }; // Size: 0xA0 static_assert(offsetof(Material, Material::m_data) == 0x0, "Material::m_data: Incorrect offset"); diff --git a/include/SmSdk/Rendering/MaterialManager.hpp b/include/SmSdk/Rendering/MaterialManager.hpp index 66b310f..bcabcb8 100644 --- a/include/SmSdk/Rendering/MaterialManager.hpp +++ b/include/SmSdk/Rendering/MaterialManager.hpp @@ -12,27 +12,20 @@ SMSDK_BEGIN_NAMESPACE struct MaterialEntry { -public: - /* 0x0000 */ uint32_t m_uId; -private: - /* 0x0004 */ char pad_0x4[0x4]; -public: - /* 0x0008 */ std::string m_name; - /* 0x0028 */ uint8_t m_uMaterialType; -private: - /* 0x0029 */ char pad_0x29[0x3]; -public: - /* 0x002C */ uint32_t m_uPipelineFlags; - /* 0x0030 */ uint64_t m_uRendQueueMask; - /* 0x0038 */ uint64_t m_uSemantic; - /* 0x0040 */ uint32_t m_uPosAnimCount; - /* 0x0044 */ uint32_t m_uVertexStride; - /* 0x0048 */ uint32_t m_uInstanceStride; -private: - /* 0x004C */ char pad_0x4C[0x4]; -public: - /* 0x0050 */ Json::Value m_jCustomData; - /* 0x0068 */ Material* m_arrMaterials[132]; + /* 0x0000 */ SDK_PUB std::uint32_t m_uId; + /* 0x0004 */ SDK_PRI char pad_0x4[0x4]; + /* 0x0008 */ SDK_PUB std::string m_name; + /* 0x0028 */ SDK_PUB std::uint8_t m_uMaterialType; + /* 0x0029 */ SDK_PRI char pad_0x29[0x3]; + /* 0x002C */ SDK_PUB std::uint32_t m_uPipelineFlags; + /* 0x0030 */ SDK_PUB std::uint64_t m_uRendQueueMask; + /* 0x0038 */ SDK_PUB std::uint64_t m_uSemantic; + /* 0x0040 */ SDK_PUB std::uint32_t m_uPosAnimCount; + /* 0x0044 */ SDK_PUB std::uint32_t m_uVertexStride; + /* 0x0048 */ SDK_PUB std::uint32_t m_uInstanceStride; + /* 0x004C */ SDK_PRI char pad_0x4C[0x4]; + /* 0x0050 */ SDK_PUB Json::Value m_jCustomData; + /* 0x0068 */ SDK_PUB Material* m_arrMaterials[132]; }; // Size: 0x488 static_assert(offsetof(MaterialEntry, MaterialEntry::m_uId) == 0x0, "MaterialEntry::m_uId: Incorrect offset"); @@ -50,35 +43,33 @@ static_assert(sizeof(MaterialEntry) == 0x488, "MaterialEntry: Incorrect Size"); struct MaterialManager { -public: - /* 0x0000 */ Material* m_pForwardParticles; - /* 0x0008 */ Material* m_pPostFxaa; - /* 0x0010 */ Material* m_pPostGodrays; - /* 0x0018 */ Material* m_pMainClutterImpostorGBuffer; - /* 0x0020 */ Material* m_pMainClutterGBuffer; - /* 0x0028 */ Material* m_pMainDebugDrawer; - /* 0x0030 */ Material* m_pGuiBlurryBackground; - /* 0x0038 */ Material* m_pGuiTextureBoxArray; - /* 0x0040 */ Material* m_pCubeMapComposition; - /* 0x0048 */ Material* m_pPostBloom; - /* 0x0050 */ Material* m_pPostAddBloom; - /* 0x0058 */ Material* m_pPostAddBloomNoise; - /* 0x0060 */ Material* m_pPostBlur; - /* 0x0068 */ Material* m_pPostSmartBlur; - /* 0x0070 */ Material* m_pPostDof; - /* 0x0078 */ Material* m_pPostCopy; - /* 0x0080 */ Material* m_pPostCopyDepth; - /* 0x0088 */ Material* m_pPostCopyBrightness; - /* 0x0090 */ Material* m_pMainTerrainSurfaceGBuffer; - /* 0x0098 */ Material* m_pMainTerrainSurfaceDepth; - /* 0x00A0 */ Material* m_pMainEditorTerrainSurfaceGBuffer; - /* 0x00A8 */ Material* m_pMainEditorTerrainSurfaceDepth; - /* 0x00B0 */ Material* m_pMainSky; - /* 0x00B8 */ Material* m_pMainImpostorGBuffer; - /* 0x00C0 */ Material* m_pMainImpostorDepth; - /* 0x00C8 */ std::unordered_map m_arrMaterialMap[10]; - /* 0x0348 */ std::vector m_vecMaterials; - + /* 0x0000 */ SDK_PUB Material* m_pForwardParticles; + /* 0x0008 */ SDK_PUB Material* m_pPostFxaa; + /* 0x0010 */ SDK_PUB Material* m_pPostGodrays; + /* 0x0018 */ SDK_PUB Material* m_pMainClutterImpostorGBuffer; + /* 0x0020 */ SDK_PUB Material* m_pMainClutterGBuffer; + /* 0x0028 */ SDK_PUB Material* m_pMainDebugDrawer; + /* 0x0030 */ SDK_PUB Material* m_pGuiBlurryBackground; + /* 0x0038 */ SDK_PUB Material* m_pGuiTextureBoxArray; + /* 0x0040 */ SDK_PUB Material* m_pCubeMapComposition; + /* 0x0048 */ SDK_PUB Material* m_pPostBloom; + /* 0x0050 */ SDK_PUB Material* m_pPostAddBloom; + /* 0x0058 */ SDK_PUB Material* m_pPostAddBloomNoise; + /* 0x0060 */ SDK_PUB Material* m_pPostBlur; + /* 0x0068 */ SDK_PUB Material* m_pPostSmartBlur; + /* 0x0070 */ SDK_PUB Material* m_pPostDof; + /* 0x0078 */ SDK_PUB Material* m_pPostCopy; + /* 0x0080 */ SDK_PUB Material* m_pPostCopyDepth; + /* 0x0088 */ SDK_PUB Material* m_pPostCopyBrightness; + /* 0x0090 */ SDK_PUB Material* m_pMainTerrainSurfaceGBuffer; + /* 0x0098 */ SDK_PUB Material* m_pMainTerrainSurfaceDepth; + /* 0x00A0 */ SDK_PUB Material* m_pMainEditorTerrainSurfaceGBuffer; + /* 0x00A8 */ SDK_PUB Material* m_pMainEditorTerrainSurfaceDepth; + /* 0x00B0 */ SDK_PUB Material* m_pMainSky; + /* 0x00B8 */ SDK_PUB Material* m_pMainImpostorGBuffer; + /* 0x00C0 */ SDK_PUB Material* m_pMainImpostorDepth; + /* 0x00C8 */ SDK_PUB std::unordered_map m_arrMaterialMap[10]; + /* 0x0348 */ SDK_PUB std::vector m_vecMaterials; }; // Size: 0x360 static_assert(offsetof(MaterialManager, MaterialManager::m_pForwardParticles) == 0x0, "MaterialManager::m_pForwardParticles: Incorrect offset"); diff --git a/include/SmSdk/Rendering/rend_resources.hpp b/include/SmSdk/Rendering/rend_resources.hpp index 684deaf..9eb873a 100644 --- a/include/SmSdk/Rendering/rend_resources.hpp +++ b/include/SmSdk/Rendering/rend_resources.hpp @@ -12,13 +12,12 @@ namespace rend { class D3D11Resource { -private: - virtual void func1() { /* implemented by the game */ } - virtual void func2() { /* implemented by the game */ } - virtual void func3() { /* implemented by the game */ } - virtual void func4() { /* implemented by the game */ } -public: - /* 0x0008 */ std::string m_debugName; + SDK_PRI virtual void func1() { /* implemented by the game */ } + SDK_PRI virtual void func2() { /* implemented by the game */ } + SDK_PRI virtual void func3() { /* implemented by the game */ } + SDK_PRI virtual void func4() { /* implemented by the game */ } + + /* 0x0008 */ SDK_PUB std::string m_debugName; }; // Size: 0x28 static_assert(offsetof(rend::D3D11Resource, rend::D3D11Resource::m_debugName) == 0x8, "rend::D3D11Resource::m_debugName: Incorrect offset"); @@ -26,20 +25,19 @@ static_assert(sizeof(rend::D3D11Resource) == 0x28, "rend::D3D11Resource: Incorre class D3D11ShaderProgram : public rend::D3D11Resource { -public: - /* 0x0028 */ ID3DBlob* m_pVertexShaderBlob; - /* 0x0030 */ ID3DBlob* m_pPixelShaderBlob; - /* 0x0038 */ uint32_t m_uVertexShaderBlobSize; - /* 0x003C */ uint32_t m_uPixelShaderBlobSize; - /* 0x0040 */ ID3D11PixelShader* m_pPixelShader; - /* 0x0048 */ ID3D11VertexShader* m_pVertexShader; - /* 0x0050 */ std::string m_shaderPath; - /* 0x0070 */ std::string m_vsEntry; - /* 0x0090 */ std::string m_psEntry; - /* 0x00B0 */ std::unordered_map m_mapPixelShaderBindings; - /* 0x00F0 */ std::unordered_map m_mapVertexShaderBindings; - /* 0x0130 */ uint64_t m_uInputDescHash; - /* 0x0138 */ std::vector m_vecDefines; + /* 0x0028 */ SDK_PUB ID3DBlob* m_pVertexShaderBlob; + /* 0x0030 */ SDK_PUB ID3DBlob* m_pPixelShaderBlob; + /* 0x0038 */ SDK_PUB std::uint32_t m_uVertexShaderBlobSize; + /* 0x003C */ SDK_PUB std::uint32_t m_uPixelShaderBlobSize; + /* 0x0040 */ SDK_PUB ID3D11PixelShader* m_pPixelShader; + /* 0x0048 */ SDK_PUB ID3D11VertexShader* m_pVertexShader; + /* 0x0050 */ SDK_PUB std::string m_shaderPath; + /* 0x0070 */ SDK_PUB std::string m_vsEntry; + /* 0x0090 */ SDK_PUB std::string m_psEntry; + /* 0x00B0 */ SDK_PUB std::unordered_map m_mapPixelShaderBindings; + /* 0x00F0 */ SDK_PUB std::unordered_map m_mapVertexShaderBindings; + /* 0x0130 */ SDK_PUB std::uint64_t m_uInputDescHash; + /* 0x0138 */ SDK_PUB std::vector m_vecDefines; }; // Size: 0x150 static_assert(offsetof(rend::D3D11ShaderProgram, rend::D3D11ShaderProgram::m_pVertexShaderBlob) == 0x28, "rend::D3D11ShaderProgram::m_pVertexShaderBlob: Incorrect offset"); @@ -59,9 +57,7 @@ static_assert(sizeof(rend::D3D11ShaderProgram) == 0x150, "rend::D3D11ShaderProgr class D3D11Layout : public rend::D3D11Resource { -public: - /* 0x0028 */ ID3D11InputLayout* m_pDxLayout; - + /* 0x0028 */ SDK_PUB ID3D11InputLayout* m_pDxLayout; }; // Size: 0x30 static_assert(offsetof(rend::D3D11Layout, rend::D3D11Layout::m_pDxLayout) == 0x28, "rend::D3D11Layout::m_pDxLayout: Incorrect offset"); diff --git a/include/SmSdk/Tool/ClientTool.hpp b/include/SmSdk/Tool/ClientTool.hpp index bca4c1c..20fcf4a 100644 --- a/include/SmSdk/Tool/ClientTool.hpp +++ b/include/SmSdk/Tool/ClientTool.hpp @@ -19,72 +19,70 @@ enum AnimationFlag : uint32_t struct ToolAnimationEntry { - /* 0x0000 */ std::string m_animName; - /* 0x0020 */ std::string m_nextAnim; - /* 0x0040 */ float m_fAnimBegin; - /* 0x0044 */ float m_fAnimEnd; - /* 0x0048 */ float m_fAnimTime; - /* 0x004C */ float m_fWeight; - /* 0x0050 */ float m_fPlaybackSpeed; - /* 0x0054 */ uint32_t m_uFlags; - + /* 0x0000 */ SDK_PUB std::string m_animName; + /* 0x0020 */ SDK_PUB std::string m_nextAnim; + /* 0x0040 */ SDK_PUB float m_fAnimBegin; + /* 0x0044 */ SDK_PUB float m_fAnimEnd; + /* 0x0048 */ SDK_PUB float m_fAnimTime; + /* 0x004C */ SDK_PUB float m_fWeight; + /* 0x0050 */ SDK_PUB float m_fPlaybackSpeed; + /* 0x0054 */ SDK_PUB std::uint32_t m_uFlags; }; // Size: 0x58 static_assert(sizeof(ToolAnimationEntry) == 0x58, "ToolAnimationEntry: Incorrect Size"); struct ToolAnimationList { - /* 0x0000 */ std::string m_toolIdle; - /* 0x0020 */ std::string m_toolIdleRelaxed; - /* 0x0040 */ std::string m_toolRunFwd; - /* 0x0060 */ std::string m_toolRunBwd; - /* 0x0080 */ std::string m_toolSprint; - /* 0x00A0 */ std::string m_toolJump; - /* 0x00C0 */ std::string m_toolJumpUp; - /* 0x00E0 */ std::string m_toolJumpDown; - /* 0x0100 */ std::string m_toolJumpLand; - /* 0x0120 */ std::string m_toolJumpLandFwd; - /* 0x0140 */ std::string m_toolJumpLandBwd; - /* 0x0160 */ std::string m_toolCrouchIdle; - /* 0x0180 */ std::string m_toolCrouchFwd; - /* 0x01A0 */ std::string m_toolCrouchBwd; -private: - /* 0x01C0 */ std::string m_someString1; - /* 0x01E0 */ std::string m_someString2; - /* 0x0200 */ std::string m_someString3; + /* 0x0000 */ SDK_PUB std::string m_toolIdle; + /* 0x0020 */ SDK_PUB std::string m_toolIdleRelaxed; + /* 0x0040 */ SDK_PUB std::string m_toolRunFwd; + /* 0x0060 */ SDK_PUB std::string m_toolRunBwd; + /* 0x0080 */ SDK_PUB std::string m_toolSprint; + /* 0x00A0 */ SDK_PUB std::string m_toolJump; + /* 0x00C0 */ SDK_PUB std::string m_toolJumpUp; + /* 0x00E0 */ SDK_PUB std::string m_toolJumpDown; + /* 0x0100 */ SDK_PUB std::string m_toolJumpLand; + /* 0x0120 */ SDK_PUB std::string m_toolJumpLandFwd; + /* 0x0140 */ SDK_PUB std::string m_toolJumpLandBwd; + /* 0x0160 */ SDK_PUB std::string m_toolCrouchIdle; + /* 0x0180 */ SDK_PUB std::string m_toolCrouchFwd; + /* 0x01A0 */ SDK_PUB std::string m_toolCrouchBwd; + /* 0x01C0 */ SDK_PRI std::string m_someString1; + /* 0x01E0 */ SDK_PRI std::string m_someString2; + /* 0x0200 */ SDK_PRI std::string m_someString3; }; // Size: 0x220 static_assert(sizeof(ToolAnimationList) == 0x220, "ToolAnimationList: Incorrect Size"); struct ToolAnimationData { - void setAnimation(const std::string& name) + SDK_PUB void setAnimation(const std::string& name) { - auto iter = this->m_mapAnimationData.find(name); - if (iter == this->m_mapAnimationData.end()) + auto iter = m_mapAnimationData.find(name); + if (iter == m_mapAnimationData.end()) return; - this->m_currentAnim = name; + m_currentAnim = name; iter->second.m_fAnimTime = 0.0f; - this->m_fAnimBegin = 0.2f; + m_fAnimBegin = 0.2f; } - bool hasAnimation(const std::string& name) const + SDK_PUB bool hasAnimation(const std::string& name) const { - return this->m_mapAnimationData.find(name) != this->m_mapAnimationData.end(); + return m_mapAnimationData.find(name) != m_mapAnimationData.end(); } - void resetAnimation(const std::string& name) + SDK_PUB void resetAnimation(const std::string& name) { - auto iter = this->m_mapAnimationData.find(name); - if (iter == this->m_mapAnimationData.end()) + auto iter = m_mapAnimationData.find(name); + if (iter == m_mapAnimationData.end()) return; iter->second.m_fAnimTime = 0.0f; iter->second.m_fWeight = 0.0f; } - void addNewAnimation( + SDK_PUB void addNewAnimation( const std::string& name, const std::string& startAnim, const std::string& nextAnim, @@ -103,59 +101,53 @@ struct ToolAnimationData newEntry.m_fPlaybackSpeed = playbackSpeed; newEntry.m_uFlags = flags; - this->m_mapAnimationData.emplace(name, newEntry); + m_mapAnimationData.emplace(name, newEntry); } - void removeAnimation(const std::string& name) + SDK_PUB void removeAnimation(const std::string& name) { - auto iter = this->m_mapAnimationData.find(name); - if (iter != this->m_mapAnimationData.end()) - this->m_mapAnimationData.erase(iter); + auto iter = m_mapAnimationData.find(name); + if (iter != m_mapAnimationData.end()) + m_mapAnimationData.erase(iter); } - /* 0x0000 */ ClientTool* m_pToolPtr; - /* 0x0008 */ std::unordered_map m_mapAnimationData; - /* 0x0048 */ std::string m_currentAnim; - /* 0x0068 */ ToolAnimationList m_toolAnimList; - /* 0x0288 */ float m_fAnimBegin; -private: - /* 0x028C */ char pad_0x28C[0x4]; - + /* 0x0000 */ SDK_PUB ClientTool* m_pToolPtr; + /* 0x0008 */ SDK_PUB std::unordered_map m_mapAnimationData; + /* 0x0048 */ SDK_PUB std::string m_currentAnim; + /* 0x0068 */ SDK_PUB ToolAnimationList m_toolAnimList; + /* 0x0288 */ SDK_PUB float m_fAnimBegin; + /* 0x028C */ SDK_PRI char pad_0x28C[0x4]; }; // Size: 0x290 static_assert(sizeof(ToolAnimationData) == 0x290, "ToolAnimationData: Incorrect Size"); class ClientTool : public IToolImpl { -public: - inline void setTpAnimation(const std::string& name) + SDK_PUB inline void setTpAnimation(const std::string& name) { m_tpAnims.setAnimation(name); } - inline void setFpAnimation(const std::string& name) + SDK_PUB inline void setFpAnimation(const std::string& name) { m_fpAnims.setAnimation(name); } - inline void setFpAndTpAnimation(const std::string& name) + SDK_PUB inline void setFpAndTpAnimation(const std::string& name) { this->setFpAnimation(name); this->setTpAnimation(name); } - /* 0x0008 */ ToolAnimationData m_tpAnims; - /* 0x0298 */ ToolAnimationData m_fpAnims; - /* 0x0528 */ std::shared_ptr m_pTool; - /* 0x0538 */ bool m_blockSprint; -private: - /* 0x0539 */ char pad_0x539[0x3]; -public: - /* 0x053C */ float m_fDispersionFraction; - /* 0x0540 */ float m_fCrosshairAlpha; - /* 0x0544 */ bool m_fInteractionTextSuppressed; -private: - /* 0x0545 */ char pad_0x545[0x3]; + /* 0x0008 */ SDK_PUB ToolAnimationData m_tpAnims; + /* 0x0298 */ SDK_PUB ToolAnimationData m_fpAnims; + /* 0x0528 */ SDK_PUB std::shared_ptr m_pTool; + /* 0x0538 */ SDK_PUB bool m_blockSprint; + /* 0x0539 */ SDK_PRI char pad_0x539[0x3]; + /* 0x053C */ SDK_PUB float m_fDispersionFraction; + /* 0x0540 */ SDK_PUB float m_fCrosshairAlpha; + /* 0x0544 */ SDK_PUB bool m_fInteractionTextSuppressed; + /* 0x0545 */ SDK_PRI char pad_0x545[0x3]; }; // Size: 0x548 static_assert(sizeof(ClientTool) == 0x548, "ClientTool: Incorrect Size"); diff --git a/include/SmSdk/Tool/IToolImpl.hpp b/include/SmSdk/Tool/IToolImpl.hpp index e99a73b..bcf5307 100644 --- a/include/SmSdk/Tool/IToolImpl.hpp +++ b/include/SmSdk/Tool/IToolImpl.hpp @@ -6,15 +6,13 @@ SMSDK_BEGIN_NAMESPACE struct IToolImpl { -private: - virtual void func1() { /* implemented by the game */ } - virtual void func2() { /* implemented by the game */ } - virtual void func3() { /* implemented by the game */ } - virtual void func4() { /* implemented by the game */ } - virtual void func5() { /* implemented by the game */ } - virtual void func6() { /* implemented by the game */ } -public: - virtual bool isEquipped() { return false; /* implemented by the game */ } + SDK_PRI virtual void func1() { /* implemented by the game */ } + SDK_PRI virtual void func2() { /* implemented by the game */ } + SDK_PRI virtual void func3() { /* implemented by the game */ } + SDK_PRI virtual void func4() { /* implemented by the game */ } + SDK_PRI virtual void func5() { /* implemented by the game */ } + SDK_PRI virtual void func6() { /* implemented by the game */ } + SDK_PUB virtual bool isEquipped() { return false; /* implemented by the game */ } }; // Size: 0x8 static_assert(sizeof(IToolImpl) == 0x8, "IToolImpl: Incorrect Size"); diff --git a/include/SmSdk/Tool/IToolNetworkData.hpp b/include/SmSdk/Tool/IToolNetworkData.hpp index c8ba803..063a008 100644 --- a/include/SmSdk/Tool/IToolNetworkData.hpp +++ b/include/SmSdk/Tool/IToolNetworkData.hpp @@ -6,10 +6,9 @@ SMSDK_BEGIN_NAMESPACE class IToolNetworkData { -public: - virtual ~IToolNetworkData() = default; + SDK_PUB virtual ~IToolNetworkData() = default; - /* 0x0008 */ bool m_bDataChanged; + /* 0x0008 */ SDK_PUB bool m_bDataChanged; }; // Size: 0x10 static_assert(offsetof(IToolNetworkData, IToolNetworkData::m_bDataChanged) == 0x8, "IToolNetworkData::m_bDataChanged: Incorrect offset"); diff --git a/include/SmSdk/Tool/PaintTool.hpp b/include/SmSdk/Tool/PaintTool.hpp index 8ad7073..0604ade 100644 --- a/include/SmSdk/Tool/PaintTool.hpp +++ b/include/SmSdk/Tool/PaintTool.hpp @@ -13,71 +13,51 @@ SMSDK_BEGIN_NAMESPACE class PaintToolNetworkData : public IToolNetworkData { -public: - /* 0x0010 */ Color m_paintColor; - /* 0x0014 */ bool m_bColorUpdated; -private: - /* 0x0015 */ char pad_0x15[0x3]; -public: - /* 0x0018 */ std::function m_function; - + /* 0x0010 */ SDK_PUB Color m_paintColor; + /* 0x0014 */ SDK_PUB bool m_bColorUpdated; + /* 0x0015 */ SDK_PRI char pad_0x15[0x3]; + /* 0x0018 */ SDK_PUB std::function m_function; }; // Size: 0x58 static_assert(sizeof(PaintToolNetworkData) == 0x58, "PaintToolNetworkData: Incorrect Size"); struct PaintToolSelectionData { - /* 0x0000 */ std::int32_t m_iObjectId; - /* 0x0004 */ std::int32_t m_iObjectType; -private: - /* 0x0008 */ DirectX::XMFLOAT3 m_someVector; -public: - /* 0x0014 */ DirectX::XMINT3 m_selectionBoxLimiter; - /* 0x0020 */ DirectX::XMINT3 m_selectionBoxMin; - /* 0x002C */ DirectX::XMINT3 m_selectionBoxMax; -private: - /* 0x0038 */ char pad_0x38[0x8]; + /* 0x0000 */ SDK_PUB std::int32_t m_iObjectId; + /* 0x0004 */ SDK_PUB std::int32_t m_iObjectType; + /* 0x0008 */ SDK_PRI DirectX::XMFLOAT3 m_someVector; + /* 0x0014 */ SDK_PUB DirectX::XMINT3 m_selectionBoxLimiter; + /* 0x0020 */ SDK_PUB DirectX::XMINT3 m_selectionBoxMin; + /* 0x002C */ SDK_PUB DirectX::XMINT3 m_selectionBoxMax; + /* 0x0038 */ SDK_PRI char pad_0x38[0x8]; }; // Size: 0x40 static_assert(sizeof(PaintToolSelectionData) == 0x40, "PaintToolSelectionData: Incorrect Size"); class PaintTool : public ClientTool { -private: - /* 0x0548 */ char pad_0x548[0x8]; -public: - /* 0x0550 */ Color m_paintColor; - /* 0x0554 */ std::int32_t m_iLmbState; - /* 0x0558 */ std::int32_t m_iRmbState; -private: - /* 0x055C */ char pad_0x55C[0x4]; -public: - /* 0x0560 */ PaintToolSelectionData m_paintSelection; - /* 0x05A0 */ PaintToolSelectionData m_eraseSelection; - /* 0x05E0 */ DirectX::XMMATRIX m_paintSelectionObjectMatrix; - /* 0x0620 */ DirectX::XMMATRIX m_eraseSelectionObjectMatrix; - /* 0x0660 */ bool m_bSelectorEnabled; -private: - /* 0x0661 */ char pad_0x661[0x3]; -public: - /* 0x0664 */ std::int32_t m_iSelectedObjectId; - /* 0x0668 */ DirectX::XMINT3 m_selectorPosition; -private: - /* 0x0674 */ char pad_0x674[0xC]; -public: - /* 0x0680 */ DirectX::XMMATRIX m_selectorObjectMatrix; - /* 0x06C0 */ float m_fTimeSinceLastChange; - /* 0x06C4 */ Color m_prevPaintColor; - /* 0x06C8 */ Color m_visualizationColor; -private: - /* 0x06CC */ char pad_0x6CC[0x4]; -public: - /* 0x06D0 */ PaintToolNetworkData* m_pNetworkData; -private: - /* 0x06D8 */ char pad_0x6D8[0x8]; -public: - /* 0x06E0 */ std::shared_ptr m_pGuiInterface; - + /* 0x0548 */ SDK_PRI char pad_0x548[0x8]; + /* 0x0550 */ SDK_PUB Color m_paintColor; + /* 0x0554 */ SDK_PUB std::int32_t m_iLmbState; + /* 0x0558 */ SDK_PUB std::int32_t m_iRmbState; + /* 0x055C */ SDK_PRI char pad_0x55C[0x4]; + /* 0x0560 */ SDK_PUB PaintToolSelectionData m_paintSelection; + /* 0x05A0 */ SDK_PUB PaintToolSelectionData m_eraseSelection; + /* 0x05E0 */ SDK_PUB DirectX::XMMATRIX m_paintSelectionObjectMatrix; + /* 0x0620 */ SDK_PUB DirectX::XMMATRIX m_eraseSelectionObjectMatrix; + /* 0x0660 */ SDK_PUB bool m_bSelectorEnabled; + /* 0x0661 */ SDK_PRI char pad_0x661[0x3]; + /* 0x0664 */ SDK_PUB std::int32_t m_iSelectedObjectId; + /* 0x0668 */ SDK_PUB DirectX::XMINT3 m_selectorPosition; + /* 0x0674 */ SDK_PRI char pad_0x674[0xC]; + /* 0x0680 */ SDK_PUB DirectX::XMMATRIX m_selectorObjectMatrix; + /* 0x06C0 */ SDK_PUB float m_fTimeSinceLastChange; + /* 0x06C4 */ SDK_PUB Color m_prevPaintColor; + /* 0x06C8 */ SDK_PUB Color m_visualizationColor; + /* 0x06CC */ SDK_PRI char pad_0x6CC[0x4]; + /* 0x06D0 */ SDK_PUB PaintToolNetworkData* m_pNetworkData; + /* 0x06D8 */ SDK_PRI char pad_0x6D8[0x8]; + /* 0x06E0 */ SDK_PUB std::shared_ptr m_pGuiInterface; }; // Size: 0x6F0 static_assert(sizeof(PaintTool) == 0x6F0, "PaintTool: Incorrect Size"); diff --git a/include/SmSdk/Tool/Tool.hpp b/include/SmSdk/Tool/Tool.hpp index 6b9686e..04cb12b 100644 --- a/include/SmSdk/Tool/Tool.hpp +++ b/include/SmSdk/Tool/Tool.hpp @@ -9,21 +9,14 @@ SMSDK_BEGIN_NAMESPACE class Tool : public NetObj { -public: -private: - /* 0x0028 */ char pad_0x28[0x8]; -public: - /* 0x0030 */ char uuid[16]; - /* 0x0040 */ std::int32_t m_iOwnerId; -private: - /* 0x0044 */ char pad_0x44[0x4]; -public: - /* 0x0048 */ std::shared_ptr m_pImplementation; - /* 0x0058 */ IToolNetworkData* m_pNetworkData; - /* 0x0060 */ bool m_bMovementSlowDown; -private: - /* 0x0061 */ char pad_0x61[0xF]; - + /* 0x0028 */ SDK_PRI char pad_0x28[0x8]; + /* 0x0030 */ SDK_PUB char uuid[16]; + /* 0x0040 */ SDK_PUB std::int32_t m_iOwnerId; + /* 0x0044 */ SDK_PRI char pad_0x44[0x4]; + /* 0x0048 */ SDK_PUB std::shared_ptr m_pImplementation; + /* 0x0058 */ SDK_PUB IToolNetworkData* m_pNetworkData; + /* 0x0060 */ SDK_PUB bool m_bMovementSlowDown; + /* 0x0061 */ SDK_PRI char pad_0x61[0xF]; }; // Size: 0x70 static_assert(sizeof(Tool) == 0x70, "Tool: Incorrect Size"); diff --git a/include/SmSdk/config.hpp b/include/SmSdk/config.hpp index 9ecd981..40f054e 100644 --- a/include/SmSdk/config.hpp +++ b/include/SmSdk/config.hpp @@ -42,6 +42,10 @@ struct PassthroughHash } }; +#define SDK_PUB public: +#define SDK_PRI private: +#define SDK_PRO protected: + #ifdef SMSDK_NAMESPACE #define SMSDK_BEGIN_NAMESPACE namespace SMSDK_NAMESPACE { #define SMSDK_END_NAMESPACE } diff --git a/include/SmSdk/mygui_include.hpp b/include/SmSdk/mygui_include.hpp index 3632f70..495e854 100644 --- a/include/SmSdk/mygui_include.hpp +++ b/include/SmSdk/mygui_include.hpp @@ -61,6 +61,14 @@ class TextBox class LayoutManager { }; +// This is a stub, please define `SMSDK_ENABLE_MYGUI` to use MyGUI +class Button +{ +}; +// This is a stub, please define `SMSDK_ENABLE_MYGUI` to use MyGUI +class ItemBox +{ +}; } #endif diff --git a/src/CreationManager.cpp b/src/CreationManager.cpp index 5728b29..7882603 100644 --- a/src/CreationManager.cpp +++ b/src/CreationManager.cpp @@ -3,38 +3,38 @@ SMSDK_USE_NAMESPACE -BodyStructure* CreationManager::_getBodyData(int iId) +BodyState* CreationManager::_getBodyState(const std::uint32_t uId) { - auto iter = m_mapBodies.find(iId); - if (iter == m_mapBodies.end()) + auto iter = m_mapBodyStates.find(uId); + if (iter == m_mapBodyStates.end()) return nullptr; return &iter->second; } -JointStructure* CreationManager::_getJointData(int iId) +JointState* CreationManager::_getJointState(const std::uint32_t uId) { - auto iter = m_mapJoints.find(iId); - if (iter == m_mapJoints.end()) + auto iter = m_mapJointStates.find(uId); + if (iter == m_mapJointStates.end()) return nullptr; return &iter->second; } -BodyStructure* CreationManager::GetBodyData(int iId) +BodyState* CreationManager::GetBodyState(const std::uint32_t uId) { CreationManager* pCreationManager = CreationManager::GetInstance(); if (!pCreationManager) return nullptr; - return pCreationManager->_getBodyData(iId); + return pCreationManager->_getBodyState(uId); } -JointStructure* CreationManager::GetJointData(int iId) +JointState* CreationManager::GetJointState(const std::uint32_t uId) { CreationManager* pCreationManager = CreationManager::GetInstance(); if (!pCreationManager) return nullptr; - return pCreationManager->_getJointData(iId); + return pCreationManager->_getJointState(uId); } \ No newline at end of file