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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Oct 14 15:23:38 CEST 2009


Revision: 45077
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45077&view=rev
Author:   m_kiewitz
Date:     2009-10-14 13:23:37 +0000 (Wed, 14 Oct 2009)

Log Message:
-----------
SCI/newgui: SciGuiTransitions now supports pixelation effect (lsl5 intro)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_transitions.cpp
    scummvm/trunk/engines/sci/gui/gui_transitions.h

Modified: scummvm/trunk/engines/sci/gui/gui_transitions.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_transitions.cpp	2009-10-14 12:56:14 UTC (rev 45076)
+++ scummvm/trunk/engines/sci/gui/gui_transitions.cpp	2009-10-14 13:23:37 UTC (rev 45077)
@@ -58,6 +58,9 @@
 	if (_isVGA) {
 		// === VGA transitions
 		switch (_number) {
+		case SCI_TRANSITIONS_VGA_PIXELATION:
+			setNewPalette(); pixelation();
+			break;
 		case SCI_TRANSITIONS_VGA_FADEPALETTE:
 			fadeOut(); setNewScreen(); fadeIn();
 			break;
@@ -74,7 +77,7 @@
 			break;
 
 		default:
-			warning("SciGuiTransitions: VGA-%d not implemented", _number);
+			warning("SciGuiTransitions: EGA-%d not implemented", _number);
 			setNewPalette(); setNewScreen();
 		}
 	}
@@ -126,4 +129,24 @@
 	}
 }
 
+// pixelates the new picture over the old one
+void SciGuiTransitions::pixelation () {
+	uint16 mask = 0x40, stepNr = 0;
+	Common::Rect pixelRect;
+
+	do {
+		mask = (mask & 1) ? (mask >> 1) ^ 0xB400 : mask >> 1;
+		if (mask >= 320 * 200)
+			continue;
+		pixelRect.left = mask % 320; pixelRect.right = pixelRect.left + 1;
+		pixelRect.top = mask / 320;	pixelRect.bottom = pixelRect.top + 1;
+		_screen->copyRectToScreen(pixelRect);
+		if ((stepNr & 0x3FF) == 0) {
+			g_system->updateScreen();
+			g_system->delayMillis(5);
+		}
+		stepNr++;
+	} while (mask != 0x40);
+}
+
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gui/gui_transitions.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_transitions.h	2009-10-14 12:56:14 UTC (rev 45076)
+++ scummvm/trunk/engines/sci/gui/gui_transitions.h	2009-10-14 13:23:37 UTC (rev 45077)
@@ -35,6 +35,7 @@
 };
 
 enum {
+	SCI_TRANSITIONS_VGA_PIXELATION		= 9,
 	SCI_TRANSITIONS_VGA_FADEPALETTE		= 10
 };
 
@@ -53,6 +54,7 @@
 	void setNewScreen();
 	void fadeOut();
 	void fadeIn();
+	void pixelation();
 
 	SciGui *_gui;
 	SciGuiScreen *_screen;


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