// // EditorUI::handleEditorAction from 0x1401c2270 to 0x1401c4b35 (10437 bytes) // // 2 xrefs: // > EditorUI::handleAction @ 0x1401c1d62 // > @ 0x14091a6f0 // // This function is hookable on this platform (idp: pc, 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 11:28:04 +0000 // // Hidden C++ exception states: #wind=12 char __fastcall EditorUI::handleEditorAction(__int64 a1, int a2, __int64 a3) { char v3; // bl __int64 v6; // kr00_8 unsigned __int64 v7; // rdx char result; // al __int64 v9; // rax __int64 v10; // rax __int64 v11; // rax __int64 v12; // rax float v13; // xmm2_4 __int64 v14; // rax size_t v15; // r15 int v16; // ebx __int64 v17; // r8 __int64 v18; // rcx __int64 v19; // rax _QWORD *v20; // r14 float v21; // xmm1_4 _QWORD *v22; // rdi bool v23; // al __int64 v24; // rcx double v25; // xmm0_8 float v26; // xmm8_4 __int64 v27; // rcx __int64 v28; // rax float v29; // xmm7_4 float v30; // xmm6_4 const struct cocos2d::CCPoint *v31; // rax __int64 v32; // rbx __int64 v33; // rax __int64 v34; // xmm0_8 unsigned int v35; // ebx int v36; // r14d int v37; // r14d int v38; // r14d __int64 v39; // rcx char GameVariable; // bl _QWORD *v41; // rbx bool hasSoundsForAction; // al __int64 v43; // rcx __int64 v44; // xmm0_8 char v45; // r8 __int64 v46; // rcx __int64 v47; // rcx __int64 v48; // rcx char v49; // r8 char v50; // r9 __int64 v51; // rcx __int64 v52; // r8 __int64 v53; // rdx __int64 v54; // rcx __int64 v55; // r8 __int64 v56; // rdx char v57; // cl __int64 v58; // rdx __int64 v59; // rdx _QWORD *v60; // rbx bool v61; // al __int64 v62; // rax __int64 v63; // rax __int64 v64; // r8 __int64 SelectedObjects; // rax __int64 v66; // rax __int64 v67; // r8 cocos2d::CCArray *v68; // rbx __int64 v69; // rcx __int64 v70; // r9 float *GroupCenter; // rax __int64 v72; // rax __int64 v73; // r11 unsigned __int64 v74; // r9 __int64 v75; // r10 __int64 v76; // rcx int v77; // eax __int64 v78; // rsi cocos2d::CCString *v79; // rax int v80; // r12d void *v81; // r8 __int64 v82; // rcx unsigned int v83; // r15d unsigned __int8 v84; // al __int64 v85; // rax unsigned int v86; // esi _DWORD *v87; // rdx int v88; // ecx int v89; // eax int v90; // ecx __int64 v91; // rax __int64 v92; // rdx __int64 v93; // rbx int v94; // eax int v95; // r8d struct cocos2d::CCObject *v96; // rax int v97; // r8d __int64 v98; // r10 __int64 v99; // r8 __int64 v100; // rax unsigned int v101; // esi _DWORD *v102; // rdx int v103; // ecx int v104; // eax int v105; // ecx __int64 v106; // rax __int64 v107; // rdx struct cocos2d::CCObject *v108; // rax int v109; // r8d __int64 v110; // rax unsigned int v111; // esi _DWORD *v112; // rdx int v113; // ecx int v114; // eax int v115; // ecx __int64 v116; // rax __int64 v117; // rdx char v118; // al cocos2d::CCArray *v119; // rbx __int64 v120; // r14 float v121; // xmm6_4 struct cocos2d::CCObject *v122; // rax double v123; // xmm0_8 double v124; // xmm0_8 cocos2d::CCArray *v125; // rbx __int64 v126; // r14 float v127; // xmm6_4 struct cocos2d::CCObject *v128; // rax double v129; // xmm0_8 double v130; // xmm0_8 struct cocos2d::CCObject *v131; // rcx __int64 v132; // rbx int v133; // eax int v134; // r8d __int64 v135; // rbx void *v136; // rax int v137; // r14d int v138; // r14d int v139; // r14d __int64 v140; // rcx _DWORD *v141; // rcx int v142; // edx int v143; // eax int v144; // esi _QWORD *v145; // rbx bool v146; // al __int64 v147; // rax __int64 v148; // rcx __int64 v149; // rcx struct cocos2d::CCArray *v150; // rbx __int64 v151; // rcx __int64 v152; // rcx int v153; // eax void *v154; // [rsp+38h] [rbp-59h] BYREF __int64 v155; // [rsp+40h] [rbp-51h] BYREF float v156[2]; // [rsp+48h] [rbp-49h] BYREF void *Block[2]; // [rsp+50h] [rbp-41h] BYREF __int64 v158; // [rsp+60h] [rbp-31h] unsigned __int64 v159; // [rsp+68h] [rbp-29h] char Buffer[32]; // [rsp+70h] [rbp-21h] BYREF v3 = a3; v155 = a1; v6 = (unsigned int)(a2 - 20001); v7 = 0x140000000uLL; switch ( v6 ) { case 0LL: if ( !(_BYTE)a3 ) return 1; v9 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v9, 180); LevelEditorLayer::undoLastAction(*(_QWORD *)(a1 + 1512)); goto LABEL_7; case 1LL: if ( !(_BYTE)a3 ) return 1; v10 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v10, 181); LevelEditorLayer::redoLastAction(*(_QWORD *)(a1 + 1512)); LABEL_7: EditorUI::updateButtons(a1); if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 808) + 344LL))(*(_QWORD *)(a1 + 808)) ) { *(_BYTE *)(a1 + 824) = 1; EditorUI::activateRotationControl(a1, 0); } EditorUI::updateSpecialUIElements(a1); return 1; case 2LL: if ( !(_BYTE)a3 || !*(_QWORD *)(a1 + 1568) && !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; v11 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v11, 110); EditorUI::doCopyObjects(a1, 0); return 1; case 3LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onPaste(a1, 0); return 1; case 4LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onDuplicate(a1, 0); return 1; case 5LL: if ( !(_BYTE)a3 ) return 1; if ( *(_QWORD *)(a1 + 1568) || cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) { v12 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v12, 120); EditorUI::createUndoSelectObject(a1, 0); } EditorUI::deselectAll(a1); return 1; case 6LL: case 7LL: case 8LL: case 9LL: case 10LL: case 11LL: case 12LL: case 13LL: case 14LL: case 15LL: if ( !(_BYTE)a3 ) return 1; LOBYTE(a3) = 1; sub_1401C4B40(&v155, (unsigned int)(a2 - 20007), a3); return 1; case 16LL: case 17LL: case 18LL: case 19LL: case 20LL: case 21LL: case 22LL: case 23LL: case 24LL: case 25LL: if ( !(_BYTE)a3 ) return 1; sub_1401C4B40(&v155, (unsigned int)(a2 - 20017), 0); return 1; case 26LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleMode(a1, *(_QWORD *)(a1 + 976)); return 1; case 27LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleMode(a1, *(_QWORD *)(a1 + 984)); return 1; case 28LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleMode(a1, *(_QWORD *)(a1 + 968)); return 1; case 29LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleMode(a1, *(_QWORD *)(a1 + 992)); return 1; case 30LL: if ( !(_BYTE)a3 ) return 1; EditorUI::zoomIn(a1); return 1; case 31LL: if ( !(_BYTE)a3 ) return 1; EditorUI::zoomOut(a1); return 1; case 32LL: if ( !(_BYTE)a3 ) return 1; v13 = -10.0; goto LABEL_43; case 33LL: if ( !(_BYTE)a3 ) return 1; v13 = 10.0; LABEL_43: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v156, 0.0, v13); EditorUI::moveGamelayer(a1, v14); return 1; case 34LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onDeleteSelected(a1); return 1; case 35LL: if ( !(_BYTE)a3 ) return 1; EditorUI::activateTransformControl(a1, 0); return 1; case 36LL: if ( !(_BYTE)a3 ) return 1; EditorUI::transformObjectCall_1(a1, 37); return 1; case 37LL: if ( !(_BYTE)a3 ) return 1; EditorUI::transformObjectCall_1(a1, 38); return 1; case 38LL: if ( !(_BYTE)a3 ) return 1; EditorUI::transformObjectCall_1(a1, 40); return 1; case 39LL: if ( !(_BYTE)a3 ) return 1; EditorUI::transformObjectCall_1(a1, 39); return 1; case 40LL: case 41LL: case 42LL: case 43LL: case 44LL: case 45LL: case 46LL: case 47LL: case 94LL: case 95LL: case 96LL: case 97LL: case 98LL: case 99LL: case 100LL: case 101LL: case 102LL: case 103LL: case 104LL: case 105LL: case 106LL: case 107LL: case 108LL: case 109LL: case 177LL: case 178LL: case 179LL: case 180LL: if ( !(_BYTE)a3 ) return 1; switch ( a2 ) { case 20041: EditorUI::moveObjectCall_1(a1, 5); result = 1; break; case 20042: EditorUI::moveObjectCall_1(a1, 6); result = 1; break; case 20043: EditorUI::moveObjectCall_1(a1, 7); result = 1; break; case 20044: EditorUI::moveObjectCall_1(a1, 8); result = 1; break; case 20045: EditorUI::moveObjectCall_1(a1, 1); result = 1; break; case 20046: EditorUI::moveObjectCall_1(a1, 2); result = 1; break; case 20047: EditorUI::moveObjectCall_1(a1, 3); result = 1; break; case 20048: EditorUI::moveObjectCall_1(a1, 4); result = 1; break; case 20095: EditorUI::moveObjectCall_1(a1, 17); result = 1; break; case 20096: EditorUI::moveObjectCall_1(a1, 18); result = 1; break; case 20097: EditorUI::moveObjectCall_1(a1, 19); result = 1; break; case 20098: EditorUI::moveObjectCall_1(a1, 20); result = 1; break; case 20099: EditorUI::moveObjectCall_1(a1, 21); result = 1; break; case 20100: EditorUI::moveObjectCall_1(a1, 22); result = 1; break; case 20101: EditorUI::moveObjectCall_1(a1, 23); result = 1; break; case 20102: EditorUI::moveObjectCall_1(a1, 24); result = 1; break; case 20103: EditorUI::moveObjectCall_1(a1, 25); result = 1; break; case 20104: EditorUI::moveObjectCall_1(a1, 26); result = 1; break; case 20105: EditorUI::moveObjectCall_1(a1, 27); result = 1; break; case 20106: EditorUI::moveObjectCall_1(a1, 28); result = 1; break; case 20107: EditorUI::moveObjectCall_1(a1, 9); result = 1; break; case 20108: EditorUI::moveObjectCall_1(a1, 10); result = 1; break; case 20109: EditorUI::moveObjectCall_1(a1, 11); result = 1; break; case 20110: EditorUI::moveObjectCall_1(a1, 12); result = 1; break; case 20178: EditorUI::moveObjectCall_1(a1, 33); result = 1; break; case 20179: EditorUI::moveObjectCall_1(a1, 34); result = 1; break; case 20180: EditorUI::moveObjectCall_1(a1, 35); result = 1; break; case 20181: EditorUI::moveObjectCall_1(a1, 36); result = 1; break; default: EditorUI::moveObjectCall_1(a1, 0); result = 1; break; } return result; case 48LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleEnableRotate(a1); return 1; case 49LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleFreeMove(a1); return 1; case 50LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleSwipe(a1); return 1; case 51LL: if ( !(_BYTE)a3 ) return 1; EditorUI::toggleSnap(a1); return 1; case 52LL: if ( !(_BYTE)a3 || *(_DWORD *)(a1 + 752) != -1 ) return 1; EditorUI::onPlayback(a1); return 1; case 53LL: if ( !(_BYTE)a3 ) return 1; v25 = (*(double (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1512) + 4296LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL)); v26 = *(float *)&v25; v28 = cocos2d::CCDirector::sharedDirector(v27); cocos2d::CCDirector::getWinSize(v28, &v155); v29 = *(float *)&v155 * 0.5; v30 = (float)(*(float *)(a1 + 904) * 0.5) + (float)(*((float *)&v155 + 1) * 0.5); v31 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1512) + 4296LL) + 200LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v156, v31); v32 = *(_QWORD *)(a1 + 1512); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v154, (float)(v29 - v156[0]) / v26, (float)(v30 - v156[1]) / v26); cocos2d::CCPoint::operator=(v32 + 15272, v33); v158 = 15; v34 = 0x2077656976657250LL; Block[1] = (void *)0x2E64656B636F4CLL; goto LABEL_475; case 54LL: if ( !(_BYTE)a3 ) return 1; cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 1512) + 15272LL, &unk_14090A708); *(_OWORD *)Block = 0; Block[0] = sub_14003D460(0x20u); v158 = 17; v159 = 31; strcpy((char *)Block[0], "Preview Unlocked."); goto LABEL_476; case 55LL: case 57LL: case 58LL: case 152LL: case 153LL: case 154LL: case 155LL: case 156LL: case 157LL: case 158LL: case 159LL: case 160LL: case 161LL: case 162LL: case 163LL: case 164LL: case 165LL: case 166LL: case 167LL: case 168LL: case 182LL: case 183LL: if ( !(_BYTE)a3 ) return 1; switch ( a2 ) { case 20056: v35 = 9; break; case 20058: v35 = 11; break; case 20059: v35 = 10; break; case 20153: v35 = 20; break; case 20154: v35 = 8; break; case 20155: v35 = 7; break; case 20156: v35 = 6; break; case 20157: v35 = 5; break; case 20158: v35 = 4; break; case 20159: v35 = 3; break; case 20160: v35 = 2; break; case 20161: v35 = 1; break; case 20162: v35 = 12; break; case 20163: v35 = 13; break; case 20164: v35 = 14; break; case 20165: v35 = 15; break; case 20166: v35 = -16; break; case 20167: v35 = 17; break; case 20168: v35 = 18; break; case 20169: v35 = 19; break; case 20183: v35 = 21; break; case 20184: v35 = 22; break; default: v35 = 0; break; } if ( !(unsigned __int8)EditorUI::toggleViewOption(a1, v35) ) return 1; v36 = a2 - 20056; if ( v36 ) { v37 = v36 - 2; if ( v37 ) { v38 = v37 - 1; if ( v38 ) { if ( v38 == 94 ) v16 = 269; else v16 = 189; } else { v16 = 197; } } else { v16 = 196; } } else { v16 = 195; } goto LABEL_126; case 56LL: if ( !(_BYTE)a3 ) return 1; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } GameManager::toggleGameVariable(a1, "0137"); LevelEditorLayer::updatePreviewParticles(*(_QWORD *)(a1 + 1512)); v39 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v39 = qword_14090BFD0; } GameVariable = GameManager::getGameVariable(v39, "0137"); *(_OWORD *)Block = 0; Block[0] = sub_14003D460(0x20u); v158 = 16; v159 = 31; strcpy((char *)Block[0], "Particle Icons: "); EditorUI::showTextAlert(a1, Block, GameVariable ^ 1, 0, 0); v41 = (_QWORD *)EditorSFXManager::sharedState(); hasSoundsForAction = EditorSFXManager::hasSoundsForAction(v41, 198); v24 = (__int64)v41; if ( !hasSoundsForAction ) goto LABEL_436; EditorSFXManager::playAction((__int64)v41, 198); return 1; case 59LL: if ( !(_BYTE)a3 ) return 1; v46 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v46 = qword_14090BFD0; } if ( !(unsigned __int8)GameManager::getGameVariable(v46, "0097") ) return 1; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } GameManager::toggleGameVariable(v47, "0180"); v48 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v48 = qword_14090BFD0; } *(_BYTE *)(a1 + 916) = GameManager::getGameVariable(v48, "0180"); EditorUI::updateButtons(a1); v158 = 11; v159 = 15; Block[0] = (void *)0x646F4D206B6E694CLL; Block[1] = (void *)2112101; v49 = *(_BYTE *)(a1 + 916) == 0; v50 = 0; goto LABEL_477; case 60LL: if ( !(_BYTE)a3 || cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; v51 = *(_QWORD *)(a1 + 1568); v52 = *(_QWORD *)(a1 + 1512); if ( !v51 || (v53 = *(_QWORD *)(v52 + 15528)) != 0 && *(_DWORD *)(v53 + 924) == *(_DWORD *)(v51 + 924) ) v51 = 0; *(_QWORD *)(v52 + 15528) = v51; Block[1] = (void *)8250; v158 = 10; v159 = 15; Block[0] = (void *)0x6E49206563617254LL; v49 = *(_QWORD *)(*(_QWORD *)(a1 + 1512) + 15528LL) != 0; v50 = 0; goto LABEL_477; case 61LL: if ( !(_BYTE)a3 || cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; v54 = *(_QWORD *)(a1 + 1568); if ( v54 && *(_DWORD *)(v54 + 1256) == 1 ) { v55 = *(_QWORD *)(a1 + 1512); v56 = *(_QWORD *)(v55 + 15536); if ( v56 && *(_DWORD *)(v56 + 924) == *(_DWORD *)(v54 + 924) ) v54 = 0; *(_QWORD *)(v55 + 15536) = v54; } else { *(_QWORD *)(*(_QWORD *)(a1 + 1512) + 15536LL) = 0; } v158 = 11; v159 = 15; Block[0] = (void *)0x754F206563617254LL; Block[1] = (void *)2112116; v49 = *(_QWORD *)(*(_QWORD *)(a1 + 1512) + 15536LL) != 0; v50 = 0; goto LABEL_477; case 62LL: if ( !(_BYTE)a3 ) return 1; ++*(_WORD *)(*(_QWORD *)(a1 + 1512) + 14866LL); EditorUI::updateGroupIDLabel(a1, 0x140000000LL, a3); return 1; case 63LL: if ( !(_BYTE)a3 ) return 1; v76 = *(_QWORD *)(a1 + 1512); v77 = *(__int16 *)(v76 + 14866) - 1; if ( v77 < -1 ) LOWORD(v77) = -1; *(_WORD *)(v76 + 14866) = v77; EditorUI::updateGroupIDLabel(a1, 0x140000000LL, a3); return 1; case 64LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onTargetIDChange(a1, 1); return 1; case 65LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onTargetIDChange(a1, -1); return 1; case 68LL: *(_BYTE *)(a1 + 736) = a3; return 1; case 69LL: if ( !(_BYTE)a3 || !*(_QWORD *)(a1 + 1568) && !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; v100 = cocos2d::CCDirector::sharedDirector(a1); v101 = 0; if ( !*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v100 + 176LL))(v100) + 157) ) { v102 = *(_DWORD **)(a1 + 1512); ++v102[3855]; v103 = v102[3876]; if ( v103 >= 0 ) { v104 = v102[3860] - v103; v105 = 0; if ( v104 > 1 ) { do { if ( v105 >= 7 ) break; v104 = (unsigned int)v104 >> 1; ++v105; } while ( (unsigned int)v104 > 1 ); } ++v102[v105 + 3868]; } v102[3876] = v102[3860]; } v106 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v106, 130); EditorUI::createUndoObject(a1, v107, 0); if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 840) + 344LL))(*(_QWORD *)(a1 + 840)) ) { GJTransformControl::applyRotation(*(_QWORD *)(a1 + 840), *(float *)(*(_QWORD *)(a1 + 840) + 608LL) - 45.0); return 1; } cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)); if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) goto LABEL_345; if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) { if ( isSpecialSnapObject(*(_DWORD *)(*(_QWORD *)(a1 + 1568) + 1036LL)) || v109 == 2900 ) *(_BYTE *)(a1 + 740) = 1; v99 = 42; goto LABEL_375; } if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; do { v108 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 944), v101); EditorUI::transformObject(a1, v108, 42, 0); ++v101; } while ( v101 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ); return 1; case 70LL: if ( !(_BYTE)a3 || !*(_QWORD *)(a1 + 1568) && !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; v85 = cocos2d::CCDirector::sharedDirector(a1); v86 = 0; if ( !*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v85 + 176LL))(v85) + 157) ) { v87 = *(_DWORD **)(a1 + 1512); ++v87[3855]; v88 = v87[3876]; if ( v88 >= 0 ) { v89 = v87[3860] - v88; v90 = 0; if ( v89 > 1 ) { do { if ( v90 >= 7 ) break; v89 = (unsigned int)v89 >> 1; ++v90; } while ( (unsigned int)v89 > 1 ); } ++v87[v90 + 3868]; } v87[3876] = v87[3860]; } v91 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v91, 130); EditorUI::createUndoObject(a1, v92, 0); if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 840) + 344LL))(*(_QWORD *)(a1 + 840)) ) { GJTransformControl::applyRotation(*(_QWORD *)(a1 + 840), *(float *)(*(_QWORD *)(a1 + 840) + 608LL) + 45.0); return 1; } cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)); if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) { LABEL_345: v93 = *(_QWORD *)(a1 + 944); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v154, (const struct cocos2d::CCPoint *)&unk_14090A7A8); EditorUI::rotateObjects(a1, v93, v95, v94, 0); return 1; } if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) { if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; do { v96 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 944), v86); EditorUI::transformObject(a1, v96, 41, 0); ++v86; } while ( v86 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ); return 1; } else { if ( isSpecialSnapObject(*(_DWORD *)(*(_QWORD *)(a1 + 1568) + 1036LL)) || v97 == 2900 ) *(_BYTE *)(a1 + 740) = 1; v99 = 41; LABEL_375: EditorUI::transformObject(a1, v98, v99, 0); *(_BYTE *)(a1 + 740) = 0; return 1; } case 71LL: if ( !(_BYTE)a3 || !*(_QWORD *)(a1 + 1568) && !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; v110 = cocos2d::CCDirector::sharedDirector(a1); v111 = 0; if ( !*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v110 + 176LL))(v110) + 157) ) { v112 = *(_DWORD **)(a1 + 1512); ++v112[3855]; v113 = v112[3876]; if ( v113 >= 0 ) { v114 = v112[3860] - v113; v115 = 0; if ( v114 > 1 ) { do { if ( v115 >= 7 ) break; v114 = (unsigned int)v114 >> 1; ++v115; } while ( (unsigned int)v114 > 1 ); } ++v112[v115 + 3868]; } v112[3876] = v112[3860]; } v116 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v116, 131); EditorUI::createUndoObject(a1, v117, 0); v118 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 840) + 344LL))(*(_QWORD *)(a1 + 840)); v119 = *(cocos2d::CCArray **)(a1 + 944); if ( v118 ) { v120 = *(_QWORD *)(a1 + 1568); v121 = -1.0; if ( v119 && cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) { if ( cocos2d::CCArray::count(v119) ) { do { v122 = cocos2d::CCArray::objectAtIndex(v119, v111); v123 = LevelEditorLayer::rotationForSlopeNearObject(*(_QWORD *)(a1 + 1512), v122); v121 = *(float *)&v123; if ( *(float *)&v123 != -1.0 ) break; ++v111; } while ( v111 < cocos2d::CCArray::count(v119) ); } } else if ( v120 ) { v124 = LevelEditorLayer::rotationForSlopeNearObject(*(_QWORD *)(a1 + 1512), v120); v121 = *(float *)&v124; } if ( v121 != -1.0 ) { GJTransformControl::applyRotation(*(_QWORD *)(a1 + 840), v121); return 1; } } else { cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)); cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)); v125 = *(cocos2d::CCArray **)(a1 + 944); v126 = *(_QWORD *)(a1 + 1568); v127 = -1.0; if ( v125 && cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) { if ( cocos2d::CCArray::count(v125) ) { do { v128 = cocos2d::CCArray::objectAtIndex(v125, v111); v129 = LevelEditorLayer::rotationForSlopeNearObject(*(_QWORD *)(a1 + 1512), v128); v127 = *(float *)&v129; if ( *(float *)&v129 != -1.0 ) break; ++v111; } while ( v111 < cocos2d::CCArray::count(v125) ); } } else if ( v126 ) { v130 = LevelEditorLayer::rotationForSlopeNearObject(*(_QWORD *)(a1 + 1512), v126); v127 = *(float *)&v130; } if ( v127 != -1.0 ) { v131 = *(struct cocos2d::CCObject **)(a1 + 1568); if ( v131 ) LODWORD(v132) = (unsigned int)cocos2d::CCArray::createWithObject(v131); else v132 = *(_QWORD *)(a1 + 944); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v154, (const struct cocos2d::CCPoint *)&unk_14090A7A8); EditorUI::rotateObjects(a1, v132, v134, v133, 0); return 1; } } return 1; case 72LL: case 73LL: if ( !(_BYTE)a3 ) return 1; v135 = cocos2d::CCNode::create(); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v135 + 64LL))(v135, (unsigned int)(a2 != 20073) + 45); EditorUI::activateScaleControl(a1, v135); return 1; case 77LL: if ( !(_BYTE)a3 ) return 1; EditorUI::editObject(a1); return 1; case 78LL: if ( !(_BYTE)a3 ) return 1; EditorUI::editGroup(a1); return 1; case 79LL: if ( !(_BYTE)a3 ) return 1; EditorUI::editObjectSpecial(a1); return 1; case 80LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onCopyState(a1, 0); return 1; case 81LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onPasteState(a1, 0); return 1; case 82LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onPasteColor(a1, 0); return 1; case 83LL: case 84LL: case 117LL: case 144LL: case 145LL: if ( !(_BYTE)a3 ) return 1; v15 = -1; switch ( a2 ) { case 20118: EditorUI::setCustomGridEnabled(a1, *(_BYTE *)(a1 + 704) == 0); v16 = 203 - (*(_BYTE *)(a1 + 704) != 0); break; case 20084: EditorUI::cycleCustomGridPreset(a1, 1, a3); v16 = 200; break; case 20085: EditorUI::cycleCustomGridPreset(a1, 0, a3); v16 = 201; break; case 20145: EditorUI::adjustCustomGridSize(a1, 1, a3); v16 = 204; break; default: EditorUI::adjustCustomGridSize(a1, -1, a3); v16 = 205; break; } v17 = *(_QWORD *)(a1 + 624); v18 = *(_QWORD *)(v17 + 16 * (*(_QWORD *)(a1 + 648) & 0xCD3AC65E44F721B1uLL) + 8); v19 = *(_QWORD *)(a1 + 608); if ( v18 == v19 ) goto LABEL_111; v17 = *(_QWORD *)(v17 + 16 * (*(_QWORD *)(a1 + 648) & 0xCD3AC65E44F721B1uLL)); if ( *(_DWORD *)(v18 + 16) == 4 ) goto LABEL_112; break; case 85LL: if ( !(_BYTE)a3 ) return 1; v148 = *(_QWORD *)(a1 + 1512); if ( *(_DWORD *)(*(_QWORD *)(v148 + 2168) + 1220LL) != 2 ) return 1; if ( *(_DWORD *)(v148 + 2204) ) goto LABEL_465; if ( !(unsigned __int8)LevelEditorLayer::saveLevel() ) return 1; *(_OWORD *)Block = 0; v158 = 12; v34 = 0x6153206C6576654CLL; strcpy((char *)&Block[1], "ved."); goto LABEL_475; case 87LL: if ( !(_BYTE)a3 ) return 1; EditorUI::dynamicGroupUpdate(a1, 0); return 1; case 88LL: if ( !(_BYTE)a3 ) return 1; EditorUI::createLoop(a1); return 1; case 89LL: if ( !(_BYTE)a3 ) return 1; SelectedObjects = EditorUI::getSelectedObjects(a1, 0x140000000uLL); EditorUI::alignObjects(a1, SelectedObjects, 0); return 1; case 90LL: if ( !(_BYTE)a3 ) return 1; v66 = EditorUI::getSelectedObjects(a1, 0x140000000uLL); LOBYTE(v67) = 1; EditorUI::alignObjects(a1, v66, v67); return 1; case 91LL: if ( !(_BYTE)a3 ) return 1; EditorUI::selectAll(a1, 0x140000000uLL); return 1; case 92LL: if ( !(_BYTE)a3 ) return 1; LOBYTE(v7) = 1; EditorUI::selectAllWithDirection(a1, v7); return 1; case 93LL: if ( !(_BYTE)a3 ) return 1; EditorUI::selectAllWithDirection(a1, 0); return 1; case 111LL: if ( !(_BYTE)a3 ) return 1; EditorUI::selectBuildTab(a1, *(_DWORD *)(a1 + 1608) - 1); return 1; case 112LL: if ( !(_BYTE)a3 ) return 1; EditorUI::selectBuildTab(a1, *(_DWORD *)(a1 + 1608) + 1); return 1; case 113LL: if ( (_BYTE)a3 ) goto LABEL_459; return 1; case 114LL: if ( !(_BYTE)a3 ) return 1; LABEL_459: (*(void (**)(void))(*(_QWORD *)(a1 + 352) + 16LL))(); return 1; case 115LL: if ( !(_BYTE)a3 ) return 1; v57 = *(_BYTE *)(a1 + 1661); *(_BYTE *)(a1 + 1661) = v57 == 0; *(_BYTE *)(a1 + 1662) = 0; if ( v57 ) { LOBYTE(v7) = *(_DWORD *)(a1 + 1508) == 1; (*(void (__fastcall **)(_QWORD, unsigned __int64))(**(_QWORD **)(a1 + 952) + 336LL))(*(_QWORD *)(a1 + 952), v7); EditorUI::updateDeleteButtons(a1); EditorUI::updateCreateMenu(a1, 0); EditorUI::updateEditMenu(a1, v58); if ( *(_BYTE *)(a1 + 1661) || *(_DWORD *)(a1 + 1508) != 4 ) v59 = 0; else LOBYTE(v59) = 1; (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 1432) + 336LL))(*(_QWORD *)(a1 + 1432), v59); } EditorUI::showUI(a1, *(_BYTE *)(a1 + 1661) == 0); v60 = (_QWORD *)EditorSFXManager::sharedState(); v61 = EditorSFXManager::hasSoundsForAction(v60, 194); v24 = (__int64)v60; if ( !v61 ) goto LABEL_436; EditorSFXManager::playAction((__int64)v60, 194); return 1; case 116LL: if ( !(_BYTE)a3 || !*(_QWORD *)(a1 + 1664) ) return 1; EditorUI::setDpadStep(a1, (unsigned int)((*(_DWORD *)(a1 + 1672) + 1) % 9)); return 1; case 118LL: if ( !(_BYTE)a3 || *(_BYTE *)(a1 + 1660) ) return 1; EditorUI::toggleWindow((_QWORD *)a1, 1); return 1; case 119LL: if ( !(_BYTE)a3 ) return 1; v62 = EditorUI::getSelectedObjects(a1, 0x140000000uLL); EditorUI::alignObjectsOnAxis(a1, v62, 0); return 1; case 120LL: if ( !(_BYTE)a3 ) return 1; v63 = EditorUI::getSelectedObjects(a1, 0x140000000uLL); LOBYTE(v64) = 1; EditorUI::alignObjectsOnAxis(a1, v63, v64); return 1; case 121LL: if ( !(_BYTE)a3 ) return 1; EditorUI::createGradientFromSelection(a1); return 1; case 122LL: if ( !(_BYTE)a3 ) return 1; EditorUI::dynamicGroupUpdate(a1, 1); return 1; case 123LL: if ( !(_BYTE)a3 ) return 1; EditorUI::assignNewGroups(a1, 0); return 1; case 124LL: if ( !(_BYTE)a3 ) return 1; EditorUI::assignNewGroups(a1, 1); return 1; case 125LL: if ( !(_BYTE)a3 ) return 1; LOBYTE(v7) = 1; EditorUI::doCopyObjects(a1, v7); return 1; case 126LL: if ( !(_BYTE)a3 ) return 1; LOBYTE(v7) = 1; EditorUI::doPasteObjects(a1, v7); return 1; case 127LL: if ( !(_BYTE)a3 ) return 1; v72 = EditorUI::getSelectedObjects(a1, 0x140000000uLL); EditorUI::createRockBases(a1, v72); return 1; case 128LL: if ( !(_BYTE)a3 ) return 1; v73 = *(_QWORD *)(a1 + 1512); v74 = 0; v75 = 10000; do { *(_DWORD *)(*(_QWORD *)(v73 + 15208) + 4 * (v74 >> 5)) &= ~(1 << (v74 & 0x1F)); ++v74; --v75; } while ( v75 ); *(_DWORD *)(v73 + 15240) = 0; return 1; case 129LL: if ( !(_BYTE)a3 ) return 1; LevelEditorLayer::resetUnusedColorChannels(*(_QWORD *)(a1 + 1512), 0x140000000uLL); return 1; case 130LL: if ( !(_BYTE)a3 ) return 1; EditorUI::uncheckPortals(a1); return 1; case 131LL: if ( !(_BYTE)a3 || !*(_QWORD *)(a1 + 1568) && !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; if ( (*(unsigned int (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1152) + 56LL))(*(_QWORD *)(a1 + 1152)) == 1 ) EditorUI::editHSV((_QWORD *)a1); else EditorUI::editColor(a1); EditorUI::updateEditColorButton(a1); return 1; case 132LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onGoToLayer(a1); return 1; case 133LL: if ( !(_BYTE)a3 ) return 1; *(_WORD *)(*(_QWORD *)(a1 + 1512) + 14866LL) = -1; EditorUI::updateGroupIDLabel(a1, 0x140000000LL, a3); return 1; case 134LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onGoToFreeLayer(a1); return 1; case 135LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onLockLayer(a1); return 1; case 136LL: if ( !(_BYTE)a3 || *(_BYTE *)(a1 + 916) || !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; GJBaseGameLayer::groupStickyObjects(*(_QWORD *)(a1 + 1512), *(_QWORD *)(a1 + 944)); EditorUI::updateButtons(a1); return 1; case 137LL: if ( !(_BYTE)a3 || *(_BYTE *)(a1 + 916) || !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; GJBaseGameLayer::ungroupStickyObjects(*(_QWORD *)(a1 + 1512), *(_QWORD *)(a1 + 944)); EditorUI::updateButtons(a1); return 1; case 139LL: if ( !(_BYTE)a3 || *(_BYTE *)(a1 + 1660) ) return 1; EditorUI::toggleWindow((_QWORD *)a1, 3); return 1; case 140LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onResetSpecialFilter(a1); return 1; case 141LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onDeleteSelectedType(a1); return 1; case 142LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onNewCustomItem(a1, 0); return 1; case 143LL: if ( !(_BYTE)a3 ) return 1; v149 = *(_QWORD *)(a1 + 1512); if ( *(_DWORD *)(*(_QWORD *)(v149 + 2168) + 1220LL) != 2 ) return 1; if ( *(_DWORD *)(v149 + 2204) ) { LABEL_465: *(_OWORD *)Block = 0; Block[0] = sub_14003D460(0x20u); v158 = 20; v159 = 31; strcpy((char *)Block[0], "Stop Playtest First."); EditorUI::showTextAlert(a1, Block, 0, 1, 0); return 1; } LevelEditorLayer::saveLevel(); v150 = cocos2d::CCArray::createWithObject(*(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 1512) + 2168LL)); LocalLevelManager::sharedState(v151); v153 = LocalLevelManager::exportLevelsToFile(v152, v150); if ( v153 <= 0 ) { if ( v153 ) return 1; v158 = 14; v34 = 0x462074726F707845LL; Block[1] = (void *)0x2E64656C6961LL; } else { v158 = 15; v34 = 0x7845206C6576654CLL; Block[1] = (void *)0x2E646574726F70LL; } LABEL_475: v159 = 15; Block[0] = (void *)v34; LABEL_476: v50 = 1; v49 = 0; LABEL_477: EditorUI::showTextAlert(a1, Block, v49, v50, 0); return 1; case 146LL: case 147LL: case 148LL: case 149LL: if ( !(*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 840) + 344LL))(*(_QWORD *)(a1 + 840)) ) return 0; if ( !v3 ) return 1; v137 = a2 - 20147; if ( v137 ) { v138 = v137 - 1; if ( v138 ) { v139 = v138 - 1; if ( v139 ) { if ( v139 == 1 ) GJTransformControl::onToggleFreeRotation(*(_QWORD *)(a1 + 840)); } else { GJTransformControl::onToggleGridSnap(*(_QWORD *)(a1 + 840)); } } else { GJTransformControl::onToggleOppositeAnchor(*(_QWORD *)(a1 + 840)); } } else { GJTransformControl::onToggleLockScale(*(_QWORD *)(a1 + 840)); } goto LABEL_435; case 150LL: if ( !(_BYTE)a3 ) return 1; v136 = (void *)KeybindingsLayer::create(0); goto LABEL_416; case 151LL: if ( !(_BYTE)a3 ) return 1; v136 = EditorSoundsLayer::create(a1); LABEL_416: if ( !v136 ) return 1; (*(void (__fastcall **)(void *))(*(_QWORD *)v136 + 1064LL))(v136); return 1; case 169LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onGroupIDFilter(a1); return 1; case 170LL: if ( !(_BYTE)a3 ) return 1; EditorUI::onColorFilter(a1); return 1; case 171LL: case 172LL: if ( !(_BYTE)a3 ) return 1; v78 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v78 = qword_14090BFD0; } *(_OWORD *)Block = 0; v158 = 3; v159 = 15; LODWORD(Block[0]) = 6256231; sub_140044D80(Block, "0230", 4u); v79 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v78 + 432), Block); v80 = cocos2d::CCString::intValue(v79); if ( v159 > 0xF ) { v81 = Block[0]; if ( v159 + 1 >= 0x1000 ) { v81 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v81 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v81); } v158 = 0; v159 = 15; LOBYTE(Block[0]) = 0; if ( v80 > 0 ) { v82 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v82 = qword_14090BFD0; } v83 = -1; if ( a2 == 20172 ) v83 = 1; v84 = GameManager::getGameVariable(v82, "0232"); EditorUI::findObject(a1, (unsigned int)v80, v84, v83); return 1; } else if ( *(_BYTE *)(a1 + 1660) ) { return 1; } else { EditorUI::toggleWindow((_QWORD *)a1, 3); return 1; } case 173LL: case 174LL: case 175LL: case 176LL: if ( !(_BYTE)a3 ) return 1; EditorUI::moveObjectCall_1(a1, (unsigned int)(a2 + *((_DWORD *)&unk_1407032B0 + 8 * *(int *)(a1 + 1672)) - 20174)); return 1; case 181LL: if ( !(_BYTE)a3 ) return 1; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } GameManager::toggleGameVariable(a1, "0242"); v140 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v140 = qword_14090BFD0; } v158 = 13; v44 = 0x5320726F68636E41LL; Block[1] = (void *)0x203A70616ELL; v45 = GameManager::getGameVariable(v140, "0242") ^ 1; goto LABEL_434; case 184LL: if ( !(_BYTE)a3 ) return 1; v68 = (cocos2d::CCArray *)EditorUI::getSelectedObjects(a1, 0x140000000uLL); if ( !cocos2d::CCArray::count(v68) ) return 1; LOBYTE(v70) = 1; GroupCenter = (float *)EditorUI::getGroupCenter(v69, &v154, v68, v70); EditorUI::centerCameraOnPoint(a1, GroupCenter); return 1; case 185LL: if ( !(_BYTE)a3 ) return 1; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } GameManager::toggleGameVariable(a1, "0248"); LevelEditorLayer::updateOptions(*(_QWORD *)(a1 + 1512)); v43 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v154 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v154); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v43 = qword_14090BFD0; } v158 = 14; v44 = 0x43207265746E6543LL; Block[1] = (void *)0x203A73736F72LL; v45 = GameManager::getGameVariable(v43, "0248") ^ 1; LABEL_434: Block[0] = (void *)v44; v159 = 15; EditorUI::showTextAlert(a1, Block, v45, 0, 0); LABEL_435: v24 = EditorSFXManager::sharedState(); goto LABEL_436; case 186LL: if ( !(_BYTE)a3 || !*(_QWORD *)(a1 + 1568) && !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) ) return 1; v141 = *(_DWORD **)(a1 + 1512); ++v141[3856]; v142 = v141[3876]; if ( v142 >= 0 ) { v143 = v141[3860] - v142; v144 = 0; if ( v143 > 1 ) { do { if ( v144 >= 7 ) break; v143 = (unsigned int)v143 >> 1; ++v144; } while ( (unsigned int)v143 > 1 ); } ++v141[v144 + 3868]; } v141[3876] = v141[3860]; v145 = (_QWORD *)EditorSFXManager::sharedState(); v146 = EditorSFXManager::hasSoundsForAction(v145, 108); EditorSFXManager::playAction((__int64)v145, v146 + 107); v147 = SetupObjectOptionsPopup::create(*(_QWORD *)(a1 + 1568), *(_QWORD *)(a1 + 944)); (*(void (__fastcall **)(__int64))(*(_QWORD *)v147 + 1064LL))(v147); return 1; default: return 0; } while ( v18 != v17 ) { v18 = *(_QWORD *)(v18 + 8); if ( *(_DWORD *)(v18 + 16) == 4 ) goto LABEL_112; } LABEL_111: v18 = 0; LABEL_112: if ( v18 ) v19 = v18; if ( v19 != *(_QWORD *)(a1 + 608) ) { v20 = *(_QWORD **)(v19 + 24); if ( v20[125] ) { SetupTriggerPopup::updateValueControls(v20, 4294967294LL); (*(void (__fastcall **)(_QWORD *, __int64, _QWORD))(*v20 + 1152LL))( v20, 0xFFFFFFFFLL, *(unsigned __int8 *)(v20[125] + 704LL)); } } if ( *(_BYTE *)(a1 + 704) && (v21 = *(float *)(a1 + 700), v21 > 0.0) ) { if ( v21 == (float)(int)v21 ) sub_1401A8CE0(Buffer, "Gridsize: %d", (int)v21); else sub_1401A8CE0(Buffer, "Gridsize: %.1f", v21); } else { sub_1401A8CE0(Buffer, "Gridsize: Off", v17); } *(_OWORD *)Block = 0; v158 = 0; v159 = 0; do ++v15; while ( Buffer[v15] ); sub_14003D230(Block, Buffer, v15); EditorUI::showTextAlert(a1, Block, 0, 1, 0); LABEL_126: v22 = (_QWORD *)EditorSFXManager::sharedState(); v23 = EditorSFXManager::hasSoundsForAction(v22, v16); v24 = (__int64)v22; if ( v23 ) { EditorSFXManager::playAction((__int64)v22, v16); return 1; } else { LABEL_436: EditorSFXManager::playAction(v24, 189); return 1; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source