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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Fri Feb 5 05:16:16 CET 2010


Revision: 47895
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47895&view=rev
Author:   mthreepwood
Date:     2010-02-05 04:16:12 +0000 (Fri, 05 Feb 2010)

Log Message:
-----------
SCI2 Windows games are scaled from 320x200 to 640x480, not 640x400. Aspect ratio correction will eventually have to be applied. This fixes a possible segfault when playing the credits video in GK1 (which is 640x480).

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

Modified: scummvm/trunk/engines/sci/graphics/screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/screen.cpp	2010-02-05 03:29:04 UTC (rev 47894)
+++ scummvm/trunk/engines/sci/graphics/screen.cpp	2010-02-05 04:16:12 UTC (rev 47895)
@@ -37,15 +37,22 @@
 	_resMan(resMan), _width(width), _height(height), _upscaledHires(upscaledHires) {
 
 	_pixels = _width * _height;
-
 	_displayWidth = _width;
 	_displayHeight = _height;
+
 	if (_upscaledHires) {
 		_displayWidth *= 2;
 		_displayHeight *= 2;
+
+#ifdef ENABLE_SCI32
+		// SCI32 also corrects the aspect ratio when upscaling the resolution.
+		// This is especially needed in GK1, as the credits video is 640x480.
+		if (getSciVersion() >= SCI_VERSION_2)
+			_displayHeight = _displayHeight * 6 / 5;
+#endif
 	}
+
 	_displayPixels = _displayWidth * _displayHeight;
-
 	_visualScreen = (byte *)calloc(_pixels, 1);
 	_priorityScreen = (byte *)calloc(_pixels, 1);
 	_controlScreen = (byte *)calloc(_pixels, 1);


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