[Scummvm-cvs-logs] scummvm master -> 914535a460aa3b3f23bf3ce807619ba388e14135

dreammaster dreammaster at scummvm.org
Mon Sep 16 06:08:43 CEST 2013


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:
914535a460 TSAGE: Bugfixes for R2R forest entrance


Commit: 914535a460aa3b3f23bf3ce807619ba388e14135
    https://github.com/scummvm/scummvm/commit/914535a460aa3b3f23bf3ce807619ba388e14135
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-09-15T21:07:51-07:00

Commit Message:
TSAGE: Bugfixes for R2R forest entrance

Changed paths:
    engines/tsage/ringworld2/ringworld2_scenes2.cpp
    engines/tsage/ringworld2/ringworld2_scenes3.cpp
    engines/tsage/ringworld2/ringworld2_scenes3.h



diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index fb4dde6..3eac2bf 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -999,7 +999,7 @@ void Scene2000::signal() {
 		default:
 			if (R2_GLOBALS._v56AAB != 0)
 				R2_GLOBALS._v56AAB = 0;
-			R2_GLOBALS._player.enableControl(CURSOR_ARROW);
+			R2_GLOBALS._player.enableControl(CURSOR_WALK);
 			break;
 		}
 		break;
@@ -2205,7 +2205,7 @@ void Scene2450::signal() {
 		R2_GLOBALS._player._characterScene[R2_SEEKER] = 2000;
 		R2_GLOBALS._spillLocation[R2_SEEKER] = 3;
 		_companion.remove();
-		R2_GLOBALS._player.enableControl(CURSOR_ARROW);
+		R2_GLOBALS._player.enableControl(CURSOR_WALK);
 		break;
 	default:
 		_companion.postInit();
@@ -3492,7 +3492,7 @@ void Scene2700::signal() {
 		break;
 	case 2700:
 		_actor1.remove();
-		R2_GLOBALS._player.enableControl(CURSOR_ARROW);
+		R2_GLOBALS._player.enableControl(CURSOR_WALK);
 		break;
 	case 2703:
 		g_globals->_sceneManager.changeScene(3900);
@@ -3525,7 +3525,7 @@ void Scene2700::signal() {
 		setAction(&_sequenceManager, this, 2713, &R2_GLOBALS._player, &_actor1, NULL);
 		break;
 	default:
-		R2_GLOBALS._player.enableControl(CURSOR_ARROW);
+		R2_GLOBALS._player.enableControl(CURSOR_WALK);
 		break;
 	}
 }
@@ -4506,7 +4506,7 @@ void Scene2800::signal() {
 	case 11:
 		_actor2.remove();
 		_object1.setAction(NULL);
-		R2_GLOBALS._player.enableControl(CURSOR_ARROW);
+		R2_GLOBALS._player.enableControl(CURSOR_WALK);
 		R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
 		_item2.setDetails(Rect(76, 45, 155, 90), 2800, 3, -1, -1, 2, NULL);
 		break;
@@ -4519,7 +4519,7 @@ void Scene2800::signal() {
 		g_globals->_sceneManager.changeScene(2750);
 		break;
 	case 2801:
-		R2_GLOBALS._player.enableControl(CURSOR_ARROW);
+		R2_GLOBALS._player.enableControl(CURSOR_WALK);
 		R2_GLOBALS._player._canWalk = false;
 		break;
 	case 2803:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 604c649..b40263b 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -5347,7 +5347,8 @@ void Scene3800::process(Event &event) {
  * Scene 3900 -
  *
  *--------------------------------------------------------------------------*/
-void Scene3900::Exit1::changeScene() {
+
+void Scene3900::NorthExit::changeScene() {
 	Scene3900 *scene = (Scene3900 *)R2_GLOBALS._sceneManager._scene;
 
 	_enabled = false;
@@ -5362,7 +5363,7 @@ void Scene3900::Exit1::changeScene() {
 	R2_GLOBALS._player.addMover(mover, &pt, scene);
 }
 
-void Scene3900::Exit2::changeScene() {
+void Scene3900::EastExit::changeScene() {
 	Scene3900 *scene = (Scene3900 *)R2_GLOBALS._sceneManager._scene;
 
 	_enabled = false;
@@ -5377,7 +5378,7 @@ void Scene3900::Exit2::changeScene() {
 	R2_GLOBALS._player.addMover(mover, &pt, scene);
 }
 
-void Scene3900::Exit3::changeScene() {
+void Scene3900::SouthExit::changeScene() {
 	Scene3900 *scene = (Scene3900 *)R2_GLOBALS._sceneManager._scene;
 
 	_enabled = false;
@@ -5392,7 +5393,7 @@ void Scene3900::Exit3::changeScene() {
 	R2_GLOBALS._player.addMover(mover, &pt, scene);
 }
 
-void Scene3900::Exit4::changeScene() {
+void Scene3900::WestExit::changeScene() {
 	Scene3900 *scene = (Scene3900 *)R2_GLOBALS._sceneManager._scene;
 
 	_enabled = false;
@@ -5428,13 +5429,16 @@ void Scene3900::Exit5::changeScene() {
 }
 
 void Scene3900::postInit(SceneObjectList *OwnerList) {
-	if ((R2_GLOBALS._desertPreviousDirection == 2) && (R2_GLOBALS._sceneManager._previousScene != 2700))
+	if ((R2_GLOBALS._desertPreviousDirection == 2) 
+			&& (R2_GLOBALS._sceneManager._previousScene != 2700))
 		loadScene(3825);
 	else
 		loadScene(3820);
 	SceneExt::postInit();
+
 	R2_GLOBALS._sound1.changeSound(231);
 	setZoomPercents(87, 40, 144, 100);
+
 	R2_GLOBALS._player.disableControl();
 	R2_GLOBALS._player.postInit();
 	R2_GLOBALS._player.setVisage(10);
@@ -5442,6 +5446,7 @@ void Scene3900::postInit(SceneObjectList *OwnerList) {
 	R2_GLOBALS._player.setStrip(3);
 	R2_GLOBALS._player.changeZoom(-1);
 	R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
+
 	_actor1.postInit();
 	_actor1.fixPriority(10);
 	_actor1.changeZoom(-1);
@@ -5449,36 +5454,36 @@ void Scene3900::postInit(SceneObjectList *OwnerList) {
 	_actor1._effect = 5;
 	_actor1._field9C = _field312;
 	R2_GLOBALS._player._linkedActor = &_actor1;
+
 	if ((R2_GLOBALS._desertPreviousDirection == 2) && (R2_GLOBALS._sceneManager._previousScene != 2700)) {
 //		loadScene(3825);
-		R2_GLOBALS._desertPreviousDirection = 4;
-		_exit1.setDetails(Rect(29, 87, 305, 125), SHADECURSOR_UP, 3900);
-		_exit3.setDetails(Rect(29, 160, 305, 168), SHADECURSOR_DOWN, 3900);
+		R2_GLOBALS._desertCorrectDirection = 4;
+		_northExit.setDetails(Rect(29, 87, 305, 125), SHADECURSOR_UP, 3900);
+		_southExit.setDetails(Rect(29, 160, 305, 168), SHADECURSOR_DOWN, 3900);
 
-		_exit2.setDetails(Rect(305, 87, 320, 168), EXITCURSOR_E, 3900);
-		_exit2.setDest(Common::Point(312, 145));
-		_exit2._enabled = true;
-		_exit2._insideArea = false;
-		_exit2._moving = false;
+		_eastExit.setDetails(Rect(305, 87, 320, 168), EXITCURSOR_E, 3900);
+		_eastExit.setDest(Common::Point(312, 145));
+		_eastExit._enabled = true;
+		_eastExit._insideArea = false;
+		_eastExit._moving = false;
 
-		_exit4._enabled = false;
+		_westExit._enabled = false;
 
 		_exit5.setDetails(Rect(0, 87, 29, 168), EXITCURSOR_W, 3900);
 		_exit5.setDest(Common::Point(24, 135));
 	} else {
 //		loadScene(3820);
-		R2_GLOBALS._desertPreviousDirection = 2;
-		_exit1.setDetails(Rect(14, 87, 290, 125), SHADECURSOR_UP, 3900);
-		_exit3.setDetails(Rect(14, 160, 290, 168), SHADECURSOR_DOWN, 3900);
+		R2_GLOBALS._desertCorrectDirection = 2;
+		_northExit.setDetails(Rect(14, 87, 290, 125), SHADECURSOR_UP, 3900);
+		_southExit.setDetails(Rect(14, 160, 290, 168), SHADECURSOR_DOWN, 3900);
 
+		_eastExit._enabled = false;
 
-		_exit2._enabled = false;
-
-		_exit4.setDetails(Rect(0, 87, 14, 168), EXITCURSOR_W, 3900);
-		_exit4.setDest(Common::Point(7, 145));
-		_exit4._enabled = true;
-		_exit4._insideArea = false;
-		_exit4._moving = false;
+		_westExit.setDetails(Rect(0, 87, 14, 168), EXITCURSOR_W, 3900);
+		_westExit.setDest(Common::Point(7, 145));
+		_westExit._enabled = true;
+		_westExit._insideArea = false;
+		_westExit._moving = false;
 
 		_exit5.setDetails(Rect(290, 87, 320, 168), EXITCURSOR_E, 3900);
 		_exit5.setDest(Common::Point(295, 135));
@@ -5489,15 +5494,15 @@ void Scene3900::postInit(SceneObjectList *OwnerList) {
 
 	scalePalette(65, 65, 65);
 
-	_exit1.setDest(Common::Point(160, 126));
-	_exit1._enabled = true;
-	_exit1._insideArea = false;
-	_exit1._moving = false;
+	_northExit.setDest(Common::Point(160, 126));
+	_northExit._enabled = true;
+	_northExit._insideArea = false;
+	_northExit._moving = false;
 
-	_exit3.setDest(Common::Point(160, 165));
-	_exit3._enabled = true;
-	_exit3._insideArea = false;
-	_exit3._moving = false;
+	_southExit.setDest(Common::Point(160, 165));
+	_southExit._enabled = true;
+	_southExit._insideArea = false;
+	_southExit._moving = false;
 
 	R2_GLOBALS._uiElements.draw();
 
@@ -5505,29 +5510,33 @@ void Scene3900::postInit(SceneObjectList *OwnerList) {
 	_item1.setDetails(Rect(0, 0, 320, 200), 3800, 0, 1, 2, 1, (SceneItem *)NULL);
 	if (R2_GLOBALS._sceneManager._previousScene == 3800) {
 		_sceneMode = 11;
-		switch (R2_GLOBALS._desertPreviousDirection - 1) {
-		case 0: {
+		switch (R2_GLOBALS._desertPreviousDirection) {
+		case 1: {
+			// Entering from the north
 			R2_GLOBALS._player.setPosition(Common::Point(160, 115));
 			Common::Point pt(160, 120);
 			NpcMover *mover = new NpcMover();
 			R2_GLOBALS._player.addMover(mover, &pt, this);
 			}
 			break;
-		case 1: {
+		case 2: {
+			// Entering from the east
 			R2_GLOBALS._player.setPosition(Common::Point(330, 145));
 			Common::Point pt(300, 145);
 			NpcMover *mover = new NpcMover();
 			R2_GLOBALS._player.addMover(mover, &pt, this);
 			}
 			break;
-		case 2: {
+		case 3: {
+			// Entering from the south
 			R2_GLOBALS._player.setPosition(Common::Point(160, 220));
 			Common::Point pt(160, 160);
 			NpcMover *mover = new NpcMover();
 			R2_GLOBALS._player.addMover(mover, &pt, this);
 			}
 			break;
-		case 3: {
+		case 4: {
+			// Entering from the west
 			R2_GLOBALS._player.setPosition(Common::Point(-10, 145));
 			Common::Point pt(19, 145);
 			NpcMover *mover = new NpcMover();
@@ -5564,18 +5573,18 @@ void Scene3900::signal() {
 		R2_GLOBALS._sceneManager.changeScene(3800);
 		break;
 	case 3805:
-		_exit1._enabled = false;
-		_exit2._enabled = false;
-		_exit3._enabled = false;
-		_exit4._enabled = false;
+		_northExit._enabled = false;
+		_eastExit._enabled = false;
+		_southExit._enabled = false;
+		_westExit._enabled = false;
 		R2_GLOBALS._player._canWalk = false;
 		R2_GLOBALS._events.setCursor(CURSOR_USE);
 		break;
 	case 3806:
-		_exit1._enabled = true;
-		_exit2._enabled = true;
-		_exit3._enabled = true;
-		_exit4._enabled = true;
+		_northExit._enabled = true;
+		_eastExit._enabled = true;
+		_southExit._enabled = true;
+		_westExit._enabled = true;
 		R2_GLOBALS._player.enableControl(CURSOR_ARROW);
 		break;
 	default:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h
index ac81889..14600ff 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.h
@@ -823,22 +823,22 @@ public:
 };
 
 class Scene3900 : public SceneExt {
-	class Exit1 : public SceneExit {
+	class NorthExit : public SceneExit {
 	public:
 		virtual void changeScene();
 	};
 
-	class Exit2 : public SceneExit {
+	class EastExit : public SceneExit {
 	public:
 		virtual void changeScene();
 	};
 
-	class Exit3 : public SceneExit {
+	class SouthExit : public SceneExit {
 	public:
 		virtual void changeScene();
 	};
 
-	class Exit4 : public SceneExit {
+	class WestExit : public SceneExit {
 	public:
 		virtual void changeScene();
 	};
@@ -850,10 +850,10 @@ class Scene3900 : public SceneExt {
 public:
 	SceneActor _actor1;
 	NamedHotspot _item1;
-	Exit1 _exit1;
-	Exit2 _exit2;
-	Exit3 _exit3;
-	Exit4 _exit4;
+	NorthExit _northExit;
+	EastExit _eastExit;
+	SouthExit _southExit;
+	WestExit _westExit;
 	Exit5 _exit5;
 	Rect _rect1;
 






More information about the Scummvm-git-logs mailing list