mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
SWORD2: Move the engine options into the MetaEngine subclass
This commit is contained in:
parent
32c49c29be
commit
b272c96668
@ -1,3 +1,3 @@
|
||||
engines/sword2/animation.cpp
|
||||
engines/sword2/detection.cpp
|
||||
engines/sword2/metaengine.cpp
|
||||
engines/sword2/sword2.cpp
|
||||
|
@ -21,8 +21,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
#include "engines/obsolete.h"
|
||||
|
||||
@ -43,28 +41,9 @@ static const char *const directoryGlobs[] = {
|
||||
nullptr
|
||||
};
|
||||
|
||||
namespace Sword2 {
|
||||
|
||||
static const ADExtraGuiOptionsMap optionsList[] = {
|
||||
{
|
||||
GAMEOPTION_OBJECT_LABELS,
|
||||
{
|
||||
_s("Show object labels"),
|
||||
_s("Show labels for objects on mouse hover"),
|
||||
"object_labels",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
} // End of namespace Sword2
|
||||
|
||||
class Sword2MetaEngineDetection : public AdvancedMetaEngineDetection {
|
||||
public:
|
||||
Sword2MetaEngineDetection() : AdvancedMetaEngineDetection(Sword2::gameDescriptions, sizeof(Sword2::Sword2GameDescription), sword2Games, Sword2::optionsList) {
|
||||
Sword2MetaEngineDetection() : AdvancedMetaEngineDetection(Sword2::gameDescriptions, sizeof(Sword2::Sword2GameDescription), sword2Games) {
|
||||
_guiOptions = GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_OBJECT_LABELS);
|
||||
_maxScanDepth = 2;
|
||||
_directoryGlobs = directoryGlobs;
|
||||
|
@ -39,6 +39,8 @@ struct Sword2GameDescription {
|
||||
uint32 features;
|
||||
};
|
||||
|
||||
#define GAMEOPTION_OBJECT_LABELS GUIO_GAMEOPTIONS1
|
||||
|
||||
} // End of namespace Sword2
|
||||
|
||||
#endif // SWORD2_DETECTION_H
|
||||
|
@ -21,8 +21,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define GAMEOPTION_OBJECT_LABELS GUIO_GAMEOPTIONS1
|
||||
|
||||
namespace Sword2 {
|
||||
|
||||
static const Sword2GameDescription gameDescriptions[] = {
|
||||
|
@ -31,17 +31,41 @@
|
||||
#include "common/gui_options.h"
|
||||
#include "common/savefile.h"
|
||||
#include "common/system.h"
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "sword2/sword2.h"
|
||||
#include "sword2/saveload.h"
|
||||
#include "sword2/obsolete.h"
|
||||
|
||||
namespace Sword2 {
|
||||
|
||||
static const ADExtraGuiOptionsMap optionsList[] = {
|
||||
{
|
||||
GAMEOPTION_OBJECT_LABELS,
|
||||
{
|
||||
_s("Show object labels"),
|
||||
_s("Show labels for objects on mouse hover"),
|
||||
"object_labels",
|
||||
false,
|
||||
0,
|
||||
0
|
||||
}
|
||||
},
|
||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||
};
|
||||
|
||||
} // End of namespace Sword2
|
||||
|
||||
class Sword2MetaEngine : public AdvancedMetaEngine {
|
||||
public:
|
||||
const char *getName() const override {
|
||||
return "sword2";
|
||||
}
|
||||
|
||||
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
|
||||
return Sword2::optionsList;
|
||||
}
|
||||
|
||||
bool hasFeature(MetaEngineFeature f) const override;
|
||||
|
||||
SaveStateList listSaves(const char *target) const override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user