//
// AchievementBar::init from 0x100618c90 to 0x10061a0e4 (5204 bytes)
//
// 1 xrefs:
// > AchievementBar::create @ 0x100618c47
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall AchievementBar::init(AchievementBar *a1, const char *a2, const char *a3, const char *a4, bool a5)
{
_BOOL4 v5; // r12d
bool result; // al
cocos2d::CCLayerColor *v9; // rax
cocos2d::CCLayerColor *m_layerColor; // rbx
const std::string::value_type *v11; // rcx
__int64 v12; // rax
__int64 v13; // rcx
cocos2d::extension::CCScale9Sprite *v14; // r14
AchievementBar *v15; // rbx
cocos2d::CCSprite *v16; // rax
cocos2d::extension::CCScale9Sprite *v17; // r12
__int64 v18; // rax
__int64 v19; // rsi
unsigned __int8 v20; // r12
GJItemIcon *v21; // r13
float v22; // xmm0_4
GJItemIcon_vtbl *v23; // rax
char *v24; // r14
const char *v25; // rdi
size_t v26; // rax
size_t v27; // r14
char *v28; // r12
size_t v29; // rbx
char *v30; // rax
unsigned __int64 v31; // rdi
__int64 v32; // r15
unsigned __int64 v33; // rsi
char *v34; // rdx
unsigned __int64 v35; // rbx
bool v36; // zf
unsigned __int64 v37; // r14
char *v38; // r13
size_t v39; // r14
char *v40; // r12
char v41; // al
const char *v42; // r14
unsigned __int64 v43; // r15
size_t v44; // rbx
size_t v45; // rax
size_t v46; // r13
char *v47; // rbx
size_t v48; // r12
__int64 v49; // rax
__int64 v50; // r14
__int64 v51; // rbx
char *v52; // rax
unsigned __int64 v53; // rsi
char *v54; // rdx
unsigned __int64 v55; // rdi
cocos2d::CCString *v56; // rax
const char *CString; // r13
cocos2d::CCString *v58; // rax
int v59; // r12d
size_t v60; // rax
size_t v61; // r14
char *v62; // r15
AchievementBar *v63; // rbx
cocos2d::CCNode *v64; // r15
int v65; // xmm0_4
const char *v66; // rsi
size_t v67; // rdx
cocos2d::CCLabelBMFont *v68; // r12
float *v69; // rax
float v70; // xmm0_4
double v71; // xmm1_8
char *v72; // rdi
size_t v73; // rax
size_t v74; // r14
char *v75; // rbx
size_t v76; // r15
char *v77; // r14
float *v78; // rbx
__int64 v79; // r15
float v80; // xmm2_4
float v81; // xmm1_4
float v82; // xmm0_4
float v83; // xmm2_4
float v84; // xmm0_4
AchievementBar *v85; // rbx
float *v86; // rax
__int64 v87; // r14
size_t v88; // rbx
char v89; // bl
void *v90; // r14
size_t v91; // rax
char *v92; // rdi
size_t v93; // rdx
char v94; // r15
UnlockType v95; // r15d
size_t v96; // rax
size_t v97; // r14
char *v98; // r15
size_t v99; // rbx
char v100; // bl
void *v101; // r14
size_t v102; // rax
char *v103; // rdi
size_t v104; // rdx
char v105; // r15
char v106; // bl
char v107; // bl
char v108; // bl
char v109; // bl
char v110; // bl
char v111; // bl
char v112; // bl
char v113; // bl
char v114; // bl
char v115; // bl
char v116; // bl
cocos2d::CCString *v117; // rax
char v118; // [rsp+0h] [rbp-120h]
float v119; // [rsp+18h] [rbp-108h] BYREF
float v120; // [rsp+20h] [rbp-100h] BYREF
cocos2d::CCSprite *v121; // [rsp+28h] [rbp-F8h]
char v122; // [rsp+30h] [rbp-F0h]
_BYTE v123[15]; // [rsp+31h] [rbp-EFh] BYREF
void *v124; // [rsp+40h] [rbp-E0h]
__int128 v125; // [rsp+48h] [rbp-D8h] BYREF
void *v126; // [rsp+58h] [rbp-C8h]
float v127; // [rsp+60h] [rbp-C0h] BYREF
float v128; // [rsp+64h] [rbp-BCh]
__int64 v129; // [rsp+68h] [rbp-B8h]
char *v130; // [rsp+70h] [rbp-B0h]
__int64 __dst; // [rsp+78h] [rbp-A8h] BYREF
unsigned __int64 v132; // [rsp+80h] [rbp-A0h]
void *v133; // [rsp+88h] [rbp-98h]
AchievementBar *v134; // [rsp+90h] [rbp-90h]
float v135; // [rsp+9Ch] [rbp-84h]
__int64 v136; // [rsp+A0h] [rbp-80h]
const char *v137; // [rsp+A8h] [rbp-78h]
unsigned __int64 v138; // [rsp+B0h] [rbp-70h]
bool v139; // [rsp+BFh] [rbp-61h]
double __s2[2]; // [rsp+C0h] [rbp-60h] BYREF
void *__p; // [rsp+D0h] [rbp-50h]
float v142; // [rsp+DCh] [rbp-44h]
char __s[8]; // [rsp+E0h] [rbp-40h] BYREF
size_t __n; // [rsp+E8h] [rbp-38h]
void *v145; // [rsp+F0h] [rbp-30h]
cocos2d::CCRect v146; // 0:xmm0_8.8,8:xmm1_8.8
v5 = *(_BOOL4 *)&a5;
v137 = a2;
result = cocos2d::CCNodeRGBA::init(a1);
if ( !result )
return result;
v130 = (char *)a3;
v139 = result;
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v119);
*(_DWORD *)__s = 0;
v9 = cocos2d::CCLayerColor::create((const cocos2d::ccColor4B *)__s, 0.0, 0.0);
a1->m_layerColor = v9;
((void (__fastcall *)(AchievementBar *, cocos2d::CCLayerColor *))a1->addChild)(a1, v9);
m_layerColor = a1->m_layerColor;
sub_10028CBE0((float *)__s, v119 * 0.5, 40.0);
((void (__fastcall *)(cocos2d::CCLayerColor *, char *))m_layerColor->setPosition)(m_layerColor, __s);
v11 = "GJ_square01.png";
v142 = *(float *)&v5;
if ( v5 )
v11 = "GJ_square02.png";
v122 = 30;
v12 = *(_QWORD *)v11;
v13 = *(_QWORD *)(v11 + 7);
*(_QWORD *)v123 = v12;
*(_QWORD *)&v123[7] = v13;
LOBYTE(v124) = 0;
v146.origin = 0;
v146.size = 0;
sub_10028CC00((__int64)__s, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v14 = cocos2d::extension::CCScale9Sprite::create_2(v123, v146);
v134 = a1;
sub_10028CBF0((float *)__s, 300.0, 80.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, char *))v14->setContentSize)(v14, __s);
v15 = v134;
((void (__fastcall *)(cocos2d::CCLayerColor *, cocos2d::extension::CCScale9Sprite *, __int64))v134->m_layerColor->addChild_0)(
v134->m_layerColor,
v14,
1);
v15->m_bg = v14;
v16 = cocos2d::CCSprite::createWithSpriteFrameName("achievementGlow_001.png");
v15->m_achievementGlowSprite = v16;
((void (__fastcall *)(cocos2d::CCSprite *, float))v16->setScale)(v16, 4.0);
((void (__fastcall *)(cocos2d::CCLayerColor *, cocos2d::CCSprite *, __int64))v15->m_layerColor->addChild_0)(
v15->m_layerColor,
v15->m_achievementGlowSprite,
0xFFFFFFFFLL);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))v15->m_achievementGlowSprite->setBlendFunc)(
v15->m_achievementGlowSprite,
0x100000302LL);
sub_10028CBE0(&v120, 40.0, 40.0);
v146.origin = 0;
v146.size = 0;
sub_10028CC00((__int64)__s, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v17 = cocos2d::extension::CCScale9Sprite::create_2("square02b_001.png", v146);
sub_10028CBF0((float *)__s, 300.0, 80.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, char *))v17->setContentSize)(v17, __s);
((void (__fastcall *)(cocos2d::CCLayerColor *, cocos2d::extension::CCScale9Sprite *, __int64))v134->m_layerColor->addChild_0)(
v134->m_layerColor,
v17,
100);
v18 = ((__int64 (__fastcall *)(cocos2d::extension::CCScale9Sprite *))v14->getPosition)(v14);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v17->setPosition)(v17, v18);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _QWORD))v17->setOpacity)(v17, 0);
v19 = 1;
cocos2d::extension::CCScale9Sprite::setBlendAdditive(v17, 1);
v134->m_bg2 = v17;
v121 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png");
v20 = LOBYTE(v142);
if ( LOBYTE(v142) )
{
v21 = (GJItemIcon *)cocos2d::CCSprite::createWithSpriteFrameName(a4);
v22 = 30.0 / *(float *)((__int64 (__fastcall *)(GJItemIcon *))v21->getContentSize)(v21);
v23 = v21->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v135 = 0.0;
((void (__fastcall *)(GJItemIcon *, float))v23->setScale)(v21, v22);
v24 = v130;
goto LABEL_81;
}
v135 = 0.0;
if ( !a4 )
{
LABEL_79:
v24 = nullptr;
goto LABEL_80;
}
v25 = a4;
v26 = strlen(a4);
if ( v26 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(0.0);
v27 = v26;
if ( v26 >= 0x17 )
{
v29 = 26;
if ( (v26 | 7) != 0x17 )
v29 = (v26 | 7) + 1;
v28 = (char *)operator new(v29);
v133 = v28;
__dst = v29 | 1;
v132 = v27;
goto LABEL_14;
}
LOBYTE(__dst) = 2 * v26;
v28 = (char *)&__dst + 1;
if ( v26 )
{
LABEL_14:
v25 = v28;
v19 = (__int64)a4;
memcpy(v28, a4, v27);
}
v28[v27] = 0;
v129 = sub_10071F9E0(v25, v19);
v30 = (char *)&__dst + 1;
if ( (__dst & 1) != 0 )
{
v30 = (char *)v133;
v31 = v132;
v32 = -1;
if ( !v132 )
goto LABEL_25;
LABEL_19:
v33 = v31;
v34 = v30;
while ( *v34 != 95 )
{
++v34;
if ( !--v33 )
{
v34 = &v30[v31];
break;
}
}
v32 = -1;
if ( v34 != &v30[v31] )
v32 = v34 - v30;
goto LABEL_25;
}
v31 = (unsigned __int8)__dst >> 1;
v32 = -1;
if ( (unsigned __int8)__dst >> 1 )
goto LABEL_19;
LABEL_25:
v138 = v31;
v35 = 0;
do
{
if ( (__dst & 1) != 0 )
{
v37 = v132;
if ( v132 < v35 )
LABEL_214:
sub_1000547C0();
v38 = (char *)v133;
}
else
{
v37 = (unsigned __int8)__dst >> 1;
v38 = (char *)&__dst + 1;
if ( v35 > v37 )
goto LABEL_214;
}
v39 = v37 - v35;
if ( v39 >= v32 - v35 )
v39 = v32 - v35;
if ( v39 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(0.0);
if ( v39 >= 0x17 )
{
v136 = v32;
v43 = v35;
v44 = (v39 | 7) + 1;
if ( (v39 | 7) == 0x17 )
v44 = 26;
v40 = (char *)operator new(v44);
v145 = v40;
*(_QWORD *)__s = v44 | 1;
__n = v39;
v35 = v43;
v32 = v136;
}
else
{
__s[0] = 2 * v39;
v40 = &__s[1];
if ( !v39 )
{
__s[1] = 0;
v41 = __s[0];
if ( (__s[0] & 1) == 0 )
goto LABEL_38;
goto LABEL_45;
}
}
memmove(v40, &v38[v35], v39);
v40[v39] = 0;
v41 = __s[0];
if ( (__s[0] & 1) == 0 )
{
LABEL_38:
v20 = LOBYTE(v142);
if ( !v41 && v35 == v138 )
goto LABEL_58;
v42 = &__s[1];
goto LABEL_48;
}
LABEL_45:
v20 = LOBYTE(v142);
if ( !__n && v35 == v138 )
goto LABEL_58;
v42 = (const char *)v145;
LABEL_48:
v45 = strlen(v42);
if ( v45 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(0.0);
v46 = v45;
v136 = v35;
if ( v45 >= 0x17 )
{
v48 = (v45 | 7) + 1;
if ( (v45 | 7) == 0x17 )
v48 = 26;
v47 = (char *)operator new(v48);
__p = v47;
*(_QWORD *)&__s2[0] = v48 | 1;
*(_QWORD *)&__s2[1] = v46;
v20 = LOBYTE(v142);
LABEL_55:
memmove(v47, v42, v46);
goto LABEL_56;
}
LOBYTE(__s2[0]) = 2 * v45;
v47 = (char *)__s2 + 1;
if ( v45 )
goto LABEL_55;
LABEL_56:
v47[v46] = 0;
v49 = sub_1007AB360(__s2);
sub_10071FCD0(v129, v49);
v35 = v136;
if ( (LOBYTE(__s2[0]) & 1) != 0 )
operator delete(__p);
LABEL_58:
v50 = v35;
v51 = -1;
if ( v32 == -1 )
goto LABEL_59;
if ( (__dst & 1) != 0 )
{
v52 = (char *)v133;
v53 = v132;
v50 = v32 + 1;
if ( v132 <= v32 + 1 )
goto LABEL_59;
}
else
{
v53 = (unsigned __int8)__dst >> 1;
v52 = (char *)&__dst + 1;
v50 = v32 + 1;
if ( v53 <= v32 + 1 )
goto LABEL_59;
}
v54 = &v52[v50];
v55 = v53 + ~v32;
while ( *v54 != 95 )
{
++v54;
if ( !--v55 )
{
v54 = &v52[v53];
break;
}
}
v51 = v54 - v52;
if ( v54 == &v52[v53] )
v51 = -1;
LABEL_59:
if ( (__s[0] & 1) != 0 )
operator delete(v145);
v36 = v32 == -1;
v32 = v51;
v35 = v50;
}
while ( !v36 );
if ( (__dst & 1) != 0 )
operator delete(v133);
if ( (unsigned int)sub_100720070(v129) < 2 )
goto LABEL_79;
v56 = (cocos2d::CCString *)sub_1007200C0(v129, 0);
CString = cocos2d::CCString::getCString(v56);
v58 = (cocos2d::CCString *)sub_1007200C0(v129, 1);
v59 = cocos2d::CCString::intValue(v58);
v60 = strlen(CString);
if ( v60 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(0.0);
v61 = v60;
if ( v60 >= 0x17 )
{
v88 = 26;
if ( (v60 | 7) != 0x17 )
v88 = (v60 | 7) + 1;
v62 = (char *)operator new(v88);
v145 = v62;
*(_QWORD *)__s = v88 | 1;
__n = v61;
goto LABEL_118;
}
__s[0] = 2 * v60;
v62 = &__s[1];
if ( v60 )
LABEL_118:
memmove(v62, CString, v61);
v62[v61] = 0;
LOBYTE(__s2[0]) = 8;
*(_DWORD *)((char *)__s2 + 1) = 1885956211;
BYTE5(__s2[0]) = 0;
v89 = __s[0];
v90 = v145;
LODWORD(v136) = v59;
if ( (__s[0] & 1) != 0 )
{
v91 = __n;
v92 = (char *)v145;
}
else
{
v91 = (unsigned __int8)__s[0] >> 1;
v92 = &__s[1];
}
v93 = 4;
if ( v91 < 4 )
v93 = v91;
v94 = (v91 == 4) & (memcmp(v92, (char *)__s2 + 1, v93) == 0);
if ( (v89 & 1) != 0 )
operator delete(v90);
v135 = 0.0;
v20 = LOBYTE(v142);
if ( v94 )
{
v95 = 4;
goto LABEL_212;
}
v96 = strlen(CString);
if ( v96 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(0.0);
v97 = v96;
if ( v96 >= 0x17 )
{
v99 = 26;
if ( (v96 | 7) != 0x17 )
v99 = (v96 | 7) + 1;
v98 = (char *)operator new(v99);
v145 = v98;
*(_QWORD *)__s = v99 | 1;
__n = v97;
goto LABEL_135;
}
__s[0] = 2 * v96;
v98 = &__s[1];
if ( v96 )
LABEL_135:
memmove(v98, CString, v97);
v98[v97] = 0;
LOBYTE(__s2[0]) = 8;
*(_DWORD *)((char *)__s2 + 1) = 1819042146;
BYTE5(__s2[0]) = 0;
v100 = __s[0];
v101 = v145;
if ( (__s[0] & 1) != 0 )
{
v102 = __n;
v103 = (char *)v145;
}
else
{
v102 = (unsigned __int8)__s[0] >> 1;
v103 = &__s[1];
}
v104 = 4;
if ( v102 < 4 )
v104 = v102;
v105 = (v102 == 4) & (memcmp(v103, (char *)__s2 + 1, v104) == 0);
if ( (v100 & 1) != 0 )
operator delete(v101);
v20 = LOBYTE(v142);
if ( v105 )
{
v95 = 5;
goto LABEL_212;
}
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "bird", 0.0);
v106 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) != 0 )
goto LABEL_150;
LABEL_147:
if ( v106 )
goto LABEL_148;
LABEL_151:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "dart", 0.0);
v107 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_153:
if ( v107 )
{
LABEL_154:
v95 = Dart;
goto LABEL_212;
}
LABEL_157:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "robot", 0.0);
v108 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_159:
if ( v108 )
{
LABEL_160:
v95 = 8;
goto LABEL_212;
}
LABEL_163:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "spider", 0.0);
v109 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_165:
if ( v109 )
{
LABEL_166:
v95 = 9;
goto LABEL_212;
}
LABEL_169:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "death", 0.0);
v110 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_171:
if ( v110 )
{
LABEL_172:
v95 = Death;
goto LABEL_212;
}
LABEL_175:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "special", 0.0);
v111 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_177:
if ( v111 )
{
LABEL_178:
v95 = Streak;
goto LABEL_212;
}
LABEL_181:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "color", 0.0);
v112 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_183:
if ( v112 )
{
LABEL_184:
v95 = Col1;
goto LABEL_212;
}
LABEL_187:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "color2", 0.0);
v113 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_189:
if ( v113 )
{
LABEL_190:
v95 = Col2;
goto LABEL_212;
}
LABEL_193:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "swing", 0.0);
v114 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_195:
if ( v114 )
{
LABEL_196:
v95 = GJItem|0x1;
LABEL_211:
v20 = LOBYTE(v142);
goto LABEL_212;
}
LABEL_199:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "jetpack", 0.0);
v115 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
{
operator delete(__p);
if ( (__s[0] & 1) == 0 )
{
LABEL_201:
if ( v115 )
{
LABEL_202:
v95 = GJItem|Col1;
goto LABEL_211;
}
LABEL_205:
sub_100030790(__s, CString, 0.0);
sub_100030790(__s2, "shipfire", 0.0);
v116 = sub_1001B0EE0((unsigned __int8 *)__s, (unsigned __int8 *)__s2);
if ( (LOBYTE(__s2[0]) & 1) != 0 )
operator delete(__p);
if ( (__s[0] & 1) != 0 )
operator delete(v145);
v95 = 1;
if ( v116 )
v95 = GJItem|Col2;
goto LABEL_211;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_201;
}
operator delete(v145);
if ( v115 )
goto LABEL_202;
goto LABEL_205;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_195;
}
operator delete(v145);
if ( v114 )
goto LABEL_196;
goto LABEL_199;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_189;
}
operator delete(v145);
if ( v113 )
goto LABEL_190;
goto LABEL_193;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_183;
}
operator delete(v145);
if ( v112 )
goto LABEL_184;
goto LABEL_187;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_177;
}
operator delete(v145);
if ( v111 )
goto LABEL_178;
goto LABEL_181;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_171;
}
operator delete(v145);
if ( v110 )
goto LABEL_172;
goto LABEL_175;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_165;
}
operator delete(v145);
if ( v109 )
goto LABEL_166;
goto LABEL_169;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_159;
}
operator delete(v145);
if ( v108 )
goto LABEL_160;
goto LABEL_163;
}
}
else if ( (__s[0] & 1) == 0 )
{
goto LABEL_153;
}
operator delete(v145);
if ( v107 )
goto LABEL_154;
goto LABEL_157;
}
if ( (__s[0] & 1) == 0 )
goto LABEL_147;
LABEL_150:
operator delete(v145);
if ( !v106 )
goto LABEL_151;
LABEL_148:
v135 = -8.0;
v95 = Bird;
LABEL_212:
v117 = (cocos2d::CCString *)sub_1007AB580("Unlocked new %s!", v118);
v24 = (char *)cocos2d::CCString::getCString(v117);
v21 = GJItemIcon::create(
v95,
v136,
(cocos2d::ccColor3B)-5263441,
(cocos2d::ccColor3B)-1,
0,
0,
1,
(cocos2d::ccColor3B)-1);
if ( !v21 )
LABEL_80:
v21 = (GJItemIcon *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_achImage_001.png");
LABEL_81:
((void (__fastcall *)(GJItemIcon *, float *))v21->setPosition)(v21, &v120);
((void (__fastcall *)(cocos2d::CCLayerColor *, GJItemIcon *, __int64))v134->m_layerColor->addChild_0)(
v134->m_layerColor,
v21,
3);
v63 = v134;
v134->m_achievementSprite = v21;
v64 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCLayerColor *, cocos2d::CCNode *, __int64))v63->m_layerColor->addChild_0)(
v63->m_layerColor,
v64,
2);
v136 = (__int64)v64;
if ( v20 )
v65 = 1061997773;
else
v65 = 1060320051;
LODWORD(v138) = v65;
v66 = "bigFont.fnt";
if ( v20 )
v66 = "goldFont.fnt";
v67 = v20 + 11LL;
__s[0] = 2 * v67;
memcpy(&__s[1], v66, v67);
*((_BYTE *)&__n + v20 + 4) = 0;
v68 = cocos2d::CCLabelBMFont::create_3(v137, &__s[1]);
(*(void (__fastcall **)(__int64, cocos2d::CCLabelBMFont *))(*(_QWORD *)v136 + 440LL))(v136, v68);
sub_10028CBE0((float *)__s2, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v68->setAnchorPoint)(v68, __s2);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v68->setScale)(v68, *(float *)&v138);
v134->m_titleLabel = v68;
if ( *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getContentSize)(v68) > 200.0 )
{
v69 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getContentSize)(v68);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v68->setScale)(v68, 200.0 / *v69);
}
v70 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getScale)(v68);
*(_QWORD *)&v71 = (unsigned int)v138;
if ( *(float *)&v138 > v70 )
v71 = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getScale)(v68);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double))v68->setScale)(v68, v71);
v129 = (__int64)v21;
v72 = v130;
if ( v24 )
v72 = v24;
v73 = strlen(v72);
if ( v73 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v71);
v74 = v73;
if ( v73 >= 0x17 )
{
v76 = 26;
if ( (v73 | 7) != 0x17 )
v76 = (v73 | 7) + 1;
v75 = (char *)operator new(v76);
v126 = v75;
*(_QWORD *)&v125 = v76 | 1;
*((_QWORD *)&v125 + 1) = v74;
goto LABEL_99;
}
LOBYTE(v125) = 2 * v73;
v75 = (char *)&v125 + 1;
if ( v73 )
LABEL_99:
memmove(v75, v72, v74);
v75[v74] = 0;
sub_10028CBE0((float *)__s2, 0.0, 1.0);
v77 = TextArea::create(&v125, (__int64)"chatFont.fnt", __s2, 0, 1.0, 200.0, 20.0);
if ( (v125 & 1) != 0 )
operator delete(v126);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v136 + 440LL))(v136, v77);
sub_10028CBE0((float *)__s2, 0.0, 0.5);
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)v77 + 280LL))(v77, __s2);
sub_10028CBE0((float *)__s2, 0.0, 5.0);
v78 = (float *)v121;
v79 = v129;
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)v77 + 184LL))(v77, __s2);
*((_DWORD *)v77 + 160) = 1098907648;
v134->m_achievementDescription = (TextArea *)v77;
LODWORD(v137) = *(_DWORD *)(((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getContentSize)(v68) + 4);
LODWORD(v138) = *(_DWORD *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v77 + 312LL))(v77) + 4);
sub_10028CBE0((float *)&__dst, 0.0, 1.0);
LODWORD(v130) = __dst;
sub_10028CBE0(&v127, 0.0, 1.0);
*(float *)&v138 = *(float *)&v138 + 17.0;
v80 = *(float *)&v137 * 0.5;
*(float *)&v137 = (float)(*(float *)&v137 + *(float *)&v138) * 0.5;
if ( LOBYTE(v142) )
v81 = 2.5;
else
v81 = 0.0;
sub_10028CBE0((float *)__s2, *(float *)&v130, v81 + (float)((float)((float)(*(float *)&v137 - v80) + v128) + 2.0));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v68->setPosition)(v68, __s2);
sub_10028CBE0((float *)&__dst, 0.0, -1.0);
LODWORD(v130) = __dst;
sub_10028CBE0(&v127, 0.0, -1.0);
sub_10028CBE0(
(float *)__s2,
*(float *)&v130 + 1.0,
(float)((float)((float)((float)(*(float *)&v138 * 0.5) - *(float *)&v137) + 15.0) + v128) + -1.0);
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)v77 + 184LL))(v77, __s2);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v78 + 160LL))(v78, 1.0);
if ( !LOBYTE(v142) )
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v79 + 160LL))(v79, 1.0);
v142 = v78[108];
LODWORD(v138) = (*(float (__fastcall **)(float *))(*(_QWORD *)v78 + 168LL))(v78);
LODWORD(v137) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getContentSize)(v68);
v82 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getScale)(v68);
v83 = *((float *)v77 + 168);
if ( v83 <= (float)(*(float *)&v137 * v82) )
{
LODWORD(v137) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getContentSize)(v68);
v84 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v68->getScale)(v68);
v83 = *(float *)&v137 * v84;
}
sub_10028CBE0(
(float *)__s2,
(float)((float)(v142 * *(float *)&v138) * 0.5)
- (float)((float)((float)((float)(v83 + 5.0) + (float)((float)(v142 * *(float *)&v138) * 0.5)) + 30.0) * 0.5),
v135);
v85 = v134;
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v79 + 184LL))(v79, __s2);
v86 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v79 + 192LL))(v79);
v87 = v136;
sub_10028CBE0((float *)__s2, *v86 + 30.0, 0.0);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v87 + 184LL))(v87, __s2);
v85->m_unkUnused = 1118568448;
if ( (__s[0] & 1) != 0 )
operator delete(v145);
if ( (v122 & 1) != 0 )
operator delete(v124);
return v139;
}