//
// PlayerObject::spawnScaleCircle from 0x140397970 to 0x140397b68 (504 bytes)
//
// 2 xrefs:
// > PlayerObject::togglePlayerScale @ 0x1403a0c98
// > ??> @ 0x1406d6464
//
// 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
//
// Hidden C++ exception states: #wind=4
void PlayerObject::spawnScaleCircle(PlayerObject *a1)
{
__int64 v2; // rdx
float v3; // xmm3_4
float v4; // xmm1_4
float v5; // xmm2_4
bool v6; // r9
CCCircleWave *v7; // rdi
CCCircleWave_vtbl *v8; // rbx
const cocos2d::CCPoint *v9; // rax
cocos2d::CCObject *m_target; // rcx
CCCircleWave_vtbl *v11; // rbx
__int64 v12; // rax
__int64 v13; // rdx
CCCircleWaveDelegate *v14; // rcx
CCCircleWaveDelegate *v15; // rax
void *v16; // [rsp+40h] [rbp+8h]
__int16 v17; // [rsp+40h] [rbp+8h]
void *v18; // [rsp+40h] [rbp+8h]
if ( !a1->m_maybeReducedEffects )
{
v2 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v16 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v2 = qword_1406C2ED8;
}
if ( !*(_BYTE *)(*(_QWORD *)(v2 + 520) + 12837LL) && !*(_BYTE *)(v2 + 917) )
{
v3 = 50.0;
v4 = 2.0;
v5 = 0.25;
v6 = 1;
v17 = 255;
if ( a1->m_vehicleSize == 1.0 )
{
v3 = 10.0;
v4 = 40.0;
v17 = -256;
v5 = 0.30000001;
v6 = 0;
}
v7 = CCCircleWave::create(v3, v4, v5, v6, 1);
*(_WORD *)&v7->m_color.r = v17;
v7->m_color.b = -106;
v8 = v7->__vftable;
v9 = a1->getPosition_0(a1);
v8->setPosition_0(v7, v9);
a1->m_parentLayer->addChild_0(a1->m_parentLayer, v7, 0);
m_target = v7->m_target;
if ( m_target )
cocos2d::CCObject::release(m_target);
v7->m_target = a1;
cocos2d::CCObject::retain(a1);
cocos2d::CCNode::unschedule(v7, CCCircleWave::updatePosition);
v11 = v7->__vftable;
v12 = (__int64)v7->m_target->getPosition_0(v7->m_target);
v11->setPosition_0(v7, (const cocos2d::CCPoint *)v12);
v13 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v18 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v18);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v13 = qword_1406C2ED8;
}
v14 = *(CCCircleWaveDelegate **)(v13 + 520);
v15 = v14 + 1780;
if ( !v14 )
v15 = nullptr;
v7->m_delegate = v15;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(*(_QWORD *)(v13 + 520) + 14520LL), v7);
}
}
}