// // LevelInfoLayer::setupLevelInfo from 0x49c420 to 0x49cc3a (2074 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x49db8c // // 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:49:46 +0000 // GJGameLevel *__fastcall LevelInfoLayer::setupLevelInfo(GJGameLevel **this) { cocos2d::CCObject *v2; // r0 float v3; // s20 cocos2d::CCDirector *v4; // r0 const char *v5; // r1 cocos2d::CCObject *v6; // r9 const char *v7; // r1 cocos2d::CCObject *v8; // r8 const char *v9; // r1 const char *v10; // r1 const char *v11; // r2 GJGameLevel *v12; // r0 int v13; // r7 const char *v14; // r2 GJGameLevel *v15; // r0 int v16; // r7 const char *v17; // r2 GJGameLevel *v18; // r0 int v19; // r7 const char *v20; // r2 GJGameLevel *v21; // r0 int v22; // r7 const char *v23; // r2 GJGameLevel *v24; // r0 int v25; // r6 void (__fastcall *v26)(int, _BYTE *); // r7 GJGameLevel *v27; // r0 _BOOL4 v28; // r6 int isPlatformer; // r0 float v30; // s18 float v31; // s16 int v32; // r7 float v33; // s19 float v34; // s17 void (__fastcall *v35)(cocos2d::CCObject *, _BYTE *); // r10 void (__fastcall *v36)(cocos2d::CCObject *, _BYTE *); // r10 int v37; // r10 void (__fastcall *v38)(int, _BYTE *); // r11 int v39; // r0 int v40; // r8 void (__fastcall *v41)(int, _BYTE *); // r10 int v42; // r8 void (__fastcall *v43)(int, _BYTE *); // r10 int v44; // r8 void (__fastcall *v45)(int, _BYTE *); // r10 int v46; // r0 void (__fastcall *v47)(cocos2d::CCObject *, _BYTE *); // r8 void (__fastcall *v48)(cocos2d::CCObject *, _BYTE *); // r8 int v49; // r10 void (__fastcall *v50)(int, _BYTE *); // r11 int v51; // r0 int v52; // r9 int v53; // r11 int v54; // r9 void (__fastcall *v55)(int, _BYTE *); // r10 int v56; // r8 void (__fastcall *v57)(int, _BYTE *); // r9 int v58; // r8 void (__fastcall *v59)(int, _BYTE *); // r9 int v60; // r0 int v61; // r0 GJGameLevel *v62; // r3 const char *v63; // r1 char *v64; // r0 GJGameLevel *v65; // r0 GJGameLevel *v66; // r3 int v67; // r8 void (__fastcall *v68)(int, _BYTE *); // r10 const char *v69; // r2 GJGameLevel *v70; // r0 GJGameLevel *v71; // r3 int v72; // r8 void (__fastcall *v73)(int, _BYTE *); // r10 int v74; // r8 void (__fastcall *v75)(int, _BYTE *); // r10 int v76; // r11 const char *v77; // r1 int v78; // r8 GameStatsManager *v79; // r0 GameStatsManager *v80; // r0 GameStatsManager *v81; // r0 cocos2d::CCString *v82; // r0 const char *CString; // r0 const char *v84; // r6 size_t v85; // r0 const char *v86; // r2 cocos2d::CCLabelBMFont *v87; // r0 int v88; // r6 void (__fastcall *v89)(int, _BYTE *); // r11 float v90; // s16 float v91; // s15 void (__fastcall *v92)(int, _BYTE *); // r11 float v93; // r2 void (__fastcall *v94)(int, _BYTE *); // r9 int v95; // r8 unsigned int i; // r5 int v97; // r0 void (__fastcall *v99)(int, _BYTE *); // r2 void (__fastcall *v100)(int, _BYTE *); // [sp+4h] [bp-38h] void (__fastcall *v101)(int, _BYTE *); // [sp+4h] [bp-38h] void (__fastcall *v102)(int, _BYTE *); // [sp+4h] [bp-38h] void (__fastcall *v103)(int, _BYTE *); // [sp+4h] [bp-38h] void (__fastcall *v104)(int, _BYTE *); // [sp+4h] [bp-38h] GameStatsManager *BaseDiamonds; // [sp+4h] [bp-38h] char *AwardedDiamondsForLevel; // [sp+8h] [bp-34h] float v107[2]; // [sp+10h] [bp-2Ch] BYREF _BYTE v108[8]; // [sp+18h] [bp-24h] BYREF _BYTE v109[8]; // [sp+20h] [bp-1Ch] BYREF int v110[2]; // [sp+28h] [bp-14h] BYREF cocos2d::CCLabelBMFont *v111; // [sp+30h] [bp-Ch] v2 = (cocos2d::CCObject *)cocos2d::CCArray::create((cocos2d::CCArray *)this); v3 = 6.0; *(this + 114) = v2; v4 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(v2); cocos2d::CCDirector::sharedDirector(v4); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v107); v6 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_timeIcon_001.png", v5); v8 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_downloadsIcon_001.png", v7); *(this + 107) = (GJGameLevel *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"currencyOrbIcon_001.png", v9); *(this + 106) = (GJGameLevel *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_likesIcon_001.png", v10); v12 = (GJGameLevel *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", v11); *(this + 98) = v12; (*(void (__fastcall **)(GJGameLevel *, int))(*(_DWORD *)v12 + 80))(v12, 1056964608); v13 = (int)*(this + 98); v100 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v100(v13, v109); v15 = (GJGameLevel *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", v14); *(this + 99) = v15; (*(void (__fastcall **)(GJGameLevel *, int))(*(_DWORD *)v15 + 80))(v15, 1056964608); v16 = (int)*(this + 99); v101 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v16 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v101(v16, v109); v18 = (GJGameLevel *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", v17); *(this + 100) = v18; (*(void (__fastcall **)(GJGameLevel *, int))(*(_DWORD *)v18 + 80))(v18, 1056964608); v19 = (int)*(this + 100); v102 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v19 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v102(v19, v109); v21 = (GJGameLevel *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", v20); *(this + 101) = v21; (*(void (__fastcall **)(GJGameLevel *, int))(*(_DWORD *)v21 + 80))(v21, 1056964608); v22 = (int)*(this + 101); v103 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v22 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v103(v22, v109); v24 = (GJGameLevel *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", v23); *(this + 102) = v24; (*(void (__fastcall **)(GJGameLevel *, int))(*(_DWORD *)v24 + 80))(v24, 1056964608); v25 = (int)*(this + 102); v26 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v25 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v26(v25, v109); cocos2d::CCArray::addObject(*(this + 114), v6); cocos2d::CCArray::addObject(*(this + 114), v8); cocos2d::CCArray::addObject(*(this + 114), *(this + 107)); cocos2d::CCArray::addObject(*(this + 114), *(this + 106)); cocos2d::CCArray::addObject(*(this + 114), *(this + 100)); cocos2d::CCArray::addObject(*(this + 114), *(this + 98)); cocos2d::CCArray::addObject(*(this + 114), *(this + 99)); cocos2d::CCArray::addObject(*(this + 114), *(this + 101)); cocos2d::CCArray::addObject(*(this + 114), *(this + 102)); (*((void (__fastcall **)(GJGameLevel **, cocos2d::CCObject *))*this + 57))(this, v6); (*((void (__fastcall **)(GJGameLevel **, cocos2d::CCObject *))*this + 57))(this, v8); (*((void (__fastcall **)(GJGameLevel **, _DWORD))*this + 57))(this, *(this + 107)); (*((void (__fastcall **)(GJGameLevel **, _DWORD))*this + 57))(this, *(this + 106)); (*((void (__fastcall **)(GJGameLevel **, _DWORD))*this + 57))(this, *(this + 100)); (*((void (__fastcall **)(GJGameLevel **, _DWORD))*this + 57))(this, *(this + 98)); (*((void (__fastcall **)(GJGameLevel **, _DWORD))*this + 57))(this, *(this + 99)); (*((void (__fastcall **)(GJGameLevel **, _DWORD))*this + 57))(this, *(this + 101)); (*((void (__fastcall **)(GJGameLevel **, _DWORD))*this + 57))(this, *(this + 102)); v27 = *(this + 91); v28 = *((_DWORD *)v27 + 193) - *((_DWORD *)v27 + 194) > 0; isPlatformer = GJGameLevel::isPlatformer(v27); v30 = (float)(v107[0] * 0.5) + 80.0; v31 = (float)(v107[1] * 0.5) + 51.0; v32 = isPlatformer; v33 = v30 + 33.0; v34 = 28.0; if ( v28 ) v31 = v31 + 10.0; else v34 = 30.0; *((float *)this + 115) = 10.0; v35 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v8 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v35(v8, v109); v36 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v8 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v30, v31 + v34); v36(v8, v109); v37 = (int)*(this + 100); v38 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v37 + 92); v39 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v8 + 96))(v8); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v33, *(float *)(v39 + 4)); v38(v37, v109); v40 = (int)*(this + 106); v41 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v40 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v41(v40, v109); v42 = (int)*(this + 106); v43 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v42 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v30, v31 + 1.0); v43(v42, v109); v44 = (int)*(this + 101); v45 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v44 + 92); v46 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 106) + 96))(*(this + 106)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v33, *(float *)(v46 + 4)); v45(v44, v109); v47 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v6 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v47(v6, v109); v48 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v6 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v30, v31 - v34); v48(v6, v109); v49 = (int)*(this + 98); if ( !v32 ) v3 = 0.0; v50 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v49 + 92); v51 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v6 + 96))(v6); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v33, v3 + *(float *)(v51 + 4)); v50(v49, v109); v52 = (int)*(this + 99); v104 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v52 + 92); v53 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 98) + 96))(*(this + 98)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108, 0.0, -14.0); cocos2d::CCPoint::operator+(v109, v53, v108); v104(v52, v109); v54 = (int)*(this + 107); v55 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v54 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 0.0, 0.5); v55(v54, v109); v56 = (int)*(this + 107); v57 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v56 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v30 + 1.0, v31 - (float)(v34 + v34)); v57(v56, v109); v58 = (int)*(this + 102); v59 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v58 + 92); v60 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 107) + 96))(*(this + 107)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v33, *(float *)(v60 + 4)); v59(v58, v109); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, (float)(v107[0] * 0.5) - 100.0, v31 + 5.0); cocos2d::CCPoint::operator=(this + 116, v109); v61 = GJDifficultySprite::create(1, 1); v62 = *this; *(this + 111) = (GJGameLevel *)v61; (*((void (__fastcall **)(GJGameLevel **, int, int))v62 + 58))(this, v61, 3); (*(void (__fastcall **)(_DWORD, char *))(*(_DWORD *)*(this + 111) + 92))(*(this + 111), (char *)this + 464); if ( v32 ) v64 = "moon_small01_001.png"; else v64 = "star_small01_001.png"; v65 = (GJGameLevel *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v64, v63); v66 = *this; *(this + 112) = v65; (*((void (__fastcall **)(GJGameLevel **, GJGameLevel *))v66 + 57))(this, v65); v67 = (int)*(this + 112); v68 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v67 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108, 8.0, -30.0); cocos2d::CCPoint::operator+(v109, this + 116, v108); v68(v67, v109); v70 = (GJGameLevel *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"0", "bigFont.fnt", v69); v71 = *this; *(this + 113) = v70; (*((void (__fastcall **)(GJGameLevel **, GJGameLevel *))v71 + 57))(this, v70); v72 = (int)*(this + 113); v73 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v72 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 1.0, 0.5); v73(v72, v109); v74 = (int)*(this + 113); v75 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v74 + 92); v76 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 112) + 96))(*(this + 112)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108, -8.0, 0.0); cocos2d::CCPoint::operator+(v109, v76, v108); v75(v74, v109); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 113) + 80))(*(this + 113), 1053609165); *(this + 118) = *(GJGameLevel **)((*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 113) + 96))(*(this + 113)) + 4); if ( v28 && GJGameLevel::levelHasDiamonds(*(this + 91)) ) { v78 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"diamond_small01_001.png", v77); v79 = (GameStatsManager *)(*((int (__fastcall **)(GJGameLevel **, int))*this + 57))(this, v78); v80 = (GameStatsManager *)GameStatsManager::sharedState(v79); BaseDiamonds = (GameStatsManager *)GameStatsManager::getBaseDiamonds( v80, *((_DWORD *)*(this + 91) + 193) - *((_DWORD *)*(this + 91) + 194)); v81 = (GameStatsManager *)GameStatsManager::sharedState(BaseDiamonds); AwardedDiamondsForLevel = (char *)GameStatsManager::getAwardedDiamondsForLevel(v81, *(this + 91)); v82 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i/%i", AwardedDiamondsForLevel, BaseDiamonds); CString = (const char *)cocos2d::CCString::getCString(v82); v110[0] = 0; v110[1] = 0; v111 = nullptr; v84 = CString; v85 = strlen(CString); std::string::__init(v110, v84, v85); if ( (v110[0] & 1) != 0 ) v87 = v111; else v87 = (cocos2d::CCLabelBMFont *)((char *)v110 + 1); v88 = cocos2d::CCLabelBMFont::create(v87, "bigFont.fnt", v86); (*((void (__fastcall **)(GJGameLevel **, int))*this + 57))(this, v88); v89 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v88 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, 1.0, 0.5); v89(v88, v109); (*(void (__fastcall **)(int, int))(*(_DWORD *)v88 + 80))(v88, 1051931443); v90 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v88 + 164))(v88); v91 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v88 + 84))(v88)); v92 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v78 + 92); if ( *((_DWORD *)*(this + 91) + 193) - *((_DWORD *)*(this + 91) + 194) == 10 ) v93 = -48.5; else v93 = -44.5; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108, (float)((float)(v90 * v91) * 0.5) + 2.0, v93); cocos2d::CCPoint::operator+(v109, this + 116, v108); v92(v78, v109); v94 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v88 + 92); v95 = (*(int (__fastcall **)(int))(*(_DWORD *)v78 + 96))(v78); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108, -8.0, 0.0); cocos2d::CCPoint::operator+(v109, v95, v108); v94(v88, v109); if ( AwardedDiamondsForLevel == (char *)BaseDiamonds ) { v99 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v88 + 536); v109[0] = 100; v109[1] = -1; v109[2] = -1; v99(v88, v109); } std::string::~string((int)v110); } if ( *((_BYTE *)this + 476) ) { for ( i = 0; i < cocos2d::CCArray::count(*(this + 114)); ++i ) { v97 = cocos2d::CCArray::objectAtIndex(*(this + 114), i); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v97 + 172))(v97, 0); } (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 107) + 172))(*(this + 107), 0); (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 102) + 172))(*(this + 102), 0); } return LevelInfoLayer::updateLabelValues((LevelInfoLayer *)this); }
GD Web Decomp Icon

GD Web Decomp

Raw Source