//
// GameStatsManager::countUnlockedSecretChests from 0x10008c490 to 0x10008c4e0 (80 bytes)
//
// 4 xrefs:
// > SecretRewardsLayer::init @ 0x100631146
// > SecretRewardsLayer::updateUnlockedLabel @ 0x10063226e
// > SecretRewardsLayer::updateUnlockedLabel @ 0x1006322d1
// > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x10063278f
//
// 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 __fastcall GameStatsManager::countUnlockedSecretChests(GameStatsManager *a1, GJRewardType a2)
{
cocos2d::CCDictionary *m_treasureRoomChests; // rdi
int result; // eax
cocos2d::CCDictElement *m_pElements; // rcx
cocos2d::CCObject *m_pObject; // rdx
m_treasureRoomChests = a1->m_treasureRoomChests;
if ( !a2 )
return cocos2d::CCDictionary::count(m_treasureRoomChests);
result = 0;
if ( m_treasureRoomChests )
{
m_pElements = m_treasureRoomChests->m_pElements;
if ( m_pElements )
{
result = 0;
do
{
m_pObject = m_pElements->m_pObject;
m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;
result += m_pObject[1].m_uID == a2;
}
while ( m_pElements );
}
}
return result;
}