// // LevelOptionsLayer::setupOptions from 0x56fd74 to 0x57002e (698 bytes) // // 0 xrefs: // // 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 LevelOptionsLayer::setupOptions(LevelOptionsLayer *a1) { cocos2d::CCDirector *v2; // r0 LevelSettingsObject *m_settingsObject; // r3 LevelSettingsObject *v4; // r3 CCMenuItemSpriteExtra *v5; // r9 cocos2d::CCMenu *m_buttonMenu; // r11 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCSprite *v8; // r6 CCMenuItemSpriteExtra *v9; // r6 cocos2d::CCMenu *v10; // r10 void (__fastcall *v11)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCSize v12; // [sp+34h] [bp-28h] BYREF cocos2d::CCPoint v13; // [sp+3Ch] [bp-20h] BYREF cocos2d::CCPoint v14; // [sp+44h] [bp-18h] BYREF cocos2d::CCPoint v15; // [sp+4Ch] [bp-10h] BYREF v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v12, v2); GJOptionsLayer::addToggle(a1, "Mini Mode", 0, a1->m_settingsObject->m_startMini, (const char *)&unk_939830); GJOptionsLayer::addToggle(a1, "Dual Mode", 1, a1->m_settingsObject->m_startDual, (const char *)&unk_939830); m_settingsObject = a1->m_settingsObject; if ( !m_settingsObject->m_startsWithStartPos ) GJOptionsLayer::addToggle( a1, "2-Player Mode", 2, m_settingsObject->m_twoPlayerMode, "Players are controlled separately.\n" "Player 1: Left side\n" "Player 2: Right side\n" "(You can change the controls in the options menu)"); GJOptionsLayer::addToggle(a1, "Mirror Mode", 4, a1->m_settingsObject->m_mirrorMode, (const char *)&unk_939830); GJOptionsLayer::addToggle(a1, "Flip\nGravity", 5, a1->m_settingsObject->m_isFlipped, (const char *)&unk_939830); GJOptionsLayer::addToggle( a1, "Rotate\nGameplay", 6, a1->m_settingsObject->m_rotateGameplay, (const char *)&unk_939830); GJOptionsLayer::addToggle( a1, "Reverse\nGameplay", 7, a1->m_settingsObject->m_reverseGameplay, (const char *)&unk_939830); v4 = a1->m_settingsObject; if ( !v4->m_startsWithStartPos ) { GJOptionsLayer::addToggle( a1, "No Time\nPenalty", 20, v4->m_noTimePenalty, "In platformer mode you automatically lose 1000 points per second. Toggle to disable this penalty."); sub_776584((int)&v14, "Spawn Group:"); cocos2d::CCPoint::CCPoint(&v15, (float)(v12.width * 0.5) + 50.0, (float)(v12.height * 0.5) - 100.0); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 13, (int)&v14, &v15, (cocos2d::CCZone *)0x3F333333, 1, Uint, 6, 1, nullptr, 9999.0, 0, 0, 0, 2, 0); sub_774008(&v14); sub_776584((int)&v14, "Spawn Group"); sub_776584( (int)&v15, "Lets you set a target position for player spawn.\n" "If the group contains multiple objects a random target will be selected."); v5 = InfoAlertButton::create((int)&v14, (int)&v15, COERCE_INT(0.5)); sub_774008(&v15); sub_774008(&v14); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v5); m_buttonMenu = a1->m_buttonMenu; setPosition = v5->setPosition; cocos2d::CCPoint::CCPoint( &v14, (float)((float)(v12.width * 0.5) + 50.0) - 55.0, (float)((float)(v12.height * 0.5) - 100.0) + 24.0); cocos2d::CCNode::convertToNodeSpace(&v15, m_buttonMenu, &v14); setPosition(v5, &v15); v8 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v8->setScale)(v8, 1058642330); LODWORD(v15.x) = LevelOptionsLayer::onSettings; v15.y = 0.0; v9 = CCMenuItemSpriteExtra::create( v8, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(LevelOptionsLayer::onSettings, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v9); v10 = a1->m_buttonMenu; v11 = v9->setPosition; cocos2d::CCPoint::CCPoint( &v13, (float)((float)(a1->m_width * 0.5) + (float)(v12.width * 0.5)) - 25.0, (float)((float)(a1->m_height * 0.5) + (float)(v12.height * 0.5)) - 25.0); cocos2d::CCNode::convertToNodeSpace(&v14, v10, &v13); v11(v9, &v14); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source