[Scummvm-git-logs] scummvm master -> 8bec4607d07bdee64dc6234b082747765480f04b
dreammaster
paulfgilbert at gmail.com
Thu Mar 14 04:24:27 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:
d6b41b59f3 GLK: FROTZ: Move setReverseVideo into Window
8bec4607d0 GLK: FROTZ: Set window properties for font number and size when font changes
Commit: d6b41b59f3fa83275475517bb9810f8508c4e36d
https://github.com/scummvm/scummvm/commit/d6b41b59f3fa83275475517bb9810f8508c4e36d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-03-13T20:19:11-07:00
Commit Message:
GLK: FROTZ: Move setReverseVideo into Window
Changed paths:
engines/glk/frotz/glk_interface.cpp
engines/glk/frotz/glk_interface.h
engines/glk/frotz/processor_screen.cpp
engines/glk/frotz/windows.cpp
engines/glk/frotz/windows.h
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp
index f6e01db..330c8be 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 df176af..67f0a86 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 1ce0f91..f6eb16a 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 bacd6e3..935c9a4 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 8b971cc..fe59cc7 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);
};
/**
Commit: 8bec4607d07bdee64dc6234b082747765480f04b
https://github.com/scummvm/scummvm/commit/8bec4607d07bdee64dc6234b082747765480f04b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-03-13T20:24:05-07:00
Commit Message:
GLK: FROTZ: Set window properties for font number and size when font changes
Changed paths:
engines/glk/frotz/windows.cpp
diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp
index 935c9a4..8ebc263 100644
--- a/engines/glk/frotz/windows.cpp
+++ b/engines/glk/frotz/windows.cpp
@@ -47,17 +47,6 @@ void Windows::setup(bool isVersion6) {
// flexibility of wher we draw pictures, and the lower and upper areas sit on top of them
_background = g_vm->glk_window_open(0, 0, 0, wintype_Graphics, 0);
_background->setBackgroundColor(0xffffff);
- /*
- MonoFontInfo &fi = g_vm->_conf->_monoInfo;
- _lower = g_vm->glk_window_open(g_vm->glk_window_get_root(),
- winmethod_Arbitrary | winmethod_Fixed, 0, wintype_TextBuffer, 0);
- _upper = g_vm->glk_window_open(g_vm->glk_window_get_root(),
- winmethod_Arbitrary | winmethod_Fixed, 0, wintype_TextGrid, 0);
- _upper.setPosition(Point(1, 1));
- _upper.setSize(Point(g_system->getWidth() / fi._cellW, 1));
- _lower.setPosition(Point(1, 2));
- _lower.setSize(Point(g_system->getWidth() / fi._cellW, g_system->getHeight() / fi._cellH - 1));
- */
} else {
_lower = g_vm->glk_window_open(0, 0, 0, wintype_TextBuffer, 0);
@@ -233,6 +222,7 @@ uint Window::setFont(uint font) {
pi._spaces = _spaces;
}
+ _properties[FONT_NUMBER] = font;
return result;
}
@@ -274,6 +264,9 @@ void Window::updateStyle() {
_win->_stream->setStyle(style_Subheader); // monob
else
_win->_stream->setStyle(style_Preformatted); // monor
+
+ MonoFontInfo &fi = g_vm->_conf->_monoInfo;
+ _properties[FONT_SIZE] = (fi._cellH << 8) | fi._cellW;
} else {
if (style & BOLDFACE_STYLE && style & EMPHASIS_STYLE)
_win->_stream->setStyle(style_Note); // propz
@@ -283,6 +276,9 @@ void Window::updateStyle() {
_win->_stream->setStyle(style_Header); // propb
else
_win->_stream->setStyle(style_Normal); // propr
+
+ PropFontInfo &fi = g_vm->_conf->_propInfo;
+ _properties[FONT_SIZE] = (fi._cellH << 8) | fi._cellW;
}
if (_currStyle == 0)
More information about the Scummvm-git-logs
mailing list