diff --git a/UnleashedRecomp/api/SWA/System/ApplicationDocument.h b/UnleashedRecomp/api/SWA/System/ApplicationDocument.h index 717c81a..598c471 100644 --- a/UnleashedRecomp/api/SWA/System/ApplicationDocument.h +++ b/UnleashedRecomp/api/SWA/System/ApplicationDocument.h @@ -5,14 +5,19 @@ namespace SWA class CApplicationDocument // : public Hedgehog::Base::CSynchronizedObject { public: - // TODO: use g_memory.Translate? - // TODO: Hedgehog::Base::TSynchronizedPtr* - inline static xpointer* ms_pInstance = (xpointer*)0x1833678A0; + class CMember + { + public: + SWA_INSERT_PADDING(0x138); + void* m_spGameParameter; + }; // TODO: Hedgehog::Base::TSynchronizedPtr static CApplicationDocument* GetInstance(); - SWA_INSERT_PADDING(0x18); + SWA_INSERT_PADDING(0x04); + xpointer m_pMember; + SWA_INSERT_PADDING(0x14); be m_Region; }; } diff --git a/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl b/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl index c18e0bc..2177004 100644 --- a/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl +++ b/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl @@ -3,6 +3,6 @@ namespace SWA // TODO: Hedgehog::Base::TSynchronizedPtr inline CApplicationDocument* CApplicationDocument::GetInstance() { - return *ms_pInstance; + return *(xpointer*)g_memory.Translate(0x833678A0); } -} \ No newline at end of file +} diff --git a/UnleashedRecomp/api/SWA/System/GameDocument.h b/UnleashedRecomp/api/SWA/System/GameDocument.h index db4fecf..e13f607 100644 --- a/UnleashedRecomp/api/SWA/System/GameDocument.h +++ b/UnleashedRecomp/api/SWA/System/GameDocument.h @@ -12,10 +12,6 @@ namespace SWA be m_Score; }; - // TODO: use g_memory.Translate? - // TODO: Hedgehog::Base::TSynchronizedPtr* - inline static xpointer* ms_pInstance = (xpointer*)0x183367900; - // TODO: Hedgehog::Base::TSynchronizedPtr static CGameDocument* GetInstance(); diff --git a/UnleashedRecomp/api/SWA/System/GameDocument.inl b/UnleashedRecomp/api/SWA/System/GameDocument.inl index fff5b16..0653376 100644 --- a/UnleashedRecomp/api/SWA/System/GameDocument.inl +++ b/UnleashedRecomp/api/SWA/System/GameDocument.inl @@ -3,6 +3,6 @@ namespace SWA // TODO: Hedgehog::Base::TSynchronizedPtr inline CGameDocument* CGameDocument::GetInstance() { - return *ms_pInstance; + return *(xpointer*)g_memory.Translate(0x83367900); } -} \ No newline at end of file +} diff --git a/UnleashedRecomp/api/SWA/System/InputState.h b/UnleashedRecomp/api/SWA/System/InputState.h index e6d8f6a..defe936 100644 --- a/UnleashedRecomp/api/SWA/System/InputState.h +++ b/UnleashedRecomp/api/SWA/System/InputState.h @@ -8,10 +8,6 @@ namespace SWA class CInputState // : public Hedgehog::Base::CSynchronizedObject { public: - // TODO: use g_memory.Translate? - // TODO: Hedgehog::Base::TSynchronizedPtr* - inline static xpointer* ms_pInstance = (xpointer*)0x1833671EC; - // TODO: Hedgehog::Base::TSynchronizedPtr static CInputState* GetInstance(); diff --git a/UnleashedRecomp/api/SWA/System/InputState.inl b/UnleashedRecomp/api/SWA/System/InputState.inl index 16b0c99..0e92a5e 100644 --- a/UnleashedRecomp/api/SWA/System/InputState.inl +++ b/UnleashedRecomp/api/SWA/System/InputState.inl @@ -3,11 +3,11 @@ namespace SWA // TODO: Hedgehog::Base::TSynchronizedPtr inline CInputState* CInputState::GetInstance() { - return *ms_pInstance; + return *(xpointer*)g_memory.Translate(0x833671EC); } inline const SPadState& CInputState::GetPadState() const { return m_PadStates[m_CurrentPadStateIndex]; } -} \ No newline at end of file +}