//
// GJPathPage::init from 0xba6270 to 0xba7a44 (6100 bytes)
//
// 2 xrefs:
// > GJPathPage::create @ 0xba7be8
// > ??> @ 0x4cb58
//
// 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:02:50 +0000
//
__int64 __fastcall GJPathPage::init(GJPathPage *this, unsigned int a2, GJPathsLayer *a3)
{
__int64 v5; // x2
unsigned int v6; // w25
GameStatsManager *v7; // x0
__int64 v8; // x0
cocos2d::CCDirector *v10; // x0
cocos2d::CCDirector *v11; // x0
cocos2d::CCLayer *WinSize; // x0
__int64 v13; // x0
__int64 v14; // x2
cocos2d::CCSprite *v15; // x26
long double v16; // q0
void (__fastcall *v17)(cocos2d::CCSprite *, __int64 *); // x21
float v18; // s11
float v19; // s11
float v20; // s10
float v21; // s9
__int64 v22; // x0
cocos2d::CCMenu *v23; // x21
__int64 v24; // x21
void (__fastcall *v25)(__int64, __int64 *); // x24
__int64 v26; // x24
cocos2d::CCNode *v27; // x27
void (__fastcall *v28)(__int64, __int64 *); // x26
GJPathSprite *v29; // x24
cocos2d::CCString *v30; // x0
const char *CString; // x0
size_t v32; // x0
cocos2d::CCSprite *v33; // x0
cocos2d::CCSprite *v34; // x21
float v35; // s9
float *v36; // x0
void (__fastcall *v37)(GJPathSprite *, __int64 *); // x26
float v38; // s8
void (__fastcall *v39)(cocos2d::CCSprite *, __int64 *); // x24
float *v40; // x0
float v41; // s13
float v42; // s10
const char *v43; // x1
const char *v44; // x1
__int64 v45; // x28
void (__fastcall *v46)(__int64, __int64 *); // x25
void (__fastcall *v47)(__int64, float); // x25
float *v48; // x0
void (__fastcall *v49)(__int64, float); // x25
__int64 v50; // x0
GameStatsManager *v51; // x0
GameStatsManager *StatFromKey; // x0
const char *v53; // x1
__int64 v54; // x25
void (__fastcall *v55)(__int64, __int64 *); // x27
void (__fastcall *v56)(__int64, __int64 *); // x27
void (__fastcall *v57)(__int64, float); // x26
float *v58; // x0
void (__fastcall *v59)(__int64, float); // x26
__int64 v60; // x0
int i; // w24
unsigned int v62; // w1
const char *v63; // x1
GJItemIcon *v64; // x25
float v65; // s9
__int64 v66; // x21
void (__fastcall *v67)(__int64, __int64); // x26
__int64 v68; // x0
void (__fastcall *v69)(GJItemIcon *, __int64 *); // x26
float v70; // s8
__int64 v71; // x0
unsigned __int64 v72; // x0
float v73; // s8
cocos2d::CCNode *v74; // x27
void (__fastcall *v75)(__int64, __int64 *); // x26
const char *v76; // x1
__int64 v77; // x26
void (__fastcall *v78)(__int64, __int64 *); // x25
void (__fastcall *v79)(__int64, __int64 *); // x25
void (__fastcall *v80)(__int64, float); // x25
float *v81; // x0
void (__fastcall *v82)(__int64, float); // x25
__int64 v83; // x0
const char *v84; // x1
__int64 v85; // x25
void (__fastcall *v86)(__int64, __int64 *); // x27
__int64 v87; // x0
cocos2d::CCString *v88; // x0
const char *v89; // x0
size_t v90; // x0
GameManager *v91; // x0
__int64 v92; // x25
int v93; // w0
char v94; // w1
char v95; // w20
char v96; // w0
__int64 v97; // x23
__int64 v98; // x21
cocos2d::CCNode *v99; // x25
void (__fastcall *v100)(__int64, __int64 *); // x24
const char *v101; // x2
cocos2d::CCLabelBMFont *v102; // x0
__int64 v103; // x20
void (__fastcall *v104)(__int64, __int64 *); // x21
float *v105; // x0
const char *v106; // x1
__int64 v107; // x21
void (__fastcall *v108)(__int64, __int64 *); // x23
__int64 v109; // x24
float v110; // s8
float v111; // s0
float v112; // s1
const char *v113; // x1
AchievementManager *v114; // x0
cocos2d::CCLabelBMFont *v115; // x1
__int64 v116; // x26
void (__fastcall *v117)(__int64, __int64 *); // x25
__int64 v118; // x0
const char *v119; // x1
size_t v120; // x0
unsigned int v121; // w25
float v122; // s0
float v123; // s0
void (__fastcall *v124)(cocos2d::CCSprite *, __int64 *, float); // x3
cocos2d::CCString *v125; // x0
cocos2d::CCLabelBMFont *v126; // x0
const char *v127; // x2
__int64 v128; // x21
void (__fastcall *v129)(__int64, __int64 *); // x23
const char *v130; // x1
__int64 v131; // x23
void (__fastcall *v132)(__int64, __int64 *); // x25
__int64 v133; // x26
float v134; // s8
float v135; // s0
const char *v136; // x1
__int64 v137; // x21
__int64 v138; // x0
__int64 (__fastcall *v139)(__int64); // x1
void (__fastcall *v140)(__int64, __int64 *); // x23
__int64 v141; // x25
GameStatsManager *v142; // x0
GameStatsManager *v143; // x0
int v144; // w25
GameStatsManager *v145; // x0
unsigned __int8 v146; // w26
cocos2d::CCNode *v147; // x25
__int64 v148; // x21
__int64 v149; // x20
void (__fastcall *v150)(__int64, __int64 *); // x21
GameStatsManager *v151; // x0
float v152; // s0
int v153; // [xsp+D4h] [xbp+A4h]
float v154; // [xsp+D8h] [xbp+A8h]
float v155; // [xsp+DCh] [xbp+ACh]
float v156; // [xsp+E8h] [xbp+B8h]
unsigned __int8 v157; // [xsp+EFh] [xbp+BFh]
__int64 v158; // [xsp+F0h] [xbp+C0h]
cocos2d::CCNode *v159; // [xsp+100h] [xbp+D0h]
unsigned int isItemUnlocked; // [xsp+108h] [xbp+D8h]
char *v162; // [xsp+118h] [xbp+E8h]
int v163; // [xsp+118h] [xbp+E8h]
char *v164; // [xsp+118h] [xbp+E8h]
char *v165; // [xsp+118h] [xbp+E8h]
_BYTE v166[8]; // [xsp+120h] [xbp+F0h] BYREF
__int64 v167; // [xsp+128h] [xbp+F8h] BYREF
__int64 v168; // [xsp+130h] [xbp+100h]
__int64 v169; // [xsp+138h] [xbp+108h]
int v170; // [xsp+140h] [xbp+110h] BYREF
int v171; // [xsp+144h] [xbp+114h] BYREF
__int64 v172; // [xsp+148h] [xbp+118h] BYREF
_BYTE v173[8]; // [xsp+150h] [xbp+120h] BYREF
_BYTE v174[4]; // [xsp+158h] [xbp+128h] BYREF
float v175; // [xsp+15Ch] [xbp+12Ch]
_BYTE v176[8]; // [xsp+160h] [xbp+130h] BYREF
__int64 v177; // [xsp+168h] [xbp+138h] BYREF
__int64 v178; // [xsp+170h] [xbp+140h] BYREF
char *v179[2]; // [xsp+178h] [xbp+148h] BYREF
void *v180; // [xsp+188h] [xbp+158h]
__int64 v181[2]; // [xsp+190h] [xbp+160h] BYREF
void *v182; // [xsp+1A0h] [xbp+170h]
__int64 v183; // [xsp+1A8h] [xbp+178h] BYREF
size_t v184; // [xsp+1B0h] [xbp+180h]
void *v185; // [xsp+1B8h] [xbp+188h]
__int64 v186; // [xsp+1C0h] [xbp+190h] BYREF
size_t v187; // [xsp+1C8h] [xbp+198h]
cocos2d::CCLabelBMFont *v188; // [xsp+1D0h] [xbp+1A0h]
__int64 v189; // [xsp+1D8h] [xbp+1A8h]
*((_QWORD *)this + 85) = a3;
v5 = _stack_chk_guard;
v6 = a2 + 5;
*((_DWORD *)this + 172) = a2;
v189 = v5;
v7 = (GameStatsManager *)GJPathsLayer::darkenButtons(a3, 1);
v8 = GameStatsManager::sharedState(v7);
isItemUnlocked = (unsigned __int8)GameStatsManager::isItemUnlocked(v8, 0xCu, v6);
FLAlertLayer::incrementForcePrio(this);
LODWORD(v178) = -1358954496;
v157 = cocos2d::CCLayerColor::initWithColor(this, &v178);
if ( !v157 )
return v157;
(*(void (__fastcall **)(GJPathPage *, __int64))(*(_QWORD *)this + 1000LL))(this, 1);
v10 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(GJPathPage *, __int64))(*(_QWORD *)this + 1072LL))(this, 1);
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize(&v172, v11);
v13 = cocos2d::CCLayer::create(WinSize);
v14 = *(_QWORD *)this;
*((_QWORD *)this + 73) = v13;
(*(void (__fastcall **)(GJPathPage *))(v14 + 456))(this);
LOWORD(v169) = -1;
BYTE2(v169) = -1;
memset(v166, 50, 3);
LOWORD(v167) = 7710;
BYTE2(v167) = 30;
LOWORD(v168) = -26986;
BYTE2(v168) = -106;
if ( isItemUnlocked )
{
v15 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"pathInnerBG_001.png",
(const char *)0xFFFFFF96LL);
switch ( a2 )
{
case 1u:
v166[0] = -1;
LOWORD(v168) = 19455;
v166[1] = -126;
v95 = 56;
v166[2] = 74;
v96 = 16;
v94 = 28;
BYTE2(v168) = 0;
*(_WORD *)((char *)&v169 + 1) = 200;
break;
case 2u:
v166[0] = 59;
v166[1] = -123;
v96 = 45;
v166[2] = -49;
v94 = 29;
v95 = 12;
LOBYTE(v168) = 0;
BYTE2(v168) = -1;
LOBYTE(v169) = 0;
break;
case 3u:
v166[0] = 73;
v166[2] = 56;
v96 = 12;
v166[1] = -96;
v94 = 35;
LOWORD(v168) = -24576;
v95 = 16;
BYTE2(v168) = 0;
LOBYTE(v169) = 0;
BYTE2(v169) = 0;
break;
case 4u:
v166[0] = -113;
v166[2] = -62;
v166[1] = 79;
v94 = 17;
v96 = 42;
*(_WORD *)((char *)&v168 + 1) = -14336;
v95 = 31;
BYTE1(v169) = 50;
break;
case 5u:
LOWORD(v168) = 175;
v166[0] = -60;
qmemcpy(&v166[1], "J=", 2);
v96 = 13;
*(_WORD *)((char *)&v169 + 1) = 6450;
v94 = 16;
v95 = 43;
BYTE2(v168) = 0;
break;
case 6u:
LOWORD(v168) = 25251;
BYTE2(v168) = 70;
v166[0] = -91;
LOWORD(v169) = -7939;
qmemcpy(&v166[1], "T3", 2);
v96 = 11;
v94 = 18;
v95 = 36;
BYTE2(v169) = -96;
break;
case 7u:
v96 = 7;
v166[0] = -26;
memset(&v166[1], 34, 2);
v94 = 7;
v95 = 50;
*(_WORD *)((char *)&v168 + 1) = 0;
*(_WORD *)((char *)&v169 + 1) = 0;
break;
case 8u:
v96 = 44;
v166[0] = -52;
v166[1] = -52;
v94 = 44;
v166[2] = -52;
v95 = 44;
LOWORD(v168) = -32640;
BYTE2(v168) = 0x80;
break;
case 9u:
v166[0] = -1;
LOWORD(v168) = -1281;
v166[1] = -78;
BYTE2(v168) = 127;
v96 = 17;
v94 = 39;
v166[2] = 79;
v95 = 56;
BYTE2(v169) = -64;
break;
case 0xAu:
v166[0] = -62;
v166[2] = -103;
v166[1] = 69;
v94 = 15;
LOWORD(v168) = 100;
v96 = 33;
v95 = 42;
*(_WORD *)((char *)&v169 + 1) = 32000;
break;
default:
*(float *)&v16 = (float)v166[2] * 0.22;
v94 = (unsigned int)(float)((float)v166[1] * 0.22);
v95 = (unsigned int)(float)((float)v166[0] * 0.22);
v96 = (unsigned int)*(float *)&v16;
break;
}
LOBYTE(v167) = v95;
BYTE1(v167) = v94;
BYTE2(v167) = v96;
}
else
{
v186 = 0;
v187 = 0;
v188 = nullptr;
std::string::__init(&v186, "pathInnerBG_001.png", 0x13u);
v15 = CCSpriteGrayscale::createWithSpriteFrameName((char *)&v186);
if ( (v186 & 1) != 0 )
operator delete(v188);
*(float *)&v16 = CCSpriteWithHue::setEvenLuminance(v15, 2.5);
}
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64, long double))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v15,
0xFFFFFFFFLL,
v16);
(*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v15 + 160LL))(v15, 1.3);
v17 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v15 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, *(float *)&v172 * 0.5, *((float *)&v172 + 1) * 0.5);
v17(v15, &v178);
v18 = *(float *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v15 + 328LL))(v15);
v19 = v18 * (*(float (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v15 + 168LL))(v15);
v20 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v15 + 328LL))(v15) + 4);
v21 = v20 * (*(float (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v15 + 168LL))(v15);
(*(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v15 + 960LL))(v15, v166);
*((_DWORD *)this + 160) = -1;
v22 = cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"backArrowPlain_01_001.png",
(const char *)0xFFFFFFFFLL);
v23 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v22, 0, (__int64)this, (__int64)GJPathPage::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v23, 1.6);
v24 = cocos2d::CCMenu::create(v23, nullptr);
*((_QWORD *)this + 69) = v24;
v154 = v19 * 0.5;
v25 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 184LL);
v156 = v21 * 0.5;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v178,
12.0 - (float)((float)(v19 * 0.5) - (float)(*(float *)&v172 * 0.5)),
(float)((float)(v21 * 0.5) + (float)(*((float *)&v172 + 1) * 0.5)) - 12.0);
v25(v24, &v178);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 69),
10);
v183 = 0;
v184 = 0;
v185 = nullptr;
std::string::__init(&v183, "Paths of Power", 0xEu);
v186 = 0;
v187 = 0;
v188 = nullptr;
std::string::__init(
&v186,
"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.",
0xC3u);
v26 = InfoAlertButton::create((char *)&v183, (char *)&v186, 0.8);
if ( (v186 & 1) != 0 )
operator delete(v188);
if ( (v183 & 1) != 0 )
operator delete(v185);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v26);
v27 = *((cocos2d::CCNode **)this + 69);
v28 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v26 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v177,
(float)(v154 + (float)(*(float *)&v172 * 0.5)) - 14.0,
(float)(v156 + (float)(*((float *)&v172 + 1) * 0.5)) - 14.0);
cocos2d::CCNode::convertToNodeSpace(&v178, v27, (const cocos2d::CCPoint *)&v177);
v28(v26, &v178);
v29 = (GJPathSprite *)GJPathSprite::create((GJPathSprite *)*((unsigned int *)this + 172));
GJPathSprite::updateState(v29);
(*(void (__fastcall **)(_QWORD, GJPathSprite *, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v29,
1);
(*(void (__fastcall **)(GJPathSprite *, float))(*(_QWORD *)v29 + 160LL))(v29, 1.0);
v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"pathLabel_%02d_001.png",
(const char *)a2);
CString = (const char *)cocos2d::CCString::getCString(v30);
v179[0] = nullptr;
v162 = (char *)CString;
v179[1] = nullptr;
v180 = nullptr;
v32 = strlen(CString);
std::string::__init((__int64 *)v179, v162, v32);
if ( isItemUnlocked )
{
v33 = (cocos2d::CCSprite *)((char *)v179 + 1);
if ( ((__int64)v179[0] & 1) != 0 )
v33 = (cocos2d::CCSprite *)v180;
v34 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(v33, (const char *)LOBYTE(v179[0]));
}
else
{
v119 = (char *)v179 + 1;
if ( ((__int64)v179[0] & 1) != 0 )
v119 = (const char *)v180;
v165 = (char *)v119;
v181[0] = 0;
v181[1] = 0;
v182 = nullptr;
v120 = strlen(v119);
std::string::__init(v181, v165, v120);
v34 = CCSpriteGrayscale::createWithSpriteFrameName((char *)v181);
if ( (v181[0] & 1) != 0 )
operator delete(v182);
v121 = v6 - 7;
if ( v121 > 8 )
v122 = 3.0;
else
v122 = flt_1195FC0[v121];
v123 = CCSpriteWithHue::setEvenLuminance(v34, v122);
v124 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *, float))(*(_QWORD *)v34 + 960LL);
memset(&v178, 100, 3);
v124(v34, &v178, v123);
}
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v34,
1);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v173,
*(float *)&v172 * 0.5,
(float)(v156 + (float)(*((float *)&v172 + 1) * 0.5)) - 8.0);
v35 = *(float *)(*(__int64 (__fastcall **)(GJPathSprite *))(*(_QWORD *)v29 + 328LL))(v29);
v36 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v34 + 328LL))(v34);
v37 = *(void (__fastcall **)(GJPathSprite *, __int64 *))(*(_QWORD *)v29 + 184LL);
v38 = (float)(v35 + *v36) + 10.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v177, -(float)((float)(v35 * 0.5) - (float)(v38 * 0.5)), 0.0);
cocos2d::CCPoint::operator+(&v178, v173);
v37(v29, &v178);
v39 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v34 + 184LL);
v40 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v34 + 328LL))(v34);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v177, (float)(v38 * -0.5) + (float)(*v40 * 0.5), -2.0);
cocos2d::CCPoint::operator+(&v178, v173);
v39(v34, &v178);
v41 = (float)(*((float *)&v172 + 1) * 0.5) + 0.0;
v42 = (float)(*(float *)&v172 * 0.5) - 170.0;
v158 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"playerSquare_001.png", v43);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v174,
(float)(*(float *)&v172 * 0.5) + -170.0,
(float)(30.0 - (float)(v156 - (float)(*((float *)&v172 + 1) * 0.5))) + 10.0);
v45 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v44);
v46 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v45 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, 0.5);
v46(v45, &v178);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v45 + 184LL))(v45, v174);
(*(void (__fastcall **)(_QWORD, __int64, _QWORD))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v45, 0);
v47 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v45 + 128LL);
v48 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v45 + 328LL))(v45);
v47(v45, 340.0 / *v48);
v49 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v45 + 144LL);
v50 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v45 + 328LL))(v45);
v49(v45, 5.0 / *(float *)(v50 + 4));
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v45 + 960LL))(v45, &v167);
v51 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)a2);
StatFromKey = (GameStatsManager *)GameStatsManager::getStatFromKey(v51, (GameToolbox *)(a2 + 29));
if ( (int)StatFromKey <= 999 )
{
v151 = (GameStatsManager *)GameStatsManager::sharedState(StatFromKey);
v153 = GameStatsManager::getStatFromKey(v151, (GameToolbox *)(a2 + 29));
v152 = (float)v153 / 1000.0;
v155 = v152;
if ( v152 >= 1.0 )
{
v155 = 1.0;
}
else if ( v152 <= 0.0 )
{
goto LABEL_18;
}
}
else
{
v153 = 1000;
v155 = 1.0;
}
v54 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v53);
v55 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v54 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, 0.5);
v55(v54, &v178);
v56 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v54 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v177, 2.0, 0.0);
cocos2d::CCPoint::operator+(&v178, v174);
v56(v54, &v178);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v54, 1);
v57 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v54 + 128LL);
v58 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v54 + 328LL))(v54);
v57(v54, (float)(v155 * 336.0) / *v58);
v59 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v54 + 144LL);
v60 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v54 + 328LL))(v54);
v59(v54, 2.0 / *(float *)(v60 + 4));
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v54 + 960LL))(v54, v166);
LABEL_18:
for ( i = 0; i != 11; ++i )
{
while ( 1 )
{
v88 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"geometry.ach.path%02d.%02d",
(const char *)a2,
(unsigned int)i);
v89 = (const char *)cocos2d::CCString::getCString(v88);
v186 = 0;
v187 = 0;
v188 = nullptr;
v164 = (char *)v89;
v90 = strlen(v89);
v91 = (GameManager *)std::string::__init(&v186, v164, v90);
v170 = 0;
v171 = 0;
v92 = GameManager::sharedState(v91);
v183 = 0;
v184 = 0;
v185 = nullptr;
if ( (v186 & 1) != 0 )
{
std::string::__init(&v183, v188, v187);
}
else
{
v185 = v188;
v183 = v186;
v184 = v187;
}
GameManager::getUnlockForAchievement(v92, (__int64)&v183, &v170, &v171);
if ( (v183 & 1) != 0 )
operator delete(v185);
v93 = v171;
if ( v171 )
{
v62 = v170;
}
else
{
v93 = 1;
v171 = 1;
v62 = 1;
v170 = 1;
}
v64 = (GJItemIcon *)GJItemIcon::create(v93, v62, v168, v169, 0, 1u, 1u);
if ( v64 )
{
v65 = GJItemIcon::scaleForType(1);
(*(void (__fastcall **)(GJItemIcon *))(*(_QWORD *)v64 + 160LL))(v64);
v66 = CCMenuItemSpriteExtra::create((__int64)v64, 0, (__int64)this, (__int64)GJPathPage::onIconInfo, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v66);
v67 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v66 + 320LL);
v68 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v158 + 328LL))(v158);
v67(v66, v68);
v69 = *(void (__fastcall **)(GJItemIcon *, __int64 *))(*(_QWORD *)v64 + 184LL);
v70 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v66 + 328LL))(v66);
v71 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v66 + 328LL))(v66);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v70 * 0.5, *(float *)(v71 + 4) * 0.5);
v69(v64, &v178);
v72 = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v66 + 72LL))(v66, (unsigned int)i);
if ( !i )
{
v72 = isItemUnlocked;
if ( isItemUnlocked )
goto LABEL_23;
}
v114 = (AchievementManager *)AchievementManager::sharedState((AchievementManager *)v72);
v115 = (cocos2d::CCLabelBMFont *)((char *)&v186 + 1);
if ( (v186 & 1) != 0 )
v115 = v188;
if ( AchievementManager::isAchievementEarned(v114, (const char *)v115) )
{
LABEL_23:
v163 = 1;
}
else
{
GJItemIcon::changeToLockedState(v64, 1.0 / v65);
GJItemIcon::darkenStoreItem((__int64)v64, v167);
v163 = 0;
}
v73 = v41;
if ( (i & 1) != 0 )
v73 = v41 + 0.0;
v74 = *((cocos2d::CCNode **)this + 69);
v75 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v66 + 184LL);
v159 = *((cocos2d::CCNode **)this + 73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v176, v42 + (float)((float)i * 34.0), v73 + 10.0);
cocos2d::CCNode::convertToWorldSpace(&v177, v159, (const cocos2d::CCPoint *)v176);
cocos2d::CCNode::convertToNodeSpace(&v178, v74, (const cocos2d::CCPoint *)&v177);
v75(v66, &v178);
v77 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v76);
v78 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v77 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.5, 1.0);
v78(v77, &v178);
v79 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v77 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v42 + (float)((float)i * 34.0), (float)(v73 - 17.0) + 10.0);
v79(v77, &v178);
v80 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v77 + 128LL);
v81 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v77 + 328LL))(v77);
v80(v77, 1.5 / *v81);
v82 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v77 + 144LL);
v83 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v77 + 328LL))(v77);
v82(v77, 16.0 / *(float *)(v83 + 4));
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v77 + 960LL))(v77, &unk_1195F90);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v77 + 912LL))(v77, 25);
(*(void (__fastcall **)(_QWORD, __int64, _QWORD))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v77,
0);
v85 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"smallDot.png", v84);
v86 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v85 + 184LL);
v87 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v45 + 192LL))(v45);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v42 + (float)((float)i * 34.0), *(float *)(v87 + 4));
v86(v85, &v178);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v85 + 960LL))(v85, &v167);
(*(void (__fastcall **)(_QWORD, __int64, _QWORD))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v85,
0);
if ( v163 )
{
v116 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"smallDot.png", v63);
v117 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v116 + 184LL);
v118 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v45 + 192LL))(v45);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v42 + (float)((float)i * 34.0), *(float *)(v118 + 4));
v117(v116, &v178);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v116 + 960LL))(v116, v166);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v116 + 160LL))(v116, 0.7);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v116,
1);
}
}
if ( (v186 & 1) != 0 )
break;
if ( ++i == 11 )
goto LABEL_41;
}
operator delete(v188);
}
LABEL_41:
if ( !isItemUnlocked )
{
v97 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_lock_001.png", v63);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v97 + 160LL))(v97, 1.2);
v98 = CCMenuItemSpriteExtra::create(v97, 0, (__int64)this, (__int64)GJPathPage::onUnlock, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v98);
v99 = *((cocos2d::CCNode **)this + 69);
v100 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v98 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v177,
*(float *)&v172 * 0.5,
15.0 - (float)(v156 - (float)(*((float *)&v172 + 1) * 0.5)));
cocos2d::CCNode::convertToNodeSpace(&v178, v99, (const cocos2d::CCPoint *)&v177);
v100(v98, &v178);
GameToolbox::pointsToString((GameToolbox *)&elf_hash_bucket[6124], (unsigned __int64 *)&v186);
v102 = (cocos2d::CCLabelBMFont *)((char *)&v186 + 1);
if ( (v186 & 1) != 0 )
v102 = v188;
v103 = cocos2d::CCLabelBMFont::create(v102, "bigFont.fnt", v101);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v97 + 456LL))(v97, v103);
v104 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v103 + 184LL);
v105 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v97 + 328LL))(v97);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, (float)(*v105 * 0.5) + -4.0, -6.5);
v104(v103, &v178);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v103 + 160LL))(v103, 0.35);
v107 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"currencyOrbIcon_001.png", v106);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v97 + 456LL))(v97, v107);
v108 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v107 + 184LL);
v109 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v103 + 192LL))(v103);
v110 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v103 + 328LL))(v103) * 0.5;
v111 = (float)(v110 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v103 + 168LL))(v103)) + 6.0;
if ( a2 == 4 )
v112 = 1.0;
else
v112 = 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v177, v111 + v112, -0.5);
cocos2d::CCPoint::operator+(&v178, v109);
v108(v107, &v178);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v107 + 160LL))(v107, 0.5);
if ( (v186 & 1) != 0 )
operator delete(v188);
LABEL_48:
if ( v155 >= 1.0 )
goto LABEL_49;
goto LABEL_65;
}
v125 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i/%i",
(const char *)(unsigned int)v153,
1000);
v126 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v125);
v128 = cocos2d::CCLabelBMFont::create(v126, "goldFont.fnt", v127);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v128 + 160LL))(v128, 0.6);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v128, 1);
v129 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v128 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v178,
(float)(*(float *)&v172 * 0.5) + -12.0,
(float)(12.0 - (float)(v156 - (float)(*((float *)&v172 + 1) * 0.5))) + 7.0);
v129(v128, &v178);
v131 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_starsIcon_001.png", v130);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v131, 1);
v132 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v131 + 184LL);
v133 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v128 + 192LL))(v128);
v134 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v128 + 328LL))(v128);
v135 = (float)(v134 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v128 + 168LL))(v128)) * 0.5 + 7.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v177, v135, -1.5);
cocos2d::CCPoint::operator+(&v178, v133);
v132(v131, &v178);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v131 + 160LL))(v131, 0.5);
v137 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_moonsIcon_001.png", v136);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v137, 1);
v138 = v131;
v139 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v131 + 192LL);
v140 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v137 + 184LL);
v141 = v139(v138);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v177, 12.0, 0.0);
cocos2d::CCPoint::operator+(&v178, v141);
v140(v137, &v178);
v142 = (GameStatsManager *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v137 + 160LL))(v137, 0.55);
if ( v155 >= 1.0 )
goto LABEL_48;
v143 = (GameStatsManager *)GameStatsManager::sharedState(v142);
GameStatsManager::trySelectActivePath(v143);
v144 = *((_DWORD *)this + 172) + 29;
v186 = 0;
v187 = 0;
v188 = nullptr;
v145 = (GameStatsManager *)std::string::__init(&v186, "Active", 6u);
v146 = v144 == *(_DWORD *)(GameStatsManager::sharedState(v145) + 916);
v147 = *((cocos2d::CCNode **)this + 69);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v177,
17.0 - (float)(v154 - (float)(*(float *)&v172 * 0.5)),
(float)-(float)(v156 - (float)(*((float *)&v172 + 1) * 0.5)) - 8.0);
v148 = *((_QWORD *)this + 73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 6.0, 0.5);
GameToolbox::createToggleButton(
(__int64)&v186,
(const char *)GJPathPage::onActivatePath,
0,
v146,
v147,
(const cocos2d::CCPoint *)&v177,
(__int64)this,
v148,
0.6,
0.5,
100.0,
(float *)&v178,
"goldFont.fnt",
0,
0,
nullptr);
if ( (v186 & 1) != 0 )
operator delete(v188);
LABEL_65:
v149 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"chestIcon_001.png", v113);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v149, 3);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v149 + 960LL))(v149, &v167);
v150 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v149 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, (float)(v154 + (float)(*(float *)&v172 * 0.5)) - 28.5, v175);
v150(v149, &v178);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v149 + 912LL))(v149, 4294967240LL);
LABEL_49:
if ( ((__int64)v179[0] & 1) != 0 )
operator delete(v180);
return v157;
}