diff options
author | Travis Howell | 2009-03-08 14:15:59 +0000 |
---|---|---|
committer | Travis Howell | 2009-03-08 14:15:59 +0000 |
commit | e5e9797d9ceae790a6f6a0b0e127bd47abfcc4c3 (patch) | |
tree | 605b2f8345b60925951d015440dc88ed7f2edd94 /engines | |
parent | feabf9d33f8bbf98aa8afd2be8303b34a084c410 (diff) | |
download | scummvm-rg350-e5e9797d9ceae790a6f6a0b0e127bd47abfcc4c3.tar.gz scummvm-rg350-e5e9797d9ceae790a6f6a0b0e127bd47abfcc4c3.tar.bz2 scummvm-rg350-e5e9797d9ceae790a6f6a0b0e127bd47abfcc4c3.zip |
Cleanup.
svn-id: r39227
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/string.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index aad276ca5d..72f9e60b3a 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -1493,7 +1493,7 @@ void AGOSEngine_PN::getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1, } char *AGOSEngine_PN::getMessage(char *msg, uint16 num) { - char *origPtr, *strPtr2, *strPtr1 = msg; + char *origPtr, *strPtr1 = msg; uint8 count; getObjectName(strPtr1, num); @@ -1512,7 +1512,7 @@ char *AGOSEngine_PN::getMessage(char *msg, uint16 num) { } origPtr = strPtr1; - while (strPtr1[0] != 13) + while (*strPtr1 != 13) strPtr1++; strPtr1[0] = 32; @@ -1522,27 +1522,22 @@ char *AGOSEngine_PN::getMessage(char *msg, uint16 num) { if (_videoLockOut & 0x10) { strPtr1 = origPtr; count = 6; - while (strPtr1[0] != 0) { - if (strPtr1[0] == 32) { + while (*strPtr1) { + if (*strPtr1 == 32) { count = 6; } else { count--; if (count == 0) { char *tmpPtr = strPtr1; - strPtr2 = strPtr1; + char *strPtr2 = strPtr1; - while (strPtr2[0] != 0 && strPtr2[0] != 32) + while (*strPtr2 != 0 && *strPtr2 != 32) strPtr2++; - while (strPtr2[0] != 0) { - strPtr1[0] = strPtr2[0]; - strPtr2++; - strPtr1++; + while (*strPtr2) { + *strPtr1++ = *strPtr2++; } - - strPtr1[0] = strPtr2[0]; - strPtr2++; - strPtr1++; + *strPtr1++ = *strPtr2++; strPtr1 = tmpPtr; count = 6; |