// // MapPackCell::loadFromMapPack from 0x428a10 to 0x429228 (2072 bytes) // // 2 xrefs: // > MapPackCell::reloadCell @ 0x429258 // > CustomListView::loadCell @ 0x4340a8 // // 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:48:06 +0000 // int __fastcall MapPackCell::loadFromMapPack(MapPackCell *this, GJMapPack *a2) { const char *v4; // r6 cocos2d::CCString *v5; // r0 cocos2d::CCSprite *CString; // r0 const char *v7; // r1 int v8; // r5 void (__fastcall *v9)(int, char *); // r7 const char *v10; // r2 cocos2d::CCLabelBMFont *v11; // r0 int v12; // r5 void (__fastcall *v13)(int, char *); // r2 _BYTE *v14; // r3 char v15; // r0 char v16; // r1 void (__fastcall *v17)(int, char *); // r7 void (__fastcall *v18)(int, _DWORD); // r7 float *v19; // r0 void (__fastcall *v20)(int, int); // r7 int v21; // r1 ButtonSprite *v22; // r7 int v23; // r0 int v24; // r5 float v25; // s17 int (__fastcall *v26)(int, char *); // r8 float *v27; // r0 GameStatsManager *v28; // r0 GameStatsManager *v29; // r0 const char *v30; // r1 int hasCompletedMapPack; // r7 int v32; // r8 int v33; // r5 void (__fastcall *v34)(int, char *); // r9 const char *v35; // r1 float *v36; // r8 void (__fastcall *v37)(float *, char *); // r2 _BYTE *v38; // r3 char v39; // r0 char v40; // r1 float v41; // s17 void (__fastcall *v42)(float *, char *); // r9 void (__fastcall *v43)(float *, char *); // r9 int v44; // r0 int v45; // s17 int v46; // r0 float v47; // s14 void (__fastcall *v48)(float *, char *); // r9 float v49; // s17 float v50; // r3 const char *v51; // r8 int v52; // r0 cocos2d::CCString *v53; // r0 cocos2d::CCLabelBMFont *v54; // r0 const char *v55; // r2 int v56; // r8 void (__fastcall *v57)(int, int); // r9 int v58; // r0 int result; // r0 const char *v60; // r1 int v61; // r2 float v62; // s19 int v63; // r10 cocos2d::CCObject *v64; // r8 void (__fastcall *v65)(cocos2d::CCObject *, char *); // r9 float v66; // s15 cocos2d::CCString *v67; // r0 cocos2d::CCLabelBMFont *v68; // r0 const char *v69; // r2 cocos2d::CCObject *v70; // r6 void (__fastcall *v71)(cocos2d::CCObject *, char *); // r11 int (__fastcall *v72)(cocos2d::CCObject *, char *); // r2 cocos2d::CCObject *v73; // r9 void (__fastcall *v74)(cocos2d::CCObject *, char *); // r6 float v75; // s15 cocos2d::CCString *v76; // r0 cocos2d::CCLabelBMFont *v77; // r0 const char *v78; // r2 cocos2d::CCObject *v79; // r6 void (__fastcall *v80)(cocos2d::CCObject *, char *); // r10 int v81; // r11 void (__fastcall *v82)(cocos2d::CCObject *, char *); // r2 int v83; // r6 int (__fastcall *v84)(int, char *); // r7 int v85; // r8 const char *v86; // r1 int v87; // r0 int v88; // r0 int v89; // r5 void (__fastcall *v90)(int, int); // r8 int v91; // r0 float v92; // [sp+10h] [bp-54h] int v93; // [sp+14h] [bp-50h] void (__fastcall *v94)(cocos2d::CCObject *, char *); // [sp+14h] [bp-50h] void (__fastcall *v95)(cocos2d::CCObject *, char *); // [sp+1Ch] [bp-48h] _BYTE v96[4]; // [sp+24h] [bp-40h] BYREF _BYTE v97[8]; // [sp+28h] [bp-3Ch] BYREF _DWORD (*v98)(MapPackCell *__hidden, cocos2d::CCObject *); // [sp+30h] [bp-34h] int v99; // [sp+34h] [bp-30h] unsigned int (__fastcall *v100)(GJMapPack **, cocos2d::CCObject *); // [sp+38h] [bp-2Ch] int v101; // [sp+3Ch] [bp-28h] int v102[3]; // [sp+40h] [bp-24h] BYREF char v103; // [sp+4Ch] [bp-18h] BYREF char v104; // [sp+4Dh] [bp-17h] char v105; // [sp+4Eh] [bp-16h] (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1); cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 109)); cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 108)); *((_DWORD *)this + 105) = a2; v4 = *((const char **)a2 + 68); v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"difficulty_%02d_btn_001.png", v4); CString = (cocos2d::CCSprite *)cocos2d::CCString::getCString(v5); if ( !v4 ) CString = (cocos2d::CCSprite *)"difficulty_auto_btn_001.png"; v8 = cocos2d::CCSprite::createWithSpriteFrameName(CString, v7); v9 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v8 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103, 31.0, *((float *)this + 101) * 0.5); v9(v8, &v103); (*(void (__fastcall **)(int, int))(*(_DWORD *)v8 + 80))(v8, 1066192077); (*(void (__fastcall **)(MapPackCell *, int, int))(*(_DWORD *)this + 232))(this, v8, 2); std::string::basic_string(v102, *((_DWORD *)this + 105) + 284); if ( (v102[0] & 1) != 0 ) v11 = (cocos2d::CCLabelBMFont *)v102[2]; else v11 = (cocos2d::CCLabelBMFont *)((char *)v102 + 1); v12 = cocos2d::CCLabelBMFont::create(v11, "bigFont.fnt", v10); std::string::~string((int)v102); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v12); v13 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v12 + 536); v14 = *((_BYTE **)this + 105); v15 = v14[312]; v16 = v14[313]; LOBYTE(v14) = v14[311]; v104 = v15; v105 = v16; v103 = (char)v14; v13(v12, &v103); v17 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v12 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v103, (float)((float)(*((float *)this + 100) * 0.5) - 14.0) - 2.0, (float)(*((float *)this + 101) * 0.5) + 30.0); v17(v12, &v103); if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v12 + 164))(v12) > 205.0 ) { v18 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v12 + 80); v19 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v12 + 164))(v12); v18(v12, 205.0 / *v19); } v20 = *(void (__fastcall **)(int, int))(*(_DWORD *)v12 + 80); if ( (*(float (__fastcall **)(int))(*(_DWORD *)v12 + 84))(v12) > 0.9 ) v21 = 1063675494; else v21 = (*(int (__fastcall **)(int))(*(_DWORD *)v12 + 84))(v12); v20(v12, v21); v98 = MapPackCell::onClick; v99 = 0; v22 = ButtonSprite::create( (ButtonSprite *)"View", (const char *)&word_32, 0, 0.6, 0, "bigFont.fnt", "GJ_button_01.png", (const char *)0x42480000, v92); v23 = CCMenuItemSpriteExtra::create((int)v22, 0, (int)this, (int)MapPackCell::onClick, 0); *((_DWORD *)this + 106) = v23; CCMenuItemSpriteExtra::setSizeMult(v23, 1.5); v24 = cocos2d::CCMenu::create(*((cocos2d::CCMenu **)this + 106), nullptr); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v24); v25 = *((float *)this + 100); v26 = *(int (__fastcall **)(int, char *))(*(_DWORD *)v24 + 92); v27 = (float *)(*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v22 + 164))(v22); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v103, (float)(v25 - (float)(*v27 * 0.5)) - 9.0, *((float *)this + 101) * 0.5); v28 = (GameStatsManager *)v26(v24, &v103); v29 = (GameStatsManager *)GameStatsManager::sharedState(v28); hasCompletedMapPack = GameStatsManager::hasCompletedMapPack(v29, *(_DWORD *)(*((_DWORD *)this + 105) + 268)); if ( !hasCompletedMapPack ) { v32 = GJMapPack::completedMaps(*((GJMapPack **)this + 105)); if ( v32 >= GJMapPack::totalMaps(*((GJMapPack **)this + 105)) ) { (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 106) + 172))(*((_DWORD *)this + 106), 0); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 106) + 528))(*((_DWORD *)this + 106), 0); v87 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_rewardBtn_001.png", v86); v100 = MapPackCell::onClaimReward; v101 = 0; v88 = CCMenuItemSpriteExtra::create(v87, 0, (int)this, (int)MapPackCell::onClaimReward, 0); *((_DWORD *)this + 107) = v88; CCMenuItemSpriteExtra::setSizeMult(v88, 1.5); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v24 + 228))(v24, *((_DWORD *)this + 107)); v89 = *((_DWORD *)this + 107); v90 = *(void (__fastcall **)(int, int))(*(_DWORD *)v89 + 92); v91 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 106) + 96))(*((_DWORD *)this + 106)); v90(v89, v91); } } v96[0] = 0; v96[1] = 0; v96[2] = 0; v33 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v30); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v33 + 480))(v33, v96); (*(void (__fastcall **)(int, int))(*(_DWORD *)v33 + 456))(v33, 125); (*(void (__fastcall **)(int, int))(*(_DWORD *)v33 + 72))(v33, 1061997773); (*(void (__fastcall **)(int, int))(*(_DWORD *)v33 + 64))(v33, 1058642330); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v33, 3); v34 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v33 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v103, (float)(*((float *)this + 100) * 0.5) - 14.0, (float)(*((float *)this + 101) * 0.5) - 2.0); v34(v33, &v103); v36 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v35); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v36 + 64))(v36, 1065101558); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v36 + 72))(v36, 1062501089); v37 = *(void (__fastcall **)(float *, char *))(*(_DWORD *)v36 + 480); v38 = *((_BYTE **)this + 105); v39 = v38[309]; v40 = v38[310]; LOBYTE(v38) = v38[308]; v104 = v39; v105 = v40; v103 = (char)v38; v37(v36, &v103); v41 = v36[86] - (float)(v36[86] * 0.985); (*(void (__fastcall **)(int, float *, int))(*(_DWORD *)v33 + 232))(v33, v36, 1); v42 = *(void (__fastcall **)(float *, char *))(*(_DWORD *)v36 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103, 0.0, 0.5); v42(v36, &v103); v43 = *(void (__fastcall **)(float *, char *))(*(_DWORD *)v36 + 92); v44 = (*(int (__fastcall **)(int))(*(_DWORD *)v33 + 164))(v33); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103, v41 * 0.5, *(float *)(v44 + 4) * 0.5); v43(v36, &v103); v45 = GJMapPack::completedMaps(*((GJMapPack **)this + 105)); v46 = GJMapPack::totalMaps(*((GJMapPack **)this + 105)); v47 = v36[86]; v48 = *(void (__fastcall **)(float *, char *))(*(_DWORD *)v36 + 568); v49 = (float)v45 / (float)v46; if ( v47 > (float)(v47 * v49) ) v50 = v47 * v49; else v50 = v36[86]; cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v103, 0.0, 0.0, v50, v36[87]); v48(v36, &v103); v51 = (const char *)GJMapPack::completedMaps(*((GJMapPack **)this + 105)); v52 = GJMapPack::totalMaps(*((GJMapPack **)this + 105)); v53 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i/%i", v51, v52); v54 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v53); v56 = cocos2d::CCLabelBMFont::create(v54, "bigFont.fnt", v55); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v56, 4); v57 = *(void (__fastcall **)(int, int))(*(_DWORD *)v56 + 92); v58 = (*(int (__fastcall **)(int))(*(_DWORD *)v33 + 96))(v33); v57(v56, v58); result = (*(int (__fastcall **)(int, int))(*(_DWORD *)v56 + 80))(v56, 1056964608); v61 = *((_DWORD *)this + 105); v62 = (float)(*((float *)this + 101) * 0.5) - 30.0; if ( *(int *)(v61 + 280) > 0 ) v63 = (*(_DWORD *)(v61 + 276) > 0) + 1; else v63 = *(_DWORD *)(v61 + 276) > 0; if ( *(int *)(v61 + 276) > 0 ) { v64 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_starsIcon_001.png", v60); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(**((_DWORD **)this + 103) + 232))( *((_DWORD *)this + 103), v64, 2); v65 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v64 + 92); v66 = (float)(*((float *)this + 100) * 0.5) - 4.0; if ( v63 == 2 ) v66 = v66 - 40.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103, v66, v62); v65(v64, &v103); v67 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", *(const char **)(*((_DWORD *)this + 105) + 276)); v68 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v67); v70 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v68, "bigFont.fnt", v69); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(**((_DWORD **)this + 103) + 232))( *((_DWORD *)this + 103), v70, 1); v71 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v70 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103, 1.0, 0.5); v71(v70, &v103); v95 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v70 + 92); v93 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v64 + 96))(v64); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, -17.0, 0.0); cocos2d::CCPoint::operator+(&v103, v93, v97); v95(v70, &v103); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v70 + 80))(v70, 1060320051); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 109), v64); result = cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 108), v70); if ( hasCompletedMapPack ) { v72 = *(int (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v70 + 536); v103 = -1; v104 = -1; v105 = 50; result = v72(v70, &v103); } } if ( *(int *)(*((_DWORD *)this + 105) + 280) <= 0 ) { if ( !hasCompletedMapPack ) return result; goto LABEL_31; } v73 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_coinsIcon_001.png", v60); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(**((_DWORD **)this + 103) + 232))( *((_DWORD *)this + 103), v73, 2); v74 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v73 + 92); v75 = (float)(*((float *)this + 100) * 0.5) - 4.0; if ( v63 == 2 ) v75 = v75 + 40.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103, v75, v62); v74(v73, &v103); v76 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", *(const char **)(*((_DWORD *)this + 105) + 280)); v77 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v76); v79 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v77, "bigFont.fnt", v78); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(**((_DWORD **)this + 103) + 232))( *((_DWORD *)this + 103), v79, 1); v80 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v79 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103, 1.0, 0.5); v80(v79, &v103); v94 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v79 + 92); v81 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v73 + 96))(v73); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, -19.0, 0.0); cocos2d::CCPoint::operator+(&v103, v81, v97); v94(v79, &v103); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v79 + 80))(v79, 1060320051); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 109), v73); result = cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 108), v79); if ( hasCompletedMapPack ) { v82 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v79 + 536); v103 = -1; v104 = -1; v105 = 50; v82(v79, &v103); LABEL_31: v83 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_completesIcon_001.png", v60); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v83, 5); (*(void (__fastcall **)(int, int))(*(_DWORD *)v83 + 80))(v83, 1065353216); v84 = *(int (__fastcall **)(int, char *))(*(_DWORD *)v83 + 92); v85 = (*(int (__fastcall **)(int))(*(_DWORD *)v33 + 96))(v33); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 86.0, 1.0); cocos2d::CCPoint::operator+(&v103, v85, v97); return v84(v83, &v103); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source