aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-29 00:53:41 +0100
committerEugene Sandulenko2017-01-29 00:54:31 +0100
commite9bd946043a4ba8ef65fb712d5d05c18cd71d6d9 (patch)
treedec8bb7f9ea0b0e092e89396dc0b41b5bbe73769 /graphics
parent5a8d1862e426e303026fa3134763e4b082ff8dcc (diff)
downloadscummvm-rg350-e9bd946043a4ba8ef65fb712d5d05c18cd71d6d9.tar.gz
scummvm-rg350-e9bd946043a4ba8ef65fb712d5d05c18cd71d6d9.tar.bz2
scummvm-rg350-e9bd946043a4ba8ef65fb712d5d05c18cd71d6d9.zip
GRAPHICS: Initial code for MacText formatting
Diffstat (limited to 'graphics')
-rw-r--r--graphics/macgui/mactext.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 1b5887263d..208307eb98 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -48,6 +48,29 @@ void MacText::splitString(Common::String &str) {
bool prevCR = false;
while (*s) {
+ if (*s == '\001') {
+ s++;
+ if (*s == '\001') {
+ // Copy it verbatim
+ } else {
+ if (*s++ != '\015')
+ error("MacText: formatting error");
+
+ uint16 fontId = *s++; fontId = (fontId << 8) | *s++;
+ byte textSlant = *s++;
+ byte unk3f = *s++;
+ uint16 fontSize = *s++; fontSize = (fontSize << 8) | *s++;
+ uint16 palinfo1 = *s++; palinfo1 = (palinfo1 << 8) | *s++;
+ uint16 palinfo2 = *s++; palinfo2 = (palinfo2 << 8) | *s++;
+ uint16 palinfo3 = *s++; palinfo3 = (palinfo3 << 8) | *s++;
+
+ debug(8, "******** splitString: fontId: %d, textSlant: %d, unk3: %d, fontSize: %d, p0: %x p1: %x p2: %x",
+ fontId, textSlant, unk3f, fontSize, palinfo1, palinfo2, palinfo3);
+
+ continue;
+ }
+ }
+
if (*s == '\n' && prevCR) { // trean \r\n as one
prevCR = false;