NEVERHOOD: Move the engine options into the MetaEngine subclass

This commit is contained in:
Cameron Cawley 2022-11-03 21:30:45 +00:00 committed by Eugene Sandulenko
parent dbbf3d35c1
commit 37ee0ca0ef
4 changed files with 48 additions and 42 deletions

View File

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

View File

@ -27,10 +27,6 @@
#include "neverhood/detection.h"
#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
#define GAMEOPTION_SKIP_HALL_OF_RECORDS GUIO_GAMEOPTIONS2
#define GAMEOPTION_SCALE_MAKING_OF_VIDEOS GUIO_GAMEOPTIONS3
static const PlainGameDescriptor neverhoodGames[] = {
{"neverhood", "The Neverhood Chronicles"},
{nullptr, nullptr}
@ -132,49 +128,12 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_ORIGINAL_SAVELOAD,
{
_s("Use original save/load screens"),
_s("Use the original save/load screens instead of the ScummVM ones"),
"originalsaveload",
false,
0,
0
}
},
{
GAMEOPTION_SKIP_HALL_OF_RECORDS,
{
_s("Skip the Hall of Records storyboard scenes"),
_s("Allows the player to skip past the Hall of Records storyboard scenes"),
"skiphallofrecordsscenes",
false,
0,
0
}
},
{
GAMEOPTION_SCALE_MAKING_OF_VIDEOS,
{
_s("Scale the making of videos to full screen"),
_s("Scale the making of videos, so that they use the whole screen"),
"scalemakingofvideos",
false,
0,
0
}
},
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
} // End of namespace Neverhood
class NeverhoodMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
NeverhoodMetaEngineDetection() : AdvancedMetaEngineDetection(Neverhood::gameDescriptions, sizeof(ADGameDescription), neverhoodGames, Neverhood::optionsList) {
NeverhoodMetaEngineDetection() : AdvancedMetaEngineDetection(Neverhood::gameDescriptions, sizeof(ADGameDescription), neverhoodGames) {
_guiOptions = GUIO5(GUIO_NOSUBTITLES, GUIO_NOMIDI, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_SKIP_HALL_OF_RECORDS, GAMEOPTION_SCALE_MAKING_OF_VIDEOS);
}

View File

@ -28,6 +28,10 @@ enum NeverhoodGameFeatures {
GF_BIG_DEMO = (1 << 0)
};
#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
#define GAMEOPTION_SKIP_HALL_OF_RECORDS GUIO_GAMEOPTIONS2
#define GAMEOPTION_SCALE_MAKING_OF_VIDEOS GUIO_GAMEOPTIONS3
} // End of namespace Neverhood
#endif // NEVERHOOD_DETECTION_H

View File

@ -23,12 +23,50 @@
#include "engines/advancedDetector.h"
#include "common/file.h"
#include "common/translation.h"
#include "neverhood/neverhood.h"
#include "neverhood/detection.h"
namespace Neverhood {
static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_ORIGINAL_SAVELOAD,
{
_s("Use original save/load screens"),
_s("Use the original save/load screens instead of the ScummVM ones"),
"originalsaveload",
false,
0,
0
}
},
{
GAMEOPTION_SKIP_HALL_OF_RECORDS,
{
_s("Skip the Hall of Records storyboard scenes"),
_s("Allows the player to skip past the Hall of Records storyboard scenes"),
"skiphallofrecordsscenes",
false,
0,
0
}
},
{
GAMEOPTION_SCALE_MAKING_OF_VIDEOS,
{
_s("Scale the making of videos to full screen"),
_s("Scale the making of videos, so that they use the whole screen"),
"scalemakingofvideos",
false,
0,
0
}
},
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
const char *NeverhoodEngine::getGameId() const {
return _gameDescription->gameId;
}
@ -61,6 +99,10 @@ public:
return "neverhood";
}
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
return Neverhood::optionsList;
}
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;