[Scummvm-cvs-logs] SF.net SVN: scummvm: [25499] scummvm/trunk/engines/agi/graphics.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Mon Feb 12 00:46:24 CET 2007


Revision: 25499
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25499&view=rev
Author:   eriktorbjorn
Date:     2007-02-11 15:46:23 -0800 (Sun, 11 Feb 2007)

Log Message:
-----------
Make the mouse cursor white (instead of green) with a black outline on
platforms that support cursor palettes. Changed the cursor design slightly.
It's not necessarily better than the old one, but it matches the arrow cursor
used in early SCI games, which seems appropriate.

Modified Paths:
--------------
    scummvm/trunk/engines/agi/graphics.cpp

Modified: scummvm/trunk/engines/agi/graphics.cpp
===================================================================
--- scummvm/trunk/engines/agi/graphics.cpp	2007-02-11 22:40:32 UTC (rev 25498)
+++ scummvm/trunk/engines/agi/graphics.cpp	2007-02-11 23:46:23 UTC (rev 25499)
@@ -25,6 +25,7 @@
 #include "common/stdafx.h"
 
 #include "graphics/cursorman.h"
+#include "graphics/paletteman.h"
 
 #include "agi/agi.h"
 #include "agi/graphics.h"
@@ -390,14 +391,15 @@
 }
 
 static const byte mouseCursorArrow[] = {
+	// This is the same arrow cursor that was later used in early SCI games
 	0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00,
 	0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00,
-	0x7F, 0x80, 0x7C, 0x00, 0x6C, 0x00, 0x46, 0x00,
-	0x06, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00,
-	0xC0, 0x00, 0xE0, 0x00, 0xF0, 0x00, 0xF8, 0x00,
-	0xFC, 0x00, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x80,
-	0xFF, 0xC0, 0xFF, 0xC0, 0xFE, 0x00, 0xFF, 0x00,
-	0xCF, 0x00, 0x07, 0x80, 0x07, 0x80, 0x03, 0x80
+	0x7F, 0x80, 0x7F, 0xC0, 0x7C, 0x00, 0x46, 0x00,
+	0x06, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x80,
+	0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00,
+	0x84, 0x00, 0x82, 0x00, 0x81, 0x00, 0x80, 0x80,
+	0x80, 0x40, 0x80, 0x20, 0x82, 0x00, 0xA9, 0x00,
+	0xC9, 0x00, 0x04, 0x80, 0x04, 0x80, 0x02, 0x40
 };
 
 /**
@@ -432,6 +434,14 @@
 		}
 		++src;
 	}
+
+	const byte cursorPalette[] = {
+		0, 0, 0, 0,
+		0, 0, 0, 0,
+		255, 255, 255, 0
+	};
+
+	PaletteMan.replaceCursorPalette(cursorPalette, 0, 3);
 	CursorMan.replaceCursor(mouseCursor, 16, 16, 1, 1);
 
 	return errOK;


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