//
// SecretLayer3::init from 0x61fd08 to 0x620b0e (3590 bytes)
//
// 1 xrefs:
// > SecretLayer3::create @ 0x61ad64
//
// 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:55:05 +0000
//
int __fastcall SecretLayer3::init(cocos2d::CCArray **this)
{
cocos2d::CCTexture2D *v2; // r0
int v3; // r5
cocos2d::CCTextureCache *v4; // r0
cocos2d::CCTextureCache *v5; // r0
cocos2d::CCSpriteFrameCache *v6; // r0
cocos2d::CCSpriteFrameCache *v7; // r0
GameManager *v8; // r0
FMODAudioEngine *v9; // r6
cocos2d::CCDirector *v10; // r0
const char *v11; // r1
float *v12; // r5
void (__fastcall *v13)(float *, _DWORD *); // r7
void (__fastcall *v14)(float *, _DWORD *); // r7
void (__fastcall *v15)(float *, _DWORD *); // r3
const char *v16; // r1
int v17; // r7
void (__fastcall *v18)(int, _DWORD *); // r5
const char *v19; // r1
int v20; // r5
void (__fastcall *v21)(int, _DWORD *); // r10
const char *v22; // r1
cocos2d::CCNode *v23; // r8
void (__fastcall *v24)(cocos2d::CCNode *, _DWORD *); // r5
const char *v25; // r1
cocos2d::CCNode *v26; // r5
void (__fastcall *v27)(cocos2d::CCNode *, _DWORD); // r10
float v28; // r0
void (__fastcall *v29)(cocos2d::CCNode *, int); // r10
int v30; // r0
void (__fastcall *v31)(cocos2d::CCNode *, _DWORD *); // r2
int (__fastcall *v32)(cocos2d::CCNode *, _DWORD *); // r2
const char *v33; // r10
cocos2d::CCArray *v34; // r0
cocos2d::CCArray *v35; // r9
cocos2d::CCSpriteFrameCache *v36; // r0
cocos2d::CCArray *v37; // r6
cocos2d::CCString *v38; // r0
const char *CString; // r0
cocos2d::CCObject *v40; // r0
cocos2d::CCSpriteFrameCache *v41; // r0
cocos2d::CCSpriteFrameCache *v42; // r0
const char *v43; // r1
cocos2d::CCString *v44; // r0
const char *v45; // r0
cocos2d::CCObject *v46; // r0
float v47; // r2
cocos2d::CCAnimate *v48; // r0
cocos2d::CCAnimation *v49; // r1
cocos2d::CCRepeatForever *v50; // r0
cocos2d::CCActionInterval *v51; // r1
cocos2d::CCAction *v52; // r0
float v53; // r2
cocos2d::CCAnimate *v54; // r0
cocos2d::CCAnimation *v55; // r1
cocos2d::CCRepeatForever *v56; // r0
cocos2d::CCActionInterval *v57; // r1
cocos2d::CCAction *v58; // r0
const char *v59; // r1
cocos2d::CCNode *v60; // r10
void (__fastcall *v61)(cocos2d::CCNode *, _DWORD *); // r9
int v62; // r11
int v63; // r2
void (__fastcall *v64)(cocos2d::CCNode *, _DWORD *); // r2
unsigned __int8 v65; // r2
cocos2d::CCEaseInOut *v66; // r0
float v67; // r2
cocos2d::CCSequence *v68; // r11
unsigned __int8 v69; // r2
cocos2d::CCEaseInOut *v70; // r0
float v71; // r2
cocos2d::CCFiniteTimeAction *v72; // r0
cocos2d::CCRepeatForever *v73; // r0
cocos2d::CCActionInterval *v74; // r1
cocos2d::CCAction *v75; // r0
float v76; // r2
cocos2d::CCEaseInOut *v77; // r0
float v78; // r2
cocos2d::CCSequence *v79; // r11
float v80; // r2
cocos2d::CCEaseInOut *v81; // r0
float v82; // r2
cocos2d::CCFiniteTimeAction *v83; // r0
cocos2d::CCRepeatForever *v84; // r0
cocos2d::CCActionInterval *v85; // r1
cocos2d::CCAction *v86; // r0
const char *v87; // r1
int v88; // r10
int v89; // r11
const char *v90; // r1
int v91; // r11
int v92; // r10
void (__fastcall *v93)(int, _DWORD *); // r3
const char *v94; // r1
int v95; // r10
int (__fastcall *v96)(int, _DWORD *); // r8
int v97; // r11
DungeonBarsSprite *v98; // r0
cocos2d::CCNode *v99; // r0
cocos2d::CCArray *v100; // r3
int v101; // r10
int (__fastcall *v102)(int, _DWORD *); // r8
int v103; // r11
GameManager *v104; // r0
GameManager *v105; // r0
const char *v106; // r1
cocos2d::CCArray *v107; // r0
cocos2d::CCArray *v108; // r9
void (__fastcall *v109)(cocos2d::CCArray *, _DWORD *); // r10
int v110; // r11
GameManager *v111; // r0
GameManager *v112; // r0
GameManager *UGV; // r0
GameManager *v114; // r0
const char *v115; // r1
cocos2d::CCArray *v116; // r0
cocos2d::CCArray *v117; // r3
int v118; // r9
void (__fastcall *v119)(int, _DWORD *); // r10
int v120; // r11
cocos2d::CCMenu *v121; // r0
const cocos2d::CCPoint *v122; // r9
cocos2d::CCArray *v123; // r0
cocos2d::CCObject *v124; // r0
int v125; // r10
GameManager *v126; // r0
GameManager *v127; // r0
GameManager *v128; // r0
const char *v129; // r1
int v130; // r0
cocos2d::CCObject *v131; // r11
void (__fastcall *v132)(cocos2d::CCObject *, _DWORD *); // r8
GameManager *v133; // r0
GameManager *v134; // r0
const char *v135; // r1
int v136; // r0
cocos2d::CCObject *v137; // r6
void (__fastcall *v138)(cocos2d::CCObject *, _DWORD *); // r8
GameManager *v139; // r0
GameManager *v140; // r0
const char *v141; // r1
int v142; // r0
cocos2d::CCObject *v143; // r6
void (__fastcall *v144)(cocos2d::CCObject *, _DWORD *); // r8
GameManager *v145; // r0
GameStatsManager *v146; // r0
int v147; // r0
int v148; // r10
int isSpecialChestUnlocked; // r10
GameStatsManager *v150; // r0
unsigned int v151; // r6
int v152; // r0
int v153; // r10
int v154; // r0
int v155; // r11
int RewardForSpecialChest; // r10
int v157; // r1
cocos2d::CCSprite *v158; // r11
cocos2d::CCArray *v159; // r0
int v160; // r0
void (__fastcall *v161)(int, _DWORD *); // r2
int v162; // r0
unsigned __int8 *v163; // r10
void (__fastcall *v164)(unsigned __int8 *, _DWORD *); // r6
void (__fastcall *v165)(cocos2d::CCSprite *, _DWORD *); // r6
float v166; // s17
int v167; // r0
int (__fastcall *v168)(unsigned __int8 *, _DWORD *); // r6
int v169; // r0
int v170; // r9
int v171; // r9
cocos2d::CCMenu *v172; // r0
const char *v173; // r1
const cocos2d::CCPoint *v174; // r10
GameStatsManager *v175; // r0
int v176; // r0
int v177; // r11
int v178; // r9
int v179; // r1
cocos2d::CCSprite *v180; // r9
int v181; // r0
int v182; // r11
void (__fastcall *v183)(int, _DWORD *); // r6
void (__fastcall *v184)(cocos2d::CCSprite *, _DWORD *); // r6
float v185; // s17
int v186; // r0
int v187; // r6
int (__fastcall *v188)(int, _DWORD *); // r8
int v189; // r9
GameManager *v190; // r0
GameManager *v191; // r0
int v192; // r0
cocos2d::CCMenu *v193; // r7
int v194; // r6
cocos2d::CCDirector *v195; // r0
int (__fastcall *v196)(int, _BYTE *); // r8
cocos2d::CCDirector *v197; // r0
float v198; // s16
cocos2d::CCDirector *v199; // r0
float v200; // s14
PlatformToolbox *v201; // r0
cocos2d::CCMenuItem *v202; // r2
int isControllerConnected; // r5
cocos2d::CCTexture2D *v205; // [sp+Ch] [bp-80h]
cocos2d::CCString *v206; // [sp+10h] [bp-7Ch]
cocos2d::CCSpriteFrameCache *v207; // [sp+14h] [bp-78h]
cocos2d::CCSpriteFrameCache *v208; // [sp+14h] [bp-78h]
cocos2d::CCSpriteFrameCache *v209; // [sp+14h] [bp-78h]
cocos2d::CCSpriteFrameCache *v210; // [sp+14h] [bp-78h]
float v211; // [sp+20h] [bp-6Ch] BYREF
float v212; // [sp+24h] [bp-68h]
int v213; // [sp+28h] [bp-64h] BYREF
int v214; // [sp+2Ch] [bp-60h]
_BYTE v215[8]; // [sp+30h] [bp-5Ch] BYREF
_BYTE v216[8]; // [sp+38h] [bp-54h] BYREF
_BYTE v217[8]; // [sp+40h] [bp-4Ch] BYREF
unsigned int (__fastcall *v218)(unsigned int, cocos2d::CCObject *); // [sp+48h] [bp-44h]
int v219; // [sp+4Ch] [bp-40h]
unsigned int (__fastcall *v220)(unsigned int, cocos2d::CCObject *); // [sp+50h] [bp-3Ch]
int v221; // [sp+54h] [bp-38h]
unsigned int (__fastcall *v222)(unsigned int, cocos2d::CCObject *); // [sp+58h] [bp-34h]
int v223; // [sp+5Ch] [bp-30h]
int (__fastcall *v224)(int, cocos2d::CCObject *); // [sp+60h] [bp-2Ch]
int v225; // [sp+64h] [bp-28h]
_DWORD v226[2]; // [sp+68h] [bp-24h] BYREF
_DWORD v227[2]; // [sp+70h] [bp-1Ch] BYREF
int v228; // [sp+78h] [bp-14h] BYREF
int v229; // [sp+7Ch] [bp-10h]
int v230; // [sp+80h] [bp-Ch]
v2 = (cocos2d::CCTexture2D *)cocos2d::CCLayer::init((cocos2d::CCLayer *)this);
v205 = v2;
if ( v2 )
{
v3 = cocos2d::CCTexture2D::defaultAlphaPixelFormat(v2);
v4 = (cocos2d::CCTextureCache *)cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(0);
v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v4);
v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCTextureCache::addImage(v5, "DungeonSheet.png", 0);
v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6);
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v7, "DungeonSheet.plist");
v8 = (GameManager *)cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v3);
v228 = 0;
v229 = 0;
v230 = 0;
v9 = (FMODAudioEngine *)GameManager::sharedState(v8);
std::string::__init(&v228, "secretLoop02.mp3", 0x10u);
GameManager::fadeInMusic(v9, (unsigned __int8 *)&v228);
std::string::~string((int)&v228);
(*((void (__fastcall **)(cocos2d::CCArray **, int))*this + 134))(this, 1);
v10 = (cocos2d::CCDirector *)(*((int (__fastcall **)(cocos2d::CCArray **, int))*this + 136))(this, 1);
cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v211);
v12 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v11);
v13 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v12 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, 0.0, 0.0);
v13(v12, v227);
(*((void (__fastcall **)(cocos2d::CCArray **, float *, int))*this + 58))(this, v12, -3);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v12 + 64))(v12, (float)(v211 + 10.0) / v12[86]);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v12 + 72))(v12, (float)(v212 + 10.0) / v12[87]);
v14 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v12 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, -5.0, -5.0);
v14(v12, v227);
v15 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v12 + 480);
LOBYTE(v227[0]) = 0;
*(_WORD *)((char *)v227 + 1) = 7685;
v15(v12, v227);
v17 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeon_gate_001.png", v16);
(*((void (__fastcall **)(cocos2d::CCArray **, int, int))*this + 58))(this, v17, 2);
v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, v211 * 0.5, (float)(v212 * 0.5) - 5.0);
v18(v17, v227);
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeon_foreground_001.png", v19);
(*((void (__fastcall **)(cocos2d::CCArray **, int, int))*this + 58))(this, v20, 3);
v21 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v20 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, v211 * 0.5, 15.0);
v21(v20, v227);
v23 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"Fire_02_looped_001.png",
v22);
(*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, int))*this + 58))(this, v23, 4);
v24 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD *))(*(_DWORD *)v23 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, (float)(v211 * 0.5) - 160.0, (float)(v212 * 0.5) + 50.0);
v24(v23, v227);
v26 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"Fire_02_looped_001.png",
v25);
(*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, int))*this + 58))(this, v26, 3);
v27 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD))(*(_DWORD *)v26 + 80);
v28 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v23 + 84))(v23));
v27(v26, v28 + v28);
v29 = *(void (__fastcall **)(cocos2d::CCNode *, int))(*(_DWORD *)v26 + 92);
v30 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v23 + 96))(v23);
v29(v26, v30);
v31 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD *))(*(_DWORD *)v23 + 480);
LOWORD(v227[0]) = 255;
BYTE2(v227[0]) = 0;
v31(v23, v227);
v32 = *(int (__fastcall **)(cocos2d::CCNode *, _DWORD *))(*(_DWORD *)v26 + 480);
LOWORD(v227[0]) = -1;
v33 = (_BYTE *)(&dword_0 + 1);
BYTE2(v227[0]) = 0;
v34 = (cocos2d::CCArray *)v32(v26, v227);
v35 = (cocos2d::CCArray *)cocos2d::CCArray::create(v34);
v36 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::create(v35);
v37 = v36;
do
{
v207 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v36);
v38 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Fire_02_looped_%03i.png",
v33);
CString = (const char *)cocos2d::CCString::getCString(v38);
v40 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v207, CString);
v41 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v35, v40);
v42 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v41);
v43 = v33++;
v208 = v42;
v44 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Fire_02_2_looped_%03i.png",
v43);
v45 = (const char *)cocos2d::CCString::getCString(v44);
v46 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v208, v45);
v36 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v37, v46);
}
while ( v33 != &byte_9[1] );
v48 = (cocos2d::CCAnimate *)cocos2d::CCAnimation::createWithSpriteFrames(v35, (cocos2d::CCArray *)0x3DA3D70A, v47);
v50 = (cocos2d::CCRepeatForever *)cocos2d::CCAnimate::create(v48, v49);
v52 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v50, v51);
cocos2d::CCNode::runAction(v23, v52);
v54 = (cocos2d::CCAnimate *)cocos2d::CCAnimation::createWithSpriteFrames(v37, (cocos2d::CCArray *)0x3DA3D70A, v53);
v56 = (cocos2d::CCRepeatForever *)cocos2d::CCAnimate::create(v54, v55);
v58 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v56, v57);
cocos2d::CCNode::runAction(v26, v58);
v60 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"dungeonShine_001.png",
v59);
v61 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD *))(*(_DWORD *)v60 + 92);
v62 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v23 + 96))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 0.0, -10.0);
cocos2d::CCPoint::operator+(v227, v62, v226);
v61(v60, v227);
(*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, int))*this + 58))(this, v60, 5);
(*(void (__fastcall **)(cocos2d::CCNode *, int))(*(_DWORD *)v60 + 80))(v60, 1067030938);
v63 = *(_DWORD *)v60;
v213 = 770;
v214 = 1;
(*(void (__fastcall **)(cocos2d::CCNode *, int, int, int *))(v63 + 540))(v60, 770, 1, &v213);
(*(void (__fastcall **)(cocos2d::CCNode *, int))(*(_DWORD *)v60 + 456))(v60, 200);
v64 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD *))(*(_DWORD *)v60 + 480);
LOWORD(v227[0]) = -14081;
BYTE2(v227[0]) = 0;
v64(v60, v227);
v66 = (cocos2d::CCEaseInOut *)cocos2d::CCFadeTo::create((cocos2d::CCFadeTo *)0x3FCCCCCD, COERCE_FLOAT(160), v65);
v68 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v66, (cocos2d::CCActionInterval *)0x3FA66666, v67);
v70 = (cocos2d::CCEaseInOut *)cocos2d::CCFadeTo::create((cocos2d::CCFadeTo *)0x3FCCCCCD, COERCE_FLOAT(225), v69);
v72 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v70, (cocos2d::CCActionInterval *)0x3FA66666, v71);
v73 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v68, v72, 0);
v75 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v73, v74);
cocos2d::CCNode::runAction(v60, v75);
v77 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3F800000, 1.0, v76);
v79 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v77, (cocos2d::CCActionInterval *)0x3FC00000, v78);
v81 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3F800000, 1.2, v80);
v83 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v81, (cocos2d::CCActionInterval *)0x3FC00000, v82);
v84 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v79, v83, 0);
v86 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v84, v85);
cocos2d::CCNode::runAction(v60, v86);
v88 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeonTorch_001.png", v87);
(*((void (__fastcall **)(cocos2d::CCArray **, int, int))*this + 58))(this, v88, 6);
v209 = *(cocos2d::CCSpriteFrameCache **)(*(_DWORD *)v88 + 92);
v89 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v23 + 96))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, -1.0, -10.0);
cocos2d::CCPoint::operator+(v227, v89, v226);
((void (__fastcall *)(int, _DWORD *))v209)(v88, v227);
v91 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeonShine_001.png", v90);
v210 = *(cocos2d::CCSpriteFrameCache **)(*(_DWORD *)v91 + 92);
v92 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v23 + 96))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 0.0, -14.0);
cocos2d::CCPoint::operator+(v227, v92, v226);
((void (__fastcall *)(int, _DWORD *))v210)(v91, v227);
(*((void (__fastcall **)(cocos2d::CCArray **, int, int))*this + 58))(this, v91, 7);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v91 + 80))(v91, 1058642330);
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v91 + 540))(v91, v213, v214);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v91 + 456))(v91, 175);
v93 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v91 + 480);
LOWORD(v227[0]) = -26881;
BYTE2(v227[0]) = 0;
v93(v91, v227);
v95 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeon_bars_bottom_001.png", v94);
(*((void (__fastcall **)(cocos2d::CCArray **, int, int))*this + 58))(this, v95, 12);
v96 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v95 + 92);
v97 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 0.0, -52.0);
cocos2d::CCPoint::operator+(v227, v97, v226);
v98 = (DungeonBarsSprite *)v96(v95, v227);
v99 = DungeonBarsSprite::create(v98);
v100 = *this;
*(this + 80) = v99;
(*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, int))v100 + 58))(this, v99, 9);
v101 = (int)*(this + 80);
v102 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v101 + 92);
v103 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, -2.0, 10.0);
cocos2d::CCPoint::operator+(v227, v103, v226);
v104 = (GameManager *)v102(v101, v227);
v105 = (GameManager *)GameManager::sharedState(v104);
if ( GameManager::getUGV(v105, "13") )
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 80) + 172))(*(this + 80), 0);
v107 = (cocos2d::CCArray *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"secretEyes_01_001.png",
v106);
*(this + 83) = v107;
v108 = v107;
v109 = *(void (__fastcall **)(cocos2d::CCArray *, _DWORD *))(*(_DWORD *)v107 + 92);
v110 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 13.5, 6.0);
cocos2d::CCPoint::operator+(v227, v110, v226);
v109(v108, v227);
v111 = (GameManager *)(*((int (__fastcall **)(cocos2d::CCArray **, _DWORD, int))*this + 58))(this, *(this + 83), 10);
v112 = (GameManager *)GameManager::sharedState(v111);
UGV = (GameManager *)GameManager::getUGV(v112, "12");
if ( !UGV || (v114 = (GameManager *)GameManager::sharedState(UGV), GameManager::getUGV(v114, "13")) )
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 83) + 172))(*(this + 83), 0);
else
SecretLayer3::animateEyes(this);
v116 = (cocos2d::CCArray *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"secretBody_01_001.png",
v115);
v117 = *this;
*(this + 84) = v116;
(*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCArray *, int))v117 + 58))(this, v116, 9);
v118 = (int)*(this + 84);
v119 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v118 + 92);
v120 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 83) + 96))(*(this + 83));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 0.0, -2.0);
cocos2d::CCPoint::operator+(v227, v120, v226);
v119(v118, v227);
v121 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 84) + 172))(*(this + 84), 0);
v122 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v121);
v123 = (cocos2d::CCArray *)(*((int (__fastcall **)(cocos2d::CCArray **, const cocos2d::CCPoint *, int))*this + 58))(
this,
v122,
12);
v124 = (cocos2d::CCObject *)cocos2d::CCArray::create(v123);
*(this + 82) = v124;
cocos2d::CCObject::retain(v124);
v125 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 160.0, 20.0);
cocos2d::CCPoint::operator+(v227, v125, v226);
v126 = (GameManager *)cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v215, v122);
v127 = (GameManager *)GameManager::sharedState(v126);
v128 = (GameManager *)GameManager::getUGV(v127, "14");
if ( !v128 )
{
v130 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretLock01_001.png", v129);
v219 = 0;
v218 = SecretLayer3::onClick;
v131 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v130, 0, (int)this, (int)SecretLayer3::onClick, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, cocos2d::CCObject *))(*(_DWORD *)v122 + 228))(v122, v131);
v132 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v131 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, -30.0, -25.0);
cocos2d::CCPoint::operator+(v227, v215, v226);
v132(v131, v227);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v131 + 36))(v131, 1);
v128 = (GameManager *)cocos2d::CCArray::addObject(*(this + 82), v131);
}
v133 = (GameManager *)GameManager::sharedState(v128);
v134 = (GameManager *)GameManager::getUGV(v133, "15");
if ( !v134 )
{
v136 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretLock02_001.png", v135);
v221 = 0;
v220 = SecretLayer3::onClick;
v137 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v136, 0, (int)this, (int)SecretLayer3::onClick, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, cocos2d::CCObject *))(*(_DWORD *)v122 + 228))(v122, v137);
v138 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v137 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 0.0, 25.0);
cocos2d::CCPoint::operator+(v227, v215, v226);
v138(v137, v227);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v137 + 36))(v137, 2);
v134 = (GameManager *)cocos2d::CCArray::addObject(*(this + 82), v137);
}
v139 = (GameManager *)GameManager::sharedState(v134);
v140 = (GameManager *)GameManager::getUGV(v139, "16");
if ( !v140 )
{
v142 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretLock03_001.png", v141);
v223 = 0;
v222 = SecretLayer3::onClick;
v143 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v142, 0, (int)this, (int)SecretLayer3::onClick, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, cocos2d::CCObject *))(*(_DWORD *)v122 + 228))(v122, v143);
v144 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v143 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, 30.0, -25.0);
cocos2d::CCPoint::operator+(v227, v215, v226);
v144(v143, v227);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v143 + 36))(v143, 3);
v140 = (GameManager *)cocos2d::CCArray::addObject(*(this + 82), v143);
}
v145 = (GameManager *)GameManager::sharedState(v140);
v146 = (GameStatsManager *)GameManager::getUGV(v145, "12");
if ( !v146 )
{
v151 = 0;
while ( 1 )
{
v146 = (GameStatsManager *)cocos2d::CCArray::count(*(this + 82));
if ( v151 >= (unsigned int)v146 )
break;
v152 = cocos2d::CCArray::objectAtIndex(*(this + 82), v151++);
v153 = v152;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v152 + 528))(v152, 0);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v153 + 172))(v153, 0);
}
}
v147 = GameStatsManager::sharedState(v146);
v228 = 0;
v229 = 0;
v230 = 0;
v148 = v147;
std::string::__init(&v228, "0001", 4u);
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v148, (int)&v228);
v150 = (GameStatsManager *)std::string::~string((int)&v228);
if ( !isSpecialChestUnlocked )
{
v154 = GameStatsManager::sharedState(v150);
v228 = 0;
v229 = 0;
v230 = 0;
v155 = v154;
std::string::__init(&v228, "0001", 4u);
RewardForSpecialChest = GameStatsManager::getRewardForSpecialChest(v155, (int)&v228);
std::string::~string((int)&v228);
v158 = GJChestSprite::create(*(GJChestSprite **)(RewardForSpecialChest + 60), v157);
GJChestSprite::switchToState(v158, 2, 0);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v158 + 80))(v158, 1058642330);
v159 = (cocos2d::CCArray *)(*(int (__fastcall **)(cocos2d::CCSprite *))(*(_DWORD *)v158 + 244))(v158);
v160 = cocos2d::CCArray::objectAtIndex(v159, 0);
v161 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v160 + 480);
LOWORD(v227[0]) = -14136;
BYTE2(v227[0]) = -1;
v161(v160, v227);
v225 = 0;
v224 = SecretLayer3::onChest01;
v162 = CCMenuItemSpriteExtra::create((int)v158, 0, (int)this, (int)SecretLayer3::onChest01, 0);
v228 = 0;
v229 = 0;
v230 = 0;
v163 = (unsigned __int8 *)v162;
std::string::__init(&v228, "chestClick.ogg", 0xEu);
std::string::operator=(v163 + 340, (unsigned __int8 *)&v228);
std::string::~string((int)&v228);
v164 = *(void (__fastcall **)(unsigned __int8 *, _DWORD *))(*(_DWORD *)v163 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v227, 60.0, 48.0);
v164(v163, v227);
v165 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v158 + 92);
v166 = *(float *)(*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v163 + 164))(v163);
v167 = (*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v163 + 164))(v163);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, v166 * 0.5, *(float *)(v167 + 4) * 0.5);
v165(v158, v227);
(*(void (__fastcall **)(const cocos2d::CCPoint *, unsigned __int8 *))(*(_DWORD *)v122 + 228))(v122, v163);
v168 = *(int (__fastcall **)(unsigned __int8 *, _DWORD *))(*(_DWORD *)v163 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v226, v211 - 80.0, 60.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v227, v122);
v150 = (GameStatsManager *)v168(v163, v227);
}
v169 = GameStatsManager::sharedState(v150);
v228 = 0;
v229 = 0;
v230 = 0;
v170 = v169;
std::string::__init(&v228, "0002", 4u);
v171 = GameStatsManager::isSpecialChestUnlocked(v170, (int)&v228);
v172 = (cocos2d::CCMenu *)std::string::~string((int)&v228);
if ( !v171 )
{
v174 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v172);
v175 = (GameStatsManager *)(*((int (__fastcall **)(cocos2d::CCArray **, const cocos2d::CCPoint *, int))*this + 58))(
this,
v174,
10);
v176 = GameStatsManager::sharedState(v175);
v228 = 0;
v229 = 0;
v230 = 0;
v177 = v176;
std::string::__init(&v228, "0002", 4u);
v178 = GameStatsManager::getRewardForSpecialChest(v177, (int)&v228);
std::string::~string((int)&v228);
v180 = GJChestSprite::create(*(GJChestSprite **)(v178 + 60), v179);
GJChestSprite::switchToState(v180, 2, 0);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v180 + 80))(v180, 1058642330);
v226[1] = 0;
v226[0] = SecretLayer3::onChest02;
v181 = CCMenuItemSpriteExtra::create((int)v180, 0, (int)this, (int)SecretLayer3::onChest02, 0);
v228 = 0;
v229 = 0;
v230 = 0;
*(this + 85) = (cocos2d::CCArray *)v181;
v206 = (cocos2d::CCString *)v181;
std::string::__init(&v228, "chestClick.ogg", 0xEu);
std::string::operator=((unsigned __int8 *)v206 + 340, (unsigned __int8 *)&v228);
std::string::~string((int)&v228);
v182 = (int)*(this + 85);
v183 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v182 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v227, 60.0, 48.0);
v183(v182, v227);
v184 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v180 + 92);
v185 = *(float *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 85) + 164))(*(this + 85));
v186 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 85) + 164))(*(this + 85));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, v185 * 0.5, *(float *)(v186 + 4) * 0.5);
v184(v180, v227);
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v174 + 228))(v174, *(this + 85));
v187 = (int)*(this + 85);
v188 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v187 + 92);
v189 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v216, 0.0, -24.0);
cocos2d::CCPoint::operator+(v217, v189, v216);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v227, v174);
v190 = (GameManager *)v188(v187, v227);
*((_BYTE *)*(this + 85) + 320) = 0;
*((_BYTE *)*(this + 85) + 321) = 1;
v191 = (GameManager *)GameManager::sharedState(v190);
if ( !GameManager::getUGV(v191, "13") )
{
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 85) + 528))(*(this + 85), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 85) + 172))(*(this + 85), 0);
}
}
v192 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v173);
v227[1] = 0;
v227[0] = SecretLayer3::onBack;
v193 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v192, 0, (int)this, (int)SecretLayer3::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v193, 1.5);
v194 = cocos2d::CCMenu::create(v193, nullptr);
v195 = (cocos2d::CCDirector *)(*((int (__fastcall **)(cocos2d::CCArray **, int, int))*this + 58))(this, v194, 1);
v196 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v194 + 92);
v197 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v195);
v198 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v197));
v199 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v198));
v200 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v199));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v217, v198 + 24.0, v200 - 23.0);
v201 = (PlatformToolbox *)v196(v194, v217);
isControllerConnected = PlatformToolbox::isControllerConnected(v201);
if ( isControllerConnected )
{
GameToolbox::addBackButton((GameToolbox *)this, v193, v202);
return isControllerConnected;
}
}
return (int)v205;
}