aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2019-03-13 20:19:11 -0700
committerPaul Gilbert2019-03-13 20:19:11 -0700
commitd6b41b59f3fa83275475517bb9810f8508c4e36d (patch)
treecd88cb6de83fa143dc949277fbf8925ec4b0b446
parent7a13a6067805fdc15b76646ed052d7394f182b16 (diff)
downloadscummvm-rg350-d6b41b59f3fa83275475517bb9810f8508c4e36d.tar.gz
scummvm-rg350-d6b41b59f3fa83275475517bb9810f8508c4e36d.tar.bz2
scummvm-rg350-d6b41b59f3fa83275475517bb9810f8508c4e36d.zip
GLK: FROTZ: Move setReverseVideo into Window
-rw-r--r--engines/glk/frotz/glk_interface.cpp7
-rw-r--r--engines/glk/frotz/glk_interface.h5
-rw-r--r--engines/glk/frotz/processor_screen.cpp2
-rw-r--r--engines/glk/frotz/windows.cpp19
-rw-r--r--engines/glk/frotz/windows.h5
5 files changed, 15 insertions, 23 deletions
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp
index f6e01db955..330c8be027 100644
--- a/engines/glk/frotz/glk_interface.cpp
+++ b/engines/glk/frotz/glk_interface.cpp
@@ -693,12 +693,5 @@ uint GlkInterface::roundDiv(uint x, uint y) {
return quotient;
}
-void GlkInterface::os_set_reverse_video(bool flag) {
-#ifdef GARGLK
- _reverseVideo = flag;
- garglk_set_reversevideo(flag);
-#endif
-}
-
} // End of namespace Frotz
} // End of namespace Glk
diff --git a/engines/glk/frotz/glk_interface.h b/engines/glk/frotz/glk_interface.h
index df176afef5..67f0a86813 100644
--- a/engines/glk/frotz/glk_interface.h
+++ b/engines/glk/frotz/glk_interface.h
@@ -242,11 +242,6 @@ protected:
* Waits for the user to type an input line
*/
zchar os_read_line(int max, zchar *buf, int timeout, int width, int continued);
-
- /**
- * Set whether reverse video mode is active
- */
- void os_set_reverse_video(bool flag);
public:
/**
* Constructor
diff --git a/engines/glk/frotz/processor_screen.cpp b/engines/glk/frotz/processor_screen.cpp
index 1ce0f91099..f6eb16ac20 100644
--- a/engines/glk/frotz/processor_screen.cpp
+++ b/engines/glk/frotz/processor_screen.cpp
@@ -437,7 +437,7 @@ void Processor::z_show_status() {
// Move to top of the status window, and print in reverse style.
_wp.setWindow(1);
- os_set_reverse_video(true);
+ _wp._upper.setReverseVideo(true);
_wp._upper.setCursor(Point(1, 1));
// If the screen width is below 55 characters then we have to use
diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp
index bacd6e3f2f..935c9a4098 100644
--- a/engines/glk/frotz/windows.cpp
+++ b/engines/glk/frotz/windows.cpp
@@ -257,14 +257,12 @@ void Window::setStyle(int style) {
void Window::updateStyle() {
uint style = _currStyle;
- /*
- if (style & REVERSE_STYLE) {
- os_set_reverse_video(true);
- }*/
-
if (!_win)
createGlkWindow();
+ if (style & REVERSE_STYLE)
+ setReverseVideo(true);
+
if (style & FIXED_WIDTH_STYLE) {
if (_currFont == GRAPHICS_FONT)
_win->_stream->setStyle(style_User1); // character graphics
@@ -287,11 +285,12 @@ void Window::updateStyle() {
_win->_stream->setStyle(style_Normal); // propr
}
- /*
- if (_currStyle == 0) {
- os_set_reverse_video(false);
- }
- */
+ if (_currStyle == 0)
+ setReverseVideo(false);
+}
+
+void Window::setReverseVideo(bool reverse) {
+ _win->_stream->setReverseVideo(reverse);
}
void Window::createGlkWindow() {
diff --git a/engines/glk/frotz/windows.h b/engines/glk/frotz/windows.h
index 8b971cc9c4..fe59cc7e00 100644
--- a/engines/glk/frotz/windows.h
+++ b/engines/glk/frotz/windows.h
@@ -192,6 +192,11 @@ public:
* Set the textstyle
*/
void setStyle(int style = -1);
+
+ /**
+ * Set reverse video
+ */
+ void setReverseVideo(bool reverse);
};
/**