[Scummvm-git-logs] scummvm master -> 537e9af4e03abe5e961f9933a493722a8971f75c
dreammaster
paulfgilbert at gmail.com
Sun Mar 10 05:37:08 CET 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
537e9af4e0 GLK: Change Attributes fields from uint to bool
Commit: 537e9af4e03abe5e961f9933a493722a8971f75c
https://github.com/scummvm/scummvm/commit/537e9af4e03abe5e961f9933a493722a8971f75c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-03-09T20:35:58-08:00
Commit Message:
GLK: Change Attributes fields from uint to bool
Changed paths:
engines/glk/streams.cpp
engines/glk/windows.cpp
engines/glk/windows.h
diff --git a/engines/glk/streams.cpp b/engines/glk/streams.cpp
index ca1b8d8..0fd9801 100644
--- a/engines/glk/streams.cpp
+++ b/engines/glk/streams.cpp
@@ -242,7 +242,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
PropFontInfo *info = &g_conf->_propInfo;
if (fg == zcolor_Default) {
- _window->_attr.fgset = 0;
+ _window->_attr.fgset = false;
_window->_attr.fgcolor = 0;
Windows::_overrideFgSet = false;
Windows::_overrideFgVal = 0;
@@ -251,7 +251,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
info->_caretColor = info->_caretSave;
info->_linkColor = info->_linkSave;
} else if (fg != zcolor_Current) {
- _window->_attr.fgset = 1;
+ _window->_attr.fgset = true;
_window->_attr.fgcolor = fg;
Windows::_overrideFgSet = true;
Windows::_overrideFgVal = fg;
@@ -264,7 +264,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
if (/*bg != zcolor_Transparent &&*/ bg != zcolor_Cursor) {
if (bg == zcolor_Default) {
- _window->_attr.bgset = 0;
+ _window->_attr.bgset = false;
_window->_attr.bgcolor = 0;
Windows::_overrideBgSet = false;
Windows::_overrideBgVal = 0;
@@ -272,7 +272,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
g_conf->_windowColor = g_conf->_windowSave;
g_conf->_borderColor = g_conf->_borderSave;
} else if (bg != zcolor_Current) {
- _window->_attr.bgset = 1;
+ _window->_attr.bgset = true;
_window->_attr.bgcolor = bg;
Windows::_overrideBgSet = true;
Windows::_overrideBgVal = bg;
diff --git a/engines/glk/windows.cpp b/engines/glk/windows.cpp
index 5683b03..7ffc396 100644
--- a/engines/glk/windows.cpp
+++ b/engines/glk/windows.cpp
@@ -506,9 +506,9 @@ Window::Window(Windows *windows, uint rock) : _windows(windows), _rock(rock),
_lineRequest(0), _lineRequestUni(0), _charRequest(0), _charRequestUni(0),
_mouseRequest(0), _hyperRequest(0), _moreRequest(0), _scrollRequest(0), _imageLoaded(0),
_echoLineInputBase(true), _lineTerminatorsBase(nullptr), _termCt(0), _echoStream(nullptr) {
- _attr.fgset = 0;
- _attr.bgset = 0;
- _attr.reverse = 0;
+ _attr.fgset = false;
+ _attr.bgset = false;
+ _attr.reverse = false;
_attr.style = 0;
_attr.fgcolor = 0;
_attr.bgcolor = 0;
@@ -733,8 +733,8 @@ WindowStyle::WindowStyle(const WindowStyleStatic &src) : font(src.font), reverse
/*--------------------------------------------------------------------------*/
void Attributes::clear() {
- fgset = 0;
- bgset = 0;
+ fgset = false;
+ bgset = false;
fgcolor = 0;
bgcolor = 0;
reverse = false;
diff --git a/engines/glk/windows.h b/engines/glk/windows.h
index bdd9674..9cab07a 100644
--- a/engines/glk/windows.h
+++ b/engines/glk/windows.h
@@ -316,11 +316,11 @@ struct WindowStyle {
* Window attributes
*/
struct Attributes {
- unsigned fgset : 1;
- unsigned bgset : 1;
- unsigned reverse : 1;
- unsigned : 1;
- unsigned style : 4;
+ bool fgset : 1;
+ bool bgset : 1;
+ bool reverse : 1;
+ unsigned : 1;
+ unsigned style : 4;
uint fgcolor;
uint bgcolor;
uint hyper;
More information about the Scummvm-git-logs
mailing list