//
// cocos2d::CCLayer::setTouchMode from 0x180052d50 to 0x180052d95 (69 bytes)
//
// 8 xrefs:
// > ??> @ 0x1800f33e0
// > ??> @ 0x1800f38c0
// > ??> @ 0x1800f3e18
// > ??> @ 0x1800f43a0
// > ??> @ 0x1800f4998
// > ??> @ 0x1800fd4d0
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bc400
//
// 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:21:46 +0000
//
__int64 __fastcall cocos2d::CCLayer::setTouchMode(__int64 a1, int a2)
{
bool v3; // zf
__int64 v4; // rdx
__int64 result; // rax
if ( *(_DWORD *)(a1 + 396) != a2 )
{
v3 = *(_BYTE *)(a1 + 360) == 0;
*(_DWORD *)(a1 + 396) = a2;
if ( !v3 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 920LL))(a1, 0);
LOBYTE(v4) = 1;
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v4);
}
}
return result;
}