[Scummvm-cvs-logs] SF.net SVN: scummvm:[35522] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Wed Dec 24 10:53:00 CET 2008


Revision: 35522
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35522&view=rev
Author:   peres001
Date:     2008-12-24 09:53:00 +0000 (Wed, 24 Dec 2008)

Log Message:
-----------
Fixed display of location background when changing from a scrollable to a non-scrollable one.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/parallaction.cpp

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2008-12-24 09:51:07 UTC (rev 35521)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2008-12-24 09:53:00 UTC (rev 35522)
@@ -817,7 +817,7 @@
 	}
 
 	_minScroll = 0;
-	_maxScroll = _backgroundInfo->width - _vm->_screenWidth;
+	_maxScroll = MAX(0, _backgroundInfo->width - _vm->_screenWidth);
 }
 
 } // namespace Parallaction

Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp	2008-12-24 09:51:07 UTC (rev 35521)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp	2008-12-24 09:53:00 UTC (rev 35522)
@@ -145,8 +145,9 @@
 
 	#define SCROLL_BAND_WIDTH		120
 
+	int scrollX = 0;
 	if (canScroll()) {
-		int scrollX = _gfx->getScrollPos();
+		scrollX = _gfx->getScrollPos();
 
 		Common::Point foot;
 		_char.getFoot(foot);
@@ -163,9 +164,8 @@
 		if (foot.x > max) {
 			scrollX += (foot.x - max);
 		}
-
-		_gfx->setScrollPos(scrollX);
 	}
+	_gfx->setScrollPos(scrollX);
 
 	_gfx->animatePalette();
 	_gfx->updateScreen();


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