MOHAWK: MYST: Configuration dialog changes
* Unify the custom options dialog (previously accessed through F5), the engine options tab and the in-game options dialog accessed through the Global Main Menu. * Change the default keybinding for F5 to show the GMM for the non-25th anniversary editions of the game. This allows easy access to the load and save functionality. With the 25th anniversary edition, the main menu accessed through ESC should be used instead. * Change the Quit button in the Global Main Menu to show the credits before quitting. This is to reproduce the original game behavior.
This commit is contained in:
parent
0d895ec2f9
commit
1be3c3c7c4
10 changed files with 420 additions and 337 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "common/textconsole.h"
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "mohawk/dialogs.h"
|
||||
#include "mohawk/livingbooks.h"
|
||||
|
||||
#ifdef ENABLE_CSTIME
|
||||
|
@ -120,8 +121,9 @@ Common::String MohawkEngine::getDatafileLanguageName(const char *prefix) const {
|
|||
bool MohawkEngine_Myst::hasFeature(EngineFeature f) const {
|
||||
return
|
||||
MohawkEngine::hasFeature(f)
|
||||
|| (f == kSupportsLoadingDuringRuntime)
|
||||
|| (f == kSupportsSavingDuringRuntime);
|
||||
|| (f == kSupportsLoadingDuringRuntime)
|
||||
|| (f == kSupportsSavingDuringRuntime)
|
||||
|| (f == kSupportsChangingOptionsDuringRuntime);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -182,23 +184,9 @@ static const char *directoryGlobs[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
static const ADExtraGuiOptionsMap optionsList[] = {
|
||||
{
|
||||
GAMEOPTION_PLAY_MYST_FLYBY,
|
||||
{
|
||||
_s("Play the Myst fly by movie"),
|
||||
_s("The Myst fly by movie was not played by the original engine."),
|
||||
"playmystflyby",
|
||||
false
|
||||
}
|
||||
},
|
||||
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
class MohawkMetaEngine : public AdvancedMetaEngine {
|
||||
public:
|
||||
MohawkMetaEngine() : AdvancedMetaEngine(Mohawk::gameDescriptions, sizeof(Mohawk::MohawkGameDescription), mohawkGames, optionsList) {
|
||||
MohawkMetaEngine() : AdvancedMetaEngine(Mohawk::gameDescriptions, sizeof(Mohawk::MohawkGameDescription), mohawkGames) {
|
||||
_maxScanDepth = 2;
|
||||
_directoryGlobs = directoryGlobs;
|
||||
}
|
||||
|
@ -227,6 +215,8 @@ public:
|
|||
void removeSaveState(const char *target, int slot) const override;
|
||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||
Common::KeymapArray initKeymaps(const char *target) const override;
|
||||
void registerDefaultSettings(const Common::String &target) const override;
|
||||
GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
|
||||
};
|
||||
|
||||
bool MohawkMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||
|
@ -348,6 +338,30 @@ Common::KeymapArray MohawkMetaEngine::initKeymaps(const char *target) const {
|
|||
return AdvancedMetaEngine::initKeymaps(target);
|
||||
}
|
||||
|
||||
void MohawkMetaEngine::registerDefaultSettings(const Common::String &target) const {
|
||||
Common::String gameId = ConfMan.get("gameid", target);
|
||||
|
||||
#ifdef ENABLE_MYST
|
||||
if (gameId == "myst" || gameId == "makingofmyst") {
|
||||
return Mohawk::MohawkEngine_Myst::registerDefaultSettings();
|
||||
}
|
||||
#endif
|
||||
|
||||
return AdvancedMetaEngine::registerDefaultSettings(target);
|
||||
}
|
||||
|
||||
GUI::OptionsContainerWidget *MohawkMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
|
||||
Common::String gameId = ConfMan.get("gameid", target);
|
||||
|
||||
#ifdef ENABLE_MYST
|
||||
if (gameId == "myst" || gameId == "makingofmyst") {
|
||||
return new Mohawk::MystOptionsWidget(boss, name, target);
|
||||
}
|
||||
#endif
|
||||
|
||||
return AdvancedMetaEngine::buildEngineOptionsWidget(boss, name, target);
|
||||
}
|
||||
|
||||
bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||
const Mohawk::MohawkGameDescription *gd = (const Mohawk::MohawkGameDescription *)desc;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue