[Scummvm-cvs-logs] SF.net SVN: scummvm: [26435] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Apr 9 16:00:24 CEST 2007


Revision: 26435
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26435&view=rev
Author:   drmccoy
Date:     2007-04-09 07:00:23 -0700 (Mon, 09 Apr 2007)

Log Message:
-----------
Some fixes for the Gob3 demos

Modified Paths:
--------------
    scummvm/trunk/engines/gob/driver_vga.cpp
    scummvm/trunk/engines/gob/inter_v1.cpp
    scummvm/trunk/engines/gob/inter_v2.cpp

Modified: scummvm/trunk/engines/gob/driver_vga.cpp
===================================================================
--- scummvm/trunk/engines/gob/driver_vga.cpp	2007-04-09 11:30:53 UTC (rev 26434)
+++ scummvm/trunk/engines/gob/driver_vga.cpp	2007-04-09 14:00:23 UTC (rev 26435)
@@ -105,8 +105,8 @@
 	    (y >= dest->getHeight()) || (y < 0))
 		return;
 
-	int16 width = (right - left) + 1;
-	int16 height = (bottom - top) + 1;
+	int16 width = MIN((right - left) + 1, (int) dest->getWidth());
+	int16 height = MIN((bottom - top) + 1, (int) dest->getHeight());
 
 	byte *srcPos = source->getVidMem() + (top * source->getWidth()) + left;
 	byte *destPos = dest->getVidMem() + (y * dest->getWidth()) + x;

Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp	2007-04-09 11:30:53 UTC (rev 26434)
+++ scummvm/trunk/engines/gob/inter_v1.cpp	2007-04-09 14:00:23 UTC (rev 26435)
@@ -1775,7 +1775,7 @@
 		_break = true;
 
 	_vm->_global->_inter_execPtr = 0;
-	return false;
+	return true;
 }
 
 bool Inter_v1::o1_renewTimeInVars(OpFuncParams &params) {

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2007-04-09 11:30:53 UTC (rev 26434)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2007-04-09 14:00:23 UTC (rev 26435)
@@ -1409,10 +1409,14 @@
 	int16 curX;
 	int16 curY;
 
-	startX = _vm->_parse->parseValExpr();
-	startY = _vm->_parse->parseValExpr();
-	endX = _vm->_parse->parseValExpr();
-	endY = _vm->_parse->parseValExpr();
+	startX = CLIP((int) _vm->_parse->parseValExpr(), 0,
+			_vm->_video->_surfWidth - 320);
+	startY = CLIP((int) _vm->_parse->parseValExpr(), 0,
+			_vm->_video->_surfHeight - 200);
+	endX = CLIP((int) _vm->_parse->parseValExpr(), 0,
+			_vm->_video->_surfWidth - 320);
+	endY = CLIP((int) _vm->_parse->parseValExpr(), 0,
+			_vm->_video->_surfHeight - 200);
 	stepX = _vm->_parse->parseValExpr();
 	stepY = _vm->_parse->parseValExpr();
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list