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

Strangerke Strangerke at scummvm.org
Sun Jan 8 23:58:35 CET 2012


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:
d1e9d38214 TSAGE: R2R - Implement scene 1530


Commit: d1e9d382143e94f2b1129a7993933825a731bfd3
    https://github.com/scummvm/scummvm/commit/d1e9d382143e94f2b1129a7993933825a731bfd3
Author: Strangerke (strangerke at scummvm.org)
Date: 2012-01-08T14:57:08-08:00

Commit Message:
TSAGE: R2R - Implement scene 1530

Changed paths:
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/ringworld2/ringworld2_scenes1.cpp
    engines/tsage/ringworld2/ringworld2_scenes1.h
    engines/tsage/ringworld2/ringworld2_speakers.h



diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 5eccafe..8b4d865 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -113,6 +113,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
 		// Cutscene - Ship
 		return new Scene1525();
 	case 1530:
+		return new Scene1530();
 	case 1550:
 	case 1575:
 	case 1580:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 1afb1b6..997331f 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -1057,5 +1057,106 @@ void Scene1525::signal() {
 	}
 }
 
+/*--------------------------------------------------------------------------
+ * Scene 1530 -
+ *
+ *--------------------------------------------------------------------------*/
+void Scene1530::postInit(SceneObjectList *OwnerList) {
+	if (R2_GLOBALS._sceneManager._previousScene == 1000)
+		loadScene(1650);
+	else if (R2_GLOBALS._sceneManager._previousScene == 1580)
+		loadScene(1550);
+	else
+		loadScene(1530);
+
+	R2_GLOBALS._v58CE2 = 0;
+	SceneExt::postInit();
+
+	_stripManager.addSpeaker(&_quinnSpeaker);
+	_stripManager.addSpeaker(&_seekerSpeaker);
+		
+	if (R2_GLOBALS._sceneManager._previousScene == 1000) {
+		R2_GLOBALS._player.postInit();
+		R2_GLOBALS._player.hide();
+		R2_GLOBALS._player.disableControl();
+
+		R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS);
+		_stripManager.start(538, this);
+		R2_GLOBALS._sound1.play(114);
+
+		_sceneMode = 3;
+	} else if (R2_GLOBALS._sceneManager._previousScene == 1580) {
+		R2_GLOBALS._player.postInit();
+		R2_GLOBALS._player._characterIndex = R2_QUINN;
+		R2_GLOBALS._player.setObjectWrapper(NULL);
+		R2_GLOBALS._player.setup(1516, 6, 1);
+		R2_GLOBALS._player.setPosition(Common::Point(160, 125));
+		R2_GLOBALS._player._moveRate = 30;
+		R2_GLOBALS._player._moveDiff = Common::Point(4, 1);
+
+		_actor2.postInit();
+		_actor2.setup(1516, 7, 1);
+		_actor2.setPosition(Common::Point(121, 41));
+		_actor2.animate(ANIM_MODE_2, NULL);
+
+		_actor3.postInit();
+		_actor3.setup(1516, 8, 1);
+		_actor3.setPosition(Common::Point(107, 116));
+		_actor3.animate(ANIM_MODE_2, NULL);
+
+		R2_GLOBALS._player.disableControl();
+		Common::Point pt(480, 75);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+		R2_GLOBALS._sound1.play(111);
+
+		_sceneMode = 1;
+	} else {
+		_actor1.postInit();
+		_actor1._effect = 1;
+
+		R2_GLOBALS._player.postInit();
+		R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+		R2_GLOBALS._player.disableControl();
+
+		setAction(&_sequenceManager, this, 1530, &R2_GLOBALS._player, &_actor1, NULL);
+
+		_sceneMode = 2;
+	}
+
+}
+
+void Scene1530::signal() {
+	switch (_sceneMode - 1) {
+	case 0:
+		R2_GLOBALS._sceneManager.changeScene(1000);
+		break;
+	case 1:
+		R2_GLOBALS._sceneManager.changeScene(1525);
+		break;
+	case 2:
+		R2_GLOBALS._player.disableControl();
+		_sceneMode = 4;
+		R2_GLOBALS._player.show();
+		setAction(&_sequenceManager, this, 1650, &R2_GLOBALS._player, NULL);
+		break;
+	case 3:
+		R2_GLOBALS._sceneManager.changeScene(1700);
+		break;
+	default:
+		break;
+	}
+}
+
+void Scene1530::dispatch() {
+	int16 x = R2_GLOBALS._player._position.x;
+	int16 y = R2_GLOBALS._player._position.y;
+
+	_actor2.setPosition(Common::Point(x - 39, y - 85));
+	_actor3.setPosition(Common::Point(x - 53, y - 9));
+
+	Scene::dispatch();
+}
+
 } // End of namespace Ringworld2
 } // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h
index 4c6d3ba..4631c4f 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.h
@@ -138,6 +138,21 @@ public:
 	virtual void postInit(SceneObjectList *OwnerList = NULL);
 	virtual void signal();
 };
+
+class Scene1530 : public SceneExt {
+public:
+	SpeakerQuinn1530 _quinnSpeaker;
+	SpeakerSeeker1530 _seekerSpeaker;
+	SceneActor _actor1;
+	SceneActor _actor2;
+	SceneActor _actor3;
+
+	SequenceManager _sequenceManager;
+
+	virtual void postInit(SceneObjectList *OwnerList = NULL);
+	virtual void signal();
+	virtual void dispatch();
+};
 } // End of namespace Ringworld2
 } // End of namespace TsAGE
 
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h
index 13c770a..49ac9f5 100644
--- a/engines/tsage/ringworld2/ringworld2_speakers.h
+++ b/engines/tsage/ringworld2/ringworld2_speakers.h
@@ -269,6 +269,11 @@ public:
 	virtual void proc15();
 };
 
+class SpeakerQuinn1530 : public SpeakerQuinn {
+public:
+	virtual Common::String getClassName() { return "SpeakerQuinn1530"; }
+};
+
 class SpeakerQuinn2435 : public SpeakerQuinn {
 public:
 	virtual Common::String getClassName() { return "SpeakerQuinn2435"; }
@@ -407,6 +412,11 @@ public:
 	virtual void proc15();
 };
 
+class SpeakerSeeker1530 : public SpeakerSeeker {
+public:
+	virtual Common::String getClassName() { return "SpeakerSeeker1530"; }
+};
+
 class SpeakerSeeker2435 : public SpeakerSeeker {
 public:
 	virtual Common::String getClassName() { return "SpeakerSeeker2435"; }






More information about the Scummvm-git-logs mailing list