// // EditorUI::ccTouchMoved from 0x3a4b18 to 0x3a4ea4 (908 bytes) // // 1 xrefs: // > `non-virtual thunk to'EditorUI::ccTouchMoved @ 0x3a4eb0 // // 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::ccTouchMoved(EditorUI *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3) { int m_nId; // r6 void *m_rotationControl; // r0 void (*ccTouchMoved)(void); // r3 LevelEditorLayer *m_editorLayer; // r0 int v10; // r2 bool v11; // r3 GameManager *v12; // r0 unsigned int v13; // r9 int v14; // r2 bool v15; // r3 GameObject *v16; // r0 GameObject *v17; // r11 cocos2d::CCPoint v18; // r2 GameObject *m_selectedObject; // r9 cocos2d::CCPoint v20; // r2 int v21; // r2 bool v22; // r3 void *m_scaleControl; // r6 void (__fastcall *v24)(void *, cocos2d::CCPoint *); // r9 int v25; // r0 GJTransformControl *m_transformControl; // r6 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 int v28; // r0 cocos2d::CCDirector *v29; // r0 int v30; // r2 GameObject *m_snapObject; // r0 void (__fastcall *setObjectColor)(GameObject *__hidden, const cocos2d::ccColor3B *); // r3 cocos2d::CCPoint v33; // r2 int v34; // r2 bool v35; // r3 int v36; // r2 bool v37; // r3 cocos2d::CCPoint v38; // r1 int v39; // r2 bool v40; // r3 const cocos2d::CCPoint *v41; // r0 int v42; // r2 bool v43; // r3 cocos2d::CCPoint v44; // [sp+4h] [bp-28h] BYREF cocos2d::CCPoint v45; // [sp+Ch] [bp-20h] BYREF cocos2d::CCPoint v46; // [sp+14h] [bp-18h] BYREF cocos2d::CCPoint v47; // [sp+1Ch] [bp-10h] BYREF m_nId = a2->m_nId; if ( a1->m_rotationTouchID == m_nId ) { cocos2d::CCNode::stopActionByTag(a1, 123); m_rotationControl = a1->m_rotationControl; LABEL_5: ccTouchMoved = *(void (**)(void))(*(_DWORD *)m_rotationControl + 444); LABEL_6: ccTouchMoved(); return; } if ( a1->m_scaleTouchID == m_nId ) { cocos2d::CCNode::stopActionByTag(a1, 123); m_rotationControl = a1->m_scaleControl; goto LABEL_5; } if ( a1->m_transformTouchID == m_nId ) { cocos2d::CCNode::stopActionByTag(a1, 123); m_rotationControl = a1->m_transformControl; goto LABEL_5; } m_editorLayer = a1->m_editorLayer; if ( m_editorLayer->m_playbackMode == Playing ) { ccTouchMoved = (void (*)(void))m_editorLayer->m_uiLayer->ccTouchMoved; goto LABEL_6; } if ( a1->m_touchID == m_nId ) { EditorUI::getTouchPoint(&v44, a1, a2, a3); if ( a1->m_snapObjectExists ) { if ( !a1->m_continueSwipe && fabsf(cocos2d::ccpDistance(&v44, &a1->m_swipeStart)) >= 4.0 ) a1->m_continueSwipe = 1; if ( !a1->m_continueSwipe ) goto LABEL_41; cocos2d::CCNode::convertToNodeSpace(&v47, a1->m_editorLayer->m_objectLayer, &v44); cocos2d::CCPoint::operator=((PlayerObject *)&v44, COERCE_FLOAT(&v47), v10, v11); if ( cocos2d::CCPoint::equals(&v44, &a1->m_cameraTest) ) goto LABEL_41; if ( !a1->m_continuousSnap ) { if ( a1->m_snapObject ) { v12 = GameManager::sharedState(); if ( GameManager::getGameVariable(v12, "0008") && EditorUI::shouldSnap(a1, a1->m_snapObject) ) { m_snapObject = a1->m_snapObject; setObjectColor = m_snapObject->setObjectColor; LOWORD(v47.x) = -25601; BYTE2(v47.x) = 50; setObjectColor(m_snapObject, (const cocos2d::ccColor3B *)&v47); } } } a1->m_continuousSnap = 1; cocos2d::CCPoint::operator-(&v46, &v44, &a1->m_cameraTest); if ( cocos2d::CCArray::count(a1->m_selectedObjects) ) { v13 = 0; while ( v13 < cocos2d::CCArray::count(a1->m_selectedObjects) ) { v16 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v13++); v17 = v16; cocos2d::CCPoint::CCPoint(&v47, &v46); LODWORD(v18.x) = &v47; EditorUI::moveObject(a1, v17, v18); } } else { m_selectedObject = a1->m_selectedObject; cocos2d::CCPoint::CCPoint(&v47, &v46); LODWORD(v20.x) = &v47; EditorUI::moveObject(a1, m_selectedObject, v20); } cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_cameraTest, COERCE_FLOAT(&v44), v14, v15); cocos2d::CCPoint::operator+(&v47, &a1->m_pivotPoint, &v46); cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_pivotPoint, COERCE_FLOAT(&v47), v21, v22); if ( ((int (__fastcall *)(GJRotationControl *))a1->m_rotationControl->isVisible)(a1->m_rotationControl) ) { m_scaleControl = a1->m_rotationControl; } else { if ( !((int (__fastcall *)(GJScaleControl *))a1->m_scaleControl->isVisible)(a1->m_scaleControl) ) { if ( ((int (__fastcall *)(GJTransformControl *))a1->m_transformControl->isVisible)(a1->m_transformControl) ) { m_transformControl = a1->m_transformControl; setPosition = m_transformControl->setPosition; v28 = (int)m_transformControl->getPosition(m_transformControl); cocos2d::CCPoint::operator+(&v47, v28, &v46); setPosition(m_transformControl, &v47); GJTransformControl::refreshControl(a1->m_transformControl); } goto LABEL_41; } m_scaleControl = a1->m_scaleControl; } v24 = *(void (__fastcall **)(void *, cocos2d::CCPoint *))(*(_DWORD *)m_scaleControl + 92); v25 = (*(int (__fastcall **)(void *))(*(_DWORD *)m_scaleControl + 96))(m_scaleControl); cocos2d::CCPoint::operator+(&v47, v25, &v46); v24(m_scaleControl, &v47); LABEL_41: cocos2d::CCNode::stopActionByTag(a1, 123); return; } if ( !a1->m_spaceSwiping ) { if ( a1->m_swipeEnabled || (v29 = cocos2d::CCDirector::sharedDirector(), v29->getKeyboardDispatcher(v29)->m_bShiftPressed) || a1->m_swipeModeTriggered ) { EditorUI::getTouchPoint(&v45, a1, a2, a3); if ( a1->m_selectedMode == 3 ) { cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_swipeEnd, COERCE_FLOAT(&v45), v30, 3); } else { cocos2d::CCPoint::CCPoint(&v46, &v45); LODWORD(v33.x) = &v46; EditorUI::getGridSnappedPos(&v47, a1, v33); cocos2d::CCPoint::operator=((PlayerObject *)&v45, COERCE_FLOAT(&v47), v34, v35); cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_createPosition, COERCE_FLOAT(&v45), v36, v37); EditorUI::getTouchPoint(&v47, a1, a2, a3); LODWORD(v38.x) = &v47; EditorUI::clickOnPosition(a1, v38); } goto LABEL_41; } } if ( a1->m_isDraggingCamera ) { cocos2d::CCPoint::operator-(&v45, &v44, &a1->m_cameraTest); v41 = a1->m_editorLayer->m_objectLayer->getPosition(a1->m_editorLayer->m_objectLayer); cocos2d::CCPoint::CCPoint(&v46, v41); cocos2d::CCPoint::operator+(&v47, &v46, &v45); a1->m_editorLayer->m_objectLayer->setPosition(a1->m_editorLayer->m_objectLayer, &v47); EditorUI::constrainGameLayerPosition(a1); cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_cameraTest, COERCE_FLOAT(&v44), v42, v43); EditorUI::updateSlider(a1); } else if ( fabsf(cocos2d::ccpDistance(&v44, &a1->m_swipeStart)) >= 20.0 ) { cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_cameraTest, COERCE_FLOAT(&v44), v39, v40); a1->m_isDraggingCamera = 1; goto LABEL_41; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source