From f533de72e48fa909240ecf3c0fffa5bfd895753b Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Sat, 20 Dec 2003 15:26:44 +0000 Subject: sprites should now be rendered correctly. svn-id: r11784 --- sword1/screen.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sword1/screen.cpp b/sword1/screen.cpp index 7d7f08a6eb..2386c760db 100644 --- a/sword1/screen.cpp +++ b/sword1/screen.cpp @@ -390,13 +390,9 @@ void SwordScreen::processImage(uint32 id) { void SwordScreen::verticalMask(uint16 x, uint16 y, uint16 bWidth, uint16 bHeight) { if (_roomDefTable[_currentScreen].totalLayers <= 1) return; - bWidth = (bWidth + (SCRNGRID_X - 1)) / SCRNGRID_X; - bHeight = (bHeight + (SCRNGRID_Y - 1)) / SCRNGRID_Y; - - if (x & (SCRNGRID_X - 1)) - bWidth++; - if (y & (SCRNGRID_Y - 1)) - bHeight++; + + bWidth = (bWidth + (x & (SCRNGRID_X - 1)) + (SCRNGRID_X - 1)) / SCRNGRID_X; + bHeight = (bHeight + (y & (SCRNGRID_Y - 1)) + (SCRNGRID_Y - 1)) / SCRNGRID_Y; x /= SCRNGRID_X; y /= SCRNGRID_Y; -- cgit v1.2.3