// // AchievementBar::init from 0x1400806c0 to 0x140081c70 (5552 bytes) // // 2 xrefs: // > AchievementNotifier::notifyAchievement @ 0x14003ac67 // > @ 0x1406c69d8 // // 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 // // Hidden C++ exception states: #wind=7 bool AchievementBar::init(AchievementBar *a1, const char *a2, const char *a3, const char *a4, bool a5) { AchievementBar *v6; // r13 bool result; // al __int64 v8; // rcx cocos2d::CCDirector *v9; // rax struct cocos2d::CCLayerColor *v10; // rax cocos2d::CCLayerColor_vtbl *v11; // rbx const cocos2d::CCPoint *v12; // rax const char *v13; // rdx size_t v14; // r14 size_t v15; // r8 void **v16; // rbx struct cocos2d::CCRect *v17; // rax struct cocos2d::extension::CCScale9Sprite *v18; // rsi cocos2d::extension::CCScale9Sprite_vtbl *v19; // rbx const cocos2d::CCSize *v20; // rax struct cocos2d::CCSprite *v21; // rax struct cocos2d::CCRect *v22; // rax struct cocos2d::extension::CCScale9Sprite *v23; // rdi cocos2d::extension::CCScale9Sprite_vtbl *v24; // rbx const cocos2d::CCSize *v25; // rax cocos2d::extension::CCScale9Sprite_vtbl *v26; // rbx __int64 v27; // rax const char *v28; // r12 float v29; // xmm14_4 bool v30; // si struct cocos2d::CCSprite *v31; // rdi cocos2d::CCSprite_vtbl *v32; // rbx size_t v33; // r8 cocos2d::CCArray *v34; // rbx void *v35; // rcx cocos2d::CCString *v36; // rax const char *CString; // rdi cocos2d::CCString *v38; // rax UnlockType v39; // r15d const char *v40; // r12 size_t v41; // r8 void **v42; // rcx char *v43; // rbx size_t v44; // r8 __int64 v45; // r13 char *v46; // rax size_t v47; // r8 void **v48; // rcx char *v49; // rbx size_t v50; // r8 __int64 v51; // r13 char *v52; // rax size_t v53; // r8 int v54; // ebx size_t v55; // r8 __int128 *p_Buf2; // rcx char *v57; // rsi unsigned __int64 v58; // r13 size_t v59; // r8 __int64 v60; // rbx char *v61; // rax size_t v62; // r8 __int128 *v63; // rcx unsigned __int64 v64; // r13 size_t v65; // r8 __int64 v66; // rsi size_t v67; // r8 void **v68; // rcx char *v69; // r13 size_t v70; // r8 char *v71; // rax size_t v72; // r8 void **v73; // rcx char *v74; // r13 size_t v75; // r8 char *v76; // rax size_t v77; // r8 void **v78; // rcx char *v79; // r13 size_t v80; // r8 char *v81; // rax size_t v82; // r8 __int128 *v83; // rcx size_t v84; // r8 __int64 v85; // r13 size_t v86; // r8 __int128 *v87; // rcx char *v88; // r13 size_t v89; // r8 struct cocos2d::_ccColor4B v90; // esi char *v91; // rax size_t v92; // r8 __int128 *v93; // rcx char *v94; // rsi size_t v95; // r8 struct cocos2d::_ccColor4B v96; // ebx char *v97; // rax size_t v98; // r8 int v99; // ebx size_t v100; // r8 __int128 *v101; // rcx char *v102; // rdi size_t v103; // r8 __int64 v104; // r13 char *v105; // rax cocos2d::CCString *v106; // rax __int64 v107; // r15 float v108; // xmm6_4 __int64 *v109; // rdx size_t v110; // r8 const char *v111; // rdx struct cocos2d::CCLabelBMFont *v112; // rsi cocos2d::CCLabelBMFont_vtbl *v113; // rbx const cocos2d::CCPoint *v114; // rax cocos2d::CCLabelBMFont_vtbl *v115; // rbx const char *v116; // rax const struct cocos2d::CCPoint *v117; // rax char *v118; // r14 __int64 v119; // rbx __int64 v120; // rax __int64 v121; // rbx __int64 v122; // rax float height; // xmm6_4 float v124; // xmm0_4 float v125; // xmm7_4 float v126; // xmm10_4 float v127; // xmm7_4 bool v128; // r12 float v129; // xmm9_4 cocos2d::CCLabelBMFont_vtbl *v130; // rbx __int64 v131; // rax float v132; // xmm6_4 float *v133; // rax const cocos2d::CCPoint *v134; // rax __int64 v135; // rbx __int64 v136; // rax float v137; // xmm7_4 float *v138; // rax __int64 v139; // rax float *v140; // rbx double v141; // xmm0_8 float v142; // xmm7_4 float v143; // xmm6_4 float *v144; // rbx float *v145; // rbx double v146; // xmm0_8 float v147; // xmm1_4 cocos2d::CCSprite_vtbl *v148; // rbx const cocos2d::CCPoint *v149; // rax __int64 v150; // rbx float *v151; // rax __int64 v152; // rax void *v153; // rcx bool v154; // [rsp+38h] [rbp-D0h] cocos2d::ccColor3B *v155; // [rsp+48h] [rbp-C0h] bool v156; // [rsp+58h] [rbp-B0h] bool v157; // [rsp+58h] [rbp-B0h] bool v158; // [rsp+58h] [rbp-B0h] bool v159; // [rsp+58h] [rbp-B0h] bool v160; // [rsp+58h] [rbp-B0h] bool v161; // [rsp+58h] [rbp-B0h] bool v162; // [rsp+58h] [rbp-B0h] bool v163; // [rsp+58h] [rbp-B0h] bool v164; // [rsp+59h] [rbp-AFh] struct cocos2d::_ccColor4B v165; // [rsp+68h] [rbp-A0h] BYREF bool v166; // [rsp+78h] [rbp-90h] cocos2d::ccColor3B v167; // [rsp+88h] [rbp-80h] BYREF const char *v168; // [rsp+98h] [rbp-70h] BYREF struct cocos2d::CCSprite *v169; // [rsp+A0h] [rbp-68h] BYREF const char *v170; // [rsp+A8h] [rbp-60h] BYREF cocos2d::CCRect v171; // [rsp+B0h] [rbp-58h] BYREF AchievementBar *v172; // [rsp+C0h] [rbp-48h] BYREF float v173; // [rsp+C8h] [rbp-40h] cocos2d::CCPoint v174; // [rsp+D0h] [rbp-38h] BYREF void *Block[2]; // [rsp+D8h] [rbp-30h] BYREF unsigned __int64 v176; // [rsp+E8h] [rbp-20h] unsigned __int64 v177; // [rsp+F0h] [rbp-18h] __int128 Buf2; // [rsp+F8h] [rbp-10h] BYREF unsigned __int64 v179; // [rsp+108h] [rbp+0h] unsigned __int64 v180; // [rsp+110h] [rbp+8h] void *v181[2]; // [rsp+118h] [rbp+10h] BYREF __int64 v182; // [rsp+128h] [rbp+20h] unsigned __int64 v183; // [rsp+130h] [rbp+28h] __int128 v184; // [rsp+138h] [rbp+30h] BYREF __int64 v185; // [rsp+148h] [rbp+40h] unsigned __int64 v186; // [rsp+150h] [rbp+48h] v170 = a3; v168 = a2; v6 = a1; v172 = a1; v166 = a5; result = cocos2d::CCNodeRGBA::init(a1); if ( !result ) return result; v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8); cocos2d::CCDirector::getWinSize(v9); v165 = 0; v10 = cocos2d::CCLayerColor::create(&v165, 0.0, 0.0); v6->m_layerColor = v10; v6->addChild_1(v6, v10); v11 = v6->m_layerColor->__vftable; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, v173 * 0.5, 40.0); v11->setPosition_0(v6->m_layerColor, v12); v13 = "GJ_square01.png"; if ( a5 ) v13 = "GJ_square02.png"; *(_OWORD *)v181 = 0; v182 = 0; v183 = 0; v14 = -1; v15 = -1; do ++v15; while ( v13[v15] ); sub_14003A930(v181, v13, v15); v16 = v181; if ( v183 > 0xF ) v16 = (void **)v181[0]; v17 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)Block, 0.0, 0.0, 80.0, 80.0); v18 = cocos2d::extension::CCScale9Sprite::create((const char *)v16, v17); v19 = v18->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v169, 300.0, 80.0); v19->setContentSize(v18, v20); v6->m_layerColor->addChild_0(v6->m_layerColor, v18, 1); v6->m_bg = v18; v21 = cocos2d::CCSprite::createWithSpriteFrameName("achievementGlow_001.png"); v6->m_achievementGlowSprite = v21; ((void (__fastcall *)(struct cocos2d::CCSprite *))v21->setScale_0)(v21); v6->m_layerColor->addChild_0(v6->m_layerColor, v6->m_achievementGlowSprite, -1); v171.origin = (cocos2d::CCPoint)0x100000302LL; ((void (__fastcall *)(cocos2d::CCTextureProtocol *, __int64))v6->m_achievementGlowSprite->setBlendFunc)( &v6->m_achievementGlowSprite->cocos2d::CCTextureProtocol, 0x100000302LL); cocos2d::CCPoint::CCPoint(&v174, 40.0, 40.0); v22 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect(&v171, 0.0, 0.0, 80.0, 80.0); v23 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v22); v24 = v23->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v169, 300.0, 80.0); v24->setContentSize(v23, v25); v6->m_layerColor->addChild_0(v6->m_layerColor, v23, 100); v26 = v23->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v27 = (__int64)v18->getPosition_0(v18); v26->setPosition_0(v23, (const cocos2d::CCPoint *)v27); v23->setOpacity(&v23->cocos2d::CCRGBAProtocol, 0); cocos2d::extension::CCScale9Sprite::setBlendAdditive(v23, 1); v6->m_bg2 = v23; v28 = nullptr; v169 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); v29 = 0.0; v30 = v166; if ( v166 ) { v31 = cocos2d::CCSprite::createWithSpriteFrameName(a4); v28 = v170; v32 = v31->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v31->getContentSize(v31); ((void (__fastcall *)(struct cocos2d::CCSprite *))v32->setScale_0)(v31); goto LABEL_210; } if ( !a4 ) goto LABEL_211; *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v33 = -1; do ++v33; while ( a4[v33] ); sub_14003A930(Block, a4, v33); v34 = sub_140080420((__int64 *)Block); if ( v177 > 0xF ) { v35 = Block[0]; if ( v177 + 1 >= 0x1000 ) { v35 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v35 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v35); } v176 = 0; v177 = 15; LOBYTE(Block[0]) = 0; if ( cocos2d::CCArray::count(v34) < 2 ) goto LABEL_211; v36 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v34, 0); CString = cocos2d::CCString::getCString(v36); v38 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v34, 1u); LODWORD(v171.origin.x) = cocos2d::CCString::intValue(v38); v39 = 1; v40 = "Icon"; Buf2 = 0; v179 = 4; v180 = 15; strcpy((char *)&Buf2, "ship"); *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v41 = -1; do ++v41; while ( CString[v41] ); sub_14003A930(Block, CString, v41); v42 = Block; v164 = v177 > 0xF; v43 = (char *)Block[0]; if ( v177 > 0xF ) v42 = (void **)Block[0]; v44 = v176; if ( v176 > 4 ) v44 = 4; LODWORD(v45) = memcmp(v42, &Buf2, v44); if ( !(_DWORD)v45 ) { if ( v176 >= 4 ) v45 = v176 > 4; else LODWORD(v45) = -1; } if ( v164 ) { v46 = v43; if ( v177 + 1 >= 0x1000 ) { v43 = *((char **)v43 - 1); if ( (unsigned __int64)(v46 - v43 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v43); } if ( (_DWORD)v45 ) { Buf2 = 0; v179 = 4; v180 = 15; strcpy((char *)&Buf2, "ball"); *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v47 = -1; do ++v47; while ( CString[v47] ); sub_14003A930(Block, CString, v47); v48 = Block; v156 = v177 > 0xF; v49 = (char *)Block[0]; if ( v177 > 0xF ) v48 = (void **)Block[0]; v50 = v176; if ( v176 > 4 ) v50 = 4; LODWORD(v51) = memcmp(v48, &Buf2, v50); if ( !(_DWORD)v51 ) { if ( v176 >= 4 ) v51 = v176 > 4; else LODWORD(v51) = -1; } if ( v156 ) { v52 = v49; if ( v177 + 1 >= 0x1000 ) { v49 = *((char **)v49 - 1); if ( (unsigned __int64)(v52 - v49 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v49); } if ( !(_DWORD)v51 ) { v39 = 5; v40 = "Ball"; goto LABEL_206; } Buf2 = 0; v179 = 4; v180 = 15; strcpy((char *)&Buf2, "bird"); *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v53 = -1; do ++v53; while ( CString[v53] ); sub_14003A930(Block, CString, v53); v54 = sub_14003A760(Block, &Buf2); sub_14003A830((__int64)Block); sub_14003A830((__int64)&Buf2); if ( !v54 ) { v39 = Bird; v40 = (const char *)&dword_14053B9D8; v29 = -8.0; goto LABEL_206; } *(_OWORD *)Block = 0; v176 = 4; v177 = 15; strcpy((char *)Block, "dart"); Buf2 = 0; v179 = 0; v180 = 0; v55 = -1; do ++v55; while ( CString[v55] ); sub_14003A930(&Buf2, CString, v55); p_Buf2 = &Buf2; v157 = v180 > 0xF; v57 = (char *)Buf2; if ( v180 > 0xF ) p_Buf2 = (__int128 *)Buf2; v58 = v179; v59 = v179; if ( v179 > 4 ) v59 = 4; LODWORD(v60) = memcmp(p_Buf2, Block, v59); if ( !(_DWORD)v60 ) { if ( v58 >= 4 ) v60 = v58 > 4; else LODWORD(v60) = -1; } if ( v157 ) { v61 = v57; if ( v180 + 1 >= 0x1000 ) { v57 = *((char **)v57 - 1); if ( (unsigned __int64)(v61 - v57 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v57); } sub_14003A830((__int64)Block); if ( !(_DWORD)v60 ) { v39 = Dart; v40 = "Wave"; goto LABEL_206; } *(_OWORD *)Block = 0; v176 = 5; v177 = 15; strcpy((char *)Block, "robot"); Buf2 = 0; v179 = 0; v180 = 0; v62 = -1; do ++v62; while ( CString[v62] ); sub_14003A930(&Buf2, CString, v62); v63 = &Buf2; if ( v180 > 0xF ) v63 = (__int128 *)Buf2; v64 = v179; v65 = v179; if ( v179 > 5 ) v65 = 5; LODWORD(v66) = memcmp(v63, Block, v65); if ( !(_DWORD)v66 ) { if ( v64 >= 5 ) v66 = v64 > 5; else LODWORD(v66) = -1; } sub_14003A830((__int64)&Buf2); sub_14003A830((__int64)Block); if ( !(_DWORD)v66 ) { v39 = 8; v40 = "Robot"; goto LABEL_206; } Buf2 = 0; v179 = 6; v180 = 15; strcpy((char *)&Buf2, "spider"); *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v67 = -1; do ++v67; while ( CString[v67] ); sub_14003A930(Block, CString, v67); v68 = Block; v158 = v177 > 0xF; v69 = (char *)Block[0]; if ( v177 > 0xF ) v68 = (void **)Block[0]; v70 = v176; if ( v176 > 6 ) v70 = 6; v165 = (struct cocos2d::_ccColor4B)memcmp(v68, &Buf2, v70); if ( !*(_DWORD *)&v165 ) { if ( v176 >= 6 ) v165 = (struct cocos2d::_ccColor4B)(v176 > 6); else v165 = (struct cocos2d::_ccColor4B)-1; } if ( v158 ) { v71 = v69; if ( v177 + 1 >= 0x1000 ) { v69 = *((char **)v69 - 1); if ( (unsigned __int64)(v71 - v69 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v69); } if ( !*(_DWORD *)&v165 ) { v39 = 9; v40 = "Spider"; goto LABEL_206; } Buf2 = 0; v179 = 5; v180 = 15; strcpy((char *)&Buf2, "death"); *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v72 = -1; do ++v72; while ( CString[v72] ); sub_14003A930(Block, CString, v72); v73 = Block; v159 = v177 > 0xF; v74 = (char *)Block[0]; if ( v177 > 0xF ) v73 = (void **)Block[0]; v75 = v176; if ( v176 > 5 ) v75 = 5; v165 = (struct cocos2d::_ccColor4B)memcmp(v73, &Buf2, v75); if ( !*(_DWORD *)&v165 ) { if ( v176 >= 5 ) v165 = (struct cocos2d::_ccColor4B)(v176 > 5); else v165 = (struct cocos2d::_ccColor4B)-1; } if ( v159 ) { v76 = v74; if ( v177 + 1 >= 0x1000 ) { v74 = *((char **)v74 - 1); if ( (unsigned __int64)(v76 - v74 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v74); } if ( !*(_DWORD *)&v165 ) { v39 = Death; v40 = "Death Effect"; goto LABEL_206; } v179 = 7; v180 = 15; Buf2 = 0x6C616963657073uLL; *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v77 = -1; do ++v77; while ( CString[v77] ); sub_14003A930(Block, CString, v77); v78 = Block; v160 = v177 > 0xF; v79 = (char *)Block[0]; if ( v177 > 0xF ) v78 = (void **)Block[0]; v80 = v176; if ( v176 > 7 ) v80 = 7; v165 = (struct cocos2d::_ccColor4B)memcmp(v78, &Buf2, v80); if ( !*(_DWORD *)&v165 ) { if ( v176 >= 7 ) v165 = (struct cocos2d::_ccColor4B)(v176 > 7); else v165 = (struct cocos2d::_ccColor4B)-1; } if ( v160 ) { v81 = v79; if ( v177 + 1 >= 0x1000 ) { v79 = *((char **)v79 - 1); if ( (unsigned __int64)(v81 - v79 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v79); } if ( !*(_DWORD *)&v165 ) { v39 = Streak; v40 = "Trail"; goto LABEL_206; } *(_OWORD *)Block = 0; v176 = 5; v177 = 15; strcpy((char *)Block, "color"); Buf2 = 0; v179 = 0; v180 = 0; v82 = -1; do ++v82; while ( CString[v82] ); sub_14003A930(&Buf2, CString, v82); v83 = &Buf2; if ( v180 > 0xF ) v83 = (__int128 *)Buf2; v84 = v179; if ( v179 > 5 ) v84 = 5; LODWORD(v85) = memcmp(v83, Block, v84); if ( !(_DWORD)v85 ) { if ( v179 >= 5 ) v85 = v179 > 5; else LODWORD(v85) = -1; } sub_14003A830((__int64)&Buf2); if ( !(_DWORD)v85 ) { v39 = Col1; v40 = "Main Color"; goto LABEL_206; } *(_OWORD *)Block = 0; v176 = 6; v177 = 15; strcpy((char *)Block, "color2"); Buf2 = 0; v179 = 0; v180 = 0; v86 = -1; do ++v86; while ( CString[v86] ); sub_14003A930(&Buf2, CString, v86); v87 = &Buf2; v161 = v180 > 0xF; v88 = (char *)Buf2; if ( v180 > 0xF ) v87 = (__int128 *)Buf2; v89 = v179; if ( v179 > 6 ) v89 = 6; v165 = (struct cocos2d::_ccColor4B)memcmp(v87, Block, v89); if ( !*(_DWORD *)&v165 ) { if ( v179 < 6 ) { v90 = (struct cocos2d::_ccColor4B)-1; goto LABEL_160; } v165 = (struct cocos2d::_ccColor4B)(v179 > 6); } v90 = v165; LABEL_160: if ( v161 ) { v91 = v88; if ( v180 + 1 >= 0x1000 ) { v88 = *((char **)v88 - 1); if ( (unsigned __int64)(v91 - v88 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v88); } if ( !*(_DWORD *)&v90 ) { v39 = Col2; v40 = "Secondary Color"; goto LABEL_206; } *(_OWORD *)Block = 0; v176 = 5; v177 = 15; strcpy((char *)Block, "swing"); Buf2 = 0; v179 = 0; v180 = 0; v92 = -1; do ++v92; while ( CString[v92] ); sub_14003A930(&Buf2, CString, v92); v93 = &Buf2; v162 = v180 > 0xF; v94 = (char *)Buf2; if ( v180 > 0xF ) v93 = (__int128 *)Buf2; v95 = v179; if ( v179 > 5 ) v95 = 5; v165 = (struct cocos2d::_ccColor4B)memcmp(v93, Block, v95); if ( !*(_DWORD *)&v165 ) { if ( v179 < 5 ) { v96 = (struct cocos2d::_ccColor4B)-1; LABEL_178: if ( v162 ) { v97 = v94; if ( v180 + 1 >= 0x1000 ) { v94 = *((char **)v94 - 1); if ( (unsigned __int64)(v97 - v94 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v94); } if ( v96 ) { v179 = 7; v180 = 15; Buf2 = 0x6B63617074656AuLL; *(_OWORD *)Block = 0; v176 = 0; v177 = 0; v98 = -1; do ++v98; while ( CString[v98] ); sub_14003A930(Block, CString, v98); v99 = sub_14003A760(Block, &Buf2); sub_14003A830((__int64)Block); sub_14003A830((__int64)&Buf2); if ( v99 ) { Block[1] = nullptr; v176 = 8; v177 = 15; Block[0] = (void *)0x6572696670696873LL; Buf2 = 0; v179 = 0; v180 = 0; v100 = -1; do ++v100; while ( CString[v100] ); sub_14003A930(&Buf2, CString, v100); v101 = &Buf2; v163 = v180 > 0xF; v102 = (char *)Buf2; if ( v180 > 0xF ) v101 = (__int128 *)Buf2; v103 = v179; if ( v179 > 8 ) v103 = 8; LODWORD(v104) = memcmp(v101, Block, v103); if ( !(_DWORD)v104 ) { if ( v179 >= 8 ) v104 = v179 > 8; else LODWORD(v104) = -1; } if ( v163 ) { v105 = v102; if ( v180 + 1 >= 0x1000 ) { v102 = *((char **)v102 - 1); if ( (unsigned __int64)(v105 - v102 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v102); } if ( !(_DWORD)v104 ) { v39 = GJItem|Col2; v40 = "Ship Fire"; } } else { v39 = GJItem|Col1; v40 = "Jetpack"; } } else { v39 = GJItem|0x1; v40 = "Swing"; } goto LABEL_206; } v165 = (struct cocos2d::_ccColor4B)(v179 > 5); } v96 = v165; goto LABEL_178; } v39 = 4; v40 = "Ship"; LABEL_206: v106 = cocos2d::CCString::createWithFormat("Unlocked new %s!", v40); v28 = cocos2d::CCString::getCString(v106); *(_WORD *)&v167.r = -1; *(_WORD *)&v165.r = -20561; v31 = (struct cocos2d::CCSprite *)operator new(0x278u); Block[0] = v31; cocos2d::CCSprite::CCSprite(v31); v31->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCSprite_vtbl *)&GJItemIcon::`vftable'; v31->cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&GJItemIcon::`vftable'; v31->cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&GJItemIcon::`vftable'; v31[1].cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = nullptr; v31[1].m_uID = 0; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v31[1].m_nLuaID); LOBYTE(v31[1].m_uReference) = 0; *(_QWORD *)&v31[1].m_uAutoReleaseCount = 0; v167.b = -1; v165.b = -81; if ( GJItemIcon::init( (GJItemIcon *)v31, v39, SLODWORD(v171.origin.x), (cocos2d::ccColor3B *)&v165, &v167, 0, v154, 1, v155) ) { cocos2d::CCObject::autorelease(v31); } else { ((void (__fastcall *)(struct cocos2d::CCSprite *, __int64))v31->~CCSprite)(v31, 1); v31 = nullptr; } v6 = v172; v30 = v166; LABEL_210: if ( !v31 ) LABEL_211: v31 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_achImage_001.png"); v31->setPosition_0(v31, &v174); v6->m_layerColor->addChild_0(v6->m_layerColor, v31, 3); v6->m_achievementSprite = v31; v107 = cocos2d::CCNode::create(); v6->m_layerColor->addChild_0(v6->m_layerColor, (cocos2d::CCNode *)v107, 2); if ( v30 ) v108 = 0.80000001; else v108 = 0.69999999; v109 = &qword_14052A4D8; if ( v30 ) v109 = (__int64 *)"goldFont.fnt"; v184 = 0; v185 = 0; v186 = 0; v110 = -1; do ++v110; while ( *((_BYTE *)v109 + v110) ); sub_14003A930(&v184, v109, v110); v111 = (const char *)&v184; if ( v186 > 0xF ) v111 = (const char *)v184; v112 = cocos2d::CCLabelBMFont::create(v168, v111); (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v107 + 448LL))(v107, v112); v113 = v112->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, 0.0, 0.5); v113->setAnchorPoint(v112, v114); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v112->setScale_0)(v112); v6->m_titleLabel = v112; if ( v112->getContentSize(v112)->width > 200.0 ) { v115 = v112->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v112->getContentSize(v112); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v115->setScale_0)(v112); } fminf( v108, COERCE_FLOAT(COERCE_UNSIGNED_INT64(((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v112->getScale)(v112)))); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v112->setScale_0)(v112); v116 = v170; if ( v28 ) v116 = v28; v168 = (const char *)&Buf2; Buf2 = 0; v179 = 0; v180 = 0; do ++v14; while ( v116[v14] ); sub_14003A930(&Buf2, v116, v14); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 0.0, 1.0); v118 = TextArea::create((__int64)&Buf2, "chatFont.fnt", 1.0, 200.0, v117, 1101004800, 0); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v107 + 448LL))(v107, v118); v119 = *(_QWORD *)v118; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, 0.0, 0.5); (*(void (__fastcall **)(char *, __int64))(v119 + 272))(v118, v120); v121 = *(_QWORD *)v118; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, 0.0, 5.0); (*(void (__fastcall **)(char *, __int64))(v121 + 184))(v118, v122); *((_DWORD *)v118 + 164) = 1098907648; v6->m_achievementDescription = (TextArea *)v118; height = v112->getContentSize(v112)->height; v124 = *(float *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v118 + 304LL))(v118) + 4) + 17.0; v125 = (float)(v124 + height) * 0.5; v126 = v125 - (float)(v124 * 0.5); v127 = v125 - (float)(height * 0.5); v128 = v166; if ( v166 ) v129 = 2.5; else v129 = 0.0; v130 = v112->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, 0.0, 1.0); v132 = *(float *)(v131 + 4); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)Block, 0.0, 1.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v170, *v133, (float)((float)(v132 + v127) + 2.0) + v129); v130->setPosition_0(v112, v134); v135 = *(_QWORD *)v118; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, 0.0, -1.0); v137 = *(float *)(v136 + 4); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)Block, 0.0, -1.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v170, *v138 + 1.0, (float)((float)(15.0 - v126) + v137) - 1.0); (*(void (__fastcall **)(char *, __int64))(v135 + 184))(v118, v139); v140 = (float *)v169; ((void (__fastcall *)(struct cocos2d::CCSprite *))v169->setScale_0)(v169); if ( !v128 ) ((void (__fastcall *)(struct cocos2d::CCSprite *))v31->setScale_0)(v31); v141 = (*(double (__fastcall **)(float *))(*(_QWORD *)v140 + 168LL))(v140); v142 = *(float *)&v141 * v140[108]; v143 = *((float *)v118 + 172); v144 = (float *)v112->getContentSize(v112); if ( (float)(v112->getScale(v112) * *v144) <= v143 ) { v147 = *((float *)v118 + 172); } else { v145 = (float *)v112->getContentSize(v112); v146 = ((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v112->getScale)(v112); v147 = *(float *)&v146 * *v145; } v148 = v31->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v169, (float)(v142 * 0.5) - (float)((float)((float)((float)(v142 * 0.5) + (float)(v147 + 5.0)) + 30.0) * 0.5), v29); v148->setPosition_0(v31, v149); v150 = *(_QWORD *)v107; v151 = (float *)v31->getPosition_0(v31); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, *v151 + 30.0, 0.0); (*(void (__fastcall **)(__int64, __int64))(v150 + 184))(v107, v152); v6->m_unkUnused = 1118568448; sub_14003A830((__int64)&v184); if ( v183 > 0xF ) { v153 = v181[0]; if ( v183 + 1 >= 0x1000 ) { v153 = *((void **)v181[0] - 1); if ( (unsigned __int64)((char *)v181[0] - (char *)v153 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v153); } return 1; }