//
// GameObject::spawnDefaultPickupParticle from 0x9b2a90 to 0x9b2cd8 (584 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::destroyObject @ 0x88b35c
// > ??> @ 0x96168
//
// 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)
{
unsigned int v4; // w25
_BOOL4 v5; // w23
const cocos2d::CCPoint *v6; // x0
cocos2d::CCParticleSystemQuad *v7; // x21
const cocos2d::ccColor3B *v8; // x0
int b; // w2
void (__fastcall *setStartColor)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // x4
float v11; // s10
float v12; // s9
float v13; // s8
void (__fastcall *setEndColor)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // x2
__int64 v15; // x21
const cocos2d::ccColor3B *v16; // x1
__int64 v17; // x2
GameObject *v18; // x0
GLubyte r; // w4
GameObject_vtbl *v20; // x1
void (__fastcall *v21)(__int64, __int64); // x19
__int64 v22; // x0
const cocos2d::CCPoint *v23; // x0
cocos2d::CCPoint v24; // [xsp+68h] [xbp+68h] BYREF
float v25; // [xsp+70h] [xbp+70h]
float v26; // [xsp+74h] [xbp+74h]
cocos2d::CCPoint v27; // 0:s0.4,4:s1.4
cocos2d::CCPoint v28; // 0:s0.4,4:s1.4
v4 = a1->getOpacity(a1);
v5 = a1->m_objectID == 1614;
if ( a1->m_objectID == 1614 )
{
v6 = a1->getPosition(a1);
cocos2d::CCPoint::CCPoint(&v24, v6);
v7 = GJBaseGameLayer::spawnParticle(a2, "coinPickupEffect.plist", 0, kCCPositionTypeGrouped, v27);
if ( !v7 )
return;
goto LABEL_3;
}
v23 = a1->getPosition(a1);
cocos2d::CCPoint::CCPoint(&v24, v23);
v7 = GJBaseGameLayer::spawnParticle(a2, "glassDestroy01.plist", 0, kCCPositionTypeGrouped, v28);
if ( v7 )
{
LABEL_3:
v8 = a1->getColor(a1);
b = v8->b;
setStartColor = v7->setStartColor;
v11 = (float)v8->r / 255.0;
v12 = (float)v8->g / 255.0;
v26 = (float)v4 / 255.0;
v13 = (float)b / 255.0;
v24.x = v11;
v24.y = v12;
v25 = v13;
setStartColor(v7, (const cocos2d::ccColor4F *)&v24);
setEndColor = v7->setEndColor;
v24.x = v11;
v24.y = v12;
v25 = v13;
v26 = 0.0;
setEndColor(v7, (const cocos2d::ccColor4F *)&v24);
if ( v5 )
{
cocos2d::CCParticleSystem::loadScaledDefaults(v7, 0.6);
return;
}
}
v15 = CCCircleWave::create(nullptr, 12.0, 2.0, 0.3, 0);
v16 = a1->getColor(a1);
v17 = *(_QWORD *)v15;
v18 = a1;
r = v16->r;
*(_WORD *)(v15 + 341) = *(_WORD *)&v16->g;
*(_BYTE *)(v15 + 340) = r;
v20 = a1->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v21 = *(void (__fastcall **)(__int64, __int64))(v17 + 184);
v22 = (__int64)v20->getPosition(v18);
v21(v15, v22);
a2->m_objectLayer->addChild_0(a2->m_objectLayer, (cocos2d::CCNode *)v15, 0);
}