Merge pull request #215 from eriktorbjorn/gui-options

Add missing GUI options
This commit is contained in:
Filippos Karapetis 2012-03-25 06:10:58 -07:00
commit 2ac5ce42e8
2 changed files with 31 additions and 0 deletions

View File

@ -30,6 +30,7 @@
#include "common/system.h"
#include "common/events.h"
#include "common/textconsole.h"
#include "common/translation.h"
#include "engines/util.h"
@ -54,6 +55,13 @@ static const PlainGameDescriptor queenGameDescriptor = {
"queen", "Flight of the Amazon Queen"
};
static const ExtraGuiOption queenExtraGuiOption = {
_s("Alternative intro"),
_s("Use an alternative game intro (CD version only)"),
"alt_intro",
false
};
class QueenMetaEngine : public MetaEngine {
public:
virtual const char *getName() const;
@ -61,6 +69,7 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual GameList getSupportedGames() const;
virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
virtual GameDescriptor findGame(const char *gameid) const;
virtual GameList detectGames(const Common::FSList &fslist) const;
virtual SaveStateList listSaves(const char *target) const;
@ -96,6 +105,12 @@ GameList QueenMetaEngine::getSupportedGames() const {
return games;
}
const ExtraGuiOptions QueenMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(queenExtraGuiOption);
return options;
}
GameDescriptor QueenMetaEngine::findGame(const char *gameid) const {
if (0 == scumm_stricmp(gameid, queenGameDescriptor.gameid)) {
return queenGameDescriptor;

View File

@ -27,17 +27,26 @@
#include "common/config-manager.h"
#include "engines/advancedDetector.h"
#include "engines/metaengine.h"
#include "common/system.h"
#include "common/file.h"
#include "common/fs.h"
#include "common/savefile.h"
#include "common/textconsole.h"
#include "common/translation.h"
#include "engines/metaengine.h"
static const PlainGameDescriptor skySetting =
{"sky", "Beneath a Steel Sky" };
static const ExtraGuiOption skyExtraGuiOption = {
_s("Floppy intro"),
_s("Use the floppy verion's intro (CD version only)"),
"alt_intro",
false
};
struct SkyVersion {
int dinnerTableEntries;
int dataDiskSize;
@ -68,6 +77,7 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual GameList getSupportedGames() const;
virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
virtual GameDescriptor findGame(const char *gameid) const;
virtual GameList detectGames(const Common::FSList &fslist) const;
@ -106,6 +116,12 @@ GameList SkyMetaEngine::getSupportedGames() const {
return games;
}
const ExtraGuiOptions SkyMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(skyExtraGuiOption);
return options;
}
GameDescriptor SkyMetaEngine::findGame(const char *gameid) const {
if (0 == scumm_stricmp(gameid, skySetting.gameid))
return skySetting;