[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.17,1.18

James Brown ender at users.sourceforge.net
Thu Oct 17 02:22:07 CEST 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv30153/scumm

Modified Files:
	actor.cpp 
Log Message:
Patch 624477: Fix for bug 609716



Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- actor.cpp	16 Oct 2002 02:42:43 -0000	1.17
+++ actor.cpp	17 Oct 2002 09:21:55 -0000	1.18
@@ -895,7 +895,33 @@
 
 		cr._outheight = _vm->virtscr->height;
 
-		cr._zbuf = _vm->getMaskFromBox(walkbox);
+		// If walkbox is 0, that could mean two things:
+		//
+		// Either the actor is or has been moved around with
+		// ignoreBoxes != 0. In this case, use the mask for the
+		// walkbox the actor is currently inside or, if it's not in
+		// any walkbox, don't mask at all.
+		//
+		// This fixes two graphics glitches in Loom. Bobbin's feet
+		// are not obscured after Rusty's ghost has shown him what's
+		// happened to The Forge, and Rusty himself isn't partially
+		// obscured after Bobbin heals him.
+		//
+		// Or it could mean that the actor really is in walkbox 0.
+
+		if (walkbox == 0) {
+			int i;
+
+			cr._zbuf = 0;
+
+			for (i = _vm->getNumBoxes() - 1; i >= 0; i--) {
+				if (_vm->checkXYInBoxBounds(i, x, y)) {
+					cr._zbuf = _vm->getMaskFromBox(i);
+					break;
+				}
+			}
+		} else
+			cr._zbuf = _vm->getMaskFromBox(walkbox);
 
 		if (forceClip)
 			cr._zbuf = forceClip;





More information about the Scummvm-git-logs mailing list