[Scummvm-git-logs] scummvm master -> ce9542df63c75cd79d75249871060204d7d76901
sev-
sev at scummvm.org
Fri Apr 16 12:21:50 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:
8339fbb9d9 AD: Fix type in constant name
0739c1a165 JANITORIAL: Remove trailing spaces
ec2a50b746 AD: Implemented AGDF_WARNING flag
ce9542df63 SCI: Added detection with a warning for CD1 of pqswat Win
Commit: 8339fbb9d9cb728f15c8b171342af63071831fbf
https://github.com/scummvm/scummvm/commit/8339fbb9d9cb728f15c8b171342af63071831fbf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-04-16T13:28:43+02:00
Commit Message:
AD: Fix type in constant name
Changed paths:
engines/advancedDetector.cpp
engines/game.h
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index a2f27573c3..949ba64822 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -182,7 +182,7 @@ DetectedGame AdvancedMetaEngineDetection::toDetectedGame(const ADDetectedGame &a
else if (desc->flags & ADGF_TESTING)
game.gameSupportLevel = kTestingGame;
else if (desc->flags & ADGF_UNSUPPORTED)
- game.gameSupportLevel = kUnupportedGame;
+ game.gameSupportLevel = kUnsupportedGame;
game.setGUIOptions(desc->guiOptions + _guiOptions);
game.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(desc->language));
@@ -381,7 +381,7 @@ Common::Error AdvancedMetaEngineDetection::createInstance(OSystem *syst, Engine
&& !Engine::warnUserAboutUnsupportedGame())
return Common::kUserCanceled;
- if (gameDescriptor.gameSupportLevel == kUnupportedGame) {
+ if (gameDescriptor.gameSupportLevel == kUnsupportedGame) {
Engine::errorUnsupportedGame(gameDescriptor.extra);
return Common::kUserCanceled;
}
diff --git a/engines/game.h b/engines/game.h
index 6bf9f04285..be12153b08 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -91,10 +91,10 @@ typedef Common::Array<QualifiedGameDescriptor> QualifiedGameList;
* Ths is an enum to describe how done a game is. This also indicates what level of support is expected.
*/
enum GameSupportLevel {
- kStableGame = 0, // the game is fully supported
- kTestingGame, // the game is not supposed to end up in releases yet but is ready for public testing
- kUnstableGame, // the game is not even ready for public testing yet
- kUnupportedGame // we don't want to support the game
+ kStableGame = 0, // the game is fully supported
+ kTestingGame, // the game is not supposed to end up in releases yet but is ready for public testing
+ kUnstableGame, // the game is not even ready for public testing yet
+ kUnsupportedGame // we don't want to support the game
};
Commit: 0739c1a1652e0cdefc3aa0329429267b47b1ea27
https://github.com/scummvm/scummvm/commit/0739c1a1652e0cdefc3aa0329429267b47b1ea27
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-04-16T14:13:24+02:00
Commit Message:
JANITORIAL: Remove trailing spaces
Changed paths:
engines/advancedDetector.h
engines/engine.h
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 5094cd4103..42e18bab92 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -42,7 +42,7 @@ class FSList;
*
* @{
*/
-
+
/**
* A record describing a file to be matched for detecting a specific game
* variant. A list of such records is used inside every ADGameDescription to
@@ -89,7 +89,7 @@ enum ADGameFlags {
ADGF_UNSTABLE = (1 << 20), ///< Flag to designate not yet officially supported games that are not fit for public testing.
ADGF_TESTING = (1 << 21), ///< Flag to designate not yet officially supported games that are fit for public testing.
ADGF_PIRATED = (1 << 22), ///< Flag to designate well-known pirated versions with cracks.
- ADGF_UNSUPPORTED = (1 << 23), /*!< Flag to mark certain versions (like fan translations) not to be run for various reasons.
+ ADGF_UNSUPPORTED = (1 << 23), /*!< Flag to mark certain versions (like badly protected full games as demos) not to be run for various reasons.
A custom message can be provided in the @ref ADGameDescription::extra field. */
ADGF_ADDENGLISH = (1 << 24), ///< Always add English as a language option.
ADGF_MACRESFORK = (1 << 25), ///< Calculate the MD5 for this entry from the resource fork.
@@ -125,7 +125,7 @@ struct ADGameDescription {
/**
* A list of individual file entries used for detection.
*
- * 13 files (last is zero-terminated) is the maximum number of files currently used in ScummVM.
+ * 13 files (last is zero-terminated) is the maximum number of files currently used in ScummVM.
* A hardcoded number is used here due to a C++ limitation for defining const arrays.
*/
ADGameFileDescription filesDescriptions[14];
@@ -151,7 +151,7 @@ struct ADGameDescription {
/**
* Game features that are user-controllable.
*
- * This list reflects which features of the GUI should be turned on or off in order to minimize user confusion.
+ * This list reflects which features of the GUI should be turned on or off in order to minimize user confusion.
* For instance, there is no point in changing game language in single-language games
* or have MIDI controls in a game that only supports digital music.
*/
@@ -200,7 +200,7 @@ struct ADFileBasedFallback {
enum ADFlags {
/**
- * Store the value of the @ref ADGameDescription::extra field
+ * Store the value of the @ref ADGameDescription::extra field
* in the config file, and use it as a hint on subsequent runs.
*
* This can be used when there is no way to autodetect the game
@@ -277,7 +277,7 @@ protected:
/**
* A list of game GUI options which will be added to each
- * entry in addition to per-game options.
+ * entry in addition to per-game options.
*
* Refer to @ref GameGUIOption enum for the list.
*/
@@ -437,7 +437,7 @@ public:
/**
* Base createInstance for AdvancedMetaEngine.
*
- * The AdvancedMetaEngine provides a default createInstance that is called first,
+ * The AdvancedMetaEngine provides a default createInstance that is called first,
* so this should be invoked first.
* By the time this is called, it is assumed that there is only one
* plugin engine loaded in memory.
@@ -468,7 +468,7 @@ public:
/**
* An (optional) generic fallback detection function that is invoked
* if the regular MD5-based detection failed to detect anything.
-
+
* @note This is only meant to be used if fallback detection heavily depends on engine resources.
*
* To use this, implement the intended fallbackDetectExtern inside the relevant MetaEngine class.
diff --git a/engines/engine.h b/engines/engine.h
index 6ee760ca3e..8113b4cce9 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -332,7 +332,7 @@ public:
/**
* Set the engine's debugger.
*
- * Once set, the Engine class is responsible for managing
+ * Once set, the Engine class is responsible for managing
* the debugger, and freeing it on exit.
*/
void setDebugger(GUI::Debugger *debugger) {
@@ -541,6 +541,9 @@ public:
/**
* Display a warning to the user that the game is not fully supported.
*
+ * @param msg An message that will be presented to user. If empty, then
+ * generic message regarding unsupported game is presented
+ *
* @return True if the user chooses to start anyway, false otherwise.
*/
static bool warnUserAboutUnsupportedGame();
@@ -548,7 +551,7 @@ public:
/**
* Display an error message to the user that the game is not supported.
*
- * @param extraMsg An extra message that will be appended to the default message.
+ * @param extraMsg An extra message that will be appended to the default message.
*/
static void errorUnsupportedGame(Common::String extraMsg);
@@ -613,14 +616,14 @@ public:
virtual int getAutosaveSlot() const {
return 0;
}
-
+
/**
* Check whether it is time to autosave based on the
* provided @p lastSaveTime.
*
* This function is now deprecated as autosaves are handled directly by
* the Engine class and derived classes do not need to worry about it other than
- * to implement canSaveAutosaveCurrently() and getAutosaveSlot()
+ * to implement canSaveAutosaveCurrently() and getAutosaveSlot()
* if the default implementations are not sufficient.
*/
bool shouldPerformAutoSave(int lastSaveTime) {
Commit: ec2a50b746ba36b2cce917ba1a110026aee028d0
https://github.com/scummvm/scummvm/commit/ec2a50b746ba36b2cce917ba1a110026aee028d0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-04-16T14:20:13+02:00
Commit Message:
AD: Implemented AGDF_WARNING flag
Changed paths:
engines/advancedDetector.cpp
engines/advancedDetector.h
engines/engine.cpp
engines/engine.h
engines/game.h
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 949ba64822..88c763756f 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -171,7 +171,7 @@ DetectedGame AdvancedMetaEngineDetection::toDetectedGame(const ADDetectedGame &a
extra = desc->extra;
}
- DetectedGame game(getEngineId(), desc->gameId, title, desc->language, desc->platform, extra, desc->flags & ADGF_UNSUPPORTED);
+ DetectedGame game(getEngineId(), desc->gameId, title, desc->language, desc->platform, extra, ((desc->flags & (ADGF_UNSUPPORTED | ADGF_WARNING)) != 0));
game.hasUnknownFiles = adGame.hasUnknownFiles;
game.matchedFiles = adGame.matchedFiles;
game.preferredTarget = generatePreferredTarget(desc, _maxAutogenLength);
@@ -183,6 +183,8 @@ DetectedGame AdvancedMetaEngineDetection::toDetectedGame(const ADDetectedGame &a
game.gameSupportLevel = kTestingGame;
else if (desc->flags & ADGF_UNSUPPORTED)
game.gameSupportLevel = kUnsupportedGame;
+ else if (desc->flags & ADGF_WARNING)
+ game.gameSupportLevel = kWarningGame;
game.setGUIOptions(desc->guiOptions + _guiOptions);
game.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(desc->language));
@@ -378,7 +380,11 @@ Common::Error AdvancedMetaEngineDetection::createInstance(OSystem *syst, Engine
if (((gameDescriptor.gameSupportLevel == kUnstableGame
|| (gameDescriptor.gameSupportLevel == kTestingGame
&& showTestingWarning)))
- && !Engine::warnUserAboutUnsupportedGame())
+ && !Engine::warnUserAboutUnsupportedGame(""))
+ return Common::kUserCanceled;
+
+ if (gameDescriptor.gameSupportLevel == kWarningGame
+ && !Engine::warnUserAboutUnsupportedGame(gameDescriptor.extra))
return Common::kUserCanceled;
if (gameDescriptor.gameSupportLevel == kUnsupportedGame) {
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 42e18bab92..f2edff8440 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -84,13 +84,15 @@ struct ADGameFileDescription {
*/
enum ADGameFlags {
ADGF_NO_FLAGS = 0, ///< No flags.
- ADGF_REMASTERED = (1 << 18), ///< Add "-remastered' to gameid.
- ADGF_AUTOGENTARGET = (1 << 19), ///< Automatically generate gameid from @ref ADGameDescription::extra.
- ADGF_UNSTABLE = (1 << 20), ///< Flag to designate not yet officially supported games that are not fit for public testing.
- ADGF_TESTING = (1 << 21), ///< Flag to designate not yet officially supported games that are fit for public testing.
- ADGF_PIRATED = (1 << 22), ///< Flag to designate well-known pirated versions with cracks.
- ADGF_UNSUPPORTED = (1 << 23), /*!< Flag to mark certain versions (like badly protected full games as demos) not to be run for various reasons.
+ ADGF_REMASTERED = (1 << 17), ///< Add "-remastered' to gameid.
+ ADGF_AUTOGENTARGET = (1 << 18), ///< Automatically generate gameid from @ref ADGameDescription::extra.
+ ADGF_UNSTABLE = (1 << 19), ///< Flag to designate not yet officially supported games that are not fit for public testing.
+ ADGF_TESTING = (1 << 20), ///< Flag to designate not yet officially supported games that are fit for public testing.
+ ADGF_PIRATED = (1 << 21), ///< Flag to designate well-known pirated versions with cracks.
+ ADGF_UNSUPPORTED = (1 << 22), /*!< Flag to mark certain versions (like badly protected full games as demos) not to be run for various reasons.
A custom message can be provided in the @ref ADGameDescription::extra field. */
+ ADGF_WARNING = (1 << 23), /*!< Flag to mark certain versions to show confirmation warning before proceeding.
+ A custom message should be provided in the @ref ADGameDescription::extra field. */
ADGF_ADDENGLISH = (1 << 24), ///< Always add English as a language option.
ADGF_MACRESFORK = (1 << 25), ///< Calculate the MD5 for this entry from the resource fork.
ADGF_USEEXTRAASTITLE = (1 << 26), ///< Use @ref ADGameDescription::extra as the main game title, not gameid.
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 2405600838..39e7b48fe0 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -644,9 +644,10 @@ void Engine::openMainMenuDialog() {
syncSoundSettings();
}
-bool Engine::warnUserAboutUnsupportedGame() {
+bool Engine::warnUserAboutUnsupportedGame(Common::String msg) {
if (ConfMan.getBool("enable_unsupported_game_warning")) {
- GUI::MessageDialog alert(_("WARNING: The game you are about to start is"
+ GUI::MessageDialog alert(!msg.empty() ? _("WARNING: ") + Common::U32String(msg) + _(" Shall we still run the game?") :
+ _("WARNING: The game you are about to start is"
" not yet fully supported by ScummVM. As such, it is likely to be"
" unstable, and any saved game you make might not work in future"
" versions of ScummVM."), _("Start anyway"), _("Cancel"));
diff --git a/engines/engine.h b/engines/engine.h
index 8113b4cce9..2bd3588c15 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -546,7 +546,7 @@ public:
*
* @return True if the user chooses to start anyway, false otherwise.
*/
- static bool warnUserAboutUnsupportedGame();
+ static bool warnUserAboutUnsupportedGame(Common::String msg);
/**
* Display an error message to the user that the game is not supported.
diff --git a/engines/game.h b/engines/game.h
index be12153b08..8283f8cba1 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -94,7 +94,8 @@ enum GameSupportLevel {
kStableGame = 0, // the game is fully supported
kTestingGame, // the game is not supposed to end up in releases yet but is ready for public testing
kUnstableGame, // the game is not even ready for public testing yet
- kUnsupportedGame // we don't want to support the game
+ kUnsupportedGame, // we don't want to support the game
+ kWarningGame // we want to ask user to proceed and provide them with an explanation
};
Commit: ce9542df63c75cd79d75249871060204d7d76901
https://github.com/scummvm/scummvm/commit/ce9542df63c75cd79d75249871060204d7d76901
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-04-16T14:20:44+02:00
Commit Message:
SCI: Added detection with a warning for CD1 of pqswat Win
We need probably add similar entries for other multi-cd games in the engine
Changed paths:
engines/sci/detection_tables.h
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index aa3e7c0c84..d85fb96b0e 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -4200,6 +4200,16 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO_PQSWAT },
+ // Police Quest: SWAT - English Windows (from the Police Quest Collection)
+ // With only first CD copied
+ // Executable scanning reports "2.100.002", VERSION file reports "1.0c"
+ // Original DOS/Windows release VERSION file reports "1.000" is the same
+ {"pqswat", _s("Incomplete game detected. You have to copy data from all the CDs."), {
+ {"resmap.001", 0, "de5ea1beb3d9490737aa5fd398fe9765", 6937},
+ {"ressci.001", 0, "7cd5414f54748f90904a46123a52472f", 29467363},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_WARNING, GUIO_PQSWAT },
+
// Police Quest: SWAT - French 1.100 DOS/Windows
// Reported by e-Scarlatti in bug #11100
{"pqswat", "", {
More information about the Scummvm-git-logs
mailing list