//
// LevelPage::ccTouchBegan from 0x100437640 to 0x100437734 (244 bytes)
//
// 2 xrefs:
// > sub_100437740 @ 0x10043774c
// > ??> @ 0x100937018
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall LevelPage::ccTouchBegan(LevelPage *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
GJGameLevel *m_level; // rax
double v5; // xmm0_8
const cocos2d::CCPoint *v6; // rax
GameManager *v7; // rax
GameStatsManager *v8; // rax
GameStatsManager *v9; // rax
cocos2d::CCPoint v10; // [rsp-30h] [rbp-30h] BYREF
double v11[5]; // [rsp-28h] [rbp-28h] BYREF
m_level = a1->m_level;
if ( !m_level || !a1->m_coinObject || m_level->m_levelID.random - m_level->m_levelID.seed != -1 )
return 0;
cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)&v10);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v11, (const cocos2d::CCPoint *)a1);
v5 = sub_10028CC90(&v10, v11);
v6 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(GameObject *, double))a1->m_coinObject->getPosition)(
a1->m_coinObject,
v5);
if ( cocos2d::ccpDistance(v6, &v10) <= 30.0 )
{
((void (__fastcall *)(LevelPage *, _QWORD))a1->setTouchEnabled)(a1, 0);
LevelPage::playCoinEffect(a1);
v7 = GameManager::sharedState();
GameManager::reportAchievementWithID(v7, "geometry.ach.secret04", 100, 0);
v8 = GameStatsManager::sharedState();
GameStatsManager::storeSecretCoin(v8, "secret04");
v9 = GameStatsManager::sharedState();
GameStatsManager::incrementStat_1(v9, "8");
}
return 1;
}