aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/detection.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2012-03-19 03:39:14 +0200
committerJohannes Schickel2012-03-19 21:04:29 +0100
commit96f132994f4919df8064683c2d7f22671d184fa3 (patch)
tree53a4eb9aba1023d4f611dc39d9e943e20fb94ad4 /engines/sci/detection.cpp
parenteabdf8048ea579013c193ba515395a6c61354e8f (diff)
downloadscummvm-rg350-96f132994f4919df8064683c2d7f22671d184fa3.tar.gz
scummvm-rg350-96f132994f4919df8064683c2d7f22671d184fa3.tar.bz2
scummvm-rg350-96f132994f4919df8064683c2d7f22671d184fa3.zip
SCI: Add per-game GUI option support.
Diffstat (limited to 'engines/sci/detection.cpp')
-rw-r--r--engines/sci/detection.cpp76
1 files changed, 72 insertions, 4 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index c43849056b..5cbe3633c7 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -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";