// // ShareLevelLayer::setupStars from 0x100275b48 to 0x100275e00 (696 bytes) // // 1 xrefs: // > ShareLevelLayer::init @ 0x100275774 // // 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 ShareLevelLayer::setupStars(ShareLevelLayer *a1) { cocos2d::CCDirector *v2; // x0 cocos2d::CCArray *v3; // x0 cocos2d::CCArray *v4; // x21 __int64 v5; // x22 cocos2d::CCArray *v6; // x20 CCMenuItemSpriteExtra *StarsButton; // x24 __int64 v8; // x0 __n128 v9; // q0 __n128 v10; // q1 cocos2d::CCMenu *m_buttonMenu; // x22 __n128 v12; // q1 __n128 v13; // q0 GJGameLevel *m_level; // x0 char *v15; // x1 void **v16; // x0 cocos2d::CCLabelBMFont *v17; // x20 __n128 v18; // q0 __n128 v19; // q1 double v20; // d0 __n128 v21; // q0 cocos2d::CCSprite *m_difficultySprite; // x20 __n128 v23; // q1 double v24; // d0 float32x2_t v25; // [xsp+0h] [xbp-80h] BYREF void *__p[2]; // [xsp+8h] [xbp-78h] BYREF char v27; // [xsp+1Fh] [xbp-61h] float32x2_t v28; // [xsp+20h] [xbp-60h] BYREF float32x2_t v29; // [xsp+28h] [xbp-58h] BYREF float32x2_t v30; // [xsp+30h] [xbp-50h] BYREF float v31; // [xsp+38h] [xbp-48h] float v32; // [xsp+3Ch] [xbp-44h] cocos2d::SEL_MenuHandler v33; // 0:x2.16 cocos2d::CCPoint v34; // 0:s1.4,4:s2.4 cocos2d::CCPoint v35; // 0:s1.4,4:s2.4 v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v2); v3 = (cocos2d::CCArray *)sub_10024A15C(); a1->m_starButtons = v3; cocos2d::CCObject::retain(v3); v4 = (cocos2d::CCArray *)sub_10024A15C(); v5 = 1; v6 = (cocos2d::CCArray *)sub_10024A15C(); do { v33.ptr = (void (__cdecl *)(cocos2d::CCObject *))ShareLevelLayer::selectRating; v33.adj = 0; StarsButton = ShareLevelLayer::getStarsButton(a1, v5, v33, a1->m_buttonMenu, 0.8); sub_10024A2D0((__int64)a1->m_starButtons); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))StarsButton->setTag)(StarsButton, v5); if ( (unsigned int)v5 >= 6 ) v8 = (__int64)v6; else v8 = (__int64)v4; sub_10024A2D0(v8); v5 = (unsigned int)(v5 + 1); } while ( (_DWORD)v5 != 11 ); v9.n128_f32[0] = v31 * 0.5; v10.n128_f32[0] = (float)((float)((float)(v32 * 0.5) + -50.0) + 35.0) + 2.0; sub_100022980(v9, v10, &v30); m_buttonMenu = a1->m_buttonMenu; cocos2d::CCNode::convertToWorldSpace(a1->m_mainLayer, (const cocos2d::CCPoint *)&v30); cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, (const cocos2d::CCPoint *)__p); sub_1000229B8((__int64 *)__p, (__int64 *)&v29); GameToolbox::alignItemsHorisontally(v4, 18.0, v34, (bool)__p); v12.n128_u32[0] = -1039400960; v13.n128_u32[0] = 0; sub_100022980(v13, v12, &v28); sub_1000229DC(&v29, &v28, (float32x2_t *)__p); GameToolbox::alignItemsHorisontally(v6, 18.0, v35, (bool)__p); m_level = a1->m_level; a1->m_starsRequested = m_level->m_starsRequested; if ( GJGameLevel::isPlatformer(m_level) ) v15 = "Request Moons"; else v15 = "Request Stars"; sub_100009900(__p, v15); if ( v27 >= 0 ) v16 = __p; else v16 = (void **)__p[0]; v17 = cocos2d::CCLabelBMFont::create_1((const char *)v16, "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v17->setScale)(v17, 0.5); v18 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v17, 2); v18.n128_u32[0] = 0; v19.n128_u32[0] = 30.0; sub_100022980(v18, v19, &v25); *(float32x2_t *)&v20 = sub_1000229DC(&v30, &v25, &v28); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v17->setPosition)(v17, &v28, v20); a1->m_difficultySprite = cocos2d::CCSprite::createWithSpriteFrameName("difficulty_00_btn_001.png"); v21 = ((__n128 (__fastcall *)(cocos2d::CCLayer *))a1->m_mainLayer->addChild_0)(a1->m_mainLayer); m_difficultySprite = a1->m_difficultySprite; v21.n128_u32[0] = 1125842944; v23.n128_u32[0] = -18.0; sub_100022980(v21, v23, &v25); *(float32x2_t *)&v24 = sub_1000229DC(&v30, &v25, &v28); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))m_difficultySprite->setPosition)( m_difficultySprite, &v28, v24); ShareLevelLayer::selectRating(a1, nullptr); if ( v27 < 0 ) operator delete(__p[0]); }
GD Web Decomp Icon

GD Web Decomp

Raw Source