// // AchievementCell::loadFromDict from 0x3309d4 to 0x3313b6 (2530 bytes) // // 1 xrefs: // > CustomListView::loadCell @ 0x33bb3a // // 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 // void AchievementCell::loadFromDict(AchievementCell *a1, cocos2d::CCDictionary *a2) { cocos2d::CCString *v3; // r0 AchievementManager *v4; // r0 float v5; // s16 GJItemIcon *v6; // r6 cocos2d::CCSprite *v7; // r5 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2 int v10; // r6 cocos2d::CCString *v11; // r0 char *v12; // r8 cocos2d::CCArray *v13; // r0 cocos2d::CCArray *v14; // r8 int v15; // r10 int v16; // r6 const std::string *v17; // r1 cocos2d::CCObject *v18; // r0 cocos2d::CCString *v19; // r0 char *v20; // r6 cocos2d::CCString *v21; // r0 int v22; // r10 _BOOL4 v23; // r8 _BOOL4 v24; // r8 _BOOL4 v25; // r8 _BOOL4 v26; // r8 _BOOL4 v27; // r8 _BOOL4 v28; // r8 _BOOL4 v29; // r8 _BOOL4 v30; // r8 _BOOL4 v31; // r9 _BOOL4 v32; // r9 _BOOL4 v33; // r9 _BOOL4 v34; // r11 _BOOL4 v35; // r6 UnlockType v36; // r0 void (__fastcall *v37)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r5 cocos2d::CCNode *v38; // r8 void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 float *v40; // r0 cocos2d::CCString *v41; // r5 cocos2d::CCLabelBMFont *v42; // r5 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r9 void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // r4 float *v45; // r0 void (__fastcall *v46)(cocos2d::CCLabelBMFont *__hidden, float); // r4 int v47; // r1 cocos2d::CCString *v48; // r0 char *v49; // r0 std::string *v50; // r0 cocos2d::CCString *v51; // r0 char *v52; // r0 float *v53; // r9 void (__fastcall *v54)(float *, cocos2d::CCPoint *); // r8 void (__fastcall *v55)(float *, cocos2d::CCPoint *); // r8 char *v56; // r1 float height; // s18 int v58; // r0 void (__fastcall *v59)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 float v60; // s14 float v61; // s19 void (__fastcall *v62)(float *, cocos2d::CCPoint *); // r5 AchievementManager *v63; // r0 const char *v64; // r0 cocos2d::CCString *v65; // r0 cocos2d::CCLabelBMFont *v66; // r5 void (__fastcall *v67)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 int v68; // r8 cocos2d::CCSprite *v69; // r5 void (__fastcall *v70)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6 void (__fastcall *v71)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::ccColor3B v72; // [sp+Ch] [bp-48h] _BOOL4 isAchievementEarned; // [sp+14h] [bp-40h] char *CString; // [sp+18h] [bp-3Ch] int v76; // [sp+1Ch] [bp-38h] cocos2d::ccColor3B v77; // [sp+28h] [bp-2Ch] cocos2d::ccColor3B v78; // [sp+2Ch] [bp-28h] char *v79; // [sp+30h] [bp-24h] BYREF std::string v80; // [sp+34h] [bp-20h] BYREF std::string v81; // [sp+38h] [bp-1Ch] BYREF cocos2d::CCPoint v82; // [sp+3Ch] [bp-18h] BYREF cocos2d::CCPoint v83; // [sp+44h] [bp-10h] BYREF a1->m_backgroundLayer->setOpacity(a1->m_backgroundLayer, 255); a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, 1); sub_776584((int)&v83, "identifier"); v3 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, (const std::string *)&v83); CString = (char *)cocos2d::CCString::getCString(v3); sub_774008(&v83); v4 = AchievementManager::sharedState(); isAchievementEarned = AchievementManager::isAchievementEarned(v4, CString); if ( !isAchievementEarned ) { v5 = 0.0; v6 = (GJItemIcon *)cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); v7 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lock_001.png"); v6->addChild(v6, v7); setPosition = v7->setPosition; cocos2d::CCPoint::CCPoint(&v83, v6->m_obRect.size.width * 0.5, v6->m_obRect.size.height * 0.5); setPosition(v7, &v83); setColor = v6->setColor; LOWORD(v83.x) = -20561; BYTE2(v83.x) = -81; setColor(v6, (const cocos2d::ccColor3B *)&v83); goto LABEL_41; } sub_776584((int)&v83, "icon"); v10 = cocos2d::CCDictionary::objectForKey(a2, (const std::string *)&v83); sub_774008(&v83); if ( v10 ) { sub_776584((int)&v83, "icon"); v11 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, (const std::string *)&v83); v12 = (char *)cocos2d::CCString::getCString(v11); sub_774008(&v83); v13 = (cocos2d::CCArray *)sub_776584((int)&v81, v12); v14 = (cocos2d::CCArray *)cocos2d::CCArray::create(v13); v15 = sub_774A78((int)&v81, "_"); v16 = 0; v76 = *((_DWORD *)v81.m_data.m_data - 3); while ( 1 ) { sub_776158(&v82, &v81, v16, v15 - v16); if ( *(_DWORD *)(LODWORD(v82.x) - 12) || v16 != v76 ) { sub_776584((int)&v83, (char *)LODWORD(v82.x)); v18 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v83, v17); cocos2d::CCArray::addObject(v14, v18); sub_774008(&v83); } if ( v15 == -1 ) break; v16 = v15 + 1; v15 = sub_774A78((int)&v81, "_"); sub_774008(&v82); } sub_774008(&v82); sub_774008(&v81); if ( cocos2d::CCArray::count(v14) > 1u ) { v19 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v14, 0); v20 = (char *)cocos2d::CCString::getCString(v19); v21 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v14, 1u); v22 = cocos2d::CCString::intValue(v21); sub_776584((int)&v82, v20); sub_776584((int)&v83, "ship"); v23 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v23 ) { v36 = 4; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "ball"); v24 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v24 ) { v36 = 5; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "bird"); v25 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v25 ) { v36 = Bird; v5 = -5.0; goto LABEL_39; } sub_776584((int)&v82, v20); sub_776584((int)&v83, "dart"); v26 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v26 ) { v36 = Dart; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "robot"); v27 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v27 ) { v36 = 8; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "spider"); v28 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v28 ) { v36 = 9; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "death"); v29 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v29 ) { v36 = Death; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "special"); v30 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v30 ) { v36 = Streak; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "swing"); v31 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v31 ) { v36 = GJItem|0x1; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "jetpack"); v32 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v32 ) { v36 = GJItem|Col1; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "shipstreak"); v33 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v33 ) { v36 = GJItem|Col2; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "color"); v34 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v34 ) { v36 = Col1; } else { sub_776584((int)&v82, v20); sub_776584((int)&v83, "color2"); v35 = sub_32DBB0((int)&v82, (int)&v83); sub_774008(&v83); sub_774008(&v82); if ( v35 ) v36 = Col2; else v36 = 1; } } } } } } } } } } } v5 = 0.0; LABEL_39: *(_WORD *)&v77.r = -20561; v77.b = -81; *(_WORD *)&v78.r = -1; v78.b = -1; *(_WORD *)&v72.r = -1; v72.b = -1; v6 = GJItemIcon::create(v36, v22, v77, v78, 0, 0, 0, v72); if ( v6 ) goto LABEL_41; goto LABEL_40; } } v5 = 0.0; LABEL_40: v6 = (GJItemIcon *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_achImage_001.png"); LABEL_41: v37 = v6->setPosition; cocos2d::CCPoint::CCPoint(&v83, 35.0, v5 + (float)(a1->m_height * 0.5)); v37(v6, &v83); a1->m_mainLayer->addChild(a1->m_mainLayer, v6); ((void (__fastcall *)(GJItemIcon *, int))v6->setScale)(v6, 1065353216); v38 = cocos2d::CCNode::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v38); v39 = v38->setPosition; v40 = (float *)v6->getPosition(v6); cocos2d::CCPoint::CCPoint(&v83, *v40 + 32.0, a1->m_height * 0.5); v39(v38, &v83); sub_776584((int)&v83, "title"); v41 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, (const std::string *)&v83); sub_774008(&v83); cocos2d::CCString::getCString(v41); v42 = cocos2d::CCLabelBMFont::create(); v38->addChild(v38, v42); setAnchorPoint = v42->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v83, 0.0, 0.5); setAnchorPoint(v42, &v83); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v42->setScale)(v42, 1060320051); if ( v42->getContentSize(v42)->width > 200.0 ) { setScale = v42->setScale; v45 = (float *)v42->getContentSize(v42); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))setScale)(v42, 200.0 / *v45); } v46 = v42->setScale; if ( v42->getScale(v42) >= 0.7 ) v47 = 1060320051; else v47 = ((int (__fastcall *)(cocos2d::CCLabelBMFont *))v42->getScale)(v42); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v46)(v42, v47); v79 = (char *)&unk_ACDDA8; if ( isAchievementEarned ) { sub_776584((int)&v80, "achievedDescription"); v48 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(a2, &v80); v49 = (char *)cocos2d::CCString::getCString(v48); sub_7753D4((int)&v79, v49); v50 = &v80; } else { sub_776584((int)&v81, "unachievedDescription"); v51 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(a2, &v81); v52 = (char *)cocos2d::CCString::getCString(v51); sub_7753D4((int)&v79, v52); v50 = &v81; } sub_774008(v50); sub_776584((int)&v82, " "); cocos2d::CCPoint::CCPoint(&v83, 0.0, 1.0); v53 = (float *)TextArea::create( (TextArea *)&v82, (std::string)"chatFont.fnt", (const char *)0x3F800000, 1128136704, &v83, (cocos2d::CCPoint)1101004800LL); sub_774008(&v82); v38->addChild(v38, (cocos2d::CCNode *)v53); v54 = *(void (__fastcall **)(float *, cocos2d::CCPoint *))(*(_DWORD *)v53 + 140); cocos2d::CCPoint::CCPoint(&v83, 0.0, 0.5); v54(v53, &v83); v55 = *(void (__fastcall **)(float *, cocos2d::CCPoint *))(*(_DWORD *)v53 + 92); cocos2d::CCPoint::CCPoint(&v83, 0.0, 5.0); v55(v53, &v83); v56 = v79; v53[132] = 16.0; sub_776584((int)&v83, v56); TextArea::setString((int)v53, &v83); sub_774008(&v83); height = v42->getContentSize(v42)->height; v58 = (*(int (__fastcall **)(float *))(*(_DWORD *)v53 + 156))(v53); v59 = v42->setPosition; v60 = *(float *)(v58 + 4) + 17.0; v61 = (float)(height + v60) * 0.5; cocos2d::CCPoint::CCPoint(&v83, 0.0, (float)((float)(v61 - (float)(height * 0.5)) + 3.0) + 2.0); v59(v42, &v83); v62 = *(void (__fastcall **)(float *, cocos2d::CCPoint *))(*(_DWORD *)v53 + 92); cocos2d::CCPoint::CCPoint(&v83, 0.0, (float)(16.0 - (float)(v61 - (float)(v60 * 0.5))) - 2.0); v62(v53, &v83); v63 = AchievementManager::sharedState(); v64 = (const char *)AchievementManager::percentForAchievement(v63, CString); if ( !v64 || v64 == (const char *)&dword_64 ) { if ( !isAchievementEarned ) goto LABEL_55; LABEL_54: v69 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png"); v70 = v69->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v83, 0.0, 0.5); v70(v69, &v83); a1->m_mainLayer->addChild(a1->m_mainLayer, v69); ((void (__fastcall *)(cocos2d::CCSprite *, int))v69->setScale)(v69, 1061997773); v71 = v69->setPosition; cocos2d::CCPoint::CCPoint(&v83, a1->m_width - 40.0, a1->m_height * 0.5); v71(v69, &v83); goto LABEL_55; } if ( isAchievementEarned ) goto LABEL_54; v65 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", v64); cocos2d::CCString::getCString(v65); v66 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v66, 10); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v66->setScale)(v66, 1058642330); v67 = v66->setPosition; v68 = (int)v6->getPosition(v6); cocos2d::CCPoint::CCPoint(&v82, 0.0, -25.0); cocos2d::CCPoint::operator+(&v83, v68, &v82); v67(v66, &v83); LABEL_55: sub_774008(&v79); }
GD Web Decomp Icon

GD Web Decomp

Raw Source