//
// GameObject::spawnDefaultPickupParticle from 0x1401aa260 to 0x1401aa491 (561 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::destroyObject @ 0x14021614a
// > ??> @ 0x140679b08
// > ??> @ 0x140679b18
// > ??> @ 0x1406cc180
//
// 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::spawnDefaultPickupParticle(GameObject *a1, GJBaseGameLayer *a2)
{
cocos2d::CCRGBAProtocol *v2; // r14
GLubyte v5; // al
int m_objectID; // edi
float v7; // xmm9_4
cocos2d::CCPoint v8; // rax
int v9; // r8d
cocos2d::tCCPositionType v10; // r9d
const char *v11; // rdx
cocos2d::CCParticleSystemQuad *v12; // rbx
__int64 v13; // rax
__m128i v14; // xmm6
float v15; // xmm8_4
__m128i v16; // xmm7
cocos2d::CCParticleSystemQuad_vtbl *v17; // rax
float v18; // xmm8_4
cocos2d::CCParticleSystemQuad_vtbl *v19; // rax
CCCircleWave *v20; // rdi
cocos2d::ccColor3B *v21; // rax
CCCircleWave_vtbl *v22; // rbx
const cocos2d::CCPoint *v23; // rax
cocos2d::CCPoint v24; // [rsp+38h] [rbp-80h] BYREF
float v25; // [rsp+40h] [rbp-78h] BYREF
__int32 v26; // [rsp+44h] [rbp-74h]
__int32 v27; // [rsp+48h] [rbp-70h]
float v28; // [rsp+4Ch] [rbp-6Ch]
v2 = &a1->cocos2d::CCRGBAProtocol;
v5 = a1->getOpacity(&a1->cocos2d::CCRGBAProtocol);
m_objectID = a1->m_objectID;
v7 = (float)v5;
a1->getPosition_0(a1);
cocos2d::CCPoint::CCPoint(&v24);
v11 = "glassDestroy01.plist";
if ( m_objectID == 1614 )
v11 = "coinPickupEffect.plist";
v12 = GJBaseGameLayer::spawnParticle(a2, v11, v9, v10, v8);
if ( v12 )
{
v13 = (__int64)v2->getColor(v2);
v14 = _mm_cvtsi32_si128(*(unsigned __int8 *)(v13 + 2));
v15 = (float)(unsigned __int8)*(_WORD *)v13;
v16 = _mm_cvtsi32_si128((unsigned __int8)HIBYTE(*(_WORD *)v13));
v17 = v12->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
*(float *)v16.m128i_i32 = _mm_cvtepi32_ps(v16).m128_f32[0] / 255.0;
v18 = v15 / 255.0;
*(float *)v14.m128i_i32 = _mm_cvtepi32_ps(v14).m128_f32[0] / 255.0;
v26 = v16.m128i_i32[0];
v25 = v18;
v27 = v14.m128i_i32[0];
v28 = v7 / 255.0;
v17->setStartColor(v12, (const cocos2d::ccColor4F *)&v25);
v19 = v12->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v25 = v18;
v26 = v16.m128i_i32[0];
v27 = v14.m128i_i32[0];
v28 = 0.0;
v19->setEndColor(v12, (const cocos2d::ccColor4F *)&v25);
if ( m_objectID == 1614 )
{
cocos2d::CCParticleSystem::loadScaledDefaults(v12, 0.60000002);
return;
}
}
else if ( m_objectID == 1614 )
{
return;
}
v20 = CCCircleWave::create(12.0, 2.0, 0.30000001, 0, 0);
v21 = (cocos2d::ccColor3B *)v2->getColor(v2);
v22 = v20->__vftable;
v20->m_color = *v21;
v23 = a1->getPosition_0(a1);
v22->setPosition_0(v20, v23);
a2->m_objectLayer->addChild_0(a2->m_objectLayer, v20, 0);
}