[Scummvm-git-logs] scummvm master -> 0b9fe06d23fb443100fdae81ae4e4f64de20276f

dreammaster paulfgilbert at gmail.com
Fri Feb 22 03:41:57 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0b9fe06d23 GLK: FROTZ: Disable typographic niceties for Beyond Zork font


Commit: 0b9fe06d23fb443100fdae81ae4e4f64de20276f
    https://github.com/scummvm/scummvm/commit/0b9fe06d23fb443100fdae81ae4e4f64de20276f
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2019-02-21T18:41:54-08:00

Commit Message:
GLK: FROTZ: Disable typographic niceties for Beyond Zork font

The Beyond Zork graphics font doesn't support Unicode, so allowing
it to convert things like straight quotes into curly ones can cause
ScummVM to crash. Disable these conversions while the Beyond Zork
graphics font is used to avoid that. This fixes bug #10865.

Changed paths:
    engines/glk/frotz/processor.cpp
    engines/glk/frotz/processor.h
    engines/glk/frotz/processor_screen.cpp


diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp
index 8e719e2..fdfafaa 100644
--- a/engines/glk/frotz/processor.cpp
+++ b/engines/glk/frotz/processor.cpp
@@ -22,6 +22,7 @@
 
 #include "glk/frotz/processor.h"
 #include "glk/frotz/frotz.h"
+#include "glk/conf.h"
 
 namespace Glk {
 namespace Frotz {
@@ -197,6 +198,11 @@ void Processor::initialize() {
 		op0_opcodes[9] = &Processor::z_catch;
 		op1_opcodes[15] = &Processor::z_call_n;
 	}
+
+	PropFontInfo &pi = g_conf->_propInfo;
+	_quotes = pi._quotes;
+	_dashes = pi._quotes;
+	_spaces = pi._spaces;
 }
 
 void Processor::load_operand(zbyte type) {
diff --git a/engines/glk/frotz/processor.h b/engines/glk/frotz/processor.h
index dddcc76..15b8c51 100644
--- a/engines/glk/frotz/processor.h
+++ b/engines/glk/frotz/processor.h
@@ -95,6 +95,10 @@ private:
 	bool istream_replay;
 	bool message;
 	Common::FixedStack<Redirect, MAX_NESTING> _redirect;
+
+	int _quotes;
+	int _dashes;
+	int _spaces;
 protected:
 	/**
 	 * \defgroup General support methods
diff --git a/engines/glk/frotz/processor_screen.cpp b/engines/glk/frotz/processor_screen.cpp
index 3f45b06..0bcf982 100644
--- a/engines/glk/frotz/processor_screen.cpp
+++ b/engines/glk/frotz/processor_screen.cpp
@@ -22,6 +22,7 @@
 
 #include "glk/frotz/processor.h"
 #include "glk/frotz/frotz.h"
+#include "glk/conf.h"
 #include "glk/events.h"
 
 namespace Glk {
@@ -382,6 +383,20 @@ void Processor::z_set_font() {
 		store(0);
 		break;
 	}
+
+	PropFontInfo &pi = g_conf->_propInfo;
+	if (curr_font == GRAPHICS_FONT) {
+		_quotes = pi._quotes;
+		_dashes = pi._dashes;
+		_spaces = pi._spaces;
+		pi._quotes = 0;
+		pi._dashes = 0;
+		pi._spaces = 0;
+	} else {
+		pi._quotes = _quotes;
+		pi._dashes = _dashes;
+		pi._spaces = _spaces;
+	}
 }
 
 void Processor::z_set_cursor() {





More information about the Scummvm-git-logs mailing list