aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2019-03-10 15:49:49 -0700
committerPaul Gilbert2019-03-10 15:50:00 -0700
commit146f0955236ba44ec3f02a3b54210e793a57d1a1 (patch)
tree24df42f04d433f871cde3d77a3c2ae201c91d7e2
parent769cf5492c57b19cd72545ec7b5617bbb7d6a35a (diff)
downloadscummvm-rg350-146f0955236ba44ec3f02a3b54210e793a57d1a1.tar.gz
scummvm-rg350-146f0955236ba44ec3f02a3b54210e793a57d1a1.tar.bz2
scummvm-rg350-146f0955236ba44ec3f02a3b54210e793a57d1a1.zip
GLK: FROTZ: Set window font size property
-rw-r--r--engines/glk/frotz/windows.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp
index 0fe836a5ad..0ff92bc1f7 100644
--- a/engines/glk/frotz/windows.cpp
+++ b/engines/glk/frotz/windows.cpp
@@ -30,10 +30,6 @@ namespace Glk {
namespace Frotz {
Windows::Windows() : _lower(_windows[0]), _upper(_windows[1]), _background(nullptr), _cwin(0) {
- for (size_t idx = 0; idx < 8; ++idx) {
- _windows[idx]._windows = this;
- _windows[idx]._index = idx;
- }
}
size_t Windows::size() const {
@@ -71,6 +67,15 @@ void Windows::setup(bool isVersion6) {
_upper.update();
g_vm->glk_set_window(_lower);
}
+
+ MonoFontInfo &mi = g_vm->_conf->_monoInfo;
+ for (size_t idx = 0; idx < 8; ++idx) {
+ Window &w = _windows[idx];
+ w._windows = this;
+ w._index = idx;
+ w[FONT_NUMBER] = TEXT_FONT;
+ w[FONT_SIZE] = (mi._cellH << 8) | mi._cellW;
+ }
}
void Windows::setWindow(int win) {
@@ -87,7 +92,7 @@ Window::Window() : _windows(nullptr), _win(nullptr) {
_properties[Y_POS] = _properties[X_POS] = 1;
_properties[Y_CURSOR] = _properties[X_CURSOR] = 1;
_properties[FONT_NUMBER] = TEXT_FONT;
- _properties[FONT_SIZE] = 12;
+ _properties[FONT_SIZE] = (8 << 8) | 8;
}
void Window::update() {
@@ -105,7 +110,7 @@ void Window::update() {
TextBufferWindow *win = dynamic_cast<TextBufferWindow *>(_win);
_properties[LEFT_MARGIN] = (win ? win->_ladjw : 0) / g_conf->_monoInfo._cellW;
_properties[RIGHT_MARGIN] = (win ? win->_radjw : 0) / g_conf->_monoInfo._cellW;
- _properties[FONT_SIZE] = g_conf->_monoInfo._size;
+ _properties[FONT_SIZE] = (g_conf->_monoInfo._cellH << 8) | g_conf->_monoInfo._cellW;
}
Window &Window::operator=(winid_t win) {
@@ -251,7 +256,7 @@ void Window::setProperty(WindowProperty propType, uint value) {
break;
default:
- warning("Setting window property %d not yet supported", (int)propType);
+ _properties[propType] = value;
}
}