aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2019-01-02 19:09:40 -0800
committerPaul Gilbert2019-01-02 19:09:40 -0800
commit313337eb82534b23afd31da5c205f96faaea9e24 (patch)
tree41b7a5a0ac1198c5278331f33a4ea8aea8c2cdda
parentf1d9722f3bd58f7883f3e76c19d4a0133da73489 (diff)
downloadscummvm-rg350-313337eb82534b23afd31da5c205f96faaea9e24.tar.gz
scummvm-rg350-313337eb82534b23afd31da5c205f96faaea9e24.tar.bz2
scummvm-rg350-313337eb82534b23afd31da5c205f96faaea9e24.zip
GLK: Remove deprecated _cellW/_cellH from Conf
-rw-r--r--engines/glk/conf.cpp1
-rw-r--r--engines/glk/conf.h1
-rw-r--r--engines/glk/windows.cpp11
3 files changed, 6 insertions, 7 deletions
diff --git a/engines/glk/conf.cpp b/engines/glk/conf.cpp
index 6aa9fe8e0e..e8362e1338 100644
--- a/engines/glk/conf.cpp
+++ b/engines/glk/conf.cpp
@@ -67,7 +67,6 @@ Conf::Conf(InterpreterType interpType) {
g_conf = this;
_imageW = g_system->getWidth();
_imageH = g_system->getHeight();
- _cellW = _cellH = 8;
get("moreprompt", _propInfo._morePrompt, "\207 more \207");
get("morecolor", _propInfo._moreColor);
diff --git a/engines/glk/conf.h b/engines/glk/conf.h
index 74372312ce..4b4a013f2b 100644
--- a/engines/glk/conf.h
+++ b/engines/glk/conf.h
@@ -97,7 +97,6 @@ public:
WindowStyle _gStylesDefault[style_NUMSTYLES];
int _imageW, _imageH;
- int _cellW, _cellH;
public:
/**
* Constructor
diff --git a/engines/glk/windows.cpp b/engines/glk/windows.cpp
index d75ba1f6e5..c8ab44768d 100644
--- a/engines/glk/windows.cpp
+++ b/engines/glk/windows.cpp
@@ -76,7 +76,7 @@ Windows::~Windows() {
Window *Windows::windowOpen(Window *splitwin, uint method, uint size,
uint wintype, uint rock) {
- Window *newwin, *oldparent;
+ Window *newwin, *oldparent = nullptr;
PairWindow *pairWin;
uint val;
@@ -262,21 +262,22 @@ PairWindow *Windows::newPairWindow(uint method, Window *key, uint size) {
void Windows::rearrange() {
if (_rootWin) {
Rect box;
+ Point cell(g_conf->_monoInfo._cellW, g_conf->_monoInfo._cellH);
if (g_conf->_lockCols) {
- int desired_width = g_conf->_wMarginSaveX * 2 + g_conf->_cellW * g_conf->_cols;
+ int desired_width = g_conf->_wMarginSaveX * 2 + cell.x * g_conf->_cols;
if (desired_width > g_conf->_imageW)
g_conf->_wMarginX = g_conf->_wMarginSaveX;
else
- g_conf->_wMarginX = (g_conf->_imageW - g_conf->_cellW * g_conf->_cols) / 2;
+ g_conf->_wMarginX = (g_conf->_imageW - cell.x * g_conf->_cols) / 2;
}
if (g_conf->_lockRows) {
- int desired_height = g_conf->_wMarginSaveY * 2 + g_conf->_cellH * g_conf->_rows;
+ int desired_height = g_conf->_wMarginSaveY * 2 + cell.y * g_conf->_rows;
if (desired_height > g_conf->_imageH)
g_conf->_wMarginY = g_conf->_wMarginSaveY;
else
- g_conf->_wMarginY = (g_conf->_imageH - g_conf->_cellH * g_conf->_rows) / 2;
+ g_conf->_wMarginY = (g_conf->_imageH - cell.y * g_conf->_rows) / 2;
}
box.left = g_conf->_wMarginX;