//
// ControlMenuTouch::began from 0x1401a2090 to 0x1401a2135 (165 bytes)
//
// 4 xrefs:
// > GJRotationControl::ccTouchBegan @ 0x1401a2a86
// > GJScaleControl::ccTouchBegan @ 0x1401a3cb6
// > GJTransformControl::ccTouchBegan @ 0x1401a6f4b
// > ??> @ 0x1409198d4
//
// 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:48 +0000
//
char __fastcall ControlMenuTouch::began(__int64 *a1, __int64 a2, __int64 a3)
{
__int64 v4; // rbx
__int64 v6; // rcx
v4 = 0;
a1[3] = 0;
v6 = *a1;
if ( !((a1[1] - v6) >> 3) )
return 0;
while ( !(*(unsigned __int8 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)(*(_QWORD *)(8 * v4 + v6) + 320LL)
+ 8LL))(
*(_QWORD *)(8 * v4 + v6) + 320LL,
a2,
a3) )
{
v6 = *a1;
if ( ++v4 >= (unsigned __int64)((a1[1] - *a1) >> 3) )
return 0;
}
a1[3] = *(_QWORD *)(8 * v4 + *a1);
return 1;
}