//
// AchievementBar::init from 0x8fde30 to 0x8ff308 (5336 bytes)
//
// 2 xrefs:
// > AchievementBar::create @ 0x8ff398
// > ??> @ 0x751f0
//
// 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 12:57:06 +0000
//
__int64 __fastcall AchievementBar::init(
AchievementBar *this,
cocos2d::CCLabelBMFont *a2,
char *a3,
cocos2d::CCSprite *a4,
unsigned __int8 a5)
{
cocos2d::CCDirector *v7; // x0
unsigned int v8; // w28
cocos2d::CCDirector *v10; // x0
__int64 v11; // x0
__int64 v12; // x2
__int64 v13; // x19
void (__fastcall *v14)(__int64, _BYTE *); // x21
char *v15; // x1
char *v16; // x19
__int64 v17; // x21
void (__fastcall *v18)(__int64, _BYTE *); // x19
const char *v19; // x1
__int64 v20; // x0
cocos2d::extension::CCScale9Sprite *v21; // x19
void (__fastcall *v22)(cocos2d::extension::CCScale9Sprite *, _BYTE *); // x22
__int64 v23; // x0
__int64 (__fastcall *v24)(__int64); // x1
void (__fastcall *v25)(cocos2d::extension::CCScale9Sprite *, __int64); // x21
__int64 v26; // x0
const char *v27; // x1
const char *v28; // x1
size_t v29; // x0
cocos2d::CCArray *v30; // x0
__int64 v31; // x0
unsigned __int8 v32; // w2
cocos2d::CCArray *v33; // x27
char *v34; // x0
unsigned __int64 v35; // x25
__int64 v36; // x22
unsigned __int64 v37; // x19
size_t v38; // x3
unsigned __int64 v39; // x2
char *i; // x1
size_t v41; // x2
char *v42; // x1
int v43; // w1
const char *v44; // x1
size_t v45; // x0
cocos2d::CCObject *v46; // x0
char *v47; // x2
unsigned __int64 v48; // x0
char *v49; // x3
char *v50; // x0
char *v51; // x22
__int64 v52; // x20
cocos2d::CCNode *v53; // x0
__int64 v54; // x21
float v55; // s8
const char *v56; // x1
size_t v57; // x0
const char *v58; // x2
char *v59; // x1
__int64 v60; // x19
void (__fastcall *v61)(__int64, _BYTE *); // x23
long double v62; // q0
void (__fastcall *v63)(__int64, float); // x23
float *v64; // x0
void (__fastcall *v65)(__int64); // x23
size_t v66; // x0
float *v67; // x22
void (__fastcall *v68)(float *, _BYTE *); // x23
void (__fastcall *v69)(float *, _BYTE *); // x23
float v70; // s9
float v71; // s2
void (__fastcall *v72)(__int64, _BYTE *); // x23
float v73; // s8
float v74; // s9
float v75; // s8
float v76; // s9
float v77; // s10
float v78; // s8
float v79; // s2
void (__fastcall *v80)(float *, _BYTE *); // x23
float v81; // s10
float v82; // s9
float v83; // s9
float v84; // s8
float v85; // s0
float v86; // s1
float v87; // s0
void (__fastcall *v88)(__int64, _BYTE *); // x19
void (__fastcall *v89)(__int64, _BYTE *); // x19
float *v90; // x0
char v91; // w0
cocos2d::CCString *v92; // x0
char *CString; // x20
cocos2d::CCString *v94; // x0
unsigned int v95; // w23
size_t v96; // x0
_BOOL4 v97; // w22
size_t v98; // x0
_BOOL4 v99; // w22
int v100; // w19
cocos2d::CCString *v101; // x0
void (__fastcall *v102)(__int64, float); // x19
float *v103; // x0
float v104; // s8
__int64 *v105; // x19
char *v106; // x22
size_t v107; // x0
_BOOL4 v108; // w22
std::logic_error *exception; // x20
size_t v110; // x0
_BOOL4 v111; // w22
size_t v112; // x0
_BOOL4 v113; // w22
size_t v114; // x0
_BOOL4 v115; // w22
size_t v116; // x0
_BOOL4 v117; // w22
size_t v118; // x0
_BOOL4 v119; // w22
size_t v120; // x0
_BOOL4 v121; // w22
size_t v122; // x0
_BOOL4 v123; // w19
size_t v124; // x0
_BOOL4 v125; // w19
size_t v126; // x0
_BOOL4 v127; // w19
size_t v128; // x0
_BOOL4 v129; // w19
char *v130; // [xsp+88h] [xbp+88h]
float *v131; // [xsp+98h] [xbp+98h]
int v134; // [xsp+B4h] [xbp+B4h]
char *v135; // [xsp+B8h] [xbp+B8h]
float v136; // [xsp+B8h] [xbp+B8h]
__int64 v137; // [xsp+C8h] [xbp+C8h]
__int64 v138; // [xsp+D0h] [xbp+D0h]
__int64 v139; // [xsp+D8h] [xbp+D8h] BYREF
char v140[8]; // [xsp+E0h] [xbp+E0h] BYREF
float v141; // [xsp+E8h] [xbp+E8h] BYREF
_BYTE v142[4]; // [xsp+F0h] [xbp+F0h] BYREF
float v143; // [xsp+F4h] [xbp+F4h]
_BYTE v144[16]; // [xsp+F8h] [xbp+F8h] BYREF
__int64 v145[2]; // [xsp+108h] [xbp+108h] BYREF
char *v146; // [xsp+118h] [xbp+118h]
__int64 v147; // [xsp+120h] [xbp+120h] BYREF
unsigned __int64 v148; // [xsp+128h] [xbp+128h]
char *v149; // [xsp+130h] [xbp+130h]
__int64 v150[2]; // [xsp+138h] [xbp+138h] BYREF
void *v151; // [xsp+148h] [xbp+148h]
__int64 v152[2]; // [xsp+150h] [xbp+150h] BYREF
void *v153; // [xsp+160h] [xbp+160h]
__int64 v154[2]; // [xsp+168h] [xbp+168h] BYREF
void *v155; // [xsp+178h] [xbp+178h]
__int64 v156[2]; // [xsp+180h] [xbp+180h] BYREF
void *v157; // [xsp+190h] [xbp+190h]
__int64 v158[2]; // [xsp+198h] [xbp+198h] BYREF
void *v159; // [xsp+1A8h] [xbp+1A8h]
__int64 v160[2]; // [xsp+1B0h] [xbp+1B0h] BYREF
void *v161; // [xsp+1C0h] [xbp+1C0h]
__int64 v162[2]; // [xsp+1C8h] [xbp+1C8h] BYREF
void *v163; // [xsp+1D8h] [xbp+1D8h]
__int64 v164[2]; // [xsp+1E0h] [xbp+1E0h] BYREF
void *v165; // [xsp+1F0h] [xbp+1F0h]
__int64 v166[2]; // [xsp+1F8h] [xbp+1F8h] BYREF
void *v167; // [xsp+208h] [xbp+208h]
__int64 v168[2]; // [xsp+210h] [xbp+210h] BYREF
void *v169; // [xsp+220h] [xbp+220h]
__int64 v170[2]; // [xsp+228h] [xbp+228h] BYREF
void *v171; // [xsp+238h] [xbp+238h]
__int64 v172[2]; // [xsp+240h] [xbp+240h] BYREF
void *v173; // [xsp+250h] [xbp+250h]
__int64 v174[2]; // [xsp+258h] [xbp+258h] BYREF
void *v175; // [xsp+268h] [xbp+268h]
__int64 v176[2]; // [xsp+270h] [xbp+270h] BYREF
void *v177; // [xsp+280h] [xbp+280h]
__int64 v178[2]; // [xsp+288h] [xbp+288h] BYREF
void *v179; // [xsp+298h] [xbp+298h]
__int64 v180[2]; // [xsp+2A0h] [xbp+2A0h] BYREF
void *v181; // [xsp+2B0h] [xbp+2B0h]
__int64 v182[2]; // [xsp+2B8h] [xbp+2B8h] BYREF
void *v183; // [xsp+2C8h] [xbp+2C8h]
__int64 v184[2]; // [xsp+2D0h] [xbp+2D0h] BYREF
void *v185; // [xsp+2E0h] [xbp+2E0h]
__int64 v186[2]; // [xsp+2E8h] [xbp+2E8h] BYREF
void *v187; // [xsp+2F8h] [xbp+2F8h]
__int64 v188[2]; // [xsp+300h] [xbp+300h] BYREF
void *v189; // [xsp+310h] [xbp+310h]
__int64 v190[2]; // [xsp+318h] [xbp+318h] BYREF
void *v191; // [xsp+328h] [xbp+328h]
__int64 v192[2]; // [xsp+330h] [xbp+330h] BYREF
void *v193; // [xsp+340h] [xbp+340h]
__int64 v194[2]; // [xsp+348h] [xbp+348h] BYREF
void *v195; // [xsp+358h] [xbp+358h]
__int64 v196[2]; // [xsp+360h] [xbp+360h] BYREF
void *v197; // [xsp+370h] [xbp+370h]
__int64 v198[2]; // [xsp+378h] [xbp+378h] BYREF
void *v199; // [xsp+388h] [xbp+388h]
__int64 v200[2]; // [xsp+390h] [xbp+390h] BYREF
void *v201; // [xsp+3A0h] [xbp+3A0h]
__int64 v202[2]; // [xsp+3A8h] [xbp+3A8h] BYREF
char *v203; // [xsp+3B8h] [xbp+3B8h]
__int64 v204[2]; // [xsp+3C0h] [xbp+3C0h] BYREF
void *v205; // [xsp+3D0h] [xbp+3D0h]
__int64 v206; // [xsp+3D8h] [xbp+3D8h] BYREF
__int64 v207; // [xsp+3E0h] [xbp+3E0h]
void *v208; // [xsp+3E8h] [xbp+3E8h]
__int64 v209[2]; // [xsp+3F0h] [xbp+3F0h] BYREF
void *v210; // [xsp+400h] [xbp+400h]
v134 = a5;
v7 = (cocos2d::CCDirector *)(unsigned __int8)cocos2d::CCNodeRGBA::init(this);
v8 = (unsigned __int8)v7;
if ( !(_BYTE)v7 )
return v8;
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(&v139, v10);
v144[0] = 0;
v144[1] = 0;
v144[2] = 0;
v144[3] = 0;
v11 = cocos2d::CCLayerColor::create(v144, 0.0, 0.0);
v12 = *(_QWORD *)this;
*((_QWORD *)this + 43) = v11;
(*(void (__fastcall **)(AchievementBar *))(v12 + 456))(this);
v13 = *((_QWORD *)this + 43);
v14 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v13 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, *(float *)&v139 * 0.5, 40.0);
v14(v13, v144);
if ( v134 )
v15 = "GJ_square02.png";
else
v15 = "GJ_square01.png";
v145[0] = 0;
v145[1] = 0;
v146 = nullptr;
std::string::__init(v145, v15, 0xFu);
v16 = (char *)v145 + 1;
if ( (v145[0] & 1) != 0 )
v16 = v146;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v144, 0.0, 0.0, 80.0, 80.0);
v17 = cocos2d::extension::CCScale9Sprite::create(v16, v144);
v18 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v17 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v144, 300.0, 80.0);
v18(v17, v144);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 43) + 464LL))(*((_QWORD *)this + 43), v17, 1);
*((_QWORD *)this + 46) = v17;
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"achievementGlow_001.png", v19);
*((_QWORD *)this + 48) = v20;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, 4.0);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 43) + 464LL))(
*((_QWORD *)this + 43),
*((_QWORD *)this + 48),
0xFFFFFFFFLL);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 48) + 1080LL))(*((_QWORD *)this + 48), 0x100000302LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, 40.0, 40.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v144, 0.0, 0.0, 80.0, 80.0);
v21 = (cocos2d::extension::CCScale9Sprite *)cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v144);
v22 = *(void (__fastcall **)(cocos2d::extension::CCScale9Sprite *, _BYTE *))(*(_QWORD *)v21 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v144, 300.0, 80.0);
v22(v21, v144);
(*(void (__fastcall **)(_QWORD, cocos2d::extension::CCScale9Sprite *, __int64))(**((_QWORD **)this + 43) + 464LL))(
*((_QWORD *)this + 43),
v21,
100);
v23 = v17;
v24 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v17 + 192LL);
v25 = *(void (__fastcall **)(cocos2d::extension::CCScale9Sprite *, __int64))(*(_QWORD *)v21 + 184LL);
v26 = v24(v23);
v25(v21, v26);
(*(void (__fastcall **)(cocos2d::extension::CCScale9Sprite *, _QWORD))(*(_QWORD *)v21 + 912LL))(v21, 0);
cocos2d::extension::CCScale9Sprite::setBlendAdditive(v21, 1);
*((_QWORD *)this + 47) = v21;
v131 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"playerSquare_001.png", v27);
if ( v134 )
{
v52 = cocos2d::CCSprite::createWithSpriteFrameName(a4, v28);
v102 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v52 + 160LL);
v103 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v52 + 328LL))(v52);
v102(v52, 30.0 / *v103);
v136 = 0.0;
v51 = a3;
goto LABEL_44;
}
if ( !a4 )
{
LABEL_42:
v51 = nullptr;
v136 = 0.0;
goto LABEL_43;
}
v147 = 0;
v148 = 0;
v149 = nullptr;
v29 = strlen((const char *)a4);
v30 = (cocos2d::CCArray *)std::string::__init(&v147, a4, v29);
v31 = cocos2d::CCArray::create(v30);
v32 = v147;
v33 = (cocos2d::CCArray *)v31;
if ( (v147 & 1) == 0 )
{
LODWORD(v35) = (int)(unsigned __int8)v147 >> 1;
if ( !(_DWORD)v35 )
goto LABEL_11;
v34 = (char *)&v147 + 1;
v36 = -1;
v105 = (__int64 *)((char *)&v147 + (int)v35 + 1);
if ( v105 == (__int64 *)((char *)&v147 + 1) )
goto LABEL_110;
goto LABEL_93;
}
v34 = v149;
if ( v148 )
{
v105 = (__int64 *)&v149[v148];
v36 = -1;
if ( v149 == &v149[v148] )
{
LABEL_112:
v35 = v148;
goto LABEL_12;
}
LABEL_93:
v106 = v34;
if ( *v34 == 95 )
{
v36 = 0;
}
else
{
do
{
if ( v105 == (__int64 *)++v106 )
{
v36 = -1;
goto LABEL_109;
}
}
while ( *v106 != 95 );
v36 = v106 - v34;
}
LABEL_109:
LODWORD(v35) = (int)(unsigned __int8)v147 >> 1;
if ( (v147 & 1) != 0 )
goto LABEL_112;
LABEL_110:
v35 = (int)v35;
goto LABEL_12;
}
LABEL_11:
v35 = 0;
v36 = -1;
LABEL_12:
v206 = 0;
v207 = 0;
v37 = 0;
v208 = nullptr;
v38 = v36;
if ( (v147 & 1) == 0 )
goto LABEL_31;
LABEL_13:
v39 = v148;
if ( v37 > v148 )
{
LABEL_113:
exception = (std::logic_error *)_cxa_allocate_exception(0x10u);
std::logic_error::logic_error(exception, "basic_string");
*(_QWORD *)exception = off_1536D68;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))std::logic_error::~logic_error);
}
for ( i = v149; ; i = (char *)&v147 + 1 )
{
v41 = v39 - v37;
v42 = &i[v37];
if ( v41 > v38 )
v41 = v38;
std::string::__init(&v206, v42, v41);
v43 = v206 & 1;
if ( v43 )
{
if ( v37 == v35 )
{
v43 = 1;
if ( !v207 )
goto LABEL_24;
}
v44 = (const char *)v208;
}
else
{
if ( v37 == v35 && !((int)(unsigned __int8)v206 >> 1) )
goto LABEL_24;
v44 = (char *)&v206 + 1;
}
v209[0] = 0;
v209[1] = 0;
v210 = nullptr;
v135 = (char *)v44;
v45 = strlen(v44);
std::string::__init(v209, v135, v45);
v46 = (cocos2d::CCObject *)cocos2d::CCString::create(v209);
cocos2d::CCArray::addObject(v33, v46);
if ( (v209[0] & 1) != 0 )
operator delete(v210);
v43 = v206 & 1;
LABEL_24:
if ( v36 == -1 )
break;
v37 = v36 + 1;
if ( (v147 & 1) != 0 )
{
v47 = v149;
v48 = v148;
}
else
{
v48 = (unsigned __int8)v147 >> 1;
v47 = (char *)&v147 + 1;
}
v36 = -1;
if ( v37 >= v48 || (v49 = &v47[v37], v50 = &v47[v48], &v47[v37] == v50) )
{
if ( !v43 )
goto LABEL_29;
}
else if ( v47[v37] == 95 )
{
LABEL_70:
v36 = v49 - v47;
if ( !v43 )
goto LABEL_29;
}
else
{
while ( v50 != ++v49 )
{
if ( *v49 == 95 )
goto LABEL_70;
}
v36 = -1;
if ( !v43 )
{
LABEL_29:
v32 = v147;
goto LABEL_30;
}
}
operator delete(v208);
v32 = v147;
LABEL_30:
v206 = 0;
v38 = v36 - v37;
v207 = 0;
v208 = nullptr;
if ( (v32 & 1) != 0 )
goto LABEL_13;
LABEL_31:
v39 = v32 >> 1;
if ( v37 > v39 )
goto LABEL_113;
}
if ( v43 )
operator delete(v208);
if ( (v147 & 1) != 0 )
operator delete(v149);
if ( (unsigned int)cocos2d::CCArray::count(v33) <= 1 )
goto LABEL_42;
v92 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v33, 0);
CString = (char *)cocos2d::CCString::getCString(v92);
v94 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v33, 1u);
v95 = cocos2d::CCString::intValue(v94);
v150[0] = 0;
v150[1] = 0;
v151 = nullptr;
v96 = strlen(CString);
std::string::__init(v150, CString, v96);
v152[0] = 0;
v152[1] = 0;
v153 = nullptr;
std::string::__init(v152, "ship", 4u);
v97 = sub_8FDB34((__int64)v150, (__int64)v152);
if ( (v152[0] & 1) != 0 )
operator delete(v153);
if ( (v150[0] & 1) != 0 )
operator delete(v151);
if ( v97 )
{
v100 = 4;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Unlocked new %s!", "Ship");
}
else
{
v154[0] = 0;
v154[1] = 0;
v155 = nullptr;
v98 = strlen(CString);
std::string::__init(v154, CString, v98);
v156[0] = 0;
v156[1] = 0;
v157 = nullptr;
std::string::__init(v156, "ball", 4u);
v99 = sub_8FDB34((__int64)v154, (__int64)v156);
if ( (v156[0] & 1) != 0 )
operator delete(v157);
if ( (v154[0] & 1) != 0 )
{
operator delete(v155);
if ( !v99 )
goto LABEL_101;
LABEL_88:
v100 = 5;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Unlocked new %s!", "Ball");
}
else
{
if ( v99 )
goto LABEL_88;
LABEL_101:
v158[0] = 0;
v158[1] = 0;
v159 = nullptr;
v107 = strlen(CString);
std::string::__init(v158, CString, v107);
v160[0] = 0;
v160[1] = 0;
v161 = nullptr;
std::string::__init(v160, "bird", 4u);
v108 = sub_8FDB34((__int64)v158, (__int64)v160);
if ( (v160[0] & 1) != 0 )
operator delete(v161);
if ( (v158[0] & 1) != 0 )
operator delete(v159);
if ( v108 )
{
v100 = 6;
v136 = -8.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Unlocked new %s!", "UFO");
}
else
{
v162[0] = 0;
v162[1] = 0;
v163 = nullptr;
v110 = strlen(CString);
std::string::__init(v162, CString, v110);
v164[0] = 0;
v164[1] = 0;
v165 = nullptr;
std::string::__init(v164, "dart", 4u);
v111 = sub_8FDB34((__int64)v162, (__int64)v164);
if ( (v164[0] & 1) != 0 )
operator delete(v165);
if ( (v162[0] & 1) != 0 )
operator delete(v163);
if ( v111 )
{
v100 = 7;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Wave");
}
else
{
v166[0] = 0;
v166[1] = 0;
v167 = nullptr;
v112 = strlen(CString);
std::string::__init(v166, CString, v112);
v168[0] = 0;
v168[1] = 0;
v169 = nullptr;
std::string::__init(v168, "robot", 5u);
v113 = sub_8FDB34((__int64)v166, (__int64)v168);
if ( (v168[0] & 1) != 0 )
operator delete(v169);
if ( (v166[0] & 1) != 0 )
operator delete(v167);
if ( v113 )
{
v100 = 8;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Robot");
}
else
{
v170[0] = 0;
v170[1] = 0;
v171 = nullptr;
v114 = strlen(CString);
std::string::__init(v170, CString, v114);
v172[0] = 0;
v172[1] = 0;
v173 = nullptr;
std::string::__init(v172, "spider", 6u);
v115 = sub_8FDB34((__int64)v170, (__int64)v172);
if ( (v172[0] & 1) != 0 )
operator delete(v173);
if ( (v170[0] & 1) != 0 )
operator delete(v171);
if ( v115 )
{
v100 = 9;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Spider");
}
else
{
v174[0] = 0;
v174[1] = 0;
v175 = nullptr;
v116 = strlen(CString);
std::string::__init(v174, CString, v116);
v176[0] = 0;
v176[1] = 0;
v177 = nullptr;
std::string::__init(v176, "death", 5u);
v117 = sub_8FDB34((__int64)v174, (__int64)v176);
if ( (v176[0] & 1) != 0 )
operator delete(v177);
if ( (v174[0] & 1) != 0 )
operator delete(v175);
if ( v117 )
{
v100 = 11;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Death Effect");
}
else
{
v178[0] = 0;
v178[1] = 0;
v179 = nullptr;
v118 = strlen(CString);
std::string::__init(v178, CString, v118);
v180[0] = 0;
v180[1] = 0;
v181 = nullptr;
std::string::__init(v180, "special", 7u);
v119 = sub_8FDB34((__int64)v178, (__int64)v180);
if ( (v180[0] & 1) != 0 )
operator delete(v181);
if ( (v178[0] & 1) != 0 )
operator delete(v179);
if ( v119 )
{
v100 = 10;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Trail");
}
else
{
v182[0] = 0;
v182[1] = 0;
v183 = nullptr;
v120 = strlen(CString);
std::string::__init(v182, CString, v120);
v184[0] = 0;
v184[1] = 0;
v185 = nullptr;
std::string::__init(v184, "color", 5u);
v121 = sub_8FDB34((__int64)v182, (__int64)v184);
if ( (v184[0] & 1) != 0 )
operator delete(v185);
if ( (v182[0] & 1) != 0 )
operator delete(v183);
if ( v121 )
{
v100 = 2;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Main Color");
}
else
{
v186[0] = 0;
v186[1] = 0;
v187 = nullptr;
v122 = strlen(CString);
std::string::__init(v186, CString, v122);
v188[0] = 0;
v188[1] = 0;
v189 = nullptr;
std::string::__init(v188, "color2", 6u);
v123 = sub_8FDB34((__int64)v186, (__int64)v188);
if ( (v188[0] & 1) != 0 )
operator delete(v189);
if ( (v186[0] & 1) != 0 )
operator delete(v187);
if ( v123 )
{
v100 = 3;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Secondary Color");
}
else
{
v190[0] = 0;
v190[1] = 0;
v191 = nullptr;
v124 = strlen(CString);
std::string::__init(v190, CString, v124);
v192[0] = 0;
v192[1] = 0;
v193 = nullptr;
std::string::__init(v192, "swing", 5u);
v125 = sub_8FDB34((__int64)v190, (__int64)v192);
if ( (v192[0] & 1) != 0 )
operator delete(v193);
if ( (v190[0] & 1) != 0 )
operator delete(v191);
if ( v125 )
{
v100 = 13;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Swing");
}
else
{
v194[0] = 0;
v194[1] = 0;
v195 = nullptr;
v126 = strlen(CString);
std::string::__init(v194, CString, v126);
v196[0] = 0;
v196[1] = 0;
v197 = nullptr;
std::string::__init(v196, "jetpack", 7u);
v127 = sub_8FDB34((__int64)v194, (__int64)v196);
if ( (v196[0] & 1) != 0 )
operator delete(v197);
if ( (v194[0] & 1) != 0 )
operator delete(v195);
if ( v127 )
{
v100 = 14;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Jetpack");
}
else
{
v198[0] = 0;
v198[1] = 0;
v199 = nullptr;
v128 = strlen(CString);
std::string::__init(v198, CString, v128);
v200[0] = 0;
v200[1] = 0;
v201 = nullptr;
std::string::__init(v200, "shipfire", 8u);
v129 = sub_8FDB34((__int64)v198, (__int64)v200);
if ( (v200[0] & 1) != 0 )
operator delete(v201);
if ( (v198[0] & 1) != 0 )
operator delete(v199);
if ( v129 )
{
v100 = 15;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Ship Fire");
}
else
{
v100 = 1;
v136 = 0.0;
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Unlocked new %s!",
"Icon");
}
}
}
}
}
}
}
}
}
}
}
}
}
LOWORD(v138) = -1;
BYTE2(v138) = -1;
LOWORD(v137) = -20561;
v51 = (char *)cocos2d::CCString::getCString(v101);
BYTE2(v137) = -81;
v52 = GJItemIcon::create(v100, v95, v137, v138, 0, 0, 1u);
if ( !v52 )
LABEL_43:
v52 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_achImage_001.png", v28);
LABEL_44:
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v52 + 184LL))(v52, v140);
v53 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 43) + 464LL))(
*((_QWORD *)this + 43),
v52,
3);
*((_QWORD *)this + 49) = v52;
v54 = cocos2d::CCNode::create(v53);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 43) + 464LL))(*((_QWORD *)this + 43), v54, 2);
if ( v134 )
{
v55 = 0.8;
v56 = "goldFont.fnt";
}
else
{
v55 = 0.7;
v56 = "bigFont.fnt";
}
v130 = (char *)v56;
v202[0] = 0;
v202[1] = 0;
v203 = nullptr;
v57 = strlen(v56);
std::string::__init(v202, v130, v57);
v59 = (char *)v202 + 1;
if ( (v202[0] & 1) != 0 )
v59 = v203;
v60 = cocos2d::CCLabelBMFont::create(a2, v59, v58);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v54 + 456LL))(v54, v60);
v61 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v60 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, 0.0, 0.5);
v61(v60, v144);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v60 + 160LL))(v60, v55);
*((_QWORD *)this + 50) = v60;
LODWORD(v62) = *(_DWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v60 + 328LL))(v60);
if ( *(float *)&v62 > 200.0 )
{
v63 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v60 + 160LL);
v64 = (float *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v60 + 328LL))(v60, *(float *)&v62);
v63(v60, 200.0 / *v64);
}
v65 = *(void (__fastcall **)(__int64))(*(_QWORD *)v60 + 160LL);
if ( (*(float (__fastcall **)(__int64, long double))(*(_QWORD *)v60 + 168LL))(v60, v62) < v55 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v60 + 168LL))(v60);
v65(v60);
v204[0] = 0;
if ( !v51 )
v51 = a3;
v204[1] = 0;
v205 = nullptr;
v66 = strlen(v51);
std::string::__init(v204, v51, v66);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, 0.0, 1.0);
v67 = (float *)TextArea::create((char *)v204, "chatFont.fnt", (const cocos2d::CCPoint *)v144, 0, 0, 1.0, 220.0, 20.0);
if ( (v204[0] & 1) != 0 )
operator delete(v205);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v54 + 456LL))(v54, v67);
v68 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v67 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, 0.0, 0.5);
v68(v67, v144);
v69 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v67 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, 0.0, 5.0);
v69(v67, v144);
v67[162] = 16.0;
*((_QWORD *)this + 51) = v67;
v70 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v60 + 328LL))(v60) + 4);
v71 = *(float *)((*(__int64 (__fastcall **)(float *))(*(_QWORD *)v67 + 328LL))(v67) + 4) + 17.0;
v72 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v60 + 184LL);
v73 = v70 * 0.5;
v74 = v70 + v71;
v75 = -(float)(v73 - (float)(v74 * 0.5));
v76 = -(float)((float)(v71 * 0.5) - (float)(v74 * 0.5));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v141, 0.0, 1.0);
v77 = v141;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v142, 0.0, 1.0);
v78 = v75 + v143;
v79 = 0.0;
if ( v134 )
v79 = 2.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, v77, (float)(v78 + 2.0) + v79);
v72(v60, v144);
v80 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v67 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v141, 0.0, -1.0);
v81 = v141 + 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v142, 0.0, -1.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, v81, (float)((float)(15.0 - v76) + v143) - 1.0);
v80(v67, v144);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v131 + 160LL))(v131, 1.0);
if ( !v134 )
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v52 + 160LL))(v52, 1.0);
v82 = v131[108];
v83 = v82 * (*(float (__fastcall **)(float *))(*(_QWORD *)v131 + 168LL))(v131);
v84 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v60 + 328LL))(v60);
v85 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v60 + 168LL))(v60);
v86 = v67[170];
if ( (float)(v84 * v85) >= v86 )
{
v104 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v60 + 328LL))(v60);
v87 = (float)(v104 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v60 + 168LL))(v60)) + 5.0;
}
else
{
v87 = v86 + 5.0;
}
v88 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v52 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v144,
-(float)((float)((float)((float)(v87 + (float)(v83 * 0.5)) + 30.0) * 0.5) - (float)(v83 * 0.5)),
v136);
v88(v52, v144);
v89 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v54 + 184LL);
v90 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v52 + 192LL))(v52);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, *v90 + 30.0, 0.0);
v89(v54, v144);
v91 = v202[0];
*((_DWORD *)this + 88) = 1118568448;
if ( (v91 & 1) != 0 )
operator delete(v203);
if ( (v145[0] & 1) != 0 )
operator delete(v146);
return v8;
}