From f3fc6720d1c319ad00e5b15cbe7d087831fe807c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 16 Oct 2011 13:52:33 +1100 Subject: TSAGE: Bugfixes for fax machine in Lyle's Office --- engines/tsage/blue_force/blueforce_scenes8.cpp | 47 +++++++++++++++----------- engines/tsage/blue_force/blueforce_scenes8.h | 4 +-- 2 files changed, 30 insertions(+), 21 deletions(-) (limited to 'engines/tsage') diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp index e888bbc8f8..1f8d40c392 100644 --- a/engines/tsage/blue_force/blueforce_scenes8.cpp +++ b/engines/tsage/blue_force/blueforce_scenes8.cpp @@ -638,7 +638,7 @@ bool Scene810::Object3::startAction(CursorType action, Event &event) { } } -bool Scene810::Object4::startAction(CursorType action, Event &event) { +bool Scene810::FaxMachineInset::startAction(CursorType action, Event &event) { Scene810 *scene = (Scene810 *)BF_GLOBALS._sceneManager._scene; switch (action) { @@ -775,19 +775,27 @@ bool Scene810::FaxMachine::startAction(CursorType action, Event &event) { } else { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 8105; - ADD_PLAYER_MOVER(67, 111); + + Common::Point destPos(67, 111); + PlayerMover *mover = new PlayerMover(); + BF_GLOBALS._player.addMover(mover, &destPos, scene); } return true; case INV_PRINT_OUT: - BF_INVENTORY.setObjectScene(INV_PRINT_OUT, 811); - BF_GLOBALS._player.disableControl(); - scene->_sceneMode = 811; + if (BF_INVENTORY.getObjectScene(INV_COBB_RAP) == 1) + SceneItem::display2(810, 31); + else { + BF_INVENTORY.setObjectScene(INV_PRINT_OUT, 811); + BF_GLOBALS._player.disableControl(); + scene->_sceneMode = 811; - if (BF_GLOBALS._sceneObjects->contains(&scene->_lyle)) { - scene->setAction(&scene->_sequenceManager1, scene, BF_GLOBALS.getFlag(onDuty) ? 8108 : 8105, - &scene->_object6, NULL); - } else { - scene->setAction(&scene->_sequenceManager1, scene, 8111, &BF_GLOBALS._player, &scene->_object6, NULL); + if (BF_GLOBALS._sceneObjects->contains(&scene->_lyle)) { + scene->setAction(&scene->_sequenceManager1, scene, BF_GLOBALS.getFlag(onDuty) ? 8108 : 8105, + &BF_GLOBALS._player, &scene->_object6, NULL); + } else { + scene->setAction(&scene->_sequenceManager1, scene, 8111, &BF_GLOBALS._player, + &scene->_object6, NULL); + } } return true; default: @@ -1108,12 +1116,13 @@ void Scene810::signal() { switch (_sceneMode) { case 811: case 8105: - _object4.postInit(); - _object4.setVisage(810); - _object4.setPosition(Common::Point(77, 94)); - _object4.setStrip(8); - _object4.fixPriority(250); - BF_GLOBALS._sceneItems.push_back(&_object4); + _faxMachineInset.postInit(); + _faxMachineInset.setVisage(810); + _faxMachineInset.setPosition(Common::Point(77, 94)); + _faxMachineInset.setStrip(8); + _faxMachineInset.fixPriority(250); + BF_GLOBALS._sceneItems.push_back(&_faxMachineInset); + BF_GLOBALS._player.enableControl(); break; case 8100: if (BF_GLOBALS.getFlag(examinedFile810)) { @@ -1230,7 +1239,7 @@ void Scene810::signal() { } void Scene810::process(Event &event) { - if (BF_GLOBALS._player._enabled && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_E); @@ -1253,9 +1262,9 @@ void Scene810::dispatch() { _lyle.updateAngle(BF_GLOBALS._player._position); } - if (BF_GLOBALS._sceneObjects->contains(&_object4) && (BF_GLOBALS._player._position.x != 67) && + if (BF_GLOBALS._sceneObjects->contains(&_faxMachineInset) && (BF_GLOBALS._player._position.x != 67) && (BF_GLOBALS._player._position.y != 111)) { - _object4.remove(); + _faxMachineInset.remove(); } if (!_action) { diff --git a/engines/tsage/blue_force/blueforce_scenes8.h b/engines/tsage/blue_force/blueforce_scenes8.h index aa63002f73..ad223fef02 100644 --- a/engines/tsage/blue_force/blueforce_scenes8.h +++ b/engines/tsage/blue_force/blueforce_scenes8.h @@ -185,7 +185,7 @@ class Scene810: public SceneExt { public: virtual bool startAction(CursorType action, Event &event); }; - class Object4: public NamedObject { + class FaxMachineInset: public FocusObject { public: virtual bool startAction(CursorType action, Event &event); }; @@ -208,7 +208,7 @@ public: Lyle _lyle; Chair _chair; Object3 _object3; - Object4 _object4; + FaxMachineInset _faxMachineInset; Object5 _object5; NamedObject _object6; Object7 _object7; -- cgit v1.2.3