//
// PlayerObject::updatePlayerGlow from 0x100415a20 to 0x100415ba7 (391 bytes)
//
// 6 xrefs:
// > PlayerObject::doReversePlayer @ 0x10040252a
// > PlayerObject::toggleFlyMode @ 0x1004165a0
// > PlayerObject::resetPlayerIcon @ 0x100416c2b
// > PlayerObject::toggleBirdMode @ 0x100417015
// > PlayerObject::toggleRobotMode @ 0x100418cc4
// > PlayerObject::toggleSpiderMode @ 0x100419107
//
// 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 __fastcall PlayerObject::updatePlayerGlow(PlayerObject *a1)
{
cocos2d::CCSprite *m_iconGlow; // r14
bool m_maybeIsVehicleGlowing; // r15
cocos2d::CCSprite *v4; // r14
cocos2d::CCSprite *v5; // r14
__int64 v6; // rax
char v7; // r12
bool v8; // al
bool v9; // r15
cocos2d::CCSprite *m_vehicleGlow; // r14
unsigned __int8 v11; // al
cocos2d::CCSprite *v12; // r14
__int64 v13; // rax
GJRobotSprite *m_robotSprite; // rdi
char v15; // al
GJRobotSprite *v16; // rdi
m_iconGlow = a1->m_iconGlow;
m_maybeIsVehicleGlowing = a1->m_maybeIsVehicleGlowing;
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->getScaleX)(a1->m_iconSprite);
((void (__fastcall *)(cocos2d::CCSprite *))m_iconGlow->setScaleX)(m_iconGlow);
v4 = a1->m_iconGlow;
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->getScaleY)(a1->m_iconSprite);
((void (__fastcall *)(cocos2d::CCSprite *))v4->setScaleY)(v4);
v5 = a1->m_iconGlow;
v6 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->getPosition)(a1->m_iconSprite);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))v5->setPosition)(v5, v6);
if ( m_maybeIsVehicleGlowing || a1->m_hasGlow )
{
v7 = 1;
if ( !a1->m_isRobot )
{
v8 = !a1->m_isSpider;
goto LABEL_7;
}
}
else
{
v7 = 0;
}
v8 = 0;
LABEL_7:
v9 = v8;
((void (__fastcall *)(cocos2d::CCSprite *, bool))a1->m_iconGlow->setVisible)(a1->m_iconGlow, v8);
m_vehicleGlow = a1->m_vehicleGlow;
if ( v9 )
v11 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_vehicleSprite->isVisible)(a1->m_vehicleSprite);
else
v11 = 0;
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))m_vehicleGlow->setVisible)(m_vehicleGlow, v11);
v12 = a1->m_vehicleGlow;
v13 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_vehicleSprite->getPosition)(a1->m_vehicleSprite);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))v12->setPosition)(v12, v13);
m_robotSprite = a1->m_robotSprite;
if ( v7 )
{
v15 = ((__int64 (__fastcall *)(GJRobotSprite *))m_robotSprite->isVisible)(m_robotSprite);
v16 = a1->m_robotSprite;
if ( v15 )
GJRobotSprite::showGlow(v16);
else
GJRobotSprite::hideGlow(v16);
if ( ((unsigned __int8 (__fastcall *)(GJSpiderSprite *))a1->m_spiderSprite->isVisible)(a1->m_spiderSprite) )
{
GJRobotSprite::showGlow(a1->m_spiderSprite);
return;
}
}
else
{
GJRobotSprite::hideGlow(m_robotSprite);
}
GJRobotSprite::hideGlow(a1->m_spiderSprite);
}