//
// EditorUI::clickOnPosition from 0x48c720 to 0x48c824 (260 bytes)
//
// 3 xrefs:
// > EditorUI::startFreeMoveTouch @ 0x6eff40
// > EditorUI::swipeToPosition @ 0x6f0074
// > EditorUI::ccTouchEnded @ 0x6f0e16
//
// 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:49:31 +0000
//
int __fastcall EditorUI::clickOnPosition(int result, float a2, float a3, float a4)
{
int v4; // r4
const cocos2d::CCPoint *v5; // r7
int v6; // r3
int v7; // r8
const cocos2d::CCPoint *v8; // r0
GameObject *v9; // r5
int v10; // r3
int v11; // r8
const cocos2d::CCPoint *v12; // r0
EditorSFXManager *v13; // r0
EditorSFXManager *v14; // r0
float v15[3]; // [sp+4h] [bp-Ch] BYREF
v15[0] = a2;
v15[1] = a3;
v15[2] = a4;
v4 = result;
if ( *(float *)(LODWORD(a2) + 4) >= *(float *)(result + 632) )
{
v5 = (const cocos2d::CCPoint *)(result + 988);
cocos2d::CCNode::convertToNodeSpace(
(cocos2d::CCNode *)v15,
*(const cocos2d::CCPoint **)(*(_DWORD *)(result + 944) + 2436));
cocos2d::CCPoint::operator=(v5, v15);
v6 = *(_DWORD *)(v4 + 940);
switch ( v6 )
{
case 1:
EditorUI::onDelete((EditorUI *)v4, nullptr);
break;
case 2:
if ( !EditorUI::onCreate((EditorUI *)v4) && !*(_BYTE *)(v4 + 636) )
{
v11 = *(_DWORD *)(v4 + 944);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, v5);
v12 = LevelEditorLayer::objectAtPosition(v11, v15);
if ( v12 )
{
*(_DWORD *)(v4 + 892) = *((_DWORD *)v12 + 223);
EditorUI::updateCreateMenu((EditorUI *)v4, 1);
}
}
break;
case 3:
v7 = *(_DWORD *)(v4 + 944);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, v5);
v8 = LevelEditorLayer::objectAtPosition(v7, v15);
v9 = v8;
if ( v8 )
{
v10 = *(_DWORD *)(v4 + 996);
if ( !v10 || *(_DWORD *)(v10 + 780) != *((_DWORD *)v8 + 195) )
{
EditorUI::createUndoSelectObject((cocos2d::CCArray ***)v4, 0);
v13 = (EditorSFXManager *)EditorUI::selectObject((EditorUI *)v4, v9, 0);
v14 = (EditorSFXManager *)EditorSFXManager::sharedState(v13);
EditorSFXManager::playAction(v14, 121);
}
}
EditorUI::updateEditMenu((EditorUI *)v4);
EditorUI::updateSpecialUIElements((cocos2d::CCArray **)v4);
break;
}
return EditorUI::updateButtons((cocos2d::CCArray **)v4);
}
return result;
}