// // LevelInfoLayer::setupProgressBars from 0x1002ae000 to 0x1002ae316 (790 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x1002aac4e // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // 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 12:28:00 +0000 // void __fastcall LevelInfoLayer::setupProgressBars(_QWORD *a1, __int64 a2) { __int64 v3; // rax const char *NormalPercent; // rsi __int64 v5; // rax const char *CString; // r15 const char *v7; // rdi size_t v8; // rax __int64 v9; // rdx std::string::size_type v10; // r14 char *data; // r12 size_t v12; // r13 const std::string::value_type *v13; // rsi std::string *v14; // rax std::string *p_dst; // rdi int v16; // eax __int64 v17; // rax __int64 v18; // rax double v19; // xmm0_8 float v20; // xmm1_4 double v21; // xmm0_8 unsigned int v22; // eax std::string::pointer v23; // r9 __int64 v24; // r14 char *v25; // r15 void *v26; // rax __int64 v27; // r15 unsigned __int64 *v28; // r12 float v29; // xmm0_4 __int64 v30; // rsi __int64 v31; // rax __int64 v32; // r15 unsigned __int64 *v33; // r14 float v34; // [rsp+0h] [rbp-60h] BYREF unsigned __int64 v35; // [rsp+8h] [rbp-58h] BYREF std::string __dst; // [rsp+10h] [rbp-50h] BYREF double v37; // [rsp+2Ch] [rbp-34h] BYREF float v38; // [rsp+34h] [rbp-2Ch] v3 = cocos2d::CCDirector::sharedDirector(a1, a2); cocos2d::CCDirector::getWinSize(&v34, v3); NormalPercent = (const char *)(unsigned int)GJGameLevel::getNormalPercent(a1[63]); v5 = sub_10088E820("%i%%", SLOBYTE(v34)); CString = (const char *)cocos2d::CCString::getCString(v5); v7 = CString; v8 = strlen(CString); if ( v8 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v10 = v8; if ( v8 >= 0x17 ) { v12 = 26; if ( (v8 | 7) != 0x17 ) v12 = (v8 | 7) + 1; data = (char *)operator new(v12); __dst.__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst.__r_.__value_.__r.__words[0] = v12 + 1; __dst.__r_.__value_.__l.__size_ = v10; } else { __dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v8); data = __dst.__r_.__value_.__s.__data_; if ( !v8 ) goto LABEL_9; } v7 = data; NormalPercent = CString; memmove(data, CString, v10); LABEL_9: data[v10] = 0; GameManager::sharedState(v7, NormalPercent, v9); v13 = "0099"; p_dst = v14; if ( (unsigned __int8)GameManager::getGameVariable(v14, "0099") ) { p_dst = (std::string *)a1[63]; v16 = GJGameLevel::getNormalPercent(p_dst); v13 = (const std::string::value_type *)(unsigned int)(*(_DWORD *)(a1[63] + 876LL) - *(_DWORD *)(a1[63] + 880LL)); if ( v16 != (_DWORD)v13 ) { v17 = sub_10088E820(" (%i%%)", SLOBYTE(v34)); p_dst = &__dst; v13 = (const std::string::value_type *)cocos2d::CCString::getCString(v17); std::string::append(&__dst, v13); } } v38 = v34; v18 = cocos2d::CCDirector::sharedDirector(p_dst, v13); v19 = sub_100479750(v18); v20 = *(float *)&v19; *(_QWORD *)&v21 = LODWORD(v38); *(float *)&v21 = v38 * 0.5; sub_100278250((float *)&v37, v38 * 0.5, v20 + 136.0); v22 = GJGameLevel::getNormalPercent(a1[63]); if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) v23 = __dst.__r_.__value_.__l.__data_; else v23 = __dst.__r_.__value_.__s.__data_; v24 = LevelInfoLayer::addProgressBar(a1, &v37, v22, 65280, "Normal Mode", v23); if ( !(unsigned __int8)GJGameLevel::isPlatformer(a1[63], v21) ) { v25 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"sideBtn_death_001.png", v21); (*(void (__fastcall **)(char *, float))(*(_QWORD *)v25 + 160LL))(v25, 0.89999998); v26 = CCMenuItemSpriteExtra::create((__int64)v25, 0, (__int64)a1, (__int64)sub_1002AF600, 0); v27 = cocos2d::CCMenu::createWithItem(v26); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v27, 3); v28 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v24 + 192LL))(v24); v38 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v24 + 328LL))(v24); v29 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v24 + 168LL))(v24); sub_100278250((float *)&v35, (float)((float)(v38 * v29) * 0.5) + 22.0, 0.0); sub_100278350(&v37, v28, &v35); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v27 + 184LL))(v27, &v37); } v30 = *(unsigned int *)(a1[63] + 888LL); v31 = sub_10088E820("%i%%", SLOBYTE(v34)); v32 = cocos2d::CCString::getCString(v31); v33 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v24 + 192LL))(v24, v30); sub_100278250((float *)&v35, 0.0, -32.0); sub_100278350(&v37, v33, &v35); LevelInfoLayer::addProgressBar(a1, &v37, *(unsigned int *)(a1[63] + 888LL), 16776960, "Practice Mode", v32); if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source