aboutsummaryrefslogtreecommitdiff
path: root/scumm/string.cpp
diff options
context:
space:
mode:
authorJames Brown2002-10-13 05:39:26 +0000
committerJames Brown2002-10-13 05:39:26 +0000
commit69c7a8b5723653fde611fe7f10578951deb61c20 (patch)
tree65e404141f0a20ed464d9c2ee79a875473ff5ba1 /scumm/string.cpp
parentf6c731a0a4e34ed6a41d6b525e0c278904c4f22a (diff)
downloadscummvm-rg350-69c7a8b5723653fde611fe7f10578951deb61c20.tar.gz
scummvm-rg350-69c7a8b5723653fde611fe7f10578951deb61c20.tar.bz2
scummvm-rg350-69c7a8b5723653fde611fe7f10578951deb61c20.zip
Patch 622386: do_command(256) implementation, Sam and Max
svn-id: r5134
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r--scumm/string.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 73932fa897..61c83be5ef 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -45,9 +45,9 @@ int CharsetRenderer::getStringWidth(int arg, byte *text, int pos)
chr = 255;
if (chr == 255) {
chr = text[pos++];
- if (chr == 3)
+ if (chr == 3) // 'WAIT'
break;
- if (chr == 8) {
+ if (chr == 8) { // 'Verb on next line'
if (arg == 1)
break;
while (text[pos] == ' ')
@@ -58,7 +58,7 @@ int CharsetRenderer::getStringWidth(int arg, byte *text, int pos)
pos += 2;
continue;
}
- if (chr == 9 || chr == 1 || chr == 2)
+ if (chr == 9 || chr == 1 || chr == 2) // 'Newline'
break;
if (chr == 14) {
int set = text[pos] | (text[pos + 1] << 8);
@@ -93,9 +93,9 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth)
chr = 255;
if (chr == 255) {
chr = str[pos++];
- if (chr == 3)
+ if (chr == 3) // 'Wait'
break;
- if (chr == 8) {
+ if (chr == 8) { // 'Verb on next line'
if (a == 1) {
curw = 1;
} else {
@@ -108,11 +108,11 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth)
pos += 2;
continue;
}
- if (chr == 1) {
+ if (chr == 1) { // 'Newline'
curw = 1;
continue;
}
- if (chr == 2)
+ if (chr == 2) // 'Don't terminate with \n'
break;
if (chr == 14) {
int set = str[pos] | (str[pos + 1] << 8);
@@ -746,6 +746,7 @@ while ((ptr[num++] = chr = *msg++) != 0) {
addStringToStack(READ_LE_UINT16(ptr + num));
num += 2;
break;
+ case 3:
case 9:
//#if defined(DOTT)
case 10: