mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-01 01:01:19 -06:00
* Implemented guest-to-host function pointers (WIP) Co-Authored-By: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com> * function: support more types for function pointers * api: ported BlueBlur headers and misc. research * Move over function-pointers changes from options-menu branch. --------- Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
36 lines
728 B
C++
36 lines
728 B
C++
namespace Chao::CSD
|
|
{
|
|
inline RCPtrAbs::RCObject::~RCObject()
|
|
{
|
|
GuestToHostFunction<void>(m_pVftable->m_fpDtor, this);
|
|
}
|
|
|
|
inline RCPtrAbs::~RCPtrAbs()
|
|
{
|
|
RCPtrAbs::RCObject* pObj = m_pObject;
|
|
|
|
m_pObject = nullptr;
|
|
|
|
if (pObj)
|
|
pObj->Release();
|
|
}
|
|
|
|
inline void* RCPtrAbs::GetAbs() const
|
|
{
|
|
if (!m_pObject)
|
|
return nullptr;
|
|
|
|
return m_pObject->m_pMemory;
|
|
}
|
|
|
|
inline void RCPtrAbs::RCObject::Deallocate(void* in_pMemory)
|
|
{
|
|
GuestToHostFunction<void>(m_pVftable->m_fpDeallocate, this, in_pMemory);
|
|
}
|
|
|
|
inline void RCPtrAbs::RCObject::Release()
|
|
{
|
|
GuestToHostFunction<void>(0x830BA068, this);
|
|
}
|
|
}
|