aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorstrangerke2011-03-27 01:19:44 +0100
committerstrangerke2011-03-27 01:19:44 +0100
commit2a911701bc23b1782647cea19777db5974c04fd1 (patch)
tree062067df48e788281f0bb7f3d2c75501e10a2a66 /engines/tsage
parentaf80cb99abb7371e6789a3ef649f5c2300d129ac (diff)
downloadscummvm-rg350-2a911701bc23b1782647cea19777db5974c04fd1.tar.gz
scummvm-rg350-2a911701bc23b1782647cea19777db5974c04fd1.tar.bz2
scummvm-rg350-2a911701bc23b1782647cea19777db5974c04fd1.zip
TSAGE: Implement Scene 9999
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/module.mk1
-rw-r--r--engines/tsage/ringworld_logic.cpp2
-rw-r--r--engines/tsage/ringworld_scenes10.cpp122
-rw-r--r--engines/tsage/ringworld_scenes10.h64
4 files changed, 189 insertions, 0 deletions
diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index c3666beb55..f483f950f3 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -16,6 +16,7 @@ MODULE_OBJS := \
ringworld_scenes3.o \
ringworld_scenes4.o \
ringworld_scenes8.o \
+ ringworld_scenes10.o \
saveload.o \
scenes.o \
sound.o \
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 7c3b855361..d1628f5c6f 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -33,6 +33,7 @@
#include "tsage/ringworld_scenes4.h"
#include "tsage/ringworld_scenes5.h"
#include "tsage/ringworld_scenes8.h"
+#include "tsage/ringworld_scenes10.h"
namespace tSage {
@@ -125,6 +126,7 @@ Scene *SceneFactory::createScene(int sceneNumber) {
case 7700: return new Scene7700();
/* Scene group 10 */
+ case 9999: return new Scene9999();
default:
error("Unknown scene number - %d", sceneNumber);
diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp
new file mode 100644
index 0000000000..749e0e14c0
--- /dev/null
+++ b/engines/tsage/ringworld_scenes10.cpp
@@ -0,0 +1,122 @@
+/* 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.
+ *
+ * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.cpp $
+ * $Id: scene_logic.cpp 232 2011-02-12 11:56:38Z dreammaster $
+ *
+ */
+
+#include "graphics/cursorman.h"
+#include "tsage/ringworld_scenes10.h"
+#include "tsage/scenes.h"
+#include "tsage/tsage.h"
+#include "tsage/staticres.h"
+
+namespace tSage {
+
+/*--------------------------------------------------------------------------
+ * Scene 9999
+ *
+ *--------------------------------------------------------------------------*/
+
+void Scene9999::Action1::signal() {
+ switch (_actionIndex++) {
+ case 0:
+ setDelay(600);
+ break;
+ case 1:
+ _globals->_sceneManager.changeScene(3500);
+ break;
+ default:
+ break;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+void Scene9999::Action2::signal() {
+ switch (_actionIndex++) {
+ case 0:
+ setDelay(10);
+ break;
+ case 1:
+ SceneItem::display(9999, 0, SET_Y, 10, SET_X, 30, SET_FONT, 2, SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 23, SET_WIDTH, 260, SET_KEEP_ONSCREEN, 1, LIST_END);
+ setDelay(300);
+ break;
+ case 2:
+ _globals->_stripNum = 3600;
+ _globals->_sceneManager.changeScene(3600);
+ default:
+ break;
+ }
+}
+
+void Scene9999::postInit(SceneObjectList *OwnerList) {
+ loadScene(9998);
+ Scene::postInit();
+ setZoomPercents(0, 100, 200, 100);
+
+ _object1.postInit();
+ _object1.setVisage(1303);
+ _object1.setStrip2(3);
+ _object1.setPosition(Common::Point(160, 152), 0);
+
+ _globals->_player.postInit();
+ _globals->_player.setVisage(1303);
+ _globals->_player.setStrip2(1);
+ _globals->_player.setPriority2(250);
+ _globals->_player.animate(ANIM_MODE_2, 0);
+ _globals->_player.setPosition(Common::Point(194, 98), 0);
+ _globals->_player._numFrames = 20;
+ _globals->_player.disableControl();
+
+ _object2.postInit();
+ _object2.setVisage(1303);
+ _object2.setStrip2(2);
+ _object2.setPriority2(2);
+ _object2.setPosition(Common::Point(164, 149), 0);
+
+ _object3.postInit();
+ _object3.setVisage(1303);
+ _object3.setStrip2(2);
+ _object3.setPriority2(2);
+ _object3.setFrame(2);
+ _object3.setPosition(Common::Point(292, 149), 0);
+ _object3.setAction(&_action3);
+
+ if (_globals->_sceneManager._previousScene == 3500)
+ setAction(&_action2);
+ else
+ setAction(&_action1);
+
+ _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y);
+ _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
+ _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
+
+ if (_globals->_sceneManager._previousScene == 3500)
+ _globals->_stripNum = 2222;
+ else
+ _globals->_stripNum = 2121;
+
+ _globals->_soundHandler.startSound(118, 0, 127);
+
+}
+
+} // End of namespace tSage
diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h
new file mode 100644
index 0000000000..29738c5888
--- /dev/null
+++ b/engines/tsage/ringworld_scenes10.h
@@ -0,0 +1,64 @@
+/* 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.
+ *
+ * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $
+ * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $
+ *
+ */
+
+#ifndef TSAGE_RINGWORLD_SCENES10_H
+#define TSAGE_RINGWORLD_SCENES10_H
+
+#include "common/scummsys.h"
+#include "tsage/ringworld_logic.h"
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+
+namespace tSage {
+
+class Scene9999: public Scene {
+ /* Actions */
+ class Action1: public Action {
+ public:
+ virtual void signal();
+ };
+ class Action2: public Action {
+ public:
+ virtual void signal();
+ };
+
+public:
+
+ Action1 _action1;
+ Action2 _action2;
+ Action _action3;
+ SceneObject _object1;
+ SceneObject _object2;
+ SceneObject _object3;
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+};
+
+
+} // End of namespace tSage
+
+#endif