// // EditorOptionsLayer::setupOptions from 0x140291070 to 0x140291965 (2293 bytes) // // 2 xrefs: // > @ 0x1405758d0 // > @ 0x1406d19ac // // 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 // // Hidden C++ exception states: #wind=2 void EditorOptionsLayer::setupOptions(EditorOptionsLayer *a1) { float v1; // xmm0_4 cocos2d::CCArray *v3; // r14 GameManager *v4; // rcx GameManager *v5; // rcx __int64 v6; // rcx cocos2d::CCDirector *v7; // rax struct cocos2d::CCLabelBMFont *v8; // rbx float v9; // xmm0_4 cocos2d::CCString *v10; // rax const char *CString; // rax cocos2d::CCLabelBMFont *v12; // rax cocos2d::CCSprite *v13; // rbx CCMenuItemSpriteExtra *v14; // rdi float v15; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v16; // rbx struct cocos2d::CCPoint v17; // rax struct cocos2d::CCSprite *v18; // rbx CCMenuItemSpriteExtra *v19; // rdi float v20; // xmm0_4 double v21; // xmm0_8 CCMenuItemSpriteExtra_vtbl *v22; // rbx struct cocos2d::CCPoint v23; // rax struct cocos2d::CCLabelBMFont *v24; // rbx float v25; // xmm0_4 cocos2d::CCString *v26; // rax const char *v27; // rax cocos2d::CCLabelBMFont *v28; // rax cocos2d::CCSprite *v29; // rbx CCMenuItemSpriteExtra *v30; // rdi float v31; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v32; // rbx struct cocos2d::CCPoint v33; // rax struct cocos2d::CCSprite *v34; // rbx CCMenuItemSpriteExtra *v35; // rdi float v36; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v37; // rbx struct cocos2d::CCPoint v38; // rax struct cocos2d::CCPoint v39; // [rsp+20h] [rbp-30h] BYREF struct cocos2d::CCPoint v40; // [rsp+28h] [rbp-28h] BYREF char v41; // [rsp+80h] [rbp+30h] BYREF char v42; // [rsp+88h] [rbp+38h] BYREF float v43; // [rsp+90h] [rbp+40h] void *v44; // [rsp+98h] [rbp+48h] BYREF a1->m_offset = 15.0; a1->m_togglesPerPage = 12; GJOptionsLayer::addGVToggle(a1, "Draw Trigger Boxes", "0044", "Draws the hitbox for touch triggered objects."); GJOptionsLayer::addGVToggle( a1, "Playtest No UI", "0046", "Hides part of the editor's user interface during playtesting."); GJOptionsLayer::addGVToggle(a1, "Playtest Music", "0002", "Plays music during playtesting."); GJOptionsLayer::addGVToggle( a1, "Effect Lines", "0043", "Shows a vertical line for triggers to indicate where they are activated."); GJOptionsLayer::addGVToggle( a1, "Duration Lines", "0058", "Shows a horizontal line for triggers to indicate how long they are active."); GJOptionsLayer::addGVToggle(a1, "Grid On Top", "0039", "Shows the grid on top of objects in editor."); GJOptionsLayer::addGVToggle(a1, "Playtest No Grid", "0079", "Hides grid during playtesting."); GJOptionsLayer::addGVToggle(a1, "Hide Background", "0078", "Hides background in editor."); GJOptionsLayer::addGVToggle( a1, "Enable Link Controls", "0097", "Enables option to link objects together in the editor. Linked objects are always selected and deleted together."); GJOptionsLayer::addGVToggle( a1, "Hold To Swipe", "0057", "Enables swiping after holding down anywhere on the grid for a short duration. Useful when selecting objects without " "the need to toggle swiping manually."); a1->m_toggleCount += a1->m_togglesPerPage - a1->m_toggleCount % a1->m_togglesPerPage; GJOptionsLayer::addGVToggle( a1, "Swipe Cycle Mode", "0059", "Cycles through touched objects instead of adding to selection when tapping in the same position while swiping is ena" "bled. Useful if you want to select multiple objects that are mixed with other objects."); GJOptionsLayer::addGVToggle( a1, "Layer Locking", "0103", "Allows you to click on the editor layer number to lock and unlock a layer."); GJOptionsLayer::addGVToggle(a1, "Show Clicks", "0149", "Shows a marker during playtesting when the player clicks."); GJOptionsLayer::addGVToggle( a1, "Auto-Pause", "0150", "Pauses gameplay when starting from a start position to prepare gameplay. Click a second time to actually start playi" "ng. This is used to handle start lag in larger levels."); GJOptionsLayer::addGVToggle(a1, "Hide Path", "0152", "Hides the player path from playtesting."); GJOptionsLayer::addGVToggle( a1, "Start Optimization", "0151", "Tries to speed up start position loading in editor. Experimental."); GJOptionsLayer::addGVToggle(a1, "Hide Particle Icons", "0137", "Hides particle icons while preview mode is enabled."); GJOptionsLayer::addGVToggle( a1, "Increase Undo/Redo", "0013", "Increases maximum undo and redo limit from 200 to 1000 in editor."); GJOptionsLayer::addGVToggle(a1, "Playtest Smooth Fix", "0102", "Enables smooth fix when playtesting in the editor."); GJOptionsLayer::addGVToggle( a1, "Increase Scale", "0112", "Increases maximum object scale to 4x and minimum scale to 0.25x. Note that objects larger than 6x grid size may disa" "ppear near the screen edge. This may be fixed in the future."); GJOptionsLayer::addGVToggle( a1, "Disable Paste State Groups", "0156", "Makes it so that pasting state no longer updates the group info of the target object(s). Group state can be pasted d" "irectly on the edit group page instead."); GJOptionsLayer::addGVToggle( a1, "Small Warp Buttons", "0169", "Warp control buttons are 50% smaller. (Restart editor)"); GJOptionsLayer::addGVToggle( a1, "Static Trace Arrows", "0181", "Disable the arrows showing directed connections when using Trace In/Out."); v3 = GJOptionsLayer::objectsForPage(a1, 0); v4 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v44 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v44); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v4 = (GameManager *)qword_1406C2ED8; } a1->m_buttonsPerRow = GameManager::getIntGameVariable(v4, "0049"); v5 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v44 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v44); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v5 = (GameManager *)qword_1406C2ED8; } a1->m_buttonRows = GameManager::getIntGameVariable(v5, "0050"); v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6); cocos2d::CCDirector::getWinSize(v7); cocos2d::CCPoint::CCPoint(v1, (float)(v43 * 0.5) - 100.0); v8 = cocos2d::CCLabelBMFont::create("Buttons Per Row", "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v8->setScale_0)(v8); v9 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v8, 2); cocos2d::CCPoint::CCPoint(v9, 0.0); cocos2d::CCPoint::operator+(&v41, &v44); v8->setPosition_0(v8, (const cocos2d::CCPoint *)&v44); cocos2d::CCArray::addObject(v3, v8); v10 = cocos2d::CCString::createWithFormat("%i", a1->m_buttonsPerRow); CString = cocos2d::CCString::getCString(v10); v12 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt"); a1->m_buttonsPerRowLabel = v12; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v12, 2); a1->m_buttonsPerRowLabel->setPosition_0(a1->m_buttonsPerRowLabel, (const cocos2d::CCPoint *)&v41); cocos2d::CCArray::addObject(v3, a1->m_buttonsPerRowLabel); v13 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); cocos2d::CCSprite::setFlipX(v13, 1); ((void (__fastcall *)(cocos2d::CCSprite *))v13->setScale_0)(v13); v14 = CCMenuItemSpriteExtra::create(v13, nullptr, a1, (cocos2d::SEL_MenuHandler *)EditorOptionsLayer::onButtonsPerRow); v15 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)( a1->m_buttonMenu, v14); cocos2d::CCPoint::CCPoint(v15, 40.0); cocos2d::CCPoint::operator+(&v41, &v44); v16 = v14->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v17 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v40); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v16->setPosition_0)(v14, v17); HIDWORD(v14->m_pfnSelector.adj) = 0x40000000; v14->setTag(v14, 1); cocos2d::CCArray::addObject(v3, v14); v18 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v18->setScale_0)(v18); v19 = CCMenuItemSpriteExtra::create(v18, nullptr, a1, (cocos2d::SEL_MenuHandler *)EditorOptionsLayer::onButtonsPerRow); v20 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)( a1->m_buttonMenu, v19); cocos2d::CCPoint::CCPoint(v20, -40.0); v21 = cocos2d::CCPoint::operator+(&v41, &v44); v22 = v19->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v23 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v39); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v22->setPosition_0)(v19, v23); HIDWORD(v19->m_pfnSelector.adj) = 0x40000000; v19->setTag(v19, 0); cocos2d::CCArray::addObject(v3, v19); cocos2d::CCPoint::CCPoint(*(float *)&v21, (float)(v43 * 0.5) + 100.0); v24 = cocos2d::CCLabelBMFont::create("Button Rows", "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v24->setScale_0)(v24); v25 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v24, 2); cocos2d::CCPoint::CCPoint(v25, 0.0); cocos2d::CCPoint::operator+(&v42, &v44); v24->setPosition_0(v24, (const cocos2d::CCPoint *)&v44); cocos2d::CCArray::addObject(v3, v24); v26 = cocos2d::CCString::createWithFormat("%i", a1->m_buttonRows); v27 = cocos2d::CCString::getCString(v26); v28 = cocos2d::CCLabelBMFont::create(v27, "goldFont.fnt"); a1->m_buttonRowsLabel = v28; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v28, 2); a1->m_buttonRowsLabel->setPosition_0(a1->m_buttonRowsLabel, (const cocos2d::CCPoint *)&v42); cocos2d::CCArray::addObject(v3, a1->m_buttonRowsLabel); v29 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); cocos2d::CCSprite::setFlipX(v29, 1); ((void (__fastcall *)(cocos2d::CCSprite *))v29->setScale_0)(v29); v30 = CCMenuItemSpriteExtra::create(v29, nullptr, a1, (cocos2d::SEL_MenuHandler *)EditorOptionsLayer::onButtonRows); v31 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)( a1->m_buttonMenu, v30); cocos2d::CCPoint::CCPoint(v31, 40.0); cocos2d::CCPoint::operator+(&v42, &v44); v32 = v30->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v33 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v39); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v32->setPosition_0)(v30, v33); HIDWORD(v30->m_pfnSelector.adj) = 0x40000000; v30->setTag(v30, 1); cocos2d::CCArray::addObject(v3, v30); v34 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v34->setScale_0)(v34); v35 = CCMenuItemSpriteExtra::create(v34, nullptr, a1, (cocos2d::SEL_MenuHandler *)EditorOptionsLayer::onButtonRows); v36 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)( a1->m_buttonMenu, v35); cocos2d::CCPoint::CCPoint(v36, -40.0); cocos2d::CCPoint::operator+(&v42, &v44); v37 = v35->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v38 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v39); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v37->setPosition_0)(v35, v38); HIDWORD(v35->m_pfnSelector.adj) = 0x40000000; v35->setTag(v35, 0); cocos2d::CCArray::addObject(v3, v35); }
GD Web Decomp Icon

GD Web Decomp

Raw Source