//
// GameObject::addEmptyGlow from 0x642a20 to 0x642b28 (264 bytes)
//
// 3 xrefs:
// > GameObject::setupCustomSprites @ 0x99b840
// > GameObject::setupCustomSprites @ 0x99b8b0
// > ??> @ 0x35c88
//
// 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
//
void GameObject::addEmptyGlow(GameObject *a1)
{
char *v2; // x0
cocos2d::CCSprite *m_glowSprite; // x0
unsigned int *v4; // x2
int v5; // w1
const char *v6; // [xsp+40h] [xbp+40h] BYREF
sub_D153B8((int)&v6, "emptyGlow.png");
GameObject::createGlow(a1, &v6);
v2 = (char *)(v6 - 24);
if ( v6 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v4 = (unsigned int *)(v6 - 8);
do
v5 = __ldaxr(v4);
while ( __stlxr(v5 - 1, v4) );
}
else
{
v5 = *((_DWORD *)v6 - 2);
*((_DWORD *)v6 - 2) = v5 - 1;
}
if ( v5 <= 0 )
operator delete(v2);
}
m_glowSprite = a1->m_glowSprite;
if ( m_glowSprite )
m_glowSprite->m_bDontDraw = 1;
}