MYST3: Move the engine options into the MetaEngine subclass

This commit is contained in:
Cameron Cawley 2022-11-03 21:27:33 +00:00 committed by Eugene Sandulenko
parent 425bcfeb0c
commit dbbf3d35c1
4 changed files with 25 additions and 19 deletions

View File

@ -1,2 +1,3 @@
engines/myst3/detection.cpp
engines/myst3/metaengine.cpp
engines/myst3/myst3.cpp

View File

@ -203,27 +203,9 @@ static const Myst3GameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER, 0 }
};
#define GAMEOPTION_WIDESCREEN_MOD GUIO_GAMEOPTIONS1
static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_WIDESCREEN_MOD,
{
_s("Widescreen mod"),
_s("Enable widescreen rendering in fullscreen mode."),
"widescreen_mod",
false,
0,
0
}
},
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
class Myst3MetaEngineDetection : public AdvancedMetaEngineDetection {
public:
Myst3MetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(Myst3GameDescription), myst3Games, optionsList) {
Myst3MetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(Myst3GameDescription), myst3Games) {
_guiOptions = GUIO5(GUIO_NOMIDI, GUIO_NOSFX, GUIO_NOSPEECH, GUIO_NOSUBTITLES, GAMEOPTION_WIDESCREEN_MOD);
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;

View File

@ -37,6 +37,8 @@ struct Myst3GameDescription {
uint32 localizationType;
};
#define GAMEOPTION_WIDESCREEN_MOD GUIO_GAMEOPTIONS1
} // End of namespace Myst3
#endif // MYST3_DETECTION_H

View File

@ -27,17 +27,38 @@
#include "common/config-manager.h"
#include "common/savefile.h"
#include "common/translation.h"
#include "graphics/scaler.h"
namespace Myst3{
static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_WIDESCREEN_MOD,
{
_s("Widescreen mod"),
_s("Enable widescreen rendering in fullscreen mode."),
"widescreen_mod",
false,
0,
0
}
},
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
class Myst3MetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "myst3";
}
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
return optionsList;
}
bool hasFeature(MetaEngineFeature f) const override {
return (f == kSupportsListSaves) ||
(f == kSupportsDeleteSave) ||