// // LevelInfoLayer::setupProgressBars from 0x49d1f0 to 0x49d494 (676 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x49eb5c // // 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 // int __fastcall LevelInfoLayer::setupProgressBars(GJGameLevel **this) { const char *NormalPercent; // r0 cocos2d::CCString *v3; // r0 const char *CString; // r0 const char *v5; // r7 size_t v6; // r0 GameManager *v7; // r0 GameManager *v8; // r0 cocos2d::CCDirector *GameVariable; // r0 const char *v10; // r1 cocos2d::CCString *v11; // r0 const char *v12; // r9 size_t v13; // r7 int v14; // r5 unsigned int v15; // r3 float v16; // s17 cocos2d::CCDirector *v17; // r0 float v18; // r0 const char *v19; // r2 cocos2d::CCLabelBMFont *v20; // r3 int v21; // r5 const char *v22; // r1 int v23; // r9 cocos2d::CCMenu *v24; // r0 cocos2d::CCMenuItem *v25; // r1 int v26; // r9 int v27; // r11 float v28; // s17 float v29; // r0 cocos2d::CCString *v30; // r0 cocos2d::CCLabelBMFont *v31; // r9 int v32; // r5 cocos2d::CCLabelBMFont *v34; // r8 char *v35; // r0 size_t v36; // r5 void (__fastcall *v37)(int, _BYTE *); // [sp+14h] [bp-40h] int v38; // [sp+1Ch] [bp-38h] float v39[2]; // [sp+20h] [bp-34h] BYREF _BYTE v40[8]; // [sp+28h] [bp-2Ch] BYREF _BYTE v41[8]; // [sp+30h] [bp-24h] BYREF _DWORD v42[2]; // [sp+38h] [bp-1Ch] BYREF int v43; // [sp+40h] [bp-14h] BYREF int v44; // [sp+44h] [bp-10h] cocos2d::CCLabelBMFont *v45; // [sp+48h] [bp-Ch] cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v39); NormalPercent = (const char *)GJGameLevel::getNormalPercent(*(this + 91)); v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", NormalPercent); CString = (const char *)cocos2d::CCString::getCString(v3); v43 = 0; v44 = 0; v45 = nullptr; v5 = CString; v6 = strlen(CString); v7 = (GameManager *)std::string::__init(&v43, v5, v6); v8 = (GameManager *)GameManager::sharedState(v7); GameVariable = (cocos2d::CCDirector *)GameManager::getGameVariable(v8, "0099"); if ( GameVariable ) { GameVariable = (cocos2d::CCDirector *)GJGameLevel::getNormalPercent(*(this + 91)); v10 = (const char *)(*((_DWORD *)*(this + 91) + 175) - *((_DWORD *)*(this + 91) + 176)); if ( GameVariable != (cocos2d::CCDirector *)v10 ) { v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)" (%i%%)", v10); v12 = (const char *)cocos2d::CCString::getCString(v11); GameVariable = (cocos2d::CCDirector *)strlen(v12); v13 = (size_t)GameVariable; if ( (v43 & 1) != 0 ) { v14 = v44; v15 = (v43 & 0xFFFFFFFE) - 1; } else { v14 = (int)(unsigned __int8)v43 >> 1; v15 = 10; } if ( v15 - v14 < (unsigned int)GameVariable ) { std::string::__grow_by_and_replace( (int)&v43, v15, (unsigned int)GameVariable + v14 - v15, v14, v14, 0, (size_t)GameVariable, v12); } else if ( GameVariable ) { if ( (v43 & 1) != 0 ) v34 = v45; else v34 = (cocos2d::CCLabelBMFont *)((char *)&v43 + 1); v35 = (char *)v34 + v14; v36 = v14 + v13; GameVariable = (cocos2d::CCDirector *)std::char_traits::copy(v35, v12, v13); if ( (v43 & 1) != 0 ) v44 = v36; else LOBYTE(v43) = 2 * v36; *((_BYTE *)v34 + v36) = 0; } } } v16 = v39[0] * 0.5; v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(GameVariable); v18 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v17)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, v16, v18 + 136.0); v19 = (const char *)GJGameLevel::getNormalPercent(*(this + 91)); if ( (v43 & 1) != 0 ) v20 = v45; else v20 = (cocos2d::CCLabelBMFont *)((char *)&v43 + 1); v21 = LevelInfoLayer::addProgressBar((int)this, (int)v42, v19, 65280, (cocos2d::CCLabelBMFont *)"Normal Mode", v20); if ( !GJGameLevel::isPlatformer(*(this + 91)) ) { v23 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_death_001.png", v22); (*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 80))(v23, 1063675494); v42[0] = LevelInfoLayer::onDeathTracker; v42[1] = 0; v24 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v23, 0, (int)this, (int)LevelInfoLayer::onDeathTracker, 0); v26 = cocos2d::CCMenu::createWithItem(v24, v25); (*((void (__fastcall **)(GJGameLevel **, int, int))*this + 58))(this, v26, 3); v37 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v26 + 92); v27 = (*(int (__fastcall **)(int))(*(_DWORD *)v21 + 96))(v21); v28 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v21 + 164))(v21); v29 = (*(float (__fastcall **)(int))(*(_DWORD *)v21 + 84))(v21); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, (float)((float)(v28 * v29) * 0.5) + 22.0, 0.0); cocos2d::CCPoint::operator+(v41, v27, v40); v37(v26, v41); } v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i%%", *((const char **)*(this + 91) + 178)); v31 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v30); v32 = (*(int (__fastcall **)(int))(*(_DWORD *)v21 + 96))(v21); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, 0.0, -32.0); cocos2d::CCPoint::operator+(v41, v32, v40); LOWORD(v38) = -256; BYTE2(v38) = -1; LevelInfoLayer::addProgressBar( (int)this, (int)v41, *((const char **)*(this + 91) + 178), v38, (cocos2d::CCLabelBMFont *)"Practice Mode", v31); return std::string::~string((int)&v43); }
GD Web Decomp Icon

GD Web Decomp

Raw Source