mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
ACHIEVEMENTS: Remove old API methods
This commit is contained in:
parent
36d304ec7c
commit
3fe4d8fc0f
@ -46,17 +46,11 @@ bool AchievementsManager::setActiveDomain(const AchievementsInfo &info) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_descriptions = info.descriptions;
|
||||
|
||||
return setActiveDomain(info.platform, info.appId);
|
||||
}
|
||||
|
||||
bool AchievementsManager::setActiveDomain(AchievementsPlatform platform, const String &appId) {
|
||||
const char* prefix = platform == STEAM_ACHIEVEMENTS ? "steam" :
|
||||
platform == GALAXY_ACHIEVEMENTS ? "galaxy" :
|
||||
const char* prefix = info.platform == STEAM_ACHIEVEMENTS ? "steam" :
|
||||
info.platform == GALAXY_ACHIEVEMENTS ? "galaxy" :
|
||||
"achman";
|
||||
|
||||
String iniFileName = String::format("%s-%s.dat", prefix, appId.c_str());
|
||||
String iniFileName = String::format("%s-%s.dat", prefix, info.appId.c_str());
|
||||
|
||||
if (_iniFileName == iniFileName) {
|
||||
return true;
|
||||
@ -71,6 +65,8 @@ bool AchievementsManager::setActiveDomain(AchievementsPlatform platform, const S
|
||||
_iniFile = new Common::INIFile();
|
||||
_iniFile->loadFromSaveFile(_iniFileName); // missing file is OK
|
||||
|
||||
_descriptions = info.descriptions;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -103,17 +99,6 @@ bool AchievementsManager::setAchievement(const String &id) {
|
||||
}
|
||||
}
|
||||
|
||||
return setAchievement(id, displayedMessage);
|
||||
}
|
||||
|
||||
bool AchievementsManager::setAchievement(const String &id, const String &displayedMessage) {
|
||||
if (!isReady()) {
|
||||
return false;
|
||||
}
|
||||
if (isAchieved(id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
debug("AchievementsManager::setAchievement('%s'): %s", id.c_str(), displayedMessage.c_str());
|
||||
|
||||
_iniFile->setKey(id, "achievements", "true");
|
||||
|
@ -80,14 +80,6 @@ public:
|
||||
AchievementsManager();
|
||||
~AchievementsManager();
|
||||
|
||||
/**
|
||||
* (DEPRECATED) Set a platform and application ID as active domain.
|
||||
*
|
||||
* @param[in] platform Achievements platform.
|
||||
* @param[in] appId Achievements application ID of the given platform.
|
||||
*/
|
||||
bool setActiveDomain(AchievementsPlatform platform, const String &appId);
|
||||
|
||||
/**
|
||||
* Set a platform and application ID as active domain, store messages texts.
|
||||
*
|
||||
@ -102,13 +94,6 @@ public:
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** (DEPRECATED) Set an achievement.
|
||||
*
|
||||
* @param[in] id Internal ID of the achievement.
|
||||
* @param[in] displayedMessage Message displayed when the achievement is achieved.
|
||||
*/
|
||||
bool setAchievement(const String &id, const String &displayedMessage);
|
||||
|
||||
/** Set an achievement. Message is automatically displayed with text from active domain.
|
||||
*
|
||||
* @param[in] id Internal ID of the achievement.
|
||||
|
Loading…
x
Reference in New Issue
Block a user