[Scummvm-cvs-logs] SF.net SVN: scummvm: [24069] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Mon Oct 2 14:47:38 CEST 2006


Revision: 24069
          http://svn.sourceforge.net/scummvm/?rev=24069&view=rev
Author:   dreammaster
Date:     2006-10-02 05:47:29 -0700 (Mon, 02 Oct 2006)

Log Message:
-----------
Added methods for push/pop cursors

Modified Paths:
--------------
    scummvm/trunk/engines/lure/events.cpp
    scummvm/trunk/engines/lure/events.h

Modified: scummvm/trunk/engines/lure/events.cpp
===================================================================
--- scummvm/trunk/engines/lure/events.cpp	2006-10-02 11:31:11 UTC (rev 24068)
+++ scummvm/trunk/engines/lure/events.cpp	2006-10-02 12:47:29 UTC (rev 24069)
@@ -97,6 +97,28 @@
 	CursorMan.replaceCursor(cursorAddr, CURSOR_WIDTH, CURSOR_HEIGHT, hotspotX, hotspotY, 0);
 }
 
+void Mouse::pushCursorNum(uint8 cursorNum) {
+	int hotspotX = 7, hotspotY = 7;
+	if ((cursorNum == CURSOR_ARROW) || (cursorNum == CURSOR_MENUBAR)) {
+		hotspotX = 0; 
+		hotspotY = 0;
+	}
+
+	pushCursorNum(cursorNum, hotspotX, hotspotY);
+}
+
+void Mouse::pushCursorNum(uint8 cursorNum, int hotspotX, int hotspotY) {
+	Resources &res = Resources::getReference();
+
+	_cursorNum = cursorNum;
+	byte *cursorAddr = res.getCursor(cursorNum);
+	CursorMan.pushCursor(cursorAddr, CURSOR_WIDTH, CURSOR_HEIGHT, hotspotX, hotspotY, 0);
+}
+
+void Mouse::popCursor() {
+	CursorMan.popCursor();
+}
+
 void Mouse::setPosition(int newX, int newY) {
 	System::getReference().warpMouse(newX, newY);
 }

Modified: scummvm/trunk/engines/lure/events.h
===================================================================
--- scummvm/trunk/engines/lure/events.h	2006-10-02 11:31:11 UTC (rev 24068)
+++ scummvm/trunk/engines/lure/events.h	2006-10-02 12:47:29 UTC (rev 24069)
@@ -52,6 +52,9 @@
 	bool lButton() { return _lButton; }
 	bool rButton() { return _rButton; }
 	void waitForRelease();
+	void pushCursorNum(uint8 cursorNum);
+	void pushCursorNum(uint8 cursorNum, int hotspotX, int hotspotY);	
+	void popCursor();
 };
 
 class Events {


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