diff --git a/engines/griffon/detection.cpp b/engines/griffon/detection.cpp index c6ba927475a..d80f8151406 100644 --- a/engines/griffon/detection.cpp +++ b/engines/griffon/detection.cpp @@ -23,34 +23,14 @@ #include "engines/advancedDetector.h" #include "common/text-to-speech.h" -#include "common/translation.h" + +#include "griffon/detection.h" static const PlainGameDescriptor griffonGames[] = { {"griffon", "The Griffon Legend"}, {nullptr, nullptr} }; -#ifdef USE_TTS - -#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS1 - -static const ADExtraGuiOptionsMap optionsList[] = { - { - GAMEOPTION_TTS_NARRATOR, - { - _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 -}; - -#endif - namespace Griffon { static const ADGameDescription gameDescriptions[] = { @@ -75,11 +55,7 @@ static const ADGameDescription gameDescriptions[] = { class GriffonMetaEngineDetection: public AdvancedMetaEngineDetection { public: - GriffonMetaEngineDetection() : AdvancedMetaEngineDetection(Griffon::gameDescriptions, sizeof(ADGameDescription), griffonGames -#ifdef USE_TTS - , optionsList -#endif - ) { + GriffonMetaEngineDetection() : AdvancedMetaEngineDetection(Griffon::gameDescriptions, sizeof(ADGameDescription), griffonGames) { } const char *getName() const override { diff --git a/engines/griffon/detection.h b/engines/griffon/detection.h new file mode 100644 index 00000000000..92321975c48 --- /dev/null +++ b/engines/griffon/detection.h @@ -0,0 +1,27 @@ +/* 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 . + * + */ + +#ifndef GRIFFON_DETECTION_H +#define GRIFFON_DETECTION_H + +#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS1 + +#endif diff --git a/engines/griffon/metaengine.cpp b/engines/griffon/metaengine.cpp index 990688c18e0..838e89db58b 100644 --- a/engines/griffon/metaengine.cpp +++ b/engines/griffon/metaengine.cpp @@ -29,6 +29,26 @@ #include "backends/keymapper/standard-actions.h" #include "griffon/griffon.h" +#include "griffon/detection.h" + +#ifdef USE_TTS + +static const ADExtraGuiOptionsMap optionsList[] = { + { + GAMEOPTION_TTS_NARRATOR, + { + _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 +}; + +#endif class GriffonMetaEngine: public AdvancedMetaEngine { public: @@ -36,6 +56,12 @@ public: return "griffon"; } +#ifdef USE_TTS + const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override { + return optionsList; + } +#endif + int getMaximumSaveSlot() const override { return ConfMan.getInt("autosave_period") ? 4 : 3; }