//
// LevelPage::addSecretCoin from 0x79e6b4 to 0x79e87c (456 bytes)
//
// 2 xrefs:
// > LevelSelectLayer::updatePageWithObject @ 0x7a01d8
// > ??> @ 0x3e478
//
// 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 LevelPage::addSecretCoin(LevelPage *a1)
{
cocos2d::CCDirector *v2; // x0
GameObject *v3; // x0
LevelPage_vtbl *v4; // x4
GameObject *m_coinObject; // x21
void (__fastcall *setPosition)(GameObject *__hidden, const cocos2d::CCPoint *); // x19
cocos2d::CCArray *v7; // x0
cocos2d::CCArray *v8; // x21
cocos2d::CCSpriteFrameCache *v9; // x23
cocos2d::CCString *v10; // x0
const char *CString; // x0
cocos2d::CCSpriteFrame *v12; // x0
cocos2d::CCSpriteFrameCache *v13; // x23
cocos2d::CCString *v14; // x0
const char *v15; // x0
cocos2d::CCSpriteFrame *v16; // x0
cocos2d::CCSpriteFrameCache *v17; // x23
cocos2d::CCString *v18; // x0
const char *v19; // x0
cocos2d::CCSpriteFrame *v20; // x0
cocos2d::CCSpriteFrameCache *v21; // x23
cocos2d::CCString *v22; // x0
const char *v23; // x0
cocos2d::CCSpriteFrame *v24; // x0
cocos2d::CCAnimation *v25; // x0
cocos2d::CCAnimate *v26; // x0
cocos2d::CCRepeatForever *v27; // x0
float v28; // [xsp+58h] [xbp+58h]
float v29; // [xsp+5Ch] [xbp+5Ch]
cocos2d::CCPoint v30; // [xsp+60h] [xbp+60h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v2);
v3 = GameObject::createWithFrame("secretCoin_01_001.png");
v4 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_coinObject = v3;
v3->m_bUnkBool2 = 0;
v4->addChild_0(a1, v3, 1);
m_coinObject = a1->m_coinObject;
setPosition = m_coinObject->setPosition;
cocos2d::CCPoint::CCPoint(&v30, v28 * 0.5, v29 * 0.5);
v7 = (cocos2d::CCArray *)((__int64 (__fastcall *)(GameObject *, cocos2d::CCPoint *))setPosition)(m_coinObject, &v30);
v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7);
v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_001.png", "secretCoin");
CString = cocos2d::CCString::getCString(v10);
v12 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, CString);
cocos2d::CCArray::addObject(v8, v12);
v13 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_002.png", "secretCoin");
v15 = cocos2d::CCString::getCString(v14);
v16 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, v15);
cocos2d::CCArray::addObject(v8, v16);
v17 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_003.png", "secretCoin");
v19 = cocos2d::CCString::getCString(v18);
v20 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v17, v19);
cocos2d::CCArray::addObject(v8, v20);
v21 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_004.png", "secretCoin");
v23 = cocos2d::CCString::getCString(v22);
v24 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v21, v23);
cocos2d::CCArray::addObject(v8, v24);
v25 = cocos2d::CCAnimation::createWithSpriteFrames(v8, 0.115);
v26 = cocos2d::CCAnimate::create(v25);
v27 = cocos2d::CCRepeatForever::create(v26);
cocos2d::CCNode::runAction(a1->m_coinObject, v27);
}