[Scummvm-git-logs] scummvm master -> bedab5bd460452ad34ea3c820722a85f015695b0

dreammaster paulfgilbert at gmail.com
Sat Feb 23 21:17:49 CET 2019


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
eacc4e52d1 GLK: FROTZ: Fix initialization of zcolors array
bedab5bd46 GLK: FROTZ: Fix colors for Beyond Zork


Commit: eacc4e52d14a4929323df30da6346b6bbacda9b8
    https://github.com/scummvm/scummvm/commit/eacc4e52d14a4929323df30da6346b6bbacda9b8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-02-23T11:13:19-08:00

Commit Message:
GLK: FROTZ: Fix initialization of zcolors array

Changed paths:
    engines/glk/frotz/glk_interface.cpp
    engines/glk/frotz/glk_interface.h


diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp
index 48203bf..dda932d 100644
--- a/engines/glk/frotz/glk_interface.cpp
+++ b/engines/glk/frotz/glk_interface.cpp
@@ -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]);
 
diff --git a/engines/glk/frotz/glk_interface.h b/engines/glk/frotz/glk_interface.h
index ea7a104..b52fdc4 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;


Commit: bedab5bd460452ad34ea3c820722a85f015695b0
    https://github.com/scummvm/scummvm/commit/bedab5bd460452ad34ea3c820722a85f015695b0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-02-23T12:16:27-08:00

Commit Message:
GLK: FROTZ: Fix colors for Beyond Zork

As part of that, I've made the default bg Black rather than blue,
since it provides better contrast for the upper area & minimap

Changed paths:
    engines/glk/frotz/config.cpp
    engines/glk/frotz/config.h
    engines/glk/frotz/glk_interface.cpp


diff --git a/engines/glk/frotz/config.cpp b/engines/glk/frotz/config.cpp
index 6948d1c..24f6b1d 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 80dd6eb..212d11f 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 dda932d..aa5139f 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;
 	}





More information about the Scummvm-git-logs mailing list