//
// EditorUI::ccTouchMoved from 0x6f04e0 to 0x6f09a0 (1216 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'EditorUI::ccTouchMoved @ 0x6f09b4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:57:35 +0000
//
GameManager *__fastcall EditorUI::ccTouchMoved(int a1, int a2)
{
int v4; // r5
int v5; // r0
int (*v6)(void); // r3
GameManager *result; // r0
int v8; // r3
int v9; // r0
int v10; // r9
const cocos2d::CCPoint *v11; // r2
float v12; // r0
float v13; // s16
const cocos2d::CCPoint *v14; // r2
int GameVariable; // r0
GameManager *v16; // r0
EditorSFXManager *v17; // r0
unsigned int v18; // r9
int v19; // r0
int v20; // r11
int v21; // r9
int v22; // r6
void (__fastcall *v23)(int, _BYTE *); // r9
int v24; // r0
int v25; // r6
void (__fastcall *v26)(int, _BYTE *); // r9
int v27; // r0
const cocos2d::CCPoint *v28; // r2
const cocos2d::CCPoint *v29; // r0
int v30; // r0
int (__fastcall *v31)(int, _BYTE *); // r3
int v32; // [sp+0h] [bp-3Ch]
void (__fastcall *v33)(int, _BYTE *); // [sp+4h] [bp-38h]
_BYTE v34[8]; // [sp+Ch] [bp-30h] BYREF
_BYTE v35[8]; // [sp+14h] [bp-28h] BYREF
_BYTE v36[8]; // [sp+1Ch] [bp-20h] BYREF
_BYTE v37[8]; // [sp+24h] [bp-18h] BYREF
_BYTE v38[8]; // [sp+2Ch] [bp-10h] BYREF
v4 = *(_DWORD *)(a2 + 52);
if ( *(_DWORD *)(a1 + 516) == v4 )
{
cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 123);
v5 = *(_DWORD *)(a1 + 576);
LABEL_5:
v6 = *(int (**)(void))(*(_DWORD *)v5 + 452);
return (GameManager *)v6();
}
if ( *(_DWORD *)(a1 + 520) == v4 )
{
cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 123);
v5 = *(_DWORD *)(a1 + 592);
goto LABEL_5;
}
if ( *(_DWORD *)(a1 + 532) == v4 )
{
cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 123);
v5 = *(_DWORD *)(a1 + 596);
goto LABEL_5;
}
result = *(GameManager **)(a1 + 944);
if ( *((_DWORD *)result + 357) == 1 )
{
v6 = *(int (**)(void))(**((_DWORD **)result + 2810) + 452);
return (GameManager *)v6();
}
if ( *(_BYTE *)(a1 + 568) )
{
cocos2d::CCPoint::operator+(v38, a1 + 540, a1 + 548);
cocos2d::CCPoint::operator/(v34, v38, 0x40000000);
EditorUI::getTouchPoint((cocos2d::CCTouch *)v35, (const cocos2d::CCPoint *)a1);
v8 = *(_DWORD *)(a2 + 52);
if ( v8 == *(_DWORD *)(a1 + 524) )
{
v9 = a1 + 540;
}
else
{
if ( v8 != *(_DWORD *)(a1 + 536) )
goto LABEL_17;
v9 = a1 + 548;
}
cocos2d::CCPoint::operator=(v9, v35);
LABEL_17:
cocos2d::CCPoint::operator+(v38, a1 + 540, a1 + 548);
cocos2d::CCPoint::operator/(v36, v38, 0x40000000);
v10 = *(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436);
v33 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 92);
v32 = (*(int (__fastcall **)(int))(*(_DWORD *)v10 + 96))(v10);
cocos2d::CCPoint::operator-(v37, v36, v34);
cocos2d::CCPoint::operator+(v38, v32, v37);
v33(v10, v38);
v12 = COERCE_FLOAT(cocos2d::ccpDistance((cocos2d *)(a1 + 540), (const cocos2d::CCPoint *)(a1 + 548), v11));
if ( !*(_BYTE *)(a1 + 569) && v12 > 1.0 && fabsf(v12 - *(float *)(a1 + 556)) >= *(float *)(a1 + 560) )
{
*(float *)(a1 + 556) = v12;
*(_BYTE *)(a1 + 569) = 1;
}
if ( *(_BYTE *)(a1 + 569) )
{
v13 = (float)(v12 / *(float *)(a1 + 556)) * *(float *)(a1 + 564);
if ( v13 > 10.0 )
{
v13 = 10.0;
}
else
{
if ( v13 < 0.1 )
{
v13 = 0.1;
LABEL_32:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, (const cocos2d::CCPoint *)v36);
return EditorUI::updateZoom(a1, v13, (int)v38);
}
if ( v13 > 10.0 )
v13 = 10.0;
}
if ( fabsf(v13 - 1.0) <= 0.02 )
v13 = 1.0;
goto LABEL_32;
}
EditorUI::constrainGameLayerPosition((EditorUI *)a1);
return (GameManager *)EditorUI::updateSlider((EditorUI *)a1);
}
if ( *(_DWORD *)(a1 + 524) == v4 )
{
EditorUI::getTouchPoint((cocos2d::CCTouch *)v35, (const cocos2d::CCPoint *)a1);
result = (GameManager *)cocos2d::CCPoint::operator=(a1 + 540, v35);
if ( !*(_BYTE *)(a1 + 570) )
{
if ( *(_BYTE *)(a1 + 641) )
{
if ( !*(_BYTE *)(a1 + 1005)
&& fabsf(COERCE_FLOAT(cocos2d::ccpDistance((cocos2d *)v35, (const cocos2d::CCPoint *)(a1 + 948), v14))) >= 4.0 )
{
*(_BYTE *)(a1 + 1005) = 1;
}
if ( !*(_BYTE *)(a1 + 1005) )
return (GameManager *)cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 123);
cocos2d::CCNode::convertToNodeSpace(
(cocos2d::CCNode *)v38,
*(const cocos2d::CCPoint **)(*(_DWORD *)(a1 + 944) + 2436));
cocos2d::CCPoint::operator=(v35, v38);
GameVariable = cocos2d::CCPoint::equals((cocos2d::CCPoint *)v35, (const cocos2d::CCPoint *)(a1 + 980));
if ( GameVariable )
return (GameManager *)cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 123);
if ( !*(_BYTE *)(a1 + 639) )
{
if ( *(_DWORD *)(a1 + 1000) )
{
v16 = (GameManager *)GameManager::sharedState(nullptr);
GameVariable = GameManager::getGameVariable(v16, "0008");
if ( GameVariable )
{
GameVariable = EditorUI::shouldSnap((EditorUI *)a1, *(GameObject **)(a1 + 1000));
if ( GameVariable )
{
v30 = *(_DWORD *)(a1 + 1000);
v31 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v30 + 748);
v38[0] = -1;
v38[1] = -101;
v38[2] = 50;
GameVariable = v31(v30, v38);
}
}
}
}
if ( !*(_BYTE *)(a1 + 639) )
{
v17 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)GameVariable);
EditorSFXManager::playAction(v17, 104);
}
*(_BYTE *)(a1 + 639) = 1;
cocos2d::CCPoint::operator-(v37, v35, a1 + 980);
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 668)) )
{
v18 = 0;
while ( v18 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 668)) )
{
v19 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 668), v18++);
v20 = v19;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, (const cocos2d::CCPoint *)v37);
EditorUI::moveObject(a1, v20, v38);
}
}
else
{
v21 = *(_DWORD *)(a1 + 996);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, (const cocos2d::CCPoint *)v37);
EditorUI::moveObject(a1, v21, v38);
}
cocos2d::CCPoint::operator=(a1 + 980, v35);
cocos2d::CCPoint::operator+(v38, a1 + 580, v37);
cocos2d::CCPoint::operator=(a1 + 580, v38);
if ( (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 576) + 176))(*(_DWORD *)(a1 + 576)) )
{
v22 = *(_DWORD *)(a1 + 576);
}
else
{
if ( !(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 592) + 176))(*(_DWORD *)(a1 + 592)) )
{
if ( (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 596) + 176))(*(_DWORD *)(a1 + 596)) )
{
v25 = *(_DWORD *)(a1 + 596);
v26 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v25 + 92);
v27 = (*(int (__fastcall **)(int))(*(_DWORD *)v25 + 96))(v25);
cocos2d::CCPoint::operator+(v38, v27, v37);
v26(v25, v38);
GJTransformControl::refreshControl(*(GJTransformControl **)(a1 + 596));
}
return (GameManager *)cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 123);
}
v22 = *(_DWORD *)(a1 + 592);
}
v23 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v22 + 92);
v24 = (*(int (__fastcall **)(int))(*(_DWORD *)v22 + 96))(v22);
cocos2d::CCPoint::operator+(v38, v24, v37);
v23(v22, v38);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, (const cocos2d::CCPoint *)v35);
result = (GameManager *)EditorUI::swipeToPosition(a1, (const cocos2d::CCPoint *)v38);
if ( result )
return result;
if ( *(_BYTE *)(a1 + 1004) )
{
cocos2d::CCPoint::operator-(v36, v35, a1 + 980);
v29 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436)
+ 96))(*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, v29);
cocos2d::CCPoint::operator+(v38, v37, v36);
(*(void (__fastcall **)(_DWORD, _BYTE *))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436) + 92))(
*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436),
v38);
EditorUI::constrainGameLayerPosition((EditorUI *)a1);
cocos2d::CCPoint::operator=(a1 + 980, v35);
return (GameManager *)EditorUI::updateSlider((EditorUI *)a1);
}
result = (GameManager *)cocos2d::ccpDistance((cocos2d *)v35, (const cocos2d::CCPoint *)(a1 + 948), v28);
if ( fabsf(*(float *)&result) < 20.0 )
return result;
cocos2d::CCPoint::operator=(a1 + 980, v35);
*(_BYTE *)(a1 + 1004) = 1;
}
return (GameManager *)cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 123);
}
}
return result;
}