// // PauseLayer::setupSessionProgressBar from 0x48f0e8 to 0x48f368 (640 bytes) // // 1 xrefs: // > PauseLayer::setupProgressBars @ 0x490b0a // // 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:36 +0000 // int __fastcall PauseLayer::setupSessionProgressBar(PauseLayer *this) { cocos2d::CCDirector *v2; // r0 GJGameLevel *v3; // r6 GameManager *WinSize; // r0 char *NormalPercent; // r0 int v6; // r2 int v7; // r7 const char *v8; // r11 int v9; // r0 const char *CurrentPercentInt; // r8 GameManager *isPlatformer; // r0 int v12; // r4 float v13; // s14 float v14; // s16 int ProgressBar; // r5 void (__fastcall *v16)(int, _BYTE *); // r9 cocos2d::CCString *v17; // r0 cocos2d::CCLabelBMFont *CString; // r0 const char *v19; // r2 int v20; // r8 int v21; // r8 int result; // r0 const char *v23; // r2 char *v24; // r0 int v25; // r7 cocos2d::CCString *v26; // r0 cocos2d::CCLabelBMFont *v27; // r0 const char *v28; // r2 int v29; // r7 int (__fastcall *v30)(int, _BYTE *); // r8 float v31; // r2 int v32; // [sp+8h] [bp-3Ch] void (__fastcall *v33)(int, _BYTE *); // [sp+Ch] [bp-38h] int v34; // [sp+14h] [bp-30h] int v35; // [sp+18h] [bp-2Ch] float v36[2]; // [sp+1Ch] [bp-28h] BYREF _BYTE v37[8]; // [sp+24h] [bp-20h] BYREF _BYTE v38[8]; // [sp+2Ch] [bp-18h] BYREF _BYTE v39[8]; // [sp+34h] [bp-10h] BYREF v2 = (cocos2d::CCDirector *)GameManager::sharedState(this); v3 = *(GJGameLevel **)(*((_DWORD *)v2 + 101) + 1408); cocos2d::CCDirector::sharedDirector(v2); WinSize = (GameManager *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v36); NormalPercent = (char *)GameManager::sharedState(WinSize); v6 = *((_DWORD *)NormalPercent + 101); v7 = *(unsigned __int8 *)(v6 + 10784); if ( *(_BYTE *)(v6 + 10784) ) { v8 = *((const char **)v3 + 178); } else { NormalPercent = (char *)GJGameLevel::getNormalPercent(v3); v8 = NormalPercent; } v9 = GameManager::sharedState((GameManager *)NormalPercent); CurrentPercentInt = (const char *)PlayLayer::getCurrentPercentInt(*(PlayLayer **)(v9 + 404)); isPlatformer = (GameManager *)GJGameLevel::isPlatformer(v3); if ( isPlatformer ) v12 = *(unsigned __int8 *)(*(_DWORD *)(GameManager::sharedState(isPlatformer) + 404) + 1396); else v12 = 0; if ( GJGameLevel::isPlatformer(v3) ) { v13 = 17.0; if ( v12 ) v13 = 28.0; } else { v13 = 0.0; } v14 = (float)((float)(v36[1] * 0.5) + 55.0) - v13; if ( v7 ) { LOWORD(v34) = -256; BYTE2(v34) = -1; } else { LOBYTE(v34) = 0; *(_WORD *)((char *)&v34 + 1) = 255; } LOWORD(v35) = 10280; BYTE2(v35) = 40; ProgressBar = GameToolbox::createProgressBar(1065353216, v8, v35); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 121) + 232))(*((_DWORD *)this + 121), ProgressBar, 3); v16 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)ProgressBar + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, v36[0] * 0.5, v14); v16(ProgressBar, v39); GameToolbox::addProgressBarFill(ProgressBar, CurrentPercentInt, v34, 2); v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", CurrentPercentInt); CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v17); v20 = cocos2d::CCLabelBMFont::create(CString, "bigFont.fnt", v19); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 121) + 232))(*((_DWORD *)this + 121), v20, 4); v33 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v20 + 92); v32 = (*(int (__fastcall **)(int))(*(_DWORD *)ProgressBar + 96))(ProgressBar); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 0.0, 1.0); cocos2d::CCPoint::operator+(v39, v32, v38); v33(v20, v39); (*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 80))(v20, 1056964608); v21 = (*(int (__fastcall **)(int))(*(_DWORD *)ProgressBar + 96))(ProgressBar); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 0.0, 21.0); cocos2d::CCPoint::operator+(v37, v21, v39); result = GJGameLevel::isPlatformer(v3); if ( !result ) { if ( v7 ) v24 = "Practice Mode"; else v24 = "Normal Mode"; v25 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)v24, "bigFont.fnt", v23); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 121) + 232))(*((_DWORD *)this + 121), v25, 4); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v25 + 92))(v25, v37); result = (*(int (__fastcall **)(int, int))(*(_DWORD *)v25 + 80))(v25, 1056964608); } if ( (int)v8 > 0 ) { v26 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Best: %i%%", v8); v27 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v26); v29 = cocos2d::CCLabelBMFont::create(v27, "goldFont.fnt", v28); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 121) + 232))(*((_DWORD *)this + 121), v29, 4); (*(void (__fastcall **)(int, int))(*(_DWORD *)v29 + 80))(v29, 1056293519); v30 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v29 + 92); if ( GJGameLevel::isPlatformer(v3) ) v31 = 0.0; else v31 = 18.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 0.0, v31); cocos2d::CCPoint::operator+(v39, v37, v38); return v30(v29, v39); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source