//
// GameObject::perspectiveColorFrame from 0x9849cc to 0x984ac4 (248 bytes)
//
// 13 xrefs:
// > GameObject::setupCustomSprites @ 0x985548
// > GameObject::setupCustomSprites @ 0x990808
// > GameObject::setupCustomSprites @ 0x9909e8
// > GameObject::setupCustomSprites @ 0x990abc
// > GameObject::setupCustomSprites @ 0x990bdc
// > GameObject::setupCustomSprites @ 0x990c28
// > GameObject::setupCustomSprites @ 0x990d24
// > GameObject::setupCustomSprites @ 0x9910c8
// > GameObject::setupCustomSprites @ 0x991114
// > GameObject::setupCustomSprites @ 0x991234
// > GameObject::setupCustomSprites @ 0x99127c
// > GameObject::setupCustomSprites @ 0x996078
// > ??> @ 0x94368
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __usercall GameObject::perspectiveColorFrame@(
GameObject *this@,
const char *a2@,
unsigned int a3@,
__int64 a4@)
{
char *v5; // x0
unsigned int *v7; // x2
int v8; // w1
char *v9; // [xsp+40h] [xbp+40h] BYREF
GameObject::perspectiveFrame(this, a2, a3, (__int64)&v9);
GameObject::getColorFrame(&v9, a4);
v5 = v9 - 24;
if ( v9 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v9 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *((_DWORD *)v9 - 2);
*((_DWORD *)v9 - 2) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v5);
}
return a4;
}