diff options
author | Matthew Hoops | 2010-06-24 01:29:46 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-06-24 01:29:46 +0000 |
commit | 3838197ac14be050f1b2db5e1f26d82052dbd331 (patch) | |
tree | bccd441336c284cedc8cbf013945468166f7bab0 /engines | |
parent | 51ba34df0e7fce4f9760de9c2b3c0da77d605e06 (diff) | |
download | scummvm-rg350-3838197ac14be050f1b2db5e1f26d82052dbd331.tar.gz scummvm-rg350-3838197ac14be050f1b2db5e1f26d82052dbd331.tar.bz2 scummvm-rg350-3838197ac14be050f1b2db5e1f26d82052dbd331.zip |
Silence gcc warnings.
svn-id: r50197
Diffstat (limited to 'engines')
-rw-r--r-- | engines/m4/sprite.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/m4/sprite.cpp b/engines/m4/sprite.cpp index 55de6714d1..48a36ac26e 100644 --- a/engines/m4/sprite.cpp +++ b/engines/m4/sprite.cpp @@ -125,19 +125,19 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) { fillRect(bounds(), TRANSPARENT_COLOUR_INDEX); // Major line loop - for (int y = 0; y < h; ++y) { + for (int y2 = 0; y2 < h; ++y2) { byte *destP = getBasePtr(0, y); bool newLine = false; byte cmd = source->readByte(); - int x = 0; + int x2 = 0; if (cmd == 0xff) // The entire line is empty newLine = true; else if (cmd == 0xFD) { // Lines contains only run lenghs of pixels - while (x < w) { - byte cmd = source->readByte(); + while (x2 < w) { + cmd = source->readByte(); if (cmd == 0xff) { // End of line reached newLine = true; @@ -146,14 +146,14 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) { byte v = source->readByte(); while (cmd-- > 0) { - if (x < w) + if (x2 < w) *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v; - ++x; + ++x2; } } } else { // Line intermixes run lengths with individual pixels - while (x < w) { + while (x2 < w) { cmd = source->readByte(); if (cmd == 0xff) { // End of line reached @@ -166,15 +166,15 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) { cmd = source->readByte(); byte v = source->readByte(); while (cmd-- > 0) { - if (x < w) { + if (x2 < w) { *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v; } - ++x; + ++x2; } } else { // Handle writing out single pixel *destP++ = (cmd == 0xFD) ? TRANSPARENT_COLOUR_INDEX : cmd; - ++x; + ++x2; } } } |