//
// SecretLayer6::init from 0x6e6580 to 0x6e67fc (636 bytes)
//
// 1 xrefs:
// > SecretLayer6::create @ 0x6e2c26
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:57:24 +0000
//
cocos2d::CCTextureCache *__fastcall SecretLayer6::init(SecretLayer6 *this)
{
cocos2d::CCTextureCache *v2; // r0
cocos2d::CCTextureCache *v3; // r9
cocos2d::CCTextureCache *v4; // r0
cocos2d::CCSpriteFrameCache *v5; // r0
cocos2d::CCSpriteFrameCache *v6; // r0
GameManager *v7; // r0
FMODAudioEngine *v8; // r6
cocos2d::CCDirector *v9; // r0
const char *v10; // r1
float *v11; // r5
void (__fastcall *v12)(float *, _DWORD *); // r8
void (__fastcall *v13)(float *, _DWORD *); // r8
void (__fastcall *v14)(float *, _DWORD *); // r3
const char *v15; // r2
int v16; // r5
int (__fastcall *v17)(int, _DWORD *); // r10
SecretGame01Layer *v18; // r0
cocos2d::CCLayer *v19; // r0
int v20; // r3
const char *v21; // r1
int v22; // r0
cocos2d::CCMenu *v23; // r10
int v24; // r5
cocos2d::CCDirector *v25; // r0
int (__fastcall *v26)(int, _DWORD *); // r8
cocos2d::CCDirector *v27; // r0
float v28; // s17
cocos2d::CCDirector *v29; // r0
float v30; // r0
PlatformToolbox *v31; // r0
float v32; // r1
cocos2d::CCMenuItem *v33; // r2
cocos2d::CCSequence *v34; // r0
cocos2d::CCSequence *v35; // r8
cocos2d::CCFiniteTimeAction *v36; // r0
cocos2d::CCAction *v37; // r0
float v39; // [sp+8h] [bp-28h] BYREF
float v40; // [sp+Ch] [bp-24h]
int (__fastcall *v41)(SecretLayer6 *, cocos2d::CCObject *); // [sp+10h] [bp-20h]
int v42; // [sp+14h] [bp-1Ch]
_DWORD v43[2]; // [sp+18h] [bp-18h] BYREF
int v44[3]; // [sp+20h] [bp-10h] BYREF
v2 = (cocos2d::CCTextureCache *)cocos2d::CCLayer::init(this);
v3 = v2;
if ( v2 )
{
v4 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v2);
v5 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCTextureCache::addImage(v4, "SecretSheet.png", 0);
v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v5);
v7 = (GameManager *)cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v6, "SecretSheet.plist");
memset(v44, 0, sizeof(v44));
v8 = (FMODAudioEngine *)GameManager::sharedState(v7);
std::string::__init(v44, "secretLoop03.mp3", 0x10u);
GameManager::fadeInMusic(v8, (unsigned __int8 *)v44);
std::string::~string((int)v44);
(*(void (__fastcall **)(SecretLayer6 *, int))(*(_DWORD *)this + 536))(this, 1);
v9 = (cocos2d::CCDirector *)(*(int (__fastcall **)(SecretLayer6 *, int))(*(_DWORD *)this + 544))(this, 1);
cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v39);
v11 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v10);
v12 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v11 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, 0.0, 0.0);
v12(v11, v43);
(*(void (__fastcall **)(SecretLayer6 *, float *, int))(*(_DWORD *)this + 232))(this, v11, -3);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v11 + 64))(v11, (float)(v39 + 10.0) / v11[86]);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v11 + 72))(v11, (float)(v40 + 10.0) / v11[87]);
v13 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, -5.0, -5.0);
v13(v11, v43);
v14 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v11 + 480);
LOWORD(v43[0]) = 30;
BYTE2(v43[0]) = 60;
v14(v11, v43);
v16 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"...", "goldFont.fnt", v15);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 80))(v16, 1065353216);
(*(void (__fastcall **)(SecretLayer6 *, int))(*(_DWORD *)this + 228))(this, v16);
v17 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v39 * 0.5, v40 - 24.0);
v18 = (SecretGame01Layer *)v17(v16, v43);
v19 = SecretGame01Layer::create(v18);
v20 = *(_DWORD *)this;
*((_DWORD *)this + 79) = v19;
(*(void (__fastcall **)(SecretLayer6 *, cocos2d::CCLayer *, int))(v20 + 232))(this, v19, 100);
v22 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v21);
v41 = SecretLayer6::onBack;
v42 = 0;
v23 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v22, 0, (int)this, (int)SecretLayer6::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v23, 1.5);
v24 = cocos2d::CCMenu::create(v23, nullptr);
v25 = (cocos2d::CCDirector *)(*(int (__fastcall **)(SecretLayer6 *, int, int))(*(_DWORD *)this + 232))(this, v24, 1);
v26 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v24 + 92);
v27 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v25);
v28 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v27));
v29 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v28));
v30 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v29));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v28 + 24.0, v30 - 23.0);
v31 = (PlatformToolbox *)v26(v24, v43);
if ( PlatformToolbox::isControllerConnected(v31) )
GameToolbox::addBackButton(this, v23, v33);
v34 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F000000, v32);
v43[1] = 0;
v43[0] = SecretLayer6::startGame01;
v35 = v34;
v36 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, SecretLayer6::startGame01, 0);
v37 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v35, v36, 0);
cocos2d::CCNode::runAction(this, v37);
}
return v3;
}