mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-01 09:12:37 -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>
59 lines
1.2 KiB
C++
59 lines
1.2 KiB
C++
namespace Chao::CSD
|
|
{
|
|
inline RCPtrAbs::RCPtrAbs()
|
|
{
|
|
AttachAbs(nullptr);
|
|
}
|
|
|
|
inline RCPtrAbs::RCPtrAbs(void* in_pMemory)
|
|
{
|
|
AttachAbs(in_pMemory);
|
|
}
|
|
|
|
inline RCPtrAbs::RCPtrAbs(const RCPtrAbs& in_rOther)
|
|
{
|
|
SetAbs(in_rOther);
|
|
}
|
|
|
|
inline RCPtrAbs::RCPtrAbs(RCPtrAbs&& in_rPtr) : m_pObject(in_rPtr.m_pObject)
|
|
{
|
|
in_rPtr.m_pObject = nullptr;
|
|
}
|
|
|
|
inline RCPtrAbs::RCObject* RCPtrAbs::CreateRCObject()
|
|
{
|
|
return GuestToHostFunction<RCPtrAbs::RCObject*>(m_pVftable->m_fpCreateRCObject, this);
|
|
}
|
|
|
|
inline void RCPtrAbs::AttachAbs(void* in_pMemory)
|
|
{
|
|
GuestToHostFunction<void>(0x830BA298, this, in_pMemory);
|
|
}
|
|
|
|
inline void RCPtrAbs::SetAbs(const RCPtrAbs& in_rPtr)
|
|
{
|
|
GuestToHostFunction<void>(0x830BA328, this, in_rPtr);
|
|
}
|
|
|
|
inline void* RCPtrAbs::operator*() const
|
|
{
|
|
return GetAbs();
|
|
}
|
|
|
|
inline void* RCPtrAbs::operator->() const
|
|
{
|
|
return GetAbs();
|
|
}
|
|
|
|
inline RCPtrAbs& RCPtrAbs::operator=(const RCPtrAbs& in_rPtr)
|
|
{
|
|
SetAbs(in_rPtr);
|
|
return *this;
|
|
}
|
|
|
|
inline RCPtrAbs::operator bool() const
|
|
{
|
|
return m_pObject != nullptr;
|
|
}
|
|
}
|