//
// EditorUI::clickOnPosition from 0x1401ada10 to 0x1401adb90 (384 bytes)
//
// 8 xrefs:
// > EditorUI::startFreeMoveTouch @ 0x1401bfbf8
// > EditorUI::startFreeMoveTouch @ 0x1401bfcb4
// > EditorUI::swipeToPosition @ 0x1401bfe55
// > EditorUI::ccTouchEnded @ 0x1401c18ae
// > ??> @ 0x1408a110c
// > ??> @ 0x1408a1124
// > ??> @ 0x1408a1134
// > ??> @ 0x140919d3c
//
// This function is hookable on this platform (idp: pc, 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:27:54 +0000
//
void __fastcall EditorUI::clickOnPosition(__int64 a1, __int64 a2)
{
__int64 v3; // rax
int v4; // eax
__int64 v5; // rbx
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rdx
__int64 v9; // rbx
__int64 v10; // rax
__int64 v11; // rax
__int64 v12; // rbx
__int64 v13; // rdx
__int64 v14; // rax
char v15; // [rsp+30h] [rbp+8h] BYREF
if ( *(float *)(a1 + 904) <= *(float *)(a2 + 4) )
{
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL), &v15, a2);
cocos2d::CCPoint::operator=(a1 + 1560, v3);
v4 = *(_DWORD *)(a1 + 1508);
if ( v4 == 1 )
{
EditorUI::onDelete(a1);
EditorUI::updateButtons(a1);
}
else
{
if ( v4 == 2 )
{
if ( !(unsigned __int8)EditorUI::onCreate(a1) && !*(_BYTE *)(a1 + 908) )
{
v5 = *(_QWORD *)(a1 + 1512);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)(a1 + 1560));
v7 = LevelEditorLayer::objectAtPosition(v5, v6);
if ( v7 )
{
LOBYTE(v8) = 1;
*(_DWORD *)(a1 + 1392) = *(_DWORD *)(v7 + 1036);
EditorUI::updateCreateMenu(a1, v8);
}
}
}
else if ( v4 == 3 )
{
v9 = *(_QWORD *)(a1 + 1512);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)(a1 + 1560));
v11 = LevelEditorLayer::objectAtPosition(v9, v10);
v12 = v11;
if ( v11 )
{
v13 = *(_QWORD *)(a1 + 1568);
if ( !v13 || *(_DWORD *)(v13 + 924) != *(_DWORD *)(v11 + 924) )
{
EditorUI::createUndoSelectObject(a1, 0);
EditorUI::selectObject(a1, v12, 0);
v14 = EditorSFXManager::sharedState();
EditorSFXManager::playAction(v14, 121);
}
}
EditorUI::updateEditMenu(a1);
EditorUI::updateSpecialUIElements(a1);
}
EditorUI::updateButtons(a1);
}
}
}