//
// DpadMenu::ccTouchBegan from 0x6f569c to 0x6f5776 (218 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'DpadMenu::ccTouchBegan @ 0x6f5788
//
// 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:57:38 +0000
//
int __fastcall DpadMenu::ccTouchBegan(_DWORD *a1, cocos2d::CCTouch *a2)
{
int v4; // r6
int i; // r5
const void *j; // r0
const void *v7; // r5
void *v8; // r0
int v9; // r0
_BYTE v11[8]; // [sp+4h] [bp-10h] BYREF
if ( a1[83] )
return 0;
if ( !*((_BYTE *)a1 + 238) )
return 0;
v4 = (*(int (__fastcall **)(_DWORD *))(*a1 + 632))(a1);
if ( !v4 )
return 0;
for ( i = a1[49]; i; i = (*(int (__fastcall **)(int))(*(_DWORD *)i + 256))(i) )
{
if ( !(*(int (__fastcall **)(int))(*(_DWORD *)i + 176))(i) )
return 0;
}
cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)v11);
for ( j = (const void *)(*(int (__fastcall **)(_DWORD *))(*a1 + 256))(a1);
;
j = (const void *)(*(int (__fastcall **)(const void *))(*(_DWORD *)v7 + 256))(v7) )
{
v7 = j;
if ( !j )
break;
v8 = _dynamic_cast(
j,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTouchClipper,
-2);
if ( v8 && !(*(int (__fastcall **)(void *, _BYTE *))(*(_DWORD *)v8 + 8))(v8, v11) )
{
if ( v4 )
return 0;
break;
}
}
v9 = DpadMenu::arrowForTouch((DpadMenu *)a1, a2);
a1[84] = v9;
if ( !v9 )
return 0;
a1[83] = 1;
(*(void (__fastcall **)(int))(*(_DWORD *)v9 + 508))(v9);
CCMenuExtra::repeatSelectionChanged((CCMenuExtra *)a1);
return v4;
}