// // EditorUI::selectObjects from 0x3a301c to 0x3a334e (818 bytes) // // 13 xrefs: // > LevelEditorLayer::breakApartTextObject @ 0x37165a // > LevelEditorLayer::handleAction @ 0x37171a // > LevelEditorLayer::handleAction @ 0x37181a // > EditorUI::selectObject @ 0x3a2e7a // > EditorUI::createNewKeyframeAnim @ 0x3a352c // > EditorUI::changeSelectedObjects @ 0x3a463a // > EditorUI::selectObjectsInRect @ 0x3a46c2 // > EditorUI::processSelectObjects @ 0x3a4732 // > EditorUI::createSmartObjectsFromType @ 0x3a49e4 // > EditorUI::createSmartObjectsFromTemplate @ 0x3a52f8 // > EditorUI::ccTouchEnded @ 0x3a58d2 // > SetupKeyframePopup::onCustomButton @ 0x5749e2 // > SetupKeyframePopup::onCustomButton @ 0x574b34 // // 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::selectObjects(EditorUI *a1, cocos2d::CCArray *a2, bool a3) { unsigned int v4; // r6 GameManager *v6; // r0 GameManager *v7; // r0 GameManager *v8; // r0 unsigned int v9; // r7 int IntGameVariable; // r8 GameManager *v11; // r0 int v12; // r0 int v13; // r8 GameManager *v14; // r0 int v15; // r0 int v16; // r7 unsigned int v17; // r7 GameObject *v18; // r0 GameObject *m_selectedObject; // r1 GameObject *v20; // r8 unsigned int v21; // r6 cocos2d::CCNode *v22; // r9 cocos2d::CCDictionary *v23; // r7 cocos2d::CCObject *v24; // r11 _BOOL4 m_stickyControlsEnabled; // r3 GameObject *v26; // r0 GameObject *v27; // r5 int m_linkedGroup; // r1 cocos2d::CCArray *StickyGroup; // r0 unsigned int v30; // r5 cocos2d::CCArray *v31; // r9 int v32; // r0 cocos2d::CCArray *v33; // r8 unsigned int i; // r6 cocos2d::CCObject *v35; // r11 v4 = a3; if ( a2 ) { if ( cocos2d::CCArray::count(a2) ) { if ( v4 ) goto LABEL_9; v6 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v6, "0064") ) goto LABEL_9; v7 = GameManager::sharedState(); if ( GameManager::getIntGameVariable(v7, "0005") != 3 ) goto LABEL_9; v8 = GameManager::sharedState(); v9 = 0; IntGameVariable = GameManager::getIntGameVariable(v8, "0006"); while ( v9 < cocos2d::CCArray::count(a2) ) { if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(a2, v9) + 884) == IntGameVariable ) ++v9; else cocos2d::CCArray::removeObjectAtIndex(a2, v9, 1); } if ( cocos2d::CCArray::count(a2) ) { LABEL_9: v11 = GameManager::sharedState(); v12 = GameManager::getIntGameVariable(v11, "0133"); v13 = v12; if ( v4 ) goto LABEL_20; if ( !v12 ) goto LABEL_20; v17 = 0; while ( v17 < cocos2d::CCArray::count(a2) ) { v18 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v17); if ( GameObject::belongsToGroup(v18, v13) ) ++v17; else cocos2d::CCArray::removeObjectAtIndex(a2, v17, 1); } if ( cocos2d::CCArray::count(a2) ) { LABEL_20: v14 = GameManager::sharedState(); v15 = GameManager::getIntGameVariable(v14, "0139"); v16 = v15; if ( v4 || !v15 ) goto LABEL_21; while ( v4 < cocos2d::CCArray::count(a2) ) { v20 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v4); if ( GameObject::getMainColorMode(v20) == v16 || GameObject::getSecondaryColorMode(v20) == v16 ) ++v4; else cocos2d::CCArray::removeObjectAtIndex(a2, v4, 1); } if ( cocos2d::CCArray::count(a2) ) { LABEL_21: cocos2d::CCNode::stopActionByTag(a1, 124); m_selectedObject = a1->m_selectedObject; if ( m_selectedObject && !cocos2d::CCArray::containsObject(a2, m_selectedObject) ) { if ( cocos2d::CCArray::count(a1->m_selectedObjects) ) { cocos2d::CCArray::addObject(a2, a1->m_selectedObject); } else { cocos2d::CCArray::addObject(a1->m_selectedObjects, a1->m_selectedObject); ((void (__fastcall *)(GameObject *, int))a1->m_selectedObject->selectObject)( a1->m_selectedObject, 65280); } a1->m_canActivateControls = 1; } v21 = 0; v22 = nullptr; v23 = nullptr; a1->m_selectedObject = nullptr; while ( v21 < cocos2d::CCArray::count(a2) ) { v24 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a2, v21); if ( !cocos2d::CCArray::containsObject(a1->m_selectedObjects, v24) ) { cocos2d::CCArray::addObject(a1->m_selectedObjects, v24); v24->__vftable[18].setTag(v24, 65280); m_stickyControlsEnabled = a1->m_stickyControlsEnabled; a1->m_canActivateControls = 1; if ( m_stickyControlsEnabled && !a1->m_linkControlsDisabled && (int)v24[14].m_uID > 0 ) { if ( !v23 ) { v23 = cocos2d::CCDictionary::create(); v22 = cocos2d::CCNode::create(); } cocos2d::CCDictionary::setObject(v23, v22, v24[14].m_uID); } } ++v21; } if ( cocos2d::CCArray::count(a2) == 1 && cocos2d::CCArray::count(a1->m_selectedObjects) == 1 ) { v26 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, 0); v27 = v26; if ( !a1->m_stickyControlsEnabled || a1->m_linkControlsDisabled || (m_linkedGroup = v26->m_linkedGroup, m_linkedGroup <= 0) || (StickyGroup = GJBaseGameLayer::getStickyGroup(a1->m_editorLayer, m_linkedGroup)) == nullptr || cocos2d::CCArray::count(StickyGroup) <= 1u ) { EditorUI::selectObject(a1, v27, 0); } } if ( cocos2d::CCArray::count(a1->m_selectedObjects) && v23 ) { a1->m_findSnap = 1; v30 = 0; v31 = cocos2d::CCDictionary::allKeys(v23); while ( v30 < cocos2d::CCArray::count(v31) ) { v32 = cocos2d::CCArray::objectAtIndex(v31, v30); v33 = GJBaseGameLayer::getStickyGroup(a1->m_editorLayer, *(_DWORD *)(v32 + 52)); if ( v33 ) { for ( i = 0; i < cocos2d::CCArray::count(v33); ++i ) { v35 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v33, i); if ( !cocos2d::CCArray::containsObject(a1->m_selectedObjects, v35) ) { cocos2d::CCArray::addObject(a1->m_selectedObjects, v35); v35->__vftable[18].setTag(v35, 65280); } } } ++v30; } } EditorUI::checkLiveColorSelect(a1); } } } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source