[Scummvm-cvs-logs] SF.net SVN: scummvm:[50503] scummvm/trunk/engines/sci/graphics/view.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Jun 29 22:13:57 CEST 2010
Revision: 50503
http://scummvm.svn.sourceforge.net/scummvm/?rev=50503&view=rev
Author: thebluegr
Date: 2010-06-29 20:13:57 +0000 (Tue, 29 Jun 2010)
Log Message:
-----------
Handle empty clip rectangles in GfxView::drawScaled(). Fixes an assert in the first room of the game
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/view.cpp
Modified: scummvm/trunk/engines/sci/graphics/view.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/view.cpp 2010-06-29 20:12:42 UTC (rev 50502)
+++ scummvm/trunk/engines/sci/graphics/view.cpp 2010-06-29 20:13:57 UTC (rev 50503)
@@ -660,9 +660,13 @@
scaledWidth = MIN(clipRect.width(), scaledWidth);
scaledHeight = MIN(clipRect.height(), scaledHeight);
- const uint16 offsetY = clipRect.top - rect.top;
- const uint16 offsetX = clipRect.left - rect.left;
+ const int16 offsetY = clipRect.top - rect.top;
+ const int16 offsetX = clipRect.left - rect.left;
+ // Happens in SQ6, first room
+ if (offsetX < 0 || offsetY < 0)
+ return;
+
assert(scaledHeight + offsetY <= ARRAYSIZE(scalingY));
assert(scaledWidth + offsetX <= ARRAYSIZE(scalingX));
for (int y = 0; y < scaledHeight; y++) {
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