diff options
author | Max Horn | 2009-01-29 05:26:12 +0000 |
---|---|---|
committer | Max Horn | 2009-01-29 05:26:12 +0000 |
commit | ac59693be26b4239aaaf380896a1e1b753172546 (patch) | |
tree | b64a9b664917ed86e78e90560b034f0b1ee49054 /engines/agos | |
parent | a0a82d911c77b63f2069dbc39ab26394fe4d377d (diff) | |
download | scummvm-rg350-ac59693be26b4239aaaf380896a1e1b753172546.tar.gz scummvm-rg350-ac59693be26b4239aaaf380896a1e1b753172546.tar.bz2 scummvm-rg350-ac59693be26b4239aaaf380896a1e1b753172546.zip |
A ton of code formatting fixes; also fixed warnings about single line loops like 'while(cond);' by inserting newlines
svn-id: r36127
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/string.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index f4762d36ff..ee922299a2 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -80,7 +80,8 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) { } ptr1 = _byteTokenStrings; /* Find it */ while (count1--) { - while (*ptr1++); + while (*ptr1++) + ; } ptr1 = uncompressToken(b, ptr1); /* Try this one as a two byte token */ uncompressText(ptr1); /* Uncompress rest of this token */ @@ -88,7 +89,8 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) { } } while (count1--) { - while (*ptr2++); + while (*ptr2++) + ; } uncompressText(ptr2); } else { @@ -103,7 +105,8 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) { } ptr1 = _byteTokenStrings; while (count1--) { /* Is a byte token so count */ - while (*ptr1++); /* to start of token */ + while (*ptr1++) /* to start of token */ + ; } uncompressText(ptr1); /* and do it */ } @@ -183,7 +186,8 @@ void AGOSEngine::setupStringTable(byte *mem, int num) { _twoByteTokenStrings = mem; ct1 = i; while (*mem++) { - while (*mem++); + while (*mem++) + ; i--; if ((i == 0) && (ct1 != 0)) { _secondTwoByteTokenStrings = mem; @@ -194,10 +198,12 @@ void AGOSEngine::setupStringTable(byte *mem, int num) { _thirdTwoByteTokenStrings = mem; } _byteTokens = mem; - while (*mem++); + while (*mem++) + ; _byteTokenStrings = mem; while (*mem++) { - while(*mem++); + while (*mem++) + ; } i = 0; l1: _stringTabPtr[i++] = mem; @@ -206,14 +212,16 @@ l1: _stringTabPtr[i++] = mem; _stringTabPos = i; return; } - while (*mem++); + while (*mem++) + ; goto l1; } else { for (;;) { _stringTabPtr[i++] = mem; if (--num == 0) break; - for (; *mem; mem++); + for (; *mem; mem++) + ; mem++; } @@ -227,7 +235,8 @@ void AGOSEngine::setupLocalStringTable(byte *mem, int num) { _localStringtable[i++] = mem; if (--num == 0) break; - for (; *mem; mem++); + for (; *mem; mem++) + ; mem++; } } |