From 12788e6de8e9f690e32e046760e97e4f154e681f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 20 Feb 2019 19:59:08 -0800 Subject: GLK: FROTZ: Change default fg/bg from int to uint --- engines/glk/frotz/config.h | 4 ++-- engines/glk/frotz/glk_interface.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/glk/frotz/config.h b/engines/glk/frotz/config.h index 7099996474..80dd6ebf2c 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 28826d8d4e..48203bf7e5 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; -- cgit v1.2.3