//
// PlayerObject::playCompleteEffect from 0x10005cda8 to 0x10005d258 (1200 bytes)
//
// 2 xrefs:
// > PlayLayer::levelComplete @ 0x1001199ac
// > PlayLayer::levelComplete @ 0x1001199bc
//
// 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::playCompleteEffect(PlayerObject *a1, bool a2, bool a3)
{
PlayerFireBoostSprite *m_robotFire; // x0
cocos2d::CCLayer *m_parentLayer; // x20
cocos2d::CCFadeTo *v8; // x22
cocos2d::CCParticleSystemQuad *v9; // x21
__int64 v10; // x0
unsigned int v11; // s0
int8x8_t v12; // d2
float v13; // s0
float32x2_t *v14; // x0
double v15; // d0
float v16; // s0
float v17; // s0
CCCircleWave *v18; // x21
__int16 v19; // w8
__int64 v20; // x0
CCCircleWave *v21; // x20
__int16 v22; // w8
__int64 v23; // x0
CCCircleWave *v24; // x20
__int16 v25; // w8
__int64 v26; // x0
__int128 v27; // [xsp+10h] [xbp-30h] BYREF
if ( a1->m_isDart )
PlayerObject::fadeOutStreak2(a1, 0.2);
PlayerObject::stopDashing(a1);
PlayerObject::deactivateParticle(a1);
cocos2d::CCParticleSystem::stopSystem(a1->m_trailingParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_shipClickParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_vehicleGroundParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_robotBurstParticles);
m_robotFire = a1->m_robotFire;
if ( m_robotFire )
{
cocos2d::CCNode::stopAllActions(m_robotFire);
((void (__fastcall *)(PlayerFireBoostSprite *, _QWORD))a1->m_robotFire->setVisible)(a1->m_robotFire, 0);
}
PlayerObject::toggleGhostEffect(a1, (GhostType)0);
PlayerObject::disableSwingFire(a1);
if ( ((__int64 (__fastcall *)(PlayerObject *))a1->getParent)(a1) )
{
m_parentLayer = (cocos2d::CCLayer *)((__int64 (__fastcall *)(PlayerObject *))a1->getParent)(a1);
if ( a3 )
goto LABEL_7;
LABEL_10:
v8 = cocos2d::CCFadeTo::create(0.1, 0);
((void (__fastcall *)(cocos2d::CCFadeTo *, __int64))v8->setTag)(v8, 4);
cocos2d::CCNode::runAction(a1, v8);
if ( a2 )
return;
goto LABEL_11;
}
m_parentLayer = a1->m_parentLayer;
if ( !a3 )
goto LABEL_10;
LABEL_7:
((void (__fastcall *)(PlayerObject *, _QWORD))a1->setOpacity)(a1, 0);
if ( !a2 )
{
LABEL_11:
v9 = cocos2d::CCParticleSystemQuad::create("explodeEffectVortex.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v9->setPositionType)(v9, 2);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCParticleSystemQuad *, __int64))a1->m_parentLayer->addChild_0)(
a1->m_parentLayer,
v9,
99);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v9->setAutoRemoveOnFinish)(v9, 1);
v10 = ((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v9->setPosition)(v9, v10);
*(float *)&v11 = (float)a1->m_playerColor1.b / 255.0;
v12.i16[0] = *(_WORD *)&a1->m_playerColor1.r;
v12.i8[2] = a1->m_playerColor1.b;
v12.i32[1] = (unsigned __int32)v12.i32[0] >> 8;
*(float32x2_t *)&v27 = vdiv_f32(
vcvt_f32_u32((uint32x2_t)vand_s8(v12, (int8x8_t)0xFF000000FFLL)),
(float32x2_t)vdup_n_s32(0x437F0000u));
*((_QWORD *)&v27 + 1) = v11 | 0x3F80000000000000LL;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int128 *))v9->setStartColor)(v9, &v27);
v27 = xmmword_100635DB0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int128 *))v9->setEndColor)(v9, &v27);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v9->setBlendAdditive)(v9, 1);
v27 = xmmword_100635900;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int128 *))v9->setStartColorVar)(v9, &v27);
v27 = xmmword_100635900;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int128 *))v9->setEndColorVar)(v9, &v27);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))v9->getSpeed)(v9);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))v9->setSpeed)(v9);
v13 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v9->getLife)(v9);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v9->setLife)(v9, v13 * 3.0);
v14 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))v9->getPosVar)(v9);
*(float32x2_t *)&v15 = sub_100022A14(v14, (float32x2_t *)&v27, 1.2);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int128 *, double))v9->setPosVar)(v9, &v27, v15);
v16 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v9->getStartSize)(v9);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v9->setStartSize)(v9, v16 * 0.8);
v17 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v9->getEndSize)(v9);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v9->setEndSize)(v9, v17 * 0.4);
cocos2d::CCParticleSystem::resetSystem(v9);
v18 = CCCircleWave::create_1(20.0, 80.0, 0.72, 0);
v19 = *(_WORD *)&a1->m_playerColor1.r;
v18->m_color.b = a1->m_playerColor1.b;
*(_WORD *)&v18->m_color.r = v19;
v20 = ((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
((void (__fastcall *)(CCCircleWave *, __int64))v18->setPosition)(v18, v20);
((void (__fastcall *)(cocos2d::CCLayer *, CCCircleWave *, __int64))m_parentLayer->addChild_0)(
m_parentLayer,
v18,
99);
v21 = CCCircleWave::create_1(30.0, 50.0, 0.84, 0);
v22 = *(_WORD *)&a1->m_playerColor2.r;
v21->m_color.b = a1->m_playerColor2.b;
*(_WORD *)&v21->m_color.r = v22;
v23 = ((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
((void (__fastcall *)(CCCircleWave *, __int64))v21->setPosition)(v21, v23);
v21->m_opacityMod = 0.8;
((void (__fastcall *)(cocos2d::CCLayer *, CCCircleWave *, __int64))a1->m_parentLayer->addChild_0)(
a1->m_parentLayer,
v21,
1000);
v24 = CCCircleWave::create_1(30.0, 20.0, 0.96, 0);
v25 = *(_WORD *)&a1->m_playerColor1.r;
v24->m_color.b = a1->m_playerColor1.b;
*(_WORD *)&v24->m_color.r = v25;
v26 = ((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
((void (__fastcall *)(CCCircleWave *, __int64))v24->setPosition)(v24, v26);
v24->m_opacityMod = 0.8;
((void (__fastcall *)(cocos2d::CCLayer *, CCCircleWave *, __int64))a1->m_parentLayer->addChild_0)(
a1->m_parentLayer,
v24,
1000);
}
}