mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 08:23:15 +00:00
GRIM: Move the engine options into the MetaEngine subclass
This commit is contained in:
parent
e8dee87a04
commit
6c20aaa057
@ -1,4 +1,3 @@
|
||||
engines/grim/detection.cpp
|
||||
engines/grim/grim.cpp
|
||||
engines/grim/inputdialog.cpp
|
||||
engines/grim/md5check.cpp
|
||||
|
@ -19,8 +19,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
#include "engines/grim/detection.h"
|
||||
#include "engines/grim/debug.h"
|
||||
@ -57,38 +55,6 @@ static const PlainGameDescriptor grimGames[] = {
|
||||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
#define GAMEOPTION_LOAD_DATAUSR GUIO_GAMEOPTIONS1
|
||||
#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS2
|
||||
|
||||
#define GUI_OPTIONS_GRIME GUIO2(GAMEOPTION_LOAD_DATAUSR, GAMEOPTION_SHOW_FPS)
|
||||
|
||||
static const ADExtraGuiOptionsMap gameGuiOptions[] = {
|
||||
{
|
||||
GAMEOPTION_LOAD_DATAUSR,
|
||||
{
|
||||
_s("Load user patch (unsupported)"),
|
||||
_s("Load an user patch. Please note that the ScummVM team doesn't provide support for using such patches."),
|
||||
"datausr_load",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_SHOW_FPS,
|
||||
{
|
||||
_s("Show FPS"),
|
||||
_s("Show the current FPS-rate, while you play."),
|
||||
"show_fps",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
static const GrimGameDescription gameDescriptions[] = {
|
||||
{
|
||||
// Grim Fandango English version (patched)
|
||||
@ -633,7 +599,7 @@ static const GrimGameDescription gameDescriptions[] = {
|
||||
|
||||
class GrimMetaEngineDetection : public AdvancedMetaEngineDetection {
|
||||
public:
|
||||
GrimMetaEngineDetection() : AdvancedMetaEngineDetection(Grim::gameDescriptions, sizeof(Grim::GrimGameDescription), grimGames, gameGuiOptions) {
|
||||
GrimMetaEngineDetection() : AdvancedMetaEngineDetection(Grim::gameDescriptions, sizeof(Grim::GrimGameDescription), grimGames) {
|
||||
_guiOptions = GUIO_NOMIDI;
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,11 @@ struct GrimGameDescription {
|
||||
GrimGameType gameType;
|
||||
};
|
||||
|
||||
#define GAMEOPTION_LOAD_DATAUSR GUIO_GAMEOPTIONS1
|
||||
#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS2
|
||||
|
||||
#define GUI_OPTIONS_GRIME GUIO2(GAMEOPTION_LOAD_DATAUSR, GAMEOPTION_SHOW_FPS)
|
||||
|
||||
} // End of namespace Grim
|
||||
|
||||
#endif // GRIM_DETECTION_H
|
||||
|
@ -30,12 +30,43 @@
|
||||
|
||||
namespace Grim {
|
||||
|
||||
static const ADExtraGuiOptionsMap gameGuiOptions[] = {
|
||||
{
|
||||
GAMEOPTION_LOAD_DATAUSR,
|
||||
{
|
||||
_s("Load user patch (unsupported)"),
|
||||
_s("Load an user patch. Please note that the ScummVM team doesn't provide support for using such patches."),
|
||||
"datausr_load",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_SHOW_FPS,
|
||||
{
|
||||
_s("Show FPS"),
|
||||
_s("Show the current FPS-rate, while you play."),
|
||||
"show_fps",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
class GrimMetaEngine : public AdvancedMetaEngine {
|
||||
public:
|
||||
const char *getName() const override {
|
||||
return "grim";
|
||||
}
|
||||
|
||||
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
|
||||
return gameGuiOptions;
|
||||
}
|
||||
|
||||
Common::Error createInstance(OSystem *syst, Engine **engine) override {
|
||||
Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
|
||||
return AdvancedMetaEngine::createInstance(syst, engine);
|
||||
|
Loading…
x
Reference in New Issue
Block a user