[Scummvm-git-logs] scummvm master -> ded74addaa97e6f55f311e30fe67cc363d2be107
dreammaster
paulfgilbert at gmail.com
Thu Feb 21 05:14:56 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:
12788e6de8 GLK: FROTZ: Change default fg/bg from int to uint
ded74addaa GLK: FROTZ: Fix default colors for non-V6 games
Commit: 12788e6de8e9f690e32e046760e97e4f154e681f
https://github.com/scummvm/scummvm/commit/12788e6de8e9f690e32e046760e97e4f154e681f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-02-20T19:59:08-08:00
Commit Message:
GLK: FROTZ: Change default fg/bg from int to uint
Changed paths:
engines/glk/frotz/config.h
engines/glk/frotz/glk_interface.cpp
diff --git a/engines/glk/frotz/config.h b/engines/glk/frotz/config.h
index 7099996..80dd6eb 100644
--- a/engines/glk/frotz/config.h
+++ b/engines/glk/frotz/config.h
@@ -148,8 +148,8 @@ struct UserOptions {
int _undo_slots;
int _script_cols;
int _err_report_mode;
- int _defaultForeground;
- int _defaultBackground;
+ uint _defaultForeground;
+ uint _defaultBackground;
bool _color_enabled;
/**
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp
index 28826d8..48203bf 100644
--- a/engines/glk/frotz/glk_interface.cpp
+++ b/engines/glk/frotz/glk_interface.cpp
@@ -160,13 +160,12 @@ void GlkInterface::initialize() {
// Set up the foreground & background
_color_enabled = ((h_version >= 5) && (h_flags & COLOUR_FLAG))
- || (_defaultForeground != -1) || (_defaultBackground != -1);
+ || (_defaultForeground != zcolor_Transparent) || (_defaultBackground != zcolor_Transparent);
if (_color_enabled) {
h_config |= CONFIG_COLOUR;
h_flags |= COLOUR_FLAG; // FIXME: beyond zork handling?
- assert(_defaultForeground != -1 && _defaultBackground != -1);
h_default_foreground = BLACK_COLOUR;
h_default_background = WHITE_COLOUR;
zcolors[h_default_foreground] = _defaultForeground;
Commit: ded74addaa97e6f55f311e30fe67cc363d2be107
https://github.com/scummvm/scummvm/commit/ded74addaa97e6f55f311e30fe67cc363d2be107
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-02-20T20:14:46-08:00
Commit Message:
GLK: FROTZ: Fix default colors for non-V6 games
Changed paths:
engines/glk/frotz/config.cpp
diff --git a/engines/glk/frotz/config.cpp b/engines/glk/frotz/config.cpp
index be6c6df..6948d1c 100644
--- a/engines/glk/frotz/config.cpp
+++ b/engines/glk/frotz/config.cpp
@@ -167,13 +167,13 @@ void UserOptions::initialize(uint hVersion) {
_object_movement = getConfigBool("object_movement");
int defaultFg = hVersion == V6 ? 0 : 0xffffff;
- int defaultBg = hVersion == V6 ? 0xffffff : 0;
+ int defaultBg = hVersion == V6 ? 0xffffff : 0x80;
defaultFg = getConfigInt("foreground", defaultFg, 0xffffff);
defaultBg = getConfigInt("background", defaultBg, 0xffffff);
Graphics::PixelFormat format = g_system->getScreenFormat();
- _defaultForeground = format.RGBToColor(defaultFg & 0xff, (defaultFg >> 8) & 0xff, (defaultFg >> 16) & 0xff);
- _defaultBackground = format.RGBToColor(defaultBg & 0xff, (defaultBg >> 8) & 0xff, (defaultBg >> 16) & 0xff);
+ _defaultForeground = format.RGBToColor((defaultFg >> 16) & 0xff, (defaultFg >> 8) & 0xff, defaultFg & 0xff);
+ _defaultBackground = format.RGBToColor((defaultBg >> 16) & 0xff, (defaultBg >> 8) & 0xff, defaultBg & 0xff);
}
bool UserOptions::isInfocom() const {
More information about the Scummvm-git-logs
mailing list