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

Strangerke Strangerke at scummvm.org
Sat Dec 10 10:24:02 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:
c68d6ed585 TSAGE: R2R - Implement scene 2440


Commit: c68d6ed585799300d4103acf275cb2e2ecf8e73c
    https://github.com/scummvm/scummvm/commit/c68d6ed585799300d4103acf275cb2e2ecf8e73c
Author: Strangerke (strangerke at scummvm.org)
Date: 2011-12-10T01:23:15-08:00

Commit Message:
TSAGE: R2R - Implement scene 2440

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



diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 86e8178..9b7272e 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -113,6 +113,8 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
 		// Maze: Throne room
 		return new Scene2435();
 	case 2440:
+		// Maze: Another bedroom
+		return new Scene2440();
 	case 2445:
 	case 2450:
 	case 2455:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index a8decd3..0e824f6 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -1795,5 +1795,118 @@ void Scene2435::signal() {
 	}
 }
 
+/*--------------------------------------------------------------------------
+ * Scene 2440 - Maze: Another bedroom
+ *
+ *--------------------------------------------------------------------------*/
+
+bool Scene2440::Actor1::startAction(CursorType action, Event &event) {
+	return SceneActor::startAction(action, event);
+}
+
+bool Scene2440::Actor2::startAction(CursorType action, Event &event) {
+	Scene2440 *scene = (Scene2440 *)R2_GLOBALS._sceneManager._scene;
+
+	if ((action == CURSOR_USE) && (R2_GLOBALS._player._characterIndex == 2)){
+		R2_GLOBALS._player.disableControl();
+		scene->_sceneMode = 2440;
+		scene->setAction(&scene->_sequenceManager, scene, 2440, &R2_GLOBALS._player, &scene->_actor2, NULL);
+		return true;
+	} 
+
+	return SceneActor::startAction(action, event);
+}
+
+void Scene2440::Exit1::changeScene() {
+	Scene2440 *scene = (Scene2440 *)R2_GLOBALS._sceneManager._scene;
+
+	_enabled = false;
+	R2_GLOBALS._player.disableControl();
+	scene->_sceneMode = 11;
+	Common::Point pt(210, 200);
+	NpcMover *mover = new NpcMover();
+	R2_GLOBALS._player.addMover(mover, &pt, scene);
+}
+
+void Scene2440::postInit(SceneObjectList *OwnerList) {
+	loadScene(2440);
+	SceneExt::postInit();
+	R2_GLOBALS._sound1.play(200);
+	// Fix exit cursor, the original was using NW
+	_exit1.setDetails(Rect(172, 155, 250, 167), EXITCURSOR_SE, 2000);
+	_exit1.setDest(Common::Point(210, 160));
+	if (R2_INVENTORY.getObjectScene(49) == 2440) {
+		_actor2.postInit();
+		_actor2.setup(2435, 1, 1);
+		_actor2.setPosition(Common::Point(94, 80));
+		_actor2.fixPriority(106);
+		_actor2.setDetails(2430, 48, -1, -1, 1, NULL);
+	}
+	R2_GLOBALS._player.postInit();
+	R2_GLOBALS._player.enableControl();
+	R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+
+	if (R2_GLOBALS._player._characterIndex == 1) {
+		R2_GLOBALS._player.setVisage(2008);
+		R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
+	} else {
+		R2_GLOBALS._player.setVisage(20);
+		R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
+	}
+	R2_GLOBALS._player.setPosition(Common::Point(210, 200));
+	if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) {
+		_actor1.postInit();
+		if (R2_GLOBALS._player._characterIndex == 1) {
+			_actor1.setup(20, 5, 1);
+			_actor1.setDetails(9002, 0, 4, 3, 1, NULL);
+		} else {
+			_actor1.setup(2008, 5, 1);
+			_actor1.setDetails(9002, 0, 5, 3, 1, NULL);
+		}
+		_actor1.setPosition(Common::Point(38, 119));
+	}
+
+	_item2.setDetails(Rect(125, 25, 142, 73), 2430, 15, -1, 14, 1, NULL);
+	_item3.setDetails(Rect(124, 78, 237, 120), 2430, 36, -1, 38, 1, NULL);
+	_item4.setDetails(Rect(250, 3, 265, 133), 2430, 30, 31, 32, 1, NULL);
+	_item5.setDetails(Rect(91, 117, 203, 140), 2430, 9, -1, 11, 1, NULL);
+	_item6.setDetails(Rect(48, 78, 103, 112), 2430, 6, -1, -1, 1, NULL);
+	_item7.setDetails(Rect(48, 31, 73, 52), 2430, 33, -1, 18, 1, NULL);
+	_item1.setDetails(Rect(0, 0, 320, 200), 2430, 0, -1, -1, 1, NULL);
+
+	R2_GLOBALS._player.disableControl();
+
+	if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2000) {
+		R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 2440;
+		Common::Point pt(210, 150);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+	} else {
+		R2_GLOBALS._player.setPosition(Common::Point(210, 150));
+		R2_GLOBALS._player.setStrip(3);
+		R2_GLOBALS._player.enableControl();
+	}
+}
+
+void Scene2440::remove() {
+	R2_GLOBALS._sound1.fadeOut2(NULL);
+	SceneExt::remove();
+}
+
+void Scene2440::signal() {
+	switch (_sceneMode) {
+	case 11:
+		g_globals->_sceneManager.changeScene(2000);
+		break;
+	case 2440:
+		_actor2.remove();
+		R2_INVENTORY.setObjectScene(49, 2);
+	// No break on purpose
+	default:
+		R2_GLOBALS._player.enableControl();
+		break;
+	}
+}
+
 } // End of namespace Ringworld2
 } // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h
index d3db8e1..1fef5a8 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.h
@@ -259,6 +259,37 @@ public:
 	virtual void signal();
 };
 
+class Scene2440 : public SceneExt {
+	class Actor1 : public SceneActor {
+	public:
+		bool startAction(CursorType action, Event &event);
+	};
+	class Actor2 : public SceneActor {
+	public:
+		bool startAction(CursorType action, Event &event);
+	};
+
+	class Exit1 : public SceneExit {
+	public:
+		virtual void changeScene();
+	};
+public:
+	NamedHotspot _item1;
+	NamedHotspot _item2;
+	NamedHotspot _item3;
+	NamedHotspot _item4;
+	NamedHotspot _item5;
+	NamedHotspot _item6;
+	NamedHotspot _item7;
+	Actor1 _actor1;
+	Actor2 _actor2;
+	Exit1 _exit1;
+	SequenceManager _sequenceManager;
+
+	virtual void postInit(SceneObjectList *OwnerList = NULL);
+	virtual void remove();
+	virtual void signal();
+};
 } // End of namespace Ringworld2
 } // End of namespace TsAGE
 






More information about the Scummvm-git-logs mailing list