[Scummvm-git-logs] scummvm master -> 138673dd3c67da6b8772bee7c33f409d38b434db
mgerhardy
martin.gerhardy at gmail.com
Sun Mar 14 10:29:22 UTC 2021
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6121292934 COMMON: fixed formatting
5b9fa67445 COMMON: const for AchievementsManager::isAchieved
8b2e957914 COMMON: fixed clang-sanitizer warnings
138673dd3c AGS: added detection entry for Metaphobia steam variant
Commit: 6121292934da4962864f5afbd1c561adc53a31a2
https://github.com/scummvm/scummvm/commit/6121292934da4962864f5afbd1c561adc53a31a2
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T11:26:19+01:00
Commit Message:
COMMON: fixed formatting
Changed paths:
common/achievements.h
diff --git a/common/achievements.h b/common/achievements.h
index fcd74bcf3e..6744e62772 100644
--- a/common/achievements.h
+++ b/common/achievements.h
@@ -49,18 +49,16 @@ enum AchievementsPlatform {
UNK_ACHIEVEMENTS = -1
};
-
/**
* Information structure for game-specific achievements.
*/
struct AchievementDescription {
- const char *id; //!< Achievement internal ID, such as "ACHIEVEMENT_TIMING".
- bool isHidden; //!< Whether the achievement is hidden.
- const char *title; //!< Achievement displayed text, such as "Marathon Runner".
- const char *comment; //!< Optional achievement hint or comment, such as "Finish the game in less than 4 hours".
+ const char *id; //!< Achievement internal ID, such as "ACHIEVEMENT_TIMING".
+ bool isHidden; //!< Whether the achievement is hidden.
+ const char *title; //!< Achievement displayed text, such as "Marathon Runner".
+ const char *comment; //!< Optional achievement hint or comment, such as "Finish the game in less than 4 hours".
};
-
/**
* Information structure for platform-specific achievements.
*/
@@ -69,7 +67,7 @@ struct AchievementsInfo {
Common::String appId; //!< Achievements application ID of the given platform.
Common::Array<AchievementDescription> descriptions; //!< Descriptions of all game achievements.
- AchievementsInfo() {platform = Common::UNK_ACHIEVEMENTS;}
+ AchievementsInfo() { platform = Common::UNK_ACHIEVEMENTS; }
};
/**
@@ -77,102 +75,94 @@ struct AchievementsInfo {
*
* Use the Achievements Manager class to edit the in-game achievements.
*/
-
class AchievementsManager : public Singleton<AchievementsManager> {
public:
AchievementsManager();
~AchievementsManager();
-
- /**
- * Set a platform and application ID as active domain.
- *
- * @param[in] platform Achievements platform.
- * @param[in] appId Achievements application ID of the given platform.
- */
+
+ /**
+ * 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);
- bool unsetActiveDomain(); //!< Unset the current active domain.
- bool isReady() { return _iniFile != nullptr; } //!< Check whether the domain is ready.
+ bool unsetActiveDomain(); //!< Unset the current active domain.
+ bool isReady() const { return _iniFile != nullptr; } //!< Check whether the domain is ready.
/**
- * @name Methods for manipulating individual achievements
- * @{
- */
-
- /** Set an achievement.
- *
- * @param[in] id Internal ID of the achievement.
- * @param[in] displayedMessage Message displayed when the achievement is achieved.
- */
+ * @name Methods for manipulating individual achievements
+ * @{
+ */
+ /** 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 as achieved.
- *
- * @param[in] id Internal ID of the achievement.
- */
-
+
+ /**
+ * Set an achievement as achieved.
+ *
+ * @param[in] id Internal ID of the achievement.
+ */
bool isAchieved(const String &id);
-
- /**
- * Clear an achieved achievement.
- *
- * @param[in] id Internal ID of the achievement.
- */
-
+
+ /**
+ * Clear an achieved achievement.
+ *
+ * @param[in] id Internal ID of the achievement.
+ */
bool clearAchievement(const String &id);
-
- /** @} */
-
- /**
- * @name Methods for manipulating individual statistics
- * @{
- */
-
- /**
- * Get a statistic (integer).
- *
- * @param[in] id Internal ID of the achievement.
- */
-
+
+ /** @} */
+
+ /**
+ * @name Methods for manipulating individual statistics
+ * @{
+ */
+
+ /**
+ * Get a statistic (integer).
+ *
+ * @param[in] id Internal ID of the achievement.
+ */
int getStatInt(const String &id);
-
- /**
- * Set a statistic to an integer number.
- *
- * @param[in] id Internal ID of the achievement.
- * @param[in] value Value to which the statistic is set.
- */
-
+
+ /**
+ * Set a statistic to an integer number.
+ *
+ * @param[in] id Internal ID of the achievement.
+ * @param[in] value Value to which the statistic is set.
+ */
bool setStatInt(const String &id, int value);
-
- /**
- * Get a statistic (float).
- *
- * @param[in] id Internal ID of the achievement.
- */
-
+
+ /**
+ * Get a statistic (float).
+ *
+ * @param[in] id Internal ID of the achievement.
+ */
float getStatFloat(const String &id);
-
- /**
- * Set a statistic to a float number.
- *
- * @param[in] id Internal ID of the achievement.
- * @param[in] value Value to which the statistic is set.
- */
-
+
+ /**
+ * Set a statistic to a float number.
+ *
+ * @param[in] id Internal ID of the achievement.
+ * @param[in] value Value to which the statistic is set.
+ */
bool setStatFloat(const String &id, float value);
- /** @} */
+ /** @} */
- /**
- * @name Methods for resetting achievements and statistics
- * @{
- */
+ /**
+ * @name Methods for resetting achievements and statistics
+ * @{
+ */
bool resetAllAchievements(); //!< Reset all achievements.
bool resetAllStats(); //!< Reset all statistics.
- /** @} */
+ /** @} */
private:
INIFile *_iniFile;
Commit: 5b9fa674456b950986ec9ea6dc0d6d85cd03d06d
https://github.com/scummvm/scummvm/commit/5b9fa674456b950986ec9ea6dc0d6d85cd03d06d
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T11:26:19+01:00
Commit Message:
COMMON: const for AchievementsManager::isAchieved
Changed paths:
common/achievements.cpp
common/achievements.h
diff --git a/common/achievements.cpp b/common/achievements.cpp
index 3e473526b1..0fa4f8a894 100644
--- a/common/achievements.cpp
+++ b/common/achievements.cpp
@@ -100,7 +100,7 @@ bool AchievementsManager::setAchievement(const String &id, const String &display
}
-bool AchievementsManager::isAchieved(const String &id) {
+bool AchievementsManager::isAchieved(const String &id) const {
if (!isReady()) {
return false;
}
diff --git a/common/achievements.h b/common/achievements.h
index 6744e62772..1a0f689c16 100644
--- a/common/achievements.h
+++ b/common/achievements.h
@@ -107,7 +107,7 @@ public:
*
* @param[in] id Internal ID of the achievement.
*/
- bool isAchieved(const String &id);
+ bool isAchieved(const String &id) const;
/**
* Clear an achieved achievement.
Commit: 8b2e957914cc9a84c7d7edc0d86793d0889e10dc
https://github.com/scummvm/scummvm/commit/8b2e957914cc9a84c7d7edc0d86793d0889e10dc
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T11:26:19+01:00
Commit Message:
COMMON: fixed clang-sanitizer warnings
Changed paths:
common/achievements.cpp
diff --git a/common/achievements.cpp b/common/achievements.cpp
index 0fa4f8a894..e4b3bda5de 100644
--- a/common/achievements.cpp
+++ b/common/achievements.cpp
@@ -139,10 +139,9 @@ float AchievementsManager::getStatFloat(const String &id) {
String tmp;
_iniFile->getKey(id, "statistics", tmp);
- return atof(tmp.c_str());
+ return (float)atof(tmp.c_str());
}
-
bool AchievementsManager::setStatInt(String const &id, int value) {
if (!isReady()) {
return false;
@@ -162,7 +161,7 @@ int AchievementsManager::getStatInt(String const &id) {
String tmp;
_iniFile->getKey(id, "statistics", tmp);
- return atol(tmp.c_str());
+ return (int)atol(tmp.c_str());
}
Commit: 138673dd3c67da6b8772bee7c33f409d38b434db
https://github.com/scummvm/scummvm/commit/138673dd3c67da6b8772bee7c33f409d38b434db
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T11:27:55+01:00
Commit Message:
AGS: added detection entry for Metaphobia steam variant
including achievements
Changed paths:
engines/ags/achievements_tables.h
engines/ags/detection_tables.h
diff --git a/engines/ags/achievements_tables.h b/engines/ags/achievements_tables.h
index 790a5d4c45..6ddab4c494 100644
--- a/engines/ags/achievements_tables.h
+++ b/engines/ags/achievements_tables.h
@@ -906,6 +906,21 @@ static const AchievementDescriptionList achievementDescriptionList[] = {
}
},
+ {
+ "metaphobia",
+ Common::STEAM_ACHIEVEMENTS,
+ "1220930",
+ {
+ ACHIEVEMENT_HIDDEN_ENTRY("Have you seen this man?", "Have you seen this man?"),
+ ACHIEVEMENT_SIMPLE_ENTRY("Bookworm", "Bookworm", "Carl's words live on"),
+ ACHIEVEMENT_SIMPLE_ENTRY("Ancient knowledge", "Ancient knowledge", "You clarified the secret of the ruins on one try"),
+ ACHIEVEMENT_SIMPLE_ENTRY("Emases nepo", "Emases nepo", "You sorted out the dark cave puzzle on one try"),
+ ACHIEVEMENT_SIMPLE_ENTRY("What are these?", "What are these?", "You solved an other-worldly puzzle on one try"),
+ ACHIEVEMENT_SIMPLE_ENTRY("Inevitable", "Inevitable", "A final outcome"),
+ ACHIEVEMENTS_LISTEND
+ }
+ },
+
{
"neofeud",
Common::STEAM_ACHIEVEMENTS,
diff --git a/engines/ags/detection_tables.h b/engines/ags/detection_tables.h
index e644ea3fab..7500d906ab 100644
--- a/engines/ags/detection_tables.h
+++ b/engines/ags/detection_tables.h
@@ -2484,6 +2484,7 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("meta", "meta.exe", "9358670438c3fab77489a1dd229029b1", 2536926), // Steam
GAME_ENTRY("metaphobia", "Metaphobia.exe", "10da7427cf74ba0cc7ceb29f99ff0a67", 92083437), // itch.io 1.01 Windows
GAME_ENTRY("metaphobia", "ac2game.exe", "10da7427cf74ba0cc7ceb29f99ff0a67", 92083437), // itch.io MacOS
+ GAME_ENTRY("metaphobia", "Metaphobia.exe", "10da7427cf74ba0cc7ceb29f99ff0a67", 92086491), // Steam
GAME_ENTRY("meteorfamily20", "Meteor Family.exe", "06a03fe35791b0578068ab1873455463", 5759077),
GAME_ENTRY("meteorheadrecycled", "Meteorhead.exe", "6cddccb3744ec5c6af7c398fb7b3b11c", 5081311),
GAME_ENTRY("mibaddaytobedead", "Monkey.exe", "f120690b506dd63cd7d1112ea6af2f77", 2117238),
More information about the Scummvm-git-logs
mailing list