mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 21:37:58 +03:00
Replace indirect guest function calls with direct ones. (#141)
This commit is contained in:
parent
e8d36998a5
commit
fefd177b3a
7 changed files with 23 additions and 23 deletions
|
@ -9,41 +9,41 @@ namespace Chao::CSD
|
||||||
|
|
||||||
inline void CNode::SetText(const char* in_pText)
|
inline void CNode::SetText(const char* in_pText)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x830BF640, this, in_pText);
|
GuestToHostFunction<int>(sub_830BF640, this, in_pText);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CNode::SetText(const wchar_t* in_pText)
|
inline void CNode::SetText(const wchar_t* in_pText)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x830BF640, this, in_pText);
|
GuestToHostFunction<int>(sub_830BF640, this, in_pText);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CNode::GetPosition(Hedgehog::Math::CVector2& out_rResult) const
|
inline void CNode::GetPosition(Hedgehog::Math::CVector2& out_rResult) const
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BF008, &out_rResult, this);
|
GuestToHostFunction<void>(sub_830BF008, &out_rResult, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CNode::SetPosition(float in_X, float in_Y)
|
inline void CNode::SetPosition(float in_X, float in_Y)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x830BF078, this, in_X, in_Y);
|
GuestToHostFunction<int>(sub_830BF078, this, in_X, in_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CNode::SetHideFlag(uint32_t in_HideFlag)
|
inline void CNode::SetHideFlag(uint32_t in_HideFlag)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x830BF080, this, in_HideFlag);
|
GuestToHostFunction<int>(sub_830BF080, this, in_HideFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CNode::SetRotation(float in_Rotation)
|
inline void CNode::SetRotation(float in_Rotation)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x830BF088, this, in_Rotation);
|
GuestToHostFunction<int>(sub_830BF088, this, in_Rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CNode::SetScale(float in_X, float in_Y)
|
inline void CNode::SetScale(float in_X, float in_Y)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x830BF090, this, in_X, in_Y);
|
GuestToHostFunction<int>(sub_830BF090, this, in_X, in_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CNode::SetPatternIndex(uint32_t in_PatternIndex)
|
inline void CNode::SetPatternIndex(uint32_t in_PatternIndex)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x830BF300, this, in_PatternIndex);
|
GuestToHostFunction<int>(sub_830BF300, this, in_PatternIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,20 +5,20 @@ namespace Chao::CSD
|
||||||
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName) const
|
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName) const
|
||||||
{
|
{
|
||||||
RCPtr<CScene> rcScene;
|
RCPtr<CScene> rcScene;
|
||||||
GuestToHostFunction<void>(0x830BEE00, this, rcScene, in_pName, nullptr);
|
GuestToHostFunction<void>(sub_830BEE00, this, rcScene, in_pName, nullptr);
|
||||||
return rcScene;
|
return rcScene;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName, const char* in_pMotionName) const
|
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName, const char* in_pMotionName) const
|
||||||
{
|
{
|
||||||
RCPtr<CScene> rcScene;
|
RCPtr<CScene> rcScene;
|
||||||
GuestToHostFunction<void>(0x830BECE0, this, rcScene, in_pName, in_pMotionName, nullptr);
|
GuestToHostFunction<void>(sub_830BECE0, this, rcScene, in_pName, in_pMotionName, nullptr);
|
||||||
return rcScene;
|
return rcScene;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CProject::DestroyScene(CScene* in_pScene)
|
inline void CProject::DestroyScene(CScene* in_pScene)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BE298, this, in_pScene);
|
GuestToHostFunction<void>(sub_830BE298, this, in_pScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CProject::DestroyScene(RCPtr<CScene>& inout_rcScene)
|
inline void CProject::DestroyScene(RCPtr<CScene>& inout_rcScene)
|
||||||
|
|
|
@ -30,6 +30,6 @@ namespace Chao::CSD
|
||||||
|
|
||||||
inline void RCPtrAbs::RCObject::Release()
|
inline void RCPtrAbs::RCObject::Release()
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BA068, this);
|
GuestToHostFunction<void>(sub_830BA068, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,12 +27,12 @@ namespace Chao::CSD
|
||||||
|
|
||||||
inline void RCPtrAbs::AttachAbs(void* in_pMemory)
|
inline void RCPtrAbs::AttachAbs(void* in_pMemory)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BA298, this, in_pMemory);
|
GuestToHostFunction<void>(sub_830BA298, this, in_pMemory);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void RCPtrAbs::SetAbs(const RCPtrAbs& in_rPtr)
|
inline void RCPtrAbs::SetAbs(const RCPtrAbs& in_rPtr)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BA328, this, in_rPtr);
|
GuestToHostFunction<void>(sub_830BA328, this, in_rPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void* RCPtrAbs::operator*() const
|
inline void* RCPtrAbs::operator*() const
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace Chao::CSD
|
||||||
|
|
||||||
inline bool CScene::SetMotion(const char* in_pName)
|
inline bool CScene::SetMotion(const char* in_pName)
|
||||||
{
|
{
|
||||||
return GuestToHostFunction<bool>(0x830BA760, this, in_pName);
|
return GuestToHostFunction<bool>(sub_830BA760, this, in_pName);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CScene::SetMotionFrame(float in_MotionFrame)
|
inline void CScene::SetMotionFrame(float in_MotionFrame)
|
||||||
|
@ -33,21 +33,21 @@ namespace Chao::CSD
|
||||||
|
|
||||||
inline void CScene::SetPosition(float in_X, float in_Y)
|
inline void CScene::SetPosition(float in_X, float in_Y)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BB550, this, in_X, in_Y);
|
GuestToHostFunction<void>(sub_830BB550, this, in_X, in_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CScene::SetHideFlag(uint32_t in_HideFlag)
|
inline void CScene::SetHideFlag(uint32_t in_HideFlag)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BB378, this, in_HideFlag);
|
GuestToHostFunction<void>(sub_830BB378, this, in_HideFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CScene::SetRotation(float in_Angle)
|
inline void CScene::SetRotation(float in_Angle)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BB5F8, this, in_Angle);
|
GuestToHostFunction<void>(sub_830BB5F8, this, in_Angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CScene::SetScale(float in_X, float in_Y)
|
inline void CScene::SetScale(float in_X, float in_Y)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<void>(0x830BB650, this, in_X, in_Y);
|
GuestToHostFunction<void>(sub_830BB650, this, in_X, in_Y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ namespace SWA
|
||||||
inline boost::shared_ptr<CCsdProject> CCsdDatabaseWrapper::GetCsdProject(const Hedgehog::Base::CSharedString& in_rName)
|
inline boost::shared_ptr<CCsdProject> CCsdDatabaseWrapper::GetCsdProject(const Hedgehog::Base::CSharedString& in_rName)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<CCsdProject> spCsdProject;
|
boost::shared_ptr<CCsdProject> spCsdProject;
|
||||||
GuestToHostFunction<void>(0x825E2B40, &in_rName, this, &spCsdProject, 0);
|
GuestToHostFunction<void>(sub_825E2B40, &in_rName, this, &spCsdProject, 0);
|
||||||
return spCsdProject;
|
return spCsdProject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ void CHudPauseAddOptionsItemMidAsmHook(PPCRegister& pThis)
|
||||||
guest_stack_var<Hedgehog::Base::CSharedString> menu("TopMenu");
|
guest_stack_var<Hedgehog::Base::CSharedString> menu("TopMenu");
|
||||||
guest_stack_var<Hedgehog::Base::CSharedString> name("option");
|
guest_stack_var<Hedgehog::Base::CSharedString> name("option");
|
||||||
|
|
||||||
GuestToHostFunction<int>(0x824AE690, pThis.u32, menu.get(), name.get());
|
GuestToHostFunction<int>(sub_824AE690, pThis.u32, menu.get(), name.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InjectMenuBehaviour(uint32_t pThis, uint32_t count)
|
bool InjectMenuBehaviour(uint32_t pThis, uint32_t count)
|
||||||
|
@ -125,7 +125,7 @@ PPC_FUNC(sub_824B0930)
|
||||||
// Re-open pause menu after achievement menu closes with delay.
|
// Re-open pause menu after achievement menu closes with delay.
|
||||||
if (g_achievementMenuOutroTime >= g_achievementMenuOutroThreshold)
|
if (g_achievementMenuOutroTime >= g_achievementMenuOutroThreshold)
|
||||||
{
|
{
|
||||||
GuestToHostFunction<int>(0x824AFD28, pHudPause, 0, 1, 0, 0);
|
GuestToHostFunction<int>(sub_824AFD28, pHudPause, 0, 1, 0, 0);
|
||||||
|
|
||||||
g_achievementMenuOutroTime = 0;
|
g_achievementMenuOutroTime = 0;
|
||||||
g_isAchievementMenuOutro = false;
|
g_isAchievementMenuOutro = false;
|
||||||
|
@ -152,7 +152,7 @@ PPC_FUNC(sub_824B0930)
|
||||||
{
|
{
|
||||||
OptionsMenu::Close();
|
OptionsMenu::Close();
|
||||||
|
|
||||||
GuestToHostFunction<int>(0x824AFD28, pHudPause, 0, 0, 0, 1);
|
GuestToHostFunction<int>(sub_824AFD28, pHudPause, 0, 0, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue