Skip to content

Commit

Permalink
GLK: FROTZ: Change default fg/bg from int to uint
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Feb 21, 2019
1 parent d27cfc8 commit 12788e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions engines/glk/frotz/config.h
Expand Up @@ -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;

/**
Expand Down
3 changes: 1 addition & 2 deletions engines/glk/frotz/glk_interface.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 12788e6

Please sign in to comment.