//
// MenuGameLayer::ccTouchBegan from 0x100442e08 to 0x100442f04 (252 bytes)
//
// 2 xrefs:
// > sub_100442F04 @ 0x100442f10
// > ??> @ 0x1009641d0
//
// This function is hookable on this platform (idp: arm, 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:05:13 +0000
//
__int64 __fastcall MenuGameLayer::ccTouchBegan(__int64 a1, float32x2_t *a2)
{
float32x2_t *v3; // x0
__int64 v4; // x8
int v5; // w8
char *v6; // x20
__int64 v7; // x0
__int64 v9; // [xsp+0h] [xbp-20h] BYREF
float32x2_t v10; // [xsp+8h] [xbp-18h] BYREF
cocos2d::CCTouch::getLocation(a2, (float *)&v10);
cocos2d::CCNode::convertToNodeSpace(a1, (__int64)&v10, &v9);
sub_10002630C(&v10, (double *)&v9);
if ( v10.f32[0] > 50.0 )
{
v3 = (float32x2_t *)(*(__int64 (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 432) + 192LL))(
*(_QWORD *)(a1 + 432),
v10.f32[0]);
if ( cocos2d::ccpDistance(v3, &v10) <= 30.0 )
{
if ( (PlayerObject::isFlying(*(_BYTE **)(a1 + 432)) & 1) != 0 )
goto LABEL_12;
v4 = *(_QWORD *)(a1 + 432);
if ( (*(_BYTE *)(v4 + 2419) & 1) != 0 || (*(_BYTE *)(v4 + 2421) & 1) != 0 || *(float *)(v4 + 2472) != 1.0 )
goto LABEL_12;
v5 = *(_DWORD *)(v4 + 1560);
if ( v5 == 55 )
{
v6 = "geometry.ach.secret11";
}
else
{
if ( v5 != 50 )
{
LABEL_12:
MenuGameLayer::destroyPlayer(a1);
return 1;
}
v6 = "geometry.ach.secret12";
}
v7 = GameManager::sharedState();
GameManager::reportAchievementWithID(v7, v6, 100, 0);
goto LABEL_12;
}
}
return 1;
}