//
// GJPathPage::init from 0x6d2ee8 to 0x6d401a (4402 bytes)
//
// 1 xrefs:
// > GJPathPage::create @ 0x6d40b0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:57:05 +0000
//
int __fastcall GJPathPage::init(GJPathPage *this, const char *a2, GJPathsLayer *a3)
{
GameStatsManager *v4; // r0
GameStatsManager *v5; // r0
cocos2d::CCDirector *v6; // r0
cocos2d::CCLayer *WinSize; // r0
int v8; // r0
int v9; // r3
const char *v10; // r1
float *v11; // r7
char v12; // r3
void (__fastcall *v13)(float *, int *); // r6
float v14; // s18
float v15; // s18
float v16; // s17
float v17; // s15
const char *v18; // r1
int v19; // r0
cocos2d::CCMenu *v20; // r7
int v21; // r0
float v22; // s18
float v23; // s14
float v24; // s17
float v25; // s13
int v26; // r8
void (__fastcall *v27)(int, int *); // r7
int v28; // r5
const cocos2d::CCPoint *v29; // r10
void (__fastcall *v30)(int, int *); // r7
int v31; // r1
int *v32; // r7
cocos2d::CCString *v33; // r0
const char *CString; // r0
const char *v35; // r5
size_t v36; // r0
const char *v37; // r1
cocos2d::CCSprite *v38; // r0
float *v39; // r5
cocos2d::CCSprite *v40; // r5
size_t v41; // r0
float v42; // r1
void (__fastcall *v43)(float *, int *); // r2
float v44; // s22
float *v45; // r0
void (__fastcall *v46)(int *, int *); // r10
float v47; // s19
void (__fastcall *v48)(float *, int *); // r7
float *v49; // r0
float v50; // s19
float v51; // s22
const char *v52; // r1
int v53; // r10
const char *v54; // r1
int v55; // r5
void (__fastcall *v56)(int, int *); // r8
void (__fastcall *v57)(int, _DWORD); // r7
float *v58; // r0
void (__fastcall *v59)(int, _DWORD); // r7
int v60; // r0
GameStatsManager *v61; // r0
GameStatsManager *v62; // r0
char *v63; // r2
int v64; // r3
GameStatsManager *StatFromKey; // r0
const char *v66; // r1
GameStatsManager *v67; // r0
char *v68; // r2
int v69; // r3
float v70; // s20
int v71; // r9
cocos2d::CCString *i; // r0
int v73; // r7
void (__fastcall *v74)(int, int *); // r8
void (__fastcall *v75)(int, int *); // r9
void (__fastcall *v76)(int, _DWORD); // r6
float *v77; // r0
void (__fastcall *v78)(int, _DWORD); // r6
int v79; // r0
const char *v80; // r8
size_t v81; // r0
GameManager *v82; // r0
AchievementManager *v83; // r8
int *v84; // r7
const char *v85; // r1
float v86; // s24
int v87; // r6
void (__fastcall *v88)(int, int); // r8
int v89; // r0
float v90; // s23
float v91; // s16
int v92; // r0
AchievementManager *v93; // r0
AchievementManager *v94; // r0
cocos2d::CCLabelBMFont *v95; // r1
int v96; // r7
int v97; // r6
const cocos2d::CCPoint *v98; // r11
void (__fastcall *v99)(int, int *); // r9
cocos2d::CCLabelBMFont *v100; // r0
int v101; // r6
void (__fastcall *v102)(int, int *); // r9
float *v103; // r0
const char *v104; // r1
int v105; // r9
void (__fastcall *v106)(int, int *); // r7
int v107; // r11
float v108; // s17
float v109; // s14
float v110; // s15
const char *v111; // r1
cocos2d::CCString *v112; // r0
cocos2d::CCLabelBMFont *v113; // r0
const char *v114; // r2
int v115; // r6
void (__fastcall *v116)(int, int *); // r7
const char *v117; // r1
int v118; // r7
void (__fastcall *v119)(int, int *); // r9
int v120; // r10
float v121; // s19
float v122; // s15
const char *v123; // r1
int v124; // r9
void (__fastcall *v125)(int, int *); // r10
int v126; // r7
GameStatsManager *v127; // r0
GameStatsManager *v128; // r0
int v129; // r1
char *v130; // r2
int v131; // r3
int v132; // r5
GameStatsManager *v133; // r0
int v134; // r0
const cocos2d::CCPoint *v135; // r11
_BOOL4 v136; // r5
int v137; // r10
int v138; // r5
void (__fastcall *v139)(int, _BYTE *); // r6
float v141; // s15
float v142; // s23
float v143; // s16
const char *v144; // r1
int v145; // r6
void (__fastcall *v146)(int, int *); // r8
void (__fastcall *v147)(int, int *); // r8
void (__fastcall *v148)(int, _DWORD); // r7
float *v149; // r0
void (__fastcall *v150)(int, _DWORD); // r7
int v151; // r0
const char *v152; // r1
int v153; // r6
void (__fastcall *v154)(int, int *); // r8
int v155; // r0
const char *v156; // r1
int v157; // r6
void (__fastcall *v158)(int, int *); // r8
int v159; // r0
int v160; // r2
int v161; // r3
int isItemUnlocked; // [sp+30h] [bp-CCh]
char *v164; // [sp+38h] [bp-C4h]
int v165; // [sp+3Ch] [bp-C0h]
void (__fastcall *v166)(int *, int *); // [sp+40h] [bp-BCh]
int v167; // [sp+40h] [bp-BCh]
void (__fastcall *v168)(int, int *); // [sp+48h] [bp-B4h]
cocos2d::CCPoint *v169; // [sp+4Ch] [bp-B0h]
cocos2d::CCPoint *v170; // [sp+50h] [bp-ACh]
_BYTE v171[4]; // [sp+6Ch] [bp-90h] BYREF
int v172; // [sp+70h] [bp-8Ch] BYREF
int v173; // [sp+74h] [bp-88h]
__int16 v174; // [sp+78h] [bp-84h]
char v175; // [sp+7Ah] [bp-82h]
int v176; // [sp+7Ch] [bp-80h] BYREF
int v177; // [sp+80h] [bp-7Ch] BYREF
float v178; // [sp+84h] [bp-78h] BYREF
float v179; // [sp+88h] [bp-74h]
_BYTE v180[8]; // [sp+8Ch] [bp-70h] BYREF
_BYTE v181[4]; // [sp+94h] [bp-68h] BYREF
float v182; // [sp+98h] [bp-64h]
_BYTE v183[8]; // [sp+9Ch] [bp-60h] BYREF
unsigned __int8 *(__fastcall *v184)(unsigned __int8 *, cocos2d::CCObject *); // [sp+A4h] [bp-58h]
int v185; // [sp+A8h] [bp-54h]
int (__fastcall *v186)(GJPathPage *, cocos2d::CCObject *); // [sp+ACh] [bp-50h]
int v187; // [sp+B0h] [bp-4Ch]
_DWORD v188[2]; // [sp+B4h] [bp-48h] BYREF
int v189; // [sp+BCh] [bp-40h] BYREF
int v190; // [sp+C0h] [bp-3Ch]
int v191[2]; // [sp+C4h] [bp-38h] BYREF
cocos2d::CCSprite *v192; // [sp+CCh] [bp-30h]
int v193[3]; // [sp+D0h] [bp-2Ch] BYREF
int v194[3]; // [sp+DCh] [bp-20h] BYREF
int v195; // [sp+E8h] [bp-14h] BYREF
int v196; // [sp+ECh] [bp-10h]
cocos2d::CCLabelBMFont *v197; // [sp+F0h] [bp-Ch]
*((_DWORD *)this + 133) = a2;
*((_DWORD *)this + 132) = a3;
v4 = (GameStatsManager *)GJPathsLayer::darkenButtons(a3, 1);
v5 = (GameStatsManager *)GameStatsManager::sharedState(v4);
isItemUnlocked = GameStatsManager::isItemUnlocked(v5, 12, (int)(a2 + 5));
FLAlertLayer::incrementForcePrio(this);
v189 = -1358954496;
v165 = cocos2d::CCLayerColor::initWithColor(this, &v189);
if ( v165 )
{
(*(void (__fastcall **)(GJPathPage *, int))(*(_DWORD *)this + 500))(this, 1);
v6 = (cocos2d::CCDirector *)(*(int (__fastcall **)(GJPathPage *, int))(*(_DWORD *)this + 536))(this, 1);
cocos2d::CCDirector::sharedDirector(v6);
WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v178);
v8 = cocos2d::CCLayer::create(WinSize);
v9 = *(_DWORD *)this;
*((_DWORD *)this + 115) = v8;
(*(void (__fastcall **)(GJPathPage *, int))(v9 + 228))(this, v8);
memset(v171, 50, 3);
LOWORD(v172) = 7710;
BYTE2(v172) = 30;
LOWORD(v173) = -26986;
BYTE2(v173) = -106;
v174 = -1;
v175 = -1;
if ( isItemUnlocked )
{
v11 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"pathInnerBG_001.png", v10);
switch ( (unsigned int)a2 )
{
case 1u:
v171[0] = -1;
v171[1] = -126;
LOWORD(v173) = 19455;
v171[2] = 74;
v12 = 0;
HIBYTE(v174) = -56;
BYTE2(v173) = 0;
goto LABEL_15;
case 2u:
v171[0] = 59;
BYTE2(v173) = -1;
v171[1] = -123;
v171[2] = -49;
LOBYTE(v173) = 0;
LOBYTE(v174) = 0;
break;
case 3u:
v171[0] = 73;
v171[1] = -96;
v171[2] = 56;
v12 = 0;
LOWORD(v173) = -24576;
BYTE2(v173) = 0;
LOBYTE(v174) = 0;
goto LABEL_15;
case 4u:
v171[0] = -113;
v171[1] = 79;
v171[2] = -62;
*(_WORD *)((char *)&v173 + 1) = -14336;
HIBYTE(v174) = 50;
break;
case 5u:
v171[0] = -60;
qmemcpy(&v171[1], "J=", 2);
LOWORD(v173) = 175;
BYTE2(v173) = 0;
HIBYTE(v174) = 50;
v12 = 25;
goto LABEL_15;
case 6u:
v171[0] = -91;
qmemcpy(&v171[1], "T3", 2);
LOWORD(v173) = 25251;
BYTE2(v173) = 70;
v174 = -7939;
v12 = -96;
goto LABEL_15;
case 7u:
v171[0] = -26;
memset(&v171[1], 34, 2);
v12 = 0;
*(_WORD *)((char *)&v173 + 1) = 0;
HIBYTE(v174) = 0;
goto LABEL_15;
case 8u:
v171[0] = -52;
v171[1] = -52;
v171[2] = -52;
LOWORD(v173) = -32640;
BYTE2(v173) = 0x80;
break;
case 9u:
v171[0] = -1;
v171[1] = -78;
LOWORD(v173) = -1281;
v171[2] = 79;
BYTE2(v173) = 127;
v12 = -64;
goto LABEL_15;
case 0xAu:
v171[0] = -62;
v171[1] = 69;
v171[2] = -103;
LOWORD(v173) = 100;
HIBYTE(v174) = 0;
v12 = 125;
LABEL_15:
v175 = v12;
break;
default:
break;
}
BYTE1(v172) = (unsigned int)(float)((float)v171[1] * 0.22);
BYTE2(v172) = (unsigned int)(float)((float)v171[2] * 0.22);
LOBYTE(v172) = (unsigned int)(float)((float)v171[0] * 0.22);
}
else
{
v195 = 0;
v196 = 0;
v197 = nullptr;
std::string::__init(&v195, "pathInnerBG_001.png", 0x13u);
v11 = (float *)CCSpriteGrayscale::createWithSpriteFrameName((char *)&v195);
std::string::~string((int)&v195);
CCSpriteWithHue::setEvenLuminance(v11, 2.5);
}
(*(void (__fastcall **)(_DWORD, float *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v11, -1);
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v11 + 80))(v11, 1067869798);
v13 = *(void (__fastcall **)(float *, int *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, v178 * 0.5, v179 * 0.5);
v13(v11, &v189);
v14 = *(float *)(*(int (__fastcall **)(float *))(*(_DWORD *)v11 + 164))(v11);
v15 = v14 * COERCE_FLOAT((*(int (__fastcall **)(float *))(*(_DWORD *)v11 + 84))(v11));
v16 = *(float *)((*(int (__fastcall **)(float *))(*(_DWORD *)v11 + 164))(v11) + 4);
v17 = COERCE_FLOAT((*(int (__fastcall **)(float *))(*(_DWORD *)v11 + 84))(v11));
(*(void (__fastcall **)(float *, _BYTE *))(*(_DWORD *)v11 + 480))(v11, v171);
*((_DWORD *)this + 125) = -1;
v19 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"backArrowPlain_01_001.png", v18);
v185 = 0;
v184 = GJPathPage::onBack;
v20 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v19, 0, (int)this, (int)GJPathPage::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v20, 1.6);
v21 = cocos2d::CCMenu::create(v20, nullptr);
v22 = v15 * 0.5;
v23 = v179;
v24 = (float)(v16 * v17) * 0.5;
v25 = (float)(v178 * 0.5) - v22;
*((_DWORD *)this + 111) = v21;
v26 = v21;
v27 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v21 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, v25 + 12.0, (float)(v24 + (float)(v23 * 0.5)) - 12.0);
v27(v26, &v189);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 111),
10);
memset(v194, 0, sizeof(v194));
std::string::__init(v194, "Paths of Power", 0xEu);
v195 = 0;
v196 = 0;
v197 = nullptr;
std::string::__init(
&v195,
"When you activate a path, Stars and Moons you collect will level up your Path. You"
" can unlock multiple paths, but only one can be active at a time.",
0xC3u);
v28 = InfoAlertButton::create((char *)v194, (int)&v195, 1061997773);
std::string::~string((int)&v195);
std::string::~string((int)v194);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v28);
v29 = *((const cocos2d::CCPoint **)this + 111);
v30 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v28 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v188,
(float)(v22 + (float)(v178 * 0.5)) - 14.0,
(float)(v24 + (float)(v179 * 0.5)) - 14.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v189, v29);
v30(v28, &v189);
v32 = GJPathSprite::create(*((GJPathSprite **)this + 133), v31);
GJPathSprite::updateState((GJPathSprite *)v32);
(*(void (__fastcall **)(_DWORD, int *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v32, 1);
(*(void (__fastcall **)(int *, int))(*v32 + 80))(v32, 1065353216);
v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"pathLabel_%02d_001.png", a2);
CString = (const char *)cocos2d::CCString::getCString(v33);
v191[0] = 0;
v191[1] = 0;
v192 = nullptr;
v35 = CString;
v36 = strlen(CString);
std::string::__init(v191, v35, v36);
if ( isItemUnlocked )
{
if ( (v191[0] & 1) != 0 )
v38 = v192;
else
v38 = (cocos2d::CCSprite *)((char *)v191 + 1);
v39 = (float *)cocos2d::CCSprite::createWithSpriteFrameName(v38, v37);
}
else
{
v40 = (cocos2d::CCSprite *)(LOBYTE(v191[0]) << 31);
if ( (v191[0] & 1) == 0 )
v40 = (cocos2d::CCSprite *)((char *)v191 + 1);
v193[0] = 0;
if ( (v191[0] & 1) != 0 )
v40 = v192;
v193[1] = 0;
v193[2] = 0;
v41 = strlen((const char *)v40);
std::string::__init(v193, v40, v41);
v39 = (float *)CCSpriteGrayscale::createWithSpriteFrameName((char *)v193);
std::string::~string((int)v193);
if ( (unsigned int)(a2 - 2) > 8 )
v42 = 3.0;
else
v42 = *(float *)&word_BEFE78[2 * (_DWORD)(a2 - 2) + 16];
CCSpriteWithHue::setEvenLuminance(v39, v42);
v43 = *(void (__fastcall **)(float *, int *))(*(_DWORD *)v39 + 480);
memset(&v189, 100, 3);
v43(v39, &v189);
}
(*(void (__fastcall **)(_DWORD, float *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v39, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v180, v178 * 0.5, (float)(v24 + (float)(v179 * 0.5)) - 8.0);
v44 = *(float *)(*(int (__fastcall **)(int *))(*v32 + 164))(v32);
v45 = (float *)(*(int (__fastcall **)(float *))(*(_DWORD *)v39 + 164))(v39);
v46 = *(void (__fastcall **)(int *, int *))(*v32 + 92);
v47 = (float)(v44 + *v45) + 10.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, (float)(v47 * 0.5) - (float)(v44 * 0.5), 0.0);
cocos2d::CCPoint::operator+(&v189, v180, v188);
v46(v32, &v189);
v48 = *(void (__fastcall **)(float *, int *))(*(_DWORD *)v39 + 92);
v49 = (float *)(*(int (__fastcall **)(float *))(*(_DWORD *)v39 + 164))(v39);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, (float)(*v49 * 0.5) - (float)(v47 * 0.5), -2.0);
cocos2d::CCPoint::operator+(&v189, v180, v188);
v48(v39, &v189);
v50 = (float)(v178 * 0.5) - 170.0;
v51 = (float)(v179 * 0.5) + 0.0;
v53 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"playerSquare_001.png", v52);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v181,
(float)(v178 * 0.5) - 170.0,
(float)((float)((float)(v179 * 0.5) - v24) + 30.0) + 10.0);
v55 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v54);
v56 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v55 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, 0.0, 0.5);
v56(v55, &v189);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v55 + 92))(v55, v181);
(*(void (__fastcall **)(_DWORD, int, _DWORD))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v55, 0);
v57 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v55 + 64);
v58 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v55 + 164))(v55);
v57(v55, 340.0 / *v58);
v59 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v55 + 72);
v60 = (*(int (__fastcall **)(int))(*(_DWORD *)v55 + 164))(v55);
v59(v55, 5.0 / *(float *)(v60 + 4));
v61 = (GameStatsManager *)(*(int (__fastcall **)(int, int *))(*(_DWORD *)v55 + 480))(v55, &v172);
v62 = (GameStatsManager *)GameStatsManager::sharedState(v61);
StatFromKey = (GameStatsManager *)GameStatsManager::getStatFromKey(v62, (int)(a2 + 29), v63, v64);
if ( (int)StatFromKey >= 1000 )
{
v164 = (_BYTE *)(&stru_3DC + 12);
}
else
{
v67 = (GameStatsManager *)GameStatsManager::sharedState(StatFromKey);
v164 = (char *)GameStatsManager::getStatFromKey(v67, (int)(a2 + 29), v68, v69);
}
v70 = (float)(int)v164 / 1000.0;
if ( v70 >= 1.0 )
{
v70 = 1.0;
}
else if ( v70 <= 0.0 )
{
LABEL_35:
v71 = 0;
for ( i = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"geometry.ach.path%02d.%02d",
a2,
0);
;
i = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"geometry.ach.path%02d.%02d",
a2,
v71) )
{
v80 = (const char *)cocos2d::CCString::getCString(i);
v195 = 0;
v196 = 0;
v197 = nullptr;
v81 = strlen(v80);
v82 = (GameManager *)std::string::__init(&v195, v80, v81);
v176 = 0;
v177 = 0;
v83 = (AchievementManager *)GameManager::sharedState(v82);
std::string::basic_string(v194, (int)&v195);
GameManager::getUnlockForAchievement(v83, (int)v194, &v176, &v177);
std::string::~string((int)v194);
if ( !v177 )
{
v177 = 1;
v176 = 1;
}
v84 = GJItemIcon::create(v177, v176, v173, v174, 0, 1u, 1);
if ( v84 )
{
v86 = COERCE_FLOAT(GJItemIcon::scaleForType(1));
(*(void (__fastcall **)(int *, float))(*v84 + 80))(v84, COERCE_FLOAT(LODWORD(v86)));
v187 = 0;
v186 = GJPathPage::onIconInfo;
v87 = CCMenuItemSpriteExtra::create((int)v84, 0, (int)this, (int)GJPathPage::onIconInfo, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v87);
v88 = *(void (__fastcall **)(int, int))(*(_DWORD *)v87 + 160);
v89 = (*(int (__fastcall **)(int))(*(_DWORD *)v53 + 164))(v53);
v88(v87, v89);
v166 = *(void (__fastcall **)(int *, int *))(*v84 + 92);
v90 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v87 + 164))(v87);
v91 = 0.5;
v92 = (*(int (__fastcall **)(int))(*(_DWORD *)v87 + 164))(v87);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, v90 * 0.5, *(float *)(v92 + 4) * 0.5);
v166(v84, &v189);
v93 = (AchievementManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v87 + 36))(v87, v71);
if ( !v71 && isItemUnlocked
|| ((v94 = (AchievementManager *)AchievementManager::sharedState(v93), (v195 & 1) != 0)
? (v95 = v197)
: (v95 = (cocos2d::CCLabelBMFont *)((char *)&v195 + 1)),
AchievementManager::isAchievementEarned(v94, (const char *)v95)) )
{
v161 = 1;
}
else
{
GJItemIcon::changeToLockedState((GJItemIcon *)v84, 1.0 / v86);
GJItemIcon::darkenStoreItem((int)v84, v172, v160);
v161 = 0;
}
v167 = v161;
v141 = (float)v71;
if ( (v71 & 1) != 0 )
v91 = 0.0;
v168 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v87 + 92);
v169 = *((cocos2d::CCPoint **)this + 111);
v142 = v50 + (float)(v141 * 34.0);
v170 = *((cocos2d::CCPoint **)this + 115);
if ( (v71 & 1) != 0 )
v143 = v51 + v91;
else
v143 = v51;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v183, v50 + (float)(v141 * 34.0), v143 + 10.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v188, v170);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v189, v169);
v168(v87, &v189);
v145 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v144);
v146 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v145 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, 0.5, 1.0);
v146(v145, &v189);
v147 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v145 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, v142, (float)(v143 - 17.0) + 10.0);
v147(v145, &v189);
v148 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v145 + 64);
v149 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v145 + 164))(v145);
v148(v145, 1.5 / *v149);
v150 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v145 + 72);
v151 = (*(int (__fastcall **)(int))(*(_DWORD *)v145 + 164))(v145);
v150(v145, 16.0 / *(float *)(v151 + 4));
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v145 + 480))(v145, &unk_BEFE7B);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v145 + 456))(v145, 25);
(*(void (__fastcall **)(_DWORD, int, _DWORD))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
v145,
0);
v153 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"smallDot.png", v152);
v154 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v153 + 92);
v155 = (*(int (__fastcall **)(int))(*(_DWORD *)v55 + 96))(v55);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, v142, *(float *)(v155 + 4));
v154(v153, &v189);
(*(void (__fastcall **)(int, int *))(*(_DWORD *)v153 + 480))(v153, &v172);
(*(void (__fastcall **)(_DWORD, int, _DWORD))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
v153,
0);
if ( v167 )
{
v157 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"smallDot.png", v156);
v158 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v157 + 92);
v159 = (*(int (__fastcall **)(int))(*(_DWORD *)v55 + 96))(v55);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, v142, *(float *)(v159 + 4));
v158(v157, &v189);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v157 + 480))(v157, v171);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v157 + 80))(v157, 1060320051);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
v157,
1);
}
}
++v71;
std::string::~string((int)&v195);
if ( v71 == 11 )
break;
}
if ( isItemUnlocked )
{
v112 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i/%i", v164, 1000);
v113 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v112);
v115 = cocos2d::CCLabelBMFont::create(v113, "goldFont.fnt", v114);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v115 + 80))(v115, 1058642330);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v115, 1);
v116 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v115 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v189,
(float)(v178 * 0.5) - 12.0,
(float)((float)((float)(v179 * 0.5) - v24) + 12.0) + 7.0);
v116(v115, &v189);
v118 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_starsIcon_001.png", v117);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v118, 1);
v119 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v118 + 92);
v120 = (*(int (__fastcall **)(int))(*(_DWORD *)v115 + 96))(v115);
v121 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v115 + 164))(v115);
v122 = (float)(v121 * (*(float (__fastcall **)(int))(*(_DWORD *)v115 + 84))(v115)) * 0.5 + 7.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, v122, -1.5);
cocos2d::CCPoint::operator+(&v189, v120, v188);
v119(v118, &v189);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v118 + 80))(v118, 1056964608);
v124 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_moonsIcon_001.png", v123);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v124, 1);
v125 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v124 + 92);
v126 = (*(int (__fastcall **)(int))(*(_DWORD *)v118 + 96))(v118);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, 12.0, 0.0);
cocos2d::CCPoint::operator+(&v189, v126, v188);
v125(v124, &v189);
v127 = (GameStatsManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v124 + 80))(v124, 1057803469);
if ( v70 < 1.0 )
{
v128 = (GameStatsManager *)GameStatsManager::sharedState(v127);
GameStatsManager::trySelectActivePath(v128, v129, v130, v131);
v132 = *((_DWORD *)this + 133) + 29;
v195 = 0;
v196 = 0;
v197 = nullptr;
v133 = (GameStatsManager *)std::string::__init(&v195, "Active", 6u);
v190 = 0;
v189 = (int)GJPathPage::onActivatePath;
v134 = GameStatsManager::sharedState(v133);
v135 = *((const cocos2d::CCPoint **)this + 111);
v136 = *(_DWORD *)(v134 + 572) == v132;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v183,
(float)((float)(v178 * 0.5) - v22) + 17.0,
(float)((float)(v179 * 0.5) - v24) - 8.0);
v137 = *((_DWORD *)this + 115);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, 6.0, 0.5);
GameToolbox::createToggleButton(
(int)&v195,
v189,
v190,
v136,
v135,
(int)v183,
(int)this,
v137,
0.6,
0.5,
100.0,
(int)v188,
"goldFont.fnt",
0,
0,
nullptr);
std::string::~string((int)&v195);
goto LABEL_61;
}
}
else
{
v96 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_lock_001.png", v85);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v96 + 80))(v96, 1067030938);
v188[1] = 0;
v188[0] = GJPathPage::onUnlock;
v97 = CCMenuItemSpriteExtra::create(v96, 0, (int)this, (int)GJPathPage::onUnlock, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v97);
v98 = *((const cocos2d::CCPoint **)this + 111);
v99 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v97 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v183, v178 * 0.5, (float)((float)(v179 * 0.5) - v24) + 15.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v189, v98);
v99(v97, &v189);
GameToolbox::pointsToString((GameToolbox *)&v195, 0x61A8u);
if ( (v195 & 1) != 0 )
v100 = v197;
else
v100 = (cocos2d::CCLabelBMFont *)((char *)&v195 + 1);
v101 = cocos2d::CCLabelBMFont::create(v100, "bigFont.fnt", (const char *)((unsigned __int8)v195 << 31));
(*(void (__fastcall **)(int, int))(*(_DWORD *)v96 + 228))(v96, v101);
v102 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v101 + 92);
v103 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v96 + 164))(v96);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, (float)(*v103 * 0.5) - 4.0, -6.5);
v102(v101, &v189);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v101 + 80))(v101, 1051931443);
v105 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"currencyOrbIcon_001.png", v104);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v96 + 228))(v96, v105);
v106 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v105 + 92);
v107 = (*(int (__fastcall **)(int))(*(_DWORD *)v101 + 96))(v101);
v108 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v101 + 164))(v101);
v109 = (float)((float)(v108 * 0.5) * COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v101 + 84))(v101)))
+ 6.0;
v110 = 1.0;
if ( a2 != byte_4 )
v110 = 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v183, v109 + v110, -0.5);
cocos2d::CCPoint::operator+(&v189, v107, v183);
v106(v105, &v189);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v105 + 80))(v105, 1056964608);
std::string::~string((int)&v195);
}
if ( v70 >= 1.0 )
{
LABEL_60:
std::string::~string((int)v191);
return v165;
}
LABEL_61:
v138 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"chestIcon_001.png", v111);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v138, 3);
(*(void (__fastcall **)(int, int *))(*(_DWORD *)v138 + 480))(v138, &v172);
v139 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v138 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v183, (float)(v22 + (float)(v178 * 0.5)) - 28.5, v182);
v139(v138, v183);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v138 + 456))(v138, 200);
goto LABEL_60;
}
v73 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v66);
v74 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v73 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v189, 0.0, 0.5);
v74(v73, &v189);
v75 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v73 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, 2.0, 0.0);
cocos2d::CCPoint::operator+(&v189, v181, v188);
v75(v73, &v189);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v73, 1);
v76 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v73 + 64);
v77 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v73 + 164))(v73);
v76(v73, (float)(v70 * 336.0) / *v77);
v78 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v73 + 72);
v79 = (*(int (__fastcall **)(int))(*(_DWORD *)v73 + 164))(v73);
v78(v73, 2.0 / *(float *)(v79 + 4));
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v73 + 480))(v73, v171);
goto LABEL_35;
}
return v165;
}