Skip to content

Commit

Permalink
VOYEUR: Fix some shadowed variables in GraphicsManager
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Feb 21, 2014
1 parent 46b7c1f commit eee040c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions engines/voyeur/graphics.cpp
Expand Up @@ -469,16 +469,16 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
} else {
// loc_26543
for (int yp = 0; yp < height1; ++yp) {
int runLength = 0;
for (int xp = 0; xp < width2; ++xp, --runLength) {
if (runLength <= 0) {
int runLen = 0;
for (int xp = 0; xp < width2; ++xp, --runLen) {
if (runLen <= 0) {
// Start of run length, so get pixel and repeat length
pixel = *srcP++;
if (pixel & 0x80) {
pixel &= 0x7f;
runLength = *srcP++;
if (runLength == 0)
runLength = width2;
runLen = *srcP++;
if (runLen == 0)
runLen = width2;
}
}

Expand Down Expand Up @@ -552,7 +552,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des

if (!(srcFlags & PICFLAG_PIC_OFFSET)) {
srcP = srcImgData += srcOffset;
int pixel = 0;
pixel = 0;

if (destFlags & PICFLAG_PIC_OFFSET) {
destP = destImgData + screenOffset;
Expand All @@ -569,15 +569,15 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
height1 = tmpHeight + height1;

for (int yp = 0; yp < height1; ++yp) {
int runLength = 0;
for (int xp = 0; xp < width2; ++xp, --runLength) {
if (runLength <= 0) {
int runLen = 0;
for (int xp = 0; xp < width2; ++xp, --runLen) {
if (runLen <= 0) {
pixel = *srcP++;
if (pixel & 0x80) {
pixel &= 0x7F;
runLength = *srcP++;
if (!runLength)
runLength = width2;
runLen = *srcP++;
if (!runLen)
runLen = width2;
}
}

Expand All @@ -596,7 +596,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
destP = (byte *)_screenSurface.getPixels() + screenOffset;

for (int yp = 0; yp < height1; ++yp) {
for (int xp = 0; xp < width2; ++xp, ++destP) {
for (int xi = 0; xi < width2; ++xi, ++destP) {
byteVal2 = 0;
for (int xp = 0; xp < width2; ++xp, ++destP, --byteVal2) {
if (!byteVal2) {
Expand Down

0 comments on commit eee040c

Please sign in to comment.