[Scummvm-cvs-logs] SF.net SVN: scummvm:[50197] scummvm/trunk/engines/m4/sprite.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Thu Jun 24 03:29:47 CEST 2010
Revision: 50197
http://scummvm.svn.sourceforge.net/scummvm/?rev=50197&view=rev
Author: mthreepwood
Date: 2010-06-24 01:29:46 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
Silence gcc warnings.
Modified Paths:
--------------
scummvm/trunk/engines/m4/sprite.cpp
Modified: scummvm/trunk/engines/m4/sprite.cpp
===================================================================
--- scummvm/trunk/engines/m4/sprite.cpp 2010-06-23 23:30:15 UTC (rev 50196)
+++ scummvm/trunk/engines/m4/sprite.cpp 2010-06-24 01:29:46 UTC (rev 50197)
@@ -125,19 +125,19 @@
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 @@
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 @@
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;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list