Skip to content

Commit

Permalink
PRINCE: drawMask() fix for wider locations, delete old spriteCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslw committed Jun 22, 2014
1 parent 7874a4e commit 421b27f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 deletions.
10 changes: 5 additions & 5 deletions engines/prince/graphics.cpp
Expand Up @@ -102,13 +102,13 @@ void GraphicsMan::drawMask(int32 posX, int32 posY, int32 width, int32 height, by
byte orgPixel = *((byte*)originalRoomSurface->getBasePtr(x + posX, y + posY));
*((byte*)_frontScreen->getBasePtr(x + posX, y + posY)) = orgPixel;
}
maskCounter >>= 1;
if (maskCounter == 0) {
maskCounter = 128;
tempMaskPostion++;
}
}
}
maskCounter >>= 1;
if (maskCounter == 0) {
maskCounter = 128;
tempMaskPostion++;
}
}
maskPostion += maskWidth;
maskCounter = 128;
Expand Down
32 changes: 0 additions & 32 deletions engines/prince/prince.cpp
Expand Up @@ -746,38 +746,6 @@ bool PrinceEngine::spriteCheck(int sprWidth, int sprHeight, int destX, int destY

return true;
}
/*
bool PrinceEngine::spriteCheck(Graphics::Surface *backAnimSurface, int destX, int destY) {
int sprWidth = backAnimSurface->w;
int sprHeight = backAnimSurface->h;
destX -= _picWindowX;
destY -= _picWindowY;
// if x1 is on visible part of screen
if (destX < 0) {
if (destX + sprWidth < 1) {
//x2 is negative - out of window
return false;
}
}
// if x1 is outside of screen on right side
if (destX >= kNormalWidth) {
return false;
}
if (destY < 0) {
if (destY + sprHeight < 1) {
//y2 is negative - out of window
return false;
}
}
if (destY >= kNormalHeight) {
return false;
}
return true;
}
*/

// CheckNak
void PrinceEngine::checkMasks(int x1, int y1, int sprWidth, int sprHeight, int z) {
Expand Down

0 comments on commit 421b27f

Please sign in to comment.