// // LevelInfoLayer::updateLabelValues from 0x49bc64 to 0x49c420 (1980 bytes) // // 4 xrefs: // > LevelInfoLayer::setupLevelInfo @ 0x49cbf0 // > LevelInfoLayer::incrementLikes @ 0x49cc76 // > LevelInfoLayer::incrementDislikes @ 0x49cc88 // > LevelInfoLayer::levelDownloadFinished @ 0x49cd32 // // 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::updateLabelValues(LevelInfoLayer *this) { float v2; // r0 int v3; // s15 char *v4; // r1 char *v5; // r1 int v6; // r6 void (__fastcall *v7)(int, char *); // r7 char *v8; // r1 int v9; // r6 void (__fastcall *v10)(int, char *); // r7 char *v11; // r1 GameStatsManager *v12; // r0 GameStatsManager *v13; // r0 int v14; // r7 GJGameLevel *v15; // r9 GameStatsManager *v16; // r0 GJGameLevel *v17; // r8 int v18; // r7 void (__fastcall *v19)(int, int); // r8 cocos2d::CCString *v20; // r0 int CString; // r0 int v22; // r7 void (__fastcall *v23)(int, __int16 *); // r8 int v24; // r7 int v25; // r3 int v26; // r2 int v27; // r7 int v28; // r8 void (__fastcall *v29)(int, char *); // r9 char *v30; // r1 cocos2d::CCSpriteFrameCache *v31; // r0 int v32; // r7 int (__fastcall *v33)(int, int); // r9 cocos2d::CCSpriteFrameCache *v34; // r0 const char *v35; // r1 int v36; // r0 GameManager *v37; // r0 GameManager *v38; // r0 GameManager *v39; // r0 GameManager *v40; // r0 GameManager *v41; // r0 GameManager *v42; // r0 GameManager *v43; // r0 GameManager *v44; // r0 int AverageDifficulty; // r8 _DWORD *v46; // r3 int v47; // r0 int v48; // r1 int v49; // r7 int (__fastcall *v50)(int, int); // r8 cocos2d::CCString *v51; // r0 int v52; // r0 GameStatsManager *v53; // r0 GameStatsManager *v54; // r0 int v55; // r0 void (__fastcall *v56)(int, __int16 *); // r2 float v57; // s17 int v58; // r7 int v59; // r8 void (__fastcall *v60)(int, __int16 *); // r9 float *v61; // r0 int v62; // r8 void (__fastcall *v63)(int, __int16 *); // r9 float *v64; // r0 int v65; // r8 unsigned int i; // r7 int v67; // r0 float v68; // s16 unsigned int v69; // r7 int v70; // r0 int v71; // r9 void (__fastcall *v72)(int, __int16 *); // r10 int v73; // r11 bool v74; // cf cocos2d::CCArray *v75; // r0 unsigned int v76; // r1 int v77; // r0 GJGameLevel *result; // r0 float v79; // s18 int v80; // r7 int v81; // r3 int v82; // r2 int v83; // r7 int v84; // r11 int v85; // r3 float v86; // s16 const char *CoinKey; // r0 const char *v88; // r8 size_t v89; // r0 GameStatsManager *v90; // r0 GameStatsManager *v91; // r0 char *v92; // r1 const char *v93; // r1 GameStatsManager *v94; // r0 char *v95; // r1 int hasPendingUserCoin; // r9 cocos2d::CCObject *v97; // r8 void (__fastcall *v98)(cocos2d::CCObject *, __int16 *); // r3 char v99; // r2 void (__fastcall *v100)(cocos2d::CCObject *, __int16 *); // r2 void (__fastcall *v101)(cocos2d::CCObject *, __int16 *); // [sp+Ch] [bp-50h] char v102[4]; // [sp+18h] [bp-44h] BYREF float v103; // [sp+1Ch] [bp-40h] _BYTE v104[8]; // [sp+20h] [bp-3Ch] BYREF __int16 v105; // [sp+28h] [bp-34h] BYREF char v106; // [sp+2Ah] [bp-32h] int v107[2]; // [sp+30h] [bp-2Ch] BYREF char *v108; // [sp+38h] [bp-24h] char *v109[3]; // [sp+3Ch] [bp-20h] BYREF int v110[2]; // [sp+48h] [bp-14h] BYREF char *v111; // [sp+50h] [bp-Ch] (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 99) + 172))(*((_DWORD *)this + 99), 0); if ( GJGameLevel::isPlatformer(*((GJGameLevel **)this + 91)) ) { v2 = floorf((float)*(int *)(*((_DWORD *)this + 91) + 1000) / 240.0); v107[0] = 0; v107[1] = 0; v108 = nullptr; v3 = (int)v2; std::string::__init(v107, "<1min", 5u); if ( v3 <= 60 ) { if ( !v3 ) std::string::assign(v107, "Dur."); } else { GameToolbox::getTimeString((GameToolbox *)v110, v3, 1); if ( (v110[0] & 1) != 0 ) v4 = v111; else v4 = (char *)v110 + 1; std::string::assign(v107, v4); std::string::~string((int)v110); } if ( (v107[0] & 1) != 0 ) v5 = v108; else v5 = (char *)v107 + 1; (*(void (__fastcall **)(_DWORD, char *, int))(**((_DWORD **)this + 99) + 464))( *((_DWORD *)this + 99), v5, LOBYTE(v107[0]) << 31); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 99) + 172))(*((_DWORD *)this + 99), 1); std::string::~string((int)v107); } v6 = *((_DWORD *)this + 98); v7 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v6 + 464); GJGameLevel::lengthKeyToString((GJGameLevel *)v110, *(_DWORD *)(*((_DWORD *)this + 91) + 724)); if ( (v110[0] & 1) != 0 ) v8 = v111; else v8 = (char *)v110 + 1; v7(v6, v8); std::string::~string((int)v110); v9 = *((_DWORD *)this + 100); v10 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v9 + 464); GameToolbox::pointsToString((GameToolbox *)v110, *(_DWORD *)(*((_DWORD *)this + 91) + 472)); if ( (v110[0] & 1) != 0 ) v11 = v111; else v11 = (char *)v110 + 1; v10(v9, v11); v12 = (GameStatsManager *)std::string::~string((int)v110); v13 = (GameStatsManager *)GameStatsManager::sharedState(v12); v14 = *(_DWORD *)(*((_DWORD *)this + 91) + 744) - *(_DWORD *)(*((_DWORD *)this + 91) + 748); v15 = v13; v16 = (GameStatsManager *)GameStatsManager::sharedState(v13); v17 = *((GJGameLevel **)this + 91); GameStatsManager::isDailyRecall(v16, *((_DWORD *)v17 + 186) - *((_DWORD *)v17 + 187)); GameStatsManager::orbInfoForLevel((GameStatsManager *)v109, v15, v17, v14); v18 = *((_DWORD *)this + 102); v19 = *(void (__fastcall **)(int, int))(*(_DWORD *)v18 + 464); v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i/%i", v109[0], v109[1]); CString = cocos2d::CCString::getCString(v20); v19(v18, CString); v22 = *((_DWORD *)this + 102); v23 = *(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v22 + 536); if ( GameStatsManager::OrbInfo::locked((GameStatsManager::OrbInfo *)v109) ) { v105 = -26986; v106 = -106; } else { v105 = -1; v106 = -1; } v23(v22, &v105); v24 = *((_DWORD *)this + 91); v25 = *(_DWORD *)(v24 + 720); v26 = *(_DWORD *)(v24 + 716); v27 = *((_DWORD *)this + 101); v28 = v26 - v25; v29 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v27 + 464); GameToolbox::pointsToString((GameToolbox *)v110, v26 - v25); if ( (v110[0] & 1) != 0 ) v30 = v111; else v30 = (char *)v110 + 1; v29(v27, v30); v31 = (cocos2d::CCSpriteFrameCache *)std::string::~string((int)v110); v32 = *((_DWORD *)this + 106); v33 = *(int (__fastcall **)(int, int))(*(_DWORD *)v32 + 580); v34 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v31); if ( v28 < 0 ) v35 = "GJ_dislikesIcon_001.png"; else v35 = "GJ_likesIcon_001.png"; v36 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v34, v35); v37 = (GameManager *)v33(v32, v36); v38 = (GameManager *)GameManager::sharedState(v37); if ( *((_DWORD *)v38 + 116) - *((_DWORD *)v38 + 117) == *(_DWORD *)(*((_DWORD *)this + 91) + 404) - *(_DWORD *)(*((_DWORD *)this + 91) + 408) ) { if ( v28 > 49 ) { v39 = (GameManager *)GameManager::sharedState(v38); v38 = (GameManager *)GameManager::reportAchievementWithID( v39, "geometry.ach.creator03", (const char *)&dword_64, 0); if ( v28 > 99 ) { v40 = (GameManager *)GameManager::sharedState(v38); v38 = (GameManager *)GameManager::reportAchievementWithID( v40, "geometry.ach.creator01", (const char *)&dword_64, 0); if ( v28 > 249 ) { v41 = (GameManager *)GameManager::sharedState(v38); v38 = (GameManager *)GameManager::reportAchievementWithID( v41, "geometry.ach.creator04", (const char *)&dword_64, 0); if ( v28 >= 500 ) { v42 = (GameManager *)GameManager::sharedState(v38); v38 = (GameManager *)GameManager::reportAchievementWithID( v42, "geometry.ach.creator05", (const char *)&dword_64, 0); if ( v28 >= 1000 ) { v43 = (GameManager *)GameManager::sharedState(v38); v38 = (GameManager *)GameManager::reportAchievementWithID( v43, "geometry.ach.creator06", (const char *)&dword_64, 0); } } } } } if ( *(_DWORD *)(*((_DWORD *)this + 91) + 772) - *(_DWORD *)(*((_DWORD *)this + 91) + 776) > 0 ) { v44 = (GameManager *)GameManager::sharedState(v38); GameManager::reportAchievementWithID(v44, "geometry.ach.creator02", (const char *)&dword_64, 0); } } cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 98), 60.0, 0.5, 0.0); cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 99), 42.0, 0.35, 0.0); cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 100), 60.0, 0.5, 0.0); cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 101), 60.0, 0.5, 0.0); cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 102), 60.0, 0.5, 0.0); AverageDifficulty = GJGameLevel::getAverageDifficulty(*((GJGameLevel **)this + 91)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, (LevelInfoLayer *)((char *)this + 464)); v46 = *((_DWORD **)this + 91); if ( v46[189] - v46[190] == 1 ) { v47 = GJGameLevel::demonIconForDifficulty(v46[192]); v103 = v103 + 5.0; AverageDifficulty = v47; } if ( *(_BYTE *)(*((_DWORD *)this + 91) + 784) ) v48 = -1; else v48 = AverageDifficulty; GJDifficultySprite::updateDifficultyFrame(*((_DWORD *)this + 111), v48, 1); (*(void (__fastcall **)(_DWORD, char *))(**((_DWORD **)this + 111) + 92))(*((_DWORD *)this + 111), v102); GJDifficultySprite::updateFeatureStateFromLevel(*((GJDifficultySprite **)this + 111), *((GJGameLevel **)this + 91)); v49 = *((_DWORD *)this + 113); v50 = *(int (__fastcall **)(int, int))(*(_DWORD *)v49 + 464); v51 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)(*(_DWORD *)(*((_DWORD *)this + 91) + 772) - *(_DWORD *)(*((_DWORD *)this + 91) + 776))); v52 = cocos2d::CCString::getCString(v51); v53 = (GameStatsManager *)v50(v49, v52); v54 = (GameStatsManager *)GameStatsManager::sharedState(v53); if ( GameStatsManager::hasCompletedStarLevel(v54, *((GJGameLevel **)this + 91)) ) { v55 = *((_DWORD *)this + 113); v56 = *(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v55 + 536); v105 = -1; v106 = 50; v56(v55, &v105); } v57 = 0.0; v58 = *(_DWORD *)(*((_DWORD *)this + 91) + 772) - *(_DWORD *)(*((_DWORD *)this + 91) + 776) > 0; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 113) + 172))(*((_DWORD *)this + 113), v58); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 112) + 172))(*((_DWORD *)this + 112), v58); v59 = *((_DWORD *)this + 113); v60 = *(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v59 + 92); if ( *(_DWORD *)(*((_DWORD *)this + 91) + 756) - *(_DWORD *)(*((_DWORD *)this + 91) + 760) == 1 ) v57 = -4.0; v61 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v59 + 96))(v59); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v105, *v61, v57 + *((float *)this + 118)); v60(v59, &v105); v62 = *((_DWORD *)this + 112); v63 = *(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v62 + 92); v64 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v62 + 96))(v62); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v105, *v64, v57 + *((float *)this + 118)); v63(v62, &v105); v65 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 102) + 176))(*((_DWORD *)this + 102)); if ( v58 ) v58 = *((unsigned __int8 *)this + 476) ^ 1; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 102) + 172))(*((_DWORD *)this + 102), v58); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 107) + 172))(*((_DWORD *)this + 107), v58); if ( (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 102) + 176))(*((_DWORD *)this + 102)) != v65 ) { v67 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 102) + 176))(*((_DWORD *)this + 102)); v68 = *((float *)this + 115); if ( !v67 ) v68 = -v68; v69 = 0; while ( v69 < cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 114)) ) { v70 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 114), v69++); v71 = v70; v72 = *(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v70 + 92); v73 = (*(int (__fastcall **)(int))(*(_DWORD *)v70 + 96))(v70); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v104, 0.0, v68); cocos2d::CCPoint::operator+(&v105, v73, v104); v72(v71, &v105); } } for ( i = 0; ; ++i ) { v74 = i >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 92)); v75 = *((cocos2d::CCArray **)this + 92); if ( v74 ) break; v76 = i; v77 = cocos2d::CCArray::objectAtIndex(v75, v76); (*(void (__fastcall **)(int))(*(_DWORD *)v77 + 260))(v77); } cocos2d::CCArray::removeAllObjects(v75); result = *((GJGameLevel **)this + 91); if ( *((int *)result + 197) > 0 ) { if ( *((_DWORD *)result + 193) - *((_DWORD *)result + 194) > 0 ) { v79 = -45.5; if ( GJGameLevel::levelHasDiamonds(result) ) v79 = -60.0; } else { v79 = -31.5; } v80 = *((_DWORD *)this + 91); v81 = *(_DWORD *)(v80 + 796); v82 = *(_DWORD *)(v80 + 792); v83 = 0; v84 = v82 - v81; while ( 1 ) { result = *((GJGameLevel **)this + 91); v85 = *((_DWORD *)result + 197); if ( v83 >= v85 || v83 == 3 ) return result; if ( v83 == 1 ) { v86 = 5.0; if ( v85 != 2 ) v86 = 0.0; } else { if ( v83 == 2 ) { v86 = 10.0; goto LABEL_75; } if ( !v83 ) { if ( v85 == 2 ) { v86 = -5.0; goto LABEL_75; } if ( v85 > 2 ) { v86 = -10.0; goto LABEL_75; } } v86 = 0.0; } LABEL_75: CoinKey = (const char *)GJGameLevel::getCoinKey(result, ++v83); v110[0] = 0; v110[1] = 0; v111 = nullptr; v88 = CoinKey; v89 = strlen(CoinKey); v90 = (GameStatsManager *)std::string::__init(v110, v88, v89); v91 = (GameStatsManager *)GameStatsManager::sharedState(v90); if ( (v110[0] & 1) != 0 ) v92 = v111; else v92 = (char *)v110 + 1; if ( GameStatsManager::hasUserCoin(v91, v92) ) { hasPendingUserCoin = 1; } else { v94 = (GameStatsManager *)GameStatsManager::sharedState(nullptr); if ( (v110[0] & 1) != 0 ) v95 = v111; else v95 = (char *)v110 + 1; hasPendingUserCoin = GameStatsManager::hasPendingUserCoin(v94, v95); } v97 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"usercoin_small01_001.png", v93); (*(void (__fastcall **)(LevelInfoLayer *, cocos2d::CCObject *))(*(_DWORD *)this + 228))(this, v97); v101 = *(void (__fastcall **)(cocos2d::CCObject *, __int16 *))(*(_DWORD *)v97 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v104, v86, v79 + v57); cocos2d::CCPoint::operator+(&v105, (char *)this + 464, v104); v101(v97, &v105); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 92), v97); if ( v84 == 1 ) { if ( !hasPendingUserCoin ) { v100 = *(void (__fastcall **)(cocos2d::CCObject *, __int16 *))(*(_DWORD *)v97 + 480); v105 = -23131; v106 = -91; v100(v97, &v105); } } else { v98 = *(void (__fastcall **)(cocos2d::CCObject *, __int16 *))(*(_DWORD *)v97 + 480); if ( hasPendingUserCoin ) { v105 = -20481; v99 = 75; } else { v105 = 29093; v99 = 48; } v106 = v99; v98(v97, &v105); } std::string::~string((int)v110); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source