[Scummvm-git-logs] scummvm master -> 8a51f305335810d52d3633f8b1cc910b84c5f0e6
dreammaster
paulfgilbert at gmail.com
Mon Aug 5 01:45:22 CEST 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:
2d0912b59b GLK: FROTZ: Fix crash in Arthur intro
8a51f30533 GLK: Create an intermediate TextWindow base class for text windows
Commit: 2d0912b59b6a5d02f5bfb131e0c288382ca83432
https://github.com/scummvm/scummvm/commit/2d0912b59b6a5d02f5bfb131e0c288382ca83432
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-08-04T16:44:22-07:00
Commit Message:
GLK: FROTZ: Fix crash in Arthur intro
Changed paths:
engines/glk/window_pair.cpp
diff --git a/engines/glk/window_pair.cpp b/engines/glk/window_pair.cpp
index e564e54..96d879a 100644
--- a/engines/glk/window_pair.cpp
+++ b/engines/glk/window_pair.cpp
@@ -52,6 +52,12 @@ void PairWindow::rearrange(const Rect &box) {
_bbox = box;
+ if (_dir == winmethod_Arbitrary) {
+ // When a pair window is in "arbitrary" mode, each child window has it's own independant positioning,
+ // so thre's no need to be readjusting it
+ return;
+ }
+
if (!_backward) {
ch1 = _children[0];
ch2 = _children[1];
@@ -60,19 +66,6 @@ void PairWindow::rearrange(const Rect &box) {
ch2 = _children[0];
}
- if (_dir == winmethod_Arbitrary) {
- // When a pair window is in "arbitrary" mode, each child window has it's own independant positioning,
- // so thre's no need to be readjusting it
- /*
- for (int ctr = 0, idx = (_backward ? (int)_children.size() - 1 : 0); ctr < (int)_children.size();
- ++ctr, idx += (_backward ? -1 : 1)) {
- Window *w = _children[idx];
- w->rearrange();
- }
- */
- return;
- }
-
if (_vertical) {
min = _bbox.left;
max = _bbox.right;
Commit: 8a51f305335810d52d3633f8b1cc910b84c5f0e6
https://github.com/scummvm/scummvm/commit/8a51f305335810d52d3633f8b1cc910b84c5f0e6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-08-04T16:44:22-07:00
Commit Message:
GLK: Create an intermediate TextWindow base class for text windows
This will make it easier to check whether a window is textual
without having to check for both the grid & buffer classes explicitly
Changed paths:
engines/glk/window_text_buffer.cpp
engines/glk/window_text_buffer.h
engines/glk/window_text_grid.cpp
engines/glk/window_text_grid.h
engines/glk/windows.h
diff --git a/engines/glk/window_text_buffer.cpp b/engines/glk/window_text_buffer.cpp
index b182643..6c312be 100644
--- a/engines/glk/window_text_buffer.cpp
+++ b/engines/glk/window_text_buffer.cpp
@@ -36,7 +36,7 @@ namespace Glk {
#define SLOP (2 * GLI_SUBPIX)
-TextBufferWindow::TextBufferWindow(Windows *windows, uint rock) : Window(windows, rock),
+TextBufferWindow::TextBufferWindow(Windows *windows, uint rock) : TextWindow(windows, rock),
_font(g_conf->_propInfo), _historyPos(0), _historyFirst(0), _historyPresent(0),
_lastSeen(0), _scrollPos(0), _scrollMax(0), _scrollBack(SCROLLBACK), _width(-1), _height(-1),
_inBuf(nullptr), _lineTerminators(nullptr), _echoLineInput(true), _ladjw(0), _radjw(0),
diff --git a/engines/glk/window_text_buffer.h b/engines/glk/window_text_buffer.h
index 9020c1a..2e1e2ff 100644
--- a/engines/glk/window_text_buffer.h
+++ b/engines/glk/window_text_buffer.h
@@ -35,7 +35,7 @@ namespace Glk {
/**
* Text Buffer window
*/
-class TextBufferWindow : public Window, Speech {
+class TextBufferWindow : public TextWindow, Speech {
/**
* Structure for a row within the window
*/
diff --git a/engines/glk/window_text_grid.cpp b/engines/glk/window_text_grid.cpp
index 226b2f1..fb5a3a4 100644
--- a/engines/glk/window_text_grid.cpp
+++ b/engines/glk/window_text_grid.cpp
@@ -28,7 +28,7 @@
namespace Glk {
-TextGridWindow::TextGridWindow(Windows *windows, uint rock) : Window(windows, rock),
+TextGridWindow::TextGridWindow(Windows *windows, uint rock) : TextWindow(windows, rock),
_font(g_conf->_monoInfo) {
_type = wintype_TextGrid;
_width = _height = 0;
diff --git a/engines/glk/window_text_grid.h b/engines/glk/window_text_grid.h
index de64ab3..c9c4b03 100644
--- a/engines/glk/window_text_grid.h
+++ b/engines/glk/window_text_grid.h
@@ -31,7 +31,7 @@ namespace Glk {
/**
* Text Grid window
*/
-class TextGridWindow : public Window {
+class TextGridWindow : public TextWindow {
/**
* Structure for a row within the grid window
*/
diff --git a/engines/glk/windows.h b/engines/glk/windows.h
index 1974b3e..f3edbb2 100644
--- a/engines/glk/windows.h
+++ b/engines/glk/windows.h
@@ -595,6 +595,17 @@ public:
BlankWindow(Windows *windows, uint rock);
};
+/**
+ * Abstract common base for the text window classes
+ */
+class TextWindow : public Window {
+public:
+ /**
+ * Constructor
+ */
+ TextWindow(Windows *windows, uint rock) : Window(windows, rock) {}
+};
+
} // End of namespace Glk
#endif
More information about the Scummvm-git-logs
mailing list