[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.183,1.184

Gregory Montoir cyx at users.sourceforge.net
Mon Sep 27 14:51:51 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17076/scumm

Modified Files:
	akos.cpp 
Log Message:
Temporary fix for akos codec32 (this should re-use the existing code in Gdi). There are still some glitches, but catalog2 doesn't crash anymore when displaying the HE logo.

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- akos.cpp	26 Sep 2004 18:09:47 -0000	1.183
+++ akos.cpp	27 Sep 2004 21:46:25 -0000	1.184
@@ -1223,13 +1223,34 @@
 	src.bottom = _height - 1;
 
 	dst.top = _actorY + ymoveCur;
-	dst.right = dst.left + _width;
-	dst.bottom = dst.top + _height;
+	dst.right = dst.left + _width - 1;
+	dst.bottom = dst.top + _height - 1;
 
-	dst.clip(_clipOverride);
+	int diff;
+	diff = dst.left - _clipOverride.left;
+	if (diff < 0) {
+		src.left -= diff;
+		dst.left -= diff;
+	}
+	diff = dst.right - _clipOverride.right;
+	if (diff > 0) {
+		src.right -= diff;
+		dst.right -= diff;
+	}
+	diff = dst.top - _clipOverride.top;
+	if (diff < 0) {
+		src.top -= diff;
+		dst.top -= diff;
+	}
+	diff = dst.bottom - _clipOverride.bottom;
+	if (diff > 0) {
+		src.bottom -= diff;
+		dst.bottom -= diff;
+	}	
 
-	_vm->markRectAsDirty(kMainVirtScreen, dst, _actorID);
+	_vm->markRectAsDirty(kMainVirtScreen, dst);
 
+	// cyx: are these variables really useful ?
 	if (_draw_top > dst.top)
 		_draw_top = dst.top;
 	if (_draw_bottom < dst.bottom)





More information about the Scummvm-git-logs mailing list