aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
authorPaul Gilbert2019-01-31 21:24:29 -0800
committerPaul Gilbert2019-01-31 21:54:34 -0800
commit69f91fafe40eb492230bfd61d16e2dbcd7286137 (patch)
treecb72f3003e6c500de049bec1aae154709460fa8f /engines/glk
parentaf2b1252d868ea07a45e5f567f8109c339cb63fe (diff)
downloadscummvm-rg350-69f91fafe40eb492230bfd61d16e2dbcd7286137.tar.gz
scummvm-rg350-69f91fafe40eb492230bfd61d16e2dbcd7286137.tar.bz2
scummvm-rg350-69f91fafe40eb492230bfd61d16e2dbcd7286137.zip
GLK: Cleanups & fixes from color refactoring
Diffstat (limited to 'engines/glk')
-rw-r--r--engines/glk/events.cpp2
-rw-r--r--engines/glk/frotz/screen.cpp2
-rw-r--r--engines/glk/screen.h1
-rw-r--r--engines/glk/window_graphics.cpp2
4 files changed, 4 insertions, 3 deletions
diff --git a/engines/glk/events.cpp b/engines/glk/events.cpp
index 4897b1898f..3689836020 100644
--- a/engines/glk/events.cpp
+++ b/engines/glk/events.cpp
@@ -31,6 +31,8 @@
namespace Glk {
+#define TRANSPARENT_RGB 0x80
+
const byte ARROW[] = {
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
diff --git a/engines/glk/frotz/screen.cpp b/engines/glk/frotz/screen.cpp
index 05090769f9..fc1ef27c6a 100644
--- a/engines/glk/frotz/screen.cpp
+++ b/engines/glk/frotz/screen.cpp
@@ -66,7 +66,7 @@ void FrotzScreen::loadVersion6Fonts(Common::Archive *archive) {
pi._lineSeparation = 0;
g_vm->_defaultForeground = 0;
- g_vm->_defaultBackground = TRANSPARENT_RGB | (TRANSPARENT_RGB << 8) | (TRANSPARENT_RGB << 16);
+ g_vm->_defaultBackground = g_system->getScreenFormat().RGBToColor(0xff, 0xff, 0xff);
g_conf->_tMarginX = 3;
_fonts.resize(8);
diff --git a/engines/glk/screen.h b/engines/glk/screen.h
index f697b55e1e..34192d1e75 100644
--- a/engines/glk/screen.h
+++ b/engines/glk/screen.h
@@ -33,7 +33,6 @@
namespace Glk {
#define FONTS_TOTAL 8
-#define TRANSPARENT_RGB 0x7f
enum CaretShape {
SMALL_DOT = 0, FAT_DOT = 1, THIN_LINE = 2, FAT_LINE = 3, BLOCK = 4
diff --git a/engines/glk/window_graphics.cpp b/engines/glk/window_graphics.cpp
index b481aa5ab5..572d8d983e 100644
--- a/engines/glk/window_graphics.cpp
+++ b/engines/glk/window_graphics.cpp
@@ -30,7 +30,7 @@ namespace Glk {
GraphicsWindow::GraphicsWindow(Windows *windows, uint rock) : Window(windows, rock),
_w(0), _h(0), _dirty(false), _surface(nullptr) {
_type = wintype_Graphics;
- _bgColor = _bgnd;
+ _bgnd = _bgColor;
}
GraphicsWindow::~GraphicsWindow() {