[Scummvm-git-logs] scummvm master -> 61ff57638afcad565739a1dc8bfc5f017b12e650

sev- noreply at scummvm.org
Mon Nov 22 21:58:25 UTC 2021


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:
61ff57638a DIRECTOR: fix Japanese continuation in preprocessor


Commit: 61ff57638afcad565739a1dc8bfc5f017b12e650
    https://github.com/scummvm/scummvm/commit/61ff57638afcad565739a1dc8bfc5f017b12e650
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2021-11-22T22:58:23+01:00

Commit Message:
DIRECTOR: fix Japanese continuation in preprocessor

Changed paths:
    engines/director/lingo/lingo-preprocessor.cpp


diff --git a/engines/director/lingo/lingo-preprocessor.cpp b/engines/director/lingo/lingo-preprocessor.cpp
index 26ff6e4ce6..eb11db93cf 100644
--- a/engines/director/lingo/lingo-preprocessor.cpp
+++ b/engines/director/lingo/lingo-preprocessor.cpp
@@ -79,6 +79,31 @@ Common::U32String LingoCompiler::codePreprocessor(const Common::U32String &code,
 				break;
 			s++;
 			continue;
+		} else if (*s == 0xFF82) {	// Misparsed Japanese continuation
+			if (!*(s+1)) { // EOS - write as is and finish up
+				res += *s++;
+				break;
+			}
+			// Next character isn't a newline; write as is and keep
+			// going.
+			if (*(s+1) != 13) {
+				res += *s++;
+				continue;
+			}
+
+			s++;
+			// This is a bit of a hack; in MacJapanese the codepoint at
+			// C2 is the half-width katakana "tsu", so ScummVM is
+			// getting confused about what's here in the script after
+			// translating from MacJapanese to Unicode.
+			// Just swap the character out for the right Unicode character here.
+			// This can be removed if Lingo parsing is reworked to act
+			// on the original raw bytes instead of a Unicode translation.
+			res += CONTINUATION;
+			if (!*s)
+				break;
+			s++;
+			continue;
 		}
 		res += *s++;
 	}




More information about the Scummvm-git-logs mailing list