mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
HYPNO: Move the engine options into the MetaEngine subclass
This commit is contained in:
parent
328c2333c9
commit
a7cfc03df0
@ -1 +1 @@
|
||||
engines/hypno/detection.cpp
|
||||
engines/hypno/metaengine.cpp
|
||||
|
@ -20,15 +20,9 @@
|
||||
*/
|
||||
|
||||
#include "base/plugins.h"
|
||||
#include "common/translation.h"
|
||||
#include "engines/advancedDetector.h"
|
||||
#include "hypno/hypno.h"
|
||||
|
||||
#define GAMEOPTION_ORIGINAL_CHEATS GUIO_GAMEOPTIONS1
|
||||
#define GAMEOPTION_INFINITE_HEALTH GUIO_GAMEOPTIONS2
|
||||
#define GAMEOPTION_INFINITE_AMMO GUIO_GAMEOPTIONS3
|
||||
#define GAMEOPTION_UNLOCK_ALL_LEVELS GUIO_GAMEOPTIONS4
|
||||
#define GAMEOPTION_RESTORED_CONTENT GUIO_GAMEOPTIONS5
|
||||
#include "hypno/detection.h"
|
||||
|
||||
static const DebugChannelDef debugFlagList[] = {
|
||||
{Hypno::kHypnoDebugMedia, "media", "Media debug channel"},
|
||||
@ -251,65 +245,6 @@ static const ADGameDescription gameDescriptions[] = {
|
||||
AD_TABLE_END_MARKER
|
||||
};
|
||||
|
||||
static const ADExtraGuiOptionsMap optionsList[] = {
|
||||
{
|
||||
GAMEOPTION_ORIGINAL_CHEATS,
|
||||
{
|
||||
_s("Enable original cheats"),
|
||||
_s("Allow cheats using the C key."),
|
||||
"cheats",
|
||||
true,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_INFINITE_HEALTH,
|
||||
{
|
||||
_s("Enable infinite health cheat"),
|
||||
_s("Player health will never decrease (except for game over scenes)."),
|
||||
"infiniteHealth",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_INFINITE_AMMO,
|
||||
{
|
||||
_s("Enable infinite ammo cheat"),
|
||||
_s("Player ammo will never decrease."),
|
||||
"infiniteAmmo",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_UNLOCK_ALL_LEVELS,
|
||||
{
|
||||
_s("Unlock all levels"),
|
||||
_s("All levels will be available to play."),
|
||||
"unlockAllLevels",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_RESTORED_CONTENT,
|
||||
{
|
||||
_s("Enable restored content"),
|
||||
_s("Add additional content that is not enabled the original implementation."),
|
||||
"restored",
|
||||
true,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
} // End of namespace Hypno
|
||||
|
||||
static const char *const directoryGlobs[] = {
|
||||
@ -328,7 +263,7 @@ static const char *const directoryGlobs[] = {
|
||||
|
||||
class HypnoMetaEngineDetection : public AdvancedMetaEngineDetection {
|
||||
public:
|
||||
HypnoMetaEngineDetection() : AdvancedMetaEngineDetection(Hypno::gameDescriptions, sizeof(ADGameDescription), Hypno::hypnoGames, Hypno::optionsList) {
|
||||
HypnoMetaEngineDetection() : AdvancedMetaEngineDetection(Hypno::gameDescriptions, sizeof(ADGameDescription), Hypno::hypnoGames) {
|
||||
_guiOptions = GUIO6(GUIO_NOMIDI, GAMEOPTION_ORIGINAL_CHEATS, GAMEOPTION_INFINITE_HEALTH, GAMEOPTION_INFINITE_AMMO, GAMEOPTION_UNLOCK_ALL_LEVELS, GAMEOPTION_RESTORED_CONTENT);
|
||||
_maxScanDepth = 3;
|
||||
_directoryGlobs = directoryGlobs;
|
||||
|
31
engines/hypno/detection.h
Normal file
31
engines/hypno/detection.h
Normal file
@ -0,0 +1,31 @@
|
||||
/* 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 HYPNO_DETECTION_H
|
||||
#define HYPNO_DETECTION_H
|
||||
|
||||
#define GAMEOPTION_ORIGINAL_CHEATS GUIO_GAMEOPTIONS1
|
||||
#define GAMEOPTION_INFINITE_HEALTH GUIO_GAMEOPTIONS2
|
||||
#define GAMEOPTION_INFINITE_AMMO GUIO_GAMEOPTIONS3
|
||||
#define GAMEOPTION_UNLOCK_ALL_LEVELS GUIO_GAMEOPTIONS4
|
||||
#define GAMEOPTION_RESTORED_CONTENT GUIO_GAMEOPTIONS5
|
||||
|
||||
#endif
|
@ -21,7 +21,69 @@
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "hypno/hypno.h"
|
||||
#include "hypno/detection.h"
|
||||
|
||||
static const ADExtraGuiOptionsMap optionsList[] = {
|
||||
{
|
||||
GAMEOPTION_ORIGINAL_CHEATS,
|
||||
{
|
||||
_s("Enable original cheats"),
|
||||
_s("Allow cheats using the C key."),
|
||||
"cheats",
|
||||
true,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_INFINITE_HEALTH,
|
||||
{
|
||||
_s("Enable infinite health cheat"),
|
||||
_s("Player health will never decrease (except for game over scenes)."),
|
||||
"infiniteHealth",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_INFINITE_AMMO,
|
||||
{
|
||||
_s("Enable infinite ammo cheat"),
|
||||
_s("Player ammo will never decrease."),
|
||||
"infiniteAmmo",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_UNLOCK_ALL_LEVELS,
|
||||
{
|
||||
_s("Unlock all levels"),
|
||||
_s("All levels will be available to play."),
|
||||
"unlockAllLevels",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
{
|
||||
GAMEOPTION_RESTORED_CONTENT,
|
||||
{
|
||||
_s("Enable restored content"),
|
||||
_s("Add additional content that is not enabled the original implementation."),
|
||||
"restored",
|
||||
true,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
class HypnoMetaEngine : public AdvancedMetaEngine {
|
||||
public:
|
||||
@ -29,6 +91,10 @@ public:
|
||||
return "hypno";
|
||||
}
|
||||
|
||||
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
|
||||
return optionsList;
|
||||
}
|
||||
|
||||
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user