aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/gui_options.cpp5
-rw-r--r--common/gui_options.h5
-rw-r--r--common/scummsys.h17
-rw-r--r--common/span.h4
4 files changed, 29 insertions, 2 deletions
diff --git a/common/gui_options.cpp b/common/gui_options.cpp
index df880f4fee..120edd0b91 100644
--- a/common/gui_options.cpp
+++ b/common/gui_options.cpp
@@ -29,6 +29,8 @@ namespace Common {
const struct GameOpt {
const char *option;
+ // Each description must be a unique identifier not containing a substring
+ // of any other description
const char *desc;
} g_gameOptions[] = {
{ GUIO_NOSUBTITLES, "sndNoSubs" },
@@ -36,6 +38,9 @@ const struct GameOpt {
{ GUIO_NOSPEECH, "sndNoSpeech" },
{ GUIO_NOSFX, "sndNoSFX" },
{ GUIO_NOMIDI, "sndNoMIDI" },
+ { GUIO_LINKSPEECHTOSFX, "sndLinkSpeechToSfx" },
+ { GUIO_LINKMUSICTOSFX, "sndLinkMusicToSfx" },
+ { GUIO_NOSPEECHVOLUME, "sndNoSpchVolume" },
{ GUIO_NOLAUNCHLOAD, "launchNoLoad" },
diff --git a/common/gui_options.h b/common/gui_options.h
index d17f45cac1..d51a29ad75 100644
--- a/common/gui_options.h
+++ b/common/gui_options.h
@@ -26,6 +26,7 @@
#define GUIO_NONE "\000"
#define GUIO_NOSUBTITLES "\001"
#define GUIO_NOMUSIC "\002"
+// GUIO_NOSPEECH is a combination of GUIO_NOSPEECHVOLUME and GUIO_NOSUBTITLES
#define GUIO_NOSPEECH "\003"
#define GUIO_NOSFX "\004"
#define GUIO_NOMIDI "\005"
@@ -58,6 +59,10 @@
#define GUIO_RENDERATARIST "\042"
#define GUIO_RENDERMACINTOSH "\043"
+#define GUIO_LINKSPEECHTOSFX "\044"
+#define GUIO_LINKMUSICTOSFX "\045"
+#define GUIO_NOSPEECHVOLUME "\046"
+
// Special GUIO flags for the AdvancedDetector's caching of game specific
// options.
#define GUIO_GAMEOPTIONS1 "\050"
diff --git a/common/scummsys.h b/common/scummsys.h
index 27fcb84505..938770baa6 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -309,6 +309,23 @@
#endif
#endif
+//
+// Determine 64 bitness
+// Reference: http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros
+//
+#if !defined(HAVE_CONFIG_H)
+
+ #if defined(__x86_64__) || \
+ defined(_M_X64) || \
+ defined(__ppc64__) || \
+ defined(__powerpc64__) || \
+ defined(__LP64__)
+
+ #define SCUMM_64BITS
+
+ #endif
+
+#endif
//
// Some more system specific settings.
diff --git a/common/span.h b/common/span.h
index 0bb5a25972..2acc0b5fe7 100644
--- a/common/span.h
+++ b/common/span.h
@@ -393,14 +393,14 @@ public:
inline String getStringAt(const index_type index, size_type numEntries = kSpanMaxSize) const {
STATIC_ASSERT(sizeof(value_type) == sizeof(char), strings_can_only_be_read_from_byte_or_char_spans);
- const char *string = (const char *)impl().data();
+ const char *string = (const char *)impl().data() + index;
if (numEntries == kSpanMaxSize) {
numEntries = strnlen(string, impl().size() - index);
}
impl().validate(index, numEntries);
- return String(string + index, numEntries);
+ return String(string, numEntries);
}
/**