// // SecretLayer3::init from 0x10030dd6c to 0x10030eec8 (4444 bytes) // // 2 xrefs: // > SecretLayer3::create @ 0x10030dd20 // > @ 0x1007edcd8 // // 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 // bool __fastcall SecretLayer3::init(SecretLayer3 *a1) { _BOOL4 v2; // w19 cocos2d::CCTexture2DPixelFormat v3; // w21 cocos2d::CCTextureCache *v4; // x0 cocos2d::CCSpriteFrameCache *v5; // x0 GameManager *v6; // x21 int v7; // w19 cocos2d::CCDirector *v8; // x0 cocos2d::CCSprite *v9; // x21 __n128 v10; // q0 __n128 v11; // q1 __n128 v12; // q0 __n128 v13; // q1 cocos2d::CCSprite *v14; // x21 __n128 v15; // q0 __n128 v16; // q1 cocos2d::CCSprite *v17; // x22 __n128 v18; // q0 __n128 v19; // q1 cocos2d::CCSprite *v20; // x22 __n128 v21; // q0 __n128 v22; // q1 cocos2d::CCSprite *v23; // x23 float v24; // s0 __int64 v25; // x0 cocos2d::CCArray *v26; // x25 cocos2d::CCArray *v27; // x24 cocos2d::CCSpriteFrameCache *v28; // x28 cocos2d::CCString *v29; // x0 const char *CString; // x0 cocos2d::CCSpriteFrameCache *v31; // x28 cocos2d::CCString *v32; // x0 const char *v33; // x0 cocos2d::CCAnimation *v34; // x0 cocos2d::CCAnimate *v35; // x0 cocos2d::CCRepeatForever *v36; // x0 cocos2d::CCAnimation *v37; // x0 cocos2d::CCAnimate *v38; // x0 cocos2d::CCRepeatForever *v39; // x0 cocos2d::CCSprite *v40; // x24 float32x2_t *v41; // x25 __n128 v42; // q0 __n128 v43; // q1 double v44; // d0 cocos2d::CCFadeTo *v45; // x0 cocos2d::CCEaseInOut *v46; // x25 cocos2d::CCFadeTo *v47; // x0 char v48; // w0 __int64 v49; // x1 __int64 v50; // x2 __int64 v51; // x3 __int64 v52; // x4 __int64 v53; // x5 __int64 v54; // x6 __int64 v55; // x7 cocos2d::CCSequence *v56; // x0 cocos2d::CCRepeatForever *v57; // x0 cocos2d::CCScaleTo *v58; // x0 cocos2d::CCEaseInOut *v59; // x25 cocos2d::CCScaleTo *v60; // x0 char v61; // w0 __int64 v62; // x1 __int64 v63; // x2 __int64 v64; // x3 __int64 v65; // x4 __int64 v66; // x5 __int64 v67; // x6 __int64 v68; // x7 cocos2d::CCSequence *v69; // x0 cocos2d::CCRepeatForever *v70; // x0 cocos2d::CCSprite *v71; // x24 float32x2_t *v72; // x25 __n128 v73; // q0 __n128 v74; // q1 double v75; // d0 cocos2d::CCSprite *v76; // x23 float32x2_t *v77; // x22 __n128 v78; // q0 __n128 v79; // q1 double v80; // d0 cocos2d::CCSprite *v81; // x22 float32x2_t *v82; // x23 __n128 v83; // q1 __n128 v84; // q0 double v85; // d0 DungeonBarsSprite *v86; // x0 DungeonBarsSprite *m_dungeonBars; // x22 float32x2_t *v88; // x23 __n128 v89; // q0 __n128 v90; // q1 double v91; // d0 GameManager *v92; // x0 cocos2d::CCSprite *v93; // x22 float32x2_t *v94; // x23 __n128 v95; // q0 __n128 v96; // q1 double v97; // d0 GameManager *v98; // x0 GameManager *v99; // x0 cocos2d::CCSprite *v100; // x0 cocos2d::CCSprite *m_demonBody; // x22 float32x2_t *v102; // x23 __n128 v103; // q0 __n128 v104; // q1 double v105; // d0 cocos2d::CCMenu *v106; // x22 cocos2d::CCArray *v107; // x0 float32x2_t *v108; // x23 __n128 v109; // q0 __n128 v110; // q1 GameManager *v111; // x0 cocos2d::CCSprite *v112; // x0 CCMenuItemSpriteExtra *v113; // x23 __n128 v114; // q0 __n128 v115; // q1 double v116; // d0 GameManager *v117; // x0 cocos2d::CCSprite *v118; // x0 CCMenuItemSpriteExtra *v119; // x23 __n128 v120; // q0 __n128 v121; // q1 double v122; // d0 GameManager *v123; // x0 cocos2d::CCSprite *v124; // x0 CCMenuItemSpriteExtra *v125; // x23 __n128 v126; // q0 __n128 v127; // q1 double v128; // d0 GameManager *v129; // x0 unsigned int v130; // w23 __int64 v131; // x24 GameStatsManager *v132; // x23 char isSpecialChestUnlocked; // w0 char v134; // w23 GameStatsManager *v135; // x23 __int64 RewardForSpecialChest; // x23 GJChestSprite *v137; // x23 __int64 v138; // x0 __int64 v139; // x0 CCMenuItemSpriteExtra *v140; // x24 float v141; // s9 __n128 v142; // q1 __n128 v143; // q0 __n128 v144; // q0 __n128 v145; // q1 GameStatsManager *v146; // x22 char v147; // w0 char v148; // w22 cocos2d::CCMenu *v149; // x22 GameStatsManager *v150; // x23 __int64 v151; // x23 GJChestSprite *v152; // x23 CCMenuItemSpriteExtra *v153; // x24 CCMenuItemSpriteExtra *m_secretChest; // x24 float v155; // s8 __n128 v156; // q1 __n128 v157; // q0 CCMenuItemSpriteExtra *v158; // x23 float32x2_t *v159; // x21 __n128 v160; // q0 __n128 v161; // q1 GameManager *v162; // x0 cocos2d::CCSprite *v163; // x0 CCMenuItemSpriteExtra *v164; // x21 __int64 v165; // x1 __int64 v166; // x2 __int64 v167; // x3 __int64 v168; // x4 __int64 v169; // x5 __int64 v170; // x6 __int64 v171; // x7 cocos2d::CCMenu *v172; // x22 cocos2d::CCDirector *v173; // x0 float v174; // s8 cocos2d::CCDirector *v175; // x0 __n128 v176; // q1 __n128 v177; // q0 bool v179; // [xsp+14h] [xbp-14Ch] float32x2_t v180; // [xsp+18h] [xbp-148h] BYREF std::string v181; // [xsp+20h] [xbp-140h] BYREF void *v182[2]; // [xsp+38h] [xbp-128h] BYREF char v183; // [xsp+4Fh] [xbp-111h] void *v184[2]; // [xsp+50h] [xbp-110h] BYREF char v185; // [xsp+67h] [xbp-F9h] std::string __str; // [xsp+68h] [xbp-F8h] BYREF void *v187[2]; // [xsp+80h] [xbp-E0h] BYREF char v188; // [xsp+97h] [xbp-C9h] void *__p[2]; // [xsp+98h] [xbp-C8h] BYREF char v190; // [xsp+AFh] [xbp-B1h] float32x2_t v191; // [xsp+B0h] [xbp-B0h] BYREF float32x2_t v192; // [xsp+B8h] [xbp-A8h] BYREF float32x2_t v193; // [xsp+C0h] [xbp-A0h] BYREF float v194; // [xsp+C8h] [xbp-98h] float v195; // [xsp+CCh] [xbp-94h] void *v196[2]; // [xsp+D0h] [xbp-90h] BYREF char v197; // [xsp+E7h] [xbp-79h] cocos2d::CCPoint v198; // 0:kr10_8.8 cocos2d::CCPoint v199; // 0:kr18_8.8 cocos2d::SEL_MenuHandler v200; // 0:x3.16 cocos2d::SEL_MenuHandler v201; // 0:x3.16 cocos2d::SEL_MenuHandler v202; // 0:x3.16 cocos2d::SEL_MenuHandler v203; // 0:x3.16 cocos2d::SEL_MenuHandler v204; // 0:x3.16 cocos2d::SEL_MenuHandler v205; // 0:x3.16 v2 = cocos2d::CCLayer::init(a1); if ( !v2 ) return v2; v3 = cocos2d::CCTexture2D::defaultAlphaPixelFormat(); cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA8888); v4 = cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::addImage(v4, "DungeonSheet.png", 0); v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v5, "DungeonSheet.plist"); cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v3); v6 = GameManager::sharedState(); sub_100009900(v196, "secretLoop02.mp3"); GameManager::fadeInMusic(v6, v196); v179 = v2; if ( v197 < 0 ) operator delete(v196[0]); v7 = 1; ((void (__fastcall *)(SecretLayer3 *, __int64))a1->setKeypadEnabled)(a1, 1); ((void (__fastcall *)(SecretLayer3 *, __int64))a1->setKeyboardEnabled)(a1, 1); v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v8); v9 = cocos2d::CCSprite::create("GJ_gradientBG.png"); v10.n128_u32[0] = 0; v11.n128_u32[0] = 0; sub_100022980(v10, v11, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v9->setAnchorPoint)(v9, &v193); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v9, 4294967293LL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v9->setScaleX)(v9, (float)(v194 + 10.0) / v9->m_obRect.size.width); v12 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v9->setScaleY)( v9, (float)(v195 + 10.0) / v9->m_obRect.size.height); v12.n128_u32[0] = -5.0; v13.n128_u32[0] = -5.0; sub_100022980(v12, v13, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v9->setPosition)(v9, &v193); v193.i8[2] = 30; v193.i16[0] = 1280; ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v9->setColor)(v9, &v193); v14 = cocos2d::CCSprite::createWithSpriteFrameName("dungeon_gate_001.png"); v15 = ((__n128 (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v14, 2); v15.n128_f32[0] = v194 * 0.5; v16.n128_f32[0] = (float)(v195 * 0.5) + -5.0; sub_100022980(v15, v16, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v14->setPosition)(v14, &v193); v17 = cocos2d::CCSprite::createWithSpriteFrameName("dungeon_foreground_001.png"); v18 = ((__n128 (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v17, 3); v18.n128_f32[0] = v194 * 0.5; v19.n128_u32[0] = 15.0; sub_100022980(v18, v19, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v17->setPosition)(v17, &v193); v20 = cocos2d::CCSprite::createWithSpriteFrameName("Fire_02_looped_001.png"); v21 = ((__n128 (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v20, 4); v21.n128_f32[0] = (float)(v194 * 0.5) + -160.0; v22.n128_f32[0] = (float)(v195 * 0.5) + 50.0; sub_100022980(v21, v22, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v20->setPosition)(v20, &v193); v23 = cocos2d::CCSprite::createWithSpriteFrameName("Fire_02_looped_001.png"); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v23, 3); v24 = ((float (__fastcall *)(cocos2d::CCSprite *))v20->getScale)(v20); ((void (__fastcall *)(cocos2d::CCSprite *, float))v23->setScale)(v23, v24 + v24); v25 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v20->getPosition)(v20); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v23->setPosition)(v23, v25); v193.i8[2] = 0; v193.i16[0] = 255; ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v20->setColor)(v20, &v193); v193.i8[2] = 0; v193.i16[0] = -1; ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v23->setColor)(v23, &v193); v26 = (cocos2d::CCArray *)sub_10024A15C(); v27 = (cocos2d::CCArray *)sub_10024A15C(); do { v28 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v29 = (cocos2d::CCString *)sub_100268F4C("Fire_02_looped_%03i.png", v7); CString = cocos2d::CCString::getCString(v29); cocos2d::CCSpriteFrameCache::spriteFrameByName(v28, CString); sub_10024A2D0((__int64)v26); v31 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v32 = (cocos2d::CCString *)sub_100268F4C("Fire_02_2_looped_%03i.png", v7); v33 = cocos2d::CCString::getCString(v32); cocos2d::CCSpriteFrameCache::spriteFrameByName(v31, v33); sub_10024A2D0((__int64)v27); ++v7; } while ( v7 != 10 ); v34 = cocos2d::CCAnimation::createWithSpriteFrames(v26, 0.08); v35 = cocos2d::CCAnimate::create(v34); v36 = cocos2d::CCRepeatForever::create(v35); cocos2d::CCNode::runAction(v20, v36); v37 = cocos2d::CCAnimation::createWithSpriteFrames(v27, 0.08); v38 = cocos2d::CCAnimate::create(v37); v39 = cocos2d::CCRepeatForever::create(v38); cocos2d::CCNode::runAction(v23, v39); v40 = cocos2d::CCSprite::createWithSpriteFrameName("dungeonShine_001.png"); v41 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v20->getPosition)(v20); v42.n128_u32[0] = 0; v43.n128_u32[0] = -10.0; sub_100022980(v42, v43, &v192); *(float32x2_t *)&v44 = sub_1000229DC(v41, &v192, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v40->setPosition)(v40, &v193, v44); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v40, 5); ((void (__fastcall *)(cocos2d::CCSprite *, float))v40->setScale)(v40, 1.2); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v40->setBlendFunc)(v40, 0x100000302LL); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v40->setOpacity)(v40, 200); v193.i8[2] = 0; v193.i16[0] = -14081; ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v40->setColor)(v40, &v193); v45 = cocos2d::CCFadeTo::create(1.6, 0xA0u); v46 = cocos2d::CCEaseInOut::create(v45, 1.3); v47 = cocos2d::CCFadeTo::create(1.6, 0xE1u); v48 = (unsigned __int8)cocos2d::CCEaseInOut::create(v47, 1.3); v56 = sub_10018A494(v46, v49, v50, v51, v52, v53, v54, v55, v48); v57 = cocos2d::CCRepeatForever::create(v56); cocos2d::CCNode::runAction(v40, v57); v58 = cocos2d::CCScaleTo::create_1(1.0, 1.0); v59 = cocos2d::CCEaseInOut::create(v58, 1.5); v60 = cocos2d::CCScaleTo::create_1(1.0, 1.2); v61 = (unsigned __int8)cocos2d::CCEaseInOut::create(v60, 1.5); v69 = sub_10018A494(v59, v62, v63, v64, v65, v66, v67, v68, v61); v70 = cocos2d::CCRepeatForever::create(v69); cocos2d::CCNode::runAction(v40, v70); v71 = cocos2d::CCSprite::createWithSpriteFrameName("dungeonTorch_001.png"); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v71, 6); v72 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v20->getPosition)(v20); v73.n128_u32[0] = -1.0; v74.n128_u32[0] = -10.0; sub_100022980(v73, v74, &v192); *(float32x2_t *)&v75 = sub_1000229DC(v72, &v192, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v71->setPosition)(v71, &v193, v75); v76 = cocos2d::CCSprite::createWithSpriteFrameName("dungeonShine_001.png"); v77 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v20->getPosition)(v20); v78.n128_u32[0] = 0; v79.n128_u32[0] = -14.0; sub_100022980(v78, v79, &v192); *(float32x2_t *)&v80 = sub_1000229DC(v77, &v192, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v76->setPosition)(v76, &v193, v80); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v76, 7); ((void (__fastcall *)(cocos2d::CCSprite *, float))v76->setScale)(v76, 0.6); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v76->setBlendFunc)(v76, 0x100000302LL); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v76->setOpacity)(v76, 175); v193.i8[2] = 0; v193.i16[0] = -26881; ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v76->setColor)(v76, &v193); v81 = cocos2d::CCSprite::createWithSpriteFrameName("dungeon_bars_bottom_001.png"); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v81, 12); v82 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v14->getPosition)(v14); v83.n128_u32[0] = -1034944512; v84.n128_u32[0] = 0; sub_100022980(v84, v83, &v192); *(float32x2_t *)&v85 = sub_1000229DC(v82, &v192, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v81->setPosition)(v81, &v193, v85); v86 = DungeonBarsSprite::create(); a1->m_dungeonBars = v86; ((void (__fastcall *)(SecretLayer3 *, DungeonBarsSprite *, __int64))a1->addChild_0)(a1, v86, 9); m_dungeonBars = a1->m_dungeonBars; v88 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v14->getPosition)(v14); v89.n128_u32[0] = -2.0; v90.n128_u32[0] = 10.0; sub_100022980(v89, v90, &v192); *(float32x2_t *)&v91 = sub_1000229DC(v88, &v192, &v193); ((void (__fastcall *)(DungeonBarsSprite *, float32x2_t *, double))m_dungeonBars->setPosition)( m_dungeonBars, &v193, v91); v92 = GameManager::sharedState(); if ( GameManager::getUGV(v92, "13") ) ((void (__fastcall *)(DungeonBarsSprite *, _QWORD))a1->m_dungeonBars->setVisible)(a1->m_dungeonBars, 0); v93 = cocos2d::CCSprite::createWithSpriteFrameName("secretEyes_01_001.png"); a1->m_demonEyes = v93; v94 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v14->getPosition)(v14); v95.n128_u32[0] = 13.5; v96.n128_u32[0] = 6.0; sub_100022980(v95, v96, &v192); *(float32x2_t *)&v97 = sub_1000229DC(v94, &v192, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v93->setPosition)(v93, &v193, v97); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, a1->m_demonEyes, 10); v98 = GameManager::sharedState(); if ( GameManager::getUGV(v98, "12") && (v99 = GameManager::sharedState(), !GameManager::getUGV(v99, "13")) ) SecretLayer3::animateEyes(a1); else ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_demonEyes->setVisible)(a1->m_demonEyes, 0); v100 = cocos2d::CCSprite::createWithSpriteFrameName("secretBody_01_001.png"); a1->m_demonBody = v100; ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v100, 9); m_demonBody = a1->m_demonBody; v102 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_demonEyes->getPosition)(a1->m_demonEyes); v103.n128_u32[0] = 0; v104.n128_u32[0] = -2.0; sub_100022980(v103, v104, &v192); *(float32x2_t *)&v105 = sub_1000229DC(v102, &v192, &v193); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))m_demonBody->setPosition)(m_demonBody, &v193, v105); ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_demonBody->setVisible)(a1->m_demonBody, 0); v106 = cocos2d::CCMenu::create(); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v106, 12); v107 = (cocos2d::CCArray *)sub_10024A15C(); a1->m_locksArray = v107; cocos2d::CCObject::retain(v107); v108 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v14->getPosition)(v14); v109.n128_u32[0] = 1126170624; v110.n128_u32[0] = 20.0; sub_100022980(v109, v110, &v191); sub_1000229DC(v108, &v191, &v192); cocos2d::CCNode::convertToNodeSpace(v106, (const cocos2d::CCPoint *)&v192); v111 = GameManager::sharedState(); if ( !GameManager::getUGV(v111, "14") ) { v112 = cocos2d::CCSprite::createWithSpriteFrameName("secretLock01_001.png"); v200.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer3::onClick; v200.adj = 0; v113 = CCMenuItemSpriteExtra::create(v112, nullptr, a1, v200); v114 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v106->addChild)(v106, v113); v114.n128_u32[0] = -30.0; v115.n128_u32[0] = -25.0; sub_100022980(v114, v115, &v191); *(float32x2_t *)&v116 = sub_1000229DC(&v193, &v191, &v192); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, double))v113->setPosition)(v113, &v192, v116); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v113->setTag)(v113, 1); sub_10024A2D0((__int64)a1->m_locksArray); } v117 = GameManager::sharedState(); if ( !GameManager::getUGV(v117, "15") ) { v118 = cocos2d::CCSprite::createWithSpriteFrameName("secretLock02_001.png"); v201.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer3::onClick; v201.adj = 0; v119 = CCMenuItemSpriteExtra::create(v118, nullptr, a1, v201); v120 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v106->addChild)(v106, v119); v120.n128_u32[0] = 0; v121.n128_u32[0] = 25.0; sub_100022980(v120, v121, &v191); *(float32x2_t *)&v122 = sub_1000229DC(&v193, &v191, &v192); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, double))v119->setPosition)(v119, &v192, v122); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v119->setTag)(v119, 2); sub_10024A2D0((__int64)a1->m_locksArray); } v123 = GameManager::sharedState(); if ( !GameManager::getUGV(v123, "16") ) { v124 = cocos2d::CCSprite::createWithSpriteFrameName("secretLock03_001.png"); v202.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer3::onClick; v202.adj = 0; v125 = CCMenuItemSpriteExtra::create(v124, nullptr, a1, v202); v126 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v106->addChild)(v106, v125); v126.n128_u32[0] = 30.0; v127.n128_u32[0] = -25.0; sub_100022980(v126, v127, &v191); *(float32x2_t *)&v128 = sub_1000229DC(&v193, &v191, &v192); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, double))v125->setPosition)(v125, &v192, v128); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v125->setTag)(v125, 3); sub_10024A2D0((__int64)a1->m_locksArray); } v129 = GameManager::sharedState(); if ( !GameManager::getUGV(v129, "12") && (unsigned int)sub_10024A36C((__int64)a1->m_locksArray) ) { v130 = 0; do { v131 = sub_10024A388((__int64)a1->m_locksArray, v130); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v131 + 1040LL))(v131, 0); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v131 + 328LL))(v131, 0); ++v130; } while ( v130 < (unsigned int)sub_10024A36C((__int64)a1->m_locksArray) ); } v132 = GameStatsManager::sharedState(); sub_100009900(__p, "0001"); isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v132, __p); v134 = isSpecialChestUnlocked; if ( v190 < 0 ) { operator delete(__p[0]); if ( (v134 & 1) != 0 ) goto LABEL_31; } else if ( (isSpecialChestUnlocked & 1) != 0 ) { goto LABEL_31; } v135 = GameStatsManager::sharedState(); sub_100009900(v187, "0001"); RewardForSpecialChest = GameStatsManager::getRewardForSpecialChest(v135, v187); if ( v188 < 0 ) operator delete(v187[0]); v137 = GJChestSprite::create(*(_DWORD *)(RewardForSpecialChest + 64)); GJChestSprite::switchToState(v137, Closed, 0); ((void (__fastcall *)(GJChestSprite *, float))v137->setScale)(v137, 0.6); v138 = ((__int64 (__fastcall *)(GJChestSprite *))v137->getChildren)(v137); v139 = sub_10024A388(v138, 0); v192.i8[2] = -1; v192.i16[0] = -14136; (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v139 + 944LL))(v139, &v192); v203.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer3::onChest01; v203.adj = 0; v140 = CCMenuItemSpriteExtra::create(v137, nullptr, a1, v203); sub_100009900(&__str, "chestClick.ogg"); std::string::operator=((std::string *)&v140->m_selectSound, &__str); if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); sub_100022988((float *)&v192, 60.0, 48.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *))v140->setContentSize)(v140, &v192); v141 = *(float *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v140->getContentSize)(v140) * 0.5; v142.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v140->getContentSize)(v140) + 4) * 0.5; v143.n128_f32[0] = v141; sub_100022980(v143, v142, &v192); ((void (__fastcall *)(GJChestSprite *, float32x2_t *))v137->setPosition)(v137, &v192); v144 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v106->addChild)(v106, v140); v144.n128_f32[0] = v194 + -80.0; v145.n128_u32[0] = 1114636288; sub_100022980(v144, v145, &v191); v198 = cocos2d::CCNode::convertToNodeSpace(v106, (const cocos2d::CCPoint *)&v191); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v140->setPosition)( v140, &v192, v198.x, v198.y); LABEL_31: v146 = GameStatsManager::sharedState(); sub_100009900(v184, "0002"); v147 = GameStatsManager::isSpecialChestUnlocked(v146, v184); v148 = v147; if ( (v185 & 0x80000000) == 0 ) { if ( (v147 & 1) != 0 ) goto LABEL_41; LABEL_35: v149 = cocos2d::CCMenu::create(); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v149, 10); v150 = GameStatsManager::sharedState(); sub_100009900(v182, "0002"); v151 = GameStatsManager::getRewardForSpecialChest(v150, v182); if ( v183 < 0 ) operator delete(v182[0]); v152 = GJChestSprite::create(*(_DWORD *)(v151 + 64)); GJChestSprite::switchToState(v152, Closed, 0); ((void (__fastcall *)(GJChestSprite *, float))v152->setScale)(v152, 0.6); v204.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer3::onChest02; v204.adj = 0; v153 = CCMenuItemSpriteExtra::create(v152, nullptr, a1, v204); a1->m_secretChest = v153; sub_100009900(&v181, "chestClick.ogg"); std::string::operator=((std::string *)&v153->m_selectSound, &v181); if ( SHIBYTE(v181.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v181.__r_.__value_.__l.__data_); m_secretChest = a1->m_secretChest; sub_100022988((float *)&v192, 60.0, 48.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *))m_secretChest->setContentSize)(m_secretChest, &v192); v155 = *(float *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_secretChest->getContentSize)(a1->m_secretChest) * 0.5; v156.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_secretChest->getContentSize)(a1->m_secretChest) + 4) * 0.5; v157.n128_f32[0] = v155; sub_100022980(v157, v156, &v192); ((void (__fastcall *)(GJChestSprite *, float32x2_t *))v152->setPosition)(v152, &v192); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v149->addChild)(v149, a1->m_secretChest); v158 = a1->m_secretChest; v159 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v14->getPosition)(v14); v160.n128_u32[0] = 0; v161.n128_u32[0] = -24.0; sub_100022980(v160, v161, &v180); sub_1000229DC(v159, &v180, &v191); v199 = cocos2d::CCNode::convertToNodeSpace(v149, (const cocos2d::CCPoint *)&v191); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v158->setPosition)( v158, &v192, v199.x, v199.y); *(_WORD *)&a1->m_secretChest->m_animationEnabled = 256; v162 = GameManager::sharedState(); if ( !GameManager::getUGV(v162, "13") ) { ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_secretChest->setEnabled)(a1->m_secretChest, 0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_secretChest->setVisible)(a1->m_secretChest, 0); } goto LABEL_41; } operator delete(v184[0]); if ( (v148 & 1) == 0 ) goto LABEL_35; LABEL_41: v163 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); v205.ptr = (void (__cdecl *)(cocos2d::CCObject *))SecretLayer3::onBack; v205.adj = 0; v164 = CCMenuItemSpriteExtra::create(v163, nullptr, a1, v205); CCMenuItemSpriteExtra::setSizeMult(v164, 1.5); v172 = sub_1001D7ED0(v164, v165, v166, v167, v168, v169, v170, v171, 0); ((void (__fastcall *)(SecretLayer3 *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v172, 1); v173 = cocos2d::CCDirector::sharedDirector(); v174 = sub_1001768D8((__int64)v173) + 24.0; v175 = cocos2d::CCDirector::sharedDirector(); v176.n128_f32[0] = sub_1001768C8((__int64)v175) + -23.0; v177.n128_f32[0] = v174; sub_100022980(v177, v176, &v192); ((void (__fastcall *)(cocos2d::CCMenu *, float32x2_t *))v172->setPosition)(v172, &v192); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, v164); LOBYTE(v2) = v179; return v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source