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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Fri Jun 18 19:40:15 CEST 2010


Revision: 50025
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50025&view=rev
Author:   m_kiewitz
Date:     2010-06-18 17:40:13 +0000 (Fri, 18 Jun 2010)

Log Message:
-----------
SCI: making vga views work in ega games :P

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

Modified: scummvm/trunk/engines/sci/graphics/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/palette.cpp	2010-06-18 17:34:34 UTC (rev 50024)
+++ scummvm/trunk/engines/sci/graphics/palette.cpp	2010-06-18 17:40:13 UTC (rev 50025)
@@ -203,6 +203,7 @@
 		_sysPalette.colors[curColor].g = (_sysPalette.colors[color1].g >> 1) + (_sysPalette.colors[color2].g >> 1);
 		_sysPalette.colors[curColor].b = (_sysPalette.colors[color1].b >> 1) + (_sysPalette.colors[color2].b >> 1);
 	}
+	_sysPalette.timestamp = 1;
 	setOnScreen();
 }
 

Modified: scummvm/trunk/engines/sci/graphics/view.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/view.cpp	2010-06-18 17:34:34 UTC (rev 50024)
+++ scummvm/trunk/engines/sci/graphics/view.cpp	2010-06-18 17:40:13 UTC (rev 50025)
@@ -75,12 +75,27 @@
 	byte seekEntry;
 	bool isEGA = false;
 	bool isCompressed = true;
+	ViewType curViewType = _resMan->getViewType();
 
 	_loopCount = 0;
 	_embeddedPal = false;
 	_EGAmapping = NULL;
 
-	switch (_resMan->getViewType()) {
+	// If we find a SCI1/SCI1.1 view (not amiga), we switch to that type for EGA
+	if (curViewType == kViewEga) {
+		if (_resourceData[1] == 0x80) {
+			switch (READ_LE_UINT16(_resourceData + 4)) {
+			case 0: // SCI1
+				curViewType = kViewVga;
+				break;
+			case 1: // SCI1.1
+				curViewType = kViewVga11;
+				break;
+			}
+		}
+	}
+
+	switch (curViewType) {
 	case kViewEga: // View-format SCI0 (and Amiga 16 colors)
 		isEGA = true;
 	case kViewAmiga: // View-format Amiga (32 colors)


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