[Scummvm-cvs-logs] scummvm master -> 8e54ddfabf81d382c4e6f026611a7dabd90c9a51

Strangerke Strangerke at scummvm.org
Thu Jan 5 22:22: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:
8e54ddfabf TSAGE: R2R - Implement scene 1010


Commit: 8e54ddfabf81d382c4e6f026611a7dabd90c9a51
    https://github.com/scummvm/scummvm/commit/8e54ddfabf81d382c4e6f026611a7dabd90c9a51
Author: Strangerke (strangerke at scummvm.org)
Date: 2012-01-05T13:22:30-08:00

Commit Message:
TSAGE: R2R - Implement scene 1010

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



diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index 95a1a58..53c03e2 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -38,6 +38,7 @@ MODULE_OBJS := \
 	ringworld2/ringworld2_dialogs.o \
 	ringworld2/ringworld2_logic.o \
 	ringworld2/ringworld2_scenes0.o \
+	ringworld2/ringworld2_scenes1.o \
 	ringworld2/ringworld2_scenes2.o \
 	ringworld2/ringworld2_scenes3.o \
 	ringworld2/ringworld2_speakers.o \
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index d39db9c..d906deb 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -27,6 +27,7 @@
 #include "tsage/ringworld2/ringworld2_logic.h"
 #include "tsage/ringworld2/ringworld2_dialogs.h"
 #include "tsage/ringworld2/ringworld2_scenes0.h"
+#include "tsage/ringworld2/ringworld2_scenes1.h"
 #include "tsage/ringworld2/ringworld2_scenes2.h"
 #include "tsage/ringworld2/ringworld2_scenes3.h"
 
@@ -91,7 +92,9 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
 	/* Scene group #1 */
 	//
 	case 1000:
+		error("Missing scene %d from group 1", sceneNumber);
 	case 1010:
+		return new Scene1010();
 	case 1020:
 	case 1100:
 	case 1200:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
new file mode 100644
index 0000000..e514155
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -0,0 +1,92 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "tsage/scenes.h"
+#include "tsage/tsage.h"
+#include "tsage/staticres.h"
+#include "tsage/ringworld2/ringworld2_scenes1.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+/*--------------------------------------------------------------------------
+ * Scene 1010 -
+ *
+ *--------------------------------------------------------------------------*/
+void Scene1010::postInit(SceneObjectList *OwnerList) {
+	SceneExt::postInit();
+	loadScene(1010);
+
+	R2_GLOBALS._v58CE2 = 0;
+	setZoomPercents(100, 1, 160, 100);
+	R2_GLOBALS._player.postInit();
+	R2_GLOBALS._player.setObjectWrapper(NULL);
+	R2_GLOBALS._player.setPosition(Common::Point(30, 264));
+	R2_GLOBALS._player.changeZoom(-1);
+	R2_GLOBALS._player.disableControl();
+
+	setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+
+	if (R2_GLOBALS.getFlag(57))
+		_sceneMode = 1;
+	else {
+		R2_GLOBALS._sound1.play(89);
+		_sceneMode = 0;
+	}
+}
+
+void Scene1010::signal() {
+	switch (_sceneMode) {
+	case 1: {
+		_sceneMode = 2;
+		R2_GLOBALS._player.setup(1010, 2, 1);
+		R2_GLOBALS._player.setPosition(Common::Point(297, 101));
+		Common::Point pt(30, 264);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+		}
+		break;
+	case 2:
+		_sceneMode = 3;
+		setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+		R2_GLOBALS._player.hide();
+		break;
+	case 3:
+		if (R2_GLOBALS.getFlag(57))
+			R2_GLOBALS._sceneManager.changeScene(1500);
+		else
+			R2_GLOBALS._sceneManager.changeScene(1000);
+		break;
+	default: {
+		_sceneMode = 2;
+		R2_GLOBALS._player.setup(1010, 1, 1);
+		Common::Point pt(297, 101);
+		NpcMover *mover = new NpcMover();
+		R2_GLOBALS._player.addMover(mover, &pt, this);
+		}
+		break;
+	}
+}
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h
new file mode 100644
index 0000000..4ddd064
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.h
@@ -0,0 +1,53 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef TSAGE_RINGWORLD2_SCENES1_H
+#define TSAGE_RINGWORLD2_SCENES1_H
+
+#include "common/scummsys.h"
+#include "tsage/converse.h"
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+#include "tsage/sound.h"
+#include "tsage/ringworld2/ringworld2_logic.h"
+#include "tsage/ringworld2/ringworld2_speakers.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+using namespace TsAGE;
+
+class Scene1010 : public SceneExt {
+public:
+	SequenceManager _sequenceManager;
+
+	virtual void postInit(SceneObjectList *OwnerList = NULL);
+	virtual void signal();
+};
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
+
+#endif






More information about the Scummvm-git-logs mailing list