mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-04 16:37:28 -06:00
api: get singletons using g_memory.Translate
This commit is contained in:
@@ -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,11 +3,11 @@ 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
|
||||
{
|
||||
return m_PadStates[m_CurrentPadStateIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user