Skip to content

Commit

Permalink
AGI: mouse support cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kiewitz committed May 15, 2015
1 parent e339cd6 commit b39b154
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 42 deletions.
7 changes: 3 additions & 4 deletions engines/agi/agi.cpp
Expand Up @@ -508,7 +508,7 @@ AgiBase::AgiBase(OSystem *syst, const AGIGameDescription *gameDesc) : Engine(sys
// Assign default values to the config manager, in case settings are missing
ConfMan.registerDefault("originalsaveload", "false");
ConfMan.registerDefault("altamigapalette", "false");
ConfMan.registerDefault("enablemouse", "true");
ConfMan.registerDefault("mousesupport", "true");

_noSaveLoadAllowed = false;

Expand Down Expand Up @@ -564,9 +564,8 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
memset(&_mouse, 0, sizeof(struct Mouse));

_game.mouseEnabled = true;
if (!ConfMan.getBool("enablemouse")) {
// we actually do disable mouse instead of enabling it in case the option is set
// that's because we do not show the option at all for all Amiga games and certain fanmade games
if (!ConfMan.getBool("mousesupport")) {
// we effectively disable the mouse for games, that explicitly do not want mouse support to be enabled
_game.mouseEnabled = false;
}

Expand Down
41 changes: 3 additions & 38 deletions engines/agi/detection.cpp
Expand Up @@ -138,27 +138,6 @@ static const PlainGameDescriptor agiGames[] = {
{0, 0}
};

static const ExtraGuiOption agiExtraGuiOption = {
_s("Use original save/load screens"),
_s("Use the original save/load screens, instead of the ScummVM ones"),
"originalsaveload",
false
};

static const ExtraGuiOption agiExtraGuiOptionAmiga = {
_s("Use an alternative palette"),
_s("Use an alternative palette, common for all Amiga games. This was the old behavior"),
"altamigapalette",
false
};

static const ExtraGuiOption agiExtraGuiOptionEnableMouse = {
_s("Enable mouse"),
_s("Enables mouse. Games, that require a mouse, will have mouse always enabled."),
"enablemouse",
true
};

#include "agi/detection_tables.h"

static const ADExtraGuiOptionsMap optionsList[] = {
Expand All @@ -185,9 +164,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_DISABLE_MOUSE,
{
_s("Enable mouse"),
_s("Enables mouse. Games, that require a mouse, will have mouse always enabled."),
"enablemouse",
_s("Mouse support"),
_s("Enables mouse support. Allows to use mouse for movement and in game menus."),
"mousesupport",
true
}
},
Expand Down Expand Up @@ -216,7 +195,6 @@ class AgiMetaEngine : public AdvancedMetaEngine {

virtual bool hasFeature(MetaEngineFeature f) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
//virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
virtual SaveStateList listSaves(const char *target) const;
virtual int getMaximumSaveSlot() const;
virtual void removeSaveState(const char *target, int slot) const;
Expand Down Expand Up @@ -275,19 +253,6 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD
return res;
}

// TODO: original 2 gui engine options are not shown for games, that were detected before our change
// because gui-options from the detection-table are saved internally.
// I also can't set those 2 options manually in case they were not set by optionsList[]
#if 0
const ExtraGuiOptions AgiMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(agiExtraGuiOption);
if (target.contains("-amiga"))
options.push_back(agiExtraGuiOptionAmiga);
return options;
}
#endif

SaveStateList AgiMetaEngine::listSaves(const char *target) const {
const uint32 AGIflag = MKTAG('A','G','I',':');
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Expand Down

0 comments on commit b39b154

Please sign in to comment.