aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-08-12 09:52:00 +0000
committerMartin Kiewitz2010-08-12 09:52:00 +0000
commit91c2c7f40176105330c5efe2ac52ad62aa6d872c (patch)
treef3c2a1bd065cfedb36a1b691dbab99b6c5aa5ce9
parent629042a07cae1ee101b1fea64d9025f2498b7d3a (diff)
downloadscummvm-rg350-91c2c7f40176105330c5efe2ac52ad62aa6d872c.tar.gz
scummvm-rg350-91c2c7f40176105330c5efe2ac52ad62aa6d872c.tar.bz2
scummvm-rg350-91c2c7f40176105330c5efe2ac52ad62aa6d872c.zip
SCI: fixing text color support
fixes some words not being red in pepper (part of bug #3040039) svn-id: r52031
-rw-r--r--engines/sci/graphics/text16.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index fc07febe14..f5eb268863 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -92,7 +92,7 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1
const char *textCode = text;
int16 textCodeSize = 0;
char curCode;
- unsigned char curCodeParm;
+ signed char curCodeParm;
// Find the end of the textcode
while ((++textCodeSize) && (*text != 0) && (*text++ != 0x7C)) { }
@@ -105,11 +105,11 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1
if (isdigit(curCodeParm)) {
curCodeParm -= '0';
} else {
- curCodeParm = 0;
+ curCodeParm = -1;
}
switch (curCode) {
case 'c': // set text color
- if (curCodeParm == 0) {
+ if (curCodeParm == -1) {
_ports->_curPort->penClr = orgPenColor;
} else {
if (curCodeParm < _codeColorsCount) {
@@ -117,8 +117,8 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1
}
}
break;
- case 'f':
- if (curCodeParm == 0) {
+ case 'f': // set text font
+ if (curCodeParm == -1) {
SetFont(orgFontId);
} else {
if (curCodeParm < _codeFontsCount) {
@@ -126,6 +126,9 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1
}
}
break;
+ case 'r': // reference?!
+ // Used in Pepper, no idea how this works out
+ break;
}
return textCodeSize;
}