// // SecretLayer3::init from 0xa9246c to 0xa93784 (4888 bytes) // // 3 xrefs: // > SecretLayer3::create @ 0xa9382c // > @ 0xcbc80 // > @ 0x149a440 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 13:00:41 +0000 // __int64 __fastcall SecretLayer3::init(cocos2d::CCArray **this) { cocos2d::CCTexture2D *v2; // x0 unsigned int v4; // w20 cocos2d::CCTextureCache *v5; // x0 cocos2d::CCTextureCache *v6; // x0 cocos2d::CCSpriteFrameCache *v7; // x0 cocos2d::CCSpriteFrameCache *v8; // x0 GameManager *v9; // x0 __int64 v10; // x20 unsigned int v11; // w20 cocos2d::CCDirector *v12; // x0 cocos2d::CCDirector *v13; // x0 const char *v14; // x1 float *v15; // x22 void (__fastcall *v16)(float *, __int64 *); // x25 void (__fastcall *v17)(float *, __int64 *); // x23 void (__fastcall *v18)(float *, __int64 *); // x2 const char *v19; // x1 __int64 v20; // x23 void (__fastcall *v21)(__int64, __int64 *); // x22 const char *v22; // x1 __int64 v23; // x22 void (__fastcall *v24)(__int64, __int64 *); // x25 const char *v25; // x1 cocos2d::CCNode *v26; // x22 void (__fastcall *v27)(cocos2d::CCNode *, __int64 *); // x27 const char *v28; // x1 cocos2d::CCNode *v29; // x27 void (__fastcall *v30)(cocos2d::CCNode *, float); // x25 float v31; // s0 void (__fastcall *v32)(cocos2d::CCNode *, __int64); // x25 __int64 v33; // x0 void (__fastcall *v34)(cocos2d::CCNode *, __int64 *); // x2 __int64 (__fastcall *v35)(cocos2d::CCNode *, __int64 *); // x2 cocos2d::CCArray *v36; // x0 cocos2d::CCArray *v37; // x26 cocos2d::CCArray *v38; // x25 cocos2d::CCSpriteFrameCache *v39; // x0 cocos2d::CCSpriteFrameCache *v40; // x28 cocos2d::CCString *v41; // x0 const char *CString; // x0 cocos2d::CCObject *v43; // x0 cocos2d::CCSpriteFrameCache *v44; // x0 cocos2d::CCSpriteFrameCache *v45; // x28 const char *v46; // x1 cocos2d::CCString *v47; // x0 const char *v48; // x0 cocos2d::CCObject *v49; // x0 cocos2d::CCArray *v50; // x1 cocos2d::CCAnimate *v51; // x0 cocos2d::CCAnimation *v52; // x1 cocos2d::CCRepeatForever *v53; // x0 cocos2d::CCActionInterval *v54; // x1 cocos2d::CCAction *v55; // x0 cocos2d::CCArray *v56; // x1 cocos2d::CCAnimate *v57; // x0 cocos2d::CCAnimation *v58; // x1 cocos2d::CCRepeatForever *v59; // x0 cocos2d::CCActionInterval *v60; // x1 cocos2d::CCAction *v61; // x0 const char *v62; // x1 cocos2d::CCNode *v63; // x25 void (__fastcall *v64)(cocos2d::CCNode *, __int64 *); // x2 unsigned __int8 v65; // w1 cocos2d::CCEaseInOut *v66; // x0 cocos2d::CCActionInterval *v67; // x1 unsigned __int8 v68; // w1 cocos2d::CCEaseInOut *v69; // x0 cocos2d::CCActionInterval *v70; // x1 cocos2d::CCFiniteTimeAction *v71; // x0 cocos2d::CCRepeatForever *v72; // x0 cocos2d::CCActionInterval *v73; // x1 cocos2d::CCAction *v74; // x0 cocos2d::CCScaleTo *v75; // x0 cocos2d::CCEaseInOut *v76; // x0 cocos2d::CCActionInterval *v77; // x1 cocos2d::CCEaseInOut *v78; // x0 cocos2d::CCActionInterval *v79; // x1 cocos2d::CCFiniteTimeAction *v80; // x0 cocos2d::CCRepeatForever *v81; // x0 cocos2d::CCActionInterval *v82; // x1 cocos2d::CCAction *v83; // x0 const char *v84; // x1 __int64 v85; // x25 const char *v86; // x1 __int64 v87; // x25 cocos2d::CCNode *v88; // x0 __int64 (__fastcall *v89)(cocos2d::CCNode *); // x1 void (__fastcall *v90)(__int64, __int64 *); // x22 __int64 v91; // x27 void (__fastcall *v92)(__int64, __int64 *); // x2 const char *v93; // x1 __int64 v94; // x22 __int64 (__fastcall *v95)(__int64, __int64 *); // x25 __int64 v96; // x26 DungeonBarsSprite *v97; // x0 cocos2d::CCNode *v98; // x0 __int64 v99; // x22 __int64 (__fastcall *v100)(__int64, __int64 *); // x25 __int64 v101; // x26 GameManager *v102; // x0 GameManager *v103; // x0 const char *v104; // x1 __int64 v105; // x0 __int64 v106; // x22 void (__fastcall *v107)(__int64, __int64 *); // x26 __int64 v108; // x27 GameManager *v109; // x0 GameManager *v110; // x0 GameManager *UGV; // x0 const char *v112; // x1 __int64 v113; // x0 __int64 v114; // x22 void (__fastcall *v115)(__int64, __int64 *); // x27 cocos2d::CCMenu *v116; // x0 cocos2d::CCNode *v117; // x22 cocos2d::CCArray *v118; // x0 cocos2d::CCObject *v119; // x0 __int64 v120; // x27 GameManager *v121; // x0 GameManager *v122; // x0 unsigned __int64 v123; // x0 const char *v124; // x1 GameManager *v125; // x0 unsigned __int64 v126; // x0 const char *v127; // x1 GameManager *v128; // x0 unsigned __int64 v129; // x0 const char *v130; // x1 GameManager *v131; // x0 unsigned __int64 v132; // x0 unsigned int v133; // w25 unsigned int v134; // w1 __int64 v135; // x26 __int64 v136; // x26 GameStatsManager *isSpecialChestUnlocked; // x0 int v138; // w26 __int64 v139; // x26 __int64 RewardForSpecialChest; // x25 unsigned int *v141; // x26 cocos2d::CCArray *v142; // x0 __int64 v143; // x0 void (__fastcall *v144)(__int64, __int64 *); // x3 __int64 *v145; // x25 char *v146; // x1 size_t v147; // x2 void (__fastcall *v148)(__int64 *, __int64 *); // x27 void (__fastcall *v149)(unsigned int *, __int64 *); // x27 __int64 v150; // x0 __int64 (__fastcall *v151)(__int64 *, __int64 *); // x26 __int64 v152; // x25 _BOOL8 v153; // x0 const char *v154; // x1 _BOOL4 v155; // w25 cocos2d::CCNode *v156; // x25 GameStatsManager *v157; // x0 __int64 v158; // x26 __int64 v159; // x22 unsigned int *v160; // x22 __int64 v161; // x26 char *v162; // x1 size_t v163; // x2 __int64 v164; // x26 void (__fastcall *v165)(__int64, __int64 *); // x27 void (__fastcall *v166)(unsigned int *, __int64 *); // x26 __int64 v167; // x0 __int64 v168; // x22 __int64 v169; // x0 __int64 (__fastcall *v170)(__int64); // x1 void (__fastcall *v171)(__int64, __int64 *); // x23 __int64 v172; // x26 GameManager *v173; // x0 GameManager *v174; // x0 __int64 v175; // x0 cocos2d::CCMenu *v176; // x22 cocos2d::CCDirector **v177; // x20 __int64 (__fastcall *v178)(cocos2d::CCDirector **, __int64 *); // x23 cocos2d::CCDirector *v179; // x0 cocos2d::CCDirector *ScreenLeft; // x0 float v181; // s0 float v182; // s8 cocos2d::CCDirector *v183; // x0 float v184; // s0 PlatformToolbox *v185; // x0 unsigned __int8 isControllerConnected; // w0 __int64 v187; // x0 cocos2d::CCObject *v188; // x27 __int64 v189; // x0 cocos2d::CCObject *v190; // x27 __int64 v191; // x0 cocos2d::CCObject *v192; // x27 GameManager *v193; // x0 unsigned __int8 v194; // [xsp+84h] [xbp+84h] cocos2d::CCString *v195; // [xsp+88h] [xbp+88h] cocos2d::CCString *v196; // [xsp+88h] [xbp+88h] __int64 v197; // [xsp+90h] [xbp+90h] cocos2d::CCSequence *v198; // [xsp+90h] [xbp+90h] cocos2d::CCScaleTo *v199; // [xsp+90h] [xbp+90h] __int64 v200; // [xsp+90h] [xbp+90h] __int64 v201; // [xsp+90h] [xbp+90h] float v202; // [xsp+90h] [xbp+90h] float v203; // [xsp+90h] [xbp+90h] void (__fastcall *v204)(cocos2d::CCObject *, __int64 *); // [xsp+90h] [xbp+90h] void (__fastcall *v205)(cocos2d::CCObject *, __int64 *); // [xsp+90h] [xbp+90h] void (__fastcall *v206)(cocos2d::CCObject *, __int64 *); // [xsp+90h] [xbp+90h] __int64 v207; // [xsp+A8h] [xbp+A8h] BYREF __int64 v208; // [xsp+B0h] [xbp+B0h] BYREF _BYTE v209[8]; // [xsp+B8h] [xbp+B8h] BYREF __int64 v210; // [xsp+C0h] [xbp+C0h] BYREF __int64 v211; // [xsp+C8h] [xbp+C8h] BYREF __int64 v212; // [xsp+D0h] [xbp+D0h] BYREF size_t v213; // [xsp+D8h] [xbp+D8h] void *v214; // [xsp+E0h] [xbp+E0h] v2 = (cocos2d::CCTexture2D *)(unsigned __int8)cocos2d::CCLayer::init((cocos2d::CCLayer *)this); v194 = (unsigned __int8)v2; if ( !(_BYTE)v2 ) return v194; v4 = cocos2d::CCTexture2D::defaultAlphaPixelFormat(v2); v5 = (cocos2d::CCTextureCache *)cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(0); v6 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v5); v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCTextureCache::addImage(v6, "DungeonSheet.png", 0); v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v8, "DungeonSheet.plist"); v9 = (GameManager *)cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v4); v10 = GameManager::sharedState(v9); v212 = 0; v213 = 0; v214 = nullptr; std::string::__init(&v212, "secretLoop02.mp3", 0x10u); GameManager::fadeInMusic(v10, (unsigned __int8 *)&v212); if ( (v212 & 1) != 0 ) operator delete(v214); v11 = 1; (*((void (__fastcall **)(cocos2d::CCArray **, __int64))*this + 134))(this, 1); v12 = (cocos2d::CCDirector *)(*((__int64 (__fastcall **)(cocos2d::CCArray **, __int64))*this + 136))(this, 1); v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12); cocos2d::CCDirector::getWinSize(&v207, v13); v15 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v14); v16 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v15 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v211, 0.0, 0.0); v16(v15, &v211); (*((void (__fastcall **)(cocos2d::CCArray **, float *, __int64))*this + 58))(this, v15, 4294967293LL); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v15 + 128LL))(v15, (float)(*(float *)&v207 + 10.0) / v15[108]); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v15 + 144LL))( v15, (float)(*((float *)&v207 + 1) + 10.0) / v15[109]); v17 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v15 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v211, -5.0, -5.0); v17(v15, &v211); v18 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v15 + 960LL); LOWORD(v211) = 1280; BYTE2(v211) = 30; v18(v15, &v211); v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeon_gate_001.png", v19); (*((void (__fastcall **)(cocos2d::CCArray **, __int64, __int64))*this + 58))(this, v20, 2); v21 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v20 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v211, *(float *)&v207 * 0.5, (float)(*((float *)&v207 + 1) * 0.5) + -5.0); v21(v20, &v211); v23 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeon_foreground_001.png", v22); (*((void (__fastcall **)(cocos2d::CCArray **, __int64, __int64))*this + 58))(this, v23, 3); v24 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v23 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v211, *(float *)&v207 * 0.5, 15.0); v24(v23, &v211); v26 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"Fire_02_looped_001.png", v25); (*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, __int64))*this + 58))(this, v26, 4); v27 = *(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v26 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v211, (float)(*(float *)&v207 * 0.5) + -160.0, (float)(*((float *)&v207 + 1) * 0.5) + 50.0); v27(v26, &v211); v29 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"Fire_02_looped_001.png", v28); (*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, __int64))*this + 58))(this, v29, 3); v30 = *(void (__fastcall **)(cocos2d::CCNode *, float))(*(_QWORD *)v29 + 160LL); v31 = (*(float (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v26 + 168LL))(v26); v30(v29, v31 + v31); v32 = *(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v29 + 184LL); v33 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v26 + 192LL))(v26); v32(v29, v33); v34 = *(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v26 + 960LL); LOWORD(v211) = 255; BYTE2(v211) = 0; v34(v26, &v211); v35 = *(__int64 (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v29 + 960LL); LOBYTE(v211) = -1; *(_WORD *)((char *)&v211 + 1) = 255; v36 = (cocos2d::CCArray *)v35(v29, &v211); v37 = (cocos2d::CCArray *)cocos2d::CCArray::create(v36); v38 = (cocos2d::CCArray *)cocos2d::CCArray::create(v37); v39 = (cocos2d::CCSpriteFrameCache *)"Fire_02_2_looped_%03i.png"; do { v40 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v39); v41 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Fire_02_looped_%03i.png", (const char *)v11); CString = (const char *)cocos2d::CCString::getCString(v41); v43 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v40, CString); v44 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v37, v43); v45 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v44); v46 = (const char *)v11++; v47 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Fire_02_2_looped_%03i.png", v46); v48 = (const char *)cocos2d::CCString::getCString(v47); v49 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v45, v48); v39 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v38, v49); } while ( v11 != 10 ); v51 = (cocos2d::CCAnimate *)cocos2d::CCAnimation::createWithSpriteFrames(v37, v50, 0.08); v53 = (cocos2d::CCRepeatForever *)cocos2d::CCAnimate::create(v51, v52); v55 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v53, v54); cocos2d::CCNode::runAction(v26, v55); v57 = (cocos2d::CCAnimate *)cocos2d::CCAnimation::createWithSpriteFrames(v38, v56, 0.08); v59 = (cocos2d::CCRepeatForever *)cocos2d::CCAnimate::create(v57, v58); v61 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v59, v60); cocos2d::CCNode::runAction(v29, v61); v63 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"dungeonShine_001.png", v62); v195 = *(cocos2d::CCString **)(*(_QWORD *)v63 + 184LL); v197 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v26 + 192LL))(v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -10.0); cocos2d::CCPoint::operator+(&v211, v197); ((void (__fastcall *)(cocos2d::CCNode *, __int64 *))v195)(v63, &v211); (*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, __int64))*this + 58))(this, v63, 5); (*(void (__fastcall **)(cocos2d::CCNode *, float))(*(_QWORD *)v63 + 160LL))(v63, 1.2); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v63 + 1080LL))(v63, 0x100000302LL); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v63 + 912LL))(v63, 4294967240LL); v64 = *(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v63 + 960LL); LOWORD(v211) = -14081; BYTE2(v211) = 0; v64(v63, &v211); v66 = (cocos2d::CCEaseInOut *)cocos2d::CCFadeTo::create((cocos2d::CCFadeTo *)0xFFFFFFA0LL, 1.6, v65); v198 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v66, v67, 1.3); v69 = (cocos2d::CCEaseInOut *)cocos2d::CCFadeTo::create((cocos2d::CCFadeTo *)0xFFFFFFE1LL, 1.6, v68); v71 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v69, v70, 1.3); v72 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v198, v71, 0); v74 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v72, v73); v75 = (cocos2d::CCScaleTo *)cocos2d::CCNode::runAction(v63, v74); v76 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create(v75, 1.0, 1.0); v199 = (cocos2d::CCScaleTo *)cocos2d::CCEaseInOut::create(v76, v77, 1.5); v78 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create(v199, 1.0, 1.2); v80 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v78, v79, 1.5); v81 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v199, v80, 0); v83 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v81, v82); cocos2d::CCNode::runAction(v63, v83); v85 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeonTorch_001.png", v84); (*((void (__fastcall **)(cocos2d::CCArray **, __int64, __int64))*this + 58))(this, v85, 6); v196 = *(cocos2d::CCString **)(*(_QWORD *)v85 + 184LL); v200 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v26 + 192LL))(v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, -1.0, -10.0); cocos2d::CCPoint::operator+(&v211, v200); ((void (__fastcall *)(__int64, __int64 *))v196)(v85, &v211); v87 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeonShine_001.png", v86); v88 = v26; v89 = *(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v26 + 192LL); v90 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v87 + 184LL); v91 = v89(v88); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -14.0); cocos2d::CCPoint::operator+(&v211, v91); v90(v87, &v211); (*((void (__fastcall **)(cocos2d::CCArray **, __int64, __int64))*this + 58))(this, v87, 7); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v87 + 160LL))(v87, 0.6); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v87 + 1080LL))(v87, 0x100000302LL); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v87 + 912LL))(v87, 4294967215LL); v92 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v87 + 960LL); LOWORD(v211) = -26881; BYTE2(v211) = 0; v92(v87, &v211); v94 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"dungeon_bars_bottom_001.png", v93); (*((void (__fastcall **)(cocos2d::CCArray **, __int64, __int64))*this + 58))(this, v94, 12); v95 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v94 + 184LL); v96 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL))(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -52.0); cocos2d::CCPoint::operator+(&v211, v96); v97 = (DungeonBarsSprite *)v95(v94, &v211); v98 = DungeonBarsSprite::create(v97); *(this + 52) = v98; (*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, __int64))*this + 58))(this, v98, 9); v99 = (__int64)*(this + 52); v100 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v99 + 184LL); v101 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL))(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, -2.0, 10.0); cocos2d::CCPoint::operator+(&v211, v101); v102 = (GameManager *)v100(v99, &v211); v103 = (GameManager *)GameManager::sharedState(v102); if ( (unsigned __int8)GameManager::getUGV(v103, "13") ) (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 52) + 344LL))(*(this + 52), 0); v105 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretEyes_01_001.png", v104); *(this + 55) = (cocos2d::CCArray *)v105; v106 = v105; v107 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v105 + 184LL); v108 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL))(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 13.5, 6.0); cocos2d::CCPoint::operator+(&v211, v108); v107(v106, &v211); v109 = (GameManager *)(*((__int64 (__fastcall **)(cocos2d::CCArray **, _QWORD, __int64))*this + 58))( this, *(this + 55), 10); v110 = (GameManager *)GameManager::sharedState(v109); UGV = (GameManager *)(unsigned __int8)GameManager::getUGV(v110, (char *)&word_120A570); if ( !(_BYTE)UGV || (v193 = (GameManager *)GameManager::sharedState(UGV), (unsigned __int8)GameManager::getUGV(v193, "13")) ) { (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 55) + 344LL))(*(this + 55), 0); } else { SecretLayer3::animateEyes(this); } v113 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretBody_01_001.png", v112); *(this + 56) = (cocos2d::CCArray *)v113; (*((void (__fastcall **)(cocos2d::CCArray **, __int64, __int64))*this + 58))(this, v113, 9); v114 = (__int64)*(this + 56); v115 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v114 + 184LL); v201 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 55) + 192LL))(*(this + 55)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -2.0); cocos2d::CCPoint::operator+(&v211, v201); v115(v114, &v211); v116 = (cocos2d::CCMenu *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 56) + 344LL))( *(this + 56), 0); v117 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v116); v118 = (cocos2d::CCArray *)(*((__int64 (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, __int64))*this + 58))( this, v117, 12); v119 = (cocos2d::CCObject *)cocos2d::CCArray::create(v118); *(this + 54) = v119; cocos2d::CCObject::retain(v119); v120 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL))(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 160.0, 20.0); cocos2d::CCPoint::operator+(&v211, v120); v121 = (GameManager *)cocos2d::CCNode::convertToNodeSpace(&v208, v117, (const cocos2d::CCPoint *)&v211); v122 = (GameManager *)GameManager::sharedState(v121); v123 = (unsigned __int8)GameManager::getUGV(v122, (char *)&word_1217DE8); if ( !(_BYTE)v123 ) { v191 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretLock01_001.png", v124); v192 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v191, 0, (__int64)this, (__int64)SecretLayer3::onClick, 0); (*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v117 + 456LL))(v117, v192); v206 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v192 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, -30.0, -25.0); cocos2d::CCPoint::operator+(&v211, &v208); v206(v192, &v211); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v192 + 72LL))(v192, 1); v123 = cocos2d::CCArray::addObject(*(this + 54), v192); } v125 = (GameManager *)GameManager::sharedState((GameManager *)v123); v126 = (unsigned __int8)GameManager::getUGV(v125, "15"); if ( !(_BYTE)v126 ) { v189 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretLock02_001.png", v127); v190 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v189, 0, (__int64)this, (__int64)SecretLayer3::onClick, 0); (*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v117 + 456LL))(v117, v190); v205 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v190 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, 25.0); cocos2d::CCPoint::operator+(&v211, &v208); v205(v190, &v211); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v190 + 72LL))(v190, 2); v126 = cocos2d::CCArray::addObject(*(this + 54), v190); } v128 = (GameManager *)GameManager::sharedState((GameManager *)v126); v129 = (unsigned __int8)GameManager::getUGV(v128, "16"); if ( !(_BYTE)v129 ) { v187 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"secretLock03_001.png", v130); v188 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v187, 0, (__int64)this, (__int64)SecretLayer3::onClick, 0); (*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v117 + 456LL))(v117, v188); v204 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v188 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 30.0, -25.0); cocos2d::CCPoint::operator+(&v211, &v208); v204(v188, &v211); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v188 + 72LL))(v188, 3); v129 = cocos2d::CCArray::addObject(*(this + 54), v188); } v131 = (GameManager *)GameManager::sharedState((GameManager *)v129); v132 = (unsigned __int8)GameManager::getUGV(v131, (char *)&word_120A570); if ( !(_BYTE)v132 ) { v133 = 0; while ( 1 ) { v132 = cocos2d::CCArray::count(*(this + 54)); if ( v133 >= (unsigned int)v132 ) break; v134 = v133++; v135 = cocos2d::CCArray::objectAtIndex(*(this + 54), v134); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v135 + 1056LL))(v135, 0); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v135 + 344LL))(v135, 0); } } v136 = GameStatsManager::sharedState((GameStatsManager *)v132); v212 = 0; v213 = 0; v214 = nullptr; std::string::__init(&v212, "0001", 4u); isSpecialChestUnlocked = (GameStatsManager *)GameStatsManager::isSpecialChestUnlocked(v136, (char *)&v212); v138 = (unsigned __int8)isSpecialChestUnlocked; if ( (v212 & 1) != 0 ) { operator delete(v214); if ( v138 ) goto LABEL_32; } else if ( (_BYTE)isSpecialChestUnlocked ) { goto LABEL_32; } v139 = GameStatsManager::sharedState(isSpecialChestUnlocked); v212 = 0; v213 = 0; v214 = nullptr; std::string::__init(&v212, "0001", 4u); RewardForSpecialChest = GameStatsManager::getRewardForSpecialChest(v139, (__int64)&v212); if ( (v212 & 1) != 0 ) operator delete(v214); v141 = (unsigned int *)GJChestSprite::create((GJChestSprite *)*(unsigned int *)(RewardForSpecialChest + 64)); GJChestSprite::switchToState(v141, 2u, 0); (*(void (__fastcall **)(unsigned int *, float))(*(_QWORD *)v141 + 160LL))(v141, 0.6); v142 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v141 + 488LL))(v141); v143 = cocos2d::CCArray::objectAtIndex(v142, 0); v144 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v143 + 960LL); LOWORD(v211) = -14136; BYTE2(v211) = -1; v144(v143, &v211); v145 = (__int64 *)CCMenuItemSpriteExtra::create((__int64)v141, 0, (__int64)this, (__int64)SecretLayer3::onChest01, 0); v212 = 0; v213 = 0; v214 = nullptr; std::string::__init(&v212, "chestClick.ogg", 0xEu); if ( v145 + 55 != &v212 ) { if ( (v212 & 1) != 0 ) { v146 = (char *)v214; v147 = v213; } else { v147 = (unsigned __int8)v212 >> 1; v146 = (char *)&v212 + 1; } std::string::assign(v145 + 55, v146, v147); } if ( (v212 & 1) != 0 ) operator delete(v214); v148 = *(void (__fastcall **)(__int64 *, __int64 *))(*v145 + 320); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v211, 60.0, 48.0); v148(v145, &v211); v149 = *(void (__fastcall **)(unsigned int *, __int64 *))(*(_QWORD *)v141 + 184LL); v202 = *(float *)(*(__int64 (__fastcall **)(__int64 *))(*v145 + 328))(v145) * 0.5; v150 = (*(__int64 (__fastcall **)(__int64 *))(*v145 + 328))(v145); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v211, v202, *(float *)(v150 + 4) * 0.5); v149(v141, &v211); (*(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v117 + 456LL))(v117, v145); v151 = *(__int64 (__fastcall **)(__int64 *, __int64 *))(*v145 + 184); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, *(float *)&v207 - 80.0, 60.0); cocos2d::CCNode::convertToNodeSpace(&v211, v117, (const cocos2d::CCPoint *)&v210); isSpecialChestUnlocked = (GameStatsManager *)v151(v145, &v211); LABEL_32: v152 = GameStatsManager::sharedState(isSpecialChestUnlocked); v212 = 0; v213 = 0; v214 = nullptr; std::string::__init(&v212, "0002", 4u); v153 = GameStatsManager::isSpecialChestUnlocked(v152, (char *)&v212); v154 = (const char *)(unsigned __int8)v212; v155 = v153; if ( (v212 & 1) != 0 ) { operator delete(v214); if ( !v155 ) goto LABEL_34; } else if ( !v153 ) { LABEL_34: v156 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v153); v157 = (GameStatsManager *)(*((__int64 (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, __int64))*this + 58))( this, v156, 10); v158 = GameStatsManager::sharedState(v157); v212 = 0; v213 = 0; v214 = nullptr; std::string::__init(&v212, "0002", 4u); v159 = GameStatsManager::getRewardForSpecialChest(v158, (__int64)&v212); if ( (v212 & 1) != 0 ) operator delete(v214); v160 = (unsigned int *)GJChestSprite::create((GJChestSprite *)*(unsigned int *)(v159 + 64)); GJChestSprite::switchToState(v160, 2u, 0); (*(void (__fastcall **)(unsigned int *, float))(*(_QWORD *)v160 + 160LL))(v160, 0.6); v161 = CCMenuItemSpriteExtra::create((__int64)v160, 0, (__int64)this, (__int64)SecretLayer3::onChest02, 0); *(this + 57) = (cocos2d::CCArray *)v161; v212 = 0; v213 = 0; v214 = nullptr; std::string::__init(&v212, "chestClick.ogg", 0xEu); if ( (__int64 *)(v161 + 440) != &v212 ) { if ( (v212 & 1) != 0 ) { v162 = (char *)v214; v163 = v213; } else { v163 = (unsigned __int8)v212 >> 1; v162 = (char *)&v212 + 1; } std::string::assign((__int64 *)(v161 + 440), v162, v163); } if ( (v212 & 1) != 0 ) operator delete(v214); v164 = (__int64)*(this + 57); v165 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v164 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v211, 60.0, 48.0); v165(v164, &v211); v166 = *(void (__fastcall **)(unsigned int *, __int64 *))(*(_QWORD *)v160 + 184LL); v203 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 57) + 328LL))(*(this + 57)) * 0.5; v167 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 57) + 328LL))(*(this + 57)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v211, v203, *(float *)(v167 + 4) * 0.5); v166(v160, &v211); (*(void (__fastcall **)(cocos2d::CCNode *, _QWORD))(*(_QWORD *)v156 + 456LL))(v156, *(this + 57)); v168 = (__int64)*(this + 57); v169 = v20; v170 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL); v171 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v168 + 184LL); v172 = v170(v169); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v209, 0.0, -24.0); cocos2d::CCPoint::operator+(&v210, v172); cocos2d::CCNode::convertToNodeSpace(&v211, v156, (const cocos2d::CCPoint *)&v210); v171(v168, &v211); *((_BYTE *)*(this + 57) + 408) = 0; v173 = *(this + 57); *((_BYTE *)v173 + 409) = 1; v174 = (GameManager *)GameManager::sharedState(v173); if ( !(unsigned __int8)GameManager::getUGV(v174, "13") ) { (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 57) + 1056LL))(*(this + 57), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 57) + 344LL))(*(this + 57), 0); } } v175 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v154); v176 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v175, 0, (__int64)this, (__int64)SecretLayer3::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v176, 1.5); v177 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v176, nullptr); (*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCDirector **, __int64))*this + 58))(this, v177, 1); v178 = *((__int64 (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v177 + 23); v179 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v177); ScreenLeft = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v179); v182 = v181; v183 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenLeft); cocos2d::CCDirector::getScreenTop(v183); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v211, v182 + 24.0, v184 - 23.0); v185 = (PlatformToolbox *)v178(v177, &v211); isControllerConnected = PlatformToolbox::isControllerConnected(v185); if ( isControllerConnected ) { v194 = isControllerConnected; GameToolbox::addBackButton((GameToolbox *)this, v176, (cocos2d::CCMenuItem *)isControllerConnected); } return v194; }
GD Web Decomp Icon

GD Web Decomp

Raw Source