//
// LevelPage::ccTouchBegan from 0x40abf8 to 0x40acb2 (186 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'LevelPage::ccTouchBegan @ 0x40acc8
//
// 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; // r5
GameObject *m_coinObject; // r0
int v6; // r2
bool v7; // r3
const cocos2d::CCPoint *v8; // r0
GameManager *v9; // r0
GameStatsManager *v10; // r0
GameStatsManager *v11; // r0
cocos2d::CCPoint v13; // [sp+4h] [bp-18h] BYREF
cocos2d::CCPoint v14; // [sp+Ch] [bp-10h] BYREF
m_level = a1->m_level;
if ( !m_level )
goto LABEL_4;
m_coinObject = a1->m_coinObject;
if ( m_coinObject )
{
if ( m_level->m_levelID.random - m_level->m_levelID.seed != -1 )
{
LABEL_4:
LOBYTE(m_coinObject) = 0;
return (char)m_coinObject;
}
cocos2d::CCTouch::getLocation(&v13, a2);
cocos2d::CCNode::convertToNodeSpace(&v14, a1, &v13);
cocos2d::CCPoint::operator=((PlayerObject *)&v13, COERCE_FLOAT(&v14), v6, v7);
v8 = a1->m_coinObject->getPosition(a1->m_coinObject);
if ( cocos2d::ccpDistance(v8, &v13) <= 30.0 )
{
a1->setTouchEnabled(a1, 0);
LevelPage::playCoinEffect(a1);
v9 = GameManager::sharedState();
GameManager::reportAchievementWithID(v9, "geometry.ach.secret04", 100, 0);
v10 = GameStatsManager::sharedState();
GameStatsManager::storeSecretCoin(v10, "secret04");
v11 = GameStatsManager::sharedState();
GameStatsManager::incrementStat(v11, (const char *)&aO1i2r3e45s7t89[12]);
}
LOBYTE(m_coinObject) = 1;
}
return (char)m_coinObject;
}