[Scummvm-cvs-logs] SF.net SVN: scummvm: [23575] scummvm/trunk/base/main.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Jul 23 09:18:43 CEST 2006


Revision: 23575
Author:   eriktorbjorn
Date:     2006-07-23 00:18:37 -0700 (Sun, 23 Jul 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23575&view=rev

Log Message:
-----------
The GUI now uses the cursor palette for all themes. Therefore, it shouldn't be
necessary to set up a "dummy" palette for the cursor any more. If an engine
wants to display an error message without using the GUI, it can set up its own
palette.

With this change, ScummVM no longer sets a palette before _screen is created in
the SDL backend.

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2006-07-23 07:06:26 UTC (rev 23574)
+++ scummvm/trunk/base/main.cpp	2006-07-23 07:18:37 UTC (rev 23575)
@@ -84,35 +84,6 @@
 } // End of namespace Base
 
 
-static void setupDummyPalette(OSystem &system) {
-	// FIXME - mouse cursors are currently always set via 8 bit data.
-	// Thus for now we need to setup a dummy palette. On the long run, we might
-	// want to add a setMouseCursor_overlay() method to OSystem, which would serve
-	// two purposes:
-	// 1) allow for 16 bit mouse cursors in overlay mode
-	// 2) no need to backup & restore the mouse cursor before/after the overlay is shown
-	const byte dummy_palette[] = {
-		0, 0, 0, 0,
-		0, 0, 171, 0,
-		0, 171, 0, 0,
-		0, 171, 171, 0,
-		171, 0, 0, 0,
-		171, 0, 171, 0,
-		171, 87, 0, 0,
-		171, 171, 171, 0,
-		87, 87, 87, 0,
-		87, 87, 255, 0,
-		87, 255, 87, 0,
-		87, 255, 255, 0,
-		255, 87, 87, 0,
-		255, 87, 255, 0,
-		255, 255, 87, 0,
-		255, 255, 255, 0,
-	};
-
-	system.setPalette(dummy_palette, 0, 16);
-}
-
 static bool launcherDialog(OSystem &system) {
 
 	system.beginGFXTransaction();
@@ -126,9 +97,6 @@
 	// Clear the main screen
 	system.clearScreen();
 
-	// Setup a dummy palette, for the mouse cursor
-	setupDummyPalette(system);
-
 #if defined(_WIN32_WCE)
 	CELauncherDialog dlg;
 #elif defined(__DC__)
@@ -320,10 +288,6 @@
 	// Set initial window caption
 	system.setWindowCaption(gScummVMFullVersion);
 
-	// Setup a dummy palette, for the mouse cursor, in case an error
-	// dialog has to be shown. See bug #1097467.
-	setupDummyPalette(system);
-
 	// Unless a game was specified, show the launcher dialog
 	if (0 == ConfMan.getActiveDomain()) {
 		launcherDialog(system);


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