TROPUSR: add GetUnlockedTrophiesCount()

This commit is contained in:
Megamouse 2018-04-18 19:37:07 +02:00 committed by Ivan
parent 67391322f4
commit 4e5cceb03e
2 changed files with 14 additions and 0 deletions

View file

@ -202,6 +202,19 @@ u32 TROPUSRLoader::GetTrophiesCount()
return (u32)m_table6.size();
}
u32 TROPUSRLoader::GetUnlockedTrophiesCount()
{
u32 count = 0;
for (const auto& trophy : m_table6)
{
if (trophy.trophy_state)
{
count++;
}
}
return count;
}
u32 TROPUSRLoader::GetTrophyUnlockState(u32 id)
{
if (id >= m_table6.size())

View file

@ -73,6 +73,7 @@ public:
virtual bool Save(const std::string& filepath);
virtual u32 GetTrophiesCount();
virtual u32 GetUnlockedTrophiesCount();
virtual u32 GetTrophyUnlockState(u32 id);
virtual u64 GetTrophyTimestamp(u32 id);