SWORD2: Add a custom game option to toggle object labels

This commit is contained in:
Filippos Karapetis 2012-03-25 16:31:27 +03:00
parent 24d758e5ef
commit 4dc2f2d433

View File

@ -32,6 +32,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "common/translation.h"
#include "engines/metaengine.h"
#include "engines/util.h"
@ -74,6 +75,13 @@ static const GameSettings sword2_settings[] = {
} // End of namespace Sword2
static const ExtraGuiOption sword2ExtraGuiOption = {
_s("Show object labels"),
_s("Show labels for objects on mouse hover"),
"object_labels",
false
};
class Sword2MetaEngine : public MetaEngine {
public:
virtual const char *getName() const {
@ -85,6 +93,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;
@ -119,6 +128,12 @@ GameList Sword2MetaEngine::getSupportedGames() const {
return games;
}
const ExtraGuiOptions Sword2MetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(sword2ExtraGuiOption);
return options;
}
GameDescriptor Sword2MetaEngine::findGame(const char *gameid) const {
const Sword2::GameSettings *g = Sword2::sword2_settings;
while (g->gameid) {