aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/mididrv.cpp1
-rw-r--r--base/commandLine.cpp3
-rw-r--r--common/gui_options.cpp132
-rw-r--r--common/gui_options.h88
-rw-r--r--common/module.mk2
-rw-r--r--common/rendermode.cpp81
-rw-r--r--common/rendermode.h67
-rw-r--r--common/util.cpp151
-rw-r--r--common/util.h88
-rw-r--r--engines/advancedDetector.h2
-rw-r--r--engines/agi/agi.h1
-rw-r--r--engines/game.cpp1
-rw-r--r--engines/kyra/kyra_v1.h3
-rw-r--r--engines/kyra/screen.h1
-rw-r--r--engines/queen/queen.cpp1
-rw-r--r--engines/scumm/detection_tables.h1
-rw-r--r--engines/scumm/scumm.h2
-rw-r--r--engines/sword1/detection.cpp1
-rw-r--r--engines/sword2/sword2.cpp3
-rw-r--r--gui/launcher.cpp1
-rw-r--r--gui/options.cpp2
21 files changed, 391 insertions, 241 deletions
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 6817791c6b..0518915e81 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -22,6 +22,7 @@
#include "common/config-manager.h"
#include "common/error.h"
+#include "common/gui_options.h"
#include "common/str.h"
#include "common/system.h"
#include "common/textconsole.h"
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index aa589ed15f..08838167e9 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -33,9 +33,10 @@
#include "base/version.h"
#include "common/config-manager.h"
+#include "common/fs.h"
+#include "common/rendermode.h"
#include "common/system.h"
#include "common/textconsole.h"
-#include "common/fs.h"
#include "gui/ThemeEngine.h"
diff --git a/common/gui_options.cpp b/common/gui_options.cpp
new file mode 100644
index 0000000000..5b7d939dc4
--- /dev/null
+++ b/common/gui_options.cpp
@@ -0,0 +1,132 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/gui_options.h"
+
+#include "common/config-manager.h"
+#include "common/str.h"
+
+namespace Common {
+
+const struct GameOpt {
+ const char *option;
+ const char *desc;
+} g_gameOptions[] = {
+ { GUIO_NOSUBTITLES, "sndNoSubs" },
+ { GUIO_NOMUSIC, "sndNoMusic" },
+ { GUIO_NOSPEECH, "sndNoSpeech" },
+ { GUIO_NOSFX, "sndNoSFX" },
+ { GUIO_NOMIDI, "sndNoMIDI" },
+
+ { GUIO_NOLAUNCHLOAD, "launchNoLoad" },
+
+ { GUIO_MIDIPCSPK, "midiPCSpk" },
+ { GUIO_MIDICMS, "midiCMS" },
+ { GUIO_MIDIPCJR, "midiPCJr" },
+ { GUIO_MIDIADLIB, "midiAdLib" },
+ { GUIO_MIDIC64, "midiC64" },
+ { GUIO_MIDIAMIGA, "midiAmiga" },
+ { GUIO_MIDIAPPLEIIGS,"midiAppleIIgs" },
+ { GUIO_MIDITOWNS, "midiTowns" },
+ { GUIO_MIDIPC98, "midiPC98" },
+ { GUIO_MIDIMT32, "midiMt32" },
+ { GUIO_MIDIGM, "midiGM" },
+
+ { GUIO_NOASPECT, "noAspect" },
+ { GUIO_EGAUNDITHER, "egaUndither" },
+
+ { GUIO_RENDERHERCGREEN, "hercGreen" },
+ { GUIO_RENDERHERCAMBER, "hercAmber" },
+ { GUIO_RENDERCGA, "cga" },
+ { GUIO_RENDEREGA, "ega" },
+ { GUIO_RENDERVGA, "vga" },
+ { GUIO_RENDERAMIGA, "amiga" },
+ { GUIO_RENDERFMTOWNS, "fmtowns" },
+ { GUIO_RENDERPC9821, "pc9821" },
+ { GUIO_RENDERPC9801, "pc9801" },
+
+ { GUIO_NONE, 0 }
+};
+
+bool checkGameGUIOption(const String &option, const String &str) {
+ for (int i = 0; g_gameOptions[i].desc; i++) {
+ if (option.contains(g_gameOptions[i].option)) {
+ if (str.contains(g_gameOptions[i].desc))
+ return true;
+ else
+ return false;
+ }
+ }
+ return false;
+}
+
+bool checkGameGUIOptionLanguage(Language lang, const String &str) {
+ if (!str.contains("lang_")) // If no languages are specified
+ return true;
+
+ if (str.contains(getGameGUIOptionsDescriptionLanguage(lang)))
+ return true;
+
+ return false;
+}
+
+const String getGameGUIOptionsDescriptionLanguage(Language lang) {
+ if (lang == UNK_LANG)
+ return "";
+
+ return String("lang_") + getLanguageDescription(lang);
+}
+
+String parseGameGUIOptions(const String &str) {
+ String res;
+
+ for (int i = 0; g_gameOptions[i].desc; i++)
+ if (str.contains(g_gameOptions[i].desc))
+ res += g_gameOptions[i].option;
+
+ return res;
+}
+
+const String getGameGUIOptionsDescription(const String &options) {
+ String res;
+
+ for (int i = 0; g_gameOptions[i].desc; i++)
+ if (options.contains(g_gameOptions[i].option[0]))
+ res += String(g_gameOptions[i].desc) + " ";
+
+ res.trim();
+
+ return res;
+}
+
+void updateGameGUIOptions(const String &options, const String &langOption) {
+ const String newOptionString = getGameGUIOptionsDescription(options) + " " + langOption;
+
+ if ((!options.empty() && !ConfMan.hasKey("guioptions")) ||
+ (ConfMan.hasKey("guioptions") && ConfMan.get("guioptions") != newOptionString)) {
+ ConfMan.set("guioptions", newOptionString);
+ ConfMan.flushToDisk();
+ }
+}
+
+
+} // End of namespace Common
diff --git a/common/gui_options.h b/common/gui_options.h
new file mode 100644
index 0000000000..0c2b8e7fce
--- /dev/null
+++ b/common/gui_options.h
@@ -0,0 +1,88 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef COMMON_GUI_OPTIONS_H
+#define COMMON_GUI_OPTIONS_H
+
+#include "common/util.h" // for Common::Language
+
+#define GUIO_NONE "\000"
+#define GUIO_NOSUBTITLES "\001"
+#define GUIO_NOMUSIC "\002"
+#define GUIO_NOSPEECH "\003"
+#define GUIO_NOSFX "\004"
+#define GUIO_NOMIDI "\005"
+#define GUIO_NOLAUNCHLOAD "\006"
+
+#define GUIO_MIDIPCSPK "\007"
+#define GUIO_MIDICMS "\010"
+#define GUIO_MIDIPCJR "\011"
+#define GUIO_MIDIADLIB "\012"
+#define GUIO_MIDIC64 "\013"
+#define GUIO_MIDIAMIGA "\014"
+#define GUIO_MIDIAPPLEIIGS "\015"
+#define GUIO_MIDITOWNS "\016"
+#define GUIO_MIDIPC98 "\017"
+#define GUIO_MIDIMT32 "\020"
+#define GUIO_MIDIGM "\021"
+
+#define GUIO_NOASPECT "\022"
+#define GUIO_EGAUNDITHER "\023"
+
+#define GUIO_RENDERHERCGREEN "\030"
+#define GUIO_RENDERHERCAMBER "\031"
+#define GUIO_RENDERCGA "\032"
+#define GUIO_RENDEREGA "\033"
+#define GUIO_RENDERVGA "\034"
+#define GUIO_RENDERAMIGA "\035"
+#define GUIO_RENDERFMTOWNS "\036"
+#define GUIO_RENDERPC9821 "\037"
+#define GUIO_RENDERPC9801 "\040"
+
+#define GUIO0() (GUIO_NONE)
+#define GUIO1(a) (a)
+#define GUIO2(a,b) (a b)
+#define GUIO3(a,b,c) (a b c)
+#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)
+
+namespace Common {
+
+
+bool checkGameGUIOption(const String &option, const String &str);
+bool checkGameGUIOptionLanguage(Common::Language lang, const String &str);
+String parseGameGUIOptions(const String &str);
+const String getGameGUIOptionsDescription(const String &options);
+const String getGameGUIOptionsDescriptionLanguage(Common::Language lang);
+
+/**
+ * Updates the GUI options of the current config manager
+ * domain, when they differ to the ones passed as
+ * parameter.
+ */
+void updateGameGUIOptions(const String &options, const String &langOption);
+
+
+} // End of namespace Common
+
+#endif
diff --git a/common/module.mk b/common/module.mk
index ae5e41cb8c..bd17413540 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -12,6 +12,7 @@ MODULE_OBJS := \
EventRecorder.o \
file.o \
fs.o \
+ gui_options.o \
hashmap.o \
iff_container.o \
localization.o \
@@ -22,6 +23,7 @@ MODULE_OBJS := \
quicktime.o \
random.o \
rational.o \
+ rendermode.o \
str.o \
stream.o \
system.o \
diff --git a/common/rendermode.cpp b/common/rendermode.cpp
new file mode 100644
index 0000000000..62b67faee5
--- /dev/null
+++ b/common/rendermode.cpp
@@ -0,0 +1,81 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/rendermode.h"
+
+#include "common/str.h"
+#include "common/translation.h"
+
+
+namespace Common {
+
+
+const RenderModeDescription g_renderModes[] = {
+ // I18N: Hercules is graphics card name
+ { "hercGreen", _s("Hercules Green"), kRenderHercG },
+ { "hercAmber", _s("Hercules Amber"), kRenderHercA },
+ { "cga", "CGA", kRenderCGA },
+ { "ega", "EGA", kRenderEGA },
+ { "vga", "VGA", kRenderVGA },
+ { "amiga", "Amiga", kRenderAmiga },
+ { "fmtowns", "FM-Towns", kRenderFMTowns },
+ { "pc9821", "PC-9821 (256 Colors)", kRenderPC9821 },
+ { "pc9801", "PC-9801 (16 Colors)", kRenderPC9801 },
+ {0, 0, kRenderDefault}
+};
+
+DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Hercules Green", "lowres")
+DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Hercules Amber", "lowres")
+
+RenderMode parseRenderMode(const String &str) {
+ if (str.empty())
+ return kRenderDefault;
+
+ const RenderModeDescription *l = g_renderModes;
+ for (; l->code; ++l) {
+ if (str.equalsIgnoreCase(l->code))
+ return l->id;
+ }
+
+ return kRenderDefault;
+}
+
+const char *getRenderModeCode(RenderMode id) {
+ const RenderModeDescription *l = g_renderModes;
+ for (; l->code; ++l) {
+ if (l->id == id)
+ return l->code;
+ }
+ return 0;
+}
+
+const char *getRenderModeDescription(RenderMode id) {
+ const RenderModeDescription *l = g_renderModes;
+ for (; l->code; ++l) {
+ if (l->id == id)
+ return l->description;
+ }
+ return 0;
+}
+
+
+} // End of namespace Common
diff --git a/common/rendermode.h b/common/rendermode.h
new file mode 100644
index 0000000000..c2fece77ee
--- /dev/null
+++ b/common/rendermode.h
@@ -0,0 +1,67 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef COMMON_RENDERMODE_H
+#define COMMON_RENDERMODE_H
+
+#include "common/scummsys.h"
+
+namespace Common {
+
+class String;
+
+/**
+ * List of render modes. It specifies which original graphics mode
+ * to use. Some targets used postprocessing dithering routines for
+ * reducing color depth of final image which let it to be rendered on
+ * such low-level adapters as CGA or Hercules.
+ */
+enum RenderMode {
+ kRenderDefault = 0,
+ kRenderVGA = 1,
+ kRenderEGA = 2,
+ kRenderCGA = 3,
+ kRenderHercG = 4,
+ kRenderHercA = 5,
+ kRenderAmiga = 6,
+ kRenderFMTowns = 7,
+ kRenderPC9821 = 8,
+ kRenderPC9801 = 9
+};
+
+struct RenderModeDescription {
+ const char *code;
+ const char *description;
+ RenderMode id;
+};
+
+extern const RenderModeDescription g_renderModes[];
+
+/** Convert a string containing a render mode name into a RenderingMode enum value. */
+extern RenderMode parseRenderMode(const String &str);
+extern const char *getRenderModeCode(RenderMode id);
+extern const char *getRenderModeDescription(RenderMode id);
+
+
+} // End of namespace Common
+
+#endif
diff --git a/common/util.cpp b/common/util.cpp
index 5911f9b1a4..371673d9f4 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -29,8 +29,6 @@
#include "common/util.h"
-#include "common/translation.h"
-#include "common/config-manager.h"
#include "common/debug.h"
namespace Common {
@@ -280,155 +278,6 @@ const char *getPlatformDescription(Platform id) {
#pragma mark -
-const RenderModeDescription g_renderModes[] = {
- // I18N: Hercules is graphics card name
- { "hercGreen", _s("Hercules Green"), kRenderHercG },
- { "hercAmber", _s("Hercules Amber"), kRenderHercA },
- { "cga", "CGA", kRenderCGA },
- { "ega", "EGA", kRenderEGA },
- { "vga", "VGA", kRenderVGA },
- { "amiga", "Amiga", kRenderAmiga },
- { "fmtowns", "FM-Towns", kRenderFMTowns },
- { "pc9821", "PC-9821 (256 Colors)", kRenderPC9821 },
- { "pc9801", "PC-9801 (16 Colors)", kRenderPC9801 },
- {0, 0, kRenderDefault}
-};
-
-DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Hercules Green", "lowres")
-DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Hercules Amber", "lowres")
-
-RenderMode parseRenderMode(const String &str) {
- if (str.empty())
- return kRenderDefault;
-
- const RenderModeDescription *l = g_renderModes;
- for (; l->code; ++l) {
- if (str.equalsIgnoreCase(l->code))
- return l->id;
- }
-
- return kRenderDefault;
-}
-
-const char *getRenderModeCode(RenderMode id) {
- const RenderModeDescription *l = g_renderModes;
- for (; l->code; ++l) {
- if (l->id == id)
- return l->code;
- }
- return 0;
-}
-
-const char *getRenderModeDescription(RenderMode id) {
- const RenderModeDescription *l = g_renderModes;
- for (; l->code; ++l) {
- if (l->id == id)
- return l->description;
- }
- return 0;
-}
-
-const struct GameOpt {
- const char *option;
- const char *desc;
-} g_gameOptions[] = {
- { GUIO_NOSUBTITLES, "sndNoSubs" },
- { GUIO_NOMUSIC, "sndNoMusic" },
- { GUIO_NOSPEECH, "sndNoSpeech" },
- { GUIO_NOSFX, "sndNoSFX" },
- { GUIO_NOMIDI, "sndNoMIDI" },
-
- { GUIO_NOLAUNCHLOAD, "launchNoLoad" },
-
- { GUIO_MIDIPCSPK, "midiPCSpk" },
- { GUIO_MIDICMS, "midiCMS" },
- { GUIO_MIDIPCJR, "midiPCJr" },
- { GUIO_MIDIADLIB, "midiAdLib" },
- { GUIO_MIDIC64, "midiC64" },
- { GUIO_MIDIAMIGA, "midiAmiga" },
- { GUIO_MIDIAPPLEIIGS,"midiAppleIIgs" },
- { GUIO_MIDITOWNS, "midiTowns" },
- { GUIO_MIDIPC98, "midiPC98" },
- { GUIO_MIDIMT32, "midiMt32" },
- { GUIO_MIDIGM, "midiGM" },
-
- { GUIO_NOASPECT, "noAspect" },
- { GUIO_EGAUNDITHER, "egaUndither" },
-
- { GUIO_RENDERHERCGREEN, "hercGreen" },
- { GUIO_RENDERHERCAMBER, "hercAmber" },
- { GUIO_RENDERCGA, "cga" },
- { GUIO_RENDEREGA, "ega" },
- { GUIO_RENDERVGA, "vga" },
- { GUIO_RENDERAMIGA, "amiga" },
- { GUIO_RENDERFMTOWNS, "fmtowns" },
- { GUIO_RENDERPC9821, "pc9821" },
- { GUIO_RENDERPC9801, "pc9801" },
-
- { GUIO_NONE, 0 }
-};
-
-bool checkGameGUIOption(const String &option, const String &str) {
- for (int i = 0; g_gameOptions[i].desc; i++) {
- if (option.contains(g_gameOptions[i].option)) {
- if (str.contains(g_gameOptions[i].desc))
- return true;
- else
- return false;
- }
- }
- return false;
-}
-
-bool checkGameGUIOptionLanguage(Language lang, const String &str) {
- if (!str.contains("lang_")) // If no languages are specified
- return true;
-
- if (str.contains(getGameGUIOptionsDescriptionLanguage(lang)))
- return true;
-
- return false;
-}
-
-const String getGameGUIOptionsDescriptionLanguage(Language lang) {
- if (lang == UNK_LANG)
- return "";
-
- return String(String("lang_") + getLanguageDescription(lang));
-}
-
-String parseGameGUIOptions(const String &str) {
- Common::String res;
-
- for (int i = 0; g_gameOptions[i].desc; i++)
- if (str.contains(g_gameOptions[i].desc))
- res += g_gameOptions[i].option;
-
- return res;
-}
-
-const String getGameGUIOptionsDescription(const String &options) {
- String res;
-
- for (int i = 0; g_gameOptions[i].desc; i++)
- if (options.contains(g_gameOptions[i].option[0]))
- res += String(g_gameOptions[i].desc) + " ";
-
- res.trim();
-
- return res;
-}
-
-void updateGameGUIOptions(const String &options, const String &langOption) {
- const String newOptionString = getGameGUIOptionsDescription(options) + " " + langOption;
-
- if ((!options.empty() && !ConfMan.hasKey("guioptions")) ||
- (ConfMan.hasKey("guioptions") && ConfMan.get("guioptions") != newOptionString)) {
- ConfMan.set("guioptions", newOptionString);
- ConfMan.flushToDisk();
- }
-}
-
#define ENSURE_ASCII_CHAR(c) \
if (c < 0 || c > 127) \
return false
diff --git a/common/util.h b/common/util.h
index 841280f7ae..4274dc4e07 100644
--- a/common/util.h
+++ b/common/util.h
@@ -25,7 +25,6 @@
#include "common/scummsys.h"
#include "common/str.h"
-
/**
* Check whether a given pointer is aligned correctly.
* Note that 'alignment' must be a power of two!
@@ -78,47 +77,6 @@ template<typename T> inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; }
# define SCUMMVM_CURRENT_FUNCTION "<unknown>"
#endif
-#define GUIO_NONE "\000"
-#define GUIO_NOSUBTITLES "\001"
-#define GUIO_NOMUSIC "\002"
-#define GUIO_NOSPEECH "\003"
-#define GUIO_NOSFX "\004"
-#define GUIO_NOMIDI "\005"
-#define GUIO_NOLAUNCHLOAD "\006"
-
-#define GUIO_MIDIPCSPK "\007"
-#define GUIO_MIDICMS "\010"
-#define GUIO_MIDIPCJR "\011"
-#define GUIO_MIDIADLIB "\012"
-#define GUIO_MIDIC64 "\013"
-#define GUIO_MIDIAMIGA "\014"
-#define GUIO_MIDIAPPLEIIGS "\015"
-#define GUIO_MIDITOWNS "\016"
-#define GUIO_MIDIPC98 "\017"
-#define GUIO_MIDIMT32 "\020"
-#define GUIO_MIDIGM "\021"
-
-#define GUIO_NOASPECT "\022"
-#define GUIO_EGAUNDITHER "\023"
-
-#define GUIO_RENDERHERCGREEN "\030"
-#define GUIO_RENDERHERCAMBER "\031"
-#define GUIO_RENDERCGA "\032"
-#define GUIO_RENDEREGA "\033"
-#define GUIO_RENDERVGA "\034"
-#define GUIO_RENDERAMIGA "\035"
-#define GUIO_RENDERFMTOWNS "\036"
-#define GUIO_RENDERPC9821 "\037"
-#define GUIO_RENDERPC9801 "\040"
-
-#define GUIO0() (GUIO_NONE)
-#define GUIO1(a) (a)
-#define GUIO2(a,b) (a b)
-#define GUIO3(a,b,c) (a b c)
-#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)
-
namespace Common {
/**
@@ -302,51 +260,7 @@ extern const char *getPlatformCode(Platform id);
extern const char *getPlatformAbbrev(Platform id);
extern const char *getPlatformDescription(Platform id);
-/**
- * List of render modes. It specifies which original graphics mode
- * to use. Some targets used postprocessing dithering routines for
- * reducing color depth of final image which let it to be rendered on
- * such low-level adapters as CGA or Hercules.
- */
-enum RenderMode {
- kRenderDefault = 0,
- kRenderVGA = 1,
- kRenderEGA = 2,
- kRenderCGA = 3,
- kRenderHercG = 4,
- kRenderHercA = 5,
- kRenderAmiga = 6,
- kRenderFMTowns = 7,
- kRenderPC9821 = 8,
- kRenderPC9801 = 9
-};
-
-struct RenderModeDescription {
- const char *code;
- const char *description;
- RenderMode id;
-};
-
-extern const RenderModeDescription g_renderModes[];
-
-/** Convert a string containing a render mode name into a RenderingMode enum value. */
-extern RenderMode parseRenderMode(const String &str);
-extern const char *getRenderModeCode(RenderMode id);
-extern const char *getRenderModeDescription(RenderMode id);
-
-bool checkGameGUIOption(const String &option, const String &str);
-bool checkGameGUIOptionLanguage(Language lang, const String &str);
-String parseGameGUIOptions(const String &str);
-const String getGameGUIOptionsDescription(const String &options);
-const String getGameGUIOptionsDescriptionLanguage(Language lang);
-
-/**
- * Updates the GUI options of the current config manager
- * domain, when they differ to the ones passed as
- * parameter.
- */
-void updateGameGUIOptions(const String &options, const String &langOption);
-
} // End of namespace Common
+
#endif
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index c31c8bd66e..3bb00618b1 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -26,6 +26,8 @@
#include "engines/metaengine.h"
#include "engines/engine.h"
+#include "common/gui_options.h" // FIXME: Temporary hack?
+
namespace Common {
class Error;
class FSList;
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index ea3afa5ca3..55b4805022 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/file.h"
#include "common/rect.h"
+#include "common/rendermode.h"
#include "common/stack.h"
#include "common/system.h"
diff --git a/engines/game.cpp b/engines/game.cpp
index be15240745..4bfd8f3bf2 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -21,6 +21,7 @@
*/
#include "engines/game.h"
+#include "common/gui_options.h"
const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list) {
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 499f575a0c..11173a45c7 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -28,8 +28,9 @@
#include "common/array.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/random.h"
#include "common/hashmap.h"
+#include "common/random.h"
+#include "common/rendermode.h"
#include "audio/mixer.h"
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index a0cf5742c6..b064c72bb0 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -28,6 +28,7 @@
#include "common/list.h"
#include "common/array.h"
#include "common/rect.h"
+#include "common/rendermode.h"
#include "common/stream.h"
class OSystem;
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index c610ef9921..d17268e16b 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -25,6 +25,7 @@
#include "common/config-manager.h"
#include "common/file.h"
#include "common/fs.h"
+#include "common/gui_options.h"
#include "common/savefile.h"
#include "common/system.h"
#include "common/events.h"
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index a44497f193..d7eedc3a83 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -24,6 +24,7 @@
#define SCUMM_DETECTION_TABLES_H
#include "engines/obsolete.h"
+#include "common/gui_options.h"
#include "common/rect.h"
#include "common/util.h"
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 2f1e536f0a..cacf8c214e 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -24,6 +24,7 @@
#define SCUMM_H
#include "engines/engine.h"
+
#include "common/endian.h"
#include "common/events.h"
#include "common/file.h"
@@ -31,6 +32,7 @@
#include "common/keyboard.h"
#include "common/random.h"
#include "common/rect.h"
+#include "common/rendermode.h"
#include "common/str.h"
#include "common/textconsole.h"
#include "graphics/surface.h"
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 2214e72067..087dcd09d8 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -25,6 +25,7 @@
#include "base/plugins.h"
#include "common/fs.h"
+#include "common/gui_options.h"
#include "common/savefile.h"
#include "common/system.h"
#include "graphics/thumbnail.h"
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index bdfc388c5f..c395186570 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -25,9 +25,10 @@
#include "base/plugins.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/file.h"
#include "common/fs.h"
-#include "common/events.h"
+#include "common/gui_options.h"
#include "common/savefile.h"
#include "common/system.h"
#include "common/textconsole.h"
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 5bb358452a..a3e4925848 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -24,6 +24,7 @@
#include "common/config-manager.h"
#include "common/events.h"
#include "common/fs.h"
+#include "common/gui_options.h"
#include "common/util.h"
#include "common/system.h"
#include "common/translation.h"
diff --git a/gui/options.cpp b/gui/options.cpp
index fbbb938e97..5085f9cdd9 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -30,6 +30,8 @@
#include "common/fs.h"
#include "common/config-manager.h"
+#include "common/gui_options.h"
+#include "common/rendermode.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "common/translation.h"