[Scummvm-cvs-logs] SF.net SVN: scummvm:[47385] scummvm/trunk/engines/sci/engine/kgraphics.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jan 19 18:45:14 CET 2010


Revision: 47385
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47385&view=rev
Author:   m_kiewitz
Date:     2010-01-19 17:45:14 +0000 (Tue, 19 Jan 2010)

Log Message:
-----------
SCI: Remove upper 4 bits when drawing lines on EGA games (fixes window colors in kq1 and others)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-19 17:34:24 UTC (rev 47384)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-19 17:45:14 UTC (rev 47385)
@@ -231,6 +231,10 @@
 		control = (argc > 7) ? argv[7].toSint16() : -1;
 		color = argv[5].toSint16();
 
+		// TODO: Find out why we get >15 for color in EGA
+		if (!s->resMan->isVGA())
+			color &= 0x0F;
+
 		s->_gui->graphDrawLine(Common::Point(x, y), Common::Point(x1, y1), color, priority, control);
 		break;
 
@@ -909,7 +913,7 @@
 	int16 celNo = argv[2].toSint16();
 	uint16 x = argv[3].toUint16();
 	uint16 y = argv[4].toUint16();
-	int16 priority = (argc > 5) ? argv[5].toSint16()  : -1;
+	int16 priority = (argc > 5) ? argv[5].toSint16() : -1;
 	uint16 paletteNo = (argc > 6) ? argv[6].toUint16() : 0;
 	bool hiresMode = (argc > 7) ? true : false;
 	reg_t upscaledHiresHandle = (argc > 7) ? argv[7] : NULL_REG;


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