//
// MenuGameLayer::ccTouchBegan from 0x492e34 to 0x492f06 (210 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'MenuGameLayer::ccTouchBegan @ 0x492f1c
//
// 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:49:38 +0000
//
int __fastcall MenuGameLayer::ccTouchBegan(PlayerObject **a1)
{
cocos2d *v2; // r0
const cocos2d::CCPoint *v3; // r2
PlayerObject *v4; // r2
int v6; // r4
int v7; // r3
GameManager *v8; // r0
const char *v9; // r1
float v10[2]; // [sp+4h] [bp-8h] BYREF
_BYTE v11[8]; // [sp+Ch] [bp+0h] BYREF
cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)v10);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v11, (const cocos2d::CCPoint *)a1);
cocos2d::CCPoint::operator=(v10, v11);
if ( v10[0] > 50.0 )
{
v2 = (cocos2d *)(*(int (__fastcall **)(PlayerObject *))(*(_DWORD *)a1[85] + 96))(a1[85]);
if ( COERCE_FLOAT(cocos2d::ccpDistance(v2, (const cocos2d::CCPoint *)v10, v3)) <= 30.0 )
{
if ( PlayerObject::isFlying(a1[85]) )
goto LABEL_5;
v4 = a1[85];
if ( *((_BYTE *)v4 + 1955) )
goto LABEL_5;
v6 = *((unsigned __int8 *)v4 + 1957);
if ( *((_BYTE *)v4 + 1957) || *((float *)v4 + 502) != 1.0 )
goto LABEL_5;
v7 = *((_DWORD *)v4 + 330);
if ( v7 == 55 )
{
v8 = (GameManager *)GameManager::sharedState(nullptr);
v9 = "geometry.ach.secret11";
}
else
{
if ( v7 != 50 )
{
LABEL_5:
MenuGameLayer::destroyPlayer((MenuGameLayer *)a1);
return 1;
}
v8 = (GameManager *)GameManager::sharedState(nullptr);
v9 = "geometry.ach.secret12";
}
GameManager::reportAchievementWithID(v8, v9, (const char *)&dword_64, v6);
goto LABEL_5;
}
}
return 1;
}