aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk')
-rw-r--r--engines/glk/frotz/config.cpp5
-rw-r--r--engines/glk/frotz/config.h2
-rw-r--r--engines/glk/frotz/glk_interface.cpp19
3 files changed, 16 insertions, 10 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 dda932dc3d..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] = {
@@ -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;
}