//
// MenuGameLayer::ccTouchBegan from 0x7dad68 to 0x7daea8 (320 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'MenuGameLayer::ccTouchBegan @ 0x7daeb0
// > ??> @ 0x5e270
// > ??> @ 0x1439680
//
// 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 12:54:23 +0000
//
__int64 __fastcall MenuGameLayer::ccTouchBegan(PlayerObject **a1, cocos2d::CCTouch *this)
{
cocos2d *v4; // x0
const cocos2d::CCPoint *v5; // x2
float v6; // s0
PlayerObject *v7; // x0
GameManager *v8; // x0
GameManager *v9; // x0
GameManager *v10; // x0
__int64 v11; // [xsp+38h] [xbp+38h] BYREF
__int64 v12; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCTouch::getLocation(&v11, this);
cocos2d::CCNode::convertToNodeSpace(&v12, (cocos2d::CCNode *)a1, (const cocos2d::CCPoint *)&v11);
cocos2d::CCPoint::operator=(&v11, &v12);
if ( *(float *)&v11 > 50.0 )
{
v4 = (cocos2d *)(*(__int64 (__fastcall **)(PlayerObject *, float, float))(*(_QWORD *)a1[54] + 192LL))(
a1[54],
50.0,
*(float *)&v11);
cocos2d::ccpDistance(v4, (const cocos2d::CCPoint *)&v11, v5);
if ( v6 <= 30.0 )
{
if ( !(unsigned __int8)PlayerObject::isFlying(a1[54]) )
{
v7 = a1[54];
if ( !*((_BYTE *)v7 + 2419) && !*((_BYTE *)v7 + 2421) && *((float *)v7 + 618) == 1.0 )
{
v8 = (GameManager *)*((unsigned int *)v7 + 390);
if ( (_DWORD)v8 == 55 )
{
v10 = (GameManager *)GameManager::sharedState(v8);
GameManager::reportAchievementWithID(v10, "geometry.ach.secret11", 100, 0);
}
else if ( (_DWORD)v8 == 50 )
{
v9 = (GameManager *)GameManager::sharedState(v8);
GameManager::reportAchievementWithID(v9, "geometry.ach.secret12", 100, 0);
}
}
}
MenuGameLayer::destroyPlayer((MenuGameLayer *)a1);
}
}
return 1;
}