//
// ExplodeItemNode::update from 0xa266c8 to 0xa269c8 (768 bytes)
//
// 2 xrefs:
// > ??> @ 0x66888
// > ??> @ 0x11d9788
//
// 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 ExplodeItemNode::update(ExplodeItemNode *a1, float a2)
{
float v4; // s8
float v5; // s11
float m_floorHeight; // s10
unsigned int v7; // w20
float v8; // s10
bool v9; // cf
cocos2d::CCArray *m_sprites; // x0
__int64 v11; // x19
const cocos2d::CCPoint *v12; // x0
float v13; // s0
float v14; // s3
float v15; // s0
float v16; // s2
float v17; // s0
float v18; // s1
float v19; // s0
float v20; // s0
float v21; // s1
void (__fastcall *v22)(__int64, float); // x22
float v23; // s0
float v24; // s0
float v25; // s1
__int64 v26; // x22
__int64 v27; // x0
__int64 (__fastcall *v28)(__int64); // x1
void (__fastcall *v29)(__int64, __int64); // x19
__int64 v30; // x0
cocos2d::CCParticleSystem *v31; // x0
__int64 v32; // x1
float v33; // s1
cocos2d::CCPoint v34; // [xsp+90h] [xbp+90h] BYREF
__int64 v35; // [xsp+98h] [xbp+98h] BYREF
cocos2d::CCPoint v36; // [xsp+A0h] [xbp+A0h] BYREF
v4 = a2 * 54.0;
v5 = 0.0;
if ( !a1->m_noGravity )
v5 = v4 * 0.5;
m_floorHeight = a1->m_floorHeight;
v7 = 0;
v8 = m_floorHeight - a1->getPosition(a1)->y;
LABEL_4:
v9 = v7 >= (unsigned int)cocos2d::CCArray::count(a1->m_sprites);
m_sprites = a1->m_sprites;
if ( !v9 )
{
while ( 1 )
{
v11 = cocos2d::CCArray::objectAtIndex(m_sprites, v7);
v12 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11);
cocos2d::CCPoint::CCPoint(&v34, v12);
v13 = *(float *)(v11 + 604) - a2;
*(float *)(v11 + 604) = v13;
if ( v13 <= 0.0 )
{
v31 = *(cocos2d::CCParticleSystem **)(v11 + 616);
if ( v31 )
{
cocos2d::CCParticleSystem::stopSystem(v31);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v11 + 616) + 520LL))(*(_QWORD *)(v11 + 616));
*(_QWORD *)(v11 + 616) = 0;
}
cocos2d::CCArray::removeObjectAtIndex(a1->m_sprites, v7, 1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v11 + 520LL))(v11);
goto LABEL_4;
}
v14 = *(float *)(v11 + 596);
v15 = *(float *)(v11 + 600) - v5;
*(float *)(v11 + 600) = v15;
v16 = (float)((float)((float)(1.0 - v4) * 0.02) + 0.98) * v14;
*(float *)(v11 + 596) = v16;
cocos2d::CCPoint::CCPoint(&v36, v4 * v16, v4 * v15);
cocos2d::CCPoint::operator+(&v35, &v34, &v36);
v17 = *(float *)(v11 + 432);
v18 = *(float *)(v11 + 436);
if ( v17 <= v18 )
v19 = v17 * 0.5;
else
v19 = v18 * 0.5;
v20 = v19 + v8;
if ( v20 > *((float *)&v35 + 1) )
{
v21 = *(float *)(v11 + 600);
if ( v21 < 0.0 )
{
*((float *)&v35 + 1) = v20;
v33 = v21 * -0.8;
if ( v33 >= 1.5 )
*(float *)(v11 + 600) = v33;
else
*(float *)(v11 + 600) = 1.5;
}
}
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 184LL))(v11, &v35);
v22 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 344LL);
v23 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v11 + 352LL))(v11);
v22(v11, v23 + (float)(*(float *)(v11 + 612) * v4));
v24 = *(float *)(v11 + 604);
v25 = *(float *)(v11 + 608);
if ( v24 >= v25 )
goto LABEL_11;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 896LL))(
v11,
(unsigned int)(float)((float)(v24 / v25) * 255.0));
v32 = *(_QWORD *)(v11 + 616);
if ( v32 )
break;
LABEL_13:
v9 = ++v7 >= (unsigned int)cocos2d::CCArray::count(a1->m_sprites);
m_sprites = a1->m_sprites;
if ( v9 )
goto LABEL_15;
}
*(_BYTE *)(v32 + 814) = (unsigned int)(float)((float)(*(float *)(v11 + 604) / *(float *)(v11 + 608)) * 255.0);
LABEL_11:
v26 = *(_QWORD *)(v11 + 616);
if ( v26 )
{
v27 = v11;
v28 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL);
v29 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 184LL);
v30 = v28(v27);
v29(v26, v30);
}
goto LABEL_13;
}
LABEL_15:
if ( !(unsigned int)cocos2d::CCArray::count(m_sprites) )
{
cocos2d::CCNode::unscheduleUpdate(a1);
a1->removeMeAndCleanup(a1);
}
}