diff options
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/frotz/processor_screen.cpp | 6 | ||||
-rw-r--r-- | engines/glk/frotz/screen.cpp | 7 | ||||
-rw-r--r-- | engines/glk/frotz/screen.h | 5 | ||||
-rw-r--r-- | engines/glk/screen.h | 2 |
4 files changed, 16 insertions, 4 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(); }; /** diff --git a/engines/glk/screen.h b/engines/glk/screen.h index bb5d7f6d25..10f8b14a2f 100644 --- a/engines/glk/screen.h +++ b/engines/glk/screen.h @@ -37,7 +37,7 @@ enum CaretShape { SMALL_DOT = 0, FAT_DOT = 1, THIN_LINE = 2, FAT_LINE = 3, BLOCK = 4 }; -enum FACES { MONOR, MONOB, MONOI, MONOZ, PROPR, PROPB, PROPI, PROPZ }; +enum FACES { MONOR, MONOB, MONOI, MONOZ, PROPR, PROPB, PROPI, PROPZ, CUSTOM }; enum TYPES { MONOF, PROPF }; enum STYLES { FONTR, FONTB, FONTI, FONTZ }; |