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

Strangerke Strangerke at scummvm.org
Fri Jan 6 00:19:45 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:
f5c54bd9a3 TSAGE: R2R - Implement scene 1020


Commit: f5c54bd9a36a106b05df0234c342d319f9307410
    https://github.com/scummvm/scummvm/commit/f5c54bd9a36a106b05df0234c342d319f9307410
Author: Strangerke (strangerke at scummvm.org)
Date: 2012-01-05T15:19:28-08:00

Commit Message:
TSAGE: R2R - Implement scene 1020

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



diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index d906deb..aa9e1df 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -94,8 +94,10 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
 	case 1000:
 		error("Missing scene %d from group 1", sceneNumber);
 	case 1010:
+		// Cutscene - trip in space
 		return new Scene1010();
 	case 1020:
+		return new Scene1020();
 	case 1100:
 	case 1200:
 	case 1330:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index e514155..1949d19 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -30,7 +30,7 @@ namespace TsAGE {
 namespace Ringworld2 {
 
 /*--------------------------------------------------------------------------
- * Scene 1010 -
+ * Scene 1010 - Cutscene: A pixel lost in space!
  *
  *--------------------------------------------------------------------------*/
 void Scene1010::postInit(SceneObjectList *OwnerList) {
@@ -88,5 +88,129 @@ void Scene1010::signal() {
 	}
 }
 
+/*--------------------------------------------------------------------------
+ * Scene 1020 -
+ *
+ *--------------------------------------------------------------------------*/
+void Scene1020::postInit(SceneObjectList *OwnerList) {
+	SceneExt::postInit();
+	loadScene(1020);
+
+	if (R2_GLOBALS._sceneManager._previousScene == 1010)
+		g_globals->gfxManager()._bounds.moveTo(Common::Point(160, 0));
+
+	R2_GLOBALS._v558B6.set(160, 0, 160, 161);
+	R2_GLOBALS._v58CE2 = 0;
+	R2_GLOBALS._player.postInit();
+
+	if (R2_GLOBALS._sceneManager._previousScene == 1010) {
+		R2_GLOBALS._player.setPosition(Common::Point(500, 100));
+		R2_GLOBALS._player.setup(1020, 1, 1);
+	} else {
+		R2_GLOBALS._player.setPosition(Common::Point(0, 100));
+		R2_GLOBALS._player.setup(1020, 2, 1);
+	}
+
+	R2_GLOBALS._player.setObjectWrapper(NULL);
+	R2_GLOBALS._player.hide();
+	R2_GLOBALS._player.disableControl();
+	setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+
+	if (R2_GLOBALS._sceneManager._previousScene == 1010)
+		_sceneMode = 0;
+	else 
+		_sceneMode = 10;
+}
+
+void Scene1020::signal() {
+	switch (_sceneMode) {
+	case 0: {
+		_sceneMode = 1;
+		R2_GLOBALS._player.show();
+		R2_GLOBALS._player.setPosition(Common::Point(347, 48));
+		R2_GLOBALS._player._moveDiff = Common::Point(2, 1);
+		R2_GLOBALS._player.setZoom(0);
+		Common::Point pt(392, 41);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+		}
+		break;
+	case 1:
+		_sceneMode = 2;
+		R2_GLOBALS._player.setZoom(100);
+		R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+		break;
+	case 2: {
+		_sceneMode = 3;
+		R2_GLOBALS._player._moveDiff = Common::Point(30, 15);
+		Common::Point pt(-15, 149);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+		}
+		break;
+	case 3:
+		_sceneMode = 4;
+		setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+		break;
+	case 4:
+		R2_GLOBALS.setFlag(51);
+		R2_GLOBALS._sceneManager.changeScene(300);
+		break;
+	case 10: {
+		_sceneMode = 11;
+		R2_GLOBALS._player.setPosition(Common::Point(25, 133));
+		R2_GLOBALS._player._moveDiff = Common::Point(30, 15);
+		R2_GLOBALS._player.setZoom(100);
+		Common::Point pt(355, 60);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+		}
+		break;
+	case 11:
+		R2_GLOBALS._player.setPosition(Common::Point(355, 57));
+		_sceneMode = 12;
+		R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+		break;
+	case 12: {
+		R2_GLOBALS._player.setPosition(Common::Point(355, 60));
+		_sceneMode = 13;
+		R2_GLOBALS._player._moveDiff = Common::Point(3, 1);
+		Common::Point pt(347, 48);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+		}
+		break;
+	case 13:
+		setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+		if (R2_GLOBALS._player._percent < 1)
+			_sceneMode = 14;
+		break;
+	case 14:
+		R2_GLOBALS._sceneManager.changeScene(1010);
+		break;
+	default:
+		break;
+	}
+}
+
+void Scene1020::dispatch() {
+	if (_sceneMode == 1) {
+		R2_GLOBALS._player.setZoom(R2_GLOBALS._player._percent + 1);
+		if (R2_GLOBALS._player._percent > 10)
+			R2_GLOBALS._player._moveDiff.x = 3;
+		if (R2_GLOBALS._player._percent > 20)
+			R2_GLOBALS._player._moveDiff.x = 4;
+	}
+
+	if ((_sceneMode == 13) && (R2_GLOBALS._player._percent != 0)) {
+		R2_GLOBALS._player.setZoom(R2_GLOBALS._player._percent - 2);
+		if (R2_GLOBALS._player._percent < 80)
+			R2_GLOBALS._player._moveDiff.x = 2;
+		if (R2_GLOBALS._player._percent < 70)
+			R2_GLOBALS._player._moveDiff.x = 1;
+	}
+
+	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 4ddd064..f0444de 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.h
@@ -47,6 +47,15 @@ public:
 	virtual void signal();
 };
 
+class Scene1020 : public SceneExt {
+public:
+	SequenceManager _sequenceManager;
+
+	virtual void postInit(SceneObjectList *OwnerList = NULL);
+	virtual void signal();
+	virtual void dispatch();
+};
+
 } // End of namespace Ringworld2
 } // End of namespace TsAGE
 






More information about the Scummvm-git-logs mailing list