//
// cocos2d::extension::CCControlSwitch::ccTouchBegan from 0x18000cb30 to 0x18000cc25 (245 bytes)
//
// 3 xrefs:
// > ??> @ 0x180028c68
// > ??> @ 0x180032408
// > ??> @ 0x18004bca8
//
// 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 12:15:38 +0000
//
char __fastcall cocos2d::extension::CCControlSwitch::ccTouchBegan(
cocos2d::extension::CCControlSwitch *this,
struct cocos2d::CCTouch *a2,
struct cocos2d::CCEvent *a3)
{
char *v3; // rbx
__int64 v6; // rax
__int64 v7; // rax
float v9; // [rsp+30h] [rbp+8h] BYREF
char v10; // [rsp+48h] [rbp+20h] BYREF
v3 = (char *)this - 320;
if ( !(*(unsigned __int8 (__fastcall **)(char *, struct cocos2d::CCTouch *, struct cocos2d::CCEvent *))(*((_QWORD *)this - 40) + 1120LL))(
(char *)this - 320,
a2,
a3)
|| !(*(unsigned __int8 (__fastcall **)(char *))(*(_QWORD *)v3 + 1040LL))(v3)
|| !(*(unsigned __int8 (__fastcall **)(char *))(*(_QWORD *)v3 + 344LL))(v3) )
{
return 0;
}
*((_BYTE *)this + 164) = 0;
cocos2d::CCTouch::getLocation(a2);
v6 = cocos2d::CCNode::convertToNodeSpace(v3, &v10, &v9);
cocos2d::CCPoint::operator=(&v9, v6);
v7 = *((_QWORD *)this + 19);
*((float *)this + 40) = v9 - *(float *)(v7 + 608);
(**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(v7 + 656) + 320LL))(
*(_QWORD *)(v7 + 656) + 320LL,
&unk_180025A2C);
sub_18000C1C0(*((_QWORD *)this + 19));
return 1;
}