//
// SecretLayer::playCoinEffect from 0x903c68 to 0x904098 (1072 bytes)
//
// 2 xrefs:
// > SecretLayer::onSubmit @ 0x9045b4
// > ??> @ 0xb1630
//
// 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 SecretLayer::playCoinEffect(SecretLayer *a1)
{
cocos2d::CCDirector *v2; // x0
bool v3; // w2
cocos2d::CCNode *v4; // x21
__int64 v5; // x0
__int64 v6; // x2
cocos2d::CCNode *v7; // x21
CCCircleWave *v8; // x0
CCCircleWave_vtbl *v9; // x2
cocos2d::CCNode *v10; // x21
cocos2d::CCSprite *v11; // x21
cocos2d::CCArray *v12; // x0
cocos2d::CCArray *v13; // x25
cocos2d::CCSpriteFrameCache *v14; // x28
cocos2d::CCString *v15; // x0
const char *CString; // x0
cocos2d::CCSpriteFrame *v17; // x0
cocos2d::CCSpriteFrameCache *v18; // x28
cocos2d::CCString *v19; // x0
const char *v20; // x0
cocos2d::CCSpriteFrame *v21; // x0
cocos2d::CCSpriteFrameCache *v22; // x28
cocos2d::CCString *v23; // x0
const char *v24; // x0
cocos2d::CCSpriteFrame *v25; // x0
cocos2d::CCSpriteFrameCache *v26; // x28
cocos2d::CCString *v27; // x0
const char *v28; // x0
cocos2d::CCSpriteFrame *v29; // x0
cocos2d::CCAnimation *v30; // x0
cocos2d::CCAnimate *v31; // x0
cocos2d::CCRepeatForever *v32; // x0
float x; // s12
int v34; // w0
float v35; // s0
float v36; // s1
float v37; // s0
float v38; // s1
float v39; // s0
float v40; // s1
cocos2d::CCSequence *v41; // x19
cocos2d::CCFiniteTimeAction *v42; // x0
cocos2d::CCAction *v43; // x0
cocos2d::CCSequence *v44; // x19
cocos2d::CCFadeOut *v45; // x0
cocos2d::CCAction *v46; // x0
float v47; // [xsp+98h] [xbp+98h]
float v48; // [xsp+9Ch] [xbp+9Ch]
cocos2d::CCPoint v49; // [xsp+A0h] [xbp+A0h] BYREF
cocos2d::CCPoint v50; // [xsp+A8h] [xbp+A8h] BYREF
cocos2d::CCPoint v51; // [xsp+B0h] [xbp+B0h] BYREF
cocos2d::CCPoint v52; // [xsp+B8h] [xbp+B8h] BYREF
cocos2d::CCPoint v53; // [xsp+C0h] [xbp+C0h] BYREF
cocos2d::CCPoint v54; // [xsp+C8h] [xbp+C8h] BYREF
cocos2d::CCPoint v55; // [xsp+D0h] [xbp+D0h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v2);
cocos2d::CCPoint::CCPoint(&v49, v47 * 0.5, (float)(v48 * 0.5) + 50.0);
v4 = (cocos2d::CCNode *)cocos2d::CCParticleSystemQuad::create(
(cocos2d::CCParticleSystemQuad *)"coinPickupEffect.plist",
nullptr,
v3);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v4->__vftable[1].onEnter)(v4, 1);
a1->addChild_0(a1, v4, 1);
v4->setPosition(v4, &v49);
v5 = CCCircleWave::create(nullptr, 25.0, 5.0, 0.3, 0);
v6 = *(_QWORD *)v5;
*(_BYTE *)(v5 + 340) = -1;
*(_BYTE *)(v5 + 342) = 0;
*(_BYTE *)(v5 + 341) = -56;
v7 = (cocos2d::CCNode *)v5;
(*(void (__fastcall **)(__int64, cocos2d::CCPoint *))(v6 + 184))(v5, &v49);
a1->addChild_0(a1, v7, 0);
v8 = CCCircleWave::create(5.0, 60.0, 0.3, 0);
v9 = v8->__vftable;
v8->m_color.r = -1;
v8->m_color.g = -1;
v10 = v8;
v8->m_color.b = 0;
v9->setPosition(v8, &v49);
a1->addChild_0(a1, v10, 0);
v10[1].m_uIndexInArray = 1;
v10[1].m_uUnknown = (unsigned int)&byte_4;
v11 = cocos2d::CCSprite::createWithSpriteFrameName("secretCoin_01_001.png");
a1->addChild_0(a1, v11, 2);
v12 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *))v11->setPosition)(
v11,
&v49);
v13 = (cocos2d::CCArray *)cocos2d::CCArray::create(v12);
v14 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_001.png", "secretCoin");
CString = cocos2d::CCString::getCString(v15);
v17 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, CString);
cocos2d::CCArray::addObject(v13, v17);
v18 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_002.png", "secretCoin");
v20 = cocos2d::CCString::getCString(v19);
v21 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v18, v20);
cocos2d::CCArray::addObject(v13, v21);
v22 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_003.png", "secretCoin");
v24 = cocos2d::CCString::getCString(v23);
v25 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v22, v24);
cocos2d::CCArray::addObject(v13, v25);
v26 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v27 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_004.png", "secretCoin");
v28 = cocos2d::CCString::getCString(v27);
v29 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v26, v28);
cocos2d::CCArray::addObject(v13, v29);
v30 = cocos2d::CCAnimation::createWithSpriteFrames(v13, 0.05);
v31 = cocos2d::CCAnimate::create(v30);
v32 = cocos2d::CCRepeatForever::create(v31);
cocos2d::CCNode::runAction(v11, v32);
cocos2d::CCPoint::CCPoint(&v50, &v49);
x = v49.x;
v34 = rand();
cocos2d::CCPoint::CCPoint(
&v51,
x + (float)((float)((float)((float)((float)v34 * 4.6566e-10) * 2.0) + -1.0) * 50.0),
v50.y - 60.0);
cocos2d::CCPoint::CCPoint(&v53);
cocos2d::CCPoint::CCPoint(&v54);
cocos2d::CCPoint::CCPoint(&v55);
cocos2d::CCPoint::CCPoint(&v52, v50.x, v50.y + 90.0);
cocos2d::CCPoint::operator=(&v54, v35, v36);
cocos2d::CCPoint::CCPoint(&v52, v51.x, v50.y + 180.0);
cocos2d::CCPoint::operator=(&v55, v37, v38);
cocos2d::CCPoint::CCPoint(&v52, v51.x, v51.y - 20.0);
cocos2d::CCPoint::operator=(&v53, v39, v40);
v41 = (cocos2d::CCSequence *)cocos2d::CCBezierTo::create(&v53, 0.75);
v42 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v11, 520, 1);
v43 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v41, v42, 0);
cocos2d::CCNode::runAction(v11, v43);
v44 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(0.5);
v45 = cocos2d::CCFadeOut::create(0.3);
v46 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v44, v45, 0);
cocos2d::CCNode::runAction(v11, v46);
}