// // LevelInfoLayer::setupLevelInfo from 0x100026d60 to 0x100027808 (2728 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x100024ee8 // // 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::setupLevelInfo(LevelInfoLayer *a1) { cocos2d::CCArray *v2; // x0 cocos2d::CCDirector *v3; // x0 cocos2d::CCSprite *v4; // x21 cocos2d::CCSprite *v5; // x22 cocos2d::CCLabelBMFont *v6; // x0 __n128 v7; // q0 cocos2d::CCLabelBMFont *m_lengthLabel; // x24 __n128 v9; // q1 cocos2d::CCLabelBMFont *v10; // x0 __n128 v11; // q0 cocos2d::CCLabelBMFont *m_exactLengthLabel; // x24 __n128 v13; // q1 cocos2d::CCLabelBMFont *v14; // x0 __n128 v15; // q0 cocos2d::CCLabelBMFont *m_downloadsLabel; // x24 __n128 v17; // q1 cocos2d::CCLabelBMFont *v18; // x0 __n128 v19; // q0 cocos2d::CCLabelBMFont *m_likesLabel; // x24 __n128 v21; // q1 cocos2d::CCLabelBMFont *v22; // x0 __n128 v23; // q0 cocos2d::CCLabelBMFont *m_orbsLabel; // x23 __n128 v25; // q1 GJGameLevel *m_level; // x0 int random; // w26 int seed; // w27 _BOOL4 isPlatformer; // w24 __n128 v30; // q0 __n128 v31; // q1 unsigned __int32 v32; // s9 unsigned int v33; // w8 float v34; // s13 float v35; // s0 float v36; // s12 __n128 v37; // q0 __n128 v38; // q1 cocos2d::CCLabelBMFont *v39; // x25 __n128 v40; // q1 __n128 v41; // q0 __n128 v42; // q0 cocos2d::CCSprite *m_likesIcon; // x22 __n128 v44; // q1 __n128 v45; // q0 cocos2d::CCSprite *v46; // x22 __n128 v47; // q1 cocos2d::CCLabelBMFont *v48; // x22 __n128 v49; // q1 __n128 v50; // q0 __n128 v51; // q0 __n128 v52; // q1 __n128 v53; // q0 __n128 v54; // q1 cocos2d::CCLabelBMFont *v55; // x22 __int64 v56; // x0 __n128 v57; // q1 __n128 v58; // q0 const char *v59; // x21 cocos2d::CCLabelBMFont *v60; // x22 float32x2_t *v61; // x24 __n128 v62; // q0 __n128 v63; // q1 double v64; // d0 __n128 v65; // q0 cocos2d::CCSprite *m_orbsIcon; // x22 __n128 v67; // q1 __n128 v68; // q0 cocos2d::CCSprite *v69; // x22 __n128 v70; // q1 cocos2d::CCLabelBMFont *v71; // x22 __n128 v72; // q1 __n128 v73; // q0 __n128 v74; // q0 __n128 v75; // q1 GJDifficultySprite *v76; // x0 cocos2d::CCSprite *v77; // x0 __n128 v78; // q0 cocos2d::CCSprite *m_starsIcon; // x21 __n128 v80; // q1 double v81; // d0 cocos2d::CCLabelBMFont *v82; // x0 __n128 v83; // q0 cocos2d::CCLabelBMFont *m_starsLabel; // x20 __n128 v85; // q1 cocos2d::CCLabelBMFont *v86; // x20 float32x2_t *v87; // x21 __n128 v88; // q0 __n128 v89; // q1 double v90; // d0 GJGameLevel *v91; // x8 cocos2d::CCSprite *v92; // x22 GameStatsManager *v93; // x0 int BaseDiamonds; // w20 GameStatsManager *v95; // x0 int AwardedDiamondsForLevel; // w21 cocos2d::CCString *v97; // x0 char *CString; // x0 void **v99; // x0 cocos2d::CCLabelBMFont *v100; // x23 __n128 v101; // q0 __n128 v102; // q1 float v103; // s8 __n128 v104; // q0 __n128 v105; // q1 int v106; // w8 double v107; // d0 float32x2_t *v108; // x22 __n128 v109; // q0 __n128 v110; // q1 double v111; // d0 __int64 v112; // x20 __int64 v113; // x0 float32x2_t v114; // [xsp+10h] [xbp-C0h] BYREF void *__p[2]; // [xsp+18h] [xbp-B8h] BYREF char v116; // [xsp+2Fh] [xbp-A1h] float32x2_t v117; // [xsp+30h] [xbp-A0h] BYREF float v118; // [xsp+38h] [xbp-98h] float v119; // [xsp+3Ch] [xbp-94h] v2 = (cocos2d::CCArray *)sub_10024A15C(a1); a1->m_icons = v2; cocos2d::CCObject::retain(v2); v3 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v3); v4 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); v5 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png"); a1->m_orbsIcon = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png"); a1->m_likesIcon = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png"); v6 = cocos2d::CCLabelBMFont::create_1(" ", "bigFont.fnt"); a1->m_lengthLabel = v6; v7 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v6->setScale)(v6, 0.5); m_lengthLabel = a1->m_lengthLabel; v7.n128_u32[0] = 0; v9.n128_u32[0] = 0.5; sub_100022980(v7, v9, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_lengthLabel->setAnchorPoint)(m_lengthLabel, __p); v10 = cocos2d::CCLabelBMFont::create_1(" ", "bigFont.fnt"); a1->m_exactLengthLabel = v10; v11 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v10->setScale)(v10, 0.5); m_exactLengthLabel = a1->m_exactLengthLabel; v11.n128_u32[0] = 0; v13.n128_u32[0] = 0.5; sub_100022980(v11, v13, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_exactLengthLabel->setAnchorPoint)(m_exactLengthLabel, __p); v14 = cocos2d::CCLabelBMFont::create_1(" ", "bigFont.fnt"); a1->m_downloadsLabel = v14; v15 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v14->setScale)(v14, 0.5); m_downloadsLabel = a1->m_downloadsLabel; v15.n128_u32[0] = 0; v17.n128_u32[0] = 0.5; sub_100022980(v15, v17, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_downloadsLabel->setAnchorPoint)(m_downloadsLabel, __p); v18 = cocos2d::CCLabelBMFont::create_1(" ", "bigFont.fnt"); a1->m_likesLabel = v18; v19 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v18->setScale)(v18, 0.5); m_likesLabel = a1->m_likesLabel; v19.n128_u32[0] = 0; v21.n128_u32[0] = 0.5; sub_100022980(v19, v21, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_likesLabel->setAnchorPoint)(m_likesLabel, __p); v22 = cocos2d::CCLabelBMFont::create_1(" ", "bigFont.fnt"); a1->m_orbsLabel = v22; v23 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v22->setScale)(v22, 0.5); m_orbsLabel = a1->m_orbsLabel; v23.n128_u32[0] = 0; v25.n128_u32[0] = 0.5; sub_100022980(v23, v25, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_orbsLabel->setAnchorPoint)(m_orbsLabel, __p); sub_10024A2D0(a1->m_icons, v4); sub_10024A2D0(a1->m_icons, v5); sub_10024A2D0(a1->m_icons, a1->m_orbsIcon); sub_10024A2D0(a1->m_icons, a1->m_likesIcon); sub_10024A2D0(a1->m_icons, a1->m_downloadsLabel); sub_10024A2D0(a1->m_icons, a1->m_lengthLabel); sub_10024A2D0(a1->m_icons, a1->m_exactLengthLabel); sub_10024A2D0(a1->m_icons, a1->m_likesLabel); sub_10024A2D0(a1->m_icons, a1->m_orbsLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v4); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v5); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, a1->m_orbsIcon); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, a1->m_likesIcon); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_downloadsLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_lengthLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_exactLengthLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_likesLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_orbsLabel); m_level = a1->m_level; random = m_level->m_stars.random; seed = m_level->m_stars.seed; isPlatformer = GJGameLevel::isPlatformer(m_level); *(float *)&v32 = (float)(v118 * 0.5) + 80.0; if ( random <= seed ) v33 = 30; else v33 = 28; v34 = (float)v33; v35 = (float)(v119 * 0.5) + 51.0; a1->m_iconOffset = 10.0; if ( random <= seed ) v36 = v35; else v36 = v35 + 10.0; v30.n128_u32[0] = 0; v31.n128_u32[0] = 0.5; sub_100022980(v30, v31, __p); v37 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, void **))v5->setAnchorPoint)(v5, __p); v38.n128_f32[0] = v36 + v34; v37.n128_u32[0] = v32; sub_100022980(v37, v38, __p); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v5->setPosition)(v5, __p); v39 = a1->m_downloadsLabel; v40.n128_u32[0] = *(_DWORD *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))v5->getPosition)(v5) + 4); v41.n128_f32[0] = *(float *)&v32 + 33.0; sub_100022980(v41, v40, __p); v42 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v39->setPosition)(v39, __p); m_likesIcon = a1->m_likesIcon; v42.n128_u32[0] = 0; v44.n128_u32[0] = 0.5; sub_100022980(v42, v44, __p); v45 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, void **))m_likesIcon->setAnchorPoint)(m_likesIcon, __p); v46 = a1->m_likesIcon; v47.n128_f32[0] = v36 + 1.0; v45.n128_u32[0] = v32; sub_100022980(v45, v47, __p); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v46->setPosition)(v46, __p); v48 = a1->m_likesLabel; v49.n128_u32[0] = *(_DWORD *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_likesIcon->getPosition)(a1->m_likesIcon) + 4); v50.n128_f32[0] = *(float *)&v32 + 33.0; sub_100022980(v50, v49, __p); v51 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v48->setPosition)(v48, __p); v51.n128_u32[0] = 0; v52.n128_u32[0] = 0.5; sub_100022980(v51, v52, __p); v53 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, void **))v4->setAnchorPoint)(v4, __p); v54.n128_f32[0] = v36 - v34; v53.n128_u32[0] = v32; sub_100022980(v53, v54, __p); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v4->setPosition)(v4, __p); v55 = a1->m_lengthLabel; v56 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v4->getPosition)(v4); v58.n128_u32[0] = 6.0; if ( !isPlatformer ) v58.n128_f32[0] = 0.0; v57.n128_f32[0] = v58.n128_f32[0] + *(float *)(v56 + 4); if ( isPlatformer ) v59 = "moon_small01_001.png"; else v59 = "star_small01_001.png"; v58.n128_f32[0] = *(float *)&v32 + 33.0; sub_100022980(v58, v57, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v55->setPosition)(v55, __p); v60 = a1->m_exactLengthLabel; v61 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_lengthLabel->getPosition)(a1->m_lengthLabel); v62.n128_u32[0] = 0; v63.n128_u32[0] = -14.0; sub_100022980(v62, v63, &v117); *(float32x2_t *)&v64 = sub_1000229DC(v61, &v117, (float32x2_t *)__p); v65 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v60->setPosition)(v60, __p, v64); m_orbsIcon = a1->m_orbsIcon; v65.n128_u32[0] = 0; v67.n128_u32[0] = 0.5; sub_100022980(v65, v67, __p); v68 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, void **))m_orbsIcon->setAnchorPoint)(m_orbsIcon, __p); v69 = a1->m_orbsIcon; v68.n128_f32[0] = *(float *)&v32 + 1.0; v70.n128_f32[0] = v36 + (float)(v34 * -2.0); sub_100022980(v68, v70, __p); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v69->setPosition)(v69, __p); v71 = a1->m_orbsLabel; v72.n128_u32[0] = *(_DWORD *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_orbsIcon->getPosition)(a1->m_orbsIcon) + 4); v73.n128_f32[0] = *(float *)&v32 + 33.0; sub_100022980(v73, v72, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v71->setPosition)(v71, __p); ((void (__fastcall *)(cocos2d::CCSprite *, bool))a1->m_orbsIcon->setVisible)(a1->m_orbsIcon, random > seed); v74 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, bool))a1->m_orbsLabel->setVisible)( a1->m_orbsLabel, random > seed); v74.n128_f32[0] = (float)(v118 * 0.5) + -100.0; v75.n128_f32[0] = v36 + 5.0; sub_100022980(v74, v75, __p); sub_1000229D0(&a1->m_basePosition, (double *)__p); v76 = GJDifficultySprite::create(1, Long); a1->m_difficultySprite = v76; ((void (__fastcall *)(LevelInfoLayer *, GJDifficultySprite *, __int64))a1->addChild_0)(a1, v76, 3); ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCPoint *))a1->m_difficultySprite->setPosition)( a1->m_difficultySprite, &a1->m_basePosition); v77 = cocos2d::CCSprite::createWithSpriteFrameName(v59); a1->m_starsIcon = v77; v78 = ((__n128 (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v77); m_starsIcon = a1->m_starsIcon; v78.n128_u32[0] = 8.0; v80.n128_u32[0] = -30.0; sub_100022980(v78, v80, &v117); *(float32x2_t *)&v81 = sub_1000229DC((float32x2_t *)&a1->m_basePosition, &v117, (float32x2_t *)__p); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))m_starsIcon->setPosition)(m_starsIcon, __p, v81); v82 = cocos2d::CCLabelBMFont::create_1("0", "bigFont.fnt"); a1->m_starsLabel = v82; v83 = ((__n128 (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v82); m_starsLabel = a1->m_starsLabel; v83.n128_u32[0] = 1.0; v85.n128_u32[0] = 0.5; sub_100022980(v83, v85, __p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_starsLabel->setAnchorPoint)(m_starsLabel, __p); v86 = a1->m_starsLabel; v87 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_starsIcon->getPosition)(a1->m_starsIcon); v88.n128_u32[0] = -8.0; v89.n128_u32[0] = 0; sub_100022980(v88, v89, &v117); *(float32x2_t *)&v90 = sub_1000229DC(v87, &v117, (float32x2_t *)__p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v86->setPosition)(v86, __p, v90); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_starsLabel->setScale)(a1->m_starsLabel, 0.4); a1->m_baseStarsY = *(float *)(((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_starsLabel->getPosition)(a1->m_starsLabel) + 4); if ( random > seed ) { v91 = a1->m_level; if ( v91->m_dailyID.random > v91->m_dailyID.seed || v91->m_gauntletLevel ) { v92 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png"); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v92); v93 = GameStatsManager::sharedState(); BaseDiamonds = GameStatsManager::getBaseDiamonds(v93, a1->m_level->m_stars.random - a1->m_level->m_stars.seed); v95 = GameStatsManager::sharedState(); AwardedDiamondsForLevel = GameStatsManager::getAwardedDiamondsForLevel(v95, a1->m_level); v97 = (cocos2d::CCString *)sub_100268F4C("%i/%i", AwardedDiamondsForLevel, BaseDiamonds); CString = (char *)cocos2d::CCString::getCString(v97); sub_100009900(__p, CString); if ( v116 >= 0 ) v99 = __p; else v99 = (void **)__p[0]; v100 = cocos2d::CCLabelBMFont::create_1((const char *)v99, "bigFont.fnt"); v101 = ((__n128 (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v100); v101.n128_u32[0] = 1.0; v102.n128_u32[0] = 0.5; sub_100022980(v101, v102, &v117); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v100->setAnchorPoint)(v100, &v117); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v100->setScale)(v100, 0.35); v103 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v100->getContentSize)(v100); v104.n128_f32[0] = (float)((float)(v103 * ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v100->getScale)(v100)) * 0.5) + 2.0; if ( a1->m_level->m_stars.random - a1->m_level->m_stars.seed == 10 ) v106 = -4; else v106 = 0; v105.n128_f32[0] = (float)v106 + -44.5; sub_100022980(v104, v105, &v114); *(float32x2_t *)&v107 = sub_1000229DC((float32x2_t *)&a1->m_basePosition, &v114, &v117); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v92->setPosition)(v92, &v117, v107); v108 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v92->getPosition)(v92); v109.n128_u32[0] = -8.0; v110.n128_u32[0] = 0; sub_100022980(v109, v110, &v114); *(float32x2_t *)&v111 = sub_1000229DC(v108, &v114, &v117); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v100->setPosition)(v100, &v117, v111); if ( AwardedDiamondsForLevel == BaseDiamonds ) { v117.i8[2] = -1; v117.i16[0] = -156; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v100->setColor)(v100, &v117); } if ( v116 < 0 ) operator delete(__p[0]); } } if ( a1->m_challenge ) { if ( (unsigned int)sub_10024A36C(a1->m_icons) ) { v112 = 0; do { v113 = sub_10024A388(a1->m_icons, v112); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v113 + 328LL))(v113, 0); v112 = (unsigned int)(v112 + 1); } while ( (unsigned int)v112 < (unsigned int)sub_10024A36C(a1->m_icons) ); } ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_orbsIcon->setVisible)(a1->m_orbsIcon, 0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_orbsLabel->setVisible)(a1->m_orbsLabel, 0); } LevelInfoLayer::updateLabelValues(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source