aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/frotz
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-25 16:34:55 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commit9fa7e9be8180614b5f7c94440a8243f775e56aef (patch)
treedfb0aa31a6a07a3a0bbff818dd3eae36c0b679c3 /engines/glk/frotz
parent3a543a1e6d35a5bcab61a8fb4257b7d567d9e278 (diff)
downloadscummvm-rg350-9fa7e9be8180614b5f7c94440a8243f775e56aef.tar.gz
scummvm-rg350-9fa7e9be8180614b5f7c94440a8243f775e56aef.tar.bz2
scummvm-rg350-9fa7e9be8180614b5f7c94440a8243f775e56aef.zip
GLK: FROTZ: Fix selection of the character graphics font
Diffstat (limited to 'engines/glk/frotz')
-rw-r--r--engines/glk/frotz/processor_screen.cpp6
-rw-r--r--engines/glk/frotz/screen.cpp7
-rw-r--r--engines/glk/frotz/screen.h5
3 files changed, 15 insertions, 3 deletions
diff --git a/engines/glk/frotz/processor_screen.cpp b/engines/glk/frotz/processor_screen.cpp
index 696ce7822a..6a518cf525 100644
--- a/engines/glk/frotz/processor_screen.cpp
+++ b/engines/glk/frotz/processor_screen.cpp
@@ -352,7 +352,7 @@ void Processor::z_set_text_style() {
// not tickle time
curstyle |= zargs[0];
- if (h_flags & FIXED_FONT_FLAG || curr_font == FIXED_WIDTH_FONT)
+ if (h_flags & FIXED_FONT_FLAG || curr_font == FIXED_WIDTH_FONT || curr_font == GRAPHICS_FONT)
style = curstyle | FIXED_WIDTH_STYLE;
else
style = curstyle;
@@ -367,7 +367,9 @@ void Processor::z_set_text_style() {
}
if (style & FIXED_WIDTH_STYLE) {
- if (style & BOLDFACE_STYLE && style & EMPHASIS_STYLE)
+ if (curr_font == GRAPHICS_FONT)
+ glk_set_style(style_User1); // character graphics
+ else if (style & BOLDFACE_STYLE && style & EMPHASIS_STYLE)
glk_set_style(style_BlockQuote); // monoz
else if (style & EMPHASIS_STYLE)
glk_set_style(style_Alert); // monoi
diff --git a/engines/glk/frotz/screen.cpp b/engines/glk/frotz/screen.cpp
index a71217cc26..edd62eb7da 100644
--- a/engines/glk/frotz/screen.cpp
+++ b/engines/glk/frotz/screen.cpp
@@ -21,12 +21,17 @@
*/
#include "glk/frotz/screen.h"
+#include "glk/conf.h"
#include "common/file.h"
#include "image/bmp.h"
namespace Glk {
namespace Frotz {
+FrotzScreen::FrotzScreen() : Glk::Screen() {
+ g_conf->_tStyles[style_User1].font = CUSTOM;
+}
+
void FrotzScreen::loadFonts(Common::Archive *archive) {
Screen::loadFonts(archive);
@@ -66,7 +71,7 @@ void BitmapFont::drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint
const byte *srcP = (const byte *)_surface.getBasePtr(r.left, r.top + yCtr);
for (int xCtr = 0; xCtr < r.width(); ++xCtr, ++srcP) {
- if (*srcP)
+ if (!*srcP)
dst->hLine(x + xCtr, y + yCtr, x + xCtr, color);
}
}
diff --git a/engines/glk/frotz/screen.h b/engines/glk/frotz/screen.h
index d8b2b89a3f..568c3c73bf 100644
--- a/engines/glk/frotz/screen.h
+++ b/engines/glk/frotz/screen.h
@@ -42,6 +42,11 @@ protected:
* Load the fonts
*/
virtual void loadFonts(Common::Archive *archive) override;
+public:
+ /**
+ * Constructor
+ */
+ FrotzScreen();
};
/**