[Scummvm-cvs-logs] scummvm master -> b5e53281846e455ebd3f4a7bf40d1fffc6afeafe

dreammaster dreammaster at scummvm.org
Thu Dec 22 11:12:46 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b5e5328184 TSAGE: Implement R2R 2 parameter versions of Player disableControl and enableControl


Commit: b5e53281846e455ebd3f4a7bf40d1fffc6afeafe
    https://github.com/scummvm/scummvm/commit/b5e53281846e455ebd3f4a7bf40d1fffc6afeafe
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-22T02:12:08-08:00

Commit Message:
TSAGE: Implement R2R 2 parameter versions of Player disableControl and enableControl

Changed paths:
    engines/tsage/core.cpp
    engines/tsage/core.h



diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index c243624..6c015ab 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -3073,9 +3073,22 @@ void Player::enableControl() {
 	}
 }
 
-void Player::enableControl(CursorType cursor) {
+void Player::disableControl(CursorType cursorId, CursorType objectId) {
+	if (cursorId != -1)
+		R2_GLOBALS._events.setCursor(cursorId);
+	else if (objectId != CURSOR_NONE)
+		R2_GLOBALS._events.setCursor(objectId);
+
+	disableControl();
+}
+
+void Player::enableControl(CursorType cursorId, CursorType objectId) {
 	enableControl();
-	R2_GLOBALS._events.setCursor(cursor);
+
+	if (cursorId != -1)
+		R2_GLOBALS._events.setCursor(cursorId);
+	else if (objectId != CURSOR_NONE)
+		R2_GLOBALS._events.setCursor(objectId);
 }
 
 void Player::process(Event &event) {
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 060ffee..e887be0 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -646,7 +646,8 @@ public:
 
 	void disableControl();
 	void enableControl();
-	void enableControl(CursorType cursor);
+	void disableControl(CursorType cursorId, CursorType objectId);
+	void enableControl(CursorType cursorId, CursorType objectId = CURSOR_NONE);
 };
 
 /*--------------------------------------------------------------------------*/






More information about the Scummvm-git-logs mailing list