aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/text16.cpp
diff options
context:
space:
mode:
authorVincent Bénony2016-01-06 16:20:23 +0100
committerVincent Bénony2016-01-06 16:20:23 +0100
commitefdb5679ce6304dbc854afbbc511e633d7513338 (patch)
treee680a240e5f6018fc3a4cce53b50060caa22a929 /engines/sci/graphics/text16.cpp
parent4687ff6d6d2863cc95c8137543ecf9c39bc01723 (diff)
parentb72c02bad44749a1355acefdb198e36b2e772575 (diff)
downloadscummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.gz
scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.bz2
scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.zip
IOS: Merge branch 'master' into ios-fix
Diffstat (limited to 'engines/sci/graphics/text16.cpp')
-rw-r--r--engines/sci/graphics/text16.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 89c9be59f0..b0f2c52791 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -83,8 +83,7 @@ void GfxText16::ClearChar(int16 chr) {
}
// This internal function gets called as soon as a '|' is found in a text. It
-// will process the encountered code and set new font/set color. We only support
-// one-digit codes currently, don't know if multi-digit codes are possible.
+// will process the encountered code and set new font/set color.
// Returns textcode character count.
int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int16 orgPenColor, bool doingDrawing) {
const char *textCode = text;
@@ -99,10 +98,8 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1
// c -> sets textColor to current port pen color
// cX -> sets textColor to _textColors[X-1]
curCode = textCode[0];
- curCodeParm = textCode[1];
- if (Common::isDigit(curCodeParm)) {
- curCodeParm -= '0';
- } else {
+ curCodeParm = strtol(textCode+1, NULL, 10);
+ if (!Common::isDigit(textCode[1])) {
curCodeParm = -1;
}
switch (curCode) {