// // LevelEditorLayer::handleAction from 0x10035bccc to 0x10035c1d8 (1292 bytes) // // 3 xrefs: // > LevelEditorLayer::handleAction @ 0x10035c1b8 // > LevelEditorLayer::redoLastAction @ 0x10035c368 // > LevelEditorLayer::undoLastAction @ 0x10035c374 // // 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 __fastcall LevelEditorLayer::handleAction(LevelEditorLayer *a1, bool a2, cocos2d::CCArray *a3) { _BOOL4 v4; // w22 __int64 v6; // x20 int v7; // w8 UndoObject *v8; // x23 cocos2d::CCArray *SelectedObjects; // x23 cocos2d::CCArray *v10; // x24 __int64 v11; // x23 unsigned int v12; // w25 GameObject *v13; // x26 __int64 v14; // x24 unsigned int v15; // w23 GameObject *v16; // x25 GameObject *v17; // x23 GameObject *v18; // x23 EditorUI *v19; // x24 cocos2d::CCArray *v20; // x0 bool v21; // w1 __int64 v22; // x8 __int64 v23; // x23 cocos2d::CCArray *v24; // x24 unsigned int v25; // w25 GameObjectCopy *v26; // x26 EditorUI *m_editorUI; // x24 __int128 v28; // q0 __int128 v29; // q1 EditorUI *v30; // x24 __int128 v31; // q0 __int128 v32; // q1 v4 = a2; if ( (unsigned int)sub_10024A36C((__int64)a3) ) { v6 = sub_10024A398((__int64)a3); cocos2d::CCObject::retain((cocos2d::CCObject *)v6); sub_10024A430((__int64)a3, 1); v7 = *(_DWORD *)(v6 + 64); if ( v4 ) { if ( v7 <= 3 ) { if ( v7 != 1 ) { if ( v7 != 2 ) { v8 = (UndoObject *)v6; if ( v7 != 3 ) goto LABEL_39; goto LABEL_29; } goto LABEL_33; } goto LABEL_34; } if ( v7 != 4 ) { if ( v7 != 5 ) { v8 = (UndoObject *)v6; if ( v7 != 6 ) { LABEL_39: LevelEditorLayer::addToRedoList(a1, v8); if ( !(unsigned int)sub_10024A36C((__int64)a3) || *(_BYTE *)(sub_10024A398((__int64)a3) + 80) != 1 ) goto LABEL_56; v21 = 1; v22 = 13992; LABEL_55: LevelEditorLayer::handleAction( a1, v21, *(cocos2d::CCArray **)((char *)&a1->GJBaseGameLayer::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v22)); LABEL_56: cocos2d::CCObject::release((cocos2d::CCObject *)v6); return; } LABEL_21: SelectedObjects = EditorUI::getSelectedObjects(a1->m_editorUI); EditorUI::changeSelectedObjects(a1->m_editorUI, *(cocos2d::CCArray **)(v6 + 72), 1); UndoObject::setObjects((UndoObject *)v6, SelectedObjects); goto LABEL_37; } goto LABEL_42; } } else { if ( v7 > 3 ) { if ( v7 == 4 ) { LABEL_29: v14 = *(_QWORD *)(v6 + 72); v8 = (UndoObject *)v6; if ( !(unsigned int)sub_10024A36C(v14) ) goto LABEL_38; v15 = 0; do { v16 = (GameObject *)sub_10024A388(v14, v15); GJBaseGameLayer::removeObjectFromSection(a1, v16); LevelEditorLayer::removeSpecial(a1, v16); v16->m_wasSelected = v16->m_isSelected; EditorUI::deselectObject(a1->m_editorUI, v16); ((void (__fastcall *)(GameObject *, __int64))v16->deactivateObject)(v16, 1); ++v15; } while ( v15 < (unsigned int)sub_10024A36C(v14) ); goto LABEL_37; } if ( v7 != 5 ) { v8 = (UndoObject *)v6; if ( v7 != 6 ) goto LABEL_52; goto LABEL_21; } LABEL_42: v23 = *(_QWORD *)(v6 + 72); if ( v23 ) { v24 = (cocos2d::CCArray *)sub_10024A15C(); if ( (unsigned int)sub_10024A36C(v23) ) { v25 = 0; do { v26 = (GameObjectCopy *)sub_10024A388(v23, v25); GameObjectCopy::create(v26->m_object); sub_10024A2D0((__int64)v24); GameObjectCopy::resetObject(v26); GJBaseGameLayer::reorderObjectSection(a1, v26->m_object); ++v25; } while ( v25 < (unsigned int)sub_10024A36C(v23) ); } v8 = UndoObject::createWithArray(v24, Transform); } else { v8 = UndoObject::create(*(GameObject **)(*(_QWORD *)(v6 + 56) + 56LL), Transform); GameObjectCopy::resetObject(*(GameObjectCopy **)(v6 + 56)); GJBaseGameLayer::reorderObjectSection(a1, *(GameObject **)(*(_QWORD *)(v6 + 56) + 56LL)); } if ( *(_BYTE *)(v6 + 81) == 1 && ((unsigned int (__fastcall *)(GJTransformControl *))a1->m_editorUI->m_transformControl->isVisible)(a1->m_editorUI->m_transformControl) ) { m_editorUI = a1->m_editorUI; v28 = *(_OWORD *)&m_editorUI->m_transformState.m_scaleX; v29 = *(_OWORD *)&m_editorUI->m_transformState.m_skewX; *(_QWORD *)&v8->m_transformState.m_transformRotationX = *(_QWORD *)&m_editorUI->m_transformState.m_transformRotationX; *(_OWORD *)&v8->m_transformState.m_skewX = v29; *(_OWORD *)&v8->m_transformState.m_scaleX = v28; sub_1000229D0( &v8->m_transformState.m_transformPosition, (double *)&m_editorUI->m_transformState.m_transformPosition); sub_1000229D0( &v8->m_transformState.m_transformSkewX, (double *)&m_editorUI->m_transformState.m_transformSkewX); sub_1000229D0( &v8->m_transformState.m_transformSkewY, (double *)&m_editorUI->m_transformState.m_transformSkewY); *(_QWORD *)&v8->m_transformState.m_transformScaleX = *(_QWORD *)&m_editorUI->m_transformState.m_transformScaleX; v8->m_undoTransform = 1; v30 = a1->m_editorUI; v31 = *(_OWORD *)(v6 + 100); v32 = *(_OWORD *)(v6 + 84); *(_QWORD *)&v30->m_transformState.m_transformRotationX = *(_QWORD *)(v6 + 116); *(_OWORD *)&v30->m_transformState.m_scaleX = v32; *(_OWORD *)&v30->m_transformState.m_skewX = v31; sub_1000229D0(&v30->m_transformState.m_transformPosition, (double *)(v6 + 124)); sub_1000229D0(&v30->m_transformState.m_transformSkewX, (double *)(v6 + 132)); sub_1000229D0(&v30->m_transformState.m_transformSkewY, (double *)(v6 + 140)); *(_QWORD *)&v30->m_transformState.m_transformScaleX = *(_QWORD *)(v6 + 148); GJTransformControl::loadFromState(a1->m_editorUI->m_transformControl, (GJTransformState *)(v6 + 84)); GJTransformControl::refreshControl(a1->m_editorUI->m_transformControl); } v8->m_redo = *(_BYTE *)(v6 + 80); if ( v4 ) goto LABEL_39; goto LABEL_52; } if ( v7 == 1 ) { LABEL_33: v17 = *(GameObject **)(*(_QWORD *)(v6 + 56) + 56LL); GJBaseGameLayer::removeObjectFromSection(a1, v17); LevelEditorLayer::removeSpecial(a1, v17); v17->m_wasSelected = v17->m_isSelected; EditorUI::deselectObject(a1->m_editorUI, v17); ((void (__fastcall *)(GameObject *, __int64))v17->deactivateObject)(v17, 1); goto LABEL_37; } if ( v7 == 2 ) { LABEL_34: v18 = *(GameObject **)(*(_QWORD *)(v6 + 56) + 56LL); ((void (__fastcall *)(LevelEditorLayer *, GameObject *))a1->addToSection)(a1, v18); LevelEditorLayer::addSpecial(a1, v18); if ( v18->m_wasSelected ) { v19 = a1->m_editorUI; v20 = (cocos2d::CCArray *)sub_10024A1B8((__int64)v18); EditorUI::selectObjects(v19, v20, 1); } GameObject::assignUniqueID(v18); goto LABEL_37; } v8 = (UndoObject *)v6; if ( v7 != 3 ) goto LABEL_52; } v10 = (cocos2d::CCArray *)sub_10024A15C(); v11 = *(_QWORD *)(v6 + 72); if ( (unsigned int)sub_10024A36C(v11) ) { v12 = 0; do { v13 = (GameObject *)sub_10024A388(v11, v12); ((void (__fastcall *)(LevelEditorLayer *, GameObject *))a1->addToSection)(a1, v13); LevelEditorLayer::addSpecial(a1, v13); if ( v13->m_wasSelected ) sub_10024A2D0((__int64)v10); GameObject::assignUniqueID(v13); ++v12; } while ( v12 < (unsigned int)sub_10024A36C(v11) ); } v8 = (UndoObject *)v6; if ( !(unsigned int)sub_10024A36C((__int64)v10) ) { LABEL_38: if ( v4 ) goto LABEL_39; LABEL_52: LevelEditorLayer::addToUndoList(a1, v8, 1); if ( !(unsigned int)sub_10024A36C((__int64)a3) || (*(_BYTE *)(v6 + 80) & 1) == 0 ) goto LABEL_56; v21 = 0; v22 = 14000; goto LABEL_55; } EditorUI::selectObjects(a1->m_editorUI, v10, 1); LABEL_37: v8 = (UndoObject *)v6; goto LABEL_38; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source