From a6c5caf1fbcad5a1b096a6dc666d7bc9c9096dd0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 16 Aug 2019 18:21:58 -0700 Subject: GLK: FROTZ: Properly implement os_char_width This fixes a memory corruption in the Arthur startup --- engines/glk/frotz/glk_interface.cpp | 4 +--- engines/glk/frotz/processor.cpp | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'engines/glk') diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 6f1f36e28d..8bbd154360 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -248,9 +248,7 @@ bool GlkInterface::initPictures() { } int GlkInterface::os_char_width(zchar z) { - // Note: I'm presuming this is 1 because Glk Text Grid windows take care of font sizes internally, - // so we can pretend that any font has a 1x1 size - return 1; + return g_conf->_monoInfo._cellW; } int GlkInterface::os_string_width(const zchar *s) { diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp index 22ea530b64..b253510d79 100644 --- a/engines/glk/frotz/processor.cpp +++ b/engines/glk/frotz/processor.cpp @@ -246,7 +246,6 @@ void Processor::load_all_operands(zbyte specifier) { void Processor::interpret() { do { zbyte opcode; -// debug("%.6x", pcp - zmp); CODE_BYTE(opcode); zargc = 0; -- cgit v1.2.3