[Scummvm-cvs-logs] SF.net SVN: scummvm: [29372] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Thu Nov 1 22:56:17 CET 2007


Revision: 29372
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29372&view=rev
Author:   peres001
Date:     2007-11-01 14:56:14 -0700 (Thu, 01 Nov 2007)

Log Message:
-----------
Added color-inversion effect in character selection screen. The effect doesn't exactly work like the original yet (Amiga only).

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/graphics.h
    scummvm/trunk/engines/parallaction/gui_ns.cpp

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2007-11-01 21:24:43 UTC (rev 29371)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2007-11-01 21:56:14 UTC (rev 29372)
@@ -334,6 +334,21 @@
 	return;
 }
 
+void Gfx::invertRect(Gfx::Buffers buffer, const Common::Rect& r) {
+
+	byte *d = (byte*)_buffers[buffer]->getBasePtr(r.left, r.top);
+
+	for (int i = 0; i < r.height(); i++) {
+		for (int j = 0; j < r.width(); j++) {
+			*d ^= 0x1F;
+			d++;
+		}
+
+		d += (_buffers[buffer]->pitch - r.width());
+	}
+
+}
+
 void Gfx::screenClip(Common::Rect& r, Common::Point& p) {
 
 	int32 x = r.left;

Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h	2007-11-01 21:24:43 UTC (rev 29371)
+++ scummvm/trunk/engines/parallaction/graphics.h	2007-11-01 21:56:14 UTC (rev 29372)
@@ -238,6 +238,7 @@
 	void copyRect(Gfx::Buffers dstbuffer, const Common::Rect& r, byte *src, uint16 pitch);
 	void grabRect(byte *dst, const Common::Rect& r, Gfx::Buffers srcbuffer, uint16 pitch);
 	void floodFill(Gfx::Buffers buffer, const Common::Rect& r, byte color);
+	void invertRect(Gfx::Buffers buffer, const Common::Rect& r);
 
 	// palette
 	void setPalette(Palette palette);

Modified: scummvm/trunk/engines/parallaction/gui_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gui_ns.cpp	2007-11-01 21:24:43 UTC (rev 29371)
+++ scummvm/trunk/engines/parallaction/gui_ns.cpp	2007-11-01 21:56:14 UTC (rev 29372)
@@ -350,8 +350,13 @@
 		}
 	}
 
-	if (selection != -1) {
+	if ((selection != -1) && (getPlatform() == Common::kPlatformAmiga)) {
+		_gfx->invertRect(Gfx::kBitFront, codeTrueBlocks[selection]);
+		_gfx->updateScreen();
 		beep();
+		g_system->delayMillis(100);
+		_gfx->invertRect(Gfx::kBitFront, codeTrueBlocks[selection]);
+		_gfx->updateScreen();
 	}
 
 	return selection;


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