//
// LevelPage::ccTouchBegan from 0x79ed30 to 0x79ee68 (312 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LevelPage::ccTouchBegan @ 0x79ee6c
// > ??> @ 0x69cd8
// > ??> @ 0x117af90
//
// 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 LevelPage::ccTouchBegan(LevelPage *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
GJGameLevel *m_level; // x2
bool result; // w0
const cocos2d::CCPoint *v6; // x0
GameManager *v7; // x0
GameStatsManager *v8; // x0
GameStatsManager *v9; // x0
cocos2d::CCPoint v10; // [xsp+38h] [xbp+38h] BYREF
cocos2d::CCPoint v11; // 0:kr08_8.8
m_level = a1->m_level;
if ( !m_level || !a1->m_coinObject )
return 0;
result = 0;
if ( m_level->m_levelID.random - m_level->m_levelID.seed == -1 )
{
cocos2d::CCTouch::getLocation(a2);
v11 = cocos2d::CCNode::convertToNodeSpace(a1, &v10);
cocos2d::CCPoint::operator=(&v10, v11.x, v11.y);
v6 = a1->m_coinObject->getPosition(a1->m_coinObject);
if ( cocos2d::ccpDistance(v6, &v10) <= 30.0 )
{
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(v9, "8");
}
return 1;
}
return result;
}