// // GJPathPage::init from 0x1402855e0 to 0x140287204 (7204 bytes) // // 2 xrefs: // > GJPathPage::create @ 0x140285594 // > @ 0x1406d1580 // // 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 // // Hidden C++ exception states: #wind=15 bool GJPathPage::init(GJPathPage *a1, int a2, GJPathsLayer *a3) { GameStatsManager *v5; // rcx int v6; // r13d __int64 v7; // rcx bool isItemUnlocked; // di __int64 v9; // rax cocos2d::CCTouchDispatcher *v10; // rax bool result; // al _BOOL8 v12; // rdx _BOOL8 v13; // rdx __int64 v14; // rcx cocos2d::CCDirector *v15; // rax cocos2d::CCLayer *v16; // rax char v17; // si char v18; // r14 int v19; // r12d CCSpriteWithHue *v20; // rdi unsigned __int8 v21; // cl float v22; // xmm0_4 CCSpriteWithHue_vtbl *v23; // rbx const cocos2d::CCPoint *v24; // rax float *v25; // rbx double v26; // xmm0_8 float v27; // xmm6_4 __int64 v28; // rbx double v29; // xmm0_8 float v30; // xmm14_4 struct cocos2d::CCSprite *v31; // rax CCMenuItemSpriteExtra *v32; // rax cocos2d::CCMenu *v33; // rax cocos2d::CCMenu_vtbl *v34; // rbx float v35; // xmm6_4 const cocos2d::CCPoint *v36; // rax __int64 *v37; // rdi float v38; // xmm0_4 __int64 v39; // rbx struct cocos2d::CCPoint v40; // rax GJPathSprite *v41; // rdi cocos2d::CCString *v42; // rax const char *CString; // rax size_t v44; // r8 const char *v45; // rcx CCSpriteWithHue *v46; // rbx __int128 *v47; // rdx size_t v48; // r8 float v49; // xmm0_4 float v50; // xmm0_4 float v51; // xmm0_4 double v52; // xmm0_8 float width; // xmm6_4 float v54; // xmm7_4 double v55; // xmm0_8 float *v56; // rax float v57; // xmm0_4 float v58; // xmm15_4 double v59; // xmm0_8 struct cocos2d::CCSprite *v60; // rdi cocos2d::CCSprite_vtbl *v61; // rbx const cocos2d::CCPoint *v62; // rax cocos2d::CCSprite_vtbl *v63; // rbx cocos2d::CCSprite_vtbl *v64; // rbx int v65; // edi GameStatsManager *v66; // rbx const char *v67; // rax int Stat; // ebx int v69; // ebx GameStatsManager *v70; // rbx const char *v71; // rax float v72; // xmm0_4 float v73; // xmm13_4 struct cocos2d::CCSprite *v74; // rdi cocos2d::CCSprite_vtbl *v75; // rbx __int64 v76; // rax float v77; // xmm0_4 cocos2d::CCSprite_vtbl *v78; // rbx cocos2d::CCSprite_vtbl *v79; // rbx int v80; // r13d cocos2d::CCString *v81; // rax const char *v82; // rax size_t v83; // r8 __int64 v84; // rcx __int64 *v85; // rbx UnlockType v86; // ebx int v87; // esi char *v88; // rdi float v89; // xmm7_4 CCMenuItemSpriteExtra *v90; // r14 CCMenuItemSpriteExtra_vtbl *v91; // rbx __int64 v92; // rax __int64 v93; // rbx float *v94; // rax double v95; // xmm0_8 __int64 v96; // rax const char *v97; // rbx AchievementManager *v98; // rax SimplePlayer *v99; // rsi cocos2d::CCRGBAProtocol_vtbl *v100; // rax cocos2d::CCRGBAProtocol *v101; // rcx __int64 v102; // rdx GJRobotSprite *m_robotSprite; // rcx GJRobotSprite *v104; // rcx GJSpiderSprite *m_spiderSprite; // rcx GJSpiderSprite *v106; // rcx GJRobotSprite *v107; // rcx __int16 v108; // bx __int64 v109; // rdx GJSpiderSprite *v110; // rcx __int64 v111; // rdx char v112; // si __int64 v113; // rdx cocos2d::CCArray *v114; // rax cocos2d::CCArray *v115; // rdi unsigned int v116; // ebx struct cocos2d::CCObject *v117; // rax float v118; // xmm6_4 CCMenuItemSpriteExtra_vtbl *v119; // rbx double v120; // xmm0_8 struct cocos2d::CCPoint v121; // rax struct cocos2d::CCSprite *v122; // rdi cocos2d::CCSprite_vtbl *v123; // rbx __int64 v124; // rax float v125; // xmm0_4 cocos2d::CCSprite_vtbl *v126; // rbx double v127; // xmm0_8 const cocos2d::CCPoint *v128; // rax cocos2d::CCSprite_vtbl *v129; // rbx cocos2d::CCSprite_vtbl *v130; // rbx __int64 v131; // rdx struct cocos2d::CCSprite *v132; // rdi cocos2d::CCSprite_vtbl *v133; // rbx __int64 v134; // r14 double v135; // xmm0_8 const cocos2d::CCPoint *v136; // rax struct cocos2d::CCSprite *v137; // rdi cocos2d::CCSprite_vtbl *v138; // rbx const cocos2d::CCPoint *v139; // rax struct cocos2d::CCSprite *v140; // r14 CCMenuItemSpriteExtra *v141; // rdi float v142; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v143; // rbx double v144; // xmm0_8 struct cocos2d::CCPoint v145; // rax __m128i *v146; // rcx struct cocos2d::CCLabelBMFont *v147; // rsi cocos2d::CCLabelBMFont_vtbl *v148; // rbx float *v149; // rax const cocos2d::CCPoint *v150; // rax struct cocos2d::CCSprite *v151; // rdi float v152; // xmm6_4 double v153; // xmm0_8 __int64 v154; // rax float v155; // xmm7_4 cocos2d::CCString *v156; // rax const char *v157; // rax struct cocos2d::CCLabelBMFont *v158; // rdi float v159; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v160; // rbx const cocos2d::CCPoint *v161; // rax struct cocos2d::CCSprite *v162; // rsi float *v163; // rbx float v164; // xmm0_4 __int64 v165; // rax struct cocos2d::CCSprite *v166; // rdi float v167; // xmm0_4 __int64 v168; // rax GameStatsManager *v169; // rcx int v170; // esi __int64 v171; // rbx int v172; // ebx double v173; // xmm0_8 float *v174; // rax float *v175; // rdi struct cocos2d::CCPoint v176; // rax struct cocos2d::CCSprite *v177; // rsi cocos2d::CCSprite_vtbl *v178; // rbx const cocos2d::CCPoint *v179; // rax __int64 v180; // rdx bool v181; // [rsp+38h] [rbp-D0h] cocos2d::ccColor3B *v182; // [rsp+48h] [rbp-C0h] char v183; // [rsp+88h] [rbp-80h] char v184; // [rsp+8Ah] [rbp-7Eh] char v185; // [rsp+8Ah] [rbp-7Eh] _DWORD v186[4]; // [rsp+98h] [rbp-70h] BYREF GLubyte v187; // [rsp+A8h] [rbp-60h] char v188; // [rsp+AAh] [rbp-5Eh] _WORD v189[2]; // [rsp+ACh] [rbp-5Ch] BYREF bool v190; // [rsp+B0h] [rbp-58h] __int16 v191; // [rsp+B4h] [rbp-54h] BYREF char v192; // [rsp+B6h] [rbp-52h] float v193; // [rsp+B8h] [rbp-50h] __m128i *v194; // [rsp+C0h] [rbp-48h] BYREF int v195; // [rsp+C8h] [rbp-40h] void *v196; // [rsp+D0h] [rbp-38h] BYREF float v197; // [rsp+D8h] [rbp-30h] BYREF int v198; // [rsp+E8h] [rbp-20h] BYREF __m128i *v199; // [rsp+F8h] [rbp-10h] __int16 v200; // [rsp+108h] [rbp+0h] __int16 v201; // [rsp+118h] [rbp+10h] cocos2d::ccColor3B v202; // [rsp+128h] [rbp+20h] BYREF _DWORD v203[4]; // [rsp+138h] [rbp+30h] BYREF struct cocos2d::CCPoint v204; // [rsp+148h] [rbp+40h] BYREF _BYTE v205[4]; // [rsp+150h] [rbp+48h] BYREF struct cocos2d::CCSprite *v206; // [rsp+158h] [rbp+50h] BYREF char v207[8]; // [rsp+160h] [rbp+58h] BYREF __m128i *v208; // [rsp+178h] [rbp+70h] void *v209; // [rsp+180h] [rbp+78h] char *v210; // [rsp+188h] [rbp+80h] struct cocos2d::CCPoint v211; // [rsp+1A0h] [rbp+98h] BYREF struct cocos2d::CCPoint v212; // [rsp+1A8h] [rbp+A0h] BYREF __m128i v213; // [rsp+1B0h] [rbp+A8h] BYREF __int64 v214; // [rsp+1C0h] [rbp+B8h] unsigned __int64 v215; // [rsp+1C8h] [rbp+C0h] __int128 v216; // [rsp+1D0h] [rbp+C8h] BYREF __int64 v217; // [rsp+1E0h] [rbp+D8h] unsigned __int64 v218; // [rsp+1E8h] [rbp+E0h] __int128 v219; // [rsp+1F0h] [rbp+E8h] BYREF __int64 v220; // [rsp+200h] [rbp+F8h] unsigned __int64 v221; // [rsp+208h] [rbp+100h] v195 = a2; a1->m_pathNumber = a2; a1->m_pathsLayer = a3; v191 = 19275; memset(v186, 75, 3); a3->m_closeSprite->setColor(&a3->m_closeSprite->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v186); v6 = a2 + 5; if ( !qword_1406C2EE8 ) { v194 = (__m128i *)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v194); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); } isItemUnlocked = GameStatsManager::isItemUnlocked(v5, GJItem, v6); v190 = isItemUnlocked; if ( !a1->m_forcePrioRegistered ) { a1->m_forcePrioRegistered = 1; v9 = cocos2d::CCDirector::sharedDirector(v7); v10 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 144LL))(v9); cocos2d::CCTouchDispatcher::registerForcePrio(v10, a1, 2); } v198 = -1358954496; v197 = -1.1641532e-10; result = cocos2d::CCLayerColor::initWithColor(a1, (const struct cocos2d::_ccColor4B *)&v197); if ( !result ) return result; LOBYTE(v12) = 1; a1->setTouchEnabled(a1, v12); LOBYTE(v13) = 1; a1->setKeypadEnabled(a1, v13); v15 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14); cocos2d::CCDirector::getWinSize(v15); v16 = (cocos2d::CCLayer *)cocos2d::CCLayer::create(); a1->m_mainLayer = v16; a1->addChild_1(a1, v16); memset(v189, 50, 3); LOWORD(v186[0]) = 7710; v191 = 7710; v192 = 30; v17 = -106; v18 = -106; v188 = -106; v184 = -1; v183 = -1; v187 = -1; v19 = 0; if ( isItemUnlocked ) { v20 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_14056EF88); switch ( a2 ) { case 1: LOWORD(v186[0]) = -32001; v21 = 74; v189[0] = -32001; LOBYTE(v189[1]) = 74; v17 = -1; v18 = 75; v188 = 0; v184 = -1; v183 = -56; v187 = 0; break; case 2: LOWORD(v186[0]) = -31429; v21 = -49; v189[0] = -31429; LOBYTE(v189[1]) = -49; v17 = 0; v188 = -1; v184 = 0; v183 = -1; v187 = -1; break; case 3: LOWORD(v186[0]) = -24503; v21 = 56; v189[0] = -24503; LOBYTE(v189[1]) = 56; v17 = 0; v18 = -96; v188 = 0; v184 = 0; v183 = -1; v187 = 0; break; case 4: LOWORD(v186[0]) = 20367; v21 = -62; v189[0] = 20367; LOBYTE(v189[1]) = -62; v18 = 0; v188 = -56; v184 = -1; v183 = 50; v187 = -1; break; case 5: LOWORD(v186[0]) = 19140; v21 = 61; v189[0] = 19140; LOBYTE(v189[1]) = 61; v17 = -81; v18 = 0; v188 = 0; v184 = -1; v183 = 50; v187 = 25; break; case 6: LOWORD(v186[0]) = 21669; v21 = 51; v189[0] = 21669; LOBYTE(v189[1]) = 51; v17 = -93; v18 = 98; v188 = 70; v184 = -3; v183 = -32; v187 = -96; break; case 7: LOWORD(v186[0]) = 8934; v21 = 34; v189[0] = 8934; LOBYTE(v189[1]) = 34; v18 = 0; v188 = 0; v184 = -1; v183 = 0; v187 = 0; break; case 8: LOWORD(v186[0]) = -13108; v21 = -52; v189[0] = -13108; LOBYTE(v189[1]) = -52; v17 = 0x80; v18 = 0x80; v188 = 0x80; v184 = -1; v183 = -1; v187 = -1; break; case 9: LOWORD(v186[0]) = -19713; v21 = 79; v189[0] = -19713; LOBYTE(v189[1]) = 79; v17 = -1; v18 = -6; v188 = 127; v184 = -1; v183 = -1; v187 = -64; break; case 10: LOWORD(v186[0]) = 17858; v21 = -103; v189[0] = 17858; LOBYTE(v189[1]) = -103; v17 = 100; v18 = 0; v188 = -106; v184 = -1; v183 = 0; v187 = 125; break; default: v21 = v189[1]; break; } LOBYTE(v186[0]) = (int)(float)((float)LOBYTE(v189[0]) * 0.22); BYTE1(v186[0]) = (int)(float)((float)HIBYTE(v189[0]) * 0.22); v191 = v186[0]; v192 = (int)(float)((float)v21 * 0.22); } else { v216 = 0; v217 = 0; v218 = 15; *(_QWORD *)&v216 = sub_14003AA10(0x20u); v217 = 19; v218 = 31; strcpy((char *)v216, "pathInnerBG_001.png"); v20 = CCSpriteGrayscale::createWithSpriteFrameName((__int64)&v216); sub_14003A830((__int64)&v216); qmemcpy(&v20->m_luminance, "43S?43S?43S?", sizeof(v20->m_luminance)); } a1->m_mainLayer->addChild_0(a1->m_mainLayer, v20, -1); v22 = ((float (__fastcall *)(CCSpriteWithHue *))v20->setScale_0)(v20); v23 = v20->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v22, v193 * 0.5); v23->setPosition_0(v20, v24); v25 = (float *)v20->getContentSize(v20); v26 = ((double (__fastcall *)(CCSpriteWithHue *))v20->getScale)(v20); v27 = *(float *)&v26 * *v25; v28 = (__int64)v20->getContentSize(v20); v29 = ((double (__fastcall *)(CCSpriteWithHue *))v20->getScale)(v20); v30 = *(float *)&v29 * *(float *)(v28 + 4); v20->setColor(&v20->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v189); a1->m_joystickConnected = -1; v31 = cocos2d::CCSprite::createWithSpriteFrameName("backArrowPlain_01_001.png"); v32 = CCMenuItemSpriteExtra::create(v31, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJPathPage::onBack); HIDWORD(v32->m_pfnSelector.adj) = 1070386381; v33 = cocos2d::CCMenu::create(v32, 0); a1->m_buttonMenu = v33; v34 = v33->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; *(float *)&v203[2] = v30 * 0.5; v35 = v27 * 0.5; v197 = v35; cocos2d::CCPoint::CCPoint(*(float *)&v29, (float)((float)(v193 * 0.5) - v35) + 12.0); v34->setPosition_0(a1->m_buttonMenu, v36); a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_buttonMenu, 10); v194 = &v213; v213 = 0; v214 = 0; v215 = 15; v213.m128i_i64[0] = (__int64)sub_14003AA10(0xD0u); v214 = 195; v215 = 207; strcpy( (char *)v213.m128i_i64[0], "When you activate a path, Stars and Moons you collect will level up your Path. You c" "an unlock multiple paths, but only one can be active at a time."); v217 = 14; v218 = 15; strcpy((char *)&v216, "Paths of Power"); HIBYTE(v216) = 0; v37 = (__int64 *)InfoAlertButton::create(&v216, &v213); v38 = ((float (__fastcall *)(cocos2d::CCMenu *, __int64 *))a1->m_buttonMenu->addChild_1)(a1->m_buttonMenu, v37); v39 = *v37; cocos2d::CCPoint::CCPoint(v38, (float)((float)(v193 * 0.5) + v35) - 14.0); v40 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v206); (*(void (__fastcall **)(__int64 *, struct cocos2d::CCPoint))(v39 + 184))(v37, v40); v41 = GJPathSprite::create(a1->m_pathNumber); GJPathSprite::updateState(v41); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v41, 1); ((void (__fastcall *)(GJPathSprite *))v41->setScale_0)(v41); v42 = cocos2d::CCString::createWithFormat("pathLabel_%02d_001.png", v195); CString = cocos2d::CCString::getCString(v42); v219 = 0; v220 = 0; v221 = 0; v44 = -1; do ++v44; while ( CString[v44] ); sub_14003A930(&v219, CString, v44); if ( v190 ) { v45 = (const char *)&v219; if ( v221 > 0xF ) v45 = (const char *)v219; v46 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName(v45); } else { v47 = &v219; if ( v221 > 0xF ) v47 = (__int128 *)v219; v213 = 0; v214 = 0; v215 = 0; v48 = -1; do ++v48; while ( *((_BYTE *)v47 + v48) ); sub_14003A930(&v213, v47, v48); v46 = CCSpriteGrayscale::createWithSpriteFrameName((__int64)&v213); sub_14003A830((__int64)&v213); v49 = 3.0; switch ( v6 ) { case 7: case 14: v49 = 2.5; break; case 9: v49 = 2.4000001; break; case 10: v49 = 3.5; break; case 12: v49 = 3.75; break; case 13: v49 = 2.0; break; case 15: v49 = 2.75; break; default: break; } v50 = v49 * 0.33000001; v46->m_luminance._Elems[0] = v50; v46->m_luminance._Elems[1] = v50; v46->m_luminance._Elems[2] = v50; memset(v186, 100, 3); v46->setColor(&v46->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v186); } v51 = ((float (__fastcall *)(cocos2d::CCLayer *, CCSpriteWithHue *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v46, 1); v52 = cocos2d::CCPoint::CCPoint(v51, v193 * 0.5); width = v41->getContentSize(v41)->width; v54 = (float)((float)(width + v46->getContentSize(v46)->width) + 10.0) * 0.5; cocos2d::CCPoint::CCPoint(*(float *)&v52, v54 - (float)(width * 0.5)); v55 = cocos2d::CCPoint::operator+(v207, &v196); v41->setPosition_0(v41, (const cocos2d::CCPoint *)&v196); v56 = (float *)v46->getContentSize(v46); cocos2d::CCPoint::CCPoint(*(float *)&v55, (float)(*v56 * 0.5) - v54); cocos2d::CCPoint::operator+(v207, &v196); v46->setPosition_0(v46, (const cocos2d::CCPoint *)&v196); v57 = v193 * 0.5; v58 = (float)(v193 * 0.5) - 170.0; v206 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); v59 = cocos2d::CCPoint::CCPoint(v57, (float)(v193 * 0.5) - 170.0); v60 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare20_001.png"); v194 = (__m128i *)v60; v61 = v60->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v59, 0.0); v61->setAnchorPoint(v60, v62); v60->setPosition_0(v60, (const cocos2d::CCPoint *)v205); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v60, 0); v63 = v60->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v60->getContentSize(v60); ((void (__fastcall *)(struct cocos2d::CCSprite *))v63->setScaleX)(v60); v64 = v60->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v60->getContentSize(v60); ((void (__fastcall *)(struct cocos2d::CCSprite *))v64->setScaleY)(v60); v60->setColor(&v60->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v191); v65 = v195; v66 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v196 = operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v196); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v66 = (GameStatsManager *)qword_1406C2EE8; } v67 = (const char *)GameToolbox::intToString(&v213, v65 + 29); if ( *((_QWORD *)v67 + 3) > 0xFu ) v67 = *(const char **)v67; Stat = GameStatsManager::getStat(v66, v67); sub_14003A830((__int64)&v213); if ( Stat <= 1000 ) { v70 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v196 = operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v196); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v70 = (GameStatsManager *)qword_1406C2EE8; } v71 = (const char *)GameToolbox::intToString(&v216, v65 + 29); if ( *((_QWORD *)v71 + 3) > 0xFu ) v71 = *(const char **)v71; v69 = GameStatsManager::getStat(v70, v71); LODWORD(v196) = v69; sub_14003A830((__int64)&v216); } else { v69 = 1000; LODWORD(v196) = 1000; } v72 = (float)v69 / 1000.0; v73 = fminf(1.0, v72); if ( v73 > 0.0 ) { v74 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare20_001.png"); v75 = v74->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v72, 0.0); v77 = ((float (__fastcall *)(struct cocos2d::CCSprite *, __int64))v75->setAnchorPoint)(v74, v76); cocos2d::CCPoint::CCPoint(v77, 2.0); cocos2d::CCPoint::operator+(v205, v203); v74->setPosition_0(v74, (const cocos2d::CCPoint *)v203); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v74, 1); v78 = v74->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v74->getContentSize(v74); ((void (__fastcall *)(struct cocos2d::CCSprite *))v78->setScaleX)(v74); v79 = v74->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v74->getContentSize(v74); ((void (__fastcall *)(struct cocos2d::CCSprite *))v79->setScaleY)(v74); v74->setColor(&v74->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v189); } v80 = 0; LOBYTE(v200) = v184; HIBYTE(v200) = v183; LOBYTE(v201) = v17; HIBYTE(v201) = v18; do { v81 = cocos2d::CCString::createWithFormat("geometry.ach.path%02d.%02d", v195, v80); v82 = cocos2d::CCString::getCString(v81); v216 = 0; v217 = 0; v218 = 0; v83 = -1; do ++v83; while ( v82[v83] ); sub_14003A930(&v216, v82, v83); v203[0] = 0; v186[0] = 0; v208 = &v213; v85 = (__int64 *)sub_14003BDB0((__int64)&v213, (__int64)&v216); if ( !qword_1406C2ED8 ) { v209 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v209); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); } GameManager::getUnlockForAchievement(v84, v85, v203, v186); v86 = v186[0]; if ( v186[0] ) { v87 = v203[0]; } else { v86 = 1; v87 = 1; } v88 = (char *)operator new(0x278u); v210 = v88; cocos2d::CCSprite::CCSprite((cocos2d::CCSprite *)v88); *(_QWORD *)v88 = &GJItemIcon::`vftable'; *((_QWORD *)v88 + 40) = &GJItemIcon::`vftable'; *((_QWORD *)v88 + 43) = &GJItemIcon::`vftable'; *((_QWORD *)v88 + 75) = 0; *((_DWORD *)v88 + 152) = 0; cocos2d::CCSize::CCSize((cocos2d::CCSize *)(v88 + 612)); v88[620] = 0; *((_QWORD *)v88 + 78) = 0; *(_WORD *)&v202.r = v200; v202.b = v187; LOWORD(v198) = v201; BYTE2(v198) = v188; if ( !GJItemIcon::init((GJItemIcon *)v88, v86, v87, (cocos2d::ccColor3B *)&v198, &v202, 0, v181, 1, v182) ) { (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v88 + 8LL))(v88, 1); goto LABEL_89; } cocos2d::CCObject::autorelease((cocos2d::CCObject *)v88); if ( !v88 ) goto LABEL_89; v89 = GJItemIcon::scaleForType((UnlockType)1); (*(void (__fastcall **)(char *))(*(_QWORD *)v88 + 160LL))(v88); v90 = CCMenuItemSpriteExtra::create( (cocos2d::CCNode *)v88, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJPathPage::onIconInfo); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v90); v91 = v90->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v92 = (__int64)v206->getContentSize(v206); v91->setContentSize(v90, (const cocos2d::CCSize *)v92); v93 = *(_QWORD *)v88; v90->getContentSize(v90); v94 = (float *)v90->getContentSize(v90); v95 = cocos2d::CCPoint::CCPoint(v89, *v94 * 0.5); (*(void (__fastcall **)(char *, __int64))(v93 + 184))(v88, v96); v90->setTag(v90, v80); if ( !v80 && v190 ) goto LABEL_85; v97 = (const char *)&v216; if ( v218 > 0xF ) v97 = (const char *)v216; v98 = AchievementManager::sharedState(); if ( AchievementManager::percentForAchievement(v98, v97) >= 100 ) { LABEL_85: v112 = 1; } else { GJItemIcon::changeToLockedState((GJItemIcon *)v88, 1.0 / v89); LOWORD(v186[0]) = v191; v185 = v192; v99 = *((SimplePlayer **)v88 + 75); v100 = v99->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable; v101 = &v99->cocos2d::CCRGBAProtocol; if ( v88[620] ) { v100->setColor(v101, &stru_140529AB8); LOBYTE(v102) = 120; v99->setOpacity(&v99->cocos2d::CCRGBAProtocol, v102); v99->m_hasGlowOutline = 0; SimplePlayer::updateColors(v99); v99->m_secondLayer->setVisible(v99->m_secondLayer, 0); v99->m_birdDome->setVisible(v99->m_birdDome, 0); v99->m_detailSprite->setVisible(v99->m_detailSprite, 0); v99->m_outlineSprite->setVisible(v99->m_outlineSprite, 0); m_robotSprite = v99->m_robotSprite; if ( m_robotSprite ) m_robotSprite->hideSecondary(m_robotSprite); v104 = v99->m_robotSprite; if ( v104 ) v104->m_glowSprite->setVisible(v104->m_glowSprite, 0); m_spiderSprite = v99->m_spiderSprite; if ( m_spiderSprite ) m_spiderSprite->hideSecondary(m_spiderSprite); v106 = v99->m_spiderSprite; if ( v106 ) v106->m_glowSprite->setVisible(v106->m_glowSprite, 0); v107 = v99->m_robotSprite; v108 = v186[0]; if ( v107 ) { *(_WORD *)&v107->m_color.r = v186[0]; v107->m_color.b = v185; GJRobotSprite::updateColors(v107); LOBYTE(v109) = -66; v99->m_robotSprite->setOpacity(&v99->m_robotSprite->cocos2d::CCRGBAProtocol, v109); v99->m_robotSprite->hideSecondary(v99->m_robotSprite); } v110 = v99->m_spiderSprite; if ( v110 ) { *(_WORD *)&v110->m_color.r = v108; v110->m_color.b = v185; GJRobotSprite::updateColors(v110); LOBYTE(v111) = -66; v99->m_spiderSprite->setOpacity(&v99->m_spiderSprite->cocos2d::CCRGBAProtocol, v111); v99->m_spiderSprite->hideSecondary(v99->m_spiderSprite); } LABEL_80: v112 = 0; goto LABEL_87; } v100->setColor(v101, &stru_140529AB8); LOBYTE(v113) = 120; v99->setOpacity(&v99->cocos2d::CCRGBAProtocol, v113); v114 = v99->getChildren(v99); v115 = v114; if ( !v114 ) goto LABEL_80; v116 = 0; if ( cocos2d::CCArray::count(v114) ) { do { v117 = cocos2d::CCArray::objectAtIndex(v115, v116); ((void (__fastcall *)(struct cocos2d::CCObject *, _QWORD))v117->__vftable[4].update)(v117, 0); ++v116; } while ( v116 < cocos2d::CCArray::count(v115) ); v112 = 0; } else { v112 = 0; } } LABEL_87: v118 = (float)((float)v80 * 34.0) + v58; v119 = v90->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v120 = cocos2d::CCPoint::CCPoint(*(float *)&v95, v118); cocos2d::CCNode::convertToWorldSpace(a1->m_mainLayer, &v211); v121 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v212); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v119->setPosition_0)(v90, v121); v122 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare20_001.png"); v123 = v122->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v120, 0.5); v125 = ((float (__fastcall *)(struct cocos2d::CCSprite *, __int64))v123->setAnchorPoint)(v122, v124); v126 = v122->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v127 = cocos2d::CCPoint::CCPoint(v125, v118); v126->setPosition_0(v122, v128); v129 = v122->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v122->getContentSize(v122); ((void (__fastcall *)(struct cocos2d::CCSprite *))v129->setScaleX)(v122); v130 = v122->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v122->getContentSize(v122); ((void (__fastcall *)(struct cocos2d::CCSprite *))v130->setScaleY)(v122); v122->setColor(&v122->cocos2d::CCRGBAProtocol, &stru_140529ACC); LOBYTE(v131) = 25; v122->setOpacity(&v122->cocos2d::CCRGBAProtocol, v131); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v122, 0); v132 = cocos2d::CCSprite::create("smallDot.png"); v133 = v132->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v134 = (__int64)v194; (*(__int64 (__fastcall **)(__m128i *))(v194->m128i_i64[0] + 200))(v194); v135 = cocos2d::CCPoint::CCPoint(*(float *)&v127, v118); v133->setPosition_0(v132, v136); v132->setColor(&v132->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v191); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v132, 0); if ( v112 ) { v137 = cocos2d::CCSprite::create("smallDot.png"); v138 = v137->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v134 + 200LL))(v134); cocos2d::CCPoint::CCPoint(*(float *)&v135, v118); v138->setPosition_0(v137, v139); v137->setColor(&v137->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v189); ((void (__fastcall *)(struct cocos2d::CCSprite *))v137->setScale_0)(v137); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v137, 1); } LABEL_89: sub_14003A830((__int64)&v216); ++v80; } while ( v80 < 11 ); if ( !v190 ) { v140 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lock_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v140->setScale_0)(v140); v141 = CCMenuItemSpriteExtra::create(v140, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJPathPage::onUnlock); v142 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)( a1->m_buttonMenu, v141); v143 = v141->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v144 = cocos2d::CCPoint::CCPoint(v142, v193 * 0.5); v145 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v204); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v143->setPosition_0)(v141, v145); GameToolbox::pointsToString(&v213, 25000); v146 = &v213; if ( v215 > 0xF ) v146 = (__m128i *)v213.m128i_i64[0]; v147 = cocos2d::CCLabelBMFont::create(v146->m128i_i8, (const char *)&qword_14052A4D8); v140->addChild_1(v140, v147); v148 = v147->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v149 = (float *)v140->getContentSize(v140); cocos2d::CCPoint::CCPoint(*(float *)&v144, (float)(*v149 * 0.5) - 4.0); v148->setPosition_0(v147, v150); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v147->setScale_0)(v147); v151 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_14053DCE8); v140->addChild_1(v140, v151); v152 = v147->getContentSize(v147)->width * 0.5; v153 = ((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v147->getScale)(v147); LOBYTE(v19) = v195 == 4; cocos2d::CCPoint::CCPoint((float)v19, (float)((float)(*(float *)&v153 * v152) + 6.0) + (float)v19); v154 = (__int64)v147->getPosition_0(v147); cocos2d::CCPoint::operator+(v154, &v194); v151->setPosition_0(v151, (const cocos2d::CCPoint *)&v194); ((void (__fastcall *)(struct cocos2d::CCSprite *))v151->setScale_0)(v151); sub_14003A830((__int64)&v213); v155 = v197; goto LABEL_101; } v156 = cocos2d::CCString::createWithFormat("%i/%i", (_DWORD)v196, 1000); v157 = cocos2d::CCString::getCString(v156); v158 = cocos2d::CCLabelBMFont::create(v157, "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v158->setScale_0)(v158); v159 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v158, 1); v160 = v158->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v159, (float)(v193 * 0.5) - 12.0); v160->setPosition_0(v158, v161); v162 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starsIcon_001.png"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v162, 1); v163 = (float *)v158->getContentSize(v158); v164 = v158->getScale(v158); cocos2d::CCPoint::CCPoint(v164 * *v163, (float)(v164 * *v163) * 0.5 + 7.0); v165 = (__int64)v158->getPosition_0(v158); cocos2d::CCPoint::operator+(v165, &v194); v162->setPosition_0(v162, (const cocos2d::CCPoint *)&v194); ((void (__fastcall *)(struct cocos2d::CCSprite *))v162->setScale_0)(v162); v166 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_140547148); v167 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCSprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v166, 1); cocos2d::CCPoint::CCPoint(v167, 12.0); v168 = (__int64)v162->getPosition_0(v162); cocos2d::CCPoint::operator+(v168, &v194); v166->setPosition_0(v166, (const cocos2d::CCPoint *)&v194); ((void (__fastcall *)(struct cocos2d::CCSprite *))v166->setScale_0)(v166); if ( v73 < 1.0 ) { v169 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v199 = (__m128i *)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v199); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v169 = (GameStatsManager *)qword_1406C2EE8; } GameStatsManager::trySelectActivePath(v169); v170 = a1->m_pathNumber + 29; v199 = &v213; v213 = 0; v214 = 6; v215 = 15; strcpy(v213.m128i_i8, "Active"); v171 = qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v204 = (struct cocos2d::CCPoint)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0(*(_QWORD *)&v204); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v171 = qword_1406C2EE8; } v172 = *(_DWORD *)(v171 + 988); v173 = cocos2d::CCPoint::CCPoint(0.0, 6.0); v175 = v174; v155 = v197; cocos2d::CCPoint::CCPoint(*(float *)&v173, (float)((float)(v193 * 0.5) - v197) + 17.0); GameToolbox::createToggleButton( v213.m128i_i8, (cocos2d::SEL_MenuHandler *)GJPathPage::onActivatePath, v172 == v170, a1->m_buttonMenu, v176, a1, a1->m_mainLayer, 0.60000002, 0.5, 100.0, v175, "goldFont.fnt", 0, 0, nullptr); LABEL_101: if ( v73 < 1.0 ) { v177 = cocos2d::CCSprite::createWithSpriteFrameName("chestIcon_001.png"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v177, 3); v177->setColor(&v177->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v191); v178 = v177->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint( COERCE_FLOAT(COERCE_UNSIGNED_INT64((float)((float)(v193 * 0.5) + v155) - 28.5)), (float)((float)(v193 * 0.5) + v155) - 28.5); v178->setPosition_0(v177, v179); LOBYTE(v180) = -56; v177->setOpacity(&v177->cocos2d::CCRGBAProtocol, v180); } } sub_14003A830((__int64)&v219); return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source