// // KeybindingsLayer::init from 0x853424 to 0x853d34 (2320 bytes) // // 3 xrefs: // > KeybindingsLayer::create @ 0x853e04 // > @ 0x9bf88 // > @ 0x118f790 // // 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 // bool KeybindingsLayer::init(KeybindingsLayer *a1) { char v2; // w24 cocos2d::CCDirector *v3; // x0 cocos2d::CCNode *v4; // x23 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x25 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCLabelBMFont *v7; // x23 void (__fastcall *v8)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCLabelBMFont *v9; // x25 cocos2d::CCLabelBMFont *v10; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v12)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 __int64 v13; // x26 cocos2d::CCDictionary *v14; // x0 cocos2d::CCDictionary *v15; // x0 cocos2d::CCMenu *v16; // x0 cocos2d::CCLayer *m_mainLayer; // x3 cocos2d::CCLabelBMFont *v18; // x0 cocos2d::CCLabelBMFont *v19; // x0 cocos2d::CCSprite *v20; // x0 CCMenuItemSpriteExtra *v21; // x23 cocos2d::CCMenu *m_buttonMenu; // x26 void (__fastcall *v23)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCSprite *v24; // x0 CCMenuItemSpriteExtra *v25; // x0 cocos2d::CCMenu *v26; // x2 CCMenuItemSpriteExtra *m_prevButton; // x25 cocos2d::CCMenu *v28; // x27 void (__fastcall *v29)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCDirector *v30; // x0 float v31; // s0 cocos2d::CCSprite *v32; // x23 CCMenuItemSpriteExtra *v33; // x0 cocos2d::CCMenu *v34; // x2 CCMenuItemSpriteExtra *m_nextButton; // x23 cocos2d::CCMenu *v36; // x26 void (__fastcall *v37)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCDirector *v38; // x0 float v39; // s0 float v41; // [xsp+78h] [xbp+78h] float v42; // [xsp+7Ch] [xbp+7Ch] __int64 v43; // [xsp+80h] [xbp+80h] BYREF cocos2d::CCRect v44; // [xsp+88h] [xbp+88h] BYREF cocos2d::CCPoint v45; // 0:kr08_8.8 cocos2d::CCPoint v46; // 0:kr10_8.8 cocos2d::CCPoint v47; // 0:kr18_8.8 cocos2d::SEL_MenuHandler v48; // 0:x2.16 cocos2d::SEL_MenuHandler v49; // 0:x2.16 cocos2d::SEL_MenuHandler v50; // 0:x2.16 cocos2d::CCRect v51; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v2 = FLAlertLayer::init(a1, 0x4Bu); if ( v2 ) { v3 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v3); cocos2d::CCRect::CCRect(&v44, 0.0, 0.0, 80.0, 80.0); v4 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v44, v51); setContentSize = v4->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v44, 420.0, 280.0); setContentSize(v4, (const cocos2d::CCSize *)&v44); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v4, -1); setPosition = v4->setPosition; cocos2d::CCPoint::CCPoint(&v44.origin, v41 * 0.5, v42 * 0.5); setPosition(v4, &v44.origin); v7 = cocos2d::CCLabelBMFont::create(); v8 = v7->setPosition; cocos2d::CCPoint::CCPoint(&v44.origin, v41 * 0.5, (float)((float)(v42 * 0.5) + 140.0) - 16.0); v8(v7, &v44.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v7); v7->setScale(v7, 0.8); v9 = cocos2d::CCLabelBMFont::create(); v10 = v7; getPosition = v7->getPosition; v12 = v9->setPosition; v13 = (__int64)getPosition(v10); cocos2d::CCPoint::CCPoint(&v44.origin, 0.0, -20.0); cocos2d::CCPoint::operator+(&v43, v13, &v44); v12(v9, (const cocos2d::CCPoint *)&v43); a1->m_mainLayer->addChild(a1->m_mainLayer, v9); v9->setScale(v9, 0.6); v14 = cocos2d::CCDictionary::create(); a1->m_variables = v14; cocos2d::CCObject::retain(v14); v15 = cocos2d::CCDictionary::create(); a1->m_values = v15; cocos2d::CCObject::retain(v15); v16 = cocos2d::CCMenu::create(); m_mainLayer = a1->m_mainLayer; a1->m_buttonMenu = v16; m_mainLayer->addChild_0(m_mainLayer, v16, 10); v18 = KeybindingsLayer::addKeyPair(a1, "Gameplay Keys", " "); v18->setColor(v18, (const cocos2d::ccColor3B *)&unk_EECDD0); KeybindingsLayer::addKeyPair(a1, "Jump", "Space / Up"); KeybindingsLayer::addKeyPair(a1, "Pause", "Escape"); KeybindingsLayer::addKeyPair(a1, "Place Checkpoint", "Z"); KeybindingsLayer::addKeyPair(a1, "Delete Checkpoint", "X"); a1->m_keyCount = 7; v19 = KeybindingsLayer::addKeyPair(a1, "Editor Keys", " "); v19->setColor(v19, (const cocos2d::ccColor3B *)&unk_EECDD0); KeybindingsLayer::addKeyPair(a1, "Build Mode", "1"); KeybindingsLayer::addKeyPair(a1, "Edit Mode", &byte_F78BA8); KeybindingsLayer::addKeyPair(a1, "Delete Mode", "3"); KeybindingsLayer::addKeyPair(a1, "Swipe Modifier", "Shift"); KeybindingsLayer::addKeyPair(a1, "Move Modifier", "Space"); KeybindingsLayer::addKeyPair(a1, "Rotate CCW", "Q"); KeybindingsLayer::addKeyPair(a1, "Rotate CW", "E"); KeybindingsLayer::addKeyPair(a1, "Flip X", "Alt + Q"); KeybindingsLayer::addKeyPair(a1, "Flip Y", "Alt + E"); KeybindingsLayer::addKeyPair(a1, "Delete selected", "Delete"); KeybindingsLayer::addKeyPair(a1, "Undo", "Ctrl + Z"); KeybindingsLayer::addKeyPair(a1, "Redo", "Ctrl + Shift + Z"); KeybindingsLayer::addKeyPair(a1, "Deselect", "Alt + D"); KeybindingsLayer::addKeyPair(a1, "Copy", "Ctrl + C"); KeybindingsLayer::addKeyPair(a1, "Paste", "Ctrl + V"); KeybindingsLayer::addKeyPair(a1, "Duplicate", "Ctrl + D"); KeybindingsLayer::addKeyPair(a1, "Rotate", "R"); KeybindingsLayer::addKeyPair(a1, "Free Move", "F"); KeybindingsLayer::addKeyPair(a1, "Swipe", "T"); KeybindingsLayer::addKeyPair(a1, "Snap", "G"); KeybindingsLayer::addKeyPair(a1, "Playtest", "Enter"); KeybindingsLayer::addKeyPair(a1, "Playback music", "Ctrl + Enter"); KeybindingsLayer::addKeyPair(a1, "Next Group", "Arrow Right"); KeybindingsLayer::addKeyPair(a1, "Previous Group", "Arrow Left"); KeybindingsLayer::addKeyPair(a1, "Object Left", "A"); KeybindingsLayer::addKeyPair(a1, "Object Right", "D"); KeybindingsLayer::addKeyPair(a1, "Object Up", "W"); KeybindingsLayer::addKeyPair(a1, "Object Down", "S"); KeybindingsLayer::addKeyPair(a1, "Object Left small", "Shift + A"); KeybindingsLayer::addKeyPair(a1, "Object Right small", "Shift + D"); KeybindingsLayer::addKeyPair(a1, "Object Up small", "Shift + W"); KeybindingsLayer::addKeyPair(a1, "Object Down small", "Shift + S"); KeybindingsLayer::addKeyPair(a1, "Object Down small", "Shift + S"); KeybindingsLayer::addKeyPair(a1, "Lock Preview", "F1"); KeybindingsLayer::addKeyPair(a1, "Unlock Preview", "F2"); KeybindingsLayer::addKeyPair(a1, "Preview Mode On/Off", "F3"); KeybindingsLayer::addKeyPair(a1, "Particle Icons On/Off", "F4"); KeybindingsLayer::addKeyPair(a1, "Debug Draw On/Off", "F5"); KeybindingsLayer::addKeyPair(a1, "Hide Invisible On/Off", "F6"); KeybindingsLayer::addKeyPair(a1, "Save Editor Pos", "Ctrl + 0-9"); KeybindingsLayer::addKeyPair(a1, "Load Editor Pos", "Alt + 0-9"); KeybindingsLayer::addKeyPair(a1, "Zoom", "Ctrl + ScrollWheel"); KeybindingsLayer::addKeyPair(a1, "Transform", "Ctrl + T"); v20 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); v48.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v48.adj = (size_t)KeybindingsLayer::onClose; v21 = CCMenuItemSpriteExtra::create(v20, nullptr, v48); CCMenuItemSpriteExtra::setSizeMult(v21, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v21); m_buttonMenu = a1->m_buttonMenu; v23 = v21->setPosition; cocos2d::CCPoint::CCPoint( &v44.origin, (float)((float)(v41 * 0.5) + -210.0) + 5.0, (float)((float)(v42 * 0.5) + 140.0) - 5.0); v45 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v44.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *, float, float))v23)(v21, &v43, v45.x, v45.y); v24 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v49.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v49.adj = (size_t)KeybindingsLayer::onPrevPage; v25 = CCMenuItemSpriteExtra::create(v24, nullptr, v49); v26 = a1->m_buttonMenu; a1->m_prevButton = v25; v26->addChild(v26, v25); m_prevButton = a1->m_prevButton; v28 = a1->m_buttonMenu; v29 = m_prevButton->setPosition; v30 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v30); cocos2d::CCPoint::CCPoint(&v44.origin, v31 + 24.0, v42 * 0.5); v46 = cocos2d::CCNode::convertToNodeSpace(v28, &v44.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *, float, float))v29)(m_prevButton, &v43, v46.x, v46.y); v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v32, 1); v50.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v50.adj = (size_t)KeybindingsLayer::onNextPage; v33 = CCMenuItemSpriteExtra::create(v32, nullptr, v50); v34 = a1->m_buttonMenu; a1->m_nextButton = v33; v34->addChild(v34, v33); m_nextButton = a1->m_nextButton; v36 = a1->m_buttonMenu; v37 = m_nextButton->setPosition; v38 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v38); cocos2d::CCPoint::CCPoint(&v44.origin, v39 - 24.0, v42 * 0.5); v47 = cocos2d::CCNode::convertToNodeSpace(v36, &v44.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *, float, float))v37)(m_nextButton, &v43, v47.x, v47.y); KeybindingsLayer::goToPage(a1, 0); } return v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source