// // ShareLevelLayer::setupStars from 0x3b8a44 to 0x3b8c4c (520 bytes) // // 1 xrefs: // > ShareLevelLayer::init @ 0x3b916e // // 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 ShareLevelLayer::setupStars(ShareLevelLayer *a1) { int v2; // r5 cocos2d::CCDirector *v3; // r0 cocos2d::CCSize *WinSize; // r0 cocos2d::CCArray *v5; // r0 cocos2d::CCArray *v6; // r0 cocos2d::CCArray *v7; // r10 cocos2d::CCArray *v8; // r9 cocos2d::CCMenu *m_buttonMenu; // r3 CCMenuItemSpriteExtra *StarsButton; // r7 cocos2d::CCArray *v12; // r0 cocos2d::CCMenu *v13; // r7 GJGameLevel *m_level; // r0 char *v15; // r1 cocos2d::CCLabelBMFont *v16; // r9 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v18; // r0 cocos2d::CCSprite *m_difficultySprite; // r9 void (__fastcall *v20)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11 bool v21; // [sp+0h] [bp-44h] bool v22; // [sp+0h] [bp-44h] cocos2d::CCLabelBMFont *v23; // [sp+8h] [bp-3Ch] BYREF cocos2d::CCSize v24; // [sp+Ch] [bp-38h] BYREF cocos2d::CCPoint v25; // [sp+14h] [bp-30h] BYREF cocos2d::CCPoint v26; // [sp+1Ch] [bp-28h] BYREF cocos2d::CCPoint v27; // [sp+24h] [bp-20h] BYREF cocos2d::CCPoint v28; // [sp+2Ch] [bp-18h] BYREF void (*v29)(ShareLevelLayer *, cocos2d::CCObject *); // [sp+34h] [bp-10h] int v30; // [sp+38h] [bp-Ch] v2 = 1; v3 = cocos2d::CCDirector::sharedDirector(); WinSize = cocos2d::CCDirector::getWinSize(&v24, v3); v5 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)WinSize); a1->m_starButtons = v5; cocos2d::CCObject::retain(v5); v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6); v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7); do { m_buttonMenu = a1->m_buttonMenu; v29 = ShareLevelLayer::selectRating; v30 = 0; StarsButton = ShareLevelLayer::getStarsButton( a1, v2, (cocos2d::SEL_MenuHandler)(unsigned int)ShareLevelLayer::selectRating, m_buttonMenu, 0.8); cocos2d::CCArray::addObject(a1->m_starButtons, StarsButton); StarsButton->setTag(StarsButton, v2); if ( v2++ <= 5 ) v12 = v7; else v12 = v8; cocos2d::CCArray::addObject(v12, StarsButton); } while ( v2 != 11 ); cocos2d::CCPoint::CCPoint(&v25, v24.width * 0.5, (float)((float)((float)(v24.height * 0.5) - 50.0) + 35.0) + 2.0); v13 = a1->m_buttonMenu; cocos2d::CCNode::convertToWorldSpace(&v28, a1->m_mainLayer, &v25); cocos2d::CCNode::convertToNodeSpace(&v26, v13, &v28); cocos2d::CCPoint::CCPoint(&v28, &v26); GameToolbox::alignItemsHorisontally(v7, 18.0, (cocos2d::CCPoint)(unsigned int)&v28, v21); cocos2d::CCPoint::CCPoint(&v27, 0.0, -35.0); cocos2d::CCPoint::operator+(&v28, &v26, &v27); GameToolbox::alignItemsHorisontally(v8, 18.0, (cocos2d::CCPoint)(unsigned int)&v28, v22); 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_776584((int)&v23, v15); v16 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v16->setScale)(v16, 1056964608); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v16, 2); setPosition = v16->setPosition; cocos2d::CCPoint::CCPoint(&v27, 0.0, 30.0); cocos2d::CCPoint::operator+(&v28, &v25, &v27); setPosition(v16, &v28); v18 = cocos2d::CCSprite::createWithSpriteFrameName("difficulty_00_btn_001.png"); a1->m_difficultySprite = v18; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v18, 3); m_difficultySprite = a1->m_difficultySprite; v20 = m_difficultySprite->setPosition; cocos2d::CCPoint::CCPoint(&v27, 155.0, -18.0); cocos2d::CCPoint::operator+(&v28, &v25, &v27); v20(m_difficultySprite, &v28); ShareLevelLayer::selectRating(a1, nullptr); sub_774008(&v23); }
GD Web Decomp Icon

GD Web Decomp

Raw Source