[Scummvm-cvs-logs] scummvm master -> 15ea73104c051a034c39e12d19c96af720ca64b6

hkzlab hkzlabnet at gmail.com
Sun Jan 8 00:40:52 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
15ea73104c SWORD2: Fix problem with the height of PSX sprites


Commit: 15ea73104c051a034c39e12d19c96af720ca64b6
    https://github.com/scummvm/scummvm/commit/15ea73104c051a034c39e12d19c96af720ca64b6
Author: Fabio Battaglia (hkzlabnet at gmail.com)
Date: 2012-01-07T15:34:15-08:00

Commit Message:
SWORD2: Fix problem with the height of PSX sprites

Apparently some uncompressed PSX sprites have a wrong
height value in the datafiles, creating subtle problems
like missing lines in some graphics. Fixed by artificially
adding 1 to odd height values of uncompressed sprites.

Changed paths:
    engines/sword2/sprite.cpp



diff --git a/engines/sword2/sprite.cpp b/engines/sword2/sprite.cpp
index 8d26094..73a4eca 100644
--- a/engines/sword2/sprite.cpp
+++ b/engines/sword2/sprite.cpp
@@ -500,6 +500,16 @@ int32 Screen::drawSprite(SpriteInfo *s) {
 				recomposePsxSprite(s);
 			}
 
+			// If the height is not an even value, fix it.
+			// Apparently it's a problem in the data of a few sprites
+			// of the PSX version. This should fix an evident problem
+			// in the foyer at the beginning of the game, where a line
+			// of pixels is missing near the stairs. But it should also
+			// fix a more subtle one in the glease gallery and in quaramonte
+			// police office.
+			if (s->h % 2)
+				s->h++;
+
 			freeSprite = true;
 			byte *tempBuf = (byte *)malloc(s->w * s->h * 2);
 			memset(tempBuf, 0, s->w * s->h * 2);






More information about the Scummvm-git-logs mailing list