mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
api: get singletons using g_memory.Translate
This commit is contained in:
parent
c2ce012155
commit
da776db1a2
6 changed files with 15 additions and 18 deletions
|
|
@ -5,14 +5,19 @@ namespace SWA
|
|||
class CApplicationDocument // : public Hedgehog::Base::CSynchronizedObject
|
||||
{
|
||||
public:
|
||||
// TODO: use g_memory.Translate?
|
||||
// TODO: Hedgehog::Base::TSynchronizedPtr<CApplicationDocument>*
|
||||
inline static xpointer<CApplicationDocument>* ms_pInstance = (xpointer<CApplicationDocument>*)0x1833678A0;
|
||||
class CMember
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x138);
|
||||
void* m_spGameParameter;
|
||||
};
|
||||
|
||||
// TODO: Hedgehog::Base::TSynchronizedPtr<CApplicationDocument>
|
||||
static CApplicationDocument* GetInstance();
|
||||
|
||||
SWA_INSERT_PADDING(0x18);
|
||||
SWA_INSERT_PADDING(0x04);
|
||||
xpointer<CMember> m_pMember;
|
||||
SWA_INSERT_PADDING(0x14);
|
||||
be<uint32_t> m_Region;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ namespace SWA
|
|||
// TODO: Hedgehog::Base::TSynchronizedPtr<CApplicationDocument>
|
||||
inline CApplicationDocument* CApplicationDocument::GetInstance()
|
||||
{
|
||||
return *ms_pInstance;
|
||||
return *(xpointer<CApplicationDocument>*)g_memory.Translate(0x833678A0);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,10 +12,6 @@ namespace SWA
|
|||
be<uint32_t> m_Score;
|
||||
};
|
||||
|
||||
// TODO: use g_memory.Translate?
|
||||
// TODO: Hedgehog::Base::TSynchronizedPtr<CGameDocument>*
|
||||
inline static xpointer<CGameDocument>* ms_pInstance = (xpointer<CGameDocument>*)0x183367900;
|
||||
|
||||
// TODO: Hedgehog::Base::TSynchronizedPtr<CGameDocument>
|
||||
static CGameDocument* GetInstance();
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ namespace SWA
|
|||
// TODO: Hedgehog::Base::TSynchronizedPtr<CGameDocument>
|
||||
inline CGameDocument* CGameDocument::GetInstance()
|
||||
{
|
||||
return *ms_pInstance;
|
||||
return *(xpointer<CGameDocument>*)g_memory.Translate(0x83367900);
|
||||
}
|
||||
}
|
||||
|
|
@ -8,10 +8,6 @@ namespace SWA
|
|||
class CInputState // : public Hedgehog::Base::CSynchronizedObject
|
||||
{
|
||||
public:
|
||||
// TODO: use g_memory.Translate?
|
||||
// TODO: Hedgehog::Base::TSynchronizedPtr<CInputState>*
|
||||
inline static xpointer<CInputState>* ms_pInstance = (xpointer<CInputState>*)0x1833671EC;
|
||||
|
||||
// TODO: Hedgehog::Base::TSynchronizedPtr<CInputState>
|
||||
static CInputState* GetInstance();
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ namespace SWA
|
|||
// TODO: Hedgehog::Base::TSynchronizedPtr<CInputState>
|
||||
inline CInputState* CInputState::GetInstance()
|
||||
{
|
||||
return *ms_pInstance;
|
||||
return *(xpointer<CInputState>*)g_memory.Translate(0x833671EC);
|
||||
}
|
||||
|
||||
inline const SPadState& CInputState::GetPadState() const
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue