aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/blue_force/blueforce_logic.cpp3
-rw-r--r--engines/tsage/blue_force/blueforce_scenes7.cpp277
-rw-r--r--engines/tsage/blue_force/blueforce_scenes7.h103
-rw-r--r--engines/tsage/module.mk1
4 files changed, 383 insertions, 1 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index c923583aef..b94bef297e 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -27,6 +27,7 @@
#include "tsage/blue_force/blueforce_scenes3.h"
#include "tsage/blue_force/blueforce_scenes4.h"
#include "tsage/blue_force/blueforce_scenes6.h"
+#include "tsage/blue_force/blueforce_scenes7.h"
#include "tsage/blue_force/blueforce_scenes8.h"
#include "tsage/blue_force/blueforce_scenes9.h"
#include "tsage/scenes.h"
@@ -156,7 +157,7 @@ Scene *BlueForceGame::createScene(int sceneNumber) {
// Decking
return new Scene690();
case 710:
- error("Scene group 7 not implemented");
+ return new Scene710();
case 800:
// Jamison & Ryan
return new Scene800();
diff --git a/engines/tsage/blue_force/blueforce_scenes7.cpp b/engines/tsage/blue_force/blueforce_scenes7.cpp
new file mode 100644
index 0000000000..1d94211871
--- /dev/null
+++ b/engines/tsage/blue_force/blueforce_scenes7.cpp
@@ -0,0 +1,277 @@
+/* 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/blue_force/blueforce_scenes7.h"
+#include "tsage/globals.h"
+#include "tsage/scenes.h"
+#include "tsage/tsage.h"
+#include "tsage/staticres.h"
+
+namespace TsAGE {
+
+namespace BlueForce {
+
+/*--------------------------------------------------------------------------
+ * Scene 710 -
+ *
+ *--------------------------------------------------------------------------*/
+void Scene710::Timer1::signal() {
+ PaletteRotation *rotation = BF_GLOBALS._scenePalette.addRotation(136, 138, -1);
+ rotation->setDelay(25);
+ rotation = BF_GLOBALS._scenePalette.addRotation(146, 148, -1);
+ rotation->setDelay(30);
+ rotation = BF_GLOBALS._scenePalette.addRotation(187, 191, -1);
+ rotation->setDelay(35);
+ rotation = BF_GLOBALS._scenePalette.addRotation(245, 246, -1);
+ rotation->setDelay(20);
+ remove();
+}
+
+void Scene710::Action1::signal() {
+ Scene710 *scene = (Scene710 *)BF_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ BF_GLOBALS._player.disableControl();
+ _state = 7104;
+ if (BF_INVENTORY.getObjectScene(INV_CRATE1) == 1)
+ _state = 7105;
+ setDelay(3);
+ break;
+ case 1: {
+ PlayerMover *mover = new PlayerMover();
+ BF_GLOBALS._player.addMover(mover, &scene->_laura._position, scene);
+ break;
+ }
+ case 2:
+ BF_GLOBALS._player._strip = 2;
+ scene->_stripManager.start(_state, this);
+ break;
+ case 3:
+ if (_state == 7105)
+ BF_GLOBALS._player.enableControl();
+ else {
+ BF_GLOBALS._player.disableControl();
+ scene->_sceneMode = 7106;
+ scene->setAction(&scene->_sequenceManager1, scene, 7106, &BF_GLOBALS._player, &scene->_laura, &scene->_kid, &scene->_dog, NULL);
+ }
+ if (_state < 7104) {
+ _state++;
+ if ((_state != 7104) && (BF_INVENTORY.getObjectScene(INV_CRATE1) == 1))
+ _state = 7105;
+ }
+ remove();
+ break;
+ default:
+ break;
+ }
+}
+
+// Laura
+bool Scene710::Object3::startAction(CursorType action, Event &event) {
+ Scene710 *scene = (Scene710 *)BF_GLOBALS._sceneManager._scene;
+
+ if (action == CURSOR_TALK) {
+ BF_GLOBALS._player.setAction(&scene->_action1);
+ return true;
+ } else
+ return NamedObject::startAction(action, event);
+}
+
+bool Scene710::Object4::startAction(CursorType action, Event &event) {
+ Scene710 *scene = (Scene710 *)BF_GLOBALS._sceneManager._scene;
+
+ if ((action == CURSOR_LOOK) && (scene->_kid._position.x < 0)) {
+ SceneItem::display(710, 13);
+ return true;
+ } else
+ return NamedObject::startAction(action, event);
+}
+
+//Stick
+bool Scene710::Object5::startAction(CursorType action, Event &event) {
+ Scene710 *scene = (Scene710 *)BF_GLOBALS._sceneManager._scene;
+
+ switch (action) {
+ case CURSOR_LOOK:
+ if (scene->_v1D64 <= 2)
+ return NamedObject::startAction(action, event);
+ else {
+ SceneItem::display(710, 3);
+ scene->_v1D66 = 1;
+ return true;
+ }
+ case CURSOR_USE:
+ if ((scene->_kid._position.x < 0) && (scene->_v1D62 == 1)) {
+ scene->_v1D64++;
+ if (scene->_v1D66 == 0) {
+ BF_GLOBALS._player.disableControl();
+ scene->_v1D62 = 0;
+ scene->_sceneMode = 7105;
+ scene->setAction(&scene->_sequenceManager1, scene, 7105, &BF_GLOBALS._player, &scene->_stick, &scene->_dog, NULL);
+ } else {
+ BF_GLOBALS._player.disableControl();
+ scene->_sceneMode = 7101;
+ scene->setAction(&scene->_sequenceManager1, scene, 7101, &BF_GLOBALS._player, &scene->_dog, &scene->_stick, NULL);
+ }
+ return true;
+ }
+ // No break on purpose
+ default:
+ return NamedObject::startAction(action, event);
+ }
+}
+
+void Scene710::postInit(SceneObjectList *OwnerList) {
+ SceneExt::postInit();
+ loadScene(710);
+
+ _sceneBounds.moveTo(320, 0);
+ BF_GLOBALS._sound1.fadeSound(14);
+ _soundExt1.fadeSound(48);
+ _v51C34.set(40, 0, 280, 240);
+ BF_GLOBALS._player.postInit();
+ BF_GLOBALS._player.hide();
+ BF_GLOBALS._player._moveDiff = Common::Point(4, 2);
+ BF_GLOBALS._player.disableControl();
+ if (BF_GLOBALS._dayNumber == 0)
+ BF_GLOBALS._dayNumber = 1;
+ _stripManager.addSpeaker(&_jakeSpeaker);
+ _stripManager.addSpeaker(&_skipSpeaker);
+ _stripManager.addSpeaker(&_lauraSpeaker);
+ _stripManager.addSpeaker(&_gameTextSpeaker);
+
+ _kid.postInit();
+ _kid._moveDiff = Common::Point(4, 2);
+ _laura.postInit();
+ _laura._moveDiff = Common::Point(4, 2);
+ _dog.postInit();
+ _dog._moveDiff = Common::Point(4, 2);
+ _stick.postInit();
+ _stick.setVisage(710);
+ _stick.setStrip(2);
+ _stick.animate(ANIM_MODE_2, NULL);
+ _stick.setPosition(Common::Point(650, 160));
+ _stick._moveDiff.x = 16;
+ _stick.setDetails(710, 4, -1, -1, 1, NULL);
+ _laura.setDetails(710, 2, -1, -1, 1, NULL);
+ _kid.setDetails(710, 6, -1, -1, 1, NULL);
+ _dog.setDetails(710, 0, -1, -1, 1, NULL);
+
+ _item1.setDetails(Rect(555, 68, 583, 101), 710, 7, 23, -1, 1, NULL);
+ _item2.setDetails(Rect(583, 46, 611, 78), 710, 7, 23, -1, 1, NULL);
+ _item3.setDetails(Rect(611, 24, 639, 56), 710, 7, 23, -1, 1, NULL);
+ _item6.setDetails(1, 710, 9, 1, -1, 1);
+ _item4.setDetails(2, 710, 8, 14, -1, 1);
+ _item5.setDetails(3, 710, 10, 16, -1, 1);
+ _item8.setDetails(Rect(222, 18, 249, 42), 710, 12, 18, -1, 1, NULL);
+ _item7.setDetails(Rect(0, 0, 640, 52), 710, 11, 17, -1, 1, NULL);
+ _item9.setDetails(Rect(0, 0, 640, 128), 710, 5, 15, -1, 1, NULL);
+
+ _v1D62 = _v1D64 = _v1D66 = _v1D68 = 0;
+ _action1._state = 7100;
+ _timer1.set(2, NULL);
+ _sceneMode = 7100;
+ setAction(&_sequenceManager1, this, 7100, &BF_GLOBALS._player, &_laura, &_kid, &_dog, NULL);
+}
+
+void Scene710::signal() {
+ switch (_sceneMode++) {
+ case 0:
+ BF_GLOBALS._player.enableControl();
+ break;
+ case 7100:
+ BF_GLOBALS._player.enableControl();
+ _sceneMode = 7102;
+ setAction(&_sequenceManager1, this, 7102, &_dog, NULL);
+ break;
+ case 7101:
+ BF_GLOBALS._player.enableControl();
+ BF_INVENTORY.setObjectScene(288, 36);
+ _stick.remove();
+ BF_GLOBALS._walkRegions.proc2(2);
+ break;
+ case 7102:
+ _stick.setPosition(Common::Point(100, 122));
+ _stick.animate(ANIM_MODE_NONE, NULL);
+ _stick._strip = 2;
+ if (_v1D64 <= 2)
+ _stick._frame = 2;
+ else {
+ if (_v1D64 == 3) {
+ BF_GLOBALS._player.disableControl();
+ _sceneMode = 0;
+ _stripManager.start(7108, this);
+ }
+ _stick._frame = 1;
+ }
+ _v1D62 = 1;
+ BF_GLOBALS._walkRegions.proc1(2);
+ if ((_v1D68 != 0) && (_sceneMode != 0))
+ BF_GLOBALS._player.enableControl();
+ break;
+ case 7103:
+ if (BF_GLOBALS._player._position.x > 179) {
+ _sceneMode = 7102;
+ setAction(&_sequenceManager1, this, 7102, &_dog, NULL);
+ } else {
+ _sceneMode = 7104;
+ setAction(&_sequenceManager3, this, 7104, &_kid, NULL);
+ }
+ break;
+ case 7105:
+ _v1D68 = 1;
+ // No break on purpose
+ case 7104:
+ _sceneMode = 7102;
+ setAction(&_sequenceManager1, this, 7102, &_dog, NULL);
+ BF_GLOBALS._walkRegions.proc2(2);
+ break;
+ case 7106:
+ BF_GLOBALS._sound1.fadeOut2(NULL);
+ BF_GLOBALS._sceneManager.changeScene(270);
+ break;
+ default:
+ break;
+ }
+}
+
+void Scene710::dispatch() {
+ if ((_kid._position.x > 0) && (_v1D62 == 1) && (_sceneMode != 7106)) {
+ _v1D62 = 0;
+ _sceneMode = 7103;
+ setAction(&_sequenceManager1, this, 7103, &_kid, &_stick, &_dog, NULL);
+ }
+ SceneExt::dispatch();
+}
+
+void Scene710::synchronize(Serializer &s) {
+ SceneExt::synchronize(s);
+ s.syncAsSint16LE(_v1D62);
+ s.syncAsSint16LE(_v1D64);
+ s.syncAsSint16LE(_v1D66);
+ s.syncAsSint16LE(_v1D68);
+}
+
+
+} // End of namespace BlueForce
+} // End of namespace TsAGE
diff --git a/engines/tsage/blue_force/blueforce_scenes7.h b/engines/tsage/blue_force/blueforce_scenes7.h
new file mode 100644
index 0000000000..9bb43453ef
--- /dev/null
+++ b/engines/tsage/blue_force/blueforce_scenes7.h
@@ -0,0 +1,103 @@
+/* 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_BLUEFORCE_SCENES7_H
+#define TSAGE_BLUEFORCE_SCENES7_H
+
+#include "common/scummsys.h"
+#include "tsage/blue_force/blueforce_logic.h"
+#include "tsage/blue_force/blueforce_speakers.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"
+
+namespace TsAGE {
+
+namespace BlueForce {
+
+using namespace TsAGE;
+
+class Scene710: public SceneExt {
+ // Actions
+ class Action1: public ActionExt {
+ public:
+ void signal();
+ };
+ // Timers
+ class Timer1: public Timer {
+ public:
+ void signal();
+ };
+ // Objects
+ class Object3: public NamedObject {
+ public:
+ bool startAction(CursorType action, Event &event);
+ };
+ class Object4: public NamedObject {
+ public:
+ bool startAction(CursorType action, Event &event);
+ };
+ class Object5: public NamedObject {
+ public:
+ bool startAction(CursorType action, Event &event);
+ };
+
+public:
+ SequenceManager _sequenceManager1;
+ SequenceManager _sequenceManager2;
+ SequenceManager _sequenceManager3;
+ Timer1 _timer1;
+ SpeakerJake _jakeSpeaker;
+ SpeakerLaura _lauraSpeaker;
+ SpeakerSkip _skipSpeaker;
+ SpeakerGameText _gameTextSpeaker;
+ Action1 _action1;
+ NamedObject _object1;
+ NamedObject _kid;
+ Object3 _laura;
+ Object4 _dog;
+ Object5 _stick;
+ ASoundExt _soundExt1;
+ NamedHotspot _item1;
+ NamedHotspot _item2;
+ NamedHotspot _item3;
+ NamedHotspot _item4;
+ NamedHotspot _item5;
+ NamedHotspot _item6;
+ NamedHotspot _item7;
+ NamedHotspot _item8;
+ NamedHotspot _item9;
+ int _v1D62, _v1D64, _v1D66, _v1D68;
+
+ void postInit(SceneObjectList *OwnerList = NULL);
+ void signal();
+ void dispatch();
+ void synchronize(Serializer &s);
+};
+
+} // End of namespace BlueForce
+} // End of namespace TsAGE
+
+#endif
diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index be3994ef1d..4d140f4ddd 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -8,6 +8,7 @@ MODULE_OBJS := \
blue_force/blueforce_scenes3.o \
blue_force/blueforce_scenes4.o \
blue_force/blueforce_scenes6.o \
+ blue_force/blueforce_scenes7.o \
blue_force/blueforce_scenes8.o \
blue_force/blueforce_scenes9.o \
blue_force/blueforce_speakers.o \