// // GameStatsManager::getAwardedDiamondsForLevel from 0x40d378 to 0x40d45e (230 bytes) // // 2 xrefs: // > LevelCell::loadCustomLevelCell @ 0x33292e // > LevelInfoLayer::setupLevelInfo @ 0x3b39fe // // 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 // int GameStatsManager::getAwardedDiamondsForLevel(GameStatsManager *a1, GJGameLevel *a2) { cocos2d::CCDictionary *m_timelyDiamondScores; // r8 cocos2d::CCString *v5; // r0 int v6; // s16 int BaseDiamonds; // r0 int v9; // [sp+4h] [bp-18h] char *v10; // [sp+Ch] [bp-10h] BYREF std::string v11; // [sp+10h] [bp-Ch] BYREF if ( a2->m_dailyID.random - a2->m_dailyID.seed <= 0 && !a2->m_gauntletLevel ) return a2->m_gauntletLevel; GameStatsManager::getCurrencyKey((GameStatsManager *)&v10, (GJGameLevel *)a1, a2); m_timelyDiamondScores = a1->m_timelyDiamondScores; if ( a2->m_dailyID.random - a2->m_dailyID.seed <= 0 ) m_timelyDiamondScores = a1->m_gauntletDiamondScores; sub_776584((int)&v11, v10); v5 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(m_timelyDiamondScores, &v11); v6 = cocos2d::CCString::intValue(v5); sub_774008(&v11); BaseDiamonds = GameStatsManager::getBaseDiamonds(a1, a2->m_stars.random - a2->m_stars.seed); v9 = (int)floorf((float)BaseDiamonds * (float)((float)v6 / 100.0)); sub_774008(&v10); return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source