diff options
author | lukaslw | 2014-05-31 22:37:51 +0200 |
---|---|---|
committer | lukaslw | 2014-06-22 20:08:28 +0200 |
commit | 421b27f2c7bc20ed90fbee36d3873145a5bb2f6a (patch) | |
tree | 9db3c7cf95b88f309858d4a532ec12c0b349279c | |
parent | 7874a4e7820378c8ca260f646e0ee8ee84bf6b9c (diff) | |
download | scummvm-rg350-421b27f2c7bc20ed90fbee36d3873145a5bb2f6a.tar.gz scummvm-rg350-421b27f2c7bc20ed90fbee36d3873145a5bb2f6a.tar.bz2 scummvm-rg350-421b27f2c7bc20ed90fbee36d3873145a5bb2f6a.zip |
PRINCE: drawMask() fix for wider locations, delete old spriteCheck
-rw-r--r-- | engines/prince/graphics.cpp | 10 | ||||
-rw-r--r-- | engines/prince/prince.cpp | 32 |
2 files changed, 5 insertions, 37 deletions
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp index 4f55b5a23e..46c52a86ca 100644 --- a/engines/prince/graphics.cpp +++ b/engines/prince/graphics.cpp @@ -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; diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index 5b8903b49c..1c5aaa1834 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -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) { |