//
// KeybindingsLayer::ccTouchBegan from 0x1403d8630 to 0x1403d875a (298 bytes)
//
// 3 xrefs:
// > ??> @ 0x140786120
// > ??> @ 0x140793d58
// > ??> @ 0x140924adc
//
// 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:31:38 +0000
//
char __fastcall KeybindingsLayer::ccTouchBegan(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v6; // rcx
__int64 v7; // rcx
char result; // al
_BYTE v9[8]; // [rsp+30h] [rbp-28h] BYREF
_BYTE v10[32]; // [rsp+38h] [rbp-20h] BYREF
float v11; // [rsp+60h] [rbp+8h] BYREF
float v12; // [rsp+64h] [rbp+Ch]
float v13; // [rsp+78h] [rbp+20h] BYREF
float v14; // [rsp+7Ch] [rbp+24h]
if ( *(_QWORD *)(a1 + 800) )
{
cocos2d::CCTouch::getLocation(a2, v9);
cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 800), &v13, &unk_14090AE50);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v11, (const struct cocos2d::CCSize *)(*(_QWORD *)(a1 + 800) + 424LL));
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v10, v13, v14, v11, v12);
if ( cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v10, (const struct cocos2d::CCPoint *)v9) )
{
v6 = *(_QWORD *)(a1 + 800);
if ( v6 )
ScrollableContentLayer::handleTouchBegan(v6, a2);
v7 = *(_QWORD *)(a1 + 808);
if ( v7 )
{
if ( (*(unsigned __int8 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)(v7 + 320) + 8LL))(
v7 + 320,
a2,
a3) )
{
FLAlertLayer::ccTouchBegan(a1, a2, a3);
*(_BYTE *)(a1 + 816) = 1;
return 1;
}
}
}
}
result = FLAlertLayer::ccTouchBegan(a1, a2, a3);
*(_BYTE *)(a1 + 816) = 0;
if ( result )
return 1;
return result;
}