mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
SHERLOCK: Default Files button to show GMM, with engine option to disable
This commit is contained in:
parent
f987cda9f0
commit
d3f1a76cc8
@ -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";
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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");
|
||||
|
@ -108,6 +108,7 @@ public:
|
||||
bool _useEpilogue2;
|
||||
int _loadGameSlot;
|
||||
bool _canLoadSave;
|
||||
bool _showOriginalSavesDialog;
|
||||
public:
|
||||
SherlockEngine(OSystem *syst, const SherlockGameDescription *gameDesc);
|
||||
virtual ~SherlockEngine();
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user