// // GJBaseGameLayer::hasUniqueCoin from 0x1001e9558 to 0x1001e9654 (252 bytes) // // 4 xrefs: // > GJBaseGameLayer::collisionCheckObjects @ 0x1001e835c // > GJBaseGameLayer::collisionCheckObjects @ 0x1001e84f8 // > EnhancedGameObject::updateUserCoin @ 0x10025f52c // > GameObject::playDestroyObjectAnim @ 0x100349c6c // // 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 GJBaseGameLayer::hasUniqueCoin(GJBaseGameLayer *a1, EffectGameObject *a2) { GJGameLevel *m_level; // x0 int m_secretCoinID; // w8 GJGameLevel *v6; // x8 int random; // w9 int seed; // w8 const char *CoinKey; // x20 GJLevelType m_levelType; // w19 GameStatsManager *v11; // x0 GameStatsManager *v13; // x0 GJGameLevel *v14; // x8 GJGameLevel *v15; // x8 m_level = a1->m_level; if ( m_level->m_levelType == Editor ) { if ( ((unsigned int (__fastcall *)(EffectGameObject *))a2->getType)(a2) == 31 ) { m_secretCoinID = a2->m_secretCoinID; switch ( m_secretCoinID ) { case 3: v15 = a1->m_level; random = v15->m_thirdCoinVerified.random; seed = v15->m_thirdCoinVerified.seed; return random - seed == 1; case 2: v14 = a1->m_level; random = v14->m_secondCoinVerified.random; seed = v14->m_secondCoinVerified.seed; return random - seed == 1; case 1: v6 = a1->m_level; random = v6->m_firstCoinVerified.random; seed = v6->m_firstCoinVerified.seed; return random - seed == 1; } } return 0; } CoinKey = GJGameLevel::getCoinKey(m_level, a2->m_secretCoinID); m_levelType = a1->m_level->m_levelType; v11 = GameStatsManager::sharedState(); if ( m_levelType == Main ) return GameStatsManager::hasSecretCoin(v11, CoinKey); if ( GameStatsManager::hasUserCoin(v11, CoinKey) ) return 1; v13 = GameStatsManager::sharedState(); return GameStatsManager::hasPendingUserCoin(v13, CoinKey); }
GD Web Decomp Icon

GD Web Decomp

Raw Source