22 #ifndef COMMON_ACHIEVEMENTS_H 23 #define COMMON_ACHIEVEMENTS_H 25 #include "common/array.h" 26 #include "common/formats/ini-file.h" 27 #include "common/hashmap.h" 28 #include "common/singleton.h" 29 #include "common/str.h" 93 #define ACHIEVEMENT_DESC_TABLE_END_MARKER \ 94 { nullptr, Common::UNK_ACHIEVEMENTS, nullptr } 113 bool unsetActiveDomain();
114 bool isReady()
const {
return _iniFile !=
nullptr; }
125 bool setAchievement(
const String &
id);
132 bool isAchieved(
const String &
id)
const;
139 bool clearAchievement(
const String &
id);
153 int getStatInt(
const String &
id)
const;
161 bool setStatInt(
const String &
id,
int value);
168 float getStatFloat(
const String &
id)
const;
176 bool setStatFloat(
const String &
id,
float value);
191 float getAverageRateStatFloat(
const String &
id)
const;
200 bool updateAverageRateStatFloat(
const String &
id,
float count,
float times);
208 bool resetAllAchievements();
209 bool resetAllStats();
225 bool setSpecialString(
const String &
id,
const String &value);
238 uint16 getAchievementCount()
const;
252 uint16 getStatCount()
const;
265 String getCurrentLang()
const;
266 bool loadAchievementsData(
const char *platform,
const char *appId);
268 float getStatFloatEx(
const String &
id,
const String §ion)
const;
269 bool setStatFloatEx(
const String &
id,
float value,
const String §ion)
const;
278 #define AchMan Common::AchievementsManager::instance() 284 #endif // #ifndef COMMON_ACHIEVEMENTS_MANAGER_H Common::String appId
Achievements application ID of the given platform.
Definition: achievements.h:76
bool isReady() const
Check whether the domain is ready.
Definition: achievements.h:114
Definition: achievements.h:64
String id
Achievement internal ID, such as "ACHIEVEMENT_TIMING".
Definition: achievements.h:65
String comment
Optional stat comment, such as "Items Thrown".
Definition: achievements.h:57
Definition: achievements.h:87
bool isHidden
Whether the achievement is hidden.
Definition: achievements.h:68
String title
Achievement displayed text, such as "Marathon Runner".
Definition: achievements.h:66
Definition: algorithm.h:29
String id
Stat internal ID, such as "ITEMS_THROWN".
Definition: achievements.h:56
AchievementsPlatform
Definition: achievements.h:46
String comment
Optional achievement hint or comment, such as "Finish the game in less than 4 hours".
Definition: achievements.h:67
Definition: achievements.h:55
Definition: ini-file.h:58
Definition: achievements.h:101
Definition: achievements.h:74
Common::AchievementsPlatform platform
Achievements platform, such as "STEAM_ACHIEVEMENTS".
Definition: achievements.h:75
String start
Stat default value, such as "0".
Definition: achievements.h:58
Definition: singleton.h:42