Patch 622386: do_command(256) implementation, Sam and Max

svn-id: r5134
This commit is contained in:
James Brown 2002-10-13 05:39:26 +00:00
parent f6c731a0a4
commit 69c7a8b572
2 changed files with 24 additions and 17 deletions

View file

@ -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: