diff options
-rw-r--r-- | engines/sherlock/detection.cpp | 21 | ||||
-rw-r--r-- | engines/sherlock/detection_tables.h | 2 | ||||
-rw-r--r-- | engines/sherlock/sherlock.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/sherlock.h | 1 | ||||
-rw-r--r-- | engines/sherlock/user_interface.cpp | 17 |
5 files changed, 38 insertions, 7 deletions
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp index 78ab33bfd0..34fd919770 100644 --- a/engines/sherlock/detection.cpp +++ b/engines/sherlock/detection.cpp @@ -25,6 +25,7 @@ #include "sherlock/scalpel/scalpel.h" #include "sherlock/tattoo/tattoo.h" #include "common/system.h" +#include "common/translation.h" #include "engines/advancedDetector.h" namespace Sherlock { @@ -57,11 +58,29 @@ static const PlainGameDescriptor sherlockGames[] = { {0, 0} }; + +#define GAMEOPTION_ORIGINAL_SAVES GUIO_GAMEOPTIONS1 + +static const ADExtraGuiOptionsMap optionsList[] = { + { + GAMEOPTION_ORIGINAL_SAVES, + { + _s("Use original savegame dialog"), + _s("Files button in-game shows original savegame dialog rather than ScummVM menu"), + "OriginalSaves", + false + } + }, + + AD_EXTRA_GUI_OPTIONS_TERMINATOR +}; + #include "sherlock/detection_tables.h" class SherlockMetaEngine : public AdvancedMetaEngine { public: - SherlockMetaEngine() : AdvancedMetaEngine(Sherlock::gameDescriptions, sizeof(Sherlock::SherlockGameDescription), sherlockGames) {} + SherlockMetaEngine() : AdvancedMetaEngine(Sherlock::gameDescriptions, sizeof(Sherlock::SherlockGameDescription), + sherlockGames, optionsList) {} virtual const char *getName() const { return "Sherlock Engine"; diff --git a/engines/sherlock/detection_tables.h b/engines/sherlock/detection_tables.h index 975b7323ec..8300a0ffcf 100644 --- a/engines/sherlock/detection_tables.h +++ b/engines/sherlock/detection_tables.h @@ -33,7 +33,7 @@ static const SherlockGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE | ADGF_NO_FLAGS, - GUIO1(GUIO_NOSPEECH) + GUIO2(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVES) }, GType_SerratedScalpel, }, diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp index a9a17a99f8..41c41473d7 100644 --- a/engines/sherlock/sherlock.cpp +++ b/engines/sherlock/sherlock.cpp @@ -48,6 +48,7 @@ SherlockEngine::SherlockEngine(OSystem *syst, const SherlockGameDescription *gam _useEpilogue2 = false; _loadGameSlot = -1; _canLoadSave = false; + _showOriginalSavesDialog = false; } SherlockEngine::~SherlockEngine() { @@ -104,6 +105,9 @@ Common::Error SherlockEngine::run() { // Initialize the engine initialize(); + // Flag for whether to show original saves dialog rather than the ScummVM GMM + _showOriginalSavesDialog = ConfMan.hasKey("OriginalSaves") && ConfMan.getBool("OriginalSaves"); + // If requested, load a savegame instead of showing the intro if (ConfMan.hasKey("save_slot")) { int saveSlot = ConfMan.getInt("save_slot"); diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index 501fdcb292..33e4a45b40 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -108,6 +108,7 @@ public: bool _useEpilogue2; int _loadGameSlot; bool _canLoadSave; + bool _showOriginalSavesDialog; public: SherlockEngine(OSystem *syst, const SherlockGameDescription *gameDesc); virtual ~SherlockEngine(); diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp index aa6bf2ba81..85838f8a93 100644 --- a/engines/sherlock/user_interface.cpp +++ b/engines/sherlock/user_interface.cpp @@ -1420,17 +1420,24 @@ void UserInterface::doMainControl() { break; case 'F': pushButton(10); - _menuMode = FILES_MODE; // Create a thumbnail of the current screen before the files dialog is shown, in case // the user saves the game saves.createThumbnail(); - // Display the dialog - saves.drawInterface(); - _selector = _oldSelector = -1; - _windowOpen = true; + + if (_vm->_showOriginalSavesDialog) { + // Show the original dialog + _menuMode = FILES_MODE; + saves.drawInterface(); + _windowOpen = true; + } else { + // Show the ScummVM GMM instead + _vm->_canLoadSave = true; + _vm->openMainMenuDialog(); + _vm->_canLoadSave = false; + } break; case 'S': pushButton(11); |