[Scummvm-git-logs] scummvm master -> 37469a45c42cf53ba183754a0708957cf686b516

stevenhoefel stevenhoefel at hotmail.com
Mon Jan 16 00:13:58 CET 2017


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:
37469a45c4 DIRECTOR: Correctly parse STXT runs to determine formatting.


Commit: 37469a45c42cf53ba183754a0708957cf686b516
    https://github.com/scummvm/scummvm/commit/37469a45c42cf53ba183754a0708957cf686b516
Author: stevenhoefel (stevenhoefel at hotmail.com)
Date: 2017-01-16T10:13:50+11:00

Commit Message:
DIRECTOR: Correctly parse STXT runs to determine formatting.

Changed paths:
    engines/director/frame.cpp


diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 47cf0b4..4a478de 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -824,21 +824,23 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
 	if (strLen < 200)
 		debugC(3, kDebugText, "text: '%s'", text.c_str());
 
-	uint16 a = textStream->readUint16();
-	uint32 b = textStream->readUint32();
-	uint16 c = textStream->readUint16();
-	uint16 d = textStream->readUint16();
-
-	debugC(3, kDebugText, "text: a: %x b: %x c: %x d: %x", a, b, c, d);
-
-	textCast->fontId = textStream->readUint16();
-	textCast->textSlant = textStream->readByte();
-	textStream->readByte();
-	textCast->fontSize = textStream->readUint16();
-
-	textCast->palinfo1 = textStream->readUint16();
-	textCast->palinfo2 = textStream->readUint16();
-	textCast->palinfo3 = textStream->readUint16();
+	uint16 formattingCount = textStream->readUint16();
+	while (formattingCount) {
+		uint32 formatStartOffset = textStream->readUint32();
+		textStream->readUint16();
+		textStream->readUint16();
+
+		textCast->fontId = textStream->readUint16();
+		textCast->textSlant = textStream->readByte();
+		textStream->readByte();
+		textCast->fontSize = textStream->readUint16();
+
+		textCast->palinfo1 = textStream->readUint16();
+		textCast->palinfo2 = textStream->readUint16();
+		textCast->palinfo3 = textStream->readUint16();
+
+		formattingCount--;
+	}
 
 	uint16 boxShadow = (uint16)textCast->boxShadow;
 	uint16 borderSize = (uint16)textCast->borderSize;





More information about the Scummvm-git-logs mailing list