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

dreammaster dreammaster at scummvm.org
Thu Dec 1 11:32:33 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:
cad52b2cd1 TSAGE: Implemented the new R2RW cursors


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

Commit Message:
TSAGE: Implemented the new R2RW cursors

Changed paths:
    engines/tsage/events.cpp
    engines/tsage/events.h
    engines/tsage/ringworld2/ringworld2_scenes0.cpp
    engines/tsage/ringworld2/ringworld2_scenes2.cpp



diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index 2c4efe5..7e2ab71 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -253,6 +253,23 @@ void EventsClass::setCursor(CursorType cursorType) {
 			break;
 		}
 		break;
+
+	// Ringworld 2 specific cursors
+	case EXITCURSOR_N:
+	case EXITCURSOR_S:
+	case EXITCURSOR_W:
+	case EXITCURSOR_E:
+	case EXITCURSOR_LEFT_HAND:
+	case CURSOR_INVALID:
+	case EXITCURSOR_NE:
+	case EXITCURSOR_SE:
+	case EXITCURSOR_SW:
+	case EXITCURSOR_NW:
+	case SHADECURSOR_UP:
+	case SHADECURSOR_DOWN:
+	case SHADECURSOR_HAND:
+		cursor = g_resourceManager->getSubResource(5, 1, cursorType - R2CURSORS_START, &size);
+		break;
 	}
 
 	// Decode the cursor
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index 37f8951..1942c98 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -93,8 +93,10 @@ enum CursorType {
 	R2_50 = 50, R2_51 = 51, R2_52 = 52,
 
 	// Ringworld 2 cursors
-	CURSOR_2  = 2,  CURSOR_3  = 3,  CURSOR_7  = 7,  CURSOR_8  = 8, CURSOR_9 = 9, CURSOR_10 = 10,
-	CURSOR_13 = 13, CURSOR_14 = 14, CURSOR_15 = 15, CURSOR_16 = 16,
+	R2CURSORS_START = 0x8000, EXITCURSOR_N  = 0x8007,  EXITCURSOR_S  = 0x8008, EXITCURSOR_W = 0x8009, 
+	EXITCURSOR_E = 0x800A, EXITCURSOR_LEFT_HAND = 0x800B, CURSOR_INVALID = 0x800C, 
+	EXITCURSOR_NE = 0x800D, EXITCURSOR_SE = 0x800E, EXITCURSOR_SW = 0x800F, EXITCURSOR_NW = 0x8010,
+	SHADECURSOR_UP = 0x8011, SHADECURSOR_DOWN = 0x8012, SHADECURSOR_HAND = 0x8013,
 
 	// Cursors
 	CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800,
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 53f47ce..f542dde 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -1268,9 +1268,9 @@ void Scene200::postInit(SceneObjectList *OwnerList) {
 	SceneExt::postInit();
 	loadScene(200);
 
-	_westExit.setDetails(Rect(94, 0, 123, 58), CURSOR_9, 175);
+	_westExit.setDetails(Rect(94, 0, 123, 58), EXITCURSOR_W, 175);
 	_westExit.setDest(Common::Point(125, 52));
-	_eastExit.setDetails(Rect(133, 0, 167, 58), CURSOR_10, 150);
+	_eastExit.setDetails(Rect(133, 0, 167, 58), EXITCURSOR_E, 150);
 	_eastExit.setDest(Common::Point(135, 52));
 
 	_northDoor.postInit();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index 089b615..ee3153c 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -189,7 +189,7 @@ void Scene2000::initExits() {
 		_exit5._enabled = true;
 		_exit5._bounds.set(61, 68, 90, 125);
 		_exit5.setDest(Common::Point(92, 129));
-		_exit5._cursorNum = CURSOR_9;
+		_exit5._cursorNum = EXITCURSOR_W;
 		break;
 	case 4:
 	case 12:
@@ -198,7 +198,7 @@ void Scene2000::initExits() {
 		_exit5._enabled = true;
 		_exit5._bounds.set(230, 68, 259, 125);
 		_exit5.setDest(Common::Point(244, 129));
-		_exit5._cursorNum = CURSOR_10;
+		_exit5._cursorNum = EXITCURSOR_E;
 		break;
 	default:
 		break;
@@ -224,7 +224,7 @@ void Scene2000::initExits() {
 		_exit3._enabled = true;
 		_exit3._bounds.set(71, 130, 154, 168);
 		_exit3.setDest(Common::Point(94, 129));
-		_exit3._cursorNum = CURSOR_14;
+		_exit3._cursorNum = EXITCURSOR_SE;
 		loadScene(2300);
 		if (!_exitingFlag)
 			_mazePlayerMode = 0;
@@ -302,7 +302,7 @@ void Scene2000::initExits() {
 		_exit4._enabled = true;
 		_exit4._bounds.set(138, 83, 211, 125);
 		_exit4.setDest(Common::Point(129, 188));
-		_exit4._cursorNum = CURSOR_16;
+		_exit4._cursorNum = EXITCURSOR_NW;
 		loadScene(2250);
 		R2_GLOBALS._walkRegions.load(2000);
 		if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2500)
@@ -317,7 +317,7 @@ void Scene2000::initExits() {
 		_exit3._enabled = true;
 		_exit3._bounds.set(78, 130, 148, 168);
 		_exit3.setDest(Common::Point(100, 129));
-		_exit3._cursorNum = CURSOR_14;
+		_exit3._cursorNum = EXITCURSOR_SE;
 		loadScene(2075);
 		R2_GLOBALS._walkRegions.load(2000);
 		if (!_exitingFlag)
@@ -328,7 +328,7 @@ void Scene2000::initExits() {
 		_exit3._enabled = true;
 		_exit3._bounds.set(160, 130, 248, 168);
 		_exit3.setDest(Common::Point(225, 129));
-		_exit3._cursorNum = CURSOR_15;
+		_exit3._cursorNum = EXITCURSOR_SW;
 		loadScene(2325);
 		R2_GLOBALS._walkRegions.load(2000);
 		if (!_exitingFlag)
@@ -340,7 +340,7 @@ void Scene2000::initExits() {
 		_exit4._enabled = true;
 		_exit4._bounds.set(122, 83, 207, 125);
 		_exit4.setDest(Common::Point(210, 129));
-		_exit4._cursorNum = CURSOR_16;
+		_exit4._cursorNum = EXITCURSOR_NW;
 		loadScene(2125);
 		R2_GLOBALS._walkRegions.load(2000);
 		if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2400)
@@ -354,7 +354,7 @@ void Scene2000::initExits() {
 		_exit4._enabled = true;
 		_exit4._bounds.set(108, 83, 128, 184);
 		_exit4.setDest(Common::Point(135, 129));
-		_exit4._cursorNum = CURSOR_13;
+		_exit4._cursorNum = CURSOR_INVALID;
 		loadScene(2275);
 		R2_GLOBALS._walkRegions.load(2000);
 		if (!_exitingFlag)
@@ -365,7 +365,7 @@ void Scene2000::initExits() {
 		_exit3._enabled = true;
 		_exit3._bounds.set(171, 130, 241, 168);
 		_exit3.setDest(Common::Point(218, 129));
-		_exit3._cursorNum = CURSOR_15;
+		_exit3._cursorNum = EXITCURSOR_SW;
 		loadScene(2050);
 		R2_GLOBALS._walkRegions.load(2000);
 		if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2350)
@@ -791,15 +791,15 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
 	}
 	_exitingFlag = false;
 
-	_exit1.setDetails(Rect(0, 100, 14, 140), CURSOR_9, 2000);
+	_exit1.setDetails(Rect(0, 100, 14, 140), EXITCURSOR_W, 2000);
 	_exit1.setDest(Common::Point(14, 129));
-	_exit2.setDetails(Rect(305, 100, 320, 140), CURSOR_10, 2000);
+	_exit2.setDetails(Rect(305, 100, 320, 140), EXITCURSOR_E, 2000);
 	_exit2.setDest(Common::Point(315, 129));
-	_exit3.setDetails(Rect(71, 130, 154, 168), CURSOR_8, 2000);
+	_exit3.setDetails(Rect(71, 130, 154, 168), EXITCURSOR_S, 2000);
 	_exit3.setDest(Common::Point(94, 129));
-	_exit4.setDetails(Rect(138, 83, 211, 125), CURSOR_7, 2000);
+	_exit4.setDetails(Rect(138, 83, 211, 125), EXITCURSOR_N, 2000);
 	_exit4.setDest(Common::Point(188, 128));
-	_exit5.setDetails(Rect(61, 68, 90, 125), CURSOR_9, 2000);
+	_exit5.setDetails(Rect(61, 68, 90, 125), EXITCURSOR_W, 2000);
 	_exit5.setDest(Common::Point(92, 129));
 
 	R2_GLOBALS._sound1.play(200);
@@ -1022,7 +1022,8 @@ void Scene2000::signal() {
 }
 
 void Scene2000::process(Event &event) {
-	if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_3)) {
+	if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN) && 
+			(R2_GLOBALS._events.getCursor() == CURSOR_CROSSHAIRS)) {
 		warning("TODO: Check sub_22D26");
 		
 		Common::Point pt(event.mousePos.x, 129);
@@ -1099,9 +1100,9 @@ void Scene2350::postInit(SceneObjectList *OwnerList) {
 	if (R2_GLOBALS._sceneManager._previousScene == -1)
 		R2_GLOBALS._player._characterScene[2] = 2350;
 
-	_exitUp.setDetails(Rect(25, 83, 93, 125), CURSOR_16, 2350);
+	_exitUp.setDetails(Rect(25, 83, 93, 125), EXITCURSOR_NW, 2350);
 	_exitUp.setDest(Common::Point(80, 129));
-	_exitWest.setDetails(Rect(0, 100, 14, 140), CURSOR_9, 2350);
+	_exitWest.setDetails(Rect(0, 100, 14, 140), EXITCURSOR_W, 2350);
 	_exitWest.setDest(Common::Point(14, 129));
 
 	R2_GLOBALS._player.postInit();
@@ -1200,7 +1201,7 @@ void Scene2350::signal() {
 		break;
 	case 2355:
 		_sceneMode = 20;
-		R2_GLOBALS._events.setCursor(CURSOR_2);
+		R2_GLOBALS._events.setCursor(CURSOR_ARROW);
 		_stripManager.start(711, this);
 		break;
 	default:
@@ -1210,7 +1211,8 @@ void Scene2350::signal() {
 }
 
 void Scene2350::process(Event &event) {
-	if ((R2_GLOBALS._player._canWalk) && (event.eventType != EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_3)){
+	if ((R2_GLOBALS._player._canWalk) && (event.eventType != EVENT_BUTTON_DOWN) && 
+			(R2_GLOBALS._events.getCursor() == CURSOR_CROSSHAIRS)){
 		Common::Point pt(event.mousePos.x, 129);
 		PlayerMover *mover = new PlayerMover();
 		BF_GLOBALS._player.addMover(mover, &pt);






More information about the Scummvm-git-logs mailing list