[Scummvm-git-logs] scummvm master -> 0793196a52a83970bb9bb4ac36f3068739afa543
dreammaster
paulfgilbert at gmail.com
Mon Jan 7 01:12:20 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:
9b7866442b GLK: FROTZ: Set default colors for v6 games
0793196a52 GLK: FROTZ: Fix text display for v6 games
Commit: 9b7866442b477fe9376896fbf167622514700320
https://github.com/scummvm/scummvm/commit/9b7866442b477fe9376896fbf167622514700320
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-01-06T15:18:33-08:00
Commit Message:
GLK: FROTZ: Set default colors for v6 games
Changed paths:
engines/glk/frotz/screen.cpp
diff --git a/engines/glk/frotz/screen.cpp b/engines/glk/frotz/screen.cpp
index f364a23..60fb6d9 100644
--- a/engines/glk/frotz/screen.cpp
+++ b/engines/glk/frotz/screen.cpp
@@ -45,6 +45,8 @@ void FrotzScreen::loadFonts(Common::Archive *archive) {
// For graphical games, ignore any font configurations and force their size
g_conf->_monoInfo._size = g_conf->_propInfo._size = 7;
g_conf->_monoInfo._aspect = g_conf->_propInfo._aspect = 1.0;
+ g_vm->_defaultForeground = 0;
+ g_vm->_defaultBackground = 0xffffff;
}
// Load the basic fonts
Commit: 0793196a52a83970bb9bb4ac36f3068739afa543
https://github.com/scummvm/scummvm/commit/0793196a52a83970bb9bb4ac36f3068739afa543
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-01-06T16:12:01-08:00
Commit Message:
GLK: FROTZ: Fix text display for v6 games
Changed paths:
engines/glk/window_text_buffer.cpp
engines/glk/window_text_grid.cpp
engines/glk/windows.h
diff --git a/engines/glk/window_text_buffer.cpp b/engines/glk/window_text_buffer.cpp
index c33dbae..ce4dd7c 100644
--- a/engines/glk/window_text_buffer.cpp
+++ b/engines/glk/window_text_buffer.cpp
@@ -75,8 +75,8 @@ void TextBufferWindow::rearrange(const Rect &box) {
int newwid, newhgt;
int rnd;
- newwid = (box.width() - g_conf->_tMarginX * 2 - g_conf->_scrollWidth) / _font._cellW;
- newhgt = (box.height() - g_conf->_tMarginY * 2) / _font._cellH;
+ newwid = MAX((box.width() - g_conf->_tMarginX * 2 - g_conf->_scrollWidth) / _font._cellW, 0);
+ newhgt = MAX((box.height() - g_conf->_tMarginY * 2) / _font._cellH, 0);
// align text with bottom
rnd = newhgt * _font._cellH + g_conf->_tMarginY * 2;
diff --git a/engines/glk/window_text_grid.cpp b/engines/glk/window_text_grid.cpp
index ee3921d..c321390 100644
--- a/engines/glk/window_text_grid.cpp
+++ b/engines/glk/window_text_grid.cpp
@@ -57,8 +57,8 @@ void TextGridWindow::rearrange(const Rect &box) {
Window::rearrange(box);
int newwid, newhgt;
- newwid = box.width() / _font._cellW;
- newhgt = box.height() / _font._cellH;
+ newwid = MAX(box.width() / _font._cellW, 0);
+ newhgt = MAX(box.height() / _font._cellH, 0);
if (newwid == _width && newhgt == _height)
return;
diff --git a/engines/glk/windows.h b/engines/glk/windows.h
index dab5219..c905556 100644
--- a/engines/glk/windows.h
+++ b/engines/glk/windows.h
@@ -432,6 +432,7 @@ public:
virtual void setSize(const Point &newSize) {
_bbox.setWidth(newSize.x);
_bbox.setHeight(newSize.y);
+ rearrange(_bbox);
}
/**
@@ -439,6 +440,7 @@ public:
*/
virtual void setPosition(const Point &newPos) {
_bbox.moveTo(newPos);
+ rearrange(_bbox);
}
/**
More information about the Scummvm-git-logs
mailing list