// // LevelInfoLayer::setupProgressBars from 0x100027b98 to 0x100028240 (1704 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x100024f10 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall LevelInfoLayer::setupProgressBars(LevelInfoLayer *a1) { cocos2d::CCDirector *v2; // x0 cocos2d::CCSprite *v3; // x20 float v4; // s9 cocos2d::CCDirector *v5; // x0 __n128 v6; // q0 __n128 v7; // q1 cocos2d::CCSprite *v8; // x22 float v9; // s11 __n128 v10; // q0 __n128 v11; // q1 __n128 v12; // q1 __n128 v13; // q0 float width; // s12 int NormalPercent; // w0 float v16; // s11 cocos2d::CCSprite *v17; // x21 float32x2_t *v18; // x24 __n128 v19; // q0 __n128 v20; // q1 double v21; // d0 cocos2d::CCSprite *v22; // x23 __n128 v23; // q0 __n128 v24; // q1 __int64 v25; // x0 float v26; // s0 float v27; // s2 int v28; // w0 cocos2d::CCString *v29; // x0 char *CString; // x0 GameManager *v31; // x0 cocos2d::CCString *v32; // x0 const char *v33; // x0 std::string *v34; // x0 cocos2d::CCLabelBMFont *v35; // x22 __int64 v36; // x0 cocos2d::CCString *v37; // x0 const char *v38; // x0 cocos2d::CCLabelBMFont *v39; // x22 __int64 v40; // x0 cocos2d::CCLabelBMFont *v41; // x22 float32x2_t *v42; // x20 __n128 v43; // q0 __n128 v44; // q1 double v45; // d0 cocos2d::CCLabelBMFont *v46; // x20 float32x2_t *v47; // x19 __n128 v48; // q0 __n128 v49; // q1 double v50; // d0 float32x2_t v51; // [xsp+8h] [xbp-98h] BYREF std::string v52; // [xsp+10h] [xbp-90h] BYREF float32x2_t v53; // [xsp+2Ch] [xbp-74h] BYREF __int16 v54; // [xsp+34h] [xbp-6Ch] BYREF char v55; // [xsp+36h] [xbp-6Ah] float v56; // [xsp+38h] [xbp-68h] v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v2); v55 = 0; v54 = 0; v3 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v3->setColor)(v3, &v54); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v3->setOpacity)(v3, 125); ((void (__fastcall *)(cocos2d::CCSprite *, float))v3->setScale)(v3, 0.7); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v3, 3); v4 = v56 * 0.5; v5 = cocos2d::CCDirector::sharedDirector(); v6.n128_f64[0] = sub_1001768D0(v5); v7.n128_f32[0] = v6.n128_f32[0] + 136.0; v6.n128_f32[0] = v4; sub_100022980(v6, v7, &v52); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v3->setPosition)(v3, &v52); v8 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v8->setScaleX)(v8, 0.992); ((void (__fastcall *)(cocos2d::CCSprite *, float))v8->setScaleY)(v8, 0.86); ((void (__fastcall *)(cocos2d::CCSprite *, void *))v8->setColor)(v8, &unk_100635574); v9 = v8->m_obRect.size.width - (float)(v8->m_obRect.size.width * 0.992); v10 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v3->addChild_0)(v3, v8, 1); v10.n128_u32[0] = 0; v11.n128_u32[0] = 0.5; sub_100022980(v10, v11, &v52); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v8->setAnchorPoint)(v8, &v52); v12.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))v3->getContentSize)(v3) + 4) * 0.5; v13.n128_f32[0] = v9 * 0.5; sub_100022980(v13, v12, &v52); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v8->setPosition)(v8, &v52); width = v8->m_obRect.size.width; NormalPercent = GJGameLevel::getNormalPercent(a1->m_level); v16 = v8->m_obRect.size.width; if ( width > (float)(width * (float)((float)NormalPercent / 100.0)) ) v16 = v16 * (float)((float)GJGameLevel::getNormalPercent(a1->m_level) / 100.0); sub_100022990((float *)&v52, 0.0, 0.0, v16, v8->m_obRect.size.height); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v8->setTextureRect)(v8, &v52); v17 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v17->setColor)(v17, &v54); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v17->setOpacity)(v17, 125); ((void (__fastcall *)(cocos2d::CCSprite *, float))v17->setScale)(v17, 0.7); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v17, 3); v18 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v3->getPosition)(v3); v19.n128_u32[0] = 0; v20.n128_u64[0] = 0xC2000000C2000000LL; sub_100022980(v19, v20, &v53); *(float32x2_t *)&v21 = sub_1000229DC(v18, &v53, (float32x2_t *)&v52); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *, double))v17->setPosition)(v17, &v52, v21); v22 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v22->setScaleX)(v22, 0.992); ((void (__fastcall *)(cocos2d::CCSprite *, float))v22->setScaleY)(v22, 0.86); v52.__r_.__value_.__s.__data_[2] = -1; LOWORD(v52.__r_.__value_.__l.__data_) = -256; ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v22->setColor)(v22, &v52); v23 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v17->addChild_0)(v17, v22, 1); v23.n128_u32[0] = 0; v24.n128_u32[0] = 0.5; sub_100022980(v23, v24, &v52); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v22->setAnchorPoint)(v22, &v52); v25 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v8->getPosition)(v8); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v22->setPosition)(v22, v25); v26 = v22->m_obRect.size.width; if ( v26 <= (float)(v26 * (float)((float)a1->m_level->m_practicePercent / 100.0)) ) v27 = v22->m_obRect.size.width; else v27 = v26 * (float)((float)a1->m_level->m_practicePercent / 100.0); sub_100022990((float *)&v52, 0.0, 0.0, v27, v22->m_obRect.size.height); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v22->setTextureRect)(v22, &v52); v28 = GJGameLevel::getNormalPercent(a1->m_level); v29 = (cocos2d::CCString *)sub_100268F4C("%i%%", v28); CString = (char *)cocos2d::CCString::getCString(v29); sub_100009900(&v52, CString); v31 = GameManager::sharedState(); if ( GameManager::getGameVariable(v31, "0099") && GJGameLevel::getNormalPercent(a1->m_level) != a1->m_level->m_newNormalPercent2.random - a1->m_level->m_newNormalPercent2.seed ) { v32 = (cocos2d::CCString *)sub_100268F4C( " (%i%%)", a1->m_level->m_newNormalPercent2.random - a1->m_level->m_newNormalPercent2.seed); v33 = cocos2d::CCString::getCString(v32); std::string::append(&v52, v33); } if ( (v52.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v34 = &v52; else v34 = (std::string *)v52.__r_.__value_.__r.__words[0]; v35 = cocos2d::CCLabelBMFont::create_1((const char *)v34, "bigFont.fnt"); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v35, 4); v36 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v3->getPosition)(v3); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v35->setPosition)(v35, v36); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v35->setScale)(v35, 0.4); v37 = (cocos2d::CCString *)sub_100268F4C("%i%%", a1->m_level->m_practicePercent); v38 = cocos2d::CCString::getCString(v37); v39 = cocos2d::CCLabelBMFont::create_1(v38, "bigFont.fnt"); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v39, 4); v40 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v17->getPosition)(v17); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v39->setPosition)(v39, v40); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v39->setScale)(v39, 0.4); v41 = cocos2d::CCLabelBMFont::create_1("Normal Mode", "bigFont.fnt"); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v41, 4); v42 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v3->getPosition)(v3); v43.n128_u32[0] = 0; v44.n128_u32[0] = 15.0; sub_100022980(v43, v44, &v51); *(float32x2_t *)&v45 = sub_1000229DC(v42, &v51, &v53); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v41->setPosition)(v41, &v53, v45); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v41->setScale)(v41, 0.4); v46 = cocos2d::CCLabelBMFont::create_1("Practice Mode", "bigFont.fnt"); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v46, 4); v47 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v17->getPosition)(v17); v48.n128_u32[0] = 0; v49.n128_u32[0] = 15.0; sub_100022980(v48, v49, &v51); *(float32x2_t *)&v50 = sub_1000229DC(v47, &v51, &v53); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v46->setPosition)(v46, &v53, v50); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v46->setScale)(v46, 0.4); if ( SHIBYTE(v52.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v52.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source