//
// EditorUI::clickOnPosition from 0x100473fe4 to 0x100474124 (320 bytes)
//
// 3 xrefs:
// > EditorUI::startFreeMoveTouch @ 0x100160ec4
// > EditorUI::swipeToPosition @ 0x100160fdc
// > EditorUI::ccTouchEnded @ 0x1001620dc
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:05:39 +0000
//
__int64 __fastcall EditorUI::clickOnPosition(__int64 result, __int64 a2)
{
double v2; // x29
double v3; // x30
__int64 v4; // x19
__n128 v5; // q0
int v6; // w8
__int64 v7; // x20
__int64 v8; // x0
__int64 v9; // x20
__int64 v10; // x0
unsigned int *v11; // x20
__int64 v12; // x8
__n128 v13; // q0
__int64 v14; // x0
__n128 v15; // q0
double v16[5]; // [xsp+8h] [xbp-28h] BYREF
if ( *(float *)(a2 + 4) >= *(float *)(result + 856) )
{
v16[3] = v2;
v16[4] = v3;
v4 = result;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(*(_QWORD *)(result + 1440) + 3920LL), a2, v16);
v5.n128_f64[0] = sub_10002630C((_QWORD *)(v4 + 1488), v16);
v6 = *(_DWORD *)(v4 + 1436);
switch ( v6 )
{
case 3:
v9 = *(_QWORD *)(v4 + 1440);
sub_1000262F4(v16, (double *)(v4 + 1488));
v10 = LevelEditorLayer::objectAtPosition(v9, (float *)v16);
if ( v10 )
{
v11 = (unsigned int *)v10;
v12 = *(_QWORD *)(v4 + 1496);
if ( !v12 || *(_DWORD *)(v12 + 916) != *(_DWORD *)(v10 + 916) )
{
EditorUI::createUndoSelectObject(v4, 0);
EditorUI::selectObject(v4, v11, 0);
v14 = EditorSFXManager::sharedState(v13);
EditorSFXManager::playAction_1(v14, 121);
}
}
EditorUI::updateEditMenu(v4);
EditorUI::updateSpecialUIElements(v4, v15);
break;
case 2:
if ( (EditorUI::onCreate(v4, v5.n128_f64[0]) & 1) == 0 && (*(_BYTE *)(v4 + 860) & 1) == 0 )
{
v7 = *(_QWORD *)(v4 + 1440);
sub_1000262F4(v16, (double *)(v4 + 1488));
v8 = LevelEditorLayer::objectAtPosition(v7, (float *)v16);
if ( v8 )
{
*(_DWORD *)(v4 + 1344) = *(_DWORD *)(v8 + 1028);
EditorUI::updateCreateMenu(v4, 1);
}
}
break;
case 1:
EditorUI::onDelete(v4, v5.n128_f64[0]);
break;
}
return EditorUI::updateButtons(v4, v5);
}
return result;
}