//
// DpadMenu::arrowForTouch from 0x6f5544 to 0x6f5654 (272 bytes)
//
// 2 xrefs:
// > DpadMenu::ccTouchMoved @ 0x6f5660
// > DpadMenu::ccTouchBegan @ 0x6f5740
//
// 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::arrowForTouch(DpadMenu *this, cocos2d::CCTouch *a2)
{
float v3; // s15
float v4; // s14
float v5; // s15
float v6; // s13
float v7; // s10
int v8; // r3
int v9; // r4
float v11; // [sp+4h] [bp-8h] BYREF
float v12; // [sp+8h] [bp-4h]
int v13; // [sp+Ch] [bp+0h] BYREF
_BYTE v14[8]; // [sp+14h] [bp+8h] BYREF
cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)&v13);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v14, this);
cocos2d::CCPoint::operator-(&v11, v14, (char *)this + 368);
v3 = fabsf(v11);
if ( (v3 >= *((float *)this + 96) || fabsf(v12) >= *((float *)this + 97))
&& (v4 = v3 / *((float *)this + 94), v5 = fabsf(v12) / *((float *)this + 95), v4 <= 1.0)
&& v5 <= 1.0
&& (v4 >= v5 ? (v6 = v4 * 0.85) : (v6 = v5 * 0.85),
v4 > v5 ? (v7 = v5) : (v7 = v4),
v7 <= v6
&& (v4 <= v5 ? (v12 <= 0.0 ? (v8 = 3) : (v8 = 2)) : (v8 = v11 >= 0.0),
(v9 = *((_DWORD *)this + v8 + 88)) != 0
&& (*(int (__fastcall **)(int))(*(_DWORD *)v9 + 176))(v9)
&& (*(int (__fastcall **)(int))(*(_DWORD *)v9 + 524))(v9))) )
{
return v9;
}
else
{
return 0;
}
}