mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-01 07:46:11 +00:00
SUPERNOVA: Move the engine options into the MetaEngine subclass
This commit is contained in:
parent
6a1bccc649
commit
32c49c29be
@ -1,3 +1,3 @@
|
||||
engines/supernova/supernova.cpp
|
||||
engines/supernova/detection.cpp
|
||||
engines/supernova/metaengine.cpp
|
||||
|
||||
|
@ -22,46 +22,15 @@
|
||||
#include "base/plugins.h"
|
||||
#include "common/file.h"
|
||||
#include "common/gui_options.h"
|
||||
#include "common/translation.h"
|
||||
#include "engines/advancedDetector.h"
|
||||
#include "supernova/supernova.h"
|
||||
|
||||
#define GAMEOPTION_IMPROVED GUIO_GAMEOPTIONS1
|
||||
#define GAMEOPTION_TTS GUIO_GAMEOPTIONS2
|
||||
#include "supernova/detection.h"
|
||||
|
||||
static const DebugChannelDef debugFlagList[] = {
|
||||
{Supernova::kDebugGeneral, "general", "Supernova general debug channel"},
|
||||
DEBUG_CHANNEL_END
|
||||
};
|
||||
|
||||
static const ADExtraGuiOptionsMap optionsList[] = {
|
||||
{
|
||||
GAMEOPTION_IMPROVED,
|
||||
{
|
||||
_s("Improved mode"),
|
||||
_s("Removes some repetitive actions, adds possibility to change verbs by keyboard"),
|
||||
"improved",
|
||||
true,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
GAMEOPTION_TTS,
|
||||
{
|
||||
_s("Enable Text to Speech"),
|
||||
_s("Use TTS to read the descriptions (if TTS is available)"),
|
||||
"tts_enabled",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
static const PlainGameDescriptor supernovaGames[] = {
|
||||
{"msn1", "Mission Supernova 1"},
|
||||
{"msn2", "Mission Supernova 2"},
|
||||
@ -123,7 +92,7 @@ static const ADGameDescription gameDescriptions[] = {
|
||||
|
||||
class SupernovaMetaEngineDetection: public AdvancedMetaEngineDetection {
|
||||
public:
|
||||
SupernovaMetaEngineDetection() : AdvancedMetaEngineDetection(Supernova::gameDescriptions, sizeof(ADGameDescription), supernovaGames, optionsList) {
|
||||
SupernovaMetaEngineDetection() : AdvancedMetaEngineDetection(Supernova::gameDescriptions, sizeof(ADGameDescription), supernovaGames) {
|
||||
}
|
||||
|
||||
const char *getName() const override {
|
||||
|
28
engines/supernova/detection.h
Normal file
28
engines/supernova/detection.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SUPERNOVA_DETECTION_H
|
||||
#define SUPERNOVA_DETECTION_H
|
||||
|
||||
#define GAMEOPTION_IMPROVED GUIO_GAMEOPTIONS1
|
||||
#define GAMEOPTION_TTS GUIO_GAMEOPTIONS2
|
||||
|
||||
#endif
|
@ -24,10 +24,40 @@
|
||||
#include "common/gui_options.h"
|
||||
#include "common/savefile.h"
|
||||
#include "common/system.h"
|
||||
#include "common/translation.h"
|
||||
#include "graphics/thumbnail.h"
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
#include "supernova/supernova.h"
|
||||
#include "supernova/detection.h"
|
||||
|
||||
static const ADExtraGuiOptionsMap optionsList[] = {
|
||||
{
|
||||
GAMEOPTION_IMPROVED,
|
||||
{
|
||||
_s("Improved mode"),
|
||||
_s("Removes some repetitive actions, adds possibility to change verbs by keyboard"),
|
||||
"improved",
|
||||
true,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
GAMEOPTION_TTS,
|
||||
{
|
||||
_s("Enable Text to Speech"),
|
||||
_s("Use TTS to read the descriptions (if TTS is available)"),
|
||||
"tts_enabled",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
class SupernovaMetaEngine : public AdvancedMetaEngine {
|
||||
public:
|
||||
@ -35,6 +65,10 @@ public:
|
||||
return "supernova";
|
||||
}
|
||||
|
||||
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
|
||||
return optionsList;
|
||||
}
|
||||
|
||||
bool hasFeature(MetaEngineFeature f) const override;
|
||||
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user