// // EditorUI::handleEditorAction from 0xbd71b8 to 0xbd88e4 (5932 bytes) // // 2 xrefs: // > EditorUI::handleAction @ 0xbd8938 // > @ 0x93880 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:03:41 +0000 // __int64 __fastcall EditorUI::handleEditorAction(EditorUI *this, int a2, unsigned __int8 a3, double a4) { GameSettingsLayer *v5; // x1 GameManager *v7; // x0 unsigned int v8; // w22 GameManager *v10; // x0 GameManager *v11; // x0 GameManager *v12; // x0 char v13; // w0 EditorSFXManager *v14; // x0 EditorSFXManager *v15; // x0 cocos2d::CCArray *v16; // x22 cocos2d::CCArray *v17; // x1 GameManager *v18; // x0 GameManager *v19; // x0 GameManager *v20; // x0 char v21; // w0 unsigned int v22; // w0 double v23; // d0 GameManager *v24; // x0 GameManager *IntGameVariable; // x0 int v26; // w24 GameManager *v27; // x0 char v28; // w2 int v29; // w3 __int64 v30; // x0 unsigned __int8 v31; // w0 GJTransformControl *v32; // x0 EditorSFXManager *v33; // x0 EditorSFXManager *v34; // x0 __int64 v35; // x0 cocos2d::CCArray *v36; // x0 cocos2d::CCArray *v37; // x0 cocos2d::CCArray *v38; // x0 int v39; // w1 int v40; // w1 EditorSFXManager *v41; // x0 EditorSFXManager *v42; // x0 cocos2d::CCArray *v43; // x0 cocos2d::CCArray *SelectedObjects; // x0 __int64 v45; // x0 int v46; // w20 EditorSFXManager *v47; // x0 EditorSFXManager *v48; // x0 GameManager *v49; // x0 GameManager *v50; // x0 GameManager *v51; // x0 char GameVariable; // w0 EditorSFXManager *v53; // x0 EditorSFXManager *v54; // x0 EditorSFXManager *v55; // x0 EditorSFXManager *v56; // x0 int v57; // w1 cocos2d::CCDirector *v58; // x0 float v59; // s0 cocos2d::CCDirector *v60; // x0 float v61; // s9 float v62; // s8 const cocos2d::CCPoint *v63; // x0 __int64 v64; // x20 __int64 v65; // x0 __int64 v66; // x1 cocos2d::CCObject *v67; // x23 unsigned __int8 v68; // w0 GameManager *v69; // x0 GameManager *v70; // x0 GameManager *v71; // x0 GameManager *v72; // x0 GameManager *v73; // x0 unsigned int v74; // w20 cocos2d::CCDirector *v75; // x0 float v76; // s0 float v77; // s10 cocos2d::CCDirector *v78; // x0 float v79; // s9 float v80; // s8 double v81; // d0 double v82; // d1 __int64 v83; // x20 void (__fastcall *v84)(__int64, __int64 *); // x22 EditorSFXManager *updated; // x0 EditorSFXManager *v86; // x0 unsigned int v87; // w20 cocos2d::CCDirector *v88; // x0 float v89; // s0 cocos2d::CCDirector *v90; // x0 float v91; // s9 float v92; // s8 const cocos2d::CCPoint *v93; // x0 EditorSFXManager *v94; // x0 EditorSFXManager *v95; // x0 cocos2d::CCString *v96; // x0 const char *CString; // x0 size_t v98; // x0 void (__fastcall *v99)(EditorUI *, __int64, __int64); // x23 __int64 v100; // x0 unsigned __int8 v101; // w0 cocos2d::CCObject *v102; // x1 LocalLevelManager *v103; // x0 int v104; // w0 unsigned __int8 v105; // w0 cocos2d::CCString *v106; // x0 const char *v107; // x0 size_t v108; // x0 void (__fastcall *v109)(EditorUI *, __int64, __int64); // x23 __int64 v110; // x0 float v111; // [xsp+60h] [xbp+60h] float v112; // [xsp+60h] [xbp+60h] int v113; // [xsp+78h] [xbp+78h] cocos2d::CCPoint *v114; // [xsp+78h] [xbp+78h] cocos2d::CCPoint *v115; // [xsp+78h] [xbp+78h] cocos2d::CCPoint *v116; // [xsp+78h] [xbp+78h] __int64 v117; // [xsp+88h] [xbp+88h] BYREF float v118; // [xsp+90h] [xbp+90h] BYREF float v119; // [xsp+94h] [xbp+94h] __int64 v120; // [xsp+98h] [xbp+98h] BYREF __int64 v121; // [xsp+A0h] [xbp+A0h] BYREF size_t v122; // [xsp+A8h] [xbp+A8h] void *v123; // [xsp+B0h] [xbp+B0h] __int64 v124; // [xsp+B8h] [xbp+B8h] BYREF __int64 v125; // [xsp+C0h] [xbp+C0h] void *v126; // [xsp+C8h] [xbp+C8h] __int64 v127; // [xsp+D0h] [xbp+D0h] BYREF size_t v128; // [xsp+D8h] [xbp+D8h] void *v129; // [xsp+E0h] [xbp+E0h] v5 = (GameSettingsLayer *)(unsigned int)(a2 - 0x4000); v7 = (GameManager *)(unsigned int)((_DWORD)v5 - 3617); switch ( (int)v5 ) { case 3617: if ( !a3 ) return 1; v8 = 1; EditorUI::undoLastAction((cocos2d::CCArray ***)this, nullptr); return v8; case 3618: if ( !a3 ) return 1; v8 = 1; EditorUI::redoLastAction((cocos2d::CCArray ***)this, nullptr); return v8; case 3619: if ( !a3 ) return 1; v8 = 1; EditorUI::onCopy(this, nullptr); return v8; case 3620: if ( !a3 ) return 1; v8 = 1; EditorUI::onPaste(this, nullptr); return v8; case 3621: if ( !a3 ) return 1; v8 = 1; EditorUI::onDuplicate(this, nullptr); return v8; case 3622: if ( !a3 ) return 1; v8 = 1; EditorUI::onDeselectAll(this, nullptr); return v8; case 3623: case 3624: case 3625: case 3626: case 3627: case 3628: case 3629: case 3630: case 3631: case 3632: if ( !a3 ) return 1; v87 = (_DWORD)v5 - 3623; v88 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(_QWORD, double))(**(_QWORD **)(*((_QWORD *)this + 180) + 3920LL) + 168LL))( *(_QWORD *)(*((_QWORD *)this + 180) + 3920LL), a4); v112 = v89; v90 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v88); cocos2d::CCDirector::getWinSize(&v117, v90); v91 = *(float *)&v117; v92 = (float)(*((float *)this + 214) * 0.5) + (float)(*((float *)&v117 + 1) * 0.5); v93 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*((_QWORD *)this + 180) + 3920LL) + 192LL))(*(_QWORD *)(*((_QWORD *)this + 180) + 3920LL)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v118, v93); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v120, (float)-(float)(v118 - (float)(v91 * 0.5)) / v112, (float)(v92 - v119) / v112); LevelEditorLayer::saveEditorPosition(*((LevelEditorLayer **)this + 180), (cocos2d::CCPoint *)&v120, v87); v95 = (EditorSFXManager *)EditorSFXManager::sharedState(v94); EditorSFXManager::playAction(v95, 162); v96 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Position %i saved.", (const char *)v87); CString = (const char *)cocos2d::CCString::getCString(v96); v121 = 0; v114 = (cocos2d::CCPoint *)CString; v122 = 0; v123 = nullptr; v98 = strlen(CString); std::string::__init(&v121, v114, v98); v99 = *(void (__fastcall **)(EditorUI *, __int64, __int64))(*(_QWORD *)this + 464LL); v127 = 0; v128 = 0; v129 = nullptr; if ( (v121 & 1) != 0 ) { std::string::__init(&v127, v123, v122); } else { v127 = v121; v128 = v122; v129 = v123; } v124 = 0; v125 = 0; v126 = nullptr; std::string::__init(&v124, &byte_11B8890, 0); v100 = TextAlertPopup::create((char *)&v127, 150, (char *)&v124, 0.5, 0.6); v99(this, v100, 100); if ( (v124 & 1) != 0 ) operator delete(v126); if ( (v127 & 1) != 0 ) operator delete(v129); v8 = 1; if ( (v121 & 1) != 0 ) operator delete(v123); return v8; case 3633: case 3634: case 3635: case 3636: case 3637: case 3638: case 3639: case 3640: case 3641: case 3642: if ( !a3 ) return 1; v74 = (_DWORD)v5 - 3633; v75 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(_QWORD, double))(**(_QWORD **)(*((_QWORD *)this + 180) + 3920LL) + 168LL))( *(_QWORD *)(*((_QWORD *)this + 180) + 3920LL), a4); v77 = v76; v78 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v75); cocos2d::CCDirector::getWinSize(&v117, v78); v79 = *(float *)&v117 * 0.5; v80 = (float)(*((float *)this + 214) * 0.5) + (float)(*((float *)&v117 + 1) * 0.5); LevelEditorLayer::getSavedEditorPosition(*((LevelEditorLayer **)this + 180), v74, (cocos2d::CCPoint *)&v118); *(float *)&v81 = v118; *(float *)&v82 = v119; if ( v118 != 0.0 || v119 != 0.0 ) { v83 = *(_QWORD *)(*((_QWORD *)this + 180) + 3920LL); v84 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v83 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v120, v79 - (float)(v118 * v77), v80 - (float)(v119 * v77)); v84(v83, &v120); EditorUI::constrainGameLayerPosition(this); updated = (EditorSFXManager *)EditorUI::updateSlider(this); v86 = (EditorSFXManager *)EditorSFXManager::sharedState(updated); EditorSFXManager::playAction(v86, 163); return 1; } v106 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Position %i empty.", (const char *)v74, v81, v82); v107 = (const char *)cocos2d::CCString::getCString(v106); v121 = 0; v116 = (cocos2d::CCPoint *)v107; v122 = 0; v123 = nullptr; v108 = strlen(v107); std::string::__init(&v121, v116, v108); v109 = *(void (__fastcall **)(EditorUI *, __int64, __int64))(*(_QWORD *)this + 464LL); v127 = 0; v128 = 0; v129 = nullptr; if ( (v121 & 1) != 0 ) { std::string::__init(&v127, v123, v122); } else { v127 = v121; v128 = v122; v129 = v123; } v124 = 0; v125 = 0; v126 = nullptr; std::string::__init(&v124, &byte_11B8890, 0); v110 = TextAlertPopup::create((char *)&v127, 150, (char *)&v124, 0.5, 0.6); v109(this, v110, 100); if ( (v124 & 1) != 0 ) operator delete(v126); if ( (v127 & 1) != 0 ) operator delete(v129); if ( (v121 & 1) == 0 ) return 1; v8 = 1; operator delete(v123); return v8; case 3643: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleMode(this, *((cocos2d::CCObject **)this + 116)); return v8; case 3644: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleMode(this, *((cocos2d::CCObject **)this + 117)); return v8; case 3645: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleMode(this, *((cocos2d::CCObject **)this + 115)); return v8; case 3646: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleMode(this, *((cocos2d::CCObject **)this + 118)); return v8; case 3647: if ( !a3 ) return 1; v8 = 1; EditorUI::zoomIn(this, nullptr); return v8; case 3648: if ( !a3 ) return 1; v8 = 1; EditorUI::zoomOut(this, nullptr); return v8; case 3649: if ( !a3 ) return 1; v8 = 1; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v120, 0.0, -10.0); EditorUI::moveGamelayer(this); return v8; case 3650: if ( !a3 ) return 1; v8 = 1; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v120, 0.0, 10.0); EditorUI::moveGamelayer(this); return v8; case 3651: if ( !a3 ) return 1; v8 = 1; EditorUI::onDeleteSelected(this, nullptr); return v8; case 3652: if ( !a3 ) return 1; v8 = 1; EditorUI::activateTransformControl(this, nullptr); return v8; case 3653: if ( !a3 ) return 1; v8 = 1; EditorUI::transformObjectCall(this, 37, a4); return v8; case 3654: if ( !a3 ) return 1; v8 = 1; EditorUI::transformObjectCall(this, 38, a4); return v8; case 3655: if ( !a3 ) return 1; v8 = 1; EditorUI::transformObjectCall(this, 40, a4); return v8; case 3656: if ( !a3 ) return 1; v8 = 1; EditorUI::transformObjectCall(this, 39, a4); return v8; case 3657: case 3658: case 3659: case 3660: case 3661: case 3662: case 3663: case 3664: case 3711: case 3712: case 3713: case 3714: case 3715: case 3716: case 3717: case 3718: case 3719: case 3720: case 3721: case 3722: case 3723: case 3724: case 3725: case 3726: case 3794: case 3795: case 3796: case 3797: if ( !a3 ) return 1; v8 = 1; EditorUI::moveObjectCall(this, byte_1199F10[(_DWORD)v5 - 3657], a4); return v8; case 3665: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleEnableRotate(this, nullptr); return v8; case 3666: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleFreeMove(this, nullptr); return v8; case 3667: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleSwipe(this, nullptr); return v8; case 3668: if ( !a3 ) return 1; v8 = 1; EditorUI::toggleSnap(this, nullptr); return v8; case 3669: if ( !a3 || *((_DWORD *)this + 176) != -1 ) return 1; v8 = 1; EditorUI::onPlayback(this, nullptr); return v8; case 3670: if ( !a3 ) return 1; v58 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(_QWORD, double))(**(_QWORD **)(*((_QWORD *)this + 180) + 3920LL) + 168LL))( *(_QWORD *)(*((_QWORD *)this + 180) + 3920LL), a4); v111 = v59; v60 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v58); cocos2d::CCDirector::getWinSize(&v117, v60); v61 = *(float *)&v117; v62 = (float)(*((float *)this + 214) * 0.5) + (float)(*((float *)&v117 + 1) * 0.5); v63 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*((_QWORD *)this + 180) + 3920LL) + 192LL))(*(_QWORD *)(*((_QWORD *)this + 180) + 3920LL)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v118, v63); v64 = *((_QWORD *)this + 180); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v120, (float)-(float)(v118 - (float)(v61 * 0.5)) / v111, (float)(v62 - v119) / v111); cocos2d::CCPoint::operator=(v64 + 14584, &v120); v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Preview Locked.", 0xFu); EditorUI::showTextAlert((__int64)this, (__int64)&v127, 0, 1, 0); v8 = 1; if ( (v127 & 1) != 0 ) operator delete(v129); return v8; case 3671: if ( !a3 ) return 1; cocos2d::CCPoint::operator=(*((_QWORD *)this + 180) + 14584LL, &unk_155EA20); v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Preview Unlocked.", 0x11u); EditorUI::showTextAlert((__int64)this, (__int64)&v127, 0, 1, 0); v8 = 1; if ( (v127 & 1) != 0 ) goto LABEL_280; return v8; case 3672: case 3674: case 3675: case 3769: case 3770: case 3771: case 3772: case 3773: case 3774: case 3775: case 3776: case 3777: case 3778: case 3779: case 3780: case 3781: case 3782: case 3783: case 3784: case 3785: case 3799: case 3800: if ( !a3 ) return 1; v55 = (EditorSFXManager *)EditorUI::toggleViewOption(this, (char)byte_1199F10[(_DWORD)v5 - 3672 + 144]); v8 = (unsigned __int8)v55; if ( !(_BYTE)v55 ) return 1; v56 = (EditorSFXManager *)EditorSFXManager::sharedState(v55); if ( a2 != 20058 ) { if ( a2 <= 20058 ) { v57 = 195; if ( a2 == 20056 ) goto LABEL_151; } else { v57 = 197; if ( a2 == 20059 ) goto LABEL_151; v57 = 269; if ( a2 == 20153 ) goto LABEL_151; } v57 = 189; goto LABEL_151; } v57 = 196; LABEL_151: EditorSFXManager::playAction(v56, v57, 189); return v8; case 3673: if ( !a3 ) return 1; v49 = (GameManager *)GameManager::sharedState(v7); GameManager::toggleGameVariable(v49, "0137"); LevelEditorLayer::updatePreviewParticles(*((cocos2d::CCArray ***)this + 180)); v127 = 0; v128 = 0; v129 = nullptr; v50 = (GameManager *)std::string::__init(&v127, "Particle Icons: ", 0x10u); v51 = (GameManager *)GameManager::sharedState(v50); GameVariable = GameManager::getGameVariable(v51, "0137"); EditorUI::showTextAlert((__int64)this, (__int64)&v127, GameVariable ^ 1, 0, 0); v53 = (EditorSFXManager *)(unsigned __int8)v127; if ( (v127 & 1) != 0 ) operator delete(v129); v54 = (EditorSFXManager *)EditorSFXManager::sharedState(v53); v8 = 1; EditorSFXManager::playAction(v54, 198, 189); return v8; case 3676: if ( !a3 ) return 1; v69 = (GameManager *)GameManager::sharedState(v7); v70 = (GameManager *)GameManager::getGameVariable(v69, "0097"); v8 = (unsigned __int8)v70; if ( !(_BYTE)v70 ) return 1; v71 = (GameManager *)GameManager::sharedState(v70); v72 = (GameManager *)GameManager::toggleGameVariable(v71, "0180"); v73 = (GameManager *)GameManager::sharedState(v72); *((_BYTE *)this + 868) = GameManager::getGameVariable(v73, "0180"); EditorUI::updateButtons(this); v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Link Mode: ", 0xBu); EditorUI::showTextAlert((__int64)this, (__int64)&v127, *((_BYTE *)this + 868) ^ 1, 0, 0); if ( (v127 & 1) != 0 ) goto LABEL_280; return v8; case 3677: if ( !a3 ) return 1; v68 = EditorUI::toggleTraceSelected((cocos2d::CCArray **)this, 1u); v8 = v68; if ( !v68 ) return 1; v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Trace In: ", 0xAu); EditorUI::showTextAlert((__int64)this, (__int64)&v127, *(_QWORD *)(*((_QWORD *)this + 180) + 14824LL) != 0, 0, 0); if ( (v127 & 1) != 0 ) goto LABEL_280; return v8; case 3678: if ( a3 && (v101 = EditorUI::toggleTraceSelected((cocos2d::CCArray **)this, 0), (v8 = v101) != 0) ) { v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Trace Out: ", 0xBu); EditorUI::showTextAlert( (__int64)this, (__int64)&v127, *(_QWORD *)(*((_QWORD *)this + 180) + 14832LL) != 0, 0, 0); if ( (v127 & 1) != 0 ) goto LABEL_280; } else { return 1; } return v8; case 3679: if ( !a3 ) return 1; v8 = 1; EditorUI::onGroupUp(this, nullptr); return v8; case 3680: if ( !a3 ) return 1; v8 = 1; EditorUI::onGroupDown(this, nullptr); return v8; case 3681: if ( !a3 ) return 1; v8 = 1; EditorUI::onTargetIDChange(this, 1); return v8; case 3682: if ( !a3 ) return 1; v8 = 1; EditorUI::onTargetIDChange(this, -1); return v8; case 3685: *((_BYTE *)this + 688) = a3; return 1; case 3686: if ( !a3 ) return 1; v8 = 1; EditorUI::transformObjectCall(this, 42, a4); return v8; case 3687: if ( !a3 ) return 1; v8 = 1; EditorUI::transformObjectCall(this, 41, a4); return v8; case 3688: if ( !a3 ) return 1; v8 = 1; EditorUI::transformObjectCall(this, 44, a4); return v8; case 3689: case 3690: if ( !a3 ) return 1; v65 = cocos2d::CCNode::create(v7); if ( a2 == 20073 ) v66 = 45; else v66 = 46; v67 = (cocos2d::CCObject *)v65; v8 = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v65 + 72LL))(v65, v66); EditorUI::activateScaleControl(this, v67); return v8; case 3694: if ( !a3 ) return 1; v8 = 1; EditorUI::editObject((cocos2d::CCArray **)this, nullptr); return v8; case 3695: if ( !a3 ) return 1; v8 = 1; EditorUI::editGroup(this, nullptr); return v8; case 3696: if ( !a3 ) return 1; v8 = 1; EditorUI::editObject2(this, nullptr); return v8; case 3697: if ( !a3 ) return 1; v8 = 1; EditorUI::onCopyState(this, nullptr); return v8; case 3698: if ( !a3 ) return 1; v8 = 1; EditorUI::onPasteState(this, nullptr); return v8; case 3699: if ( !a3 ) return 1; v8 = 1; EditorUI::onPasteColor(this, nullptr); return v8; case 3700: case 3701: case 3734: case 3761: case 3762: if ( !a3 ) return 1; switch ( a2 ) { case 20118: EditorUI::toggleCustomGridEnabled(this); if ( *((_BYTE *)this + 656) ) v46 = 202; else v46 = 203; break; case 20084: v46 = 200; EditorUI::cycleCustomGridPreset(this, 1); break; case 20085: v46 = 201; EditorUI::cycleCustomGridPreset(this, 0); break; case 20145: v46 = 204; EditorUI::adjustCustomGridSize(this, 1); break; default: v46 = 205; EditorUI::adjustCustomGridSize(this, -1); break; } v8 = 1; EditorUI::refreshGridWindow(this); v47 = (EditorSFXManager *)EditorUI::showGridSizeAlert(this); v48 = (EditorSFXManager *)EditorSFXManager::sharedState(v47); EditorSFXManager::playAction(v48, v46, 189); return v8; case 3702: if ( !a3 ) return 1; v45 = *((_QWORD *)this + 180); if ( *(_DWORD *)(*(_QWORD *)(v45 + 1936) + 1140LL) != 2 ) return 1; if ( *(_DWORD *)(v45 + 1972) ) { v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Stop Playtest First.", 0x14u); EditorUI::showTextAlert((__int64)this, (__int64)&v127, 0, 1, 0); v8 = 1; if ( (v127 & 1) != 0 ) goto LABEL_280; } else { v105 = LevelEditorLayer::saveLevel((LevelEditorLayer *)v45); v8 = v105; if ( !v105 ) return 1; v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Level Saved.", 0xCu); EditorUI::showTextAlert((__int64)this, (__int64)&v127, 0, 1, 0); if ( (v127 & 1) != 0 ) goto LABEL_280; } return v8; case 3704: if ( !a3 ) return 1; v8 = 1; EditorUI::dynamicGroupUpdate(this, 0); return v8; case 3705: if ( !a3 ) return 1; v8 = 1; EditorUI::createLoop(this); return v8; case 3706: if ( !a3 ) return 1; v8 = 1; SelectedObjects = (cocos2d::CCArray *)EditorUI::getSelectedObjects(this); EditorUI::alignObjects(this, SelectedObjects, 0); return v8; case 3707: if ( !a3 ) return 1; v8 = 1; v43 = (cocos2d::CCArray *)EditorUI::getSelectedObjects(this); EditorUI::alignObjects(this, v43, 1); return v8; case 3708: if ( !a3 ) return 1; v8 = 1; EditorUI::selectAll(this); return v8; case 3709: if ( !a3 ) return 1; v8 = 1; EditorUI::selectAllWithDirection(this, 1); return v8; case 3710: if ( !a3 ) return 1; v8 = 1; EditorUI::selectAllWithDirection(this, 0); return v8; case 3728: if ( !a3 ) return 1; v8 = 1; EditorUI::selectBuildTab(this, *((_DWORD *)this + 384) - 1); return v8; case 3729: if ( !a3 ) return 1; v8 = 1; EditorUI::selectBuildTab(this, *((_DWORD *)this + 384) + 1); return v8; case 3730: if ( !a3 ) return 1; v8 = 1; (*(void (__fastcall **)(EditorUI *, float, float))(*(_QWORD *)this + 1320LL))(this, 40.0, 0.0); return v8; case 3731: if ( !a3 ) return 1; v8 = 1; (*(void (__fastcall **)(EditorUI *, float, float))(*(_QWORD *)this + 1320LL))(this, -40.0, 0.0); return v8; case 3732: if ( !a3 ) return 1; v39 = *((unsigned __int8 *)this + 1589); *((_BYTE *)this + 1590) = 0; v40 = v39 ^ 1; *((_BYTE *)this + 1589) = v40; if ( !v40 ) { EditorUI::updateDeleteMenu(this); EditorUI::updateCreateMenu(this, 0); EditorUI::updateEditMenu(this); EditorUI::updateViewMenu(this); LOBYTE(v40) = *((_BYTE *)this + 1589); } v8 = 1; v41 = (EditorSFXManager *)EditorUI::showUI((cocos2d::CCArray **)this, v40 ^ 1u); v42 = (EditorSFXManager *)EditorSFXManager::sharedState(v41); EditorSFXManager::playAction(v42, 194, 189); return v8; case 3733: if ( !a3 || !*((_QWORD *)this + 199) ) return 1; v8 = 1; EditorUI::nextDpadStep(this); return v8; case 3735: if ( !a3 ) return 1; v8 = 1; EditorUI::onEditorCommands(this, nullptr); return v8; case 3736: if ( !a3 ) return 1; v8 = 1; v38 = (cocos2d::CCArray *)EditorUI::getSelectedObjects(this); EditorUI::alignObjectsOnAxis(this, v38, 0); return v8; case 3737: if ( !a3 ) return 1; v8 = 1; v37 = (cocos2d::CCArray *)EditorUI::getSelectedObjects(this); EditorUI::alignObjectsOnAxis(this, v37, 1); return v8; case 3738: if ( !a3 ) return 1; v8 = 1; EditorUI::createGradientFromSelection(this); return v8; case 3739: if ( !a3 ) return 1; v8 = 1; EditorUI::dynamicGroupUpdate(this, 1u); return v8; case 3740: if ( !a3 ) return 1; v8 = 1; EditorUI::assignNewGroups(this, 0); return v8; case 3741: if ( !a3 ) return 1; v8 = 1; EditorUI::assignNewGroups(this, 1u); return v8; case 3742: if ( !a3 ) return 1; v8 = 1; EditorUI::doCopyObjects(this, 1); return v8; case 3743: if ( !a3 ) return 1; v8 = 1; EditorUI::doPasteObjects(this, 1); return v8; case 3744: if ( !a3 ) return 1; v8 = 1; v36 = (cocos2d::CCArray *)EditorUI::getSelectedObjects(this); EditorUI::createRockBases(this, v36); return v8; case 3745: if ( !a3 ) return 1; v8 = 1; LevelEditorLayer::unlockAllLayers(*((_QWORD *)this + 180)); return v8; case 3746: if ( !a3 ) return 1; v8 = 1; LevelEditorLayer::resetUnusedColorChannels(*((LevelEditorLayer **)this + 180)); return v8; case 3747: if ( !a3 ) return 1; v8 = 1; EditorUI::uncheckPortals((LevelEditorLayer **)this); return v8; case 3748: if ( !a3 ) return 1; v8 = 1; EditorUI::onEditColor(this, nullptr); return v8; case 3749: if ( !a3 ) return 1; v8 = 1; EditorUI::onGoToLayer(this, nullptr); return v8; case 3750: if ( !a3 ) return 1; v8 = 1; EditorUI::onGoToBaseLayer(this, nullptr); return v8; case 3751: if ( !a3 ) return 1; v8 = 1; EditorUI::onGoToFreeLayer(this, nullptr); return v8; case 3752: if ( !a3 ) return 1; v8 = 1; EditorUI::onLockLayer(this, nullptr); return v8; case 3753: if ( !a3 ) return 1; v8 = 1; EditorUI::onGroupSticky((__int64)this, nullptr); return v8; case 3754: if ( !a3 ) return 1; v8 = 1; EditorUI::onUngroupSticky((__int64)this, nullptr); return v8; case 3756: if ( !a3 ) return 1; goto LABEL_88; case 3757: if ( !a3 ) return 1; v8 = 1; EditorUI::onResetSpecialFilter((ButtonSprite **)this, nullptr); return v8; case 3758: if ( !a3 ) return 1; v8 = 1; EditorUI::onDeleteSelectedType(this, nullptr); return v8; case 3759: if ( !a3 ) return 1; v8 = 1; EditorUI::onNewCustomItem(this, nullptr); return v8; case 3760: if ( !a3 ) return 1; v35 = *((_QWORD *)this + 180); if ( *(_DWORD *)(*(_QWORD *)(v35 + 1936) + 1140LL) != 2 ) return 1; if ( *(_DWORD *)(v35 + 1972) ) { v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Stop Playtest First.", 0x14u); EditorUI::showTextAlert((__int64)this, (__int64)&v127, 0, 1, 0); v8 = 1; if ( (v127 & 1) == 0 ) return v8; goto LABEL_280; } LevelEditorLayer::saveLevel((LevelEditorLayer *)v35); v115 = (cocos2d::CCPoint *)cocos2d::CCArray::createWithObject( *(cocos2d::CCArray **)(*((_QWORD *)this + 180) + 1936LL), v102); v103 = (LocalLevelManager *)LocalLevelManager::sharedState(v115); v104 = LocalLevelManager::exportLevelsToFile(v103, v115); if ( v104 > 0 ) { v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Level Exported.", 0xFu); EditorUI::showTextAlert((__int64)this, (__int64)&v127, 0, 1, 0); v8 = 1; if ( (v127 & 1) == 0 ) return v8; goto LABEL_280; } if ( v104 ) return 1; v127 = 0; v128 = 0; v129 = nullptr; std::string::__init(&v127, "Export Failed.", 0xEu); EditorUI::showTextAlert((__int64)this, (__int64)&v127, 0, 1, 0); v8 = 1; if ( (v127 & 1) != 0 ) LABEL_280: operator delete(v129); return v8; case 3763: case 3764: case 3765: case 3766: v113 = a3; v31 = (*(__int64 (__fastcall **)(_QWORD, double))(**((_QWORD **)this + 99) + 352LL))(*((_QWORD *)this + 99), a4); v8 = v31; if ( !v31 ) return v8; if ( !v113 ) return 1; if ( a2 == 20149 ) { v33 = (EditorSFXManager *)GJTransformControl::onToggleGridSnap(*((GJTransformControl **)this + 99), nullptr); } else if ( a2 == 20150 ) { v33 = (EditorSFXManager *)GJTransformControl::onToggleFreeRotation(*((GJTransformControl **)this + 99), nullptr); } else { v32 = *((GJTransformControl **)this + 99); if ( a2 == 20148 ) v33 = (EditorSFXManager *)GJTransformControl::onToggleOppositeAnchor(v32, nullptr); else v33 = (EditorSFXManager *)GJTransformControl::onToggleLockScale(v32, nullptr); } v34 = (EditorSFXManager *)EditorSFXManager::sharedState(v33); EditorSFXManager::playAction(v34, 189); return v8; case 3767: if ( a3 ) { v30 = KeybindingsLayer::create(nullptr, v5); if ( v30 ) goto LABEL_32; } return 1; case 3768: if ( !a3 ) return 1; v30 = EditorSoundsLayer::create(this, v5); if ( !v30 ) return 1; LABEL_32: v8 = 1; (*(void (__fastcall **)(__int64))(*(_QWORD *)v30 + 1312LL))(v30); return v8; case 3786: if ( !a3 ) return 1; v8 = 1; EditorUI::onGroupIDFilter(this, nullptr); return v8; case 3787: if ( !a3 ) return 1; v8 = 1; EditorUI::onColorFilter(this, nullptr); return v8; case 3788: case 3789: if ( !a3 ) return 1; v24 = (GameManager *)GameManager::sharedState(v7); IntGameVariable = (GameManager *)GameManager::getIntGameVariable(v24, "0230"); v26 = (int)IntGameVariable; if ( (int)IntGameVariable <= 0 ) { LABEL_88: v8 = 1; EditorUI::onFindObject(this, nullptr); } else { v27 = (GameManager *)GameManager::sharedState(IntGameVariable); v8 = 1; v28 = GameManager::getGameVariable(v27, "0232"); if ( a2 == 20172 ) v29 = 1; else v29 = -1; EditorUI::findObject(this, v26, v28, v29); } return v8; case 3790: case 3791: case 3792: case 3793: if ( !a3 ) return 1; v8 = 1; v22 = EditorUI::selectedMoveCommand(this, (int)v5 - 3790); EditorUI::moveObjectCall(this, v22, v23); return v8; case 3798: if ( !a3 ) return 1; v18 = (GameManager *)GameManager::sharedState(v7); GameManager::toggleGameVariable(v18, "0242"); v127 = 0; v128 = 0; v129 = nullptr; v19 = (GameManager *)std::string::__init(&v127, "Anchor Snap: ", 0xDu); v20 = (GameManager *)GameManager::sharedState(v19); v21 = GameManager::getGameVariable(v20, "0242"); EditorUI::showTextAlert((__int64)this, (__int64)&v127, v21 ^ 1, 0, 0); v14 = (EditorSFXManager *)(unsigned __int8)v127; if ( (v127 & 1) != 0 ) operator delete(v129); goto LABEL_10; case 3801: if ( !a3 ) return 1; v16 = (cocos2d::CCArray *)EditorUI::getSelectedObjects(this); if ( !(unsigned int)cocos2d::CCArray::count(v16) ) return 1; v17 = v16; v8 = 1; EditorUI::getGroupCenter(&v120, this, v17, 1); EditorUI::centerCameraOnPoint(this, (float *)&v120); return v8; case 3802: if ( !a3 ) return 1; v10 = (GameManager *)GameManager::sharedState(v7); GameManager::toggleGameVariable(v10, "0248"); LevelEditorLayer::updateOptions(*((EditorUI ***)this + 180)); v127 = 0; v128 = 0; v129 = nullptr; v11 = (GameManager *)std::string::__init(&v127, "Center Cross: ", 0xEu); v12 = (GameManager *)GameManager::sharedState(v11); v13 = GameManager::getGameVariable(v12, "0248"); EditorUI::showTextAlert((__int64)this, (__int64)&v127, v13 ^ 1, 0, 0); v14 = (EditorSFXManager *)(unsigned __int8)v127; if ( (v127 & 1) != 0 ) operator delete(v129); LABEL_10: v15 = (EditorSFXManager *)EditorSFXManager::sharedState(v14); v8 = 1; EditorSFXManager::playAction(v15, 189); return v8; case 3803: if ( !a3 ) return 1; v8 = 1; EditorUI::editObjectOptions(this, nullptr); return v8; default: return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source