Merge pull request #211 from lordhoto/game-gui-options-v2

GUI: Game gui options
This commit is contained in:
Eugene Sandulenko 2012-03-25 01:38:46 -07:00
commit 9b2471aeee
28 changed files with 945 additions and 426 deletions

View File

@ -195,7 +195,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
}
// On creation the engine should have set up all debug levels so we can use
// the command line arugments here
// the command line arguments here
Common::StringTokenizer tokenizer(edebuglevels, " ,");
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
@ -206,6 +206,12 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
// Initialize any game-specific keymaps
engine->initKeymap();
// Set default values to the custom engine options
const ExtraGuiOptions engineOptions = (*plugin)->getExtraGuiOptions(ConfMan.getActiveDomainName());
for (uint i = 0; i < engineOptions.size(); i++) {
ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
}
// Inform backend that the engine is about to be run
system.engineInit();

View File

@ -64,6 +64,14 @@ const struct GameOpt {
{ GUIO_RENDERPC9821, "pc9821" },
{ GUIO_RENDERPC9801, "pc9801" },
{ GUIO_GAMEOPTIONS1, "gameOption1" },
{ GUIO_GAMEOPTIONS2, "gameOption2" },
{ GUIO_GAMEOPTIONS3, "gameOption3" },
{ GUIO_GAMEOPTIONS4, "gameOption4" },
{ GUIO_GAMEOPTIONS5, "gameOption5" },
{ GUIO_GAMEOPTIONS6, "gameOption6" },
{ GUIO_GAMEOPTIONS7, "gameOption7" },
{ GUIO_NONE, 0 }
};

View File

@ -56,6 +56,16 @@
#define GUIO_RENDERPC9821 "\037"
#define GUIO_RENDERPC9801 "\040"
// Special GUIO flags for the AdvancedDetector's caching of game specific
// options.
#define GUIO_GAMEOPTIONS1 "\041"
#define GUIO_GAMEOPTIONS2 "\042"
#define GUIO_GAMEOPTIONS3 "\043"
#define GUIO_GAMEOPTIONS4 "\044"
#define GUIO_GAMEOPTIONS5 "\045"
#define GUIO_GAMEOPTIONS6 "\046"
#define GUIO_GAMEOPTIONS7 "\047"
#define GUIO0() (GUIO_NONE)
#define GUIO1(a) (a)
#define GUIO2(a,b) (a b)
@ -63,6 +73,8 @@
#define GUIO4(a,b,c,d) (a b c d)
#define GUIO5(a,b,c,d,e) (a b c d e)
#define GUIO6(a,b,c,d,e,f) (a b c d e f)
#define GUIO7(a,b,c,d,e,f,g) (a b c d e f g)
#define GUIO8(a,b,c,d,e,f,g,h) (a b c d e f g h)
namespace Common {

View File

@ -1 +1 @@
[SCUMMVM_STX0.8.3:ScummVM Mobile Theme:No Author]
[SCUMMVM_STX0.8.9:ScummVM Mobile Theme:No Author]

View File

@ -621,6 +621,32 @@
</layout>
</dialog>
<dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
<layout type = 'vertical' padding = '16, 16, 16, 16'>
<widget name = 'customOption1Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption2Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption3Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption4Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption5Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption6Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption7Checkbox'
type = 'Checkbox'
/>
</layout>
</dialog>
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
<layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'>
<widget name = 'Logo'

View File

@ -167,6 +167,25 @@ GameList AdvancedMetaEngine::detectGames(const Common::FSList &fslist) const {
return detectedGames;
}
const ExtraGuiOptions AdvancedMetaEngine::getExtraGuiOptions(const Common::String &target) const {
if (!_extraGuiOptions)
return ExtraGuiOptions();
// Query the GUI options
const Common::String guiOptionsString = ConfMan.get("guioptions", target);
const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
ExtraGuiOptions options;
// Add all the applying extra GUI options.
for (const ADExtraGuiOptionsMap *entry = _extraGuiOptions; entry->guioFlag; ++entry) {
if (guiOptions.contains(entry->guioFlag))
options.push_back(entry->option);
}
return options;
}
Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(engine);
@ -562,8 +581,9 @@ GameDescriptor AdvancedMetaEngine::findGame(const char *gameid) const {
return GameDescriptor();
}
AdvancedMetaEngine::AdvancedMetaEngine(const void *descs, uint descItemSize, const PlainGameDescriptor *gameids)
: _gameDescriptors((const byte *)descs), _descItemSize(descItemSize), _gameids(gameids) {
AdvancedMetaEngine::AdvancedMetaEngine(const void *descs, uint descItemSize, const PlainGameDescriptor *gameids, const ADExtraGuiOptionsMap *extraGuiOptions)
: _gameDescriptors((const byte *)descs), _descItemSize(descItemSize), _gameids(gameids),
_extraGuiOptions(extraGuiOptions) {
_md5Bytes = 5000;
_singleid = NULL;

View File

@ -133,6 +133,24 @@ enum ADFlags {
};
/**
* Map entry for mapping GUIO_GAMEOPTIONS* to their ExtraGuiOption
* description.
*/
struct ADExtraGuiOptionsMap {
/**
* GUIO_GAMEOPTION* string.
*/
const char *guioFlag;
/**
* The associated option.
*/
ExtraGuiOption option;
};
#define AD_EXTRA_GUI_OPTIONS_TERMINATOR { 0, { 0, 0, 0, 0 } }
/**
* A MetaEngine implementation based around the advanced detector code.
*/
@ -158,6 +176,11 @@ protected:
*/
const PlainGameDescriptor *_gameids;
/**
* A map containing all the extra game GUI options the engine supports.
*/
const ADExtraGuiOptionsMap * const _extraGuiOptions;
/**
* The number of bytes to compute MD5 sum for. The AdvancedDetector
* is primarily based on computing and matching MD5 checksums of files.
@ -211,7 +234,7 @@ protected:
const char * const *_directoryGlobs;
public:
AdvancedMetaEngine(const void *descs, uint descItemSize, const PlainGameDescriptor *gameids);
AdvancedMetaEngine(const void *descs, uint descItemSize, const PlainGameDescriptor *gameids, const ADExtraGuiOptionsMap *extraGuiOptions = 0);
/**
* Returns list of targets supported by the engine.
@ -225,6 +248,8 @@ public:
virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
protected:
// To be implemented by subclasses
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const = 0;

View File

@ -24,6 +24,7 @@
#include "common/algorithm.h"
#include "common/system.h"
#include "common/translation.h"
#include "engines/advancedDetector.h"
@ -39,11 +40,36 @@ static const PlainGameDescriptor dreamWebGames[] = {
#include "dreamweb/detection_tables.h"
static const ADExtraGuiOptionsMap gameGuiOptions[] = {
{
GAMEOPTION_ORIGINAL_SAVELOAD,
{
_s("Use original save/load screens"),
_s("Use the original save/load screens, instead of the ScummVM ones"),
"dreamweb_originalsaveload",
false
}
},
{
GAMEOPTION_BRIGHTPALETTE,
{
_s("Use bright palette mode"),
_s("Display graphics using the game's bright palette"),
"bright_palette",
true
}
},
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
class DreamWebMetaEngine : public AdvancedMetaEngine {
public:
DreamWebMetaEngine():
AdvancedMetaEngine(DreamWeb::gameDescriptions,
sizeof(DreamWeb::DreamWebGameDescription), dreamWebGames) {
sizeof(DreamWeb::DreamWebGameDescription), dreamWebGames,
gameGuiOptions) {
_singleid = "dreamweb";
_guioptions = GUIO1(GUIO_NOMIDI);
}

View File

@ -25,6 +25,9 @@
namespace DreamWeb {
#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
#define GAMEOPTION_BRIGHTPALETTE GUIO_GAMEOPTIONS2
struct DreamWebGameDescription {
ADGameDescription desc;
};
@ -43,7 +46,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -60,7 +63,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_CD | ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -77,7 +80,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::EN_USA,
Common::kPlatformPC,
ADGF_CD,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -94,7 +97,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_CD | ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -111,7 +114,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -128,7 +131,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_CD | ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -145,7 +148,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::ES_ESP,
Common::kPlatformPC,
ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -162,7 +165,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::ES_ESP,
Common::kPlatformPC,
ADGF_CD | ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},
@ -179,7 +182,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
Common::IT_ITA,
Common::kPlatformPC,
ADGF_UNSTABLE,
GUIO0()
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
},

View File

@ -30,6 +30,7 @@
#include "common/config-manager.h"
#include "common/system.h"
#include "common/savefile.h"
#include "common/translation.h"
#include "engines/advancedDetector.h"
@ -50,11 +51,94 @@ const char *const directoryGlobs[] = {
0
};
const ADExtraGuiOptionsMap gameGuiOptions[] = {
// Kyrandia 3 options
// I18N: Studio audience adds an applause and cheering sounds whenever
// Malcolm makes a joke.
{
GAMEOPTION_KYRA3_AUDIENCE,
{
_s("Studio audience"),
_s("Enable studio audience"),
"studio_audience",
true
}
},
// I18N: When enabled, this option allows the user to skip text and cutscenes.
{
GAMEOPTION_KYRA3_SKIP,
{
_s("Skip support"),
_s("Allow text and cutscenes to be skipped"),
"skip_support",
true
}
},
// I18N: Helium mode makes people sound like they've inhaled Helium.
{
GAMEOPTION_KYRA3_HELIUM,
{
_s("Helium mode"),
_s("Enable helium mode"),
"helium_mode",
false
}
},
#ifdef ENABLE_LOL
// LoL options
// I18N: When enabled, this option makes scrolling smoother when changing
// from one screen to another.
{
GAMEOPTION_LOL_SCROLLING,
{
_s("Smooth scrolling"),
_s("Enable smooth scrolling when walking"),
"smooth_scrolling",
true
}
},
// I18N: When enabled, this option changes the cursor when it floats to the
// edge of the screen to a directional arrow. The player can then click to
// walk towards that direction.
{
GAMEOPTION_LOL_CURSORS,
{
_s("Floating cursors"),
_s("Enable floating cursors"),
"floating_cursors",
false
}
},
#endif
#ifdef ENABLE_EOB
// EoB options
{
GAMEOPTION_EOB_HPGRAPHS,
{
_s("HP bar graphs"),
_s("Enable hit point bar graphs"),
"hpbargraphs",
true
}
},
#endif
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
} // End of anonymous namespace
class KyraMetaEngine : public AdvancedMetaEngine {
public:
KyraMetaEngine() : AdvancedMetaEngine(adGameDescs, sizeof(KYRAGameDescription), gameList) {
KyraMetaEngine() : AdvancedMetaEngine(adGameDescs, sizeof(KYRAGameDescription), gameList, gameGuiOptions) {
_md5Bytes = 1024 * 1024;
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;

View File

@ -60,6 +60,15 @@ namespace {
#define EOB_FLAGS FLAGS(false, false, false, false, false, false, false, false, Kyra::GI_EOB1)
#define EOB2_FLAGS FLAGS(false, false, false, false, false, false, false, false, Kyra::GI_EOB2)
#define GAMEOPTION_KYRA3_AUDIENCE GUIO_GAMEOPTIONS1
#define GAMEOPTION_KYRA3_SKIP GUIO_GAMEOPTIONS2
#define GAMEOPTION_KYRA3_HELIUM GUIO_GAMEOPTIONS3
#define GAMEOPTION_LOL_SCROLLING GUIO_GAMEOPTIONS4
#define GAMEOPTION_LOL_CURSORS GUIO_GAMEOPTIONS5
#define GAMEOPTION_EOB_HPGRAPHS GUIO_GAMEOPTIONS6
const KYRAGameDescription adGameDescs[] = {
/* disable these targets until they get supported
{
@ -775,7 +784,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FLAGS
},
@ -791,7 +800,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FLAGS
},
@ -807,7 +816,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FLAGS
},
@ -825,7 +834,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_INS_FLAGS
},
@ -841,7 +850,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_INS_FLAGS
},
@ -857,7 +866,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_INS_FLAGS
},
@ -875,7 +884,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformMacintosh,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_INS_FLAGS
},
@ -891,7 +900,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformMacintosh,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_INS_FLAGS
},
@ -907,7 +916,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformMacintosh,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_INS_FLAGS
},
@ -925,7 +934,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::ES_ESP,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY)
},
@ -941,7 +950,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY)
},
@ -957,7 +966,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY)
},
@ -975,7 +984,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA)
},
@ -991,7 +1000,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA)
},
@ -1007,7 +1016,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::IT_ITA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE,
GUIO2(GUIO_NOMIDI, GUIO_RENDERVGA)
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA)
},
@ -1026,7 +1035,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FLAGS
},
@ -1043,7 +1052,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FLAGS
},
@ -1060,7 +1069,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FLAGS
},
@ -1077,7 +1086,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FLAGS
},
@ -1094,7 +1103,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FLAGS
},
@ -1111,7 +1120,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FLAGS
},
@ -1129,7 +1138,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::RU_RUS, Common::DE_DEU)
},
@ -1147,7 +1156,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::RU_RUS, Common::DE_DEU)
},
@ -1164,7 +1173,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::RU_RUS,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::RU_RUS, Common::DE_DEU)
},
@ -1182,7 +1191,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::IT_ITA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
@ -1199,7 +1208,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
@ -1216,7 +1225,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
@ -1233,7 +1242,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::IT_ITA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
@ -1250,7 +1259,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
@ -1267,7 +1276,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
@ -1283,7 +1292,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_CMP_FLAGS
},
@ -1299,7 +1308,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_CMP_FLAGS
},
@ -1315,7 +1324,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_CMP_FLAGS
},
@ -1332,7 +1341,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_FLAGS
},
@ -1349,7 +1358,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_FLAGS
},
@ -1366,7 +1375,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_FLAGS
},
@ -1383,7 +1392,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_FLAGS
},
@ -1401,7 +1410,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::RU_RUS,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_FLOPPY_FAN_FLAGS(Common::RU_RUS, Common::EN_ANY)
},
@ -1418,7 +1427,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::JA_JPN,
Common::kPlatformPC98,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC9801)
GUIO5(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC9801, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
LOL_PC98_SJIS_FLAGS
},
@ -1469,7 +1478,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_TESTING,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA)
GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
},
EOB_FLAGS
},
@ -1485,7 +1494,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_TESTING,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA)
GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
},
EOB_FLAGS
},
@ -1501,7 +1510,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_TESTING,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA)
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS)
},
EOB2_FLAGS
},
@ -1517,7 +1526,7 @@ const KYRAGameDescription adGameDescs[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_TESTING,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA)
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS)
},
EOB2_FLAGS
},

View File

@ -24,6 +24,7 @@
#include "common/scummsys.h"
#include "common/error.h"
#include "common/array.h"
#include "engines/game.h"
#include "engines/savestate.h"
@ -38,6 +39,19 @@ class FSList;
class String;
}
/**
* Per-game extra GUI options structure.
* Currently, this can only be used for options with checkboxes.
*/
struct ExtraGuiOption {
const char *label; // option label, e.g. "Fullscreen mode"
const char *tooltip; // option tooltip (when the mouse hovers above it)
const char *configOption; // confMan key, e.g. "fullscreen"
bool defaultState; // the detault state of the checkbox (checked or not)
};
typedef Common::Array<ExtraGuiOption> ExtraGuiOptions;
/**
* A meta engine is essentially a factory for Engine instances with the
* added ability of listing and detecting supported games.
@ -97,6 +111,16 @@ public:
return SaveStateList();
}
/**
* Return a list of extra GUI options.
* Currently, this only supports options with checkboxes.
*
* The default implementation returns an empty list.
*/
virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const {
return ExtraGuiOptions();
}
/**
* Return the maximum save slot that the engine supports.
*

View File

@ -26,6 +26,7 @@
#include "common/ptr.h"
#include "common/savefile.h"
#include "common/system.h"
#include "common/translation.h"
#include "graphics/thumbnail.h"
#include "graphics/surface.h"
@ -362,6 +363,73 @@ Common::String convertSierraGameId(Common::String sierraId, uint32 *gameFlags, R
#include "sci/detection_tables.h"
static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_PREFER_DIGITAL_SFX,
{
_s("Prefer digital sound effects"),
_s("Prefer digital sound effects instead of synthesized ones"),
"prefer_digitalsfx",
true
}
},
{
GAMEOPTION_ORIGINAL_SAVELOAD,
{
_s("Use original save/load screens"),
_s("Use the original save/load screens, instead of the ScummVM ones"),
"sci_originalsaveload",
false
}
},
{
GAMEOPTION_FB01_MIDI,
{
_s("Use IMF/Yahama FB-01 for MIDI output"),
_s("Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI output"),
"native_fb01",
false
}
},
// Jones in the Fast Lane - CD audio tracks or resource.snd
{
GAMEOPTION_JONES_CDAUDIO,
{
_s("Use CD audio"),
_s("Use CD audio instead of in-game audio, if available"),
"use_cdaudio",
true
}
},
// KQ6 Windows - windows cursors
{
GAMEOPTION_KQ6_WINDOWS_CURSORS,
{
_s("Use Windows cursors"),
_s("Use the Windows cursors (smaller and monochrome) instead of the DOS ones"),
"windows_cursors",
false
}
},
// SQ4 CD - silver cursors
{
GAMEOPTION_SQ4_SILVER_CURSORS,
{
_s("Use silver cursors"),
_s("Use the alternate set of silver cursors, instead of the normal golden ones"),
"silver_cursors",
false
}
},
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
/**
* The fallback game descriptor used by the SCI engine's fallbackDetector.
* Contents of this struct are overwritten by the fallbackDetector.
@ -373,14 +441,14 @@ static ADGameDescription s_fallbackDesc = {
Common::UNK_LANG,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO0()
GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI)
};
static char s_fallbackGameIdBuf[256];
class SciMetaEngine : public AdvancedMetaEngine {
public:
SciMetaEngine() : AdvancedMetaEngine(Sci::SciGameDescriptions, sizeof(ADGameDescription), s_sciGameTitles) {
SciMetaEngine() : AdvancedMetaEngine(Sci::SciGameDescriptions, sizeof(ADGameDescription), s_sciGameTitles, optionsList) {
_singleid = "sci";
}
@ -435,7 +503,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
s_fallbackDesc.flags = ADGF_NO_FLAGS;
s_fallbackDesc.platform = Common::kPlatformPC; // default to PC platform
s_fallbackDesc.gameid = "sci";
s_fallbackDesc.guioptions = GUIO0();
s_fallbackDesc.guioptions = GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI);
if (allFiles.contains("resource.map") || allFiles.contains("Data1")
|| allFiles.contains("resmap.001") || allFiles.contains("resmap.001")) {
@ -565,7 +633,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
const bool isCD = (s_fallbackDesc.flags & ADGF_CD);
if (!isCD)
s_fallbackDesc.guioptions = GUIO1(GUIO_NOSPEECH);
s_fallbackDesc.guioptions = GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI);
if (gameId.hasSuffix("sci")) {
s_fallbackDesc.extra = "SCI";

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,7 @@
#include "graphics/pixelformat.h"
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.8"
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.9"
class OSystem;

View File

@ -145,11 +145,28 @@ protected:
CheckboxWidget *_globalMIDIOverride;
CheckboxWidget *_globalMT32Override;
CheckboxWidget *_globalVolumeOverride;
ExtraGuiOptions _engineOptions;
};
EditGameDialog::EditGameDialog(const String &domain, const String &desc)
: OptionsDialog(domain, "GameOptions") {
// Retrieve all game specific options.
const EnginePlugin *plugin = 0;
// To allow for game domains without a gameid.
// TODO: Is it intentional that this is still supported?
String gameId(ConfMan.get("gameid", domain));
if (gameId.empty())
gameId = domain;
// Retrieve the plugin, since we need to access the engine's MetaEngine
// implementation.
EngineMan.findGame(gameId, &plugin);
if (plugin) {
_engineOptions = (*plugin)->getExtraGuiOptions(domain);
} else {
warning("Plugin for target \"%s\" not found! Game specific settings might be missing", domain.c_str());
}
// GAME: Path to game data (r/o), extra data (r/o), and save data (r/w)
String gamePath(ConfMan.get("path", _domain));
String extraPath(ConfMan.get("extrapath", _domain));
@ -208,7 +225,16 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
}
//
// 2) The graphics tab
// 2) The engine tab (shown only if there are custom engine options)
//
if (_engineOptions.size() > 0) {
tab->addTab(_("Engine"));
addEngineControls(tab, "GameOptions_Engine.", _engineOptions);
}
//
// 3) The graphics tab
//
_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"));
@ -220,7 +246,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
addGraphicControls(tab, "GameOptions_Graphics.");
//
// 3) The audio tab
// 4) The audio tab
//
tab->addTab(_("Audio"));
@ -233,7 +259,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
addSubtitleControls(tab, "GameOptions_Audio.");
//
// 4) The volume tab
// 5) The volume tab
//
if (g_system->getOverlayWidth() > 320)
tab->addTab(_("Volume"));
@ -248,7 +274,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
addVolumeControls(tab, "GameOptions_Volume.");
//
// 5) The MIDI tab
// 6) The MIDI tab
//
if (!_guioptions.contains(GUIO_NOMIDI)) {
tab->addTab(_("MIDI"));
@ -262,7 +288,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
}
//
// 6) The MT-32 tab
// 7) The MT-32 tab
//
if (!_guioptions.contains(GUIO_NOMIDI)) {
tab->addTab(_("MT-32"));
@ -276,7 +302,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
}
//
// 7) The Paths tab
// 8) The Paths tab
//
if (g_system->getOverlayWidth() > 320)
tab->addTab(_("Paths"));
@ -311,7 +337,6 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
_savePathClearButton = addClearButton(tab, "GameOptions_Paths.SavePathClearButton", kCmdSavePathClear);
// Activate the first tab
tab->setActiveTab(0);
_tabWidget = tab;
@ -386,6 +411,19 @@ void EditGameDialog::open() {
_langPopUp->setEnabled(false);
}
// Set the state of engine-specific checkboxes
for (uint j = 0; j < _engineOptions.size(); ++j) {
// The default values for engine-specific checkboxes are not set when
// ScummVM starts, as this would require us to load and poll all of the
// engine plugins on startup. Thus, we set the state of each custom
// option checkbox to what is specified by the engine plugin, and
// update it only if a value has been set in the configuration of the
// currently selected game.
bool isChecked = _engineOptions[j].defaultState;
if (ConfMan.hasKey(_engineOptions[j].configOption, _domain))
isChecked = ConfMan.getBool(_engineOptions[j].configOption, _domain);
_engineCheckboxes[j]->setState(isChecked);
}
const Common::PlatformDescription *p = Common::g_platforms;
const Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", _domain));
@ -429,6 +467,11 @@ void EditGameDialog::close() {
ConfMan.removeKey("platform", _domain);
else
ConfMan.set("platform", Common::getPlatformCode(platform), _domain);
// Set the state of engine-specific checkboxes
for (uint i = 0; i < _engineOptions.size(); i++) {
ConfMan.setBool(_engineOptions[i].configOption, _engineCheckboxes[i]->getState(), _domain);
}
}
OptionsDialog::close();
}

View File

@ -997,6 +997,22 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
_enableVolumeSettings = true;
}
void OptionsDialog::addEngineControls(GuiObject *boss, const Common::String &prefix, const ExtraGuiOptions &engineOptions) {
// Note: up to 7 engine options can currently fit on screen (the most that
// can fit in a 320x200 screen with the classic theme).
// TODO: Increase this number by including the checkboxes inside a scroll
// widget. The appropriate number of checkboxes will need to be added to
// the theme files.
uint i = 1;
ExtraGuiOptions::const_iterator iter;
for (iter = engineOptions.begin(); iter != engineOptions.end(); ++iter, ++i) {
Common::String id = Common::String::format("%d", i);
_engineCheckboxes.push_back(new CheckboxWidget(boss,
prefix + "customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip)));
}
}
bool OptionsDialog::loadMusicDeviceSetting(PopUpWidget *popup, Common::String setting, MusicType preferredType) {
if (!popup || !popup->isEnabled())
return true;

View File

@ -22,6 +22,8 @@
#ifndef OPTIONS_DIALOG_H
#define OPTIONS_DIALOG_H
#include "engines/metaengine.h"
#include "gui/dialog.h"
#include "common/str.h"
#include "audio/mididrv.h"
@ -44,6 +46,8 @@ class RadiobuttonGroup;
class RadiobuttonWidget;
class OptionsDialog : public Dialog {
typedef Common::Array<CheckboxWidget *> CheckboxWidgetList;
public:
OptionsDialog(const Common::String &domain, int x, int y, int w, int h);
OptionsDialog(const Common::String &domain, const Common::String &name);
@ -74,6 +78,7 @@ protected:
// The default value is the launcher's non-scaled talkspeed value. When SCUMM uses the widget,
// it uses its own scale
void addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal = 255);
void addEngineControls(GuiObject *boss, const Common::String &prefix, const ExtraGuiOptions &engineOptions);
void setGraphicSettingsState(bool enabled);
void setAudioSettingsState(bool enabled);
@ -181,6 +186,11 @@ protected:
//Theme Options
//
Common::String _oldTheme;
//
// Engine-specific controls
//
CheckboxWidgetList _engineCheckboxes;
};

View File

@ -1187,6 +1187,31 @@
"</layout> "
"</layout> "
"</dialog> "
"<dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'> "
"<layout type = 'vertical' padding = '16, 16, 16, 16'> "
"<widget name = 'customOption1Checkbox' "
"type = 'Checkbox' "
"/> "
"<widget name = 'customOption2Checkbox' "
"type = 'Checkbox' "
"/> "
"<widget name = 'customOption3Checkbox' "
"type = 'Checkbox' "
"/> "
"<widget name = 'customOption4Checkbox' "
"type = 'Checkbox' "
"/> "
"<widget name = 'customOption5Checkbox' "
"type = 'Checkbox' "
"/> "
"<widget name = 'customOption6Checkbox' "
"type = 'Checkbox' "
"/> "
"<widget name = 'customOption7Checkbox' "
"type = 'Checkbox' "
"/> "
"</layout> "
"</dialog> "
"<dialog name='GlobalMenu' overlays='screen_center'> "
"<layout type='vertical' padding='2,2,4,6' center='true' spacing='6'> "
"<widget name='Title' "

Binary file not shown.

View File

@ -1 +1 @@
[SCUMMVM_STX0.8.8:ScummVM Classic Theme:No Author]
[SCUMMVM_STX0.8.9:ScummVM Classic Theme:No Author]

View File

@ -627,6 +627,32 @@
</layout>
</dialog>
<dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
<layout type = 'vertical' padding = '16, 16, 16, 16'>
<widget name = 'customOption1Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption2Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption3Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption4Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption5Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption6Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption7Checkbox'
type = 'Checkbox'
/>
</layout>
</dialog>
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
<layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'>
<widget name = 'Title'

View File

@ -639,6 +639,32 @@
</layout>
</dialog>
<dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'customOption1Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption2Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption3Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption4Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption5Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption6Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption7Checkbox'
type = 'Checkbox'
/>
</layout>
</dialog>
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
<layout type = 'vertical' padding = '2, 2, 4, 6' center = 'true' spacing='6'>
<widget name = 'Title'

Binary file not shown.

View File

@ -1 +1 @@
[SCUMMVM_STX0.8.8:ScummVM Modern Theme:No Author]
[SCUMMVM_STX0.8.9:ScummVM Modern Theme:No Author]

View File

@ -642,6 +642,32 @@
</layout>
</dialog>
<dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
<layout type = 'vertical' padding = '16, 16, 16, 16'>
<widget name = 'customOption1Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption2Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption3Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption4Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption5Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption6Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption7Checkbox'
type = 'Checkbox'
/>
</layout>
</dialog>
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
<layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'>
<widget name = 'Logo'

View File

@ -637,6 +637,32 @@
</layout>
</dialog>
<dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'customOption1Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption2Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption3Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption4Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption5Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption6Checkbox'
type = 'Checkbox'
/>
<widget name = 'customOption7Checkbox'
type = 'Checkbox'
/>
</layout>
</dialog>
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
<layout type = 'vertical' padding = '4, 4, 4, 4' center = 'true' spacing='2'>
<widget name = 'Title'

View File

@ -23,6 +23,8 @@ common/util.cpp
engines/advancedDetector.cpp
engines/dialogs.cpp
engines/engine.cpp
engines/dreamweb/detection.cpp
engines/sci/detection.cpp
engines/scumm/dialogs.cpp
engines/scumm/help.cpp
engines/scumm/scumm.cpp
@ -37,6 +39,7 @@ engines/gob/inter_playtoons.cpp
engines/gob/inter_v2.cpp
engines/gob/inter_v5.cpp
engines/groovie/script.cpp
engines/kyra/detection.cpp
engines/kyra/lol.cpp
engines/kyra/sound_midi.cpp
engines/sky/compact.cpp