[Scummvm-cvs-logs] SF.net SVN: scummvm:[50726] scummvm/branches/gsoc2010-testbed/engines/ testbed

sud03r at users.sourceforge.net sud03r at users.sourceforge.net
Tue Jul 6 18:30:42 CEST 2010


Revision: 50726
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50726&view=rev
Author:   sud03r
Date:     2010-07-06 16:30:42 +0000 (Tue, 06 Jul 2010)

Log Message:
-----------
some minor fixes in cursor handling

Modified Paths:
--------------
    scummvm/branches/gsoc2010-testbed/engines/testbed/events.cpp
    scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/events.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/events.cpp	2010-07-06 14:26:29 UTC (rev 50725)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/events.cpp	2010-07-06 16:30:42 UTC (rev 50726)
@@ -30,6 +30,7 @@
 #include "graphics/cursorman.h"
 
 #include "testbed/events.h"
+#include "testbed/graphics.h"
 
 namespace Testbed {
 
@@ -62,7 +63,8 @@
 		{Common::KEYCODE_w, 'w'},
 		{Common::KEYCODE_x, 'x'},
 		{Common::KEYCODE_y, 'y'},
-		{Common::KEYCODE_z, 'z'}
+		{Common::KEYCODE_z, 'z'},
+		{Common::KEYCODE_SPACE, ' '}
 	};
 
 char EventTests::keystrokeToChar() {
@@ -108,16 +110,18 @@
 	pt.y = 120; 
 	Testsuite::writeOnScreen("Testbed should be able to detect them, Press X to exit", pt);
 
+	// Init Mouse Palette
+	GFXtests::initMousePalette();
 
 	bool quitLoop = false;
 	bool passed = true;
 	// handle all mouse events
 	Common::Event event;
 	while (!quitLoop) {
-		//  show mouse
+		// Show mouse
 		CursorMan.showMouse(true);
 		g_system->updateScreen();
-		
+
 		while (eventMan->pollEvent(event)) {
 			// Quit if explicitly requested
 			if (Engine::shouldQuit()) {
@@ -153,7 +157,7 @@
 				break;
 			case Common::EVENT_WHEELUP:
 				Testsuite::clearScreen();
-				Testsuite::writeOnScreen("Mouse wheel moved down", pt);
+				Testsuite::writeOnScreen("Mouse wheel moved up", pt);
 				break;
 			case Common::EVENT_MBUTTONUP:
 				Testsuite::clearScreen();
@@ -191,7 +195,7 @@
 
 bool EventTests::kbdEvents() {
 	// Make user type some word and display the output on screen
-	Common::String text = "You Entered :";
+	Common::String text = "You Entered : ";
 	Common::Point pt(0, 100);
 	Testsuite::clearScreen();
 	Testsuite::writeOnScreen("Enter your word, press ESC when done, it will be echoed back", pt);

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp	2010-07-06 14:26:29 UTC (rev 50725)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp	2010-07-06 16:30:42 UTC (rev 50726)
@@ -61,7 +61,7 @@
 	
 	// Mouse Layer tests (Palettes and movements)
 	addTest("PalettizedCursors", &GFXtests::palettizedCursors);
-	// FIXME: need to fix it
+	// FIXME: Scaled cursor crsh with odd dimmensions
 	addTest("ScaledCursors", &GFXtests::scaledCursors);
 	
 	// Effects
@@ -471,8 +471,8 @@
 	}
 	
 	Testsuite::clearScreen();
-	// Done with cursors
-	CursorMan.popAllCursors();
+	// Done with cursors, make them invisible, any other test the could simply make it visible
+	CursorMan.showMouse(false);
 	return passed;
 }
 
@@ -609,9 +609,8 @@
 		return false;
 	}
 
-	// Done with cursors
-	CursorMan.popAllCursors();
-	
+	// Done with cursors, Make them invisible, any other test may enable and use it.
+	CursorMan.showMouse(false);
 	Testsuite::clearScreen();
 	return true;
 }


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