// // GJPathPage::init from 0xa6f530 to 0xa70f40 (6672 bytes) // // 2 xrefs: // > GJPathPage::create @ 0xa71064 // > @ 0x340f8 // // 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 GJPathPage::init(GJPathPage *a1, int a2, GJPathsLayer *a3) { cocos2d::CCPoint v5; // x2 int v6; // w27 GameStatsManager *v7; // x0 cocos2d::CCDirector *v9; // x0 cocos2d::CCLayer *v10; // x0 GJPathPage_vtbl *v11; // x2 CCSpriteGrayscale *v12; // x25 void *v13; // x0 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 float width; // s11 float v16; // s11 float height; // s10 float v18; // s9 cocos2d::CCSprite *v19; // x0 CCMenuItemSpriteExtra *v20; // x20 cocos2d::CCMenu *v21; // x25 void (__fastcall *v22)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 cocos2d::CCNode *v23; // x20 void *v24; // x0 void *v25; // x0 cocos2d::CCMenu *m_buttonMenu; // x24 void (__fastcall *v27)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 GJPathSprite *v28; // x20 cocos2d::CCString *v29; // x0 char *CString; // x0 CCSpriteGrayscale *v31; // x25 float v32; // s9 float *v33; // x0 void (__fastcall *v34)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 float v35; // s8 void (__fastcall *v36)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 float *v37; // x0 float v38; // s13 float v39; // s10 cocos2d::CCSprite *v40; // x24 void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25 void (__fastcall *setScaleX)(cocos2d::CCSprite *__hidden, float); // x25 float *v43; // x0 void (__fastcall *setScaleY)(cocos2d::CCSprite *__hidden, float); // x25 __int64 v45; // x0 GameStatsManager *v46; // x0 cocos2d::CCSprite *v47; // x25 void (__fastcall *v48)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 void (__fastcall *v49)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 void (__fastcall *v50)(cocos2d::CCSprite *__hidden, float); // x27 float *v51; // x0 void (__fastcall *v52)(cocos2d::CCSprite *__hidden, float); // x27 __int64 v53; // x0 int i; // w22 int v55; // w1 GJItemIcon *v56; // x25 float v57; // s9 CCMenuItemSpriteExtra *v58; // x20 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x26 __int64 v60; // x0 void (__fastcall *v61)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26 float v62; // s8 __int64 v63; // x0 float v64; // s8 void (__fastcall *v65)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCSprite *v66; // x26 void (__fastcall *v67)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25 void (__fastcall *v68)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25 void (__fastcall *v69)(cocos2d::CCSprite *__hidden, float); // x25 float *v70; // x0 void (__fastcall *v71)(cocos2d::CCSprite *__hidden, float); // x25 __int64 v72; // x0 const char *v73; // x1 cocos2d::CCNode *v74; // x26 void (__fastcall *v75)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 __int64 v76; // x0 const char *v77; // x1 const char *v78; // x1 char *v79; // x0 cocos2d::CCString *v80; // x0 char *v81; // x0 GameManager *v82; // x25 void *v83; // x0 UnlockType v84; // w0 char v85; // w23 char v86; // w1 char v87; // w0 cocos2d::CCNode *v88; // x25 void (__fastcall *v89)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 __int64 v90; // x0 unsigned int *v91; // x1 int v92; // w2 AchievementManager *v93; // x0 unsigned int *v94; // x1 int v95; // w2 cocos2d::CCSprite *v96; // x26 CCMenuItemSpriteExtra *v97; // x27 cocos2d::CCMenu *v98; // x24 void (__fastcall *v99)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCLabelBMFont *v100; // x20 void (__fastcall *v101)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 float *v102; // x0 cocos2d::CCSprite *v103; // x22 void (__fastcall *v104)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 __int64 v105; // x25 float v106; // s8 float v107; // s0 float v108; // s1 cocos2d::CCArray **v109; // x0 char *p_m_fBrVertexMod; // x26 unsigned int *p_m_fTextureTop; // x25 int m_fTextureTop_low; // w0 cocos2d::CCArray **p_m_pTargetArray; // x0 unsigned int v114; // w27 float v115; // s0 void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x3 cocos2d::CCString *v117; // x0 cocos2d::CCLabelBMFont *v118; // x20 void (__fastcall *v119)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCSprite *v120; // x22 void (__fastcall *v121)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 __int64 v122; // x25 float v123; // s8 float v124; // s0 cocos2d::CCSprite *v125; // x20 cocos2d::CCSprite *v126; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v128)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 __int64 v129; // x24 GameStatsManager *v130; // x0 int v131; // w22 bool v132; // w24 cocos2d::CCMenu *v133; // x22 cocos2d::CCLayer *v134; // x20 void *v135; // x0 unsigned int *v136; // x3 int v137; // w2 cocos2d::CCSprite *v138; // x23 void (__fastcall *v139)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 GameStatsManager *v140; // x0 float v141; // s0 unsigned int *v142; // x1 int v143; // w2 unsigned int *v144; // x1 int v145; // w2 unsigned int *p_m_nExtraKerning; // x1 int m_nExtraKerning; // w2 unsigned int *v148; // x1 int v149; // w2 unsigned int *v150; // x1 int v151; // w2 int StatFromKey; // [xsp+D0h] [xbp+A0h] float v153; // [xsp+D4h] [xbp+A4h] float v154; // [xsp+E0h] [xbp+B0h] float v155; // [xsp+E4h] [xbp+B4h] cocos2d::CCSprite *v156; // [xsp+E8h] [xbp+B8h] char v157; // [xsp+FBh] [xbp+CBh] _BOOL4 isItemUnlocked; // [xsp+FCh] [xbp+CCh] cocos2d::CCLayer *m_mainLayer; // [xsp+100h] [xbp+D0h] cocos2d::CCMenu *v160; // [xsp+108h] [xbp+D8h] int v161; // [xsp+110h] [xbp+E0h] _BYTE v163[8]; // [xsp+120h] [xbp+F0h] BYREF int v164; // [xsp+128h] [xbp+F8h] BYREF __int64 v165; // [xsp+130h] [xbp+100h] __int64 v166; // [xsp+138h] [xbp+108h] int v167; // [xsp+140h] [xbp+110h] BYREF int v168; // [xsp+144h] [xbp+114h] BYREF float v169; // [xsp+148h] [xbp+118h] float v170; // [xsp+14Ch] [xbp+11Ch] cocos2d::CCSprite *v171; // [xsp+150h] [xbp+120h] BYREF cocos2d::CCPoint v172; // [xsp+158h] [xbp+128h] BYREF cocos2d::CCPoint v173; // [xsp+160h] [xbp+130h] BYREF const char *v174; // [xsp+168h] [xbp+138h] BYREF cocos2d::CCLabelBMFont *v175; // [xsp+170h] [xbp+140h] BYREF cocos2d::CCPoint v176; // [xsp+178h] [xbp+148h] BYREF cocos2d::CCPoint v177[2]; // [xsp+180h] [xbp+150h] BYREF cocos2d::CCPoint v178; // 0:kr08_8.8 cocos2d::CCPoint v179; // 0:kr18_8.8 cocos2d::CCPoint v180; // 0:kr20_8.8 cocos2d::SEL_MenuHandler v181; // 0:x2.16 cocos2d::SEL_MenuHandler v182; // 0:x2.16 cocos2d::SEL_MenuHandler v183; // 0:x2.16 a1->m_pathsLayer = a3; v5 = (cocos2d::CCPoint)_stack_chk_guard; v6 = a2 + 5; a1->m_pathNumber = a2; v177[1] = v5; GJPathsLayer::darkenButtons(a3, 1); v7 = GameStatsManager::sharedState(); isItemUnlocked = GameStatsManager::isItemUnlocked(v7, GJItem, v6); FLAlertLayer::incrementForcePrio(a1); v177[0].x = -1.1642e-10; v157 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)v177); if ( !v157 ) return v157; a1->setTouchEnabled(a1, 1); a1->setKeypadEnabled(a1, 1); v9 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v9); v10 = cocos2d::CCLayer::create(); v11 = a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_mainLayer = v10; ((void (__fastcall *)(GJPathPage *))v11->addChild)(a1); LOWORD(v166) = -1; BYTE2(v166) = -1; memset(v163, 50, 3); LOWORD(v164) = 7710; BYTE2(v164) = 30; LOWORD(v165) = -26986; BYTE2(v165) = -106; if ( isItemUnlocked ) { v12 = (CCSpriteGrayscale *)cocos2d::CCSprite::createWithSpriteFrameName("pathInnerBG_001.png"); switch ( a2 ) { case 1: v163[2] = 74; v163[0] = -1; v163[1] = -126; v85 = 28; LOWORD(v165) = 19455; v87 = 16; v86 = 56; BYTE2(v165) = 0; *(_WORD *)((char *)&v166 + 1) = 200; break; case 2: v163[1] = -123; v163[0] = 59; v163[2] = -49; v87 = 45; v85 = 29; v86 = 12; LOBYTE(v165) = 0; BYTE2(v165) = -1; LOBYTE(v166) = 0; break; case 3: v163[0] = 73; v163[2] = 56; v87 = 12; v163[1] = -96; v85 = 35; LOWORD(v165) = -24576; v86 = 16; BYTE2(v165) = 0; LOBYTE(v166) = 0; BYTE2(v166) = 0; break; case 4: v163[0] = -113; v163[2] = -62; v163[1] = 79; v85 = 17; v87 = 42; *(_WORD *)((char *)&v165 + 1) = -14336; v86 = 31; BYTE1(v166) = 50; break; case 5: qmemcpy(&v163[1], "J=", 2); LOWORD(v165) = 175; v163[0] = -60; v87 = 13; *(_WORD *)((char *)&v166 + 1) = 6450; v85 = 16; v86 = 43; BYTE2(v165) = 0; break; case 6: BYTE2(v165) = 70; v163[0] = -91; LOWORD(v166) = -7939; qmemcpy(&v163[1], "T3", 2); LOWORD(v165) = 25251; v87 = 11; v85 = 18; v86 = 36; BYTE2(v166) = -96; break; case 7: v87 = 7; memset(&v163[1], 34, 2); v85 = 7; v163[0] = -26; v86 = 50; *(_WORD *)((char *)&v165 + 1) = 0; *(_WORD *)((char *)&v166 + 1) = 0; break; case 8: v87 = 44; v163[0] = -52; v163[1] = -52; v85 = 44; v163[2] = -52; v86 = 44; LOWORD(v165) = -32640; BYTE2(v165) = 0x80; break; case 9: v163[0] = -1; v87 = 17; LOWORD(v165) = -1281; v163[1] = -78; v163[2] = 79; v85 = 39; BYTE2(v165) = 127; v86 = 56; BYTE2(v166) = -64; break; case 10: v163[0] = -62; v163[2] = -103; v163[1] = 69; LOWORD(v165) = 100; v87 = 33; v85 = 15; v86 = 42; *(_WORD *)((char *)&v166 + 1) = 32000; break; default: v85 = (unsigned int)(float)((float)v163[1] * 0.22); v86 = (unsigned int)(float)((float)v163[0] * 0.22); v87 = (unsigned int)(float)((float)v163[2] * 0.22); break; } LOBYTE(v164) = v86; BYTE1(v164) = v85; BYTE2(v164) = v87; } else { sub_D153B8((int)v177, "pathInnerBG_001.png"); v12 = CCSpriteGrayscale::createWithSpriteFrameName((const char **)v177); v13 = (void *)(*(_QWORD *)v177 - 24LL); if ( (__int64 *)(*(_QWORD *)v177 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v150 = (unsigned int *)(*(_QWORD *)v177 - 8LL); do v151 = __ldaxr(v150); while ( __stlxr(v151 - 1, v150) ); } else { v151 = *(_DWORD *)(*(_QWORD *)v177 - 8LL); *(_DWORD *)(*(_QWORD *)v177 - 8LL) = v151 - 1; } if ( v151 <= 0 ) operator delete(v13); } CCSpriteWithHue::setEvenLuminance(v12, 2.5); } a1->m_mainLayer->addChild_0(a1->m_mainLayer, v12, -1); v12->setScale(v12, 1.3); setPosition = v12->setPosition; cocos2d::CCPoint::CCPoint(v177, v169 * 0.5, v170 * 0.5); setPosition(v12, v177); width = v12->getContentSize(v12)->width; v16 = width * v12->getScale(v12); height = v12->getContentSize(v12)->height; v18 = height * v12->getScale(v12); v12->setColor(v12, (const cocos2d::ccColor3B *)v163); a1->m_joystickConnected = -1; v19 = cocos2d::CCSprite::createWithSpriteFrameName("backArrowPlain_01_001.png"); v181.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v181.adj = (size_t)GJPathPage::onBack; v20 = CCMenuItemSpriteExtra::create(v19, nullptr, v181); CCMenuItemSpriteExtra::setSizeMult(v20, 1.6); v21 = (cocos2d::CCMenu *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v20, nullptr); a1->m_buttonMenu = v21; v153 = v16 * 0.5; v22 = v21->setPosition; v155 = v18 * 0.5; cocos2d::CCPoint::CCPoint( v177, 12.0 - (float)((float)(v16 * 0.5) - (float)(v169 * 0.5)), (float)((float)(v18 * 0.5) + (float)(v170 * 0.5)) - 12.0); v22(v21, v177); a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_buttonMenu, 10); sub_D153B8((int)&v176, "Paths of Power"); sub_D153B8( (int)v177, "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."); v23 = (cocos2d::CCNode *)InfoAlertButton::create(0.8); v24 = (void *)(*(_QWORD *)v177 - 24LL); if ( (__int64 *)(*(_QWORD *)v177 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v144 = (unsigned int *)(*(_QWORD *)v177 - 8LL); do v145 = __ldaxr(v144); while ( __stlxr(v145 - 1, v144) ); } else { v145 = *(_DWORD *)(*(_QWORD *)v177 - 8LL); *(_DWORD *)(*(_QWORD *)v177 - 8LL) = v145 - 1; } if ( v145 <= 0 ) operator delete(v24); } v25 = (void *)(*(_QWORD *)&v176 - 24LL); if ( (__int64 *)(*(_QWORD *)&v176 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v142 = (unsigned int *)(*(_QWORD *)&v176 - 8LL); do v143 = __ldaxr(v142); while ( __stlxr(v143 - 1, v142) ); } else { v143 = *(_DWORD *)(*(_QWORD *)&v176 - 8LL); *(_DWORD *)(*(_QWORD *)&v176 - 8LL) = v143 - 1; } if ( v143 <= 0 ) operator delete(v25); } a1->m_buttonMenu->addChild(a1->m_buttonMenu, v23); m_buttonMenu = a1->m_buttonMenu; v27 = v23->setPosition; cocos2d::CCPoint::CCPoint( &v176, (float)(v153 + (float)(v169 * 0.5)) - 14.0, (float)(v155 + (float)(v170 * 0.5)) - 14.0); v178 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v176); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCPoint *, float, float))v27)(v23, v177, v178.x, v178.y); v28 = GJPathSprite::create(a1->m_pathNumber); GJPathSprite::updateState(v28); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v28, 1); v28->setScale(v28, 1.0); v29 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"pathLabel_%02d_001.png", (const char *)(unsigned int)a2); CString = (char *)cocos2d::CCString::getCString(v29); sub_D153B8((int)&v171, CString); if ( isItemUnlocked ) { v31 = (CCSpriteGrayscale *)cocos2d::CCSprite::createWithSpriteFrameName((const char *)v171); } else { sub_D153B8((int)&v175, (char *)v171); v31 = CCSpriteGrayscale::createWithSpriteFrameName((const char **)&v175); p_m_pTargetArray = &v175[-1].m_pTargetArray; if ( &v175[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v175[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v175[-1].m_nExtraKerning; v175[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } v114 = v6 - 7; if ( v114 > 8 ) v115 = 3.0; else v115 = flt_F146D0[v114]; CCSpriteWithHue::setEvenLuminance(v31, v115); setColor = v31->setColor; memset(v177, 100, 3); setColor(v31, (const cocos2d::ccColor3B *)v177); } a1->m_mainLayer->addChild_0(a1->m_mainLayer, v31, 1); cocos2d::CCPoint::CCPoint(&v172, v169 * 0.5, (float)(v155 + (float)(v170 * 0.5)) - 8.0); v32 = v28->getContentSize(v28)->width; v33 = (float *)v31->getContentSize(v31); v34 = v28->setPosition; v35 = (float)(v32 + *v33) + 10.0; cocos2d::CCPoint::CCPoint(&v176, -(float)((float)(v32 * 0.5) - (float)(v35 * 0.5)), 0.0); cocos2d::CCPoint::operator+(v177, &v172, &v176); v34(v28, v177); v36 = v31->setPosition; v37 = (float *)v31->getContentSize(v31); cocos2d::CCPoint::CCPoint(&v176, (float)(v35 * -0.5) + (float)(*v37 * 0.5), -2.0); cocos2d::CCPoint::operator+(v177, &v172, &v176); v36(v31, v177); v38 = (float)(v170 * 0.5) + 0.0; v39 = (float)(v169 * 0.5) - 170.0; v156 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); cocos2d::CCPoint::CCPoint( &v173, (float)(v169 * 0.5) + -170.0, (float)(30.0 - (float)(v155 - (float)(v170 * 0.5))) + 10.0); v40 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare20_001.png"); setAnchorPoint = v40->setAnchorPoint; cocos2d::CCPoint::CCPoint(v177, 0.0, 0.5); setAnchorPoint(v40, v177); v40->setPosition(v40, &v173); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v40, 0); setScaleX = v40->setScaleX; v43 = (float *)v40->getContentSize(v40); setScaleX(v40, 340.0 / *v43); setScaleY = v40->setScaleY; v45 = (__int64)v40->getContentSize(v40); setScaleY(v40, 5.0 / *(float *)(v45 + 4)); v40->setColor(v40, (const cocos2d::ccColor3B *)&v164); v46 = GameStatsManager::sharedState(); if ( GameStatsManager::getStatFromKey(v46, (StatKey)(a2 + 29)) <= 999 ) { v140 = GameStatsManager::sharedState(); StatFromKey = GameStatsManager::getStatFromKey(v140, (StatKey)(a2 + 29)); v141 = (float)StatFromKey / 1000.0; v154 = v141; if ( v141 >= 1.0 ) { v154 = 1.0; } else if ( v141 <= 0.0 ) { goto LABEL_13; } } else { StatFromKey = 1000; v154 = 1.0; } v47 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare20_001.png"); v48 = v47->setAnchorPoint; cocos2d::CCPoint::CCPoint(v177, 0.0, 0.5); v48(v47, v177); v49 = v47->setPosition; cocos2d::CCPoint::CCPoint(&v176, 2.0, 0.0); cocos2d::CCPoint::operator+(v177, &v173, &v176); v49(v47, v177); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v47, 1); v50 = v47->setScaleX; v51 = (float *)v47->getContentSize(v47); v50(v47, (float)(v154 * 336.0) / *v51); v52 = v47->setScaleY; v53 = (__int64)v47->getContentSize(v47); v52(v47, 2.0 / *(float *)(v53 + 4)); v47->setColor(v47, (const cocos2d::ccColor3B *)v163); LABEL_13: for ( i = 0; i != 11; ++i ) { v80 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"geometry.ach.path%02d.%02d", (const char *)(unsigned int)a2, (unsigned int)i); v81 = (char *)cocos2d::CCString::getCString(v80); sub_D153B8((int)&v174, v81); v167 = 0; v168 = 0; v82 = GameManager::sharedState(); sub_D18D28(&v176); GameManager::getUnlockForAchievement((__int64)v82, (__int64)&v176, &v167, &v168); v83 = (void *)(*(_QWORD *)&v176 - 24LL); if ( (__int64 *)(*(_QWORD *)&v176 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v94 = (unsigned int *)(*(_QWORD *)&v176 - 8LL); do v95 = __ldaxr(v94); while ( __stlxr(v95 - 1, v94) ); } else { v95 = *(_DWORD *)(*(_QWORD *)&v176 - 8LL); *(_DWORD *)(*(_QWORD *)&v176 - 8LL) = v95 - 1; } if ( v95 <= 0 ) operator delete(v83); } v84 = v168; if ( v168 ) { v55 = v167; } else { v84 = 1; v168 = 1; v55 = 1; v167 = 1; } v56 = GJItemIcon::create( v84, v55, (cocos2d::ccColor3B)v165, (cocos2d::ccColor3B)v166, 0, 1, 1, (cocos2d::ccColor3B)&unk_FFFFFF); if ( !v56 ) goto LABEL_22; v57 = GJItemIcon::scaleForType((UnlockType)1); ((void (__fastcall *)(GJItemIcon *))v56->setScale)(v56); v182.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v182.adj = (size_t)GJPathPage::onIconInfo; v58 = CCMenuItemSpriteExtra::create(v56, nullptr, v182); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v58); setContentSize = v58->setContentSize; v60 = (__int64)v156->getContentSize(v156); setContentSize(v58, (const cocos2d::CCSize *)v60); v61 = v56->setPosition; v62 = v58->getContentSize(v58)->width; v63 = (__int64)v58->getContentSize(v58); cocos2d::CCPoint::CCPoint(v177, v62 * 0.5, *(float *)(v63 + 4) * 0.5); v61(v56, v177); v58->setTag(v58, i); if ( !i && isItemUnlocked || (v93 = AchievementManager::sharedState(), AchievementManager::isAchievementEarned(v93, v174)) ) { v161 = 1; } else { GJItemIcon::changeToLockedState(v56, 1.0 / v57); GJItemIcon::darkenStoreItem((__int64)v56, v164); v161 = 0; } v64 = v38; if ( (i & 1) != 0 ) v64 = v38 + 0.0; v65 = v58->setPosition; v160 = a1->m_buttonMenu; m_mainLayer = a1->m_mainLayer; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v175, v39 + (float)((float)i * 34.0), v64 + 10.0); cocos2d::CCNode::convertToWorldSpace(m_mainLayer, (const cocos2d::CCPoint *)&v175); v179 = cocos2d::CCNode::convertToNodeSpace(v160, &v176); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v65)(v58, v177, v179.x, v179.y); v66 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare20_001.png"); v67 = v66->setAnchorPoint; cocos2d::CCPoint::CCPoint(v177, 0.5, 1.0); v67(v66, v177); v68 = v66->setPosition; cocos2d::CCPoint::CCPoint(v177, v39 + (float)((float)i * 34.0), (float)(v64 - 17.0) + 10.0); v68(v66, v177); v69 = v66->setScaleX; v70 = (float *)v66->getContentSize(v66); v69(v66, 1.5 / *v70); v71 = v66->setScaleY; v72 = (__int64)v66->getContentSize(v66); v71(v66, 16.0 / *(float *)(v72 + 4)); v66->setColor(v66, (const cocos2d::ccColor3B *)&unk_F14700); v66->setOpacity(v66, 25); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v66, 0); v74 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"smallDot.png", v73); v75 = v74->setPosition; v76 = (__int64)v40->getPosition(v40); cocos2d::CCPoint::CCPoint(v177, v39 + (float)((float)i * 34.0), *(float *)(v76 + 4)); v75(v74, v177); ((void (__fastcall *)(cocos2d::CCNode *, int *))v74->__vftable[1].getTag)(v74, &v164); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v74, 0); if ( v161 ) { v88 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"smallDot.png", v77); v89 = v88->setPosition; v90 = (__int64)v40->getPosition(v40); cocos2d::CCPoint::CCPoint(v177, v39 + (float)((float)i * 34.0), *(float *)(v90 + 4)); v89(v88, v177); ((void (__fastcall *)(cocos2d::CCNode *, _BYTE *))v88->__vftable[1].getTag)(v88, v163); v88->setScale(v88, 0.7); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v88, 1); v78 = v174; v79 = (char *)(v174 - 24); if ( v174 - 24 == (const char *)&qword_124B6B0 ) continue; } else { LABEL_22: v78 = v174; v79 = (char *)(v174 - 24); if ( v174 - 24 == (const char *)&qword_124B6B0 ) continue; } if ( &pthread_create ) { v91 = (unsigned int *)(v78 - 8); do v92 = __ldaxr(v91); while ( __stlxr(v92 - 1, v91) ); } else { v92 = *((_DWORD *)v78 - 2); *((_DWORD *)v78 - 2) = v92 - 1; } if ( v92 <= 0 ) operator delete(v79); } if ( isItemUnlocked ) { v117 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i/%i", (const char *)(unsigned int)StatFromKey, 1000); cocos2d::CCString::getCString(v117); v118 = cocos2d::CCLabelBMFont::create(); v118->setScale(v118, 0.6); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v118, 1); v119 = v118->setPosition; cocos2d::CCPoint::CCPoint( v177, (float)(v169 * 0.5) + -12.0, (float)(12.0 - (float)(v155 - (float)(v170 * 0.5))) + 7.0); v119(v118, v177); v120 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starsIcon_001.png"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v120, 1); v121 = v120->setPosition; v122 = (__int64)v118->getPosition(v118); v123 = v118->getContentSize(v118)->width; v124 = (float)(v123 * v118->getScale(v118)) * 0.5 + 7.0; cocos2d::CCPoint::CCPoint(&v176, v124, -1.5); cocos2d::CCPoint::operator+(v177, v122, &v176); v121(v120, v177); v120->setScale(v120, 0.5); v125 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_moonsIcon_001.png"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v125, 1); v126 = v120; getPosition = v120->getPosition; v128 = v125->setPosition; v129 = (__int64)getPosition(v126); cocos2d::CCPoint::CCPoint(&v176, 12.0, 0.0); cocos2d::CCPoint::operator+(v177, v129, &v176); v128(v125, v177); v125->setScale(v125, 0.55); if ( v154 >= 1.0 ) goto LABEL_47; v130 = GameStatsManager::sharedState(); GameStatsManager::trySelectActivePath(v130); v131 = a1->m_pathNumber + 29; sub_D153B8((int)v177, "Active"); v132 = v131 == GameStatsManager::sharedState()->m_activePath; v133 = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v175, 17.0 - (float)(v153 - (float)(v169 * 0.5)), (float)-(float)(v155 - (float)(v170 * 0.5)) - 8.0); v134 = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v176, 6.0, 0.5); GameToolbox::createToggleButton( 0.6, 0.5, 100.0, (__int64)v177, (void (__cdecl *)(cocos2d::CCObject *))GJPathPage::onActivatePath, 0, v132, v133, (const cocos2d::CCPoint *)&v175, a1, v134, (float *)&v176, (__int64)"goldFont.fnt", 0, 0, nullptr); v135 = (void *)(*(_QWORD *)v177 - 24LL); if ( (__int64 *)(*(_QWORD *)v177 - 24LL) != &qword_124B6B0 ) { v136 = (unsigned int *)(*(_QWORD *)v177 - 8LL); if ( &pthread_create ) { do v137 = __ldaxr(v136); while ( __stlxr(v137 - 1, v136) ); } else { v137 = *(_DWORD *)(*(_QWORD *)v177 - 8LL); *(_DWORD *)(*(_QWORD *)v177 - 8LL) = v137 - 1; } if ( v137 <= 0 ) operator delete(v135); } goto LABEL_64; } v96 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lock_001.png"); v96->setScale(v96, 1.2); v183.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v183.adj = (size_t)GJPathPage::onUnlock; v97 = CCMenuItemSpriteExtra::create(v96, nullptr, v183); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v97); v98 = a1->m_buttonMenu; v99 = v97->setPosition; cocos2d::CCPoint::CCPoint(&v176, v169 * 0.5, 15.0 - (float)(v155 - (float)(v170 * 0.5))); v180 = cocos2d::CCNode::convertToNodeSpace(v98, &v176); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v99)(v97, v177, v180.x, v180.y); GameToolbox::pointsToString((GameToolbox *)&elf_hash_bucket[6124], (__int64 *)&v175); v100 = cocos2d::CCLabelBMFont::create(); v96->addChild(v96, v100); v101 = v100->setPosition; v102 = (float *)v96->getContentSize(v96); cocos2d::CCPoint::CCPoint(v177, (float)(*v102 * 0.5) + -4.0, -6.5); v101(v100, v177); v100->setScale(v100, 0.35); v103 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png"); v96->addChild(v96, v103); v104 = v103->setPosition; v105 = (__int64)v100->getPosition(v100); v106 = v100->getContentSize(v100)->width * 0.5; v107 = (float)(v106 * v100->getScale(v100)) + 6.0; if ( a2 == 4 ) v108 = 1.0; else v108 = 0.0; cocos2d::CCPoint::CCPoint(&v176, v107 + v108, -0.5); cocos2d::CCPoint::operator+(v177, v105, &v176); v104(v103, v177); v103->setScale(v103, 0.5); v109 = &v175[-1].m_pTargetArray; if ( &v175[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v148 = (unsigned int *)&v175[-1].m_nExtraKerning; do v149 = __ldaxr(v148); while ( __stlxr(v149 - 1, v148) ); } else { v149 = v175[-1].m_nExtraKerning; v175[-1].m_nExtraKerning = v149 - 1; } if ( v149 <= 0 ) operator delete(v109); } LABEL_47: if ( v154 < 1.0 ) { LABEL_64: v138 = cocos2d::CCSprite::createWithSpriteFrameName("chestIcon_001.png"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v138, 3); v138->setColor(v138, (const cocos2d::ccColor3B *)&v164); v139 = v138->setPosition; cocos2d::CCPoint::CCPoint(v177, (float)(v153 + (float)(v169 * 0.5)) - 28.5, v173.y); v139(v138, v177); v138->setOpacity(v138, 4294967240LL); } p_m_fBrVertexMod = (char *)&v171[-1].m_fBrVertexMod; if ( (__int64 *)&v171[-1].m_fBrVertexMod != &qword_124B6B0 ) { if ( &pthread_create ) { p_m_fTextureTop = (unsigned int *)&v171[-1].m_fTextureTop; do m_fTextureTop_low = __ldaxr(p_m_fTextureTop); while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) ); } else { m_fTextureTop_low = LODWORD(v171[-1].m_fTextureTop); LODWORD(v171[-1].m_fTextureTop) = m_fTextureTop_low - 1; } if ( m_fTextureTop_low <= 0 ) operator delete(p_m_fBrVertexMod); } return v157; }
GD Web Decomp Icon

GD Web Decomp

Raw Source