[Scummvm-cvs-logs] SF.net SVN: scummvm:[51537] scummvm/trunk/engines/sci/graphics

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sat Jul 31 15:13:46 CEST 2010


Revision: 51537
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51537&view=rev
Author:   m_kiewitz
Date:     2010-07-31 13:13:46 +0000 (Sat, 31 Jul 2010)

Log Message:
-----------
SCI: adjusting inside view::getCelRect for sci0early

fixes cels being placed wrongly, sci0early didnt have the z adjust.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/view.cpp
    scummvm/trunk/engines/sci/graphics/view.h

Modified: scummvm/trunk/engines/sci/graphics/view.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/view.cpp	2010-07-31 12:42:23 UTC (rev 51536)
+++ scummvm/trunk/engines/sci/graphics/view.cpp	2010-07-31 13:13:46 UTC (rev 51537)
@@ -85,6 +85,9 @@
 	_EGAmapping = NULL;
 	_isSci2Hires = false;
 
+	// we adjust inside getCelRect for SCI0EARLY (that version didn't have the +1 when calculating bottom)
+	adjustForSci0Early = getSciVersion() == SCI_VERSION_0_EARLY ? -1 : 0;
+
 	// If we find an SCI1/SCI1.1 view (not amiga), we switch to that type for
 	// EGA. This could get used to make view patches for EGA games, where the
 	// new views include more colors. Users could manually adjust old views to
@@ -322,7 +325,7 @@
 	const CelInfo *celInfo = getCelInfo(loopNo, celNo);
 	outRect.left = x + celInfo->displaceX - (celInfo->width >> 1);
 	outRect.right = outRect.left + celInfo->width;
-	outRect.bottom = y + celInfo->displaceY - z + 1;
+	outRect.bottom = y + celInfo->displaceY - z + 1 + adjustForSci0Early;
 	outRect.top = outRect.bottom - celInfo->height;
 }
 

Modified: scummvm/trunk/engines/sci/graphics/view.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/view.h	2010-07-31 12:42:23 UTC (rev 51536)
+++ scummvm/trunk/engines/sci/graphics/view.h	2010-07-31 13:13:46 UTC (rev 51537)
@@ -100,6 +100,9 @@
 	bool _isSci2Hires;
 
 	byte *_EGAmapping;
+
+	// this is set for sci0early to adjust for the getCelRect() change
+	int16 adjustForSci0Early;
 };
 
 } // End of namespace Sci


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