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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Wed May 14 01:22:31 CEST 2008


Revision: 32095
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32095&view=rev
Author:   drmccoy
Date:     2008-05-13 16:22:31 -0700 (Tue, 13 May 2008)

Log Message:
-----------
Some fixes for vertical scrolling in Woodruff

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

Modified: scummvm/trunk/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw_v2.cpp	2008-05-13 22:59:19 UTC (rev 32094)
+++ scummvm/trunk/engines/gob/draw_v2.cpp	2008-05-13 23:22:31 UTC (rev 32095)
@@ -245,13 +245,20 @@
 	}
 
 	if (_renderFlags & RENDERFLAG_FROMSPLIT) {
-		destY = _vm->_video->_splitHeight1;
+		int16 start;
+
+		if (_vm->_video->_splitHeight1 < _vm->_height)
+			start = _vm->_video->_splitHeight1;
+		else
+			start = _vm->_video->_splitStart;
+
+		destY = start;
 		spriteBottom = READ_LE_UINT16(ptr + 6) - READ_LE_UINT16(ptr + 2);
 
 		if (_renderFlags & RENDERFLAG_DOUBLECOORDS)
 			spriteBottom *= 3;
 
-		spriteBottom += _vm->_video->_splitHeight1;
+		spriteBottom += start;
 
 		if (_renderFlags & RENDERFLAG_DOUBLECOORDS) {
 			spriteBottom += _backDeltaY;
@@ -650,16 +657,19 @@
 	if ((_destSpriteY >= _vm->_video->_splitHeight1) &&
 	    ((_destSurface == 20) || (_destSurface == 21))) {
 
-		_destSpriteY = (_destSpriteY - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
-		if ((operation == DRAW_DRAWLINE) ||
-		   ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS)))
-			_spriteBottom = (_spriteBottom - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
+		if (_vm->_video->_splitHeight1 < _vm->_height) {
+			_destSpriteY = (_destSpriteY - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
+			if ((operation == DRAW_DRAWLINE) ||
+				 ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS)))
+				_spriteBottom = (_spriteBottom - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
+		}
 
 	}
 
 	if ((_spriteTop >= _vm->_video->_splitHeight1) && (operation == DRAW_BLITSURF) &&
 	    ((_destSurface == 20) || (_destSurface == 21)))
-		_spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
+		if (_vm->_video->_splitHeight1 < _vm->_height)
+			_spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
 
 	adjustCoords(0, &_destSpriteX, &_destSpriteY);
 	if ((operation != DRAW_LOADSPRITE) && (_needAdjust != 2)) {

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2008-05-13 22:59:19 UTC (rev 32094)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2008-05-13 23:22:31 UTC (rev 32095)
@@ -1444,19 +1444,22 @@
 
 		int16 screenHeight = _vm->_video->_surfHeight;
 
-		_vm->_video->_surfHeight += offY;
+		if (screenHeight < _vm->_height) {
+			_vm->_video->_surfHeight += offY;
+			_vm->_video->_splitStart = screenHeight;
+		} else 
+			_vm->_video->_splitStart = screenHeight - offY;
 
-		_vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, screenHeight - offY);
-		_vm->_video->_splitHeight2 = offY;
-		_vm->_video->_splitStart = screenHeight;
+			_vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, screenHeight - offY);
+			_vm->_video->_splitHeight2 = offY;
 
-		if ((_vm->_video->_surfHeight + offY) < _vm->_height)
-			_vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2;
-		else
-			_vm->_video->_screenDeltaY = 0;
+			if ((_vm->_video->_surfHeight + offY) < _vm->_height)
+				_vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2;
+			else
+				_vm->_video->_screenDeltaY = 0;
 
-		_vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1;
-		_vm->_global->_mouseMinY = _vm->_video->_screenDeltaY;
+			_vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1;
+			_vm->_global->_mouseMinY = _vm->_video->_screenDeltaY;
 
 	} else {
 		_vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, _vm->_video->_surfHeight - offY);


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