[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.156,1.157

Max Horn fingolfin at users.sourceforge.net
Mon Aug 25 15:07:43 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv23579

Modified Files:
	actor.cpp 
Log Message:
fixing off-by-one buglet (harmless in 99% of cases since the 'invalid' _imgBufOffs entries always contain the value of the last valid one)

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- actor.cpp	25 Aug 2003 14:17:34 -0000	1.156
+++ actor.cpp	25 Aug 2003 20:05:02 -0000	1.157
@@ -991,8 +991,8 @@
 			bcr->_zbuf = 0;
 		else {
 			bcr->_zbuf = _vm->getMaskFromBox(walkbox);
-			if (bcr->_zbuf > _vm->gdi._numZBuffer)
-				bcr->_zbuf = _vm->gdi._numZBuffer;
+			if (bcr->_zbuf > _vm->gdi._numZBuffer-1)
+				bcr->_zbuf = _vm->gdi._numZBuffer-1;
 		}
 
 		bcr->_draw_top = top = 0xFF;
@@ -1001,8 +1001,8 @@
 		bcr->_zbuf = forceClip;
 		if (bcr->_zbuf == 100) {
 			bcr->_zbuf = _vm->getMaskFromBox(walkbox);
-			if (bcr->_zbuf > _vm->gdi._numZBuffer)
-				bcr->_zbuf = _vm->gdi._numZBuffer;
+			if (bcr->_zbuf > _vm->gdi._numZBuffer-1)
+				bcr->_zbuf = _vm->gdi._numZBuffer-1;
 		}
 
 		bcr->_draw_top = top = 0x7fffffff;





More information about the Scummvm-git-logs mailing list