aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanasis Antoniou2019-02-24 00:15:43 +0200
committerThanasis Antoniou2019-02-24 00:15:43 +0200
commit25c48ac33161130d1e63af3664db6ff6b4b234a6 (patch)
treea29857d2c673c32cce163d36bef57c060da295a2
parent2301cc04a391a1d042843ea34cd8cbec128ae546 (diff)
parentbedab5bd460452ad34ea3c820722a85f015695b0 (diff)
downloadscummvm-rg350-25c48ac33161130d1e63af3664db6ff6b4b234a6.tar.gz
scummvm-rg350-25c48ac33161130d1e63af3664db6ff6b4b234a6.tar.bz2
scummvm-rg350-25c48ac33161130d1e63af3664db6ff6b4b234a6.zip
Merge branch 'master' of https://github.com/scummvm/scummvm
-rw-r--r--engines/glk/frotz/config.cpp5
-rw-r--r--engines/glk/frotz/config.h2
-rw-r--r--engines/glk/frotz/glk_interface.cpp23
-rw-r--r--engines/glk/frotz/glk_interface.h2
4 files changed, 19 insertions, 13 deletions
diff --git a/engines/glk/frotz/config.cpp b/engines/glk/frotz/config.cpp
index 6948d1c14d..24f6b1d9e2 100644
--- a/engines/glk/frotz/config.cpp
+++ b/engines/glk/frotz/config.cpp
@@ -150,7 +150,7 @@ UserOptions::UserOptions() : _undo_slots(MAX_UNDO_SLOTS), _sound(true), _quetzal
_piracy(false), _script_cols(0), _left_margin(0), _right_margin(0), _defaultBackground(0), _defaultForeground(0) {
}
-void UserOptions::initialize(uint hVersion) {
+void UserOptions::initialize(uint hVersion, uint storyId) {
_err_report_mode = getConfigInt("err_report_mode", ERR_REPORT_ONCE, ERR_REPORT_FATAL);
_ignore_errors = getConfigBool("ignore_errors");
_expand_abbreviations = getConfigBool("expand_abbreviations");
@@ -168,6 +168,9 @@ void UserOptions::initialize(uint hVersion) {
int defaultFg = hVersion == V6 ? 0 : 0xffffff;
int defaultBg = hVersion == V6 ? 0xffffff : 0x80;
+ if (storyId == BEYOND_ZORK)
+ defaultBg = 0;
+
defaultFg = getConfigInt("foreground", defaultFg, 0xffffff);
defaultBg = getConfigInt("background", defaultBg, 0xffffff);
diff --git a/engines/glk/frotz/config.h b/engines/glk/frotz/config.h
index 80dd6ebf2c..212d11fb22 100644
--- a/engines/glk/frotz/config.h
+++ b/engines/glk/frotz/config.h
@@ -160,7 +160,7 @@ struct UserOptions {
/**
* Initializes the options
*/
- void initialize(uint hVersion);
+ void initialize(uint hVersion, uint storyId);
/**
* Returns true if the game being played is one of the original Infocom releases
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp
index 48203bf7e5..aa5139f7c1 100644
--- a/engines/glk/frotz/glk_interface.cpp
+++ b/engines/glk/frotz/glk_interface.cpp
@@ -51,7 +51,7 @@ void GlkInterface::initialize() {
uint width, height;
/* Setup options */
- UserOptions::initialize(h_version);
+ UserOptions::initialize(h_version, _storyId);
/* Setup colors array */
const int COLOR_MAP[zcolor_NUMCOLORS - 2] = {
@@ -68,8 +68,8 @@ void GlkInterface::initialize() {
0x2D6B, ///< 12 = dark grey
};
- zcolors[0] = -2; // Current
- zcolors[1] = -1; // Default
+ zcolors[0] = zcolor_Current; // Current
+ zcolors[1] = zcolor_Default; // Default
for (int i = 2; i < zcolor_NUMCOLORS; ++i)
zcolors[i] = zRGB(COLOR_MAP[i - 2]);
@@ -158,23 +158,26 @@ void GlkInterface::initialize() {
h_interpreter_number = h_version == 6 ? INTERP_MSDOS : INTERP_AMIGA;
h_interpreter_version = 'F';
+ // Set these per spec 8.3.2.
+ h_default_foreground = WHITE_COLOUR;
+ h_default_background = BLACK_COLOUR;
+
// Set up the foreground & background
_color_enabled = ((h_version >= 5) && (h_flags & COLOUR_FLAG))
- || (_defaultForeground != zcolor_Transparent) || (_defaultBackground != zcolor_Transparent);
+ || (_defaultForeground != zcolor_Transparent) || (_defaultBackground != zcolor_Transparent);
if (_color_enabled) {
h_config |= CONFIG_COLOUR;
h_flags |= COLOUR_FLAG; // FIXME: beyond zork handling?
- h_default_foreground = BLACK_COLOUR;
- h_default_background = WHITE_COLOUR;
+ if (h_version == 6) {
+ h_default_foreground = BLACK_COLOUR;
+ h_default_background = WHITE_COLOUR;
+ }
+
zcolors[h_default_foreground] = _defaultForeground;
zcolors[h_default_background] = _defaultBackground;
} else {
- // Set these per spec 8.3.2.
- h_default_foreground = WHITE_COLOUR;
- h_default_background = BLACK_COLOUR;
-
if (h_flags & COLOUR_FLAG)
h_flags &= ~COLOUR_FLAG;
}
diff --git a/engines/glk/frotz/glk_interface.h b/engines/glk/frotz/glk_interface.h
index ea7a104b8a..b52fdc4e6d 100644
--- a/engines/glk/frotz/glk_interface.h
+++ b/engines/glk/frotz/glk_interface.h
@@ -61,7 +61,7 @@ private:
public:
Pics *_pics;
zchar statusline[256];
- int zcolors[zcolor_NUMCOLORS];
+ uint zcolors[zcolor_NUMCOLORS];
int oldstyle;
int curstyle;
int cury;