// // EditorUI::onDuplicate from 0x3a68d4 to 0x3a69ec (280 bytes) // // 2 xrefs: // > EditorUI::ccTouchBegan @ 0x3a6d7e // > EditorUI::keyDown @ 0x3a6fec // // 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 EditorUI::onDuplicate(EditorUI *a1, cocos2d::CCObject *a2) { int v3; // r5 int v4; // r0 cocos2d::CCArray *m_selectedObjects; // r6 char v6; // [sp+Ch] [bp-10h] BYREF int v7; // [sp+10h] [bp-Ch] BYREF if ( !a1->m_selectedObject && !cocos2d::CCArray::count(a1->m_selectedObjects) ) return; v3 = a1->m_editorLayer->m_objectCount.random - a1->m_editorLayer->m_objectCount.seed; v4 = cocos2d::CCArray::count(a1->m_selectedObjects) + v3; if ( v4 > 80000 ) { if ( !a1->m_editorLayer->m_level->m_unlimitedObjectsEnabled ) { EditorUI::showMaxError(a1); return; } goto LABEL_5; } if ( v4 > 40000 ) { LABEL_5: if ( !a1->m_editorLayer->m_level->m_highObjectsEnabled ) { EditorUI::showMaxBasicError(a1); return; } } if ( cocos2d::CCArray::count(a1->m_selectedObjects) ) { m_selectedObjects = a1->m_selectedObjects; } else { m_selectedObjects = (cocos2d::CCArray *)cocos2d::CCArray::create(nullptr); cocos2d::CCArray::addObject(m_selectedObjects, a1->m_selectedObject); } EditorUI::copyObjects((EditorUI *)&v6, (cocos2d::CCArray *)a1, (int)m_selectedObjects, 0, 0); a1->m_editorLayer->m_keepEditorLayer = 1; sub_775C20(&v7, &v6); EditorUI::pasteObjects(a1, &v7, 0, 0); sub_774008(&v7); a1->m_editorLayer->m_keepEditorLayer = 0; EditorUI::tryUpdateTimeMarkers(a1); EditorUI::updateButtons(a1); EditorUI::updateObjectInfoLabel(a1); sub_774008(&v6); }
GD Web Decomp Icon

GD Web Decomp

Raw Source