diff options
author | Marisa-Chan | 2014-06-13 21:43:04 +0700 |
---|---|---|
committer | Marisa-Chan | 2014-06-13 21:43:04 +0700 |
commit | 45589950c0fb1a449351e6a00ef10d42290d8bae (patch) | |
tree | 44e4eedcb7e69d5fc386155b000ed038af07251d /engines/tsage/ringworld | |
parent | 48360645dcd5f8fddb135b6e31ae5cae4be8d77f (diff) | |
parent | 5c005ad3a3f1df0bc968c85c1cf0fc48e36ab0b2 (diff) | |
download | scummvm-rg350-45589950c0fb1a449351e6a00ef10d42290d8bae.tar.gz scummvm-rg350-45589950c0fb1a449351e6a00ef10d42290d8bae.tar.bz2 scummvm-rg350-45589950c0fb1a449351e6a00ef10d42290d8bae.zip |
Merge remote-tracking branch 'upstream/master' into zvision
Conflicts:
engines/zvision/animation/rlf_animation.cpp
engines/zvision/animation_control.h
engines/zvision/core/console.cpp
engines/zvision/core/events.cpp
engines/zvision/cursors/cursor.cpp
engines/zvision/cursors/cursor_manager.cpp
engines/zvision/cursors/cursor_manager.h
engines/zvision/fonts/truetype_font.cpp
engines/zvision/graphics/render_manager.cpp
engines/zvision/graphics/render_manager.h
engines/zvision/inventory/inventory_manager.h
engines/zvision/inventory_manager.h
engines/zvision/meta_animation.h
engines/zvision/module.mk
engines/zvision/scripting/actions.cpp
engines/zvision/scripting/control.h
engines/zvision/scripting/controls/animation_control.cpp
engines/zvision/scripting/controls/animation_control.h
engines/zvision/scripting/controls/input_control.cpp
engines/zvision/scripting/controls/lever_control.cpp
engines/zvision/scripting/controls/timer_node.cpp
engines/zvision/scripting/controls/timer_node.h
engines/zvision/scripting/puzzle.h
engines/zvision/scripting/scr_file_handling.cpp
engines/zvision/scripting/script_manager.cpp
engines/zvision/scripting/script_manager.h
engines/zvision/sidefx.cpp
engines/zvision/sound/zork_raw.cpp
engines/zvision/sound/zork_raw.h
engines/zvision/video/video.cpp
engines/zvision/video/zork_avi_decoder.h
engines/zvision/zvision.cpp
engines/zvision/zvision.h
Diffstat (limited to 'engines/tsage/ringworld')
24 files changed, 541 insertions, 485 deletions
diff --git a/engines/tsage/ringworld/ringworld_demo.cpp b/engines/tsage/ringworld/ringworld_demo.cpp index fedb19c804..cd2ab07a50 100644 --- a/engines/tsage/ringworld/ringworld_demo.cpp +++ b/engines/tsage/ringworld/ringworld_demo.cpp @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_demo.h b/engines/tsage/ringworld/ringworld_demo.h index 7c0ac39285..2b93a40049 100644 --- a/engines/tsage/ringworld/ringworld_demo.h +++ b/engines/tsage/ringworld/ringworld_demo.h @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_dialogs.cpp b/engines/tsage/ringworld/ringworld_dialogs.cpp index 4728e66cd9..226a943f08 100644 --- a/engines/tsage/ringworld/ringworld_dialogs.cpp +++ b/engines/tsage/ringworld/ringworld_dialogs.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -385,7 +385,6 @@ void InventoryDialog::execute() { if ((RING_INVENTORY._selectedItem) && RING_INVENTORY._selectedItem->inInventory()) RING_INVENTORY._selectedItem->setCursor(); - GfxElement *hiliteObj; bool lookFlag = false; _gfxManager.activate(); @@ -399,7 +398,7 @@ void InventoryDialog::execute() { if (g_vm->shouldQuit()) break; - hiliteObj = NULL; + GfxElement *hiliteObj = nullptr; if ((event.eventType == EVENT_BUTTON_DOWN) && !_bounds.contains(event.mousePos)) break; diff --git a/engines/tsage/ringworld/ringworld_dialogs.h b/engines/tsage/ringworld/ringworld_dialogs.h index b14b3f6d78..68ac0a05f9 100644 --- a/engines/tsage/ringworld/ringworld_dialogs.h +++ b/engines/tsage/ringworld/ringworld_dialogs.h @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp index 0584570ac2..1d8293cffd 100644 --- a/engines/tsage/ringworld/ringworld_logic.cpp +++ b/engines/tsage/ringworld/ringworld_logic.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -270,6 +270,11 @@ bool DisplayObject::performAction(int action) { SceneArea::SceneArea() { _savedArea = NULL; _pt.x = _pt.y = 0; + + _resNum = 0; + _rlbNum = 0; + _subNum = 0; + _actionId = 0; } SceneArea::~SceneArea() { diff --git a/engines/tsage/ringworld/ringworld_logic.h b/engines/tsage/ringworld/ringworld_logic.h index e902ac127f..d384593989 100644 --- a/engines/tsage/ringworld/ringworld_logic.h +++ b/engines/tsage/ringworld/ringworld_logic.h @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_scenes1.cpp b/engines/tsage/ringworld/ringworld_scenes1.cpp index 89c07273fc..9eacc5ff10 100644 --- a/engines/tsage/ringworld/ringworld_scenes1.cpp +++ b/engines/tsage/ringworld/ringworld_scenes1.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -52,52 +52,52 @@ void Scene10::Action1::signal() { scene->_stripManager.start(11, this, scene); break; case 3: - scene->_object2.hide(); - scene->_object3.hide(); - scene->_object3.setAction(NULL); - scene->_object4.animate(ANIM_MODE_5, this); + scene->_veeshkaHead.hide(); + scene->_veeshkaRightArm.hide(); + scene->_veeshkaRightArm.setAction(NULL); + scene->_centurion.animate(ANIM_MODE_5, this); break; case 4: case 9: - scene->_object1.animate(ANIM_MODE_5, this); + scene->_veeshkaBody.animate(ANIM_MODE_5, this); break; case 5: - scene->_object2.setStrip(3); - scene->_object2.setFrame(1); - scene->_object2.setPosition(Common::Point(240, 51)); - scene->_object2.show(); + scene->_veeshkaHead.setStrip(3); + scene->_veeshkaHead.setFrame(1); + scene->_veeshkaHead.setPosition(Common::Point(240, 51)); + scene->_veeshkaHead.show(); - scene->_object3.setStrip(6); - scene->_object3.setFrame(1); - scene->_object3.setPosition(Common::Point(200, 76)); - scene->_object3._numFrames = 20; - scene->_object3.show(); + scene->_veeshkaRightArm.setStrip(6); + scene->_veeshkaRightArm.setFrame(1); + scene->_veeshkaRightArm.setPosition(Common::Point(200, 76)); + scene->_veeshkaRightArm._numFrames = 20; + scene->_veeshkaRightArm.show(); scene->_stripManager.start(12, this, scene); break; case 6: - scene->_object2.hide(); - scene->_object3.hide(); - scene->_object1.animate(ANIM_MODE_6, this); + scene->_veeshkaHead.hide(); + scene->_veeshkaRightArm.hide(); + scene->_veeshkaBody.animate(ANIM_MODE_6, this); break; case 7: - scene->_object3.show(); - scene->_object3.setStrip2(5); - scene->_object3._numFrames = 10; - scene->_object3.setPosition(Common::Point(180, 87)); - scene->_object3.setAction(&scene->_action2); + scene->_veeshkaRightArm.show(); + scene->_veeshkaRightArm.setStrip2(5); + scene->_veeshkaRightArm._numFrames = 10; + scene->_veeshkaRightArm.setPosition(Common::Point(180, 87)); + scene->_veeshkaRightArm.setAction(&scene->_action2); - scene->_object2.setStrip(4); - scene->_object2.setFrame(1); - scene->_object2.setPosition(Common::Point(204, 59)); - scene->_object2.show(); + scene->_veeshkaHead.setStrip(4); + scene->_veeshkaHead.setFrame(1); + scene->_veeshkaHead.setPosition(Common::Point(204, 59)); + scene->_veeshkaHead.show(); scene->_stripManager.start(13, this, scene); break; case 8: - scene->_object2.hide(); - scene->_object3.hide(); - scene->_object4.animate(ANIM_MODE_6, this); + scene->_veeshkaHead.hide(); + scene->_veeshkaRightArm.hide(); + scene->_centurion.animate(ANIM_MODE_6, this); break; case 10: g_globals->_soundHandler.fadeOut(this); @@ -109,6 +109,7 @@ void Scene10::Action1::signal() { } } +// Move Veeshka's fingers void Scene10::Action2::signal() { Scene10 *scene = (Scene10 *)g_globals->_sceneManager._scene; @@ -117,8 +118,8 @@ void Scene10::Action2::signal() { setDelay(g_globals->_randomSource.getRandomNumber(179)); break; case 1: - scene->_object3.setFrame(1); - scene->_object3.animate(ANIM_MODE_5, this); + scene->_veeshkaRightArm.setFrame(1); + scene->_veeshkaRightArm.animate(ANIM_MODE_5, this); _actionIndex = 0; break; } @@ -145,43 +146,43 @@ void Scene10::postInit(SceneObjectList *OwnerList) { _stripManager.setCallback(this); - _object1.postInit(); - _object1.setVisage(10); - _object1.setPosition(Common::Point(232, 90)); - _object1.fixPriority(1); - - _object2.postInit(); - _object2.setVisage(10); - _object2.setStrip(4); - _object2.setFrame(1); - _object2.setPosition(Common::Point(204, 59)); - _object2.fixPriority(198); - - _object3.postInit(); - _object3.setVisage(10); - _object3.setStrip2(5); - _object3.setPosition(Common::Point(180, 87)); - _object3.fixPriority(196); - _object3.setAction(&_action2); - - _object4.postInit(); - _object4.setVisage(10); - _object4.setStrip(2); - _object4.setPosition(Common::Point(0, 209)); - _object4.animate(ANIM_MODE_1, NULL); - - _object5.postInit(); - _object5.setVisage(11); - _object5.setPosition(Common::Point(107, 146)); - _object5.animate(ANIM_MODE_2, NULL); - _object5._numFrames = 5; - - _object6.postInit(); - _object6.setVisage(11); - _object6.setStrip(2); - _object6.setPosition(Common::Point(287, 149)); - _object6.animate(ANIM_MODE_2, NULL); - _object6._numFrames = 5; + _veeshkaBody.postInit(); + _veeshkaBody.setVisage(10); + _veeshkaBody.setPosition(Common::Point(232, 90)); + _veeshkaBody.fixPriority(1); + + _veeshkaHead.postInit(); + _veeshkaHead.setVisage(10); + _veeshkaHead.setStrip(4); + _veeshkaHead.setFrame(1); + _veeshkaHead.setPosition(Common::Point(204, 59)); + _veeshkaHead.fixPriority(198); + + _veeshkaRightArm.postInit(); + _veeshkaRightArm.setVisage(10); + _veeshkaRightArm.setStrip2(5); + _veeshkaRightArm.setPosition(Common::Point(180, 87)); + _veeshkaRightArm.fixPriority(196); + _veeshkaRightArm.setAction(&_action2); + + _centurion.postInit(); + _centurion.setVisage(10); + _centurion.setStrip(2); + _centurion.setPosition(Common::Point(0, 209)); + _centurion.animate(ANIM_MODE_1, NULL); + + _leftSmoke.postInit(); + _leftSmoke.setVisage(11); + _leftSmoke.setPosition(Common::Point(107, 146)); + _leftSmoke.animate(ANIM_MODE_2, NULL); + _leftSmoke._numFrames = 5; + + _rightSmoke.postInit(); + _rightSmoke.setVisage(11); + _rightSmoke.setStrip(2); + _rightSmoke.setPosition(Common::Point(287, 149)); + _rightSmoke.animate(ANIM_MODE_2, NULL); + _rightSmoke._numFrames = 5; g_globals->_sceneManager._scene->_sceneBounds.contain(g_globals->_sceneManager._scene->_backgroundBounds); g_globals->_sceneOffset.x = (g_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; @@ -193,14 +194,14 @@ void Scene10::postInit(SceneObjectList *OwnerList) { void Scene10::stripCallback(int v) { switch (v) { case 1: - _object2.animate(ANIM_MODE_7, -1, NULL); + _veeshkaHead.animate(ANIM_MODE_7, -1, NULL); break; case 2: - _object2.animate(ANIM_MODE_NONE); + _veeshkaHead.animate(ANIM_MODE_NONE); break; case 3: - _object2.animate(ANIM_MODE_7, -1, NULL); - _object3.animate(ANIM_MODE_5, NULL); + _veeshkaHead.animate(ANIM_MODE_7, -1, NULL); + _veeshkaRightArm.animate(ANIM_MODE_5, NULL); break; default: break; @@ -227,13 +228,13 @@ void Scene15::Action1::signal() { case 2: { SceneItem::display(15, 1, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 7, SET_WIDTH, 320, SET_KEEP_ONSCREEN, 1, LIST_END); - scene->_object1.postInit(); - scene->_object1.setVisage(15); - scene->_object1.setPosition(Common::Point(160, -10)); - scene->_object1.animate(ANIM_MODE_2, NULL); + scene->_ship.postInit(); + scene->_ship.setVisage(15); + scene->_ship.setPosition(Common::Point(160, -10)); + scene->_ship.animate(ANIM_MODE_2, NULL); Common::Point pt(160, 100); NpcMover *mover = new NpcMover(); - scene->_object1.addMover(mover, &pt, this); + scene->_ship.addMover(mover, &pt, this); scene->_soundHandler.play(7); break; } @@ -247,8 +248,8 @@ void Scene15::Action1::signal() { void Scene15::Action1::dispatch() { Scene15 *scene = (Scene15 *)g_globals->_sceneManager._scene; - if (scene->_object1._position.y < 100) - scene->_object1.changeZoom(100 - scene->_object1._position.y); + if (scene->_ship._position.y < 100) + scene->_ship.changeZoom(100 - scene->_ship._position.y); Action::dispatch(); } @@ -307,9 +308,9 @@ void Scene20::Action2::signal() { Common::Point pt(455, 77); g_globals->_player.addMover(mover, &pt, this); ObjectMover2 *mover2 = new ObjectMover2(); - scene->_SceneObjectExt.addMover(mover2, 5, 10, &g_globals->_player); + scene->_assassinShip1.addMover(mover2, 5, 10, &g_globals->_player); ObjectMover2 *mover3 = new ObjectMover2(); - scene->_sceneObject3.addMover(mover3, 10, 15, &g_globals->_player); + scene->_assassinShip2.addMover(mover3, 10, 15, &g_globals->_player); break; } case 3: { @@ -369,9 +370,9 @@ void Scene20::Action3::signal() { Common::Point pt(615, 81); g_globals->_player.addMover(npcMover, &pt, this); ObjectMover2 *mover1 = new ObjectMover2(); - scene->_SceneObjectExt.addMover(mover1, 5, 10, &g_globals->_player); + scene->_assassinShip1.addMover(mover1, 5, 10, &g_globals->_player); ObjectMover2 *mover2 = new ObjectMover2(); - scene->_sceneObject3.addMover(mover2, 20, 25, &g_globals->_player); + scene->_assassinShip2.addMover(mover2, 20, 25, &g_globals->_player); break; } case 2: { @@ -382,8 +383,8 @@ void Scene20::Action3::signal() { } case 3: { g_globals->_player._moveDiff = Common::Point(10, 10); - scene->_SceneObjectExt._moveDiff = Common::Point(10, 10); - scene->_sceneObject3._moveDiff = Common::Point(10, 10); + scene->_assassinShip1._moveDiff = Common::Point(10, 10); + scene->_assassinShip2._moveDiff = Common::Point(10, 10); npcMover = new NpcMover(); Common::Point pt(445, 132); g_globals->_player.addMover(npcMover, &pt, this); @@ -427,73 +428,73 @@ void Scene20::Action4::signal() { Common::Point pt(486, 134); g_globals->_player.addMover(npcMover, &pt, this); ObjectMover2 *mover1 = new ObjectMover2(); - scene->_SceneObjectExt.addMover(mover1, 20, 35, &g_globals->_player); + scene->_assassinShip1.addMover(mover1, 20, 35, &g_globals->_player); break; } case 2: { g_globals->_player._moveDiff = Common::Point(12, 12); - scene->_SceneObjectExt._moveDiff = Common::Point(12, 12); + scene->_assassinShip1._moveDiff = Common::Point(12, 12); NpcMover *mover1 = new NpcMover(); Common::Point pt(486, 134); - scene->_sceneObject3.addMover(mover1, &pt, this); + scene->_assassinShip2.addMover(mover1, &pt, this); NpcMover *mover2 = new NpcMover(); pt = Common::Point(-15, 134); g_globals->_player.addMover(mover2, &pt, NULL); NpcMover *mover3 = new NpcMover(); pt = Common::Point(-15, 134); - scene->_SceneObjectExt.addMover(mover3, &pt, NULL); + scene->_assassinShip1.addMover(mover3, &pt, NULL); break; } case 3: { - scene->_sceneObject3._moveDiff = Common::Point(20, 20); + scene->_assassinShip2._moveDiff = Common::Point(20, 20); npcMover = new NpcMover(); Common::Point pt(320, 134); - scene->_sceneObject3.addMover(npcMover, &pt, this); + scene->_assassinShip2.addMover(npcMover, &pt, this); break; } case 4: { scene->_sound.play(28); - scene->_sceneObject4.postInit(); - scene->_sceneObject4.setVisage(21); - scene->_sceneObject4.setStrip(3); - scene->_sceneObject4.setPosition(Common::Point(scene->_sceneObject3._position.x - 36, - scene->_sceneObject3._position.y - 1)); - scene->_sceneObject4._moveDiff.x = 48; + scene->_laserShot1.postInit(); + scene->_laserShot1.setVisage(21); + scene->_laserShot1.setStrip(3); + Common::Point pt = Common::Point(scene->_assassinShip2._position.x - 36, scene->_assassinShip2._position.y - 1); + scene->_laserShot1.setPosition(pt); + scene->_laserShot1._moveDiff.x = 48; ObjectMover3 *mover = new ObjectMover3(); - scene->_sceneObject4.addMover(mover, &scene->_SceneObjectExt, 4, this); + scene->_laserShot1.addMover(mover, &scene->_assassinShip1, 4, this); break; } case 5: { scene->_sound.play(42); - scene->_sceneObject4.remove(); - scene->_SceneObjectExt.setVisage(21); - scene->_SceneObjectExt.setStrip(1); - scene->_SceneObjectExt.setFrame(1); - scene->_SceneObjectExt.animate(ANIM_MODE_5, NULL); + scene->_laserShot1.remove(); + scene->_assassinShip1.setVisage(21); + scene->_assassinShip1.setStrip(1); + scene->_assassinShip1.setFrame(1); + scene->_assassinShip1.animate(ANIM_MODE_5, NULL); - scene->_SceneObjectExt._moveDiff.x = 4; + scene->_assassinShip1._moveDiff.x = 4; NpcMover *mover1 = new NpcMover(); - Common::Point pt(scene->_SceneObjectExt._position.x - 12, scene->_SceneObjectExt._position.y + 5); - scene->_SceneObjectExt.addMover(mover1, &pt, NULL); + Common::Point pt(scene->_assassinShip1._position.x - 12, scene->_assassinShip1._position.y + 5); + scene->_assassinShip1.addMover(mover1, &pt, NULL); - scene->_sceneObject5.postInit(); - scene->_sceneObject5.setVisage(21); - scene->_sceneObject5.setStrip(3); - scene->_sceneObject5.setPosition(Common::Point(scene->_sceneObject3._position.x - 36, - scene->_sceneObject3._position.y - 1)); - scene->_sceneObject5._moveDiff.x = 48; + scene->_laserShot2.postInit(); + scene->_laserShot2.setVisage(21); + scene->_laserShot2.setStrip(3); + pt = Common::Point(scene->_assassinShip2._position.x - 36, scene->_assassinShip2._position.y - 1); + scene->_laserShot2.setPosition(pt); + scene->_laserShot2._moveDiff.x = 48; ObjectMover3 *mover = new ObjectMover3(); - scene->_sceneObject5.addMover(mover, &g_globals->_player, 4, this); + scene->_laserShot2.addMover(mover, &g_globals->_player, 4, this); break; } case 6: { scene->_sound.play(42); - scene->_SceneObjectExt.setStrip(2); - scene->_SceneObjectExt.animate(ANIM_MODE_2, NULL); + scene->_assassinShip1.setStrip(2); + scene->_assassinShip1.animate(ANIM_MODE_2, NULL); - scene->_sceneObject5.remove(); + scene->_laserShot2.remove(); g_globals->_player.setVisage(21); g_globals->_player.setStrip(1); g_globals->_player.setFrame(1); @@ -539,18 +540,18 @@ void Scene20::postInit(SceneObjectList *OwnerList) { g_globals->_player._moveDiff = Common::Point(10, 10); g_globals->_player.animate(ANIM_MODE_1, NULL); - _SceneObjectExt.postInit(); - _SceneObjectExt.setVisage(20); - _SceneObjectExt.setPosition(Common::Point(400, 69)); - _SceneObjectExt.animate(ANIM_MODE_1, NULL); + _assassinShip1.postInit(); + _assassinShip1.setVisage(20); + _assassinShip1.setPosition(Common::Point(400, 69)); + _assassinShip1.animate(ANIM_MODE_1, NULL); - _sceneObject3.postInit(); - _sceneObject3.setVisage(20); - _sceneObject3.setPosition(Common::Point(395, 69)); - _sceneObject3.animate(ANIM_MODE_1, NULL); + _assassinShip2.postInit(); + _assassinShip2.setVisage(20); + _assassinShip2.setPosition(Common::Point(395, 69)); + _assassinShip2.animate(ANIM_MODE_1, NULL); - _SceneObjectExt._moveDiff = Common::Point(10, 10); - _sceneObject3._moveDiff = Common::Point(10, 10); + _assassinShip1._moveDiff = Common::Point(10, 10); + _assassinShip2._moveDiff = Common::Point(10, 10); g_globals->_soundHandler.play(20); _sound.play(21); _sound.holdAt(true); @@ -567,16 +568,16 @@ void Scene20::postInit(SceneObjectList *OwnerList) { g_globals->_player.fixPriority(50); g_globals->_player.animate(ANIM_MODE_1, NULL); - _SceneObjectExt.postInit(); - _SceneObjectExt.setVisage(20); - _SceneObjectExt.setPosition(Common::Point(583, 79)); - _SceneObjectExt.animate(ANIM_MODE_1, NULL); + _assassinShip1.postInit(); + _assassinShip1.setVisage(20); + _assassinShip1.setPosition(Common::Point(583, 79)); + _assassinShip1.animate(ANIM_MODE_1, NULL); - _sceneObject3.postInit(); - _sceneObject3.setVisage(20); - _sceneObject3.setStrip2(2); - _sceneObject3.setPosition(Common::Point(595, 79)); - _sceneObject3.animate(ANIM_MODE_1, NULL); + _assassinShip2.postInit(); + _assassinShip2.setVisage(20); + _assassinShip2.setStrip2(2); + _assassinShip2.setPosition(Common::Point(595, 79)); + _assassinShip2.animate(ANIM_MODE_1, NULL); if ((g_globals->getFlag(120) && g_globals->getFlag(116)) || (g_globals->getFlag(117) && g_globals->getFlag(119))) { @@ -584,10 +585,10 @@ void Scene20::postInit(SceneObjectList *OwnerList) { setAction(&_action3); } else if (g_globals->getFlag(104)) { _sceneMode = 21; - setAction(&_sequenceManager, this, 21, &g_globals->_player, &_SceneObjectExt, NULL); + setAction(&_sequenceManager, this, 21, &g_globals->_player, &_assassinShip1, NULL); } else { // Failed evasion - _sceneObject3._moveDiff = Common::Point(8, 8); + _assassinShip2._moveDiff = Common::Point(8, 8); setAction(&_action4); } _sceneBounds.center(g_globals->_player._position.x, g_globals->_player._position.y); @@ -626,26 +627,37 @@ void Scene20::signal() { *--------------------------------------------------------------------------*/ void Scene30::BeamObject::doAction(int action) { - if (action == OBJECT_SCANNER) + switch (action) { + case OBJECT_SCANNER: display2(30, 14); - else if (action == CURSOR_LOOK) + break; + case CURSOR_LOOK: display2(30, 2); - else if (action == CURSOR_USE) { + break; + case CURSOR_USE: { Scene30 *parent = (Scene30 *)g_globals->_sceneManager._scene; parent->setAction(&parent->_beamAction); - } else + } + break; + default: SceneObject::doAction(action); + } } void Scene30::DoorObject::doAction(int action) { - if (action == OBJECT_SCANNER) + switch (action) { + case OBJECT_SCANNER: display2(30, 13); - else if (action == CURSOR_LOOK) + break; + case CURSOR_LOOK: display2(30, 1); - else if (action == CURSOR_USE) + break; + case CURSOR_USE: display2(30, 7); - else + break; + default: SceneObject::doAction(action); + } } void Scene30::BeamAction::signal() { @@ -963,16 +975,16 @@ void Scene40::Action1::signal() { scene->_doorway.hide(); scene->_dyingKzin.setPosition(Common::Point(296, 62)); g_globals->_player.animate(ANIM_MODE_5, NULL); - scene->_object1.setVisage(43); - scene->_object1.setStrip(3); - scene->_object1.animate(ANIM_MODE_5, NULL); - scene->_object2.hide(); - scene->_object3.hide(); + scene->_seeker.setVisage(43); + scene->_seeker.setStrip(3); + scene->_seeker.animate(ANIM_MODE_5, NULL); + scene->_seekerTail.hide(); + scene->_seekerHand.hide(); scene->_stripManager.start(45, this); break; case 4: - scene->_object2.remove(); - scene->_object3.remove(); + scene->_seekerTail.remove(); + scene->_seekerHand.remove(); scene->_assassin.setVisage(42); scene->_assassin.setStrip(2); scene->_assassin.setFrame(1); @@ -1049,10 +1061,10 @@ void Scene40::Action1::signal() { break; case 15: g_globals->_player.disableControl(); - scene->_object1.setVisage(40); - scene->_object1.setStrip(4); - scene->_object1.setFrame(1); - scene->_object1.animate(ANIM_MODE_5, NULL); + scene->_seeker.setVisage(40); + scene->_seeker.setStrip(4); + scene->_seeker.setFrame(1); + scene->_seeker.animate(ANIM_MODE_5, NULL); g_globals->_player.setVisage(40); g_globals->_player.setStrip(2); g_globals->_player.setFrame(1); @@ -1122,13 +1134,13 @@ void Scene40::Action2::signal() { } case 6: { g_globals->_player.setStrip(7); - scene->_object1.setVisage(2806); - scene->_object1.animate(ANIM_MODE_1, NULL); + scene->_seeker.setVisage(2806); + scene->_seeker.animate(ANIM_MODE_1, NULL); SceneObjectWrapper *wrapper = new SceneObjectWrapper(); - scene->_object1.setObjectWrapper(wrapper); + scene->_seeker.setObjectWrapper(wrapper); Common::Point pt(200, 190); NpcMover *mover = new NpcMover(); - scene->_object1.addMover(mover, &pt, this); + scene->_seeker.addMover(mover, &pt, this); break; } case 7: @@ -1137,12 +1149,12 @@ void Scene40::Action2::signal() { case 8: { Common::Point pt(170, 260); NpcMover *mover = new NpcMover(); - scene->_object1.addMover(mover, &pt, this); + scene->_seeker.addMover(mover, &pt, this); break; } case 9: scene->_dyingKzin.setAction(&scene->_action7); - scene->_object1.remove(); + scene->_seeker.remove(); g_globals->_stripNum = 88; g_globals->_events.setCursor(CURSOR_WALK); g_globals->_player.enableControl(); @@ -1202,6 +1214,7 @@ void Scene40::Action4::signal() { } } +// Animate the tail of Seeker, with random pauses void Scene40::Action5::signal() { Scene40 *scene = (Scene40 *)g_globals->_sceneManager._scene; @@ -1210,7 +1223,7 @@ void Scene40::Action5::signal() { setDelay(g_globals->_randomSource.getRandomNumber(119) + 120); break; case 1: - scene->_object2.animate(ANIM_MODE_8, 1, this); + scene->_seekerTail.animate(ANIM_MODE_8, 1, this); _actionIndex = 0; } } @@ -1220,17 +1233,17 @@ void Scene40::Action6::signal() { switch (_actionIndex++) { case 0: { - scene->_object1.postInit(); - scene->_object1.setVisage(16); - scene->_object1.setStrip2(6); - scene->_object1._moveDiff = Common::Point(40, 40); - scene->_object1.setPosition(Common::Point(313, 53)); - scene->_object1._moveRate = 60; + scene->_seeker.postInit(); + scene->_seeker.setVisage(16); + scene->_seeker.setStrip2(6); + scene->_seeker._moveDiff = Common::Point(40, 40); + scene->_seeker.setPosition(Common::Point(313, 53)); + scene->_seeker._moveRate = 60; Common::Point pt(141, 194); NpcMover *mover = new NpcMover(); - scene->_object1.addMover(mover, &pt, NULL); - scene->_object1.animate(ANIM_MODE_5, NULL); + scene->_seeker.addMover(mover, &pt, NULL); + scene->_seeker.animate(ANIM_MODE_5, NULL); scene->_doorway.postInit(); scene->_doorway.setVisage(46); @@ -1260,21 +1273,21 @@ void Scene40::Action7::signal() { setDelay(g_globals->_randomSource.getRandomNumber(499) + 500); break; case 1: - scene->_object7.postInit(); - scene->_object7.setVisage(46); + scene->_leftEntrance.postInit(); + scene->_leftEntrance.setVisage(46); if (g_globals->_randomSource.getRandomNumber(32767) >= 16384) { - scene->_object7.setStrip(3); - scene->_object7.setPosition(Common::Point(15, 185)); + scene->_leftEntrance.setStrip(3); + scene->_leftEntrance.setPosition(Common::Point(15, 185)); } else { - scene->_object7.setPosition(Common::Point(305, 61)); - scene->_object7.setFrame(15); + scene->_leftEntrance.setPosition(Common::Point(305, 61)); + scene->_leftEntrance.setFrame(15); } - scene->_object7.animate(ANIM_MODE_5, this); + scene->_leftEntrance.animate(ANIM_MODE_5, this); scene->_soundHandler.play(25); break; case 2: - scene->_object7.remove(); + scene->_leftEntrance.remove(); _actionIndex = 0; setDelay(60); break; @@ -1465,12 +1478,12 @@ void Scene40::Item6::doAction(int action) { /*--------------------------------------------------------------------------*/ Scene40::Scene40() : - _item1(2, OBJECT_SCANNER, 40, 24, OBJECT_STUNNER, 40, 25, CURSOR_LOOK, 40, 7, CURSOR_USE, 40, 16, LIST_END), - _item3(5, OBJECT_SCANNER, 40, 28, OBJECT_STUNNER, 40, 27, CURSOR_LOOK, 40, 2, CURSOR_USE, 40, 30, LIST_END), - _item4(6, OBJECT_SCANNER, 40, 31, OBJECT_STUNNER, 40, 32, CURSOR_LOOK, 40, 5, CURSOR_USE, 40, 33, LIST_END), - _item5(0, CURSOR_LOOK, 40, 11, LIST_END), - _item7(4, OBJECT_SCANNER, 40, 26, OBJECT_STUNNER, 40, 27, CURSOR_LOOK, 40, 9, CURSOR_USE, 40, 17, LIST_END), - _item8(8, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_LOOK, 40, 3, CURSOR_USE, 40, 41, LIST_END) { + _ball(2, OBJECT_SCANNER, 40, 24, OBJECT_STUNNER, 40, 25, CURSOR_LOOK, 40, 7, CURSOR_USE, 40, 16, LIST_END), + _window(5, OBJECT_SCANNER, 40, 28, OBJECT_STUNNER, 40, 27, CURSOR_LOOK, 40, 2, CURSOR_USE, 40, 30, LIST_END), + _entrance(6, OBJECT_SCANNER, 40, 31, OBJECT_STUNNER, 40, 32, CURSOR_LOOK, 40, 5, CURSOR_USE, 40, 33, LIST_END), + _background(0, CURSOR_LOOK, 40, 11, LIST_END), + _emerald(4, OBJECT_SCANNER, 40, 26, OBJECT_STUNNER, 40, 27, CURSOR_LOOK, 40, 9, CURSOR_USE, 40, 17, LIST_END), + _tree(8, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_LOOK, 40, 3, CURSOR_USE, 40, 41, LIST_END) { } void Scene40::postInit(SceneObjectList *OwnerList) { @@ -1489,7 +1502,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) { _speakerGameText._color1 = 9; _speakerGameText.setTextPos(Common::Point(160, 30)); _speakerQText._npc = &g_globals->_player; - _speakerSText._npc = &_object1; + _speakerSText._npc = &_seeker; g_globals->_player.postInit(); g_globals->_player.setVisage(0); @@ -1502,23 +1515,24 @@ void Scene40::postInit(SceneObjectList *OwnerList) { g_globals->_soundHandler.play(24); g_globals->_player.setVisage(43); - _object1.postInit(); - _object1.setVisage(41); - _object1.setPosition(Common::Point(105, 220)); - _object2.postInit(); - _object2.setVisage(41); - _object2.setStrip(6); - _object2.fixPriority(200); - _object2.setPosition(Common::Point(94, 189)); - _object2.setAction(&_action5); - - _object3.postInit(); - _object3.setVisage(41); - _object3.setStrip(5); - _object3.fixPriority(205); - _object3.setPosition(Common::Point(110, 186)); - _object3._numFrames = 2; - _object3.animate(ANIM_MODE_8, NULL, NULL); + _seeker.postInit(); + _seeker.setVisage(41); + _seeker.setPosition(Common::Point(105, 220)); + + _seekerTail.postInit(); + _seekerTail.setVisage(41); + _seekerTail.setStrip(6); + _seekerTail.fixPriority(200); + _seekerTail.setPosition(Common::Point(94, 189)); + _seekerTail.setAction(&_action5); + + _seekerHand.postInit(); + _seekerHand.setVisage(41); + _seekerHand.setStrip(5); + _seekerHand.fixPriority(205); + _seekerHand.setPosition(Common::Point(110, 186)); + _seekerHand._numFrames = 2; + _seekerHand.animate(ANIM_MODE_8, NULL, NULL); _assassin.postInit(); _assassin.setPosition(Common::Point(-40, 191)); @@ -1563,12 +1577,12 @@ void Scene40::postInit(SceneObjectList *OwnerList) { setAction(&_action4); } - _item5.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); - _item6._sceneRegionId = 3; - _item2._sceneRegionId = 7; + _background.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); + _pedestal._sceneRegionId = 3; + _statue._sceneRegionId = 7; - g_globals->_sceneItems.addItems(&_dyingKzin, &_item8, &_item1, &_item2, &_item3, &_item4, - &_item6, &_item7, &_item5, NULL); + g_globals->_sceneItems.addItems(&_dyingKzin, &_tree, &_ball, &_statue, &_window, &_entrance, + &_pedestal, &_emerald, &_background, NULL); } void Scene40::signal() { @@ -1609,7 +1623,7 @@ void Scene50::Action1::signal() { scene->_stripManager.start(63, this); break; case 2: - if (scene->_stripManager._field2E8 != 107) { + if (scene->_stripManager._currObj44Id != 107) { g_globals->_player.enableControl(); remove(); } else { @@ -1691,7 +1705,7 @@ void Scene50::Object1::doAction(int action) { } } -void Scene50::Object2::doAction(int action) { +void Scene50::LeftFlyCycle::doAction(int action) { Scene50 *scene = (Scene50 *)g_globals->_sceneManager._scene; switch (action) { @@ -1715,7 +1729,7 @@ void Scene50::Object2::doAction(int action) { } } -void Scene50::Object3::doAction(int action) { +void Scene50::CenterFlyCycle::doAction(int action) { Scene50 *scene = (Scene50 *)g_globals->_sceneManager._scene; switch (action) { @@ -1743,7 +1757,7 @@ void Scene50::Object3::doAction(int action) { } } -void Scene50::Object4::doAction(int action) { +void Scene50::RightFlyCycle::doAction(int action) { Scene50 *scene = (Scene50 *)g_globals->_sceneManager._scene; switch (action) { @@ -1772,12 +1786,13 @@ void Scene50::Object4::doAction(int action) { /*--------------------------------------------------------------------------*/ Scene50::Scene50() : - _item0(0, CURSOR_LOOK, 50, 3, LIST_END), + _background(0, CURSOR_LOOK, 50, 3, LIST_END), _item1(0, OBJECT_SCANNER, 50, 15, CURSOR_USE, 50, 16, CURSOR_LOOK, 50, 3, LIST_END), - _item2(0, CURSOR_LOOK, 50, 7, LIST_END), - _item3(8, OBJECT_STUNNER, 50, 14, OBJECT_SCANNER, 50, 13, CURSOR_LOOK, 50, 3, LIST_END), - _item4(9, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_USE, 40, 41, CURSOR_LOOK, 50, 5, LIST_END), - _item5(10, OBJECT_SCANNER, 50, 17, OBJECT_STUNNER, 50, 18, CURSOR_LOOK, 50, 6, CURSOR_USE, 30, 8, LIST_END) { + _entrance(0, CURSOR_LOOK, 50, 7, LIST_END), + // The original was using dialog 50/3 for CURSOR_LOOK, which is too generic. + _bulwark(8, OBJECT_STUNNER, 50, 14, OBJECT_SCANNER, 50, 13, CURSOR_LOOK, 30, 0, LIST_END), + _tree(9, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_USE, 40, 41, CURSOR_LOOK, 50, 5, LIST_END), + _flagstones(10, OBJECT_SCANNER, 50, 17, OBJECT_STUNNER, 50, 18, CURSOR_LOOK, 50, 6, CURSOR_USE, 30, 8, LIST_END) { _doorwayRect = Rect(80, 108, 160, 112); } @@ -1806,25 +1821,25 @@ void Scene50::postInit(SceneObjectList *OwnerList) { g_globals->_player.setPosition(Common::Point(270, 143)); } - _object2.postInit(); - _object2.setVisage(2331); - _object2.setStrip(6); - _object2.setPosition(Common::Point(136, 192)); - _object2.fixPriority(200); + _leftFlyCycle.postInit(); + _leftFlyCycle.setVisage(2331); + _leftFlyCycle.setStrip(6); + _leftFlyCycle.setPosition(Common::Point(136, 192)); + _leftFlyCycle.fixPriority(200); - _object3.postInit(); - _object3.setVisage(2337); - _object3.setStrip(6); - _object3.setPosition(Common::Point(260, 180)); - _object3.fixPriority(200); + _centerFlyCycle.postInit(); + _centerFlyCycle.setVisage(2337); + _centerFlyCycle.setStrip(6); + _centerFlyCycle.setPosition(Common::Point(260, 180)); + _centerFlyCycle.fixPriority(200); - _object4.postInit(); - _object4.setVisage(2331); - _object4.setStrip(6); - _object4.setPosition(Common::Point(295, 144)); - _object4.fixPriority(178); + _rightFlyCycle.postInit(); + _rightFlyCycle.setVisage(2331); + _rightFlyCycle.setStrip(6); + _rightFlyCycle.setPosition(Common::Point(295, 144)); + _rightFlyCycle.fixPriority(178); - g_globals->_sceneItems.addItems(&_object2, &_object3, &_object4, NULL); + g_globals->_sceneItems.addItems(&_leftFlyCycle, &_centerFlyCycle, &_rightFlyCycle, NULL); if (!g_globals->getFlag(101)) { g_globals->_player.disableControl(); @@ -1840,8 +1855,8 @@ void Scene50::postInit(SceneObjectList *OwnerList) { } } - _item0.setBounds(Rect(200, 0, 320, 200)); - g_globals->_sceneItems.addItems(&_item3, &_item4, &_item5, &_item0, NULL); + _background.setBounds(Rect(0, 0, 320, 200)); + g_globals->_sceneItems.addItems(&_bulwark, &_tree, &_flagstones, &_background, NULL); } void Scene50::signal() { @@ -1928,8 +1943,8 @@ void Scene60::Action1::signal() { scene->_controlButton.remove(); scene->_slaveButton.remove(); scene->_masterButton.remove(); - scene->_item1.remove(); - scene->_item2.remove(); + scene->_diskDrive.remove(); + scene->_dashboard.remove(); scene->_nextButton.postInit(); scene->_nextButton.setVisage(65); @@ -2030,11 +2045,11 @@ void Scene60::Action2::signal() { /*--------------------------------------------------------------------------*/ void Scene60::PrevObject::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 16); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + animate(ANIM_MODE_8, 1, NULL); if (scene->_action1.getActionIndex() > 5) { @@ -2048,11 +2063,11 @@ void Scene60::PrevObject::doAction(int action) { } void Scene60::NextObject::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 17); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + animate(ANIM_MODE_8, 1, NULL); if (scene->_action1.getActionIndex() < 8) { @@ -2065,11 +2080,11 @@ void Scene60::NextObject::doAction(int action) { } void Scene60::ExitObject::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 18); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + scene->_soundHandler3.play(36); animate(ANIM_MODE_8, 1, NULL); scene->_nextButton.remove(); @@ -2111,11 +2126,11 @@ void Scene60::ExitObject::doAction(int action) { if (scene->_masterButton._state) scene->_masterButton.setFrame(2); - g_globals->_sceneItems.push_front(&scene->_item1); + g_globals->_sceneItems.push_front(&scene->_diskDrive); g_globals->_sceneItems.push_front(&scene->_controlButton); g_globals->_sceneItems.push_front(&scene->_slaveButton); g_globals->_sceneItems.push_front(&scene->_masterButton); - g_globals->_sceneItems.push_back(&scene->_item2); + g_globals->_sceneItems.push_back(&scene->_dashboard); g_globals->gfxManager()._font.setFontNumber(2); g_globals->_sceneText._fontNumber = 2; @@ -2130,11 +2145,11 @@ void Scene60::ExitObject::doAction(int action) { } void Scene60::MessageObject::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 9); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + scene->_action1.setDelay(1); g_globals->setFlag(83); } else { @@ -2143,11 +2158,11 @@ void Scene60::MessageObject::doAction(int action) { } void Scene60::ControlObject::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 11); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + if (_animateMode == ANIM_MODE_NONE) SceneItem::display2(60, 14); else if (!scene->_slaveButton._state) { @@ -2164,11 +2179,11 @@ void Scene60::ControlObject::doAction(int action) { } void Scene60::SlaveObject::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 8); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + if (scene->_masterButton._state) scene->_sceneMode = 19; else if (_state) { @@ -2194,11 +2209,11 @@ void Scene60::SlaveObject::doAction(int action) { } void Scene60::MasterObject::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 7); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + if (!scene->_controlButton._animateMode) scene->_sceneMode = 14; else if (scene->_slaveButton._state) @@ -2226,11 +2241,11 @@ void Scene60::MasterObject::doAction(int action) { } void Scene60::FloppyDrive::doAction(int action) { - Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; - if (action == CURSOR_LOOK) { SceneItem::display2(60, 13); } else if (action == CURSOR_USE) { + Scene60 *scene = (Scene60 *)g_globals->_sceneManager._scene; + g_globals->setFlag(!g_globals->_stripNum ? 118 : 121); scene->setAction(&scene->_action1); } else { @@ -2300,11 +2315,11 @@ void Scene60::Item::doAction(int action) { /*--------------------------------------------------------------------------*/ Scene60::Scene60() : - _item2(0, 12, 12), - _item3(8, 22, 23), - _item4(9, 24, 25), - _item5(10, 26, 27), - _item6(11, 28, 29) { + _dashboard(0, 12, 12), + _intercomm(8, 22, 23), + _viewScreen(9, 24, 25), + _speedControl(10, 26, 27), + _speaker(11, 28, 29) { } void Scene60::postInit(SceneObjectList *OwnerList) { @@ -2345,8 +2360,8 @@ void Scene60::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager, this, 61, NULL); } - _item1.setBounds(Rect(130, 55, 174, 70)); - _item2.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); + _diskDrive.setBounds(Rect(130, 55, 174, 70)); + _dashboard.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); if (g_globals->_stripNum == 0) { if (g_globals->getFlag(117)) { @@ -2419,8 +2434,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) { } } - g_globals->_sceneItems.addItems(&_item3, &_item4, &_item5, &_item6, - &_item1, &_item2, NULL); + g_globals->_sceneItems.addItems(&_intercomm, &_viewScreen, &_speedControl, &_speaker, &_diskDrive, &_dashboard, NULL); } void Scene60::signal() { @@ -2474,17 +2488,17 @@ void Scene90::Action1::signal() { case 3: { Common::Point pt(278, 191); NpcMover *mover = new NpcMover(); - scene->_object2.addMover(mover, &pt, this); + scene->_guard.addMover(mover, &pt, this); break; } case 4: - scene->_object2.setStrip(3); + scene->_guard.setStrip(3); setDelay(2); break; case 5: scene->_soundHandler2.play(58); - if (scene->_stripManager._field2E8 == 220) + if (scene->_stripManager._currObj44Id == 220) scene->_stripManager.start(91, this, scene); else { scene->_stripManager.start(g_globals->getFlag(104) ? 93 : 92, this, scene); @@ -2492,36 +2506,36 @@ void Scene90::Action1::signal() { } break; case 6: - scene->_object2.animate(ANIM_MODE_NONE); + scene->_guard.animate(ANIM_MODE_NONE); g_globals->_player._uiEnabled = true; break; case 7: - scene->_object2.animate(ANIM_MODE_NONE); + scene->_guard.animate(ANIM_MODE_NONE); g_globals->_soundHandler.play(56); - scene->_object3.animate(ANIM_MODE_5, this); + scene->_headGate.animate(ANIM_MODE_5, this); break; case 8: { Common::Point pt(215, 127); PlayerMover *mover = new PlayerMover(); - scene->_object5.addMover(mover, &pt, this); + scene->_quinnShip.addMover(mover, &pt, this); break; } case 9: { Common::Point pt1(215, 127); PlayerMover *mover1 = new PlayerMover(); - scene->_object1.addMover(mover1, &pt1, this); + scene->_seekerShip.addMover(mover1, &pt1, this); Common::Point pt2(86, 62); PlayerMover *mover2 = new PlayerMover(); - scene->_object5.addMover(mover2, &pt2, this); + scene->_quinnShip.addMover(mover2, &pt2, this); break; } case 10: { PlayerMover2 *mover = new PlayerMover2(); - scene->_object1.addMover(mover, 10, 15, &scene->_object5); + scene->_seekerShip.addMover(mover, 10, 15, &scene->_quinnShip); if (!g_globals->getFlag(104)) { mover = new PlayerMover2(); - scene->_object4.addMover(mover, 10, 15, &scene->_object1); + scene->_emptyShip.addMover(mover, 10, 15, &scene->_seekerShip); } setDelay(60); break; @@ -2529,7 +2543,7 @@ void Scene90::Action1::signal() { case 11: g_globals->_soundHandler.play(57); g_globals->_soundHandler.play(68); - scene->_object3.animate(ANIM_MODE_6, NULL); + scene->_headGate.animate(ANIM_MODE_6, NULL); SceneItem::display(90, g_globals->getFlag(104) ? 15 : 14, SET_EXT_BGCOLOR, 13, SET_KEEP_ONSCREEN, -1, SET_X, 120, SET_Y, 20, LIST_END); @@ -2544,7 +2558,7 @@ void Scene90::Action1::signal() { /*--------------------------------------------------------------------------*/ -void Scene90::Object1::doAction(int action) { +void Scene90::SeekerShip::doAction(int action) { Scene90 *scene = (Scene90 *)g_globals->_sceneManager._scene; switch (action) { @@ -2562,23 +2576,23 @@ void Scene90::Object1::doAction(int action) { } } -void Scene90::Object2::doAction(int action) { +void Scene90::Guard::doAction(int action) { Scene90 *scene = (Scene90 *)g_globals->_sceneManager._scene; switch (action) { case OBJECT_STUNNER: case CURSOR_USE: g_globals->_player.disableControl(); - scene->_object6.postInit(); - scene->_object6.setVisage(90); - scene->_object6.setStrip(6); - scene->_object6.setPosition(Common::Point(184, 210)); - scene->_object6.hide(); + scene->_bubble.postInit(); + scene->_bubble.setVisage(90); + scene->_bubble.setStrip(6); + scene->_bubble.setPosition(Common::Point(184, 210)); + scene->_bubble.hide(); scene->_sceneMode = 91; scene->_soundHandler1.play(59); scene->_soundHandler1.holdAt(true); - scene->setAction(&scene->_sequenceManager, scene, 91, this, &scene->_object6, NULL); + scene->setAction(&scene->_sequenceManager, scene, 91, this, &scene->_bubble, NULL); break; case CURSOR_LOOK: SceneItem::display2(90, 8); @@ -2596,21 +2610,21 @@ void Scene90::Object2::doAction(int action) { /*--------------------------------------------------------------------------*/ Scene90::Scene90() : - _item1(0, CURSOR_LOOK, 90, 9, LIST_END), - _item2(0, CURSOR_LOOK, 90, 10, LIST_END), - _item3(0, CURSOR_LOOK, 90, 11, LIST_END), - _object3(OBJECT_STUNNER, 90, 13, CURSOR_LOOK, 90, 12, CURSOR_USE, 90, 16, LIST_END), - _object4(CURSOR_LOOK, 90, 17, LIST_END), - _object5(CURSOR_LOOK, 90, 18, CURSOR_USE, 90, 19, LIST_END) { + _guardShack(0, CURSOR_LOOK, 90, 9, LIST_END), + _shed(0, CURSOR_LOOK, 90, 10, LIST_END), + _background(0, CURSOR_LOOK, 90, 11, LIST_END), + _headGate(OBJECT_STUNNER, 90, 13, CURSOR_LOOK, 90, 12, CURSOR_USE, 90, 16, LIST_END), + _emptyShip(CURSOR_LOOK, 90, 17, LIST_END), + _quinnShip(CURSOR_LOOK, 90, 18, CURSOR_USE, 90, 19, LIST_END) { } void Scene90::stripCallback(int v) { Scene90 *scene = (Scene90 *)g_globals->_sceneManager._scene; if (v == 1) - scene->_object2.animate(ANIM_MODE_7, 0, NULL); + scene->_guard.animate(ANIM_MODE_7, 0, NULL); else if (v == 2) - scene->_object2.animate(ANIM_MODE_NONE); + scene->_guard.animate(ANIM_MODE_NONE); } void Scene90::postInit(SceneObjectList *OwnerList) { @@ -2624,53 +2638,53 @@ void Scene90::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_speakerQL); _stripManager.addSpeaker(&_speakerSR); - _speakerMText._npc = &_object2; + _speakerMText._npc = &_guard; _speakerQText._textWidth = 160; - _speakerQText._npc = &_object5; - _speakerSText._npc = &_object1; - - _object5.postInit(); - _object5.setVisage(2333); - _object5.setObjectWrapper(new SceneObjectWrapper()); - _object5._strip = 7; - _object5._moveDiff = Common::Point(22, 22); - _object5.setPosition(Common::Point(151, 177)); - _object5.changeZoom(-1); - g_globals->_sceneItems.push_back(&_object5); - - _object1.postInit(); - _object1.setVisage(2337); - _object1.setObjectWrapper(new SceneObjectWrapper()); - _object1._strip = 4; - _object1._moveDiff = Common::Point(20, 20); - _object1.setPosition(Common::Point(212, 183)); - _object1.changeZoom(-1); - g_globals->_sceneItems.push_back(&_object1); + _speakerQText._npc = &_quinnShip; + _speakerSText._npc = &_seekerShip; + + _quinnShip.postInit(); + _quinnShip.setVisage(2333); + _quinnShip.setObjectWrapper(new SceneObjectWrapper()); + _quinnShip._strip = 7; + _quinnShip._moveDiff = Common::Point(22, 22); + _quinnShip.setPosition(Common::Point(151, 177)); + _quinnShip.changeZoom(-1); + g_globals->_sceneItems.push_back(&_quinnShip); + + _seekerShip.postInit(); + _seekerShip.setVisage(2337); + _seekerShip.setObjectWrapper(new SceneObjectWrapper()); + _seekerShip._strip = 4; + _seekerShip._moveDiff = Common::Point(20, 20); + _seekerShip.setPosition(Common::Point(212, 183)); + _seekerShip.changeZoom(-1); + g_globals->_sceneItems.push_back(&_seekerShip); if (!g_globals->getFlag(104)) { - _object4.postInit(); - _object4.setVisage(2331); - _object4.setObjectWrapper(new SceneObjectWrapper()); - _object4._strip = 4; - _object4._moveDiff = Common::Point(20, 20); - _object4.setPosition(Common::Point(251, 207)); - _object4.changeZoom(-1); - g_globals->_sceneItems.push_back(&_object4); - } - - _object2.postInit(); - _object2.setVisage(90); - _object2.animate(ANIM_MODE_1, NULL); - _object2.setPosition(Common::Point(315, 185)); - _object2._strip = 2; - g_globals->_sceneItems.push_back(&_object2); - - _object3.postInit(); - _object3.setVisage(90); - _object3.animate(ANIM_MODE_1, NULL); - _object3.setPosition(Common::Point(196, 181)); - _object3.fixPriority(175); - g_globals->_sceneItems.push_back(&_object3); + _emptyShip.postInit(); + _emptyShip.setVisage(2331); + _emptyShip.setObjectWrapper(new SceneObjectWrapper()); + _emptyShip._strip = 4; + _emptyShip._moveDiff = Common::Point(20, 20); + _emptyShip.setPosition(Common::Point(251, 207)); + _emptyShip.changeZoom(-1); + g_globals->_sceneItems.push_back(&_emptyShip); + } + + _guard.postInit(); + _guard.setVisage(90); + _guard.animate(ANIM_MODE_1, NULL); + _guard.setPosition(Common::Point(315, 185)); + _guard._strip = 2; + g_globals->_sceneItems.push_back(&_guard); + + _headGate.postInit(); + _headGate.setVisage(90); + _headGate.animate(ANIM_MODE_1, NULL); + _headGate.setPosition(Common::Point(196, 181)); + _headGate.fixPriority(175); + g_globals->_sceneItems.push_back(&_headGate); g_globals->_player.disableControl(); g_globals->_soundHandler.play(55); @@ -2679,11 +2693,11 @@ void Scene90::postInit(SceneObjectList *OwnerList) { setAction(&_action1); - _item3.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); - _item1.setBounds(Rect(271, 65, 271, 186)); - _item2.setBounds(Rect(0, 17, 124, 77)); + _background.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); + _guardShack.setBounds(Rect(271, 65, 271, 186)); + _shed.setBounds(Rect(0, 17, 124, 77)); - g_globals->_sceneItems.addItems(&_item1, &_item2, &_item3, NULL); + g_globals->_sceneItems.addItems(&_guardShack, &_shed, &_background, NULL); } void Scene90::signal() { @@ -2700,7 +2714,7 @@ void Scene90::signal() { g_globals->_player.enableControl(); break; case 97: - _stripManager._field2E8 = 0; + _stripManager._currObj44Id = 0; _action1.setActionIndex(5); _action1.setDelay(1); break; @@ -2925,7 +2939,7 @@ void Scene6100::Action3::signal() { case 4: g_globals->setFlag(76); g_globals->_sceneManager.changeScene( - (scene->_stripManager._field2E8 == 135) ? 6100 : 2320); + (scene->_stripManager._currObj44Id == 135) ? 6100 : 2320); remove(); break; } diff --git a/engines/tsage/ringworld/ringworld_scenes1.h b/engines/tsage/ringworld/ringworld_scenes1.h index bb98c89a8c..9f6de58e30 100644 --- a/engines/tsage/ringworld/ringworld_scenes1.h +++ b/engines/tsage/ringworld/ringworld_scenes1.h @@ -8,12 +8,12 @@ * 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 + * 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. @@ -54,8 +54,12 @@ public: Speaker _speakerQText; Action1 _action1; Action2 _action2; - SceneObject _object1, _object2, _object3; - SceneObject _object4, _object5, _object6; + SceneObject _veeshkaBody; + SceneObject _veeshkaHead; + SceneObject _veeshkaRightArm; + SceneObject _centurion; + SceneObject _leftSmoke; + SceneObject _rightSmoke; virtual void stripCallback(int v); virtual void postInit(SceneObjectList *OwnerList = NULL); @@ -70,7 +74,7 @@ class Scene15 : public Scene { }; public: Action1 _action1; - SceneObject _object1; + SceneObject _ship; ASound _soundHandler; virtual void postInit(SceneObjectList *OwnerList = NULL); @@ -102,7 +106,10 @@ public: Action2 _action2; Action3 _action3; Action4 _action4; - SceneObject _sceneObject1, _SceneObjectExt, _sceneObject3, _sceneObject4, _sceneObject5; + SceneObject _assassinShip1; + SceneObject _assassinShip2; + SceneObject _laserShot1; + SceneObject _laserShot2; ASound _sound; public: Scene20(); @@ -248,15 +255,21 @@ public: Action6 _action6; Action7 _action7; Action8 _action8; - SceneObject _object1, _object2, _object3; + SceneObject _seeker; + SceneObject _seekerTail; + SceneObject _seekerHand; DyingKzin _dyingKzin; Assassin _assassin; - SceneObject _doorway, _object7, _object8; - DisplayHotspot _item1; - Item2 _item2; - DisplayHotspot _item3, _item4, _item5; - Item6 _item6; - DisplayHotspot _item7, _item8; + SceneObject _doorway; + SceneObject _leftEntrance; + DisplayHotspot _ball; + Item2 _statue; + DisplayHotspot _window; + DisplayHotspot _entrance; + DisplayHotspot _background; + Item6 _pedestal; + DisplayHotspot _emerald; + DisplayHotspot _tree; Scene40(); virtual void postInit(SceneObjectList *OwnerList = NULL); @@ -284,15 +297,15 @@ class Scene50 : public Scene { public: virtual void doAction(int action); }; - class Object2 : public SceneObject { + class LeftFlyCycle : public SceneObject { public: virtual void doAction(int action); }; - class Object3 : public SceneObject { + class CenterFlyCycle : public SceneObject { public: virtual void doAction(int action); }; - class Object4 : public SceneObject { + class RightFlyCycle : public SceneObject { public: virtual void doAction(int action); }; @@ -302,15 +315,18 @@ public: Action1 _action1; Action2 _action2; Action3 _action3; - Object1 _object1; - Object2 _object2; - Object3 _object3; - Object4 _object4; + LeftFlyCycle _leftFlyCycle; + CenterFlyCycle _centerFlyCycle; + RightFlyCycle _rightFlyCycle; Rect _doorwayRect; SpeakerSText _speakerSText; SpeakerQText _speakerQText; - DisplayHotspot _item0, _item1, _item2; - DisplayHotspot _item3, _item4, _item5; + DisplayHotspot _background; + DisplayHotspot _item1; + DisplayHotspot _entrance; + DisplayHotspot _bulwark; + DisplayHotspot _tree; + DisplayHotspot _flagstones; Scene50(); virtual void postInit(SceneObjectList *OwnerList = NULL); @@ -392,8 +408,12 @@ public: MasterObject _masterButton; FloppyDrive _floppyDrive; SceneObject _redLights; - Item1 _item1; - Item _item2, _item3, _item4, _item5, _item6; + Item1 _diskDrive; + Item _dashboard; + Item _intercomm; + Item _viewScreen; + Item _speedControl; + Item _speaker; ASound _soundHandler1; ASound _soundHandler2; ASound _soundHandler3; @@ -409,11 +429,11 @@ class Scene90 : public Scene { public: virtual void signal(); }; - class Object1 : public SceneObject { + class SeekerShip : public SceneObject { public: virtual void doAction(int action); }; - class Object2 : public SceneObject { + class Guard : public SceneObject { public: virtual void doAction(int action); }; @@ -425,11 +445,15 @@ public: SpeakerSR _speakerSR; SpeakerMText _speakerMText; Action1 _action1; - Object1 _object1; - Object2 _object2; - DisplayObject _object3, _object4, _object5; - SceneObject _object6; - DisplayHotspot _item1, _item2, _item3; + SeekerShip _seekerShip; + Guard _guard; + DisplayObject _headGate; + DisplayObject _emptyShip; + DisplayObject _quinnShip; + SceneObject _bubble; + DisplayHotspot _guardShack; + DisplayHotspot _shed; + DisplayHotspot _background; ASound _soundHandler1, _soundHandler2; Scene90(); diff --git a/engines/tsage/ringworld/ringworld_scenes10.cpp b/engines/tsage/ringworld/ringworld_scenes10.cpp index f9a8e7996a..c4874c0f59 100644 --- a/engines/tsage/ringworld/ringworld_scenes10.cpp +++ b/engines/tsage/ringworld/ringworld_scenes10.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -1217,7 +1217,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { g_globals->_events.setCursor(CURSOR_WALK); g_globals->_player.disableControl(); - if ((g_globals->_sceneManager._previousScene == 9200) || (g_globals->_sceneManager._previousScene != 9850)) { + if (g_globals->_sceneManager._previousScene != 9850) { _sceneMode = 0; if (RING_INVENTORY._helmet._sceneNumber != 1) { setAction(&_sequenceManager, this, 9501, &g_globals->_player, &_candle, NULL); @@ -1870,7 +1870,7 @@ void Scene9900::signal() { setAction(&_sequenceManager, this, 9908, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6); break; case 162: - warning("TBC: shutdown();"); + // shutdown(); g_globals->_game->quitGame(); break; case 9901: diff --git a/engines/tsage/ringworld/ringworld_scenes10.h b/engines/tsage/ringworld/ringworld_scenes10.h index 48859ab454..ff1a6e9070 100644 --- a/engines/tsage/ringworld/ringworld_scenes10.h +++ b/engines/tsage/ringworld/ringworld_scenes10.h @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_scenes2.cpp b/engines/tsage/ringworld/ringworld_scenes2.cpp index e07c9253e6..1140f6f3d1 100644 --- a/engines/tsage/ringworld/ringworld_scenes2.cpp +++ b/engines/tsage/ringworld/ringworld_scenes2.cpp @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_scenes2.h b/engines/tsage/ringworld/ringworld_scenes2.h index 382d9d4157..825cd04c17 100644 --- a/engines/tsage/ringworld/ringworld_scenes2.h +++ b/engines/tsage/ringworld/ringworld_scenes2.h @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_scenes3.cpp b/engines/tsage/ringworld/ringworld_scenes3.cpp index b2ed986331..d8556c691e 100644 --- a/engines/tsage/ringworld/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld/ringworld_scenes3.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -799,7 +799,7 @@ void Scene2100::Action9::signal() { scene->_stripManager.start(6010, this); break; case 6: - if (scene->_stripManager._field2E8 != 165) + if (scene->_stripManager._currObj44Id != 165) setAction(&scene->_action10); else setAction(&scene->_action11); @@ -1010,7 +1010,7 @@ void Scene2100::Action12::signal() { scene->_stripManager.start(6052, this); break; case 8: - if (scene->_stripManager._field2E8 == 320) + if (scene->_stripManager._currObj44Id == 320) g_globals->setFlag(74); setDelay(30); break; @@ -2352,11 +2352,11 @@ void Scene2150::Action2::signal() { scene->_hotspot14.setStrip(6); scene->_hotspot14.setPosition(Common::Point(59, 54)); - if (scene->_stripManager._field2E8 == 15) { + if (scene->_stripManager._currObj44Id == 15) { scene->_hotspot14.setFrame(5); RING_INVENTORY._ale._sceneNumber = 1; } else { - scene->_hotspot14.setFrame(scene->_stripManager._field2E8 - 5); + scene->_hotspot14.setFrame(scene->_stripManager._currObj44Id - 5); } g_globals->_player.setFrame(1); @@ -3160,7 +3160,7 @@ void Scene2230::Action1::signal() { switch (_actionIndex++) { case 0: - switch (scene->_field30A) { + switch (scene->_sceneMode) { case 1: scene->setAction(&scene->_action3); break; @@ -3201,7 +3201,7 @@ void Scene2230::Action2::signal() { switch (_actionIndex++) { case 0: - switch (scene->_field30A) { + switch (scene->_sceneMode) { case 2: scene->setAction(&scene->_action6, this); break; @@ -3212,7 +3212,7 @@ void Scene2230::Action2::signal() { break; case 1: { g_globals->_player.disableControl(); - scene->_field30A = 1; + scene->_sceneMode = 1; g_globals->_player._regionBitList |= ~0x80; Common::Point pt(160, 96); NpcMover *mover = new NpcMover(); @@ -3262,7 +3262,7 @@ void Scene2230::Action3::signal() { break; case 2: g_globals->_player._regionBitList |= 0x80; - scene->_field30A = 0; + scene->_sceneMode = 0; g_globals->_player.setVisage(0); g_globals->_player.setStrip2(-1); @@ -3292,7 +3292,7 @@ void Scene2230::Action5::signal() { switch (_actionIndex++) { case 0: - switch (scene->_field30A) { + switch (scene->_sceneMode) { case 2: scene->setAction(&scene->_action3, this); break; @@ -3318,7 +3318,7 @@ void Scene2230::Action5::signal() { case 3: g_globals->_events.setCursor(CURSOR_USE); g_globals->_player._uiEnabled = true; - scene->_field30A = 2; + scene->_sceneMode = 2; remove(); break; } @@ -3335,7 +3335,7 @@ void Scene2230::Action6::signal() { g_globals->_player.animate(ANIM_MODE_5, this); break; case 1: - scene->_field30A = 0; + scene->_sceneMode = 0; g_globals->_player.setVisage(0); g_globals->_player._strip = 1; g_globals->_player._canWalk = true; @@ -3352,7 +3352,7 @@ void Scene2230::Action7::signal() { case 0: g_globals->_player.disableControl(); - switch (scene->_field30A) { + switch (scene->_sceneMode) { case 1: scene->setAction(&scene->_action3, this); break; @@ -3408,7 +3408,7 @@ void Scene2230::Action8::signal() { case 0: g_globals->_player.disableControl(); - switch (scene->_field30A) { + switch (scene->_sceneMode) { case 1: scene->setAction(&scene->_action3, this); break; @@ -3431,7 +3431,7 @@ void Scene2230::Action8::signal() { g_globals->_sceneItems.remove(&scene->_hotspot11); g_globals->_sceneItems.remove(&scene->_hotspot12); - switch (scene->_field30A) { + switch (scene->_sceneMode) { case 1: scene->setAction(&scene->_action3, this); break; @@ -3560,7 +3560,7 @@ void Scene2230::Hotspot6::doAction(int action) { } break; case CURSOR_USE: - if (scene->_field30A == 1) + if (scene->_sceneMode == 1) scene->setAction(&scene->_action3); else if (g_globals->getFlag(13)) SceneItem::display2(2230, 28); @@ -3586,7 +3586,7 @@ void Scene2230::Hotspot7::doAction(int action) { } break; case CURSOR_USE: - if (scene->_field30A == 2) + if (scene->_sceneMode == 2) scene->setAction(&scene->_action6); else if (g_globals->getFlag(13)) SceneItem::display2(2230, 29); @@ -3692,7 +3692,7 @@ void Scene2230::Hotspot12::doAction(int action) { /*--------------------------------------------------------------------------*/ Scene2230::Scene2230() : _hotspot9(0, CURSOR_LOOK, 2230, 16, CURSOR_USE, 2230, 18, LIST_END) { - _field30A = 0; + _sceneMode = 0; } void Scene2230::postInit(SceneObjectList *OwnerList) { @@ -3726,7 +3726,7 @@ void Scene2230::postInit(SceneObjectList *OwnerList) { g_globals->_player._regionBitList |= 0x80; g_globals->_player.changeZoom(-1); - _field30A = 0; + _sceneMode = 0; g_globals->_player.enableControl(); _hotspot5.setBounds(Rect(108, 34, 142, 76)); @@ -3748,7 +3748,7 @@ void Scene2230::postInit(SceneObjectList *OwnerList) { void Scene2230::synchronize(Serializer &s) { Scene::synchronize(s); _rect1.synchronize(s); - s.syncAsSint16LE(_field30A); + s.syncAsSint16LE(_sceneMode); } void Scene2230::dispatch() { @@ -4946,8 +4946,6 @@ void Scene2310::synchronize(Serializer &s) { } void Scene2310::process(Event &event) { - int frameNum = 0; - if (!event.handled && (event.eventType == EVENT_BUTTON_DOWN)) { int idx = 0; while (idx < 5) { @@ -4961,7 +4959,7 @@ void Scene2310::process(Event &event) { if (_wireIndex == 5) { // No wire is currently active, so start moving designated wire _wireIndex = idx; - frameNum = idx + 2; + int frameNum = idx + 2; if (event.mousePos.y > 105) idx = findObject(idx); diff --git a/engines/tsage/ringworld/ringworld_scenes3.h b/engines/tsage/ringworld/ringworld_scenes3.h index 682ef44fc6..a371f800b9 100644 --- a/engines/tsage/ringworld/ringworld_scenes3.h +++ b/engines/tsage/ringworld/ringworld_scenes3.h @@ -8,12 +8,12 @@ * 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 + * 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. @@ -579,7 +579,7 @@ public: Hotspot11 _hotspot11; Hotspot12 _hotspot12; Rect _rect1; - int _field30A; + int _sceneMode; Scene2230(); virtual void postInit(SceneObjectList *OwnerList = NULL); diff --git a/engines/tsage/ringworld/ringworld_scenes4.cpp b/engines/tsage/ringworld/ringworld_scenes4.cpp index 98bf0158e7..4d40b34eea 100644 --- a/engines/tsage/ringworld/ringworld_scenes4.cpp +++ b/engines/tsage/ringworld/ringworld_scenes4.cpp @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_scenes4.h b/engines/tsage/ringworld/ringworld_scenes4.h index 64706805bc..72913ea8f2 100644 --- a/engines/tsage/ringworld/ringworld_scenes4.h +++ b/engines/tsage/ringworld/ringworld_scenes4.h @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_scenes5.cpp b/engines/tsage/ringworld/ringworld_scenes5.cpp index 004ccbbb6d..cb8a89de80 100644 --- a/engines/tsage/ringworld/ringworld_scenes5.cpp +++ b/engines/tsage/ringworld/ringworld_scenes5.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -34,6 +34,9 @@ namespace Ringworld { * Scene 4000 - Village * *--------------------------------------------------------------------------*/ +Scene4000::Hotspot8::Hotspot8() : SceneObject() { + _ctr = 0; +} void Scene4000::Action1::signal() { // Quinn has the peg. Everybody enter the screen. @@ -459,7 +462,7 @@ void Scene4000::Action12::signal() { break; case 2: g_globals->setFlag(32); - if (scene->_stripManager._field2E8 == 275) { + if (scene->_stripManager._currObj44Id == 275) { g_globals->setFlag(82); ADD_MOVER_NULL(scene->_guardRock, 292, 138); ADD_PLAYER_MOVER(283, 147); @@ -468,7 +471,7 @@ void Scene4000::Action12::signal() { } break; case 3: - if (scene->_stripManager._field2E8 == 275) { + if (scene->_stripManager._currObj44Id == 275) { g_globals->_sceneManager.changeScene(4100); } else { ADD_PLAYER_MOVER_THIS(scene->_guardRock, 300, 132); @@ -4219,7 +4222,12 @@ void Scene4300::process(Event &event) { void Scene4301::Action1::synchronize(Serializer &s) { Action::synchronize(s); - s.syncAsSint16LE(_field34E); + + if (s.getVersion() < 14) { + int useless = 0; + s.syncAsSint16LE(useless); + } + for (int idx = 0; idx < 6; ++idx) s.syncAsSint16LE(_indexList[idx]); } @@ -4265,7 +4273,6 @@ void Scene4301::Action1::signal() { scene->_hotspot3.fixPriority(255); scene->_hotspot3.hide(); - _field34E = 0; _state = 0; _actionIndex = 2; break; diff --git a/engines/tsage/ringworld/ringworld_scenes5.h b/engines/tsage/ringworld/ringworld_scenes5.h index c93df2a1d8..3010c7b401 100644 --- a/engines/tsage/ringworld/ringworld_scenes5.h +++ b/engines/tsage/ringworld/ringworld_scenes5.h @@ -8,12 +8,12 @@ * 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 + * 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. @@ -99,6 +99,7 @@ class Scene4000 : public Scene { private: int _ctr; public: + Hotspot8(); virtual void synchronize(Serializer &s) { SceneObject::synchronize(s); s.syncAsUint16LE(_ctr); @@ -655,7 +656,6 @@ class Scene4301 : public Scene { class Action1 : public ActionExt { public: SceneObject _buttonList[6]; - int _field34E; int _indexList[6]; virtual void synchronize(Serializer &s); diff --git a/engines/tsage/ringworld/ringworld_scenes6.cpp b/engines/tsage/ringworld/ringworld_scenes6.cpp index 30a91b57aa..74f834c64f 100644 --- a/engines/tsage/ringworld/ringworld_scenes6.cpp +++ b/engines/tsage/ringworld/ringworld_scenes6.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -1608,8 +1608,6 @@ Scene5200::Scene5200() : void Scene5200::postInit(SceneObjectList *OwnerList) { Scene::postInit(); setZoomPercents(0, 150, 199, 150); - _fieldA = 5600; - _fieldE = 5100; _hotspot9._state = 0; _hotspot10._state = 0; @@ -2032,7 +2030,15 @@ void Scene5300::Hotspot8::doAction(int action) { /*--------------------------------------------------------------------------*/ Scene5300::Scene5300() : - _hotspot3(0, CURSOR_LOOK, 5300, 3, CURSOR_USE, 5300, 16, LIST_END) { + _hotspot3(0, CURSOR_LOOK, 5300, 3, CURSOR_USE, 5300, 16, LIST_END) { +} + +void Scene5300::synchronize(Serializer &s) { + Scene::synchronize(s); + if (s.getVersion() < 11) { + int useless = 0; + s.syncAsSint16LE(useless); + } } void Scene5300::postInit(SceneObjectList *OwnerList) { @@ -2119,7 +2125,6 @@ void Scene5300::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager, this, 5306, &g_globals->_player, &_hotspot3, NULL); } - _field1B0A = 1; if (RING_INVENTORY._bone._sceneNumber == 5300) { _hotspot5.postInit(); _hotspot5.setVisage(5301); diff --git a/engines/tsage/ringworld/ringworld_scenes6.h b/engines/tsage/ringworld/ringworld_scenes6.h index bf353de415..fcc7f900ce 100644 --- a/engines/tsage/ringworld/ringworld_scenes6.h +++ b/engines/tsage/ringworld/ringworld_scenes6.h @@ -8,12 +8,12 @@ * 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 + * 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. @@ -318,15 +318,11 @@ public: Hotspot6 _hotspot6; Hotspot7 _hotspot7; Hotspot8 _hotspot8; - int _field1B0A; Scene5300(); virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void signal(); - virtual void synchronize(Serializer &s) { - Scene::synchronize(s); - s.syncAsSint16LE(_field1B0A); - } + virtual void synchronize(Serializer &s); }; } // End of namespace Ringworld diff --git a/engines/tsage/ringworld/ringworld_scenes8.cpp b/engines/tsage/ringworld/ringworld_scenes8.cpp index 9cb85a6930..60bd72e1ef 100644 --- a/engines/tsage/ringworld/ringworld_scenes8.cpp +++ b/engines/tsage/ringworld/ringworld_scenes8.cpp @@ -8,12 +8,12 @@ * 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 + * 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. @@ -30,6 +30,10 @@ namespace TsAGE { namespace Ringworld { +NamedHotspotMult::NamedHotspotMult() : SceneHotspot() { + _useLineNum = _lookLineNum = 0; +} + void NamedHotspotMult::synchronize(Serializer &s) { SceneHotspot::synchronize(s); s.syncAsSint16LE(_useLineNum); @@ -2533,6 +2537,10 @@ Scene7700::Scene7700() { _object5._state = 0; _object6._state = 0; _prof._state = 0; + + _seatCountLeft1 = 0; + _seatCountLeft2 = 0; + _seatCountRight = 0; } void Scene7700::synchronize(Serializer &s) { diff --git a/engines/tsage/ringworld/ringworld_scenes8.h b/engines/tsage/ringworld/ringworld_scenes8.h index b24f220f8c..ad5a91514e 100644 --- a/engines/tsage/ringworld/ringworld_scenes8.h +++ b/engines/tsage/ringworld/ringworld_scenes8.h @@ -8,12 +8,12 @@ * 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 + * 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. @@ -40,7 +40,7 @@ using namespace TsAGE; class NamedHotspotMult : public SceneHotspot { public: int _useLineNum, _lookLineNum; - NamedHotspotMult() : SceneHotspot() {} + NamedHotspotMult(); virtual Common::String getClassName() { return "NamedHotspotMult"; } virtual void synchronize(Serializer &s); diff --git a/engines/tsage/ringworld/ringworld_speakers.cpp b/engines/tsage/ringworld/ringworld_speakers.cpp index dc80df40a3..a4ce95928c 100644 --- a/engines/tsage/ringworld/ringworld_speakers.cpp +++ b/engines/tsage/ringworld/ringworld_speakers.cpp @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tsage/ringworld/ringworld_speakers.h b/engines/tsage/ringworld/ringworld_speakers.h index 305984a184..59e25dc166 100644 --- a/engines/tsage/ringworld/ringworld_speakers.h +++ b/engines/tsage/ringworld/ringworld_speakers.h @@ -8,12 +8,12 @@ * 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 + * 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. |