diff options
author | Strangerke | 2012-01-05 22:22:30 +0100 |
---|---|---|
committer | Strangerke | 2012-01-05 22:22:30 +0100 |
commit | 8e54ddfabf81d382c4e6f026611a7dabd90c9a51 (patch) | |
tree | 27aedc7a57e83095c431673af44d416eb8938e6f /engines/tsage/ringworld2 | |
parent | e914ec5d890dc742f40b19b127d2e9e44d418cd9 (diff) | |
download | scummvm-rg350-8e54ddfabf81d382c4e6f026611a7dabd90c9a51.tar.gz scummvm-rg350-8e54ddfabf81d382c4e6f026611a7dabd90c9a51.tar.bz2 scummvm-rg350-8e54ddfabf81d382c4e6f026611a7dabd90c9a51.zip |
TSAGE: R2R - Implement scene 1010
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 92 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.h | 53 |
3 files changed, 148 insertions, 0 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index d39db9c2f8..d906debf82 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 0000000000..e514155435 --- /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 0000000000..4ddd064325 --- /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 |