//
// GJGarageLayer::init from 0x50fed8 to 0x510fb4 (4316 bytes)
//
// 1 xrefs:
// > GJGarageLayer::node @ 0x50b088
//
// 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:51:32 +0000
//
int __fastcall GJGarageLayer::init(GJGarageLayer *this)
{
GameManager *v2; // r0
GameManager *v3; // r0
cocos2d::CCDirector *v4; // r0
float v5; // s18
const char *v6; // r1
float *v7; // r6
void (__fastcall *v8)(float *, _DWORD *); // r8
void (__fastcall *v9)(float *, _DWORD *); // r8
void (__fastcall *v10)(float *, _DWORD *); // r2
const char *v11; // r1
cocos2d::CCSprite *v12; // r6
int (__fastcall *v13)(cocos2d::CCSprite *, _DWORD *); // r9
cocos2d::CCDirector *v14; // r0
void (__fastcall *v15)(cocos2d::CCSprite *, _DWORD *); // r9
cocos2d::CCDirector *v16; // r0
float v17; // s19
cocos2d::CCDirector *v18; // r0
float v19; // r0
const char *v20; // r1
int v21; // r6
int (__fastcall *v22)(int, _DWORD *); // r9
cocos2d::CCDirector *v23; // r0
char *v24; // r9
cocos2d::CCDirector *v25; // r0
float v26; // s19
cocos2d::CCDirector *v27; // r0
float v28; // r0
const char *v29; // r1
cocos2d::CCSprite *v30; // r6
int (__fastcall *v31)(cocos2d::CCSprite *, _DWORD *); // r8
cocos2d::CCDirector *v32; // r0
void (__fastcall *v33)(cocos2d::CCSprite *, _DWORD *); // r8
cocos2d::CCDirector *v34; // r0
float v35; // s19
cocos2d::CCDirector *v36; // r0
float v37; // r0
GJAccountManager *v38; // r0
int v39; // r0
char *v40; // r3
int *v41; // r0
int v42; // r3
cocos2d::CCDirector *v43; // r0
float v44; // s19
int v45; // r6
void (__fastcall *v46)(int, _DWORD *); // r7
cocos2d::CCDirector *v47; // r0
float v48; // r0
int v49; // r7
GJAccountManager *v50; // r0
GameManager *v51; // r0
int v52; // r8
int v53; // r0
size_t v54; // r0
const char *v55; // r1
int v56; // r6
const cocos2d::CCSize *v57; // r0
void (__fastcall *v58)(int, _DWORD *); // r8
int v59; // r9
const char *v60; // r1
int v61; // r0
_BOOL4 v62; // r8
GameManager *v63; // r0
int v64; // r8
int v65; // r0
size_t v66; // r0
int v67; // r6
void (__fastcall *v68)(int, _DWORD *); // r8
int v69; // r9
int v70; // r6
void (__fastcall *v71)(int, _DWORD *); // r7
int (__fastcall *v72)(int, int, int, _DWORD *); // r7
GameManager *v73; // r0
int v74; // r0
int v75; // r1
cocos2d::CCSprite *v76; // r0
int v77; // r3
GameManager *SpiderSprite; // r0
int v79; // r7
void (__fastcall *v80)(int, _DWORD); // r8
float v81; // r1
int v82; // r7
void (__fastcall *v83)(int, _DWORD *); // r8
int v84; // r9
float v85; // r0
int v86; // r1
int v87; // r2
int v88; // r3
GameManager *updated; // r0
GameManager *v90; // r0
int v91; // r5
int v92; // r0
int v93; // r2
int v94; // r1
int v95; // r3
int v96; // r0
int v97; // r1
int v98; // r5
int v99; // r0
int v100; // r1
int v101; // r3
int v102; // r5
int v103; // r0
int v104; // r1
int v105; // r3
int v106; // r5
int v107; // r0
int v108; // r1
int v109; // r3
int v110; // r5
int v111; // r0
int v112; // r1
int v113; // r3
int v114; // r5
int v115; // r0
int v116; // r1
int v117; // r3
int v118; // r5
int v119; // r0
int v120; // r1
int v121; // r3
int v122; // r5
int v123; // r0
int v124; // r1
int v125; // r3
const char *v126; // r1
int v127; // r0
const cocos2d::CCPoint *v128; // r8
cocos2d::CCDirector *v129; // r0
void (__fastcall *v130)(const cocos2d::CCPoint *, _DWORD *); // r6
cocos2d::CCDirector *v131; // r0
float v132; // s16
cocos2d::CCDirector *v133; // r0
float v134; // r0
const char *v135; // r1
int v136; // r0
_DWORD *v137; // r10
void (__fastcall *v138)(_DWORD *, _DWORD *); // r9
const char *v139; // r1
int v140; // r0
int v141; // r10
void (__fastcall *v142)(int, _DWORD *); // r9
const char *v143; // r1
int v144; // r0
int v145; // r10
void (__fastcall *v146)(int, _DWORD *); // r9
const char *v147; // r1
int v148; // r10
cocos2d::CCDirector *v149; // r0
int (__fastcall *v150)(int, _DWORD *); // r9
cocos2d::CCDirector *v151; // r0
float v152; // s16
cocos2d::CCDirector *v153; // r0
float v154; // r0
GameStatsManager *v155; // r0
GameStatsManager *v156; // r0
const char *Stat; // r0
cocos2d::CCString *v158; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v160; // r2
int v161; // r9
const char *v162; // r1
int v163; // r9
int v164; // r10
GameStatsManager *v165; // r0
GameStatsManager *v166; // r0
const char *v167; // r0
cocos2d::CCString *v168; // r0
cocos2d::CCLabelBMFont *v169; // r0
const char *v170; // r2
int v171; // r10
const char *v172; // r1
int v173; // r10
int v174; // r9
GameStatsManager *v175; // r0
GameStatsManager *v176; // r0
const char *v177; // r0
cocos2d::CCString *v178; // r0
cocos2d::CCLabelBMFont *v179; // r0
const char *v180; // r2
int v181; // r9
const char *v182; // r1
int v183; // r9
int v184; // r10
GameStatsManager *v185; // r0
GameStatsManager *v186; // r0
const char *v187; // r0
cocos2d::CCString *v188; // r0
cocos2d::CCLabelBMFont *v189; // r0
const char *v190; // r2
int v191; // r10
const char *v192; // r1
int v193; // r10
int v194; // r9
GameStatsManager *v195; // r0
GameStatsManager *v196; // r0
const char *v197; // r0
cocos2d::CCString *v198; // r0
cocos2d::CCLabelBMFont *v199; // r0
const char *v200; // r2
int v201; // r9
const char *v202; // r1
int v203; // r9
int v204; // r10
GameStatsManager *v205; // r0
GameStatsManager *v206; // r0
const char *v207; // r0
cocos2d::CCString *v208; // r0
cocos2d::CCLabelBMFont *v209; // r0
const char *v210; // r2
int v211; // r10
const char *v212; // r1
int v213; // r10
int v214; // r9
GameStatsManager *v215; // r0
GameStatsManager *v216; // r0
const char *v217; // r0
cocos2d::CCString *v218; // r0
cocos2d::CCLabelBMFont *v219; // r0
const char *v220; // r2
int v221; // r9
int v222; // r10
GameManager *v223; // r0
PlatformToolbox *v224; // r0
const char *v225; // r1
int v226; // r5
int v227; // r7
cocos2d::CCDirector *v228; // r0
int (__fastcall *v229)(int, _BYTE *); // r9
cocos2d::CCDirector *v230; // r0
float v231; // s16
cocos2d::CCDirector *v232; // r0
float v233; // r0
cocos2d::CCMenuItem *v234; // r2
int isControllerConnected; // r5
const char *v237; // [sp+8h] [bp-8Ch]
cocos2d::CCString *v238; // [sp+Ch] [bp-88h]
cocos2d::CCString *v239; // [sp+Ch] [bp-88h]
GameManager *v240; // [sp+14h] [bp-80h]
cocos2d::CCLayer *v241; // [sp+18h] [bp-7Ch]
void (__fastcall *v242)(int, _DWORD *); // [sp+20h] [bp-74h]
int v243; // [sp+20h] [bp-74h]
int (__fastcall *v244)(int, _DWORD *); // [sp+20h] [bp-74h]
void (__fastcall *v245)(int, _DWORD *); // [sp+20h] [bp-74h]
int v246; // [sp+20h] [bp-74h]
void (__fastcall *v247)(int, _DWORD *); // [sp+20h] [bp-74h]
void (__fastcall *v248)(int, _DWORD *); // [sp+20h] [bp-74h]
int v249; // [sp+20h] [bp-74h]
void (__fastcall *v250)(int, _DWORD *); // [sp+20h] [bp-74h]
void (__fastcall *v251)(int, _DWORD *); // [sp+20h] [bp-74h]
int v252; // [sp+20h] [bp-74h]
int (__fastcall *v253)(int, _DWORD *); // [sp+20h] [bp-74h]
void (__fastcall *v254)(int, _DWORD *); // [sp+20h] [bp-74h]
int v255; // [sp+20h] [bp-74h]
int (__fastcall *v256)(int, _DWORD *); // [sp+20h] [bp-74h]
void (__fastcall *v257)(int, _DWORD *); // [sp+20h] [bp-74h]
int v258; // [sp+20h] [bp-74h]
int (__fastcall *v259)(int, _DWORD *); // [sp+20h] [bp-74h]
void (__fastcall *v260)(int, _DWORD *); // [sp+24h] [bp-70h]
void (__fastcall *v261)(int, _DWORD *); // [sp+24h] [bp-70h]
void (__fastcall *v262)(int, _DWORD *); // [sp+24h] [bp-70h]
void (__fastcall *v263)(int, _DWORD *); // [sp+24h] [bp-70h]
void (__fastcall *v264)(int, _DWORD *); // [sp+24h] [bp-70h]
void (__fastcall *v265)(int, _DWORD *); // [sp+24h] [bp-70h]
int v266; // [sp+28h] [bp-6Ch]
float v267; // [sp+2Ch] [bp-68h] BYREF
float v268; // [sp+30h] [bp-64h]
_DWORD v269[2]; // [sp+34h] [bp-60h] BYREF
_BYTE v270[8]; // [sp+3Ch] [bp-58h] BYREF
_BYTE v271[8]; // [sp+44h] [bp-50h] BYREF
int (__fastcall *v272)(int, cocos2d::CCObject *); // [sp+4Ch] [bp-48h]
int v273; // [sp+50h] [bp-44h]
int (__fastcall *v274)(GJGarageLayer *, cocos2d::CCObject *); // [sp+54h] [bp-40h]
int v275; // [sp+58h] [bp-3Ch]
float v276[2]; // [sp+5Ch] [bp-38h] BYREF
_DWORD v277[2]; // [sp+64h] [bp-30h] BYREF
_DWORD v278[2]; // [sp+6Ch] [bp-28h] BYREF
int v279[2]; // [sp+74h] [bp-20h] BYREF
char *v280; // [sp+7Ch] [bp-18h]
int v281; // [sp+80h] [bp-14h] BYREF
int v282; // [sp+84h] [bp-10h]
int v283; // [sp+88h] [bp-Ch]
v2 = (GameManager *)cocos2d::CCLayer::init(this);
v240 = v2;
if ( v2 )
{
v3 = (GameManager *)GameManager::sharedState(v2);
*((_BYTE *)v3 + 424) = 1;
*(_DWORD *)(GameManager::sharedState(v3) + 508) = 0;
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 536))(this, 1);
v4 = (cocos2d::CCDirector *)(*(int (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 544))(this, 1);
cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v267);
v5 = (float)(v268 * 0.5) + 50.0;
v7 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v6);
v8 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v7 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 0.0, 0.0);
v8(v7, v278);
(*(void (__fastcall **)(GJGarageLayer *, float *, int))(*(_DWORD *)this + 232))(this, v7, -2);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v7 + 64))(v7, (float)(v267 + 10.0) / v7[86]);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v7 + 72))(v7, (float)(v268 + 10.0) / v7[87]);
v9 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, -5.0, -5.0);
v9(v7, v278);
v10 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v7 + 480);
LOWORD(v278[0]) = -26986;
BYTE2(v278[0]) = -106;
v10(v7, v278);
v12 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_sideArt_001.png",
v11);
v13 = *(int (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v12 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 0.0, 1.0);
v14 = (cocos2d::CCDirector *)v13(v12, v278);
v15 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v12 + 92);
v16 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);
v17 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v16));
v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v17));
v19 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v18));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, v17 - 1.0, v19 + 1.0);
v15(v12, v278);
cocos2d::CCSprite::setFlipY(v12, 1);
(*(void (__fastcall **)(GJGarageLayer *, cocos2d::CCSprite *, int))(*(_DWORD *)this + 232))(this, v12, -1);
v21 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_sideArt_001.png", v20);
v22 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v21 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 0.0, 0.0);
v23 = (cocos2d::CCDirector *)v22(v21, v278);
v24 = *(char **)(*(_DWORD *)v21 + 92);
v25 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v23);
v26 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v25));
v27 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v26));
v28 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v27));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, v26 - 1.0, v28 - 1.0);
((void (__fastcall *)(int, _DWORD *))v24)(v21, v278);
(*(void (__fastcall **)(GJGarageLayer *, int, int))(*(_DWORD *)this + 232))(this, v21, 1);
v30 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_sideArt_001.png",
v29);
v31 = *(int (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v30 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.0);
v32 = (cocos2d::CCDirector *)v31(v30, v278);
v33 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v30 + 92);
v34 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v32);
v35 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v34));
v36 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v35));
v37 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v36));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, v35 + 1.0, v37 - 1.0);
v33(v30, v278);
cocos2d::CCSprite::setFlipX(v30, 1);
v38 = (GJAccountManager *)(*(int (__fastcall **)(GJGarageLayer *, cocos2d::CCSprite *, int))(*(_DWORD *)this + 232))(
this,
v30,
1);
v39 = GJAccountManager::sharedState(v38);
if ( *(_DWORD *)(v39 + 280) == *(_DWORD *)(v39 + 284) )
v40 = "bigFont.fnt";
else
v40 = "goldFont.fnt";
v41 = CCTextInputNode::create(
(CCTextInputNode *)0x43340000,
50.0,
"Player",
"Thonburi",
(const char *)&dword_18,
v40,
v237);
v42 = *(_DWORD *)this;
*((_DWORD *)this + 86) = v41;
v43 = (cocos2d::CCDirector *)(*(int (__fastcall **)(GJGarageLayer *, int *, int))(v42 + 232))(this, v41, 20);
v44 = v267;
*(_DWORD *)(*((_DWORD *)this + 86) + 420) = (char *)this + 316;
v45 = *((_DWORD *)this + 86);
v46 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v45 + 92);
v47 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v43);
v48 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v47));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, v44 * 0.5, v48 - 34.0);
v46(v45, v278);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 86) + 416) + 172))(
*(_DWORD *)(*((_DWORD *)this + 86) + 416),
0);
*(_DWORD *)(*((_DWORD *)this + 86) + 424) = 15;
LOWORD(v266) = -21896;
BYTE2(v266) = -16;
CCTextInputNode::setLabelPlaceholderColor(*((_DWORD *)this + 86), v266);
CCTextInputNode::setLabelPlaceholderScale(*((_DWORD *)this + 86), 0.7);
v49 = *((_DWORD *)this + 86);
v281 = 0;
v282 = 0;
v283 = 0;
std::string::__init(&v281, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 0x3Eu);
CCTextInputNode::setAllowedChars(v49, (unsigned __int8 *)&v281);
v50 = (GJAccountManager *)std::string::~string((int)&v281);
v51 = (GameManager *)GJAccountManager::sharedState(v50);
if ( *((_DWORD *)v51 + 70) == *((_DWORD *)v51 + 71) )
{
v61 = GameManager::sharedState(v51);
std::string::basic_string(v279, v61 + 448);
v281 = 0;
v282 = 0;
v283 = 0;
std::string::__init(&v281, &unk_B6B226, 0);
v62 = sub_50AA62((unsigned __int8 *)v279, (unsigned __int8 *)&v281);
std::string::~string((int)&v281);
v63 = (GameManager *)std::string::~string((int)v279);
if ( !v62 )
{
v64 = *((_DWORD *)this + 86);
v65 = GameManager::sharedState(v63);
std::string::basic_string(v279, v65 + 448);
if ( (v279[0] & 1) == 0 )
v24 = (char *)v279 + 1;
v281 = 0;
if ( (v279[0] & 1) != 0 )
v24 = v280;
v282 = 0;
v283 = 0;
v66 = strlen(v24);
std::string::__init(&v281, v24, v66);
CCTextInputNode::setString(v64, (int)&v281);
std::string::~string((int)&v281);
v63 = (GameManager *)std::string::~string((int)v279);
}
if ( !*(_BYTE *)(GameManager::sharedState(v63) + 729) )
{
v67 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_nameTxt_001.png", v60);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v67);
v68 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v67 + 92);
v69 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 86) + 96))(*((_DWORD *)this + 86));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v277, 115.0, 10.0);
cocos2d::CCPoint::operator+(v278, v69, v277);
v68(v67, v278);
}
}
else
{
v52 = *((_DWORD *)this + 86);
v53 = GJAccountManager::sharedState(v51);
std::string::basic_string(v279, v53 + 268);
if ( (v279[0] & 1) == 0 )
v24 = (char *)v279 + 1;
v281 = 0;
if ( (v279[0] & 1) != 0 )
v24 = v280;
v282 = 0;
v283 = 0;
v54 = strlen(v24);
std::string::__init(&v281, v24, v54);
CCTextInputNode::setString(v52, (int)&v281);
std::string::~string((int)&v281);
std::string::~string((int)v279);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 86) + 500))(*((_DWORD *)this + 86), 0);
v56 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_lockGray_001.png", v55);
(*(void (__fastcall **)(GJGarageLayer *, int, int))(*(_DWORD *)this + 232))(this, v56, 2);
v57 = (const cocos2d::CCSize *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*((_DWORD *)this + 86) + 428) + 164))(*(_DWORD *)(*((_DWORD *)this + 86) + 428));
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v276, v57);
v58 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v56 + 92);
v59 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 86) + 96))(*((_DWORD *)this + 86));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v277, (float)(v276[0] * 0.5) + 8.0, 10.0);
cocos2d::CCPoint::operator+(v278, v59, v277);
v58(v56, v278);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v56 + 80))(v56, 1058642330);
}
v70 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"floorLine_001.png", v60);
(*(void (__fastcall **)(GJGarageLayer *, int, _DWORD))(*(_DWORD *)this + 232))(this, v70, 0);
v71 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v70 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, v267 * 0.5, v5);
v71(v70, v278);
v72 = *(int (__fastcall **)(int, int, int, _DWORD *))(*(_DWORD *)v70 + 540);
v269[0] = 770;
v269[1] = 1;
v73 = (GameManager *)v72(v70, 770, 1, v269);
v74 = GameManager::sharedState(v73);
v76 = SimplePlayer::create((SimplePlayer *)(*(_DWORD *)(v74 + 516) - *(_DWORD *)(v74 + 520)), v75);
v77 = *(_DWORD *)this;
*((_DWORD *)this + 87) = v76;
(*(void (__fastcall **)(GJGarageLayer *, cocos2d::CCSprite *, _DWORD))(v77 + 232))(this, v76, 0);
SimplePlayer::createRobotSprite(*((_DWORD *)this + 87), (GJRobotSprite *)((char *)&dword_0 + 1));
SpiderSprite = (GameManager *)SimplePlayer::createSpiderSprite(
*((_DWORD *)this + 87),
(GJSpiderSprite *)((char *)&dword_0 + 1));
v79 = *((_DWORD *)this + 87);
v80 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v79 + 80);
if ( *(_DWORD *)(GameManager::sharedState(SpiderSprite) + 716) == 8 )
v81 = 1.5;
else
v81 = 1.6;
v80(v79, LODWORD(v81));
v82 = *((_DWORD *)this + 87);
v83 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v82 + 92);
v84 = (*(int (__fastcall **)(int))(*(_DWORD *)v70 + 96))(v70);
v85 = (*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 84))(*((_DWORD *)this + 87));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v277, 0.0, (float)((float)(v85 * 30.0) * 0.5) + 1.0);
cocos2d::CCPoint::operator+(v278, v84, v277);
v83(v82, v278);
updated = GJGarageLayer::updatePlayerColors(this, v86, v87, v88);
v90 = (GameManager *)GameManager::sharedState(updated);
switch ( *((_DWORD *)v90 + 179) )
{
case 1:
v91 = *((_DWORD *)this + 87);
v92 = GameManager::sharedState(v90);
v93 = 1;
v94 = *(_DWORD *)(v92 + 528);
v95 = *(_DWORD *)(v92 + 532);
v96 = v91;
v97 = v94 - v95;
goto LABEL_31;
case 2:
v98 = *((_DWORD *)this + 87);
v99 = GameManager::sharedState(v90);
v93 = 2;
v100 = *(_DWORD *)(v99 + 540);
v101 = *(_DWORD *)(v99 + 544);
v96 = v98;
v97 = v100 - v101;
goto LABEL_31;
case 3:
v102 = *((_DWORD *)this + 87);
v103 = GameManager::sharedState(v90);
v93 = 3;
v104 = *(_DWORD *)(v103 + 552);
v105 = *(_DWORD *)(v103 + 556);
v96 = v102;
v97 = v104 - v105;
goto LABEL_31;
case 4:
v106 = *((_DWORD *)this + 87);
v107 = GameManager::sharedState(v90);
v93 = 4;
v108 = *(_DWORD *)(v107 + 564);
v109 = *(_DWORD *)(v107 + 568);
v96 = v106;
v97 = v108 - v109;
goto LABEL_31;
case 5:
v110 = *((_DWORD *)this + 87);
v111 = GameManager::sharedState(v90);
v93 = 5;
v112 = *(_DWORD *)(v111 + 576);
v113 = *(_DWORD *)(v111 + 580);
v96 = v110;
v97 = v112 - v113;
goto LABEL_31;
case 6:
v114 = *((_DWORD *)this + 87);
v115 = GameManager::sharedState(v90);
v93 = 6;
v116 = *(_DWORD *)(v115 + 588);
v117 = *(_DWORD *)(v115 + 592);
v96 = v114;
v97 = v116 - v117;
goto LABEL_31;
case 7:
v118 = *((_DWORD *)this + 87);
v119 = GameManager::sharedState(v90);
v93 = 7;
v120 = *(_DWORD *)(v119 + 600);
v121 = *(_DWORD *)(v119 + 604);
v96 = v118;
v97 = v120 - v121;
goto LABEL_31;
case 8:
v122 = *((_DWORD *)this + 87);
v123 = GameManager::sharedState(v90);
v93 = 8;
v124 = *(_DWORD *)(v123 + 684);
v125 = *(_DWORD *)(v123 + 688);
v96 = v122;
v97 = v124 - v125;
LABEL_31:
SimplePlayer::updatePlayerFrame(v96, v97, v93);
break;
default:
break;
}
GJGarageLayer::setupIconSelect(this);
v127 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v126);
v273 = 0;
v272 = GJGarageLayer::onBack;
v241 = (cocos2d::CCLayer *)CCMenuItemSpriteExtra::create(v127, 0, (int)this, (int)GJGarageLayer::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v241, 1.6);
v128 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v241, nullptr);
v129 = (cocos2d::CCDirector *)(*(int (__fastcall **)(GJGarageLayer *, const cocos2d::CCPoint *, int))(*(_DWORD *)this + 232))(
this,
v128,
1);
v130 = *(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v128 + 92);
v131 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v129);
v132 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v131));
v133 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v132));
v134 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v133));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, v132 + 24.0, v134 - 23.0);
v130(v128, v278);
v136 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"shopRope_001.png", v135);
v275 = 0;
v274 = GJGarageLayer::onShop;
v137 = (_DWORD *)CCMenuItemSpriteExtra::create(v136, 0, (int)this, (int)GJGarageLayer::onShop, 0);
CCMenuItemSpriteExtra::useAnimationType(v137, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 0.0, -15.0);
cocos2d::CCPoint::operator=(v137 + 89, v278);
v137[91] = 1050253722;
v137[92] = 1050253722;
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v128 + 228))(v128, v137);
v138 = *(void (__fastcall **)(_DWORD *, _DWORD *))(*v137 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v277, (float)(v267 * 0.5) - 135.0, v268 - 25.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v278, v128);
v138(v137, v278);
v140 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_shardsBtn_001.png", v139);
v276[1] = 0.0;
LODWORD(v276[0]) = GJGarageLayer::onShards;
v141 = CCMenuItemSpriteExtra::create(v140, 0, (int)this, (int)GJGarageLayer::onShards, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v128 + 228))(v128, v141);
v142 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v141 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v277, 30.0, v268 - 80.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v278, v128);
v142(v141, v278);
v144 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_paintBtn_001.png", v143);
v277[1] = 0;
v277[0] = GJGarageLayer::onPaint;
v145 = CCMenuItemSpriteExtra::create(v144, 0, (int)this, (int)GJGarageLayer::onPaint, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v128 + 228))(v128, v145);
v146 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v145 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, 30.0, v268 - 120.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v278, v128);
v146(v145, v278);
v148 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_starsIcon_001.png", v147);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v148 + 80))(v148, 1057635697);
v149 = (cocos2d::CCDirector *)(*(int (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v148);
v150 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v148 + 92);
v151 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v149);
v152 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v151));
v153 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v152));
v154 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v153));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, v152 - 18.0, v154 - 12.0);
v155 = (GameStatsManager *)v150(v148, v278);
v156 = (GameStatsManager *)GameStatsManager::sharedState(v155);
Stat = (const char *)GameStatsManager::getStat(v156, "6");
v158 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", Stat);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v158);
v161 = cocos2d::CCLabelBMFont::create(CString, "bigFont.fnt", v160);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v161);
v242 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v161 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.5);
v242(v161, v278);
v260 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v161 + 92);
v243 = (*(int (__fastcall **)(int))(*(_DWORD *)v148 + 96))(v148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, -12.0, 0.5);
cocos2d::CCPoint::operator+(v278, v243, v271);
v260(v161, v278);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v161 + 80))(v161, 1051595899);
v163 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_moonsIcon_001.png", v162);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v163 + 80))(v163, 1057635697);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v163);
v244 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v163 + 92);
v164 = (*(int (__fastcall **)(int))(*(_DWORD *)v148 + 96))(v148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, 0.0, -15.0);
cocos2d::CCPoint::operator+(v278, v164, v271);
v165 = (GameStatsManager *)v244(v163, v278);
v166 = (GameStatsManager *)GameStatsManager::sharedState(v165);
v167 = (const char *)GameStatsManager::getStat(v166, "28");
v168 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v167);
v169 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v168);
v171 = cocos2d::CCLabelBMFont::create(v169, "bigFont.fnt", v170);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v171);
v245 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v171 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.5);
v245(v171, v278);
v261 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v171 + 92);
v246 = (*(int (__fastcall **)(int))(*(_DWORD *)v163 + 96))(v163);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, -12.0, 0.5);
cocos2d::CCPoint::operator+(v278, v246, v271);
v261(v171, v278);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v171 + 80))(v171, 1051595899);
v173 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_coinsIcon_001.png", v172);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v173);
v247 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v173 + 92);
v174 = (*(int (__fastcall **)(int))(*(_DWORD *)v163 + 96))(v163);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, 0.0, -15.0);
cocos2d::CCPoint::operator+(v278, v174, v271);
v247(v173, v278);
v175 = (GameStatsManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v173 + 80))(v173, 1057132381);
v176 = (GameStatsManager *)GameStatsManager::sharedState(v175);
v177 = (const char *)GameStatsManager::getStat(v176, (const char *)&a1i2r3e45s789g[10]);
v178 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v177);
v179 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v178);
v181 = cocos2d::CCLabelBMFont::create(v179, "bigFont.fnt", v180);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v181);
v248 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v181 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.5);
v248(v181, v278);
v262 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v181 + 92);
v249 = (*(int (__fastcall **)(int))(*(_DWORD *)v173 + 96))(v173);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, -12.0, 0.5);
cocos2d::CCPoint::operator+(v278, v249, v271);
v262(v181, v278);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v181 + 80))(v181, 1051595899);
v183 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_coinsIcon2_001.png", v182);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v183);
v250 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v183 + 92);
v184 = (*(int (__fastcall **)(int))(*(_DWORD *)v173 + 96))(v173);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, 0.0, -15.0);
cocos2d::CCPoint::operator+(v278, v184, v271);
v250(v183, v278);
v185 = (GameStatsManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v183 + 80))(v183, 1057132381);
v186 = (GameStatsManager *)GameStatsManager::sharedState(v185);
v187 = (const char *)GameStatsManager::getStat(v186, "12");
v188 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v187);
v189 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v188);
v191 = cocos2d::CCLabelBMFont::create(v189, "bigFont.fnt", v190);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v191);
v251 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v191 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.5);
v251(v191, v278);
v263 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v191 + 92);
v252 = (*(int (__fastcall **)(int))(*(_DWORD *)v183 + 96))(v183);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, -12.0, 0.5);
cocos2d::CCPoint::operator+(v278, v252, v271);
v263(v191, v278);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v191 + 80))(v191, 1051595899);
v193 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"currencyOrbIcon_001.png", v192);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v193);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v193 + 80))(v193, 1057635697);
v253 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v193 + 92);
v194 = (*(int (__fastcall **)(int))(*(_DWORD *)v183 + 96))(v183);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, 0.0, -15.0);
cocos2d::CCPoint::operator+(v278, v194, v271);
v195 = (GameStatsManager *)v253(v193, v278);
v196 = (GameStatsManager *)GameStatsManager::sharedState(v195);
v197 = (const char *)GameStatsManager::getStat(v196, "14");
v198 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v197);
v199 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v198);
v201 = cocos2d::CCLabelBMFont::create(v199, "bigFont.fnt", v200);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v201);
v254 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v201 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.5);
v254(v201, v278);
v264 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v201 + 92);
v255 = (*(int (__fastcall **)(int))(*(_DWORD *)v193 + 96))(v193);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, -12.0, 0.5);
cocos2d::CCPoint::operator+(v278, v255, v271);
v264(v201, v278);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v201 + 80))(v201, 1051595899);
v203 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_diamondsIcon_001.png", v202);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v203);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v203 + 80))(v203, 1058642330);
v256 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v203 + 92);
v204 = (*(int (__fastcall **)(int))(*(_DWORD *)v193 + 96))(v193);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, 0.0, -15.0);
cocos2d::CCPoint::operator+(v278, v204, v271);
v205 = (GameStatsManager *)v256(v203, v278);
v206 = (GameStatsManager *)GameStatsManager::sharedState(v205);
v207 = (const char *)GameStatsManager::getStat(v206, "13");
v208 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v207);
v209 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v208);
v211 = cocos2d::CCLabelBMFont::create(v209, "bigFont.fnt", v210);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v211);
v257 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v211 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.5);
v257(v211, v278);
v265 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v211 + 92);
v258 = (*(int (__fastcall **)(int))(*(_DWORD *)v203 + 96))(v203);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, -12.0, 0.5);
cocos2d::CCPoint::operator+(v278, v258, v271);
v265(v211, v278);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v211 + 80))(v211, 1051595899);
v213 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"currencyDiamondIcon_001.png", v212);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v213);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v213 + 80))(v213, 1057635697);
v259 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v213 + 92);
v214 = (*(int (__fastcall **)(int))(*(_DWORD *)v203 + 96))(v203);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, 0.0, -15.0);
cocos2d::CCPoint::operator+(v278, v214, v271);
v215 = (GameStatsManager *)v259(v213, v278);
v216 = (GameStatsManager *)GameStatsManager::sharedState(v215);
v217 = (const char *)GameStatsManager::getStat(v216, "29");
v218 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v217);
v219 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v218);
v221 = cocos2d::CCLabelBMFont::create(v219, "bigFont.fnt", v220);
(*(void (__fastcall **)(GJGarageLayer *, int))(*(_DWORD *)this + 228))(this, v221);
v238 = *(cocos2d::CCString **)(*(_DWORD *)v221 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v278, 1.0, 0.5);
((void (__fastcall *)(int, _DWORD *))v238)(v221, v278);
v239 = *(cocos2d::CCString **)(*(_DWORD *)v221 + 92);
v222 = (*(int (__fastcall **)(int))(*(_DWORD *)v213 + 96))(v213);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v271, -12.0, 0.5);
cocos2d::CCPoint::operator+(v278, v222, v271);
((void (__fastcall *)(int, _DWORD *))v239)(v221, v278);
v223 = (GameManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v221 + 80))(v221, 1051595899);
v224 = (PlatformToolbox *)GameManager::sharedState(v223);
if ( *((_DWORD *)v224 + 116) != *((_DWORD *)v224 + 117) )
{
v226 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_infoIcon_001.png", v225);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v226 + 80))(v226, 1061997773);
v278[1] = 0;
v278[0] = GJGarageLayer::onInfo;
v227 = CCMenuItemSpriteExtra::create(v226, 0, (int)this, (int)GJGarageLayer::onInfo, 0);
v228 = (cocos2d::CCDirector *)CCMenuItemSpriteExtra::setSizeMult(v227, 2.0);
v229 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v227 + 92);
v230 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v228);
v231 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v230));
v232 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v231));
v233 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v232));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v270, v231 - 15.0, v233 - 15.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v271, v128);
v224 = (PlatformToolbox *)v229(v227, v271);
}
isControllerConnected = PlatformToolbox::isControllerConnected(v224);
if ( isControllerConnected )
{
GameToolbox::addBackButton(this, v241, v234);
return isControllerConnected;
}
}
return (int)v240;
}