diff options
Diffstat (limited to 'engines/tsage')
28 files changed, 951 insertions, 951 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index eef48ad58e..3aef18f4f0 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -733,7 +733,7 @@ void SceneExt::remove() { _action->_endHandler = NULL; _action->remove(); } - + _focusObject = NULL; } @@ -1326,7 +1326,7 @@ bool BlueForceInvObjectList::SelectItem(int objectNumber) { AmmoBeltDialog *dlg = new AmmoBeltDialog(); dlg->execute(); delete dlg; - + return true; } @@ -1408,7 +1408,7 @@ void SceneMessage::signal() { } void SceneMessage::process(Event &event) { - if ((event.eventType == EVENT_BUTTON_DOWN) || + if ((event.eventType == EVENT_BUTTON_DOWN) || ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_RETURN))) { signal(); } @@ -1439,7 +1439,7 @@ void SceneMessage::draw() { void SceneMessage::clear() { // Fade out the text display - static const uint32 black = 0; + static const uint32 black = 0; BF_GLOBALS._scenePalette.fade((const byte *)&black, false, 100); // Refresh the background diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp index c067cd87ea..9f1e9ce36e 100644 --- a/engines/tsage/blue_force/blueforce_scenes1.cpp +++ b/engines/tsage/blue_force/blueforce_scenes1.cpp @@ -430,7 +430,7 @@ void Scene110::Action1::signal() { case 6: // Play "Vroum" scene->_sound.play(31); - // The guy starts the engine + // The guy starts the engine scene->_object4.setStrip(3); scene->_object4._frame = 1; scene->_object4.animate(ANIM_MODE_5, NULL); @@ -837,7 +837,7 @@ void Scene110::postInit(SceneObjectList *OwnerList) { _object10._moveDiff.y = 10; _object10.setPosition(_object9._position); _object10.hide(); - + setAction(&_action1); } /*-------------------------------------------------------------------------- @@ -987,7 +987,7 @@ void Scene114::signal() { *--------------------------------------------------------------------------*/ bool Scene115::Kate::startAction(CursorType action, Event &event) { Scene115 *scene = (Scene115 *)BF_GLOBALS._sceneManager._scene; - + switch (action) { case CURSOR_LOOK: SceneItem::display(115, 8, SET_WIDTH, 312, @@ -1061,7 +1061,7 @@ bool Scene115::Kate::startAction(CursorType action, Event &event) { bool Scene115::Tony::startAction(CursorType action, Event &event) { Scene115 *scene = (Scene115 *)BF_GLOBALS._sceneManager._scene; - + switch (action) { case CURSOR_LOOK: SceneItem::display(115, 7, SET_WIDTH, 312, @@ -1164,7 +1164,7 @@ bool Scene115::Tony::startAction(CursorType action, Event &event) { bool Scene115::Object3::startAction(CursorType action, Event &event) { Scene115 *scene = (Scene115 *)BF_GLOBALS._sceneManager._scene; - + switch (action) { case CURSOR_LOOK: SceneItem::display(115, 9, SET_WIDTH, 312, @@ -1195,7 +1195,7 @@ bool Scene115::Object3::startAction(CursorType action, Event &event) { bool Scene115::Object4::startAction(CursorType action, Event &event) { Scene115 *scene = (Scene115 *)BF_GLOBALS._sceneManager._scene; - + switch (action) { case CURSOR_LOOK: SceneItem::display(115, 42, SET_WIDTH, 312, @@ -1217,7 +1217,7 @@ bool Scene115::Object4::startAction(CursorType action, Event &event) { void Scene115::Jukebox::signal() { Scene115 *scene = (Scene115 *)BF_GLOBALS._sceneManager._scene; - + if (_jokeboxPlayingCtr == 2) _jokeboxPlayingCtr = 0; else if (_jokeboxPlayingCtr == 1) { @@ -1228,7 +1228,7 @@ void Scene115::Jukebox::signal() { bool Scene115::Jukebox::startAction(CursorType action, Event &event) { Scene115 *scene = (Scene115 *)BF_GLOBALS._sceneManager._scene; - + if (action == CURSOR_USE) { if (_jokeboxPlayingCtr == 0) { _jokeboxPlayingCtr = 1; @@ -1241,7 +1241,7 @@ bool Scene115::Jukebox::startAction(CursorType action, Event &event) { SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; - } else + } else return NamedHotspot::startAction(action, event); } @@ -1265,7 +1265,7 @@ void Scene115::EventHandler1::dispatch() { bool Scene115::Item10::startAction(CursorType action, Event &event) { Scene115 *scene = (Scene115 *)BF_GLOBALS._sceneManager._scene; - + if (BF_GLOBALS.getFlag(fWithLyle)) { scene->_object4.setStrip2(6); Common::Point pt(-20, 122); @@ -1591,7 +1591,7 @@ Scene115::Scene115() : SceneExt () { void Scene115::postInit(SceneObjectList *OwnerList) { SceneExt::postInit(); - + BF_GLOBALS._sound1.fadeSound(15); loadScene(115); setZoomPercents(98, 85, 115, 100); @@ -1641,7 +1641,7 @@ void Scene115::postInit(SceneObjectList *OwnerList) { _object11.postInit(); _object11.hide(); - + _object12.postInit(); _object12.hide(); @@ -1817,7 +1817,7 @@ void Scene125::Action1::signal() { case 0: // No break on purpose default: - break; + break; } } @@ -2054,7 +2054,7 @@ void Scene125::Action3::dispatch() { SceneObject *owner = static_cast<SceneObject *>(this->_owner); Action::dispatch(); - + if ((_actionIndex == 9) && (owner->_percent > 70)) owner->changeZoom(owner->_percent - 1); } @@ -2095,7 +2095,7 @@ void Scene125::Action4::dispatch() { SceneObject *owner = static_cast<SceneObject *>(this->_owner); Action::dispatch(); - + if ((_actionIndex == 4) && (owner->_percent > 80)) owner->changeZoom(owner->_percent - 1); } @@ -2134,7 +2134,7 @@ void Scene125::Action6::dispatch() { SceneObject *owner = static_cast<SceneObject *>(this->_owner); Action::dispatch(); - + if ((_actionIndex == 2) && (owner->_percent < 100)) owner->changeZoom(owner->_percent + 1); } @@ -2169,7 +2169,7 @@ void Scene125::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player._moveDiff.x = 6; BF_GLOBALS._player._moveDiff.y = 6; BF_GLOBALS._player.disableControl(); - + _object5.postInit(); _object5.setVisage(128); _object5.setPosition(Common::Point(150, 117)); @@ -2457,7 +2457,7 @@ void Scene160::Action1::signal() { scene->_kid.setStrip(2); scene->_kid.animate(ANIM_MODE_5, this); - scene->_kidBody.setPosition(scene->_kid._position); + scene->_kidBody.setPosition(scene->_kid._position); scene->_kidBody.setFrame(1); scene->_kidBody.setStrip(3); break; @@ -2630,7 +2630,7 @@ void Scene160::Action2::signal() { break; case 25: BF_GLOBALS._sound1.fade(0, 10, 10, true, this); -// FIXME: Currently, fade() doesn't end properly with this song, +// FIXME: Currently, fade() doesn't end properly with this song, // thus never returns here. This hack skips the wait and changes // directly to the next scene // Start of hack @@ -2895,7 +2895,7 @@ void Scene180::postInit(SceneObjectList *OwnerList) { _vechile.setStrip(3); _vechile._frame = 5; _vechile.changeZoom(75); - + _dispatchMode = 1; _vechile._moveDiff.x = 45; } else { diff --git a/engines/tsage/blue_force/blueforce_scenes1.h b/engines/tsage/blue_force/blueforce_scenes1.h index b304c2aeaa..ddde200370 100644 --- a/engines/tsage/blue_force/blueforce_scenes1.h +++ b/engines/tsage/blue_force/blueforce_scenes1.h @@ -137,7 +137,7 @@ class Scene110: public SceneExt { virtual void signal(); }; public: - NamedObject _object1, _object2, _object3, _object4, _object5, _object6, _object7, _object8, _object9, _object10; + NamedObject _object1, _object2, _object3, _object4, _object5, _object6, _object7, _object8, _object9, _object10; ASound _sound; Action1 _action1; Action2 _action2; @@ -354,7 +354,7 @@ public: NamedObject _object1; NamedObject _object2; IntroSceneText _text; - + void postInit(SceneObjectList *OwnerList); }; diff --git a/engines/tsage/blue_force/blueforce_scenes2.cpp b/engines/tsage/blue_force/blueforce_scenes2.cpp index 340baae6a9..c992afe620 100644 --- a/engines/tsage/blue_force/blueforce_scenes2.cpp +++ b/engines/tsage/blue_force/blueforce_scenes2.cpp @@ -67,7 +67,7 @@ void Scene200::Action1::signal() { rot->setDelay(10); rot = BF_GLOBALS._scenePalette.addRotation(96, 111, 1); rot->setDelay(10); - + scene->setAction(&scene->_sequenceManager, this, 201, &scene->_object1, &scene->_object2, &scene->_object3, &scene->_object4, &scene->_object5, &scene->_object6, NULL); break; @@ -99,7 +99,7 @@ void Scene200::Action2::signal() { break; } } - + /*--------------------------------------------------------------------------*/ @@ -133,7 +133,7 @@ void Scene200::postInit(SceneObjectList *OwnerList) { _object11.setVisage(200); _object11.setPosition(Common::Point(96, 112), 1000); _object11.setStrip(3); - _object11.setFrame(1); + _object11.setFrame(1); _object11.changeZoom(100); _object10.setAction(&_action1); @@ -168,7 +168,7 @@ void Scene210::Action1::signal() { rot->setDelay(10); rot = BF_GLOBALS._scenePalette.addRotation(96, 111, 1); rot->setDelay(10); - + scene->setAction(&scene->_sequenceManager, this, 210, &scene->_object10, &scene->_object11, &scene->_object12, &scene->_object13, &scene->_object14, &scene->_object15, NULL); break; @@ -301,7 +301,7 @@ void Scene220::Action1::signal() { rot->setDelay(10); rot = BF_GLOBALS._scenePalette.addRotation(96, 111, 1); rot->setDelay(10); - + scene->setAction(&scene->_sequenceManager, this, 220, &scene->_object4, &scene->_object5, &scene->_object6, &scene->_object7, &scene->_object8, &scene->_object9, NULL); break; @@ -508,7 +508,7 @@ void Scene225::Action1::signal() { rot->setDelay(10); rot = BF_GLOBALS._scenePalette.addRotation(96, 111, 1); rot->setDelay(10); - + scene->setAction(&scene->_sequenceManager, this, 225, &scene->_object15, &scene->_object16, &scene->_object17, &scene->_object18, &scene->_object19, &scene->_object20, NULL); break; @@ -661,7 +661,7 @@ void Scene225::postInit(SceneObjectList *OwnerList) { _object11._frame = 1; _object11.changeZoom(100); _object11._numFrames = 2; - + _object12.postInit(); _object12.setVisage(1225); _object12.setPosition(Common::Point(368, 35)); @@ -1007,14 +1007,14 @@ void Scene270::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player._moveDiff.x = 8; BF_GLOBALS._player.changeZoom(-1); BF_GLOBALS._player.disableControl(); - + switch (BF_GLOBALS._sceneManager._previousScene) { case 560: if (BF_GLOBALS._bookmark == bTalkedToGrannyAboutSkipsCard) { _field219A = 1; BF_GLOBALS._player._moveDiff.x = 5; _field386 = 0; - + _grandma.animate(ANIM_MODE_1, NULL); setAction(&_sequenceManager1, NULL, 2720, &BF_GLOBALS._player, &_grandma, NULL); BF_GLOBALS._bookmark = bLyleStoppedBy; @@ -1138,7 +1138,7 @@ void Scene270::signal() { case 2717: _sceneMode = 2718; _lyle.setFrame2(-1); - setAction(&_sequenceManager1, this, 2718, &BF_GLOBALS._player, &_laura, &_skip, + setAction(&_sequenceManager1, this, 2718, &BF_GLOBALS._player, &_laura, &_skip, &_lyle, &_grandma, NULL); break; case 2718: @@ -1167,7 +1167,7 @@ void Scene270::signal() { break; default: break; - } + } } void Scene270::process(Event &event) { @@ -1374,7 +1374,7 @@ Scene271::Scene271() { void Scene271::synchronize(Serializer &s) { PalettedScene::synchronize(s); - + s.syncAsSint16LE(_field796); s.syncAsSint16LE(_field2E16); s.syncAsSint16LE(_tempPos.x); @@ -1396,7 +1396,7 @@ void Scene271::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_gameTextSpeaker); _stripManager.addSpeaker(&_granTextSpeaker); _stripManager.addSpeaker(&_lyleTextSpeaker); - + _exit.setDetails(Rect(310, 115, 320, 167), 270, -1, -1, -1, 1, NULL); _tv.postInit(); @@ -1433,7 +1433,7 @@ void Scene271::postInit(SceneObjectList *OwnerList) { _item2.setDetails(3, 270, 24, 25, 26, 1); _item4.setDetails(2, 270, 30, 31, 32, 1); _item11.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 270, 0, 1, 2, 1, NULL); - + BF_GLOBALS._player.postInit(); BF_GLOBALS._player._moveDiff.x = 8; BF_GLOBALS._player.changeZoom(-1); @@ -1477,7 +1477,7 @@ void Scene271::postInit(SceneObjectList *OwnerList) { _object11.setStrip(1); _object11._frame = 2; _object11.setPosition(Common::Point(35, 136)); - + _object6.postInit(); _object6.hide(); @@ -1508,15 +1508,15 @@ void Scene271::postInit(SceneObjectList *OwnerList) { _object7.setVisage(277); _object7.setStrip(7); _object7.setPosition(Common::Point(48, 149)); - + BF_GLOBALS._walkRegions.disableRegion(6); BF_GLOBALS._walkRegions.disableRegion(14); BF_GLOBALS._walkRegions.disableRegion(19); - + _object12.postInit(); _object12.setVisage(276); _object12.setPosition(Common::Point(129, 130)); - + _object2.postInit(); _object2.setVisage(270); _object2.setStrip(3); @@ -1637,10 +1637,10 @@ void Scene271::signal() { BF_GLOBALS._player.enableControl(); _field796 = 1; _field2E16 = 1; - + _object1.remove(); _object11.remove(); - + BF_INVENTORY.setObjectScene(INV_LYLE_CARD, 1); break; case 2709: @@ -1754,7 +1754,7 @@ void Scene280::Action1::signal() { scene->_jake.setFrame(1); scene->_jake.animate(ANIM_MODE_8, NULL); scene->_jake._numFrames = 5; - + scene->_stripManager.start(2800, this); break; case 2: diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp index 8955199286..22c831f531 100644 --- a/engines/tsage/blue_force/blueforce_scenes3.cpp +++ b/engines/tsage/blue_force/blueforce_scenes3.cpp @@ -945,7 +945,7 @@ void Scene315::Action1::signal() { T2_GLOBALS._uiElements.addScore(30); BF_INVENTORY.setObjectScene(INV_MUG_SHOT, 1); //HACK: This has to be checked wether or not it occurs in the original. - //When the _sceneMode is set to 3169, the value desn't change. + //When the _sceneMode is set to 3169, the value desn't change. //If you show the forest rapsheet, it gives points (and again... and again...) scene->_sceneMode = 3154; } @@ -4509,12 +4509,12 @@ void Scene360::signal() { break; case 3607: case 3609: - // Original game was only using at this place visage 1363. + // Original game was only using at this place visage 1363. // This workaround allow Harrison to keep his gun handy // when entering the romm (if required) if (! BF_GLOBALS.getFlag(gunDrawn)) _harrison.setVisage(1363); - else + else _harrison.setVisage(363); BF_GLOBALS._player.enableControl(); break; @@ -5365,7 +5365,7 @@ bool Scene385::Jim::startAction(CursorType action, Event &event) { } else if (action < CURSOR_WALK) // Any other inventory item return false; - else + else return NamedObject::startAction(action, event); } diff --git a/engines/tsage/blue_force/blueforce_scenes4.cpp b/engines/tsage/blue_force/blueforce_scenes4.cpp index e966daf34e..a10f311791 100644 --- a/engines/tsage/blue_force/blueforce_scenes4.cpp +++ b/engines/tsage/blue_force/blueforce_scenes4.cpp @@ -1083,7 +1083,7 @@ void Scene415::postInit(SceneObjectList *OwnerList) { _animatedSeat.setStrip(1); _animatedSeat.setPosition(Common::Point(306, 116)); _animatedSeat.fixPriority(80); - + _windowLever.setDetails(16, 415, 25, -1, 26, 1); _item7.setDetails(17, 415, 32, -1, 33, 1); _seatBelt.setDetails(14, 415, 29, -1, 30, 1); @@ -1271,7 +1271,7 @@ void Scene440::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player.setVisage(303); BF_GLOBALS._player.setPosition(Common::Point(187, 104)); - + _lyle.setPosition(Common::Point(135, 128)); _lyle.show(); @@ -1291,7 +1291,7 @@ void Scene440::postInit(SceneObjectList *OwnerList) { _vechile.setVisage(580); _vechile.setStrip(2); _vechile.setFrame(3); - + BF_GLOBALS._player.setVisage(303); } } @@ -1310,7 +1310,7 @@ void Scene440::postInit(SceneObjectList *OwnerList) { _lyle.setPosition(Common::Point(143, 93)); _lyle.setStrip(5); _lyle.fixPriority(90); - + _doorway.setFrame(_doorway.getFrameCount()); _sceneMode = 4401; setAction(&_sequenceManager, this, 4401, &BF_GLOBALS._player, &_doorway, NULL); @@ -1375,7 +1375,7 @@ bool Scene450::Weasel::startAction(CursorType action, Event &event) { T2_GLOBALS._uiElements.addScore(30); scene->_sceneMode = 4505; - scene->setAction(&scene->_sequenceManager, scene, 4505, &BF_GLOBALS._player, this, + scene->setAction(&scene->_sequenceManager, scene, 4505, &BF_GLOBALS._player, this, &scene->_counterDoor, &scene->_object2, NULL); return true; default: @@ -1427,7 +1427,7 @@ bool Scene450::Manager::startAction(CursorType action, Event &event) { if (BF_GLOBALS.getFlag(takenWeasel) && !BF_GLOBALS.getFlag(gotTrailer450)) { BF_GLOBALS.setFlag(gotTrailer450); scene->_sceneMode = 4517; - scene->setAction(&scene->_sequenceManager, scene, 4517, &BF_GLOBALS._player, this, + scene->setAction(&scene->_sequenceManager, scene, 4517, &BF_GLOBALS._player, this, &scene->_door, NULL); } else { animate(ANIM_MODE_8, 1, NULL); @@ -1485,11 +1485,11 @@ bool Scene450::Manager::startAction(CursorType action, Event &event) { } else { animate(ANIM_MODE_8, 1, NULL); BF_GLOBALS._player.disableControl(); - + if (!BF_GLOBALS.getFlag(showEugeneID)) T2_GLOBALS._uiElements.addScore(30); BF_GLOBALS.setFlag(showEugeneID); - + if ((BF_GLOBALS.getFlag(showRapEugene) || BF_GLOBALS.getFlag(showEugeneNapkin)) && !BF_GLOBALS.getFlag(fMgrCallsWeasel)) { T2_GLOBALS._uiElements.addScore(30); diff --git a/engines/tsage/blue_force/blueforce_scenes5.cpp b/engines/tsage/blue_force/blueforce_scenes5.cpp index 692e142f55..abadc4300a 100644 --- a/engines/tsage/blue_force/blueforce_scenes5.cpp +++ b/engines/tsage/blue_force/blueforce_scenes5.cpp @@ -60,7 +60,7 @@ bool Scene550::Lyle::startAction(CursorType action, Event &event) { switch (action) { case CURSOR_TALK: - if ((BF_INVENTORY.getObjectScene(INV_SCHEDULE) == 1) || + if ((BF_INVENTORY.getObjectScene(INV_SCHEDULE) == 1) || (BF_INVENTORY.getObjectScene(INV_9MM_BULLETS) == 1)) { if ((BF_INVENTORY.getObjectScene(INV_SCHEDULE) == 1) && (BF_INVENTORY.getObjectScene(INV_9MM_BULLETS) == 1)) { @@ -132,7 +132,7 @@ bool Scene550::Vechile::startAction(CursorType action, Event &event) { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 2; scene->setAction(&scene->_sequenceManager, scene, 5501, &BF_GLOBALS._player, NULL); - } else if ((BF_INVENTORY.getObjectScene(INV_SCHEDULE) == 1) || + } else if ((BF_INVENTORY.getObjectScene(INV_SCHEDULE) == 1) || (BF_INVENTORY.getObjectScene(INV_9MM_BULLETS) == 1)) { if (BF_INVENTORY.getObjectScene(INV_9MM_BULLETS) == 1) { scene->_sceneMode = 5501; @@ -164,11 +164,11 @@ void Scene550::postInit(SceneObjectList *OwnerList) { _sceneMode = 1; signal(); return; - } + } SceneExt::postInit(); loadScene(550); - + _stripManager.addSpeaker(&_gameTextSpeaker); _stripManager.addSpeaker(&_lyleHatSpeaker); _stripManager.addSpeaker(&_jakeJacketSpeaker); @@ -216,7 +216,7 @@ void Scene550::postInit(SceneObjectList *OwnerList) { if (BF_GLOBALS.getFlag(onDuty)) { _vechile.setVisage(301); _vechile.setStrip(1); - + BF_GLOBALS._player.setVisage(304); } else { _vechile.setVisage(580); @@ -224,7 +224,7 @@ void Scene550::postInit(SceneObjectList *OwnerList) { _vechile.setFrame(2); BF_GLOBALS._player.setVisage(303); - } + } } BF_GLOBALS._sceneItems.push_back(&_vechile); @@ -299,7 +299,7 @@ void Scene551::Action2::signal() { BF_GLOBALS._walkRegions.enableRegion(18); BF_GLOBALS._walkRegions.enableRegion(4); scene->_field1CD2 = 1; - + scene->_harrison.setObjectWrapper(new SceneObjectWrapper()); scene->_harrison.animate(ANIM_MODE_1, NULL); @@ -506,7 +506,7 @@ void Scene551::TrunkInset::remove() { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 0; - scene->setAction(&scene->_sequenceManager, scene, 5516, &scene->_harrison, + scene->setAction(&scene->_sequenceManager, scene, 5516, &scene->_harrison, &scene->_patrolCarTrunk, NULL); FocusObject::remove(); @@ -711,7 +711,7 @@ void Scene551::postInit(SceneObjectList *OwnerList) { _object12.show(); _object12.setDetails(550, 25, -1, 26, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.push_front(&_object12); - + _harrison.postInit(); _harrison.setVisage(304); _harrison.setPosition(Common::Point(67, 102)); @@ -1076,7 +1076,7 @@ void Scene560::SafeInset::postInit(SceneObjectList *OwnerList) { _item4.setDetails(Rect(143, 86, 159, 102), 560, 49, 50, -1, 1, NULL); _item5.setDetails(Rect(159, 86, 175, 102), 560, 49, 50, -1, 1, NULL); _item6.setDetails(Rect(175, 86, 191, 102), 560, 49, 50, -1, 1, NULL); - + BF_GLOBALS._sceneItems.remove(&_item1); BF_GLOBALS._sceneItems.remove(&_item2); BF_GLOBALS._sceneItems.remove(&_item3); @@ -1114,9 +1114,9 @@ void Scene560::SafeInset::postInit(SceneObjectList *OwnerList) { _digit0.setStrip(3); _digit0.setPosition(Common::Point(183, 94)); _digit0.fixPriority(252); - + int amount = (BF_GLOBALS._safeCombination != 0) ? BF_GLOBALS._safeCombination : 1000; - + // Get digit 0 portion int remainder = amount % 10; amount /= 10; @@ -1135,7 +1135,7 @@ void Scene560::SafeInset::postInit(SceneObjectList *OwnerList) { void Scene560::SafeInset::remove() { Scene560 *scene = (Scene560 *)BF_GLOBALS._sceneManager._scene; - + _item1.remove(); _item2.remove(); _item3.remove(); @@ -1145,7 +1145,7 @@ void Scene560::SafeInset::remove() { _digit2.remove(); _digit1.remove(); _digit0.remove(); - + scene->_nickel.remove(); if (BF_GLOBALS._events.getCursor() == CURSOR_USE) { @@ -1293,7 +1293,7 @@ bool Scene560::SafeInset::Item::startAction(CursorType action, Event &event) { default: break; } - + scene->_safeInset.signal(); scene->_sound1.play(75); return true; @@ -1345,7 +1345,7 @@ bool Scene560::BoxInset::Item1::startAction(CursorType action, Event &event) { scene->_safeInset.setPosition(Common::Point(160, 141)); scene->_safeInset.fixPriority(251); scene->_safeInset.setDetails(560, 45, 46, -1); - + scene->_sceneMode = 3; scene->_boxInset.remove(); @@ -1414,7 +1414,7 @@ void Scene560::postInit(SceneObjectList *OwnerList) { _deskChair.setPosition(Common::Point(81, 149)); _deskChair.fixPriority(151); _deskChair.changeZoom(81); - + if (BF_GLOBALS._sceneManager._previousScene == 570) { // Returning from using computer BF_GLOBALS._events.setCursor(CURSOR_USE); @@ -1448,7 +1448,7 @@ void Scene560::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player._moveDiff.x = 11; BF_GLOBALS._player.changeZoom(-1); BF_GLOBALS._player.disableControl(); - + _sceneMode = 10; ADD_MOVER(BF_GLOBALS._player, 85, 115); } @@ -1516,7 +1516,7 @@ void Scene560::signal() { T2_GLOBALS._uiElements.addScore(10); BF_GLOBALS.setFlag(fGotPointsForPunch); } - + _boxInset.postInit(); _boxInset.setVisage(560); _boxInset.setStrip(2); @@ -1605,7 +1605,7 @@ void Scene570::PasswordEntry::postInit(SceneObjectList *OwnerList) { void Scene570::PasswordEntry::process(Event &event) { Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; bool entryChanged = false; - + switch (event.eventType) { case EVENT_KEYPRESS: { int key = toupper(event.kbd.ascii); @@ -1648,7 +1648,7 @@ void Scene570::PasswordEntry::process(Event &event) { _entryText.setPosition(Common::Point(213, 40)); _entryText.fixPriority(255); _entryText.setup(_entryBuffer); - + // Pad entered text with spaces to make up the allowed width and then display Common::String msg = _entryBuffer; while (msg.size() < 10) @@ -1658,7 +1658,7 @@ void Scene570::PasswordEntry::process(Event &event) { } void Scene570::PasswordEntry::checkPassword() { - // Check if the password is correctly entered as 'JACKIE' or, as a nod to the + // Check if the password is correctly entered as 'JACKIE' or, as a nod to the // reimplementation in ScummVM, as the project name. Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; @@ -1794,7 +1794,7 @@ void Scene570::Icon::remove() { } bool Scene570::Icon::startAction(CursorType action, Event &event) { - Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; + Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; switch (action) { case CURSOR_LOOK: @@ -1907,7 +1907,7 @@ bool Scene570::Icon::startAction(CursorType action, Event &event) { } void Scene570::Icon::setDetails(int iconId, int folderId, int parentFolderId, int unused, const Common::String &msg) { - Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; + Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; NamedObject::postInit(); _iconId = iconId; @@ -1929,7 +1929,7 @@ void Scene570::Icon::setDetails(int iconId, int folderId, int parentFolderId, in /*--------------------------------------------------------------------------*/ bool Scene570::PowerSwitch::startAction(CursorType action, Event &event) { - Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; + Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; switch (action) { case CURSOR_USE: @@ -1972,7 +1972,7 @@ bool Scene570::PrinterIcon::startAction(CursorType action, Event &event) { } void Scene570::Object3::remove() { - Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; + Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; scene->_object4._flag = 0; scene->_printerIcon.remove(); @@ -1998,7 +1998,7 @@ void Scene570::Object3::remove() { /*--------------------------------------------------------------------------*/ bool Scene570::FloppyDrive::startAction(CursorType action, Event &event) { - Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; + Scene570 *scene = (Scene570 *)BF_GLOBALS._sceneManager._scene; switch (action) { case CURSOR_USE: @@ -2326,7 +2326,7 @@ bool Scene590::Skip::startAction(CursorType action, Event &event) { } else { scene->_stripNumber = !scene->_field17DC ? 5901 : 5902; } - + scene->setAction(&scene->_action1); scene->_field17DC = 1; return true; @@ -2404,7 +2404,7 @@ void Scene590::Action2::signal() { case 4: scene->_skip.setStrip(1); scene->_skip.animate(ANIM_MODE_1, NULL); - + BF_GLOBALS._player.setVisage(368); BF_GLOBALS._player.setStrip(7); BF_GLOBALS._player.setPosition(Common::Point(238, 131)); @@ -2456,7 +2456,7 @@ void Scene590::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_skipSpeaker); _stripManager.addSpeaker(&_lauraSpeaker); _stripManager.addSpeaker(&_jakeJacketSpeaker); - + if (BF_GLOBALS.getFlag(onDuty)) { BF_GLOBALS._player.setVisage(361); BF_GLOBALS._player._moveDiff = Common::Point(6, 2); @@ -2488,7 +2488,7 @@ void Scene590::postInit(SceneObjectList *OwnerList) { _item10.setDetails(13, 590, 9, -1, 21, 1); _item11.setDetails(15, 590, 10, -1, 22, 1); _item12.setDetails(17, 590, 11, -1, 23, 1); - + BF_GLOBALS._player.disableControl(); _sceneMode = 0; setAction(&_sequenceManager, this, 5900, &BF_GLOBALS._player, NULL); diff --git a/engines/tsage/blue_force/blueforce_scenes5.h b/engines/tsage/blue_force/blueforce_scenes5.h index 76bf4cdbc3..73d323fc54 100644 --- a/engines/tsage/blue_force/blueforce_scenes5.h +++ b/engines/tsage/blue_force/blueforce_scenes5.h @@ -228,7 +228,7 @@ public: NamedHotspot _chair, _lamp, _item4, _trophy, _watercolours, _fileCabinets; NamedHotspot _certificate, _bookcase, _desk, _carpet, _item12, _office; ASound _sound1; - bool _field380; + bool _field380; bool _field11EA; Common::Point _destPosition; diff --git a/engines/tsage/blue_force/blueforce_scenes6.cpp b/engines/tsage/blue_force/blueforce_scenes6.cpp index e5e7c71bef..9467df7917 100644 --- a/engines/tsage/blue_force/blueforce_scenes6.cpp +++ b/engines/tsage/blue_force/blueforce_scenes6.cpp @@ -49,7 +49,7 @@ void Scene600::Action1::signal() { break; case 2: scene->_sound1.play(59); - setAction(&scene->_sequenceManager, this, 600, &scene->_object2, &scene->_ryan, + setAction(&scene->_sequenceManager, this, 600, &scene->_object2, &scene->_ryan, &BF_GLOBALS._player, &scene->_skidMarks, NULL); break; case 3: @@ -149,7 +149,7 @@ void Scene600::remove() { void Scene620::postInit(SceneObjectList *OwnerList) { SceneExt::postInit(); loadScene(999); - + BF_GLOBALS._player.postInit(); BF_GLOBALS._player.disableControl(); BF_GLOBALS._player.setVisage(621); @@ -176,14 +176,14 @@ void Scene620::signal() { case 13: case 16: case 19: - addFader((const byte *)&black, 2, this); + addFader((const byte *)&black, 2, this); break; case 2: BF_GLOBALS._player.remove(); _object1.postInit(); _object1.setVisage(622); _object1.setPosition(Common::Point(101, 41)); - add2Faders((const byte *)&black, 2, 622, this); + add2Faders((const byte *)&black, 2, 622, this); break; case 5: _object1.remove(); @@ -441,7 +441,7 @@ void Scene690::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._dayNumber = 1; _stripManager.addSpeaker(&_jakeSpeaker); - + _object1.postInit(); _object1.setVisage(690); _object1.setStrip2(2); diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp index ceee748374..5a60cd7c5e 100644 --- a/engines/tsage/blue_force/blueforce_scenes8.cpp +++ b/engines/tsage/blue_force/blueforce_scenes8.cpp @@ -434,7 +434,7 @@ void Scene810::Action2::signal() { scene->_lyle.setVisage(813); scene->_lyle.setStrip(2); scene->_lyle.setFrame(1); - + ADD_PLAYER_MOVER(84, 113); break; case 5: @@ -611,7 +611,7 @@ bool Scene810::Lyle::startAction(CursorType action, Event &event) { default: return NamedObjectExt::startAction(action, event); } -} +} bool Scene810::Chair::startAction(CursorType action, Event &event) { switch (action) { @@ -709,7 +709,7 @@ bool Scene810::Object5::startAction(CursorType action, Event &event) { case CURSOR_USE: { scene->_sceneMode = 8195; BF_GLOBALS._player.disableControl(); - + PlayerMover *mover = new PlayerMover(); Common::Point destPos(67, 111); BF_GLOBALS._player.addMover(mover, &destPos, scene); @@ -804,7 +804,7 @@ bool Scene810::FaxMachine::startAction(CursorType action, Event &event) { scene->_sceneMode = 811; if (BF_GLOBALS._sceneObjects->contains(&scene->_lyle)) { - scene->setAction(&scene->_sequenceManager1, scene, BF_GLOBALS.getFlag(onDuty) ? 8108 : 8105, + 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, @@ -1058,12 +1058,12 @@ void Scene810::postInit(SceneObjectList *OwnerList) { case 820: BF_GLOBALS._player.setStrip(7); BF_GLOBALS._player.setPosition(Common::Point(278, 116)); - + _lyle.setVisage(845); _lyle.setPosition(Common::Point(340, 175)); _lyle.setObjectWrapper(new SceneObjectWrapper()); _lyle.animate(ANIM_MODE_1, NULL); - + _chair.show(); BF_GLOBALS._player.disableControl(); @@ -1121,7 +1121,7 @@ void Scene810::postInit(SceneObjectList *OwnerList) { _item12._sceneRegionId = 8; BF_GLOBALS._sceneItems.push_back(&_item12); - BF_GLOBALS._sceneItems.addItems(&_microficheReader, &_map, &_window, &_bookcase, &_garbageCan, + BF_GLOBALS._sceneItems.addItems(&_microficheReader, &_map, &_window, &_bookcase, &_garbageCan, &_fileCabinets, &_coffeeMaker, &_shelves, &_background, NULL); _background.setBounds(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y)); } @@ -1276,7 +1276,7 @@ void Scene810::dispatch() { _lyle.updateAngle(BF_GLOBALS._player._position); } - if (BF_GLOBALS._sceneObjects->contains(&_faxMachineInset) && (BF_GLOBALS._player._position.x != 67) && + if (BF_GLOBALS._sceneObjects->contains(&_faxMachineInset) && (BF_GLOBALS._player._position.x != 67) && (BF_GLOBALS._player._position.y != 111)) { _faxMachineInset.remove(); } @@ -1341,7 +1341,7 @@ bool Scene820::PowerButton::startAction(CursorType action, Event &event) { BF_GLOBALS._scenePalette.loadPalette(821); BF_GLOBALS._scenePalette.refresh(); - SceneItem::display(820, scene->_pageNumber, SET_WIDTH, 240, SET_X, 41, SET_Y, 0, + SceneItem::display(820, scene->_pageNumber, SET_WIDTH, 240, SET_X, 41, SET_Y, 0, SET_FONT, 50, SET_FG_COLOR, 18, SET_EXT_BGCOLOR, 12, SET_KEEP_ONSCREEN, true, LIST_END); } else { BF_GLOBALS._scenePalette.loadPalette(820); @@ -1388,7 +1388,7 @@ bool Scene820::BackButton::startAction(CursorType action, Event &event) { scene->_object5.hide(); } - SceneItem::display(820, scene->_pageNumber, SET_WIDTH, 240, SET_X, 41, SET_Y, 0, + SceneItem::display(820, scene->_pageNumber, SET_WIDTH, 240, SET_X, 41, SET_Y, 0, SET_FONT, 50, SET_FG_COLOR, 18, SET_EXT_BGCOLOR, 12, SET_KEEP_ONSCREEN, true, LIST_END); return true; default: @@ -1419,7 +1419,7 @@ bool Scene820::ForwardButton::startAction(CursorType action, Event &event) { if (scene->_pageNumber < 4) ++scene->_pageNumber; - SceneItem::display(820, scene->_pageNumber, SET_WIDTH, 240, SET_X, 41, SET_Y, 0, + SceneItem::display(820, scene->_pageNumber, SET_WIDTH, 240, SET_X, 41, SET_Y, 0, SET_FONT, 50, SET_FG_COLOR, 18, SET_EXT_BGCOLOR, 12, SET_KEEP_ONSCREEN, true, LIST_END); if (scene->_pageNumber == 4) { @@ -1447,7 +1447,7 @@ void Scene820::synchronize(Serializer &s) { void Scene820::postInit(SceneObjectList *OwnerList) { SceneExt::postInit(); loadScene(820); - + _stripManager.addSpeaker(&_gameTextSpeaker); _powerButton.postInit(); @@ -3115,7 +3115,7 @@ void Scene870::postInit(SceneObjectList *OwnerList) { _lyle.setPosition(Common::Point(156, 148)); _lyle.fixPriority(149); } - + if ((BF_INVENTORY.getObjectScene(INV_HANDCUFFS) != 1) && (BF_INVENTORY.getObjectScene(INV_GRENADES) == 355)) { _object4.postInit(); @@ -3135,7 +3135,7 @@ void Scene870::postInit(SceneObjectList *OwnerList) { } break; } - + _boat.setDetails(7, 870, 3, 4, 5, 1); _crate.setDetails(14, 870, 12, 13, 14, 1); _water.setDetails(5, 870, 24, 25, 26, 1); @@ -3393,7 +3393,7 @@ void Scene880::postInit(SceneObjectList *OwnerList) { _object4.setFrame2(_object4.getFrameCount()); _object4.fixPriority(160); _object4.setPosition(Common::Point(255, 148)); - + _seqNumber = 8816; } else if (BF_GLOBALS.getFlag(fBlowUpGoon)) { _object4.setStrip(7); @@ -3405,7 +3405,7 @@ void Scene880::postInit(SceneObjectList *OwnerList) { } else { _object4.setStrip(2); _object4.setPosition(Common::Point(258, 147)); - + _object3.postInit(); _object3.setVisage(871); _object3.setStrip(4); @@ -3600,7 +3600,7 @@ void Scene880::handleAction(Action *action) { action->_owner = NULL; } } - + void Scene880::dispatch() { SceneExt::dispatch(); diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp index f5705eb471..a303576928 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.cpp +++ b/engines/tsage/blue_force/blueforce_scenes9.cpp @@ -386,7 +386,7 @@ void Scene900::Action3::signal() { break; default: break; - } + } } void Scene900::Action4::signal() { @@ -540,7 +540,7 @@ void Scene900::postInit(SceneObjectList *OwnerList) { _lyle.setDetails(900, 19, 20, 21, ANIM_MODE_1, (SceneItem *)NULL); _lyle.animate(ANIM_MODE_1, NULL); _lyle.setObjectWrapper(new SceneObjectWrapper()); - } + } _sceneMode = 9000; setAction(&_sequenceManager1, this, 9000, &BF_GLOBALS._player, NULL); @@ -2125,7 +2125,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { _lyle.setFrame(3); _lyle._field90 = 1; _lyle.setDetails(910, 69, 70 ,71 , 5, &_item4); - + BF_GLOBALS._walkRegions.disableRegion(15); BF_GLOBALS._walkRegions.disableRegion(16); BF_GLOBALS._walkRegions.disableRegion(14); diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index f7ba5c20f2..82645f2d62 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -305,7 +305,7 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) { if (ri != g_globals->_sceneRegions.end()) { // Fill out the areas defined by the region Region &r = *ri; - + for (int y = r._bounds.top; y < r._bounds.bottom; ++y) { LineSliceSet set = r.getLineSlices(y); @@ -615,7 +615,7 @@ bool BlueForceDebugger::Cmd_MoveObject(int argc, const char **argv) { if ((objNum > 0) && (objNum < 65)) BF_INVENTORY.setObjectScene(objNum, sceneNum); - else + else DebugPrintf("Invalid object Id %s\n", argv[1]); return true; @@ -702,7 +702,7 @@ bool Ringworld2Debugger::Cmd_MoveObject(int argc, const char **argv) { if ((objNum > 0) && (objNum < 53)) R2_INVENTORY.setObjectScene(objNum, sceneNum); - else + else DebugPrintf("Invalid object Id %s\n", argv[1]); return true; diff --git a/engines/tsage/events.h b/engines/tsage/events.h index cf2d1a34ed..475db47315 100644 --- a/engines/tsage/events.h +++ b/engines/tsage/events.h @@ -86,25 +86,25 @@ enum CursorType { INV_CARAVAN_KEY = 67, BF_LAST_INVENT = 68, // Ringworld 2 objects - R2_OPTO_DISK = 1, R2_READER = 2, R2_NEGATOR_GUN = 3, R2_STEPPING_DISKS = 4, - R2_ATTRACTOR_UNIT = 5, R2_SENSOR_PROBE = 6, R2_SONIC_STUNNER = 7, - R2_CABLE_HARNESS = 8, R2_COM_SCANNER = 9, R2_SPENT_POWER_CAPSULE = 10, - R2_CHARGED_POWER_CAPSULE = 11, R2_AEROSOL = 12, R2_REMOTE_CONTROL = 13, - R2_OPTICAL_FIBRE = 14, R2_CLAMP = 15, R2_ATTRACTOR_CABLE_HARNESS = 16, - R2_FUEL_CELL = 17, R2_GYROSCOPE = 18, R2_AIRBAG = 19, R2_REBREATHER_TANK = 20, + R2_OPTO_DISK = 1, R2_READER = 2, R2_NEGATOR_GUN = 3, R2_STEPPING_DISKS = 4, + R2_ATTRACTOR_UNIT = 5, R2_SENSOR_PROBE = 6, R2_SONIC_STUNNER = 7, + R2_CABLE_HARNESS = 8, R2_COM_SCANNER = 9, R2_SPENT_POWER_CAPSULE = 10, + R2_CHARGED_POWER_CAPSULE = 11, R2_AEROSOL = 12, R2_REMOTE_CONTROL = 13, + R2_OPTICAL_FIBRE = 14, R2_CLAMP = 15, R2_ATTRACTOR_CABLE_HARNESS = 16, + R2_FUEL_CELL = 17, R2_GYROSCOPE = 18, R2_AIRBAG = 19, R2_REBREATHER_TANK = 20, R2_RESERVE_REBREATHER_TANK = 21, R2_GUIDANCE_MODULE = 22, R2_THRUSTER_VALVE = 23, - R2_BALLOON_BACKPACK = 24, R2_RADAR_MECHANISM = 25, R2_JOYSTICK = 26, - R2_IGNITOR = 27, R2_DIAGNOSTICS_DISPLAY = 28, R2_GLASS_DOME = 29, R2_WICK_LAMP = 30, - R2_SCRITH_KEY = 31, R2_TANNER_MASK = 32, R2_PURE_GRAIN_ALCOHOL = 33, R2_SAPPHIRE_BLUE = 34, - R2_ANCIENT_SCROLLS = 35, R2_FLUTE = 36, R2_GUNPOWDER = 37, R2_NONAME = 38, + R2_BALLOON_BACKPACK = 24, R2_RADAR_MECHANISM = 25, R2_JOYSTICK = 26, + R2_IGNITOR = 27, R2_DIAGNOSTICS_DISPLAY = 28, R2_GLASS_DOME = 29, R2_WICK_LAMP = 30, + R2_SCRITH_KEY = 31, R2_TANNER_MASK = 32, R2_PURE_GRAIN_ALCOHOL = 33, R2_SAPPHIRE_BLUE = 34, + R2_ANCIENT_SCROLLS = 35, R2_FLUTE = 36, R2_GUNPOWDER = 37, R2_NONAME = 38, R2_COM_SCANNER_2 = 39, R2_SUPERCONDUCTOR_WIRE = 40, R2_PILLOW = 41, R2_FOOD_TRAY = 42, - R2_LASER_HACKSAW = 43, R2_PHOTON_STUNNER = 44, R2_BATTERY = 45, R2_SOAKED_FACEMASK = 46, - R2_LIGHT_BULB = 47, R2_ALCOHOL_LAMP = 48, R2_ALCOHOL_LAMP_2 = 49, R2_ALCOHOL_LAMP_3 = 50, + R2_LASER_HACKSAW = 43, R2_PHOTON_STUNNER = 44, R2_BATTERY = 45, R2_SOAKED_FACEMASK = 46, + R2_LIGHT_BULB = 47, R2_ALCOHOL_LAMP = 48, R2_ALCOHOL_LAMP_2 = 49, R2_ALCOHOL_LAMP_3 = 50, R2_BROKEN_DISPLAY = 51, R2_TOOLBOX = 52, R2_LAST_INVENT = 53, // Ringworld 2 cursors - R2CURSORS_START = 0x8000, EXITCURSOR_N = 0x8007, EXITCURSOR_S = 0x8008, EXITCURSOR_W = 0x8009, - EXITCURSOR_E = 0x800A, EXITCURSOR_LEFT_HAND = 0x800B, CURSOR_INVALID = 0x800C, + R2CURSORS_START = 0x8000, EXITCURSOR_N = 0x8007, EXITCURSOR_S = 0x8008, EXITCURSOR_W = 0x8009, + EXITCURSOR_E = 0x800A, EXITCURSOR_LEFT_HAND = 0x800B, CURSOR_INVALID = 0x800C, EXITCURSOR_NE = 0x800D, EXITCURSOR_SE = 0x800E, EXITCURSOR_SW = 0x800F, EXITCURSOR_NW = 0x8010, SHADECURSOR_UP = 0x8011, SHADECURSOR_DOWN = 0x8012, SHADECURSOR_HAND = 0x8013, R2_CURSOR_20 = 0x8014, R2_CURSOR_21 = 0x8015, R2_CURSOR_22 = 0x8016, R2_CURSOR_23 = 0x8017, diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index acb615abae..5ddc7b6a1a 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -266,7 +266,7 @@ void GfxSurface::updateScreen() { continue; const byte *srcP = (const byte *)_customSurface->getBasePtr(r.left, r.top); - g_system->copyRectToScreen(srcP, _customSurface->pitch, r.left, r.top, + g_system->copyRectToScreen(srcP, _customSurface->pitch, r.left, r.top, r.width(), r.height()); } @@ -287,7 +287,7 @@ void GfxSurface::addDirtyRect(const Rect &r) { r2.translate(_bounds.left, _bounds.top); // Add to the dirty rect list - _dirtyRects.push_back(Rect(r2.left, r2.top, + _dirtyRects.push_back(Rect(r2.left, r2.top, MIN(r2.right + 1, SCREEN_WIDTH), MIN(r2.bottom + 1, SCREEN_HEIGHT))); } } @@ -1194,7 +1194,7 @@ void GfxDialog::setPalette() { g_globals->_scenePalette.setPalette(g_globals->_fontColors.background, 1); g_globals->_scenePalette.setPalette(g_globals->_fontColors.foreground, 1); g_globals->_scenePalette.setEntry(255, 0xff, 0xff, 0xff); - g_globals->_scenePalette.setPalette(255, 1); + g_globals->_scenePalette.setPalette(255, 1); } else { g_globals->_scenePalette.loadPalette(0); g_globals->_scenePalette.setPalette(0, 1); diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp index 0afae0042f..5987d78067 100644 --- a/engines/tsage/resources.cpp +++ b/engines/tsage/resources.cpp @@ -326,7 +326,7 @@ uint32 TLib::getResourceStart(ResourceType resType, uint16 resNum, uint16 rlbNum // Load in the section index loadSection((*i).fileOffset); - + // Scan for an entry for the given Id ResourceEntry *re = NULL; ResourceList::iterator iter; @@ -341,7 +341,7 @@ uint32 TLib::getResourceStart(ResourceType resType, uint16 resNum, uint16 rlbNum if (!re || re->isCompressed) error("Invalid resource Id #%d", rlbNum); - // Return the resource entry as well as the file offset + // Return the resource entry as well as the file offset entry = *re; return _sections.fileOffset + entry.fileOffset; } @@ -441,7 +441,7 @@ bool TLib::getMessage(int resNum, int lineNum, Common::String &result, bool supp while (lineNum-- > 0) { srcP += strlen(srcP) + 1; - + if (srcP >= endP) { if (suppressErrors) return false; @@ -537,7 +537,7 @@ Common::String ResourceManager::getMessage(int resNum, int lineNum, bool suppres * Open up the given resource file using a passed file object. If the desired entry is found * in the index, return the index entry for it, and move the file to the start of the resource */ -bool ResourceManager::scanIndex(Common::File &f, ResourceType resType, int rlbNum, int resNum, +bool ResourceManager::scanIndex(Common::File &f, ResourceType resType, int rlbNum, int resNum, ResourceEntry &resEntry) { // Load the root section index ResourceList resList; diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp index 5178fe6418..30ae6be7b1 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp +++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp @@ -389,7 +389,7 @@ HelpDialog::HelpDialog() { _msgTitle._bounds.moveTo(5, 0); _msgVersion.set(GAME_VERSION, 172, ALIGN_CENTER); _msgVersion._bounds.moveTo(5, _msgTitle._bounds.bottom + 3); - addElements(&_msgTitle, &_msgVersion, NULL); + addElements(&_msgTitle, &_msgVersion, NULL); // Set buttons _btnList[0].setText(F2); diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index d5cbde81be..b420a375a3 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -40,16 +40,16 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { switch (sceneNumber) { /* Scene group #0 */ - case 50: + case 50: // Waking up cutscene return new Scene50(); - case 100: + case 100: // Quinn's room return new Scene100(); - case 125: + case 125: // Computer console return new Scene125(); - case 150: + case 150: // Empty Bedroom #1 return new Scene150(); case 160: @@ -166,7 +166,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { // Ice Maze: Large empty room return new Scene2400(); case 2425: - // Ice Maze: + // Ice Maze: return new Scene2425(); case 2430: // Ice Maze: Bedroom @@ -326,7 +326,7 @@ void SceneExt::postInit(SceneObjectList *OwnerList) { int prevScene = R2_GLOBALS._sceneManager._previousScene; int sceneNumber = R2_GLOBALS._sceneManager._sceneNumber; - if (((prevScene == -1) && (sceneNumber != 180) && (sceneNumber != 205) && (sceneNumber != 50)) + if (((prevScene == -1) && (sceneNumber != 180) && (sceneNumber != 205) && (sceneNumber != 50)) || (sceneNumber == 50) || ((prevScene == 205) && (sceneNumber == 100)) || ((prevScene == 180) && (sceneNumber == 100))) { @@ -549,7 +549,7 @@ void SceneExt::scalePalette(int RFactor, int GFactor, int BFactor) { tmp += abs(tmpPal[(3 * j) + 2] - newB); if (tmp >= varC) continue; - + varC = tmp; varD = j; } @@ -628,11 +628,11 @@ void SceneHandlerExt::setupPaletteMaps() { diffSum += ABS(palP[pIndex2 * 3 + 1] - g); if (diffSum >= threshold) continue; - + diffSum += ABS(palP[pIndex2 * 3 + 2] - b); if (diffSum >= threshold) continue; - + threshold = diffSum; foundIndex = pIndex2; } @@ -1257,12 +1257,12 @@ void SceneAreaObject::setDetails(int visage, int strip, int frameNumber, const C _cursorNum = CURSOR_INVALID; Scene500 *scene = (Scene500 *)R2_GLOBALS._sceneManager._scene; scene->_sceneAreas.push_front(this); - + _insetCount = ++R2_GLOBALS._insetUp; } void SceneAreaObject::setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum) { - ((SceneHotspot *)(this))->setDetails(resNum, lookLineNum, talkLineNum, useLineNum, + ((SceneHotspot *)(this))->setDetails(resNum, lookLineNum, talkLineNum, useLineNum, 2, (SceneItem *)NULL); } @@ -1306,7 +1306,7 @@ void UnkObject1200::sub51AE9(int arg1) { int UnkObject1200::sub51AF8(Common::Point pt) { if (!_rect1.contains(pt)) return -1; - + int tmp1 = (pt.x - _rect1.left + _field2E) / _field2A; int tmp2 = (pt.y - _rect1.top + _field30) / _field2C; @@ -1358,7 +1358,7 @@ void UnkObject1200::sub9EDE8(Rect rect) { int UnkObject1200::sub9EE22(int &arg1, int &arg2) { arg1 /= _field2A; arg2 /= _field2C; - + if ((arg1 >= 0) && (arg2 >= 0) && (_field26 > arg1) && (_field28 > arg2)) { return _field16[(((_field26 * arg2) + arg1) * 2)]; } @@ -1368,13 +1368,13 @@ int UnkObject1200::sub9EE22(int &arg1, int &arg2) { void Scene1200::sub9DAD6(int indx) { _object1.sub9EE22(R2_GLOBALS._v56AA2, R2_GLOBALS._v56AA4); - + switch (indx) { case 0: - if ( ((_object1.sub51AF8(Common::Point(200, 50)) > 36) || (_object1.sub51AF8(Common::Point(200, 88)) > 36)) - && ( ((R2_GLOBALS._v56AA2 == 3) && (R2_GLOBALS._v56AA4 == 33) && (_field418 != 4)) - || ((R2_GLOBALS._v56AA2 == 13) && (R2_GLOBALS._v56AA4 == 21) && (_field418 != 2)) - || ((R2_GLOBALS._v56AA2 == 29) && (R2_GLOBALS._v56AA4 == 17) && (_field418 != 1)) + if ( ((_object1.sub51AF8(Common::Point(200, 50)) > 36) || (_object1.sub51AF8(Common::Point(200, 88)) > 36)) + && ( ((R2_GLOBALS._v56AA2 == 3) && (R2_GLOBALS._v56AA4 == 33) && (_field418 != 4)) + || ((R2_GLOBALS._v56AA2 == 13) && (R2_GLOBALS._v56AA4 == 21) && (_field418 != 2)) + || ((R2_GLOBALS._v56AA2 == 29) && (R2_GLOBALS._v56AA4 == 17) && (_field418 != 1)) || ((R2_GLOBALS._v56AA2 == 33) && (R2_GLOBALS._v56AA4 == 41)) ) ) { R2_GLOBALS._player.disableControl(); @@ -1415,10 +1415,10 @@ void Scene1200::sub9DAD6(int indx) { } break; case 1: - if ( ((_object1.sub51AF8(Common::Point(120, 50)) > 36) || (_object1.sub51AF8(Common::Point(120, 88)) > 36)) - && ( ((R2_GLOBALS._v56AA2 == 7) && (R2_GLOBALS._v56AA4 == 33) && (_field418 != 4)) - || ((R2_GLOBALS._v56AA2 == 17) && (R2_GLOBALS._v56AA4 == 21) && (_field418 != 2)) - || ((R2_GLOBALS._v56AA2 == 33) && (R2_GLOBALS._v56AA4 == 17) && (_field418 != 1)) + if ( ((_object1.sub51AF8(Common::Point(120, 50)) > 36) || (_object1.sub51AF8(Common::Point(120, 88)) > 36)) + && ( ((R2_GLOBALS._v56AA2 == 7) && (R2_GLOBALS._v56AA4 == 33) && (_field418 != 4)) + || ((R2_GLOBALS._v56AA2 == 17) && (R2_GLOBALS._v56AA4 == 21) && (_field418 != 2)) + || ((R2_GLOBALS._v56AA2 == 33) && (R2_GLOBALS._v56AA4 == 17) && (_field418 != 1)) || ((R2_GLOBALS._v56AA2 == 5) && (R2_GLOBALS._v56AA4 == 5)) ) ) { R2_GLOBALS._player.disableControl(); @@ -1459,8 +1459,8 @@ void Scene1200::sub9DAD6(int indx) { } break; case 2: - if ( ((_object1.sub51AF8(Common::Point(140, 110)) > 36) || (_object1.sub51AF8(Common::Point(178, 110)) > 36)) - && ( ((R2_GLOBALS._v56AA2 == 17) && (R2_GLOBALS._v56AA4 == 5) && (_field418 != 3)) + if ( ((_object1.sub51AF8(Common::Point(140, 110)) > 36) || (_object1.sub51AF8(Common::Point(178, 110)) > 36)) + && ( ((R2_GLOBALS._v56AA2 == 17) && (R2_GLOBALS._v56AA4 == 5) && (_field418 != 3)) || ((R2_GLOBALS._v56AA2 == 41) && (R2_GLOBALS._v56AA4 == 21)) ) ) { R2_GLOBALS._player.disableControl(); @@ -1501,8 +1501,8 @@ void Scene1200::sub9DAD6(int indx) { } break; case 3: - if ( ((_object1.sub51AF8(Common::Point(140, 30)) > 36) || (_object1.sub51AF8(Common::Point(178, 30)) > 36)) - && ( ((R2_GLOBALS._v56AA2 == 17) && (R2_GLOBALS._v56AA4 == 9) && (_field418 != 3)) + if ( ((_object1.sub51AF8(Common::Point(140, 30)) > 36) || (_object1.sub51AF8(Common::Point(178, 30)) > 36)) + && ( ((R2_GLOBALS._v56AA2 == 17) && (R2_GLOBALS._v56AA4 == 9) && (_field418 != 3)) || ((R2_GLOBALS._v56AA2 == 35) && (R2_GLOBALS._v56AA4 == 17)) ) ) { R2_GLOBALS._player.disableControl(); @@ -1574,10 +1574,10 @@ void AnimationPlayerSubData::load(Common::File &f) { AnimationPlayer::AnimationPlayer(): EventHandler() { _endAction = NULL; - + _fieldA = NULL; _field16 = NULL; - + _screenBounds = R2_GLOBALS._gfxManagerInstance._bounds; _rect1 = R2_GLOBALS._gfxManagerInstance._bounds; _field3C = 0; @@ -1608,7 +1608,7 @@ void AnimationPlayer::process(Event &event) { if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE) && (_field3A)) { _field90C = _subData._field6; - } + } } void AnimationPlayer::dispatch() { @@ -1643,7 +1643,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) { // Set the end action _endAction = endAction; - + // Load the sub data block _subData.load(_resourceFile); @@ -1659,7 +1659,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) { int v = (_subData._field12 + 2) * _subData._field14 * _subData._fieldC; _field900 = (_subData._field16 / _subData._fieldC) + v + 96; } - + _animData = _fieldA = new byte[_field900]; if (_subData._fieldC <= 1) { diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 9af4c7b534..3c9956282a 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -125,17 +125,17 @@ bool Scene100::Table::startAction(CursorType action, Event &event) { scene->_stasisNegator.setDetails(100, 21, 22, 23, 2, (SceneItem *)NULL); } - scene->setAction(&scene->_sequenceManager2, scene, 108, this, &scene->_object3, + scene->setAction(&scene->_sequenceManager2, scene, 108, this, &scene->_object3, &scene->_stasisNegator, &R2_GLOBALS._player, NULL); } else { scene->_sceneMode = 109; - scene->setAction(&scene->_sequenceManager2, scene, 109, this, &scene->_object3, + scene->setAction(&scene->_sequenceManager2, scene, 109, this, &scene->_object3, &scene->_stasisNegator, &R2_GLOBALS._player, NULL); } return true; case CURSOR_TALK: R2_GLOBALS._player.disableControl(); - + if (_strip == 2) { SceneItem::display2(100, 18); scene->_sceneMode = 102; @@ -149,12 +149,12 @@ bool Scene100::Table::startAction(CursorType action, Event &event) { scene->_stasisNegator.setDetails(100, 21, 22, 23, 2, (SceneItem *)NULL); } - scene->setAction(&scene->_sequenceManager2, scene, 102, this, &scene->_object3, + scene->setAction(&scene->_sequenceManager2, scene, 102, this, &scene->_object3, &scene->_stasisNegator, NULL); } else { SceneItem::display2(100, 19); scene->_sceneMode = 103; - scene->setAction(&scene->_sequenceManager2, scene, 103, this, &scene->_object3, + scene->setAction(&scene->_sequenceManager2, scene, 103, this, &scene->_object3, &scene->_stasisNegator, NULL); } return true; @@ -264,7 +264,7 @@ void Scene100::postInit(SceneObjectList *OwnerList) { _bedLights2.setup(100, 3, 1); _bedLights2.setPosition(Common::Point(89, 147)); _bedLights2.fixPriority(250); - _bedLights2.animate(ANIM_MODE_7, 0, NULL); + _bedLights2.animate(ANIM_MODE_7, 0, NULL); _bedLights2._numFrames = 3; _wardrobe.postInit(); @@ -289,7 +289,7 @@ void Scene100::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setVisage(10); R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.disableControl(); - + _background.setDetails(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 100, 0, 1, -1, 1, NULL); switch (R2_GLOBALS._sceneManager._previousScene) { @@ -330,7 +330,7 @@ void Scene100::signal() { case 109: _table.setStrip(2); _table.setFrame(3); - + _object3.remove(); _stasisNegator.remove(); R2_GLOBALS._player.enableControl(); @@ -413,7 +413,7 @@ Scene125::Icon::Icon(): SceneActor() { void Scene125::Icon::postInit(SceneObjectList *OwnerList) { SceneObject::postInit(); - + _object1.postInit(); _object1.fixPriority(255); _object1.hide(); @@ -621,7 +621,7 @@ void Scene125::postInit(SceneObjectList *OwnerList) { loadScene(160); _palette.loadPalette(0); - if (R2_GLOBALS._sceneManager._previousScene != 125) + if (R2_GLOBALS._sceneManager._previousScene != 125) // Save the prior scene to return to when the console is turned off R2_GLOBALS._player._oldCharacterScene[1] = R2_GLOBALS._sceneManager._previousScene; @@ -638,7 +638,7 @@ void Scene125::postInit(SceneObjectList *OwnerList) { _object6.postInit(); _object6.setup(162, 1, 1); _object6.setPosition(Common::Point(214, 168)); - + _item4.setDetails(Rect(27, 145, 81, 159), 126, 9, -1, -1, 1, NULL); _item3.setDetails(Rect(144, 119, 286, 167), 126, 6, 7, 8, 1, NULL); _item2.setDetails(1, 126, 3, 4, 5); @@ -669,7 +669,7 @@ void Scene125::signal() { _icon1._object2.postInit(); _icon1._object2.setup(160, 7, 1); _icon1._object2.setPosition(Common::Point(106, 41)); - + _icon2.setup(160, 1, 1); _icon2.setPosition(Common::Point(80, 32)); _icon2._object2.postInit(); @@ -766,7 +766,7 @@ void Scene125::signal() { case 11: R2_GLOBALS._player.enableControl(); R2_GLOBALS._player._canWalk = false; - + if ((_consoleMode >= 27) && (_consoleMode <= 30)) { consoleAction(11); } @@ -915,7 +915,7 @@ void Scene125::consoleAction(int id) { _icon2.hideIcon(); _icon3.hideIcon(); _icon5.setIcon(24); - + _icon4.setPosition(Common::Point(52, 107)); _icon4._sceneRegionId = 9; _icon4.setIcon(25); @@ -923,7 +923,7 @@ void Scene125::consoleAction(int id) { _icon6.setIcon(26); _sceneMode = 10; - + _palette.loadPalette(161); R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 5, this); break; @@ -958,7 +958,7 @@ void Scene125::consoleAction(int id) { _icon2.hideIcon(); _icon3.hideIcon(); _icon5.setIcon(24); - + _icon4.setPosition(Common::Point(52, 107)); _icon4._sceneRegionId = 9; _icon4.setIcon(25); @@ -966,7 +966,7 @@ void Scene125::consoleAction(int id) { _icon6.setIcon(26); _sceneMode = 10; - + _palette.loadPalette(161); R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 5, this); } @@ -1089,7 +1089,7 @@ void Scene125::consoleAction(int id) { _icon3.hideIcon(); _icon4.hideIcon(); _icon5.setIcon(24); - + _icon4.setPosition(Common::Point(52, 107)); _icon4._sceneRegionId = 9; _icon4.setIcon(25); @@ -1097,7 +1097,7 @@ void Scene125::consoleAction(int id) { _icon6.setIcon(26); _sceneMode = 10; - + _palette.loadPalette(161); R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 5, this); break; @@ -1134,7 +1134,7 @@ void Scene125::consoleAction(int id) { */ void Scene125::setDetails(int resNum, int lineNum) { stop(); - + Common::String msg = g_resourceManager->getMessage(resNum, lineNum, true); if (!msg.empty()) { @@ -1243,7 +1243,7 @@ void Scene150::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setVisage(10); R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.disableControl(); - + _background.setDetails(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 150, 0, 1, -1, 1, NULL); _sceneMode = 100; @@ -1420,7 +1420,7 @@ void Scene160::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player._uiEnabled = false; R2_GLOBALS._player.enableControl(); R2_GLOBALS._player._canWalk = false; - + R2_GLOBALS._uiElements.hide(); R2_GLOBALS._interfaceY = SCREEN_HEIGHT; @@ -1664,7 +1664,7 @@ void Scene180::signal() { case 15: setAction(&_sequenceManager, this, 4002, &_object4, &_object5, NULL); break; - + case 17: setAction(&_sequenceManager, this, 4003, &_object4, &_object5, NULL); break; @@ -1730,7 +1730,7 @@ void Scene180::signal() { case 32: _field412 = 1; - + _object2.postInit(); _object2.setPosition(Common::Point(161, 97)); _object2.hide(); @@ -1790,7 +1790,7 @@ void Scene180::signal() { _object4.remove(); _object5.setAction(NULL); _object5.remove(); - + R2_GLOBALS._sound2.fadeOut2(NULL); R2_GLOBALS._sound1.fadeOut2(NULL); break; @@ -2389,7 +2389,7 @@ void Scene205::dispatch() { void Scene205::setup() { const Common::Point pointList1[3] = { Common::Point(2, 50), Common::Point(100, 28), Common::Point(53, 15) }; const Common::Point pointList2[3] = { Common::Point(289, 192), Common::Point(125, 60), Common::Point(130, 40) }; - const Common::Point pointList3[4] = { + const Common::Point pointList3[4] = { Common::Point(140, 149), Common::Point(91, 166), Common::Point(299, 46), Common::Point(314, 10) }; @@ -2445,13 +2445,13 @@ void Scene205::setup() { /** * Handles moving a group of stars in the scene background */ -void Scene205::processList(Object **ObjList, int count, const Common::Rect &bounds, +void Scene205::processList(Object **ObjList, int count, const Common::Rect &bounds, int xMultiply, int yMultiply, int xCenter, int yCenter) { for (int idx = 0; idx < count; ++idx) { Object *obj = ObjList[idx]; Common::Point pt(obj->_position.x - xCenter, obj->_position.y - yCenter); - if ((obj->_position.x <= 319) && (obj->_position.x >= 0) && + if ((obj->_position.x <= 319) && (obj->_position.x >= 0) && (obj->_position.y <= 199) && (obj->_position.y >= 0)) { if (!pt.x && !pt.y) { pt.x = pt.y = 1; @@ -2484,7 +2484,7 @@ void Scene205::handleText() { GfxFont font; font.setFontNumber(4); int width = font.getStringWidth(_message.c_str()); - + _textList[_textIndex].setPosition(Common::Point(160 - (width / 2), _yp)); } @@ -2681,13 +2681,13 @@ void Scene250::signal() { _field412 += 12; R2_GLOBALS._player.setPosition(Common::Point(261, 185)); ADD_MOVER(R2_GLOBALS._player, 261, 15); - + if ((_field414 - 12) == _field412) _sceneMode = 4; break; case 4: _sound1.play(21); - + _currentFloor.setPosition(Common::Point(111, _currentFloor._position.y + 12)); R2_GLOBALS._player.setPosition(Common::Point(261, 185)); ADD_MOVER(R2_GLOBALS._player, 261, 15); @@ -2837,7 +2837,7 @@ void Scene300::Action2::signal() { case 2: if (!R2_GLOBALS._playStream.isPlaying()) _actionIndex = R2_GLOBALS._randomSource.getRandomNumber(1); - + setDelay(60 + R2_GLOBALS._randomSource.getRandomNumber(119)); break; default: @@ -2860,7 +2860,7 @@ void Scene300::Action3::signal() { case 2: if (!R2_GLOBALS._playStream.isPlaying()) _actionIndex = R2_GLOBALS._randomSource.getRandomNumber(1); - + setDelay(60 + R2_GLOBALS._randomSource.getRandomNumber(119)); break; default: @@ -2922,7 +2922,7 @@ bool Scene300::MirandaWorkstation::startAction(CursorType action, Event &event) if (R2_GLOBALS._player._characterIndex != 3) SceneItem::display2(300, 49); else - R2_GLOBALS._sceneManager.changeScene(325); + R2_GLOBALS._sceneManager.changeScene(325); return true; case CURSOR_LOOK: @@ -2952,7 +2952,7 @@ bool Scene300::SeekerWorkstation::startAction(CursorType action, Event &event) { if (R2_GLOBALS._player._characterIndex != 2) SceneItem::display2(300, 48); else - R2_GLOBALS._sceneManager.changeScene(325); + R2_GLOBALS._sceneManager.changeScene(325); return true; default: @@ -3107,7 +3107,7 @@ bool Scene300::Seeker::startAction(CursorType action, Event &event) { scene->_sceneMode = 310; scene->setAction(&scene->_sequenceManager1, scene, 310, &R2_GLOBALS._player, NULL); return true; - + default: break; } @@ -3153,7 +3153,7 @@ bool Scene300::Doorway::startAction(CursorType action, Event &event) { Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; if (action == CURSOR_USE) { - if ((R2_GLOBALS._player._characterIndex == R2_QUINN) && + if ((R2_GLOBALS._player._characterIndex == R2_QUINN) && (!R2_GLOBALS.getFlag(44) || R2_GLOBALS._player._characterScene[R2_MIRANDA] == 500)) { R2_GLOBALS._player.disableControl(); scene->_sceneMode = 301; @@ -3161,7 +3161,7 @@ bool Scene300::Doorway::startAction(CursorType action, Event &event) { } else { SceneItem::display2(300, 45); } - + return true; } else { return SceneActor::startAction(action, event); @@ -3373,7 +3373,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setup(302, 3, 1); R2_GLOBALS._player.setPosition(Common::Point(271, 150)); R2_GLOBALS._player.setAction(&_action1); - + if (R2_GLOBALS.getFlag(55)) { if (R2_GLOBALS.getFlag(57)) { R2_GLOBALS.clearFlag(60); @@ -3689,7 +3689,7 @@ void Scene300::signal309() { if (R2_GLOBALS.getFlag(39)) R2_GLOBALS._stripManager_lookupList[1] = 2; - + if (R2_GLOBALS.getFlag(5)) R2_GLOBALS._stripManager_lookupList[1] = 3; @@ -3728,7 +3728,7 @@ Scene325::Icon::Icon(): SceneActor() { void Scene325::Icon::postInit(SceneObjectList *OwnerList) { SceneObject::postInit(); - + _object1.postInit(); _object1.fixPriority(21); _object1.hide(); @@ -3895,7 +3895,7 @@ Scene325::Scene325(): SceneExt() { _field416 = _field418 = 0; _field41A = _field41C = _field41E = _field420 = 0; _soundCount = _soundIndex = 0; - + for (int idx = 0; idx < 10; ++idx) _soundQueue[idx] = 0; } @@ -3907,7 +3907,7 @@ void Scene325::postInit(SceneObjectList *OwnerList) { R2_GLOBALS.clearFlag(50); _stripManager.addSpeaker(&_quinnSpeaker); _palette.loadPalette(0); - + R2_GLOBALS._player.postInit(); R2_GLOBALS._player.hide(); R2_GLOBALS._player.disableControl(); @@ -3917,7 +3917,7 @@ void Scene325::postInit(SceneObjectList *OwnerList) { _sceneMode = 1; signal(); } - + void Scene325::synchronize(Serializer &s) { SceneExt::synchronize(s); @@ -3953,7 +3953,7 @@ void Scene325::signal() { _icon4.postInit(); _icon4._sceneRegionId = 5; - setAction(&_sequenceManager1, this, 127, &_icon1, &_icon2, &_icon3, &_icon4, + setAction(&_sequenceManager1, this, 127, &_icon1, &_icon2, &_icon3, &_icon4, &R2_GLOBALS._player, NULL); _sceneMode = 2; break; @@ -3969,7 +3969,7 @@ void Scene325::signal() { _icon2._object2.postInit(); _icon2._object2.setup(160, 7, 2); _icon2._object2.setPosition(Common::Point(106, 56)); - + _icon3.setup(160, 1, 1); _icon3.setPosition(Common::Point(65, 47)); _icon3._object2.postInit(); @@ -4008,7 +4008,7 @@ void Scene325::signal() { _object3.postInit(); if (R2_GLOBALS.getFlag(13)) { _object4.postInit(); - setAction(&_sequenceManager1, this, 130, &R2_GLOBALS._player, &_object1, + setAction(&_sequenceManager1, this, 130, &R2_GLOBALS._player, &_object1, &_object2, &_object3, &_object4, NULL); } else { setAction(&_sequenceManager1, this, 129, &R2_GLOBALS._player, &_object1, @@ -4042,12 +4042,12 @@ void Scene325::signal() { _object13.setup(326, 4, 2); _object13.setPosition(Common::Point(149, (int)(_field420 * ADJUST_FACTOR))); _object13.fixPriority(21); - + _object10.postInit(); _object10.setup(326, 1, 1); _object10.setPosition(Common::Point(210, 20)); _object10.fixPriority(10); - + _object1.postInit(); _object1.setup(326, 1, 1); _object1.setPosition(Common::Point(210, 32)); @@ -4072,7 +4072,7 @@ void Scene325::signal() { _object5.setup(326, 1, 1); _object5.setPosition(Common::Point(210, 80)); _object5.fixPriority(10); - + _object6.postInit(); _object6.setup(326, 1, 1); _object6.setPosition(Common::Point(210, 92)); @@ -4450,7 +4450,7 @@ void Scene325::dispatch() { for (int idx = 0; idx < 4; ++idx) _objList[idx].remove(); - + if (flag) { int v = _field420 - 758; _object10.setFrame((v++ <= 0) ? 1 : v); @@ -4522,7 +4522,7 @@ void Scene325::setMessage(int resNum, int lineNum) { _text1.setPosition(Common::Point(49, 19)); R2_GLOBALS._sceneObjects->draw(); - + if ((_soundCount != 0) && (R2_GLOBALS._speechSubtitles != 2)) { _sceneMode = 15; R2_GLOBALS._playStream.play(_soundQueue[_soundIndex++], this); @@ -4804,7 +4804,7 @@ bool Scene500::ControlPanel::startAction(CursorType action, Event &event) { if ((action == CURSOR_USE) && (R2_GLOBALS._player._characterIndex == R2_QUINN)) { R2_GLOBALS._player.disableControl(); - + if (R2_GLOBALS.getFlag(26)) { scene->_stripNumber = 1104; scene->_sceneMode = 524; @@ -4818,7 +4818,7 @@ bool Scene500::ControlPanel::startAction(CursorType action, Event &event) { return SceneHotspot::startAction(action, event); } } - + /*--------------------------------------------------------------------------*/ bool Scene500::Object2::startAction(CursorType action, Event &event) { @@ -4910,7 +4910,7 @@ bool Scene500::Doorway::startAction(CursorType action, Event &event) { scene->setAction(&scene->_sequenceManager1, scene, 524, &R2_GLOBALS._player, NULL); } else { scene->_sceneMode = 500; - scene->setAction(&scene->_sequenceManager1, scene, 500, &R2_GLOBALS._player, NULL); + scene->setAction(&scene->_sequenceManager1, scene, 500, &R2_GLOBALS._player, NULL); } return true; @@ -4931,17 +4931,17 @@ bool Scene500::OxygenTanks::startAction(CursorType action, Event &event) { if (R2_GLOBALS._player._characterIndex != R2_QUINN) { SceneItem::display2(500, 52); return true; - } else if ((R2_INVENTORY.getObjectScene(R2_REBREATHER_TANK) != 1) && + } else if ((R2_INVENTORY.getObjectScene(R2_REBREATHER_TANK) != 1) && (R2_GLOBALS._player._characterIndex != R2_SEEKER) && !R2_GLOBALS.getFlag(28)) { R2_GLOBALS._player.disableControl(); - + if (_position.y == 120) { scene->_sceneMode = 513; - scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, + scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_tanks1, NULL); } else { scene->_sceneMode = 514; - scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, + scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_tanks2, NULL); } return true; @@ -4961,7 +4961,7 @@ bool Scene500::AirLock::startAction(CursorType action, Event &event) { if ((action == CURSOR_USE) && R2_GLOBALS.getFlag(26)) { R2_GLOBALS._player.disableControl(); scene->_sceneMode = (R2_GLOBALS._player._characterIndex == R2_QUINN) ? 521 : 522; - scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, + scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_object2, &scene->_airLock, NULL); return true; } else { @@ -5144,7 +5144,7 @@ void Scene500::postInit(SceneObjectList *OwnerList) { _object1.setup(502, 1, 1); _object1.setPosition(Common::Point(258, 99)); _object1.fixPriority(50); - + _object8.postInit(); _object8.setPosition(Common::Point(250, 111)); @@ -5322,16 +5322,16 @@ void Scene525::postInit(SceneObjectList *OwnerList) { loadScene(525); R2_GLOBALS._uiElements._active = false; SceneExt::postInit(); - + R2_GLOBALS._sound1.play(105); - + _actor1.postInit(); _actor1._effect = 1; - + R2_GLOBALS._player.postInit(); R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.disableControl(); - + setAction(&_sequenceManager, this, 525, &R2_GLOBALS._player, &_actor1, NULL); } @@ -5340,7 +5340,7 @@ void Scene525::signal() { } /*-------------------------------------------------------------------------- - * Scene 600 - + * Scene 600 - * *--------------------------------------------------------------------------*/ Scene600::Scene600() { @@ -5368,28 +5368,28 @@ bool Scene600::Item1::startAction(CursorType action, Event &event) { bool Scene600::Item4::startAction(CursorType action, Event &event) { if ((action != R2_NEGATOR_GUN) || (!R2_GLOBALS.getFlag(1))) return SceneHotspot::startAction(action, event); - + if ((R2_GLOBALS.getFlag(5)) && (!R2_GLOBALS.getFlag(8))) { SceneItem::display(600, 32, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); return true; } - + if (R2_GLOBALS.getFlag(5)) { SceneItem::display(600, 30, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); return true; } - + if ((!R2_GLOBALS.getFlag(8)) || (R2_GLOBALS.getFlag(9))) return SceneHotspot::startAction(action, event); R2_GLOBALS._player.disableControl(); - + Scene600 *scene = (Scene600 *)R2_GLOBALS._sceneManager._scene; scene->_object1.setup2(603, 3, 1, 239, 54, 10, 0); scene->_actor3.postInit(); scene->_actor2.postInit(); - + scene->_sceneMode = 612; setAction(&scene->_sequenceManager1, this, 612, &scene->_actor3, &scene->_actor2, &R2_GLOBALS._player, NULL); return true; @@ -5405,7 +5405,7 @@ bool Scene600::Actor4::startAction(CursorType action, Event &event) { if ((action >= CURSOR_WALK) && (action < R2CURSORS_START)) // Only action cursors return SceneActor::startAction(action, event); - + return false; } @@ -5417,10 +5417,10 @@ void Scene600::Actor4::draw() { bool Scene600::Actor5::startAction(CursorType action, Event &event) { if ((action < CURSOR_WALK) && (action >= R2CURSORS_START)) return false; - + if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + Scene600 *scene = (Scene600 *)R2_GLOBALS._sceneManager._scene; if ((R2_INVENTORY.getObjectScene(R2_CLAMP) == 600) && (!R2_GLOBALS.getFlag(6))) { @@ -5431,17 +5431,17 @@ bool Scene600::Actor5::startAction(CursorType action, Event &event) { scene->setAction(&scene->_sequenceManager1, scene, 609, &R2_GLOBALS._player, &scene->_actor5, &scene->_actor6, &scene->_actor1, NULL); return true; } - + if (_frame != 1) return false; - + if (!R2_GLOBALS.getFlag(6)) { R2_GLOBALS._player.disableControl(); scene->_sceneMode = 616; scene->setAction(&scene->_sequenceManager1, scene, 616, &R2_GLOBALS._player, &scene->_actor5, &scene->_actor6, NULL); return true; } - + if ((R2_GLOBALS.getFlag(9)) && (R2_INVENTORY.getObjectScene(R2_COM_SCANNER) == 600)) SceneItem::display(600, 31, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); else { @@ -5860,10 +5860,10 @@ bool Scene700::Actor2::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + if (R2_GLOBALS._player._position.y <= 100) return false; - + R2_GLOBALS._player.disableControl(); scene->_sceneMode = 701; scene->setAction(&scene->_sequenceManager, scene, 701, &R2_GLOBALS._player, this, NULL); @@ -5876,10 +5876,10 @@ bool Scene700::Actor3::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + if (R2_GLOBALS._player._position.y <= 100) return false; - + R2_GLOBALS._player.disableControl(); scene->_sceneMode = 702; scene->setAction(&scene->_sequenceManager, scene, 702, &R2_GLOBALS._player, this, NULL); @@ -5892,10 +5892,10 @@ bool Scene700::Actor4::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + if (R2_GLOBALS._player._position.y <= 100) return false; - + R2_GLOBALS._player.disableControl(); scene->_sceneMode = 704; scene->setAction(&scene->_sequenceManager, scene, 704, &R2_GLOBALS._player, this, NULL); @@ -5951,7 +5951,7 @@ bool Scene700::Actor5::startAction(CursorType action, Event &event) { return SceneActor::startAction(action, event); break; } - + return true; } @@ -5960,7 +5960,7 @@ bool Scene700::Actor6::startAction(CursorType action, Event &event) { if ((action != CURSOR_USE) || (R2_GLOBALS._player._position.y >= 100)) return SceneActor::startAction(action, event); - + R2_GLOBALS._player.disableControl(); scene->_sceneMode = 1; Common::Point pt(_position.x, 69); @@ -5973,7 +5973,7 @@ bool Scene700::Actor6::startAction(CursorType action, Event &event) { void Scene700::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == 900) g_globals->gfxManager()._bounds.moveTo(Common::Point(160, 0)); - + loadScene(700); R2_GLOBALS._v558B6.set(60, 0, 260, 200); SceneExt::postInit(); @@ -5993,7 +5993,7 @@ void Scene700::postInit(SceneObjectList *OwnerList) { _actor3.setPosition(Common::Point(217, 120)); _actor3.fixPriority(10); _actor3.setDetails(700, 15, -1, -1, 1, (SceneItem *) NULL); - + _actor1.postInit(); _actor1.setup(700, 4, 1); _actor1.setPosition(Common::Point(355 - ((R2_GLOBALS._v565E3 * 8) / 5), ((R2_GLOBALS._v565E1 + 20 ) / 5) - 12)); @@ -6132,7 +6132,7 @@ void Scene700::remove() { R2_GLOBALS._sound1.play(10); // CHECKME: Present in the original... But it crashes badly. // The instruction was removed as it's not used in other scene coded the same way -// and reversed by dreammaster. A double check is required in order to verify it doesn't hide +// and reversed by dreammaster. A double check is required in order to verify it doesn't hide // a memory leak // _rotation->remove(); SceneExt::remove(); @@ -6445,7 +6445,7 @@ void Scene800::postInit(SceneObjectList *OwnerList) { if (R2_INVENTORY.getObjectScene(R2_READER) == 800) { _reader.postInit(); - + if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) == 800) { _opticalFibre.setup(800, 4, 1); _reader.hide(); @@ -6776,7 +6776,7 @@ void Scene825::process(Event &event) { } void Scene825::dispatch() { - if (R2_GLOBALS._sceneObjects->contains(&_object4) && + if (R2_GLOBALS._sceneObjects->contains(&_object4) && ((_object4._frame == 1) || (_object4._frame == 3)) && (_object4._frame != _frame1)) { _sound2.play(25); @@ -6828,7 +6828,7 @@ void Scene825::doButtonPress(int buttonId) { _sceneText.setup(NO_TREATMENT_REQUIRED); } else { _button6._buttonId = 5; - + _object5.postInit(); setAction(&_sequenceManager1, this, 827, &_object5, NULL); } @@ -6853,7 +6853,7 @@ void Scene825::doButtonPress(int buttonId) { case 4: _sound4.play(27); _button6._buttonId = 5; - + _object1.postInit(); _object1.setup(826, 7, 1); _object1.setPosition(Common::Point(112, 67)); @@ -7002,7 +7002,7 @@ bool Scene850::Panel::startAction(CursorType action, Event &event) { scene->_sceneMode = 852; scene->setAction(&scene->_sequenceManager1, scene, 852, &R2_GLOBALS._player, this, &scene->_object1, NULL); return true; - } + } } /*--------------------------------------------------------------------------*/ @@ -7171,7 +7171,7 @@ bool Scene900::Actor4::startAction(CursorType action, Event &event) { scene->_aSound1.play(53); setup(900, 3, 9); R2_GLOBALS._v565E5 = 0; - + if ((R2_INVENTORY.getObjectScene(R2_CABLE_HARNESS) == 0) && (R2_INVENTORY.getObjectScene(R2_ATTRACTOR_CABLE_HARNESS) == 700) && (scene->_actor2._frame < 8) && (scene->_actor2._animateMode != ANIM_MODE_5)) { scene->_actor2.animate(ANIM_MODE_5, NULL); } else if ((R2_INVENTORY.getObjectScene(R2_CABLE_HARNESS) == 700) && (R2_INVENTORY.getObjectScene(R2_ATTRACTOR_CABLE_HARNESS) == 700) && (scene->_actor2._frame < 8)) { @@ -7292,7 +7292,7 @@ void Scene900::postInit(SceneObjectList *OwnerList) { _actor2.postInit(); _actor2.setPosition(Common::Point(0, 0)); _actor2.fixPriority(1); - + if (R2_INVENTORY.getObjectScene(R2_CABLE_HARNESS) == 0) { if (R2_INVENTORY.getObjectScene(R2_ATTRACTOR_CABLE_HARNESS) != 700) { _actor2.setup(901, 3, 2); @@ -7321,7 +7321,7 @@ void Scene900::postInit(SceneObjectList *OwnerList) { void Scene900::remove() { if (_sceneMode != 901) R2_GLOBALS._sound1.play(10); - + SceneExt::remove(); } @@ -7348,7 +7348,7 @@ void Scene900::signal() { break; case 2: _field412 = 2; - + _actor5.remove(); _actor6.remove(); @@ -7358,7 +7358,7 @@ void Scene900::signal() { else _actor5.setup(900, 3, 11); _actor5.setPosition(Common::Point(36, 166)); - + _actor7.sub96135(5); _actor7.setup(900, 3, 3); _actor7.setPosition(Common::Point(76, 134)); @@ -7374,7 +7374,7 @@ void Scene900::signal() { _actor10.sub96135(7); _actor10.setup(900, 3, 5); _actor10.setPosition(Common::Point(99, 144)); - + break; case 3: _field412 = 3; @@ -7405,11 +7405,11 @@ void Scene900::signal() { R2_GLOBALS._player._canWalk = false; _actor1.setup(900, 1, 1); - + _actor4.sub96135(1); _actor4.setup(900, 1, 3); _actor4.setPosition(Common::Point(77, 168)); - + _sceneMode = 1; signal(); break; diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h index d757080156..e39efbca3d 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.h +++ b/engines/tsage/ringworld2/ringworld2_scenes0.h @@ -45,9 +45,9 @@ class Scene50: public SceneExt { public: void signal(); }; - + public: - Action1 _action1; + Action1 _action1; virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void process(Event &event); @@ -208,7 +208,7 @@ public: SequenceManager _sequenceManager; Action1 _action1; ASoundExt _sound1; - + int _frameNumber; int _field412, _field480; int _field482, _frameInc; @@ -217,7 +217,7 @@ public: public: Scene180(); - virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void synchronize(Serializer &s); virtual void remove(); virtual void signal(); @@ -283,7 +283,7 @@ class Scene205: public SceneExt { }; private: void setup(); - void processList(Object **ObjList, int count, const Common::Rect &bounds, + void processList(Object **ObjList, int count, const Common::Rect &bounds, int xMultiply, int yMultiply, int xCenter, int yCenter); void handleText(); public: @@ -445,7 +445,7 @@ class Scene325: public SceneExt { void showIcon(); void hideIcon(); }; - + private: void removeText(); void consoleAction(int id); @@ -531,7 +531,7 @@ class Scene500: public SceneExt { public: virtual bool startAction(CursorType action, Event &event); }; - + /* Objects */ class Object2: public SceneActor { public: diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index e849e7137a..304d3a4298 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -118,7 +118,7 @@ void Scene1020::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == 1010) _sceneMode = 0; - else + else _sceneMode = 10; } @@ -345,7 +345,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { } SceneExt::postInit(); - + if (R2_GLOBALS._sceneManager._previousScene == -1) R2_GLOBALS._sceneManager._previousScene = 1000; @@ -397,7 +397,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { _actor18.setDetails(1100, 4, -1, -1, 1, (SceneItem *) NULL); else _actor18.setDetails(1100, 3, -1, -1, 1, (SceneItem *) NULL); - + _actor17.postInit(); _actor17.setup(1105, 3, 1); _actor17.setPosition(Common::Point(312, 165)); @@ -450,7 +450,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { _actor4._field9C = _field312; R2_GLOBALS._sound1.play(86); - + _sceneMode = 0; setAction(&_sequenceManager1, this, 1, &R2_GLOBALS._player, NULL); @@ -463,7 +463,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.postInit(); R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); - + _actor16.postInit(); if (R2_GLOBALS.getFlag(52)) { @@ -492,7 +492,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.enableControl(); R2_GLOBALS._player._canWalk = false; } - + if (R2_GLOBALS._player._characterIndex == 1) _actor16.setDetails(9002, 0, 4, 3, 1, (SceneItem *) NULL); else @@ -535,7 +535,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { _item6.setDetails(Rect(123, 69, 222, 105), 1100, 13, -1, -1, 1, NULL); _item2.setDetails(Rect(0, 0, 480, 46), 1100, 0, -1, -1, 1, NULL); _item1.setDetails(Rect(0, 0, 480, 200), 1100, 40, 41, 42, 1, NULL); -} +} void Scene1100::remove() { R2_GLOBALS._scrollFollower = &R2_GLOBALS._player; @@ -703,7 +703,7 @@ void Scene1100::signal() { R2_GLOBALS._player.disableControl(); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); _stripManager.start(302, this); - break; + break; case 27: R2_GLOBALS._player.disableControl(); setAction(&_sequenceManager1, this, 1120, &_actor16, &R2_GLOBALS._player, NULL); @@ -761,7 +761,7 @@ void Scene1100::signal() { R2_GLOBALS._player.disableControl(); _sceneMode = 1125; setAction(&_sequenceManager1, this, 1125, &R2_GLOBALS._player, &_actor16, NULL); - } else + } else R2_GLOBALS._player.enableControl(CURSOR_TALK); break; case 55: @@ -832,22 +832,22 @@ void Scene1100::dispatch() { R2_GLOBALS._scenePalette.refresh(); _field414 = 1; } - + Scene::dispatch(); - + if (R2_GLOBALS._player._bounds.contains(_actor13._position)) _actor13._shade = 3; - else + else _actor13._shade = 0; if (R2_GLOBALS._player._bounds.contains(_actor14._position)) _actor14._shade = 3; - else + else _actor14._shade = 0; if (R2_GLOBALS._player._bounds.contains(_actor15._position)) _actor15._shade = 3; - else + else _actor15._shade = 0; } @@ -952,7 +952,7 @@ void Scene1200::Area1::Actor3::init(int state) { bool Scene1200::Area1::Actor3::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + R2_GLOBALS._sound2.play(260); switch (_state) { case 1: @@ -1002,10 +1002,10 @@ bool Scene1200::Area1::Actor3::startAction(CursorType action, Event &event) { default: break; } - + Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene; scene->_field418 = 0; - + if ((R2_GLOBALS._v56AA6 == 1) && (R2_GLOBALS._v56AA7 == 1) && (R2_GLOBALS._v56AA8 == 1)) scene->_field418 = 1; else if ((R2_GLOBALS._v56AA6 == 2) && (R2_GLOBALS._v56AA7 == 1) && (R2_GLOBALS._v56AA8 == 1)) @@ -1014,7 +1014,7 @@ bool Scene1200::Area1::Actor3::startAction(CursorType action, Event &event) { scene->_field418 = 3; else if ((R2_GLOBALS._v56AA6 == 2) && (R2_GLOBALS._v56AA7 == 3) && (R2_GLOBALS._v56AA8 == 1)) scene->_field418 = 4; - + return true; } @@ -1035,7 +1035,7 @@ void Scene1200::Area1::postInit(SceneObjectList *OwnerList) { void Scene1200::Area1::remove() { Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene; - + scene->_field41A = 0; warning("Unexpected _sceneAreas.remove() call"); // scene->_sceneAreas.remove(&_actor3); @@ -1044,14 +1044,14 @@ void Scene1200::Area1::remove() { _actor3.remove(); _actor4.remove(); _actor5.remove(); - + // sub201EA R2_GLOBALS._sceneItems.remove((SceneItem *)this); _actor2.remove(); SceneArea::remove(); R2_GLOBALS._insetUp--; // - + R2_GLOBALS._player._canWalk = true; } @@ -1388,9 +1388,9 @@ void Scene1200::signal() { void Scene1200::process(Event &event) { if (_field414 != 0) return; - + Scene::process(event); - + if (!R2_GLOBALS._player._canWalk) return; @@ -1405,10 +1405,10 @@ void Scene1200::process(Event &event) { if ((event.mousePos.x > 109) && (event.mousePos.x < 140) && (event.mousePos.y > 50) && (event.mousePos.y < 89)) sub9DAD6(2); - + if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 89) && (event.mousePos.y < 120)) sub9DAD6(3); - + if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 19) && (event.mousePos.y < 50)) sub9DAD6(4); break; @@ -1511,7 +1511,7 @@ void Scene1200::process(Event &event) { event.handled = false; return; } - + switch (event.kbd.keycode) { case Common::KEYCODE_1: warning("FIXME: keycode = 0x4800"); @@ -1538,7 +1538,7 @@ void Scene1200::process(Event &event) { return; } } - + void Scene1200::dispatch() { Rect tmpRect; Scene::dispatch(); @@ -1550,7 +1550,7 @@ void Scene1200::dispatch() { warning("tmpRect.sub14DF3();"); _field41C = 0; } - + if (_field414 != 0) { tmpRect.set(110, 20, 210, 120); _field414--; @@ -1575,7 +1575,7 @@ void Scene1200::dispatch() { _object1.sub51B02(); warning("_gfxManager.sub294AC(unk);"); warning("tmpRect.sub14DF3();"); - + if (_field416 != 0) { switch(_field412 - 1) { case 0: @@ -1664,7 +1664,7 @@ void Scene1337::Action1337::subD18B5(int resNum, int stripNum, int frameNum) { void Scene1337::Action1337::skipFrames(int32 skipCount) { uint32 firstFrameNumber = g_globals->_events.getFrameNumber(); uint32 tmpFrameNumber = firstFrameNumber; - + while (tmpFrameNumber < firstFrameNumber + skipCount) tmpFrameNumber = g_globals->_events.getFrameNumber(); @@ -1824,7 +1824,7 @@ void Scene1337::Action1::signal() { scene->_aSound1.play(62); R2_GLOBALS._sceneObjects->draw(); - + skipFrames(120); scene->_arrunkObj1337[2]._arr2[0]._object1.remove(); scene->_arrunkObj1337[2]._arr2[1]._object1.remove(); @@ -1938,7 +1938,7 @@ void Scene1337::Action1::signal() { scene->_arrunkObj1337[0]._arr1[2]._object1.fixPriority(170); R2_GLOBALS._sceneObjects->draw(); - + scene->actionDisplay(1331, 10, 159, 10, 1, 200, 0, 7, 0, 154, 154); scene->_item2._object1.setPosition(Common::Point(162, 95), 0); scene->_item2._object1.show(); @@ -1976,7 +1976,7 @@ void Scene1337::Action1::signal() { scene->_item2._object1.setStrip(scene->_arrunkObj1337[2]._arr1[2]._object1._strip); scene->_item2._object1.setFrame(scene->_arrunkObj1337[2]._arr1[2]._object1._frame); scene->_item2._object1.animate(ANIM_MODE_NONE, NULL); - + scene->_arrunkObj1337[2]._arr1[2]._field34 = 0; scene->_arrunkObj1337[2]._arr1[2]._object1.remove(); @@ -2102,7 +2102,7 @@ void Scene1337::Action1::signal() { R2_GLOBALS._sceneObjects->draw(); skipFrames(240); - + scene->_arrObject1[0].remove(); scene->_arrObject1[1].remove(); scene->_arrObject1[2].remove(); @@ -2125,7 +2125,7 @@ void Scene1337::Action1::signal() { scene->_arrunkObj1337[2]._arr3[0]._field34 = 0; scene->_arrunkObj1337[2]._arr3[0]._object1.remove(); - + scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr3[0]._field36, 0); scene->_item2._object1.show(); @@ -2219,7 +2219,7 @@ void Scene1337::Action1::signal() { R2_GLOBALS._sceneObjects->draw(); skipFrames(240); - + scene->_arrObject1[0].remove(); scene->_arrObject1[1].remove(); scene->_arrObject1[2].remove(); @@ -2289,7 +2289,7 @@ void Scene1337::Action1::signal() { scene->_arrObject2[0].setStrip(7); scene->_arrObject2[0].setFrame(1); scene->_arrObject2[0].fixPriority(180); - + scene->_arrObject1[1].postInit(); scene->_arrObject1[1].setVisage(1332); scene->_arrObject1[1].setPosition(Common::Point(160, 71), 0); @@ -2303,35 +2303,35 @@ void Scene1337::Action1::signal() { scene->_arrObject2[1].setStrip(7); scene->_arrObject2[1].setFrame(1); scene->_arrObject2[1].fixPriority(180); - + scene->_arrObject1[2].postInit(); scene->_arrObject1[2].setVisage(1332); scene->_arrObject1[2].setPosition(Common::Point(131, 100), 0); scene->_arrObject1[2].fixPriority(190); scene->_arrObject1[2].setStrip(4); scene->_arrObject1[2].setFrame(4); - + scene->_arrObject2[2].postInit(); scene->_arrObject2[2].setVisage(1332); scene->_arrObject2[2].setPosition(Common::Point(131, 100), 0); scene->_arrObject2[2].setStrip(7); scene->_arrObject2[2].setFrame(1); scene->_arrObject2[2].fixPriority(180); - + scene->_arrObject1[3].postInit(); scene->_arrObject1[3].setVisage(1332); scene->_arrObject1[3].setPosition(Common::Point(160, 100), 0); scene->_arrObject1[3].fixPriority(190); scene->_arrObject1[3].setStrip(4); scene->_arrObject1[3].setFrame(2); - + scene->_arrObject2[3].postInit(); scene->_arrObject2[3].setVisage(1332); scene->_arrObject2[3].setPosition(Common::Point(160, 100), 0); scene->_arrObject2[3].setStrip(7); scene->_arrObject2[3].setFrame(1); scene->_arrObject2[3].fixPriority(180); - + R2_GLOBALS._sceneObjects->draw(); skipFrames(240); @@ -2353,14 +2353,14 @@ void Scene1337::Action1::signal() { R2_GLOBALS._sceneObjects->draw(); scene->actionDisplay(1331, 19, 159, 10, 1, 220, 0, 7, 0, 154, 154); - + scene->_object1.hide(); scene->actionDisplay(1331, 20, 159, 10, 1, 220, 0, 7, 0, 154, 154); scene->actionDisplay(1331, 21, 159, 10, 1, 220, 0, 7, 0, 154, 154); scene->_item7._field34 = scene->_arrunkObj1337[2]._arr1[1]._field34; - + scene->_item2._object1.setStrip(scene->_arrunkObj1337[2]._arr1[1]._object1._strip); scene->_item2._object1.setFrame(scene->_arrunkObj1337[2]._arr1[1]._object1._frame); scene->_item2._object1.animate(ANIM_MODE_NONE, NULL); @@ -2384,7 +2384,7 @@ void Scene1337::Action1::signal() { scene->_item2._object1.animate(ANIM_MODE_2, NULL); R2_GLOBALS._sceneObjects->draw(); - + scene->actionDisplay(1331, 22, 159, 10, 1, 200, 0, 7, 0, 154, 154); int i = -1; @@ -2452,13 +2452,13 @@ void Scene1337::Action2::signal() { scene->_item7._object1.remove(); scene->_item7._field34 = 0; - + scene->_aSound1.play(60); scene->_item3._object1.animate(ANIM_MODE_5, this); break; case 1: scene->_item3._object1.setFrame(1); - + scene->_aSound1.play(60); scene->_item3._object1.animate(ANIM_MODE_5, this); break; @@ -2482,7 +2482,7 @@ void Scene1337::Action3::signal() { Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene; scene->_item2._object1.setPosition(Common::Point(162, 95), 0); - + switch (_actionIndex++) { case 0: { scene->_item2._object1._moveDiff = Common::Point(30, 30); @@ -2651,7 +2651,7 @@ void Scene1337::Action3::signal() { scene->_arrunkObj1337[0]._arr1[1]._object1.setFrame(1); scene->_arrunkObj1337[0]._arr1[1]._object1.fixPriority(170); scene->_aSound2.play(61); - + Common::Point pt(283, 102); NpcMover *mover = new NpcMover(); scene->_item2._object1.addMover(mover, &pt, this); @@ -2668,7 +2668,7 @@ void Scene1337::Action3::signal() { scene->_arrunkObj1337[1]._arr1[2]._object1.setFrame(4); scene->_arrunkObj1337[1]._arr1[2]._object1.fixPriority(170); scene->_aSound2.play(61); - + Common::Point pt(64, 174); NpcMover *mover = new NpcMover(); scene->_item2._object1.addMover(mover, &pt, this); @@ -2714,7 +2714,7 @@ void Scene1337::Action3::signal() { scene->_arrunkObj1337[3]._arr1[2]._object1.setFrame(3); scene->_arrunkObj1337[3]._arr1[2]._object1.fixPriority(170); scene->_aSound2.play(61); - + Common::Point pt(226, 5); NpcMover *mover = new NpcMover(); scene->_item2._object1.addMover(mover, &pt, this); @@ -2734,7 +2734,7 @@ void Scene1337::Action3::signal() { default: break; } - + if (_actionIndex > 12) { scene->_field423E = 0; R2_GLOBALS._sceneObjects->draw(); @@ -2764,9 +2764,9 @@ void Scene1337::Action4::signal() { scene->_arrunkObj1337[scene->_field423E]._arr1[0]._field34 = scene->_field3E28[scene->_field3E24]; scene->_field3E28[scene->_field3E24] = 0; scene->_field3E24--; - + if (scene->_field3E24 < 0) - scene->_background2.remove(); + scene->_background2.remove(); } else { // Self call, forcing next actionIndex signal(); @@ -2786,7 +2786,7 @@ void Scene1337::Action4::signal() { if ((scene->_field4248 == 1) || (scene->_field423E == 2)) scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[0]); - + scene->_item2._object1.hide(); if ((scene->_arrunkObj1337[scene->_field423E]._arr1[0]._field34 == 0) && (scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34 == 0))) { if (scene->_field3E24 < 0) @@ -2798,7 +2798,7 @@ void Scene1337::Action4::signal() { NpcMover *mover = new NpcMover(); scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[scene->_field423E]._fieldB98, this); - + scene->_arrunkObj1337[scene->_field423E]._arr1[1]._field34 = scene->_field3E28[scene->_field3E24]; scene->_field3E28[scene->_field3E24] = 0; scene->_field3E24--; @@ -2821,7 +2821,7 @@ void Scene1337::Action4::signal() { if ((scene->_field4248 == 1) || (scene->_field423E == 2)) scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[1]); - + scene->_item2._object1.hide(); if ((scene->_arrunkObj1337[scene->_field423E]._arr1[2]._field34 == 0) && (scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34 == 0))) { if (scene->_field3E24 < 0) @@ -2833,7 +2833,7 @@ void Scene1337::Action4::signal() { NpcMover *mover = new NpcMover(); scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[scene->_field423E]._fieldB9C, this); - + scene->_arrunkObj1337[scene->_field423E]._arr1[2]._field34 = scene->_field3E28[scene->_field3E24]; scene->_field3E28[scene->_field3E24] = 0; scene->_field3E24--; @@ -2856,7 +2856,7 @@ void Scene1337::Action4::signal() { if ((scene->_field4248 == 1) || (scene->_field423E == 2)) scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[2]); - + scene->_item2._object1.hide(); if ((scene->_arrunkObj1337[scene->_field423E]._arr1[3]._field34 == 0) && (scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34 == 0))) { if (scene->_field3E24 < 0) @@ -2868,7 +2868,7 @@ void Scene1337::Action4::signal() { NpcMover *mover = new NpcMover(); scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[scene->_field423E]._fieldBA0, this); - + scene->_arrunkObj1337[scene->_field423E]._arr1[3]._field34 = scene->_field3E28[scene->_field3E24]; scene->_field3E28[scene->_field3E24] = 0; scene->_field3E24--; @@ -2891,7 +2891,7 @@ void Scene1337::Action4::signal() { if ((scene->_field4248 == 1) || (scene->_field423E == 2)) scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[3]); - + scene->_item2._object1.hide(); switch (scene->_field423E) { case 0: @@ -2929,7 +2929,7 @@ void Scene1337::Action5::signal() { scene->_item7._object1.setPosition(scene->_item7._field36, 0); scene->_item7._object1.fixPriority(170); } - + scene->_item7._field34 = scene->_field3EF0->_field34; scene->_field3EF0->_field34 = 0; scene->_field3EF0->_object1.remove(); @@ -3095,7 +3095,7 @@ void Scene1337::Action9::signal() { subD18B5(5, 1, 4); scene->subC4CEC(); } - + scene->subC20F9(); break; default: @@ -3143,7 +3143,7 @@ void Scene1337::Action10::signal() { if (scene->_arrunkObj1337[0]._arr1[indexFound]._field34 == 29) { found = true; break; - } + } } break; case 1: @@ -3151,7 +3151,7 @@ void Scene1337::Action10::signal() { if (scene->_arrunkObj1337[1]._arr1[indexFound]._field34 == 29) { found = true; break; - } + } } break; case 2: @@ -3159,7 +3159,7 @@ void Scene1337::Action10::signal() { if (scene->_arrunkObj1337[2]._arr1[indexFound]._field34 == 29) { found = true; break; - } + } } break; case 3: @@ -3167,7 +3167,7 @@ void Scene1337::Action10::signal() { if (scene->_arrunkObj1337[3]._arr1[indexFound]._field34 == 29) { found = true; break; - } + } } break; default: @@ -3190,7 +3190,7 @@ void Scene1337::Action10::signal() { scene->subC4CD2(); if (MessageDialog::show(USE_INTERCEPTOR, NO_MSG, YES_MSG) == 0) scene->subC4CEC(); - else { + else { scene->subC51A0(&scene->_arrunkObj1337[2]._arr1[indexFound], scene->_field3EF8); found2 = true; } @@ -3213,7 +3213,7 @@ void Scene1337::Action10::signal() { if (scene->_arrunkObj1337[2]._arr2[i]._field34 != 0) ++j; } - + if (j <= 1) { for (int i = 0; i <= 7; i++) { if (scene->_arrunkObj1337[2]._arr2[i]._field34 != 0) { @@ -3223,11 +3223,11 @@ void Scene1337::Action10::signal() { } } else { scene->subC4CD2(); - + found2 = false; while (!found2) { scene->actionDisplay(1330, 130, 159, 10, 1, 200, 0, 7, 0, 154, 154); - + // Wait for a mouse or keypress Event event; while (!g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !g_vm->shouldQuit()) { @@ -3235,9 +3235,9 @@ void Scene1337::Action10::signal() { R2_GLOBALS._sceneObjects->draw(); g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks); } - + scene->_item6._field36 = event.mousePos; - + for (int i = 0; i <= 7; i++) { if ((scene->subC2BF8(&scene->_arrunkObj1337[2]._arr2[i], scene->_item6._field36) != 0) && (scene->_arrunkObj1337[2]._arr2[i]._field34 != 0)) { scene->_field3EF4 = &scene->_arrunkObj1337[2]._arr2[0]; @@ -3249,15 +3249,15 @@ void Scene1337::Action10::signal() { scene->subC4CEC(); } } - + scene->_field3E28[scene->_field3E26] = scene->_field3EF4->_field34; scene->_field3E26--; scene->_field3EF4->_field34 = 0; scene->_field3EF4->_object1.remove(); - + scene->_item2._object1.setPosition(scene->_field3EF4->_field36, 0); scene->_item2._object1.show(); - + NpcMover *mover = new NpcMover(); scene->_item2._object1.addMover(mover, &scene->_field3EF8->_field36, this); } @@ -3284,7 +3284,7 @@ void Scene1337::Action11::signal() { scene->_field3EF4->_object1.setPosition(scene->_field3EF4->_field36, 0); scene->_field3EF4->_object1.fixPriority(170); scene->_field3EF4->_field34 = 25; - + if (scene->_field4240 == 2) { scene->_item2._object1.setPosition(scene->_field3EF4->_field36, 0); subD18B5(5, 1, 4); @@ -3353,7 +3353,7 @@ void Scene1337::Action11::signal() { break; } } - + if ((found) && (scene->subC3E92(scene->_field4240) != -1)) { scene->subC4CD2(); if (MessageDialog::show(USE_DOUBLE_AGENT, NO_MSG, YES_MSG) == 0) @@ -3393,7 +3393,7 @@ void Scene1337::Action11::signal() { default: break; } - + if (!noAction) return; @@ -3431,9 +3431,9 @@ void Scene1337::Action11::signal() { R2_GLOBALS._sceneObjects->draw(); g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks); } - + scene->_item6._field36 = event.mousePos; - + found = false; if (scene->_field4242 != 2) { @@ -3499,7 +3499,7 @@ void Scene1337::Action11::signal() { scene->setAnimationInfo(scene->_field3EF0); break; } - + scene->subC4A39(scene->_field3EF4); break; default: @@ -3560,7 +3560,7 @@ void Scene1337::Action12::signal() { scene->subC4CD2(); bool found = false; - + while (!found) { switch (scene->_field4240) { case 0: @@ -3582,7 +3582,7 @@ void Scene1337::Action12::signal() { R2_GLOBALS._sceneObjects->draw(); g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks); } - + scene->_item6._field36 = event.mousePos; if (scene->_field4240 == 0) { @@ -3594,7 +3594,7 @@ void Scene1337::Action12::signal() { } } } - + if (scene->_field4240 == 3) { for (i = 0; i <= 3; i++) { if ((scene->subC2BF8(&scene->_arrunkObj1337[3]._arr1[i], scene->_item6._field36) != 0) && (scene->_arrunkObj1337[3]._arr1[i]._field34 != 0)) { @@ -3882,14 +3882,14 @@ void Scene1337::dispatch() { void Scene1337::actionDisplay(int resNum, int lineNum, int x, int y, int arg5, int width, int textMode, int fontNum, int colFG, int colBGExt, int colFGExt) { // TODO: Check if it's normal that arg5 is unused and replaced by an hardcoded 0 value // May hide an original bug - + SceneItem::display(resNum, lineNum, SET_X, x, SET_Y, y, SET_KEEP_ONSCREEN, 0, SET_WIDTH, width, SET_POS_MODE, -1, SET_TEXT_MODE, textMode, SET_FONT, fontNum, SET_FG_COLOR, colFG, SET_EXT_BGCOLOR, colBGExt, SET_EXT_FGCOLOR, colFGExt, LIST_END); } void Scene1337::setAnimationInfo(unkObj1337sub1 *subObj) { if (!subObj) return; - + if (subObj->_field34 > 9) { if (subObj->_field34 > 25) { subObj->_object1.setStrip2(4); @@ -3902,7 +3902,7 @@ void Scene1337::setAnimationInfo(unkObj1337sub1 *subObj) { subObj->_object1.setStrip2(2); subObj->_object1.setFrame(subObj->_field34); } - + subObj->_object1.show(); R2_GLOBALS._sceneObjects->draw(); } @@ -3938,7 +3938,7 @@ void Scene1337::subC20F9() { default: break; } - + if (!_autoplay) _unkFctPtr412 = &Scene1337::subC20E5; else @@ -3995,7 +3995,7 @@ void Scene1337::subC2586() { switch (_field423E) { case 2: subC4CD2(); - if (_field4246 == 1) + if (_field4246 == 1) actionDisplay(1330, 114, 159, 10, 1, 200, 0, 7, 0, 154, 154); _field4246 = 0; // No break on purpose @@ -4190,7 +4190,7 @@ void Scene1337::subC2835(int arg1) { if (found) break; - + for (i = 0; i <= 3; i++) { if (_arrunkObj1337[arg1]._arr1[i]._field34 == 13) { found = true; @@ -4329,7 +4329,7 @@ void Scene1337::subC2C2F() { return; int randIndx = R2_GLOBALS._randomSource.getRandomNumber(3); - + if (_arrunkObj1337[3]._arr1[randIndx]._field34 == 1) { found = false; @@ -4358,15 +4358,15 @@ void Scene1337::subC2C2F() { for (int i = 0; i <= 7; i++) { if ((_arrunkObj1337[3]._arr2[i]._field34 == 1) && (!subC2687(_arrunkObj1337[3]._arr3[i]._field34))) { int tmpVal = 0; - + for (int j = 0; j <= 7; j++) { if ((_arrunkObj1337[3]._arr2[j]._field34 > 1) && (_arrunkObj1337[3]._arr2[j]._field34 <= 9)) ++tmpVal; } - + if (tmpVal == 7) _field424A = 3; - + subC33C0(&_arrunkObj1337[3]._arr1[randIndx], &_arrunkObj1337[3]._arr2[i]); found = true; break; @@ -4386,7 +4386,7 @@ void Scene1337::subC2C2F() { int tmpVal = -1; found = false; int tmpRandIndx = R2_GLOBALS._randomSource.getRandomNumber(3); - + for (int i = 0; i <= 3; i++) { if ( (tmpRandIndx != 3) && ( (_arrunkObj1337[tmpRandIndx]._arr1[0]._field34 != 0) @@ -4396,7 +4396,7 @@ void Scene1337::subC2C2F() { tmpVal = tmpRandIndx; break; } - + ++tmpRandIndx; if (tmpRandIndx > 3) tmpRandIndx = 0; @@ -4433,7 +4433,7 @@ void Scene1337::subC2C2F() { case 24: { int tmpVal = -1; int tmpRandIndx = R2_GLOBALS._randomSource.getRandomNumber(3); - + for (int i = 0; i <= 3; i++) { if (tmpRandIndx != 3) { // The variables 'i' and 'j' are not used in the inner code of the loop. @@ -4449,11 +4449,11 @@ void Scene1337::subC2C2F() { ++tmpRandIndx; if (tmpRandIndx > 3) tmpRandIndx = 0; - + if (tmpVal != -1) break; } - + if (tmpVal != -1) { // Useless second identical check skipped subC3456(&_arrunkObj1337[3]._arr1[randIndx], &_arrunkObj1337[tmpVal]._arr3[0]); @@ -4473,7 +4473,7 @@ void Scene1337::subC318B(int arg1, unkObj1337sub1 *subObj1, int arg3) { _field4242 = arg3; int randIndx; - + for (;;) { randIndx = R2_GLOBALS._randomSource.getRandomNumber(3); if (_arrunkObj1337[arg3]._arr1[randIndx]._field34 != 0) @@ -4581,7 +4581,7 @@ void Scene1337::subC33C0(unkObj1337sub1 *subObj1, unkObj1337sub1 *subObj2) { } int Scene1337::subC3E92(int arg1) { - if ( (_arrunkObj1337[arg1]._arr1[0]._field34 == 0) + if ( (_arrunkObj1337[arg1]._arr1[0]._field34 == 0) && (_arrunkObj1337[arg1]._arr1[1]._field34 == 0) && (_arrunkObj1337[arg1]._arr1[2]._field34 == 0) && (_arrunkObj1337[arg1]._arr1[3]._field34 == 0)) @@ -4624,13 +4624,13 @@ Scene1337::unkObj1337sub1 *Scene1337::subC34EC(int arg1) { return &_arrunkObj1337[arg1]._arr2[i]; } } - + for (int i = 0; i <= 7; i++) { if ((_arrunkObj1337[arg1]._arr2[i]._field34 != 0) && (_arrunkObj1337[arg1]._arr2[i]._field34 < 10)) { return &_arrunkObj1337[arg1]._arr2[i]; } } - + return NULL; } @@ -5003,7 +5003,7 @@ void Scene1337::subCD193() { void Scene1337::subCDB90(int arg1, Common::Point pt) { bool found = false; int curReg = R2_GLOBALS._sceneRegions.indexOf(g_globals->_events._mousePos); - + if (arg1 == 3) { int i; for (i = 0; i <= 7; i++) { @@ -5015,7 +5015,7 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { break; } } - + if (found) { switch (curReg) { case 5: @@ -5052,7 +5052,7 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { || (subC2BF8(&_arrunkObj1337[3]._arr3[0], pt)) ) { found = true; } - + if (found) { switch (curReg) { case 5: @@ -5140,10 +5140,10 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } } } - + if (arg1 != 1) return; - + for (int i = 0; i <= 7; i++) { if (subC2BF8(&_arrunkObj1337[2]._arr2[i], pt)) { switch (_arrunkObj1337[2]._arr2[i]._field34) { @@ -5203,7 +5203,7 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } found = true; } - + if (subC2BF8(&_arrunkObj1337[3]._arr3[0], pt)) { if (_arrunkObj1337[3]._arr3[0]._field34 != 0) { actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172); @@ -5212,7 +5212,7 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } found = true; } - + if (subC2BF8(&_arrunkObj1337[1]._arr3[0], pt)) { if (_arrunkObj1337[1]._arr3[0]._field34 != 0) { actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117); @@ -5221,7 +5221,7 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } found = true; } - + if (subC2BF8(&_arrunkObj1337[0]._arr3[0], pt)) { if (_arrunkObj1337[0]._arr3[0]._field34 != 0) { actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154); @@ -5248,12 +5248,12 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { if (found) return; - + if (_background1._bounds.contains(pt)) { subCD193(); return; } - + if (subC2BF8(&_item7, pt)) actionDisplay(1330, 9, 159, 10, 1, 200, 0, 7, 0, 154, 154); else if (subC2BF8(&_item8, pt)) @@ -5353,7 +5353,7 @@ void Scene1337::subCF31D() { int tmpIndx = subC26CB(1, i); if (tmpIndx == -1) break; - + tmpVal = 0; for (int j = 0; j <= 7; j++) { if (_arrunkObj1337[1]._arr2[j]._field34 == _arrunkObj1337[1]._arr1[tmpIndx]._field34) { @@ -5361,7 +5361,7 @@ void Scene1337::subCF31D() { break; } } - + if (tmpVal == 0) break; @@ -5373,7 +5373,7 @@ void Scene1337::subCF31D() { if ((_arrunkObj1337[1]._arr2[k]._field34 > 1) && (_arrunkObj1337[1]._arr2[k]._field34 <= 9)) ++count; } - + if (count == 7) _field424A = 1; @@ -5397,7 +5397,7 @@ void Scene1337::subCF31D() { } } } - + if (found) return; @@ -5416,9 +5416,9 @@ void Scene1337::subCF31D() { int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3); for (int i = 0; i <= 3; i++) { if (rndVal != 1) { - if ( (_arrunkObj1337[rndVal]._arr1[0]._field34 != 0) - || (_arrunkObj1337[rndVal]._arr1[1]._field34 != 0) - || (_arrunkObj1337[rndVal]._arr1[2]._field34 != 0) + if ( (_arrunkObj1337[rndVal]._arr1[0]._field34 != 0) + || (_arrunkObj1337[rndVal]._arr1[1]._field34 != 0) + || (_arrunkObj1337[rndVal]._arr1[2]._field34 != 0) || (_arrunkObj1337[rndVal]._arr1[3]._field34 == 0)) { count = rndVal; break; @@ -5435,7 +5435,7 @@ void Scene1337::subCF31D() { found = true; } } - + if (found) return; @@ -5449,7 +5449,7 @@ void Scene1337::subCF31D() { for (int j = 0; j <= 3; j++) { if (tmpVal != 1) { for (int k = 0; k <= 7; k++) { - // 'k' is not used in that loop. + // 'k' is not used in that loop. // It looks suspicious. if ((_arrunkObj1337[tmpVal]._arr3[0]._field34 == 0) && (subC32B1(tmpVal, _arrunkObj1337[1]._arr1[i]._field34))) { count = tmpVal; @@ -5510,7 +5510,7 @@ void Scene1337::subCF31D() { if (found) { if (count == -1) - return; + return; subC3456(&_arrunkObj1337[1]._arr1[j], &_arrunkObj1337[count]._arr3[0]); } else { @@ -5561,10 +5561,10 @@ void Scene1337::subCF979() { break; } } - + if (found) return; - + int tmpVal; found = false; for (int i = 0; i <= 3; i++) { @@ -5578,7 +5578,7 @@ void Scene1337::subCF979() { break; } } - + if (!flag) { for (int j = 0; j <= 7; j++) { if ((_arrunkObj1337[0]._arr2[j]._field34 == 1) && (!subC2687(_arrunkObj1337[0]._arr3[0]._field34))) { @@ -5591,21 +5591,21 @@ void Scene1337::subCF979() { if (count == 7) _field424A = 0; - + subC33C0(&_arrunkObj1337[0]._arr1[tmpVal], &_arrunkObj1337[0]._arr2[j]); found = true; } } } } - + if (found) break; } if (found) return; - + found = false; tmpVal = subC2719(0); @@ -5618,10 +5618,10 @@ void Scene1337::subCF979() { } } } - + if (found) return; - + tmpVal = subC274D(0); if (tmpVal != -1) { for (int i = 0; i <= 7; i++) { @@ -5632,10 +5632,10 @@ void Scene1337::subCF979() { } } } - - if (found) + + if (found) return; - + tmpVal = subC2781(0); if (tmpVal != -1) { if ( (_arrunkObj1337[2]._arr1[0]._field34 != 0) @@ -5646,10 +5646,10 @@ void Scene1337::subCF979() { found = true; } } - - if (found) + + if (found) return; - + for (int i = 0; i <= 3; i++) { if (subC27B5(_arrunkObj1337[0]._arr1[i]._field34) != -1) { // The variable 'j' is not used in the inner code of the loop. It's suspect @@ -5666,7 +5666,7 @@ void Scene1337::subCF979() { } } - if (found) + if (found) return; for (int i = 0; i <= 3; i++) { @@ -5678,26 +5678,26 @@ void Scene1337::subCF979() { found = true; } } - + if (found) break; } } - - if (found) + + if (found) return; tmpVal = subC274D(0); int tmpVal2 = subC331B(0); - + if ((tmpVal != -1) && (tmpVal2 != -1)) { subC358E(&_arrunkObj1337[0]._arr1[tmpVal], tmpVal2); found = true; } - + if (found) return; - + tmpVal = subC2781(0); if (tmpVal != -1) { if ( (_arrunkObj1337[1]._arr1[0]._field34 != 0) @@ -5708,7 +5708,7 @@ void Scene1337::subCF979() { found = true; } } - + if (found) return; @@ -5722,7 +5722,7 @@ void Scene1337::subCF979() { found = true; } } - + if (!found) { // The variable 'j' is not used in the inner code of the loop. It's suspect. for (int j = 0; j <= 7; j++) { @@ -5732,7 +5732,7 @@ void Scene1337::subCF979() { } } } - + if (found) break; } @@ -5761,12 +5761,12 @@ void Scene1337::subCF979() { } } } - + if (found) break; } } - + if (found) return; @@ -5847,7 +5847,7 @@ void Scene1337::subD02CA() { _item6._object1 = _arrunkObj1337[2]._arr1[di]._object1; } } - + if (di == 4) { subCDB90(1, _item6._field36); subD0281(); @@ -5862,7 +5862,7 @@ void Scene1337::subD02CA() { subD0281(); return; } - + // That continues the block when R2_GLOBALS._v57810 == 200 and di != 4 subD18B5(1332, _item6._object1._strip, _item6._object1._frame); R2_GLOBALS._sceneObjects->draw(); @@ -5874,7 +5874,7 @@ void Scene1337::subD02CA() { || (g_globals->_events.getEvent(event, EVENT_KEYPRESS)) ){ _item6._field36 = g_globals->_events._mousePos; found_di = false; - + for (int i = 0; i <= 3; i ++) { if (subC2BF8(&_arrunkObj1337[2]._arr1[i], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { if (_arrunkObj1337[2]._arr1[i]._field34 == 0) { @@ -5897,7 +5897,7 @@ void Scene1337::subD02CA() { break; } } - + if ((!found) && (!found_di)) { if (subC2BF8(&_item7, Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { subC4A39(&_item6); @@ -5947,7 +5947,7 @@ void Scene1337::subD02CA() { } else { if (j == 7) _field424A = 2; - + subC33C0(&_item6, &_arrunkObj1337[2]._arr2[i]); return; } @@ -6048,7 +6048,7 @@ void Scene1337::subD02CA() { actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154); } } - + if (subC2BF8(&_arrunkObj1337[3]._arr4[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { if ( (_arrunkObj1337[3]._arr1[0]._field34 != 0) || (_arrunkObj1337[3]._arr1[1]._field34 != 0) @@ -6188,7 +6188,7 @@ void Scene1337::subD02CA() { } } } - + if (found) return; } else { @@ -6234,7 +6234,7 @@ int Scene1337::subD18F5() { // The cursor looks... very dummy // To be checked warning("TODO: CursorManager.setData(R2_GLOBALS.off_57705)"); - + ++R2_GLOBALS._v57709; return R2_GLOBALS._v57709; @@ -6339,7 +6339,7 @@ void Scene1500::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(110); } else if (R2_GLOBALS._sceneManager._previousScene == 1550) { _actor1.setPosition(Common::Point(189, 139), 5); - + _actor3.setup(1400, 2, 1); _actor3.changeZoom(-1); _actor3.setPosition(Common::Point(298, 258), 5); @@ -6505,7 +6505,7 @@ void Scene1530::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); - + if (R2_GLOBALS._sceneManager._previousScene == 1000) { R2_GLOBALS._player.postInit(); R2_GLOBALS._player.hide(); @@ -6677,7 +6677,7 @@ bool Scene1550::UnkObj15502::startAction(CursorType action, Event &event) { R2_GLOBALS._player.disableControl(); if (R2_GLOBALS._player._characterIndex == 1) scene->_sceneMode = 1576; - else + else scene->_sceneMode = 1584; // strcpy(scene->_arrUnkObj15502[7]._actorName, 'hatch'); scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_arrUnkObj15502[7], NULL); @@ -6887,7 +6887,7 @@ bool Scene1550::UnkObj15503::startAction(CursorType action, Event &event) { } else { if (scene->_actor4._frame == 1) scene->_sceneMode = 24; - else + else scene->_sceneMode = 22; scene->setAction(&scene->_sequenceManager1, scene, 1561, this, NULL); } @@ -6911,7 +6911,7 @@ void Scene1550::UnkArea1550::remove() { // if ((scene->_sceneMode >= 20) && (scene->_sceneMode <= 29)) return; - + R2_GLOBALS._player.disableControl(); if (scene->_actor4._frame == 1) { scene->_sceneMode = 1559; @@ -7016,14 +7016,14 @@ bool Scene1550::Actor7::startAction(CursorType action, Event &event) { Scene1550 *scene = (Scene1550 *)R2_GLOBALS._sceneManager._scene; scene->_sceneMode = 80; scene->signal(); - + return true; } bool Scene1550::Actor8::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + R2_GLOBALS._player.disableControl(); Scene1550 *scene = (Scene1550 *)R2_GLOBALS._sceneManager._scene; scene->_field412 = 1; @@ -7031,7 +7031,7 @@ bool Scene1550::Actor8::startAction(CursorType action, Event &event) { scene->_sceneMode = 1552; else scene->_sceneMode = 1588; - + scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor8, NULL); return true; } @@ -7071,7 +7071,7 @@ bool Scene1550::Actor10::startAction(CursorType action, Event &event) { scene->_sceneMode = 1589; scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor10, NULL); - return true; + return true; } bool Scene1550::Actor11::startAction(CursorType action, Event &event) { @@ -7087,7 +7087,7 @@ bool Scene1550::Actor11::startAction(CursorType action, Event &event) { scene->_sceneMode = 1587; scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor11, NULL); - return true; + return true; } bool Scene1550::Actor12::startAction(CursorType action, Event &event) { @@ -7132,7 +7132,7 @@ bool Scene1550::Actor13::startAction(CursorType action, Event &event) { case CURSOR_USE: if (scene->_field415 != 2) return SceneActor::startAction(action, event); - + if (R2_INVENTORY.getObjectScene(R2_BATTERY) == 1550) { R2_GLOBALS._player.disableControl(); scene->_sceneMode = 1564; @@ -7180,13 +7180,13 @@ void Scene1550::postInit(SceneObjectList *OwnerList) { loadScene(1234); else loadScene(1550); - + scalePalette(65, 65, 65); setZoomPercents(30, 75, 170, 100); _field417 = 1550; _field419 = 0; SceneExt::postInit(); - + if (R2_GLOBALS._sceneManager._previousScene == -1) R2_GLOBALS.setFlag(R2_ATTRACTOR_CABLE_HARNESS); @@ -7194,12 +7194,12 @@ void Scene1550::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player._characterScene[1] = 1550; R2_GLOBALS._player._characterScene[2] = 1550; } - + _stripManager.setColors(60, 255); _stripManager.setFontNumber(3); _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); - + R2_GLOBALS._player.postInit(); R2_GLOBALS._player._effect = 6; @@ -7209,19 +7209,19 @@ void Scene1550::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setup(1505, 3, 1); R2_GLOBALS._player._moveDiff = Common::Point(5, 3); - + if ((R2_GLOBALS._v565EC[R2_GLOBALS._player._characterIndex] == 9) && (R2_GLOBALS._v565EC[R2_GLOBALS._player._characterIndex + 2] == 11)) R2_GLOBALS._player.setPosition(Common::Point(157, 135)); else R2_GLOBALS._player.setPosition(Common::Point(160, 100)); - + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.disableControl(); - + _field414 = 0; _actor7.changeZoom(-1); R2_GLOBALS._player.changeZoom(-1); - + switch (R2_GLOBALS._sceneManager._previousScene) { case 1530: R2_GLOBALS._v565AE = 0; @@ -7237,9 +7237,9 @@ void Scene1550::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 1580) { R2_GLOBALS._player.disableControl(); R2_GLOBALS._player.animate(ANIM_MODE_NONE, NULL); - + _field412 = 1; - + _actor1.postInit(); _arrUnkObj15502[7].subA5CDF(8); _arrUnkObj15502[7].hide(); @@ -7247,7 +7247,7 @@ void Scene1550::postInit(SceneObjectList *OwnerList) { _sceneMode = 1577; else _sceneMode = 1578; - + setAction(&_sequenceManager1, this, _sceneMode, &R2_GLOBALS._player, &_actor1, &_arrUnkObj15502[7], NULL); R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 1550; } else { @@ -7257,13 +7257,13 @@ void Scene1550::postInit(SceneObjectList *OwnerList) { default: break; } - + subA2B2F(); - + _item1.setDetails(16, 1550, 10, -1, -1); _item2.setDetails(24, 1550, 10, -1, -1); _item3.setDetails(Rect(0, 0, 320, 200), 1550, 0, 1, -1, 1, NULL); - + if ((R2_GLOBALS._sceneManager._previousScene == 1500) && (R2_GLOBALS.getFlag(16))) { _sceneMode = 70; if (!R2_GLOBALS._sceneObjects->contains(&_actor7)) @@ -7454,7 +7454,7 @@ void Scene1550::signal() { ++R2_GLOBALS._v565AE; if (R2_GLOBALS._player._characterIndex == 1) _stripManager.start(499 + R2_GLOBALS._v565AE, this); - else + else _stripManager.start(502 + R2_GLOBALS._v565AE, this); } } else { @@ -7470,7 +7470,7 @@ void Scene1550::signal() { ++R2_GLOBALS._v565AE; if (R2_GLOBALS._player._characterIndex == 1) _stripManager.start(563 + R2_GLOBALS._v565AE, this); - else + else _stripManager.start(567 + R2_GLOBALS._v565AE, this); } } @@ -7635,11 +7635,11 @@ void Scene1550::process(Event &event) { _field412 = 1; else _field412 = 0; - + if ((curReg == 13) || (curReg == 14)) _field412 = 0; } - + Scene::process(event); } @@ -7675,10 +7675,10 @@ void Scene1550::dispatch() { break; } } - + if (_field412 != 0) return; - + switch (R2_GLOBALS._player.getRegionIndex() - 11) { case 0: // No break on purpose @@ -7687,9 +7687,9 @@ void Scene1550::dispatch() { _sceneMode = 1; _field412 = 1; --R2_GLOBALS._v565EC[2 + R2_GLOBALS._player._characterIndex]; - + subA2B2F(); - + R2_GLOBALS._player.setPosition(Common::Point( 160 - (((((160 - R2_GLOBALS._player._position.x) * 100) / 108) * 172) / 100), 145)); if (R2_GLOBALS._player._position.x < 160) { Common::Point pt(R2_GLOBALS._player._position.x + 5, 135); @@ -7710,9 +7710,9 @@ void Scene1550::dispatch() { _sceneMode = 3; _field412 = 1; ++R2_GLOBALS._v565EC[2 + R2_GLOBALS._player._characterIndex]; - + subA2B2F(); - + R2_GLOBALS._player.setPosition(Common::Point( 160 - (((((160 - R2_GLOBALS._player._position.x) * 100) / 172) * 108) / 100), 19)); if (R2_GLOBALS._player._position.x < 160) { Common::Point pt(R2_GLOBALS._player._position.x + 5, 29); @@ -7733,9 +7733,9 @@ void Scene1550::dispatch() { _sceneMode = 5; _field412 = 1; ++R2_GLOBALS._v565EC[R2_GLOBALS._player._characterIndex]; - + subA2B2F(); - + if ((R2_GLOBALS._v565EC[R2_GLOBALS._player._characterIndex] == 9) && (R2_GLOBALS._v565EC[R2_GLOBALS._player._characterIndex + 2] == 11) && (R2_GLOBALS._player._position.y > 50) && (R2_GLOBALS._player._position.y < 135)) { if (R2_GLOBALS._player._position.y >= 85) { R2_GLOBALS._player.setPosition(Common::Point(320 - R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y + 10)); @@ -7792,7 +7792,7 @@ void Scene1550::dispatch() { void Scene1550::saveCharacter(int characterIndex) { if (R2_GLOBALS._player._characterIndex == 3) R2_GLOBALS._sound1.fadeOut2(NULL); - + SceneExt::saveCharacter(characterIndex); } @@ -7913,7 +7913,7 @@ void Scene1550::SceneActor1550::subA4D14(int frameNumber, int strip) { fixPriority(2); if (scene->_field414 == 2) setup(1553, 2, 1); - else + else setup(1556, 2, 1); setPosition(Common::Point(160, 44)); break; @@ -7943,7 +7943,7 @@ void Scene1550::SceneActor1550::subA4D14(int frameNumber, int strip) { } else { fixPriority(2); } - + if (frameNumber != 1) setDetails(1550, 6, -1, -1, 2, (SceneItem *) NULL); @@ -7984,40 +7984,40 @@ void Scene1550::subA2B2F() { Rect tmpRect; _field419 = 0; _field415 = 0; - + tmpRect = R2_GLOBALS._v5589E; - + _actor14.remove(); _actor17.remove(); _actor15.remove(); _actor19.remove(); _actor16.remove(); _actor18.remove(); - + for (int i = 0; i < 8; ++i) _arrUnkObj15501[i].remove(); - + _actor6.remove(); for (int i = 0; i < 8; ++i) _arrUnkObj15502[i].remove(); - + _actor8.remove(); _actor9.remove(); _actor10.remove(); _actor3.remove(); _actor11.remove(); - + if ((_sceneMode != 1577) && (_sceneMode != 1578)) _actor1.remove(); - + _actor2.remove(); _actor7.remove(); _actor13.remove(); _actor5.remove(); _actor12.remove(); _actor4.remove(); - + switch (R2_GLOBALS._v565EC[R2_GLOBALS._player._characterIndex + 2]) { case 0: switch (R2_GLOBALS._v565EC[R2_GLOBALS._player._characterIndex]) { @@ -8218,7 +8218,7 @@ void Scene1550::subA2B2F() { } else { _field414 = 2; } - + if (R2_GLOBALS._sceneManager._sceneNumber == 1550){ warning("Mouse_hideIfNeeded()"); warning("gfx_set_pane_p"); @@ -8528,7 +8528,7 @@ void Scene1550::subA2B2F() { _actor6.setPosition(Common::Point(243, 131)); _actor6.fixPriority(10); _actor6.setDetails(1550, 9, -1, -1, 2, (SceneItem *) NULL); - + _actor1.postInit(); _actor1.setup(1550, 2, 3); _actor1.setPosition(Common::Point(243, 64)); @@ -8658,7 +8658,7 @@ void Scene1550::subA2B2F() { } /*-------------------------------------------------------------------------- - * Scene 1575 - + * Scene 1575 - * *--------------------------------------------------------------------------*/ Scene1575::Scene1575() { @@ -8709,7 +8709,7 @@ void Scene1575::Hotspot1::process(Event &event) { return; } int di = scene->_actor1._position.x; - + switch (_field34 - 1) { case 0: if (R2_GLOBALS.getFlag(18)) { @@ -8730,10 +8730,10 @@ void Scene1575::Hotspot1::process(Event &event) { di -= 65; di += 2; scene->_field41A += 2; - + for (int i = 0; i < 17; i++) scene->_arrActor[i].setPosition(Common::Point(scene->_arrActor[i]._position.x + 2, scene->_arrActor[i]._position.y)); - + scene->_actor13.setPosition(Common::Point(scene->_actor13._position.x + 2, scene->_actor13._position.y)); scene->_actor12.setPosition(Common::Point(scene->_actor12._position.x + 2, scene->_actor12._position.y)); scene->_actor1.setPosition(Common::Point(di, scene->_actor1._position.y)); @@ -8745,12 +8745,12 @@ void Scene1575::Hotspot1::process(Event &event) { if (scene->_field41A > 0) { if (di < -8) di += 65; - + di -= 2; scene->_field41A -= 2; for (int i = 0; i < 178; i++) scene->_arrActor[i].setPosition(Common::Point(scene->_arrActor[i]._position.x - 2, scene->_arrActor[i]._position.y)); - + scene->_actor13.setPosition(Common::Point(scene->_actor13._position.x - 2, scene->_actor13._position.y)); scene->_actor12.setPosition(Common::Point(scene->_actor12._position.x - 2, scene->_actor12._position.y)); scene->_actor1.setPosition(Common::Point(di, scene->_actor1._position.y)); @@ -9061,9 +9061,9 @@ bool Scene1580::Hotspot1::startAction(CursorType action, Event &event) { scene->_actor2.setup(1580, 1, 4); scene->_actor2.setPosition(Common::Point(159, 163)); scene->_actor2.setDetails(1550, 78, -1, -1, 2, (SceneItem *) NULL); - + scene->_arrActor[5].remove(); - + return true; } @@ -9082,12 +9082,12 @@ bool Scene1580::Hotspot2::startAction(CursorType action, Event &event) { scene->_actor3.setup(1580, 1, 1); scene->_actor3.setPosition(Common::Point(124, 108)); scene->_actor3.fixPriority(10); - + if (R2_INVENTORY.getObjectScene(26) == 1580) scene->_actor3.setDetails(1550, 14, -1, -1, 5, &scene->_actor2); else scene->_actor3.setDetails(1550, 14, -1, -1, 2, (SceneItem *)NULL); - + scene->_actor1.postInit(); scene->_actor1.setup(1580, 3, 1); scene->_actor1.setPosition(Common::Point(124, 109)); @@ -9115,7 +9115,7 @@ bool Scene1580::Actor2::startAction(CursorType action, Event &event) { scene->_stripManager.start(536, scene); else scene->_stripManager.start(537, scene); - + return true; } @@ -9132,35 +9132,35 @@ bool Scene1580::Actor3::startAction(CursorType action, Event &event) { remove(); return true; } - + return SceneActor::startAction(action, event); } bool Scene1580::Actor4::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene; R2_GLOBALS._player.disableControl(); R2_GLOBALS._sceneItems.remove(&scene->_actor4); scene->_sceneMode = 0; animate(ANIM_MODE_5, scene); - + return true; } bool Scene1580::Actor5::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene; R2_GLOBALS._player.disableControl(); setFrame(2); scene->_sceneMode = 20; scene->setAction(&scene->_sequenceManager, scene, 2, &R2_GLOBALS._player, NULL); - + return true; } @@ -9238,9 +9238,9 @@ void Scene1580::postInit(SceneObjectList *OwnerList) { _stripManager.setFontNumber(3); _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); - + _sceneMode = 0; - + R2_GLOBALS._player.disableControl(); if (R2_INVENTORY.getObjectScene(26) == 1580) { _actor2.postInit(); @@ -9250,14 +9250,14 @@ void Scene1580::postInit(SceneObjectList *OwnerList) { } else { _item1.setDetails(Rect(141, 148, 179, 167), 1550, 79, -1, -1, 1, NULL); } - + if (R2_INVENTORY.getObjectScene(51) == 1580) { _actor3.postInit(); _actor3.setup(1580, 1, 1); _actor3.setPosition(Common::Point(124, 108)); _actor3.fixPriority(10); _actor3.setDetails(1550, 13, -1, -1, 1, (SceneItem *) NULL); - + _actor1.postInit(); _actor1.setup(1580, 1, 3); _actor1.setPosition(Common::Point(124, 96)); @@ -9273,7 +9273,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) { _actor1.setup(1580, 3, 1); _actor1.setPosition(Common::Point(124, 109)); _actor1.fixPriority(20); - + _sceneMode = 10; } else { _item2.setDetails(Rect(69, 29, 177, 108), 1550, 82, -1, -1, 1, NULL); @@ -9289,7 +9289,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) { _actor4.setPosition(Common::Point(216, 108)); _actor4.fixPriority(100); - + _actor5.postInit(); _actor5.setup(1580, 4, 1); _actor5.setPosition(Common::Point(291, 147)); @@ -9303,7 +9303,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) { _actor6.fixPriority(50); _actor6.setDetails(1550, 32, -1, 34, 1, (SceneItem *) NULL); } - + if (R2_INVENTORY.getObjectScene(27) == 1580) { _actor7.postInit(); _actor7.setup(1580, 6, 1); @@ -9311,13 +9311,13 @@ void Scene1580::postInit(SceneObjectList *OwnerList) { _actor7.fixPriority(50); _actor7.setDetails(1550, 38, -1, 34, 1, (SceneItem *) NULL); } - + R2_GLOBALS._player.postInit(); R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 1580; R2_GLOBALS._player.hide(); setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL); _item3.setDetails(Rect(0, 0, 320, 200), 1550, 50, -1, -1, 1, NULL); - + } void Scene1580::signal() { @@ -9334,7 +9334,7 @@ void Scene1580::signal() { _arrActor[0].setup(1580, 2, 1); _arrActor[0].setPosition(Common::Point(138, 56)); } - + if (R2_INVENTORY.getObjectScene(25) != 0) { _arrActor[1].postInit(); _arrActor[1].setup(1580, 2, 2); @@ -9663,7 +9663,7 @@ void Scene1625::process(Event &event) { } /*-------------------------------------------------------------------------- - * Scene 1700 - + * Scene 1700 - * *--------------------------------------------------------------------------*/ Scene1700::Scene1700() { @@ -9751,7 +9751,7 @@ void Scene1700::Exit3::changeScene() { void Scene1700::subAF3F8() { Rect tmpRect; R2_GLOBALS._walkRegions.load(1700); - + _actor3.remove(); _actor4.remove(); _actor5.remove(); @@ -9759,22 +9759,22 @@ void Scene1700::subAF3F8() { _actor7.remove(); _actor8.remove(); _actor11.remove(); - + if (_sceneMode != 40) { _actor9.remove(); _actor10.remove(); } - + warning("tmpRect = _v5589E;"); warning("Mouse_hideIfNeeded"); warning("set_pane_p(_paneNumber);"); warning("Big loop calling gfx_draw_slice_p"); - + if (_field77A == 0) _field77A = 1; else _field77A = 0; - + warning("set_pane_p(_paneNumber);"); if ((_sceneMode != 40) && (R2_GLOBALS._v565F6 != 0)){ @@ -9784,57 +9784,57 @@ void Scene1700::subAF3F8() { _actor9.setDetails(1700, 6, -1, -1, 2, (SceneItem *) NULL); R2_GLOBALS._walkRegions.enableRegion(2); R2_GLOBALS._walkRegions.enableRegion(12); - } - + } + if ((R2_GLOBALS._v565F6 + 2) % 4 == 0) { _actor3.postInit(); _actor3.setup(1700, 1, 1); _actor3.setPosition(Common::Point(222, 82)); _actor3.setDetails(100, -1, -1, -1, 2, (SceneItem *) NULL); - + _actor5.postInit(); _actor5.setup(1700, 2, 1); _actor5.setPosition(Common::Point(177, 82)); _actor5.fixPriority(0); - + _actor6.postInit(); _actor6.setup(1700, 2, 2); _actor6.setPosition(Common::Point(332, 96)); _actor6.fixPriority(0); - + _actor4.postInit(); _actor4.setup(1700, 1, 2); _actor4.setPosition(Common::Point(424, 84)); - + R2_GLOBALS._walkRegions.enableRegion(11); } - + if ((R2_GLOBALS._v565F6 + 399) % 800 == 0) { _actor7.postInit(); _actor7.setup(1700, 3, 2); _actor7.setPosition(Common::Point(51, 141)); _actor7.fixPriority(0); _actor7.setDetails(100, -1, -1, -1, 2, (SceneItem *) NULL); - + _exit3._enabled = true; } else { R2_GLOBALS._walkRegions.enableRegion(1); _exit3._enabled = false; } - - if ( ((!R2_GLOBALS.getFlag(15)) && ((R2_GLOBALS._v565F6 == 25) || (R2_GLOBALS._v565F6 == -3))) + + if ( ((!R2_GLOBALS.getFlag(15)) && ((R2_GLOBALS._v565F6 == 25) || (R2_GLOBALS._v565F6 == -3))) || ((R2_GLOBALS.getFlag(15)) && (R2_GLOBALS._v565F6 == R2_GLOBALS._v565FA)) ) { R2_GLOBALS._v565FA = R2_GLOBALS._v565F6; if (!R2_GLOBALS.getFlag(15)) _field77C = 1; - + _actor11.postInit(); _actor11.setup(1700, 3, 1); _actor11.setPosition(Common::Point(338, 150)); _actor11.setDetails(1700, 9, -1, -1, 2, (SceneItem *) NULL); _actor11.fixPriority(15); - + _actor8.postInit(); _actor8.setup(1700, 4, 1); _actor8.setPosition(Common::Point(312, 106)); @@ -9847,14 +9847,14 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { SceneExt::postInit(); if (R2_GLOBALS._sceneManager._previousScene == -1) R2_GLOBALS._sceneManager._previousScene = 1530; - + scalePalette(65, 65, 65); _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); _field77A = 0; _field77C = 0; - + _exit1.setDetails(Rect(94, 0, 319, 12), EXITCURSOR_N, 1700); _exit2.setDetails(Rect(0, 161, 319, 168), EXITCURSOR_S, 1700); _exit3.setDetails(Rect(0, 0, 2, 138), EXITCURSOR_W, 1800); @@ -9869,11 +9869,11 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setVisage(1506); R2_GLOBALS._player._moveDiff = Common::Point(3, 1); } - + _actor12.postInit(); _actor12.animate(ANIM_MODE_1, NULL); _actor12.setObjectWrapper(new SceneObjectWrapper()); - + if (R2_GLOBALS._player._characterIndex == R2_QUINN) { _actor12.setVisage(1506); _actor12._moveDiff = Common::Point(3, 1); @@ -9883,41 +9883,41 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { _actor12._moveDiff = Common::Point(2, 1); _actor12.setDetails(9001, 1, -1, -1, 1, (SceneItem *) NULL); } - + R2_GLOBALS._sound1.play(134); - + _actor1.postInit(); _actor1.fixPriority(10); - + if (R2_GLOBALS._player._characterIndex == R2_QUINN) _actor1.setVisage(1112); - else + else _actor1.setVisage(1111); - + _actor1._effect = 5; _actor1._field9C = _field312; R2_GLOBALS._player._linkedActor = &_actor1; - + _actor2.postInit(); _actor2.fixPriority(10); if (R2_GLOBALS._player._characterIndex == R2_QUINN) _actor2.setVisage(1111); - else + else _actor2.setVisage(1112); - + _actor2._effect = 5; _actor2._field9C = _field312; _actor12._linkedActor = &_actor2; - + R2_GLOBALS._sound1.play(134); - + switch (R2_GLOBALS._sceneManager._previousScene) { case 1530: R2_GLOBALS._player._characterIndex = R2_QUINN; R2_GLOBALS._player.disableControl(); R2_GLOBALS._player.hide(); _actor12.hide(); - + _actor10.postInit(); warning("_actor10._actorName = \"hatch\";"); _actor10.hide(); @@ -9926,7 +9926,7 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { _actor9.setup(1701, 1, 1); _actor9.setPosition(Common::Point(220, 137)); _actor9.setDetails(1700, 6, -1, -1, 1, (SceneItem *) NULL); - + _actor1.hide(); _actor2.hide(); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); @@ -10003,7 +10003,7 @@ void Scene1700::signal() { Common::Point pt(R2_GLOBALS._player._position.x, 160); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, this); - + if (R2_GLOBALS._player._position.x < 132) { _actor12.setPosition(Common::Point(156, 170)); Common::Point pt2(156, 160); @@ -10028,7 +10028,7 @@ void Scene1700::signal() { Common::Point pt(R2_GLOBALS._player._position.x, 10); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, this); - + if (R2_GLOBALS._player._position.x >= 171) { _actor12.setPosition(Common::Point(155, 0)); Common::Point pt2(155, 10); @@ -10112,7 +10112,7 @@ void Scene1700::signal() { R2_GLOBALS._walkRegions.enableRegion(15); else R2_GLOBALS._walkRegions.enableRegion(17); - + R2_GLOBALS._player.enableControl(); break; case 1704: @@ -10130,7 +10130,7 @@ void Scene1700::signal() { } /*-------------------------------------------------------------------------- - * Scene 1750 - + * Scene 1750 - * *--------------------------------------------------------------------------*/ Scene1750::Actor4::Actor4() { @@ -10193,7 +10193,7 @@ void Scene1750::Actor4::subB1A76(int arg1, int arg2, int arg3, int arg4, int arg _fieldA8 = arg3; _fieldAA = arg4; _fieldAC = arg5; - + postInit(); setup(1750, 1, 1); fixPriority(255); @@ -10227,7 +10227,7 @@ void Scene1750::Actor4::process(Event &event) { addMover(NULL); subB1B27(); } - + if (_fieldAE != 0) { event.handled = true; if (event.mousePos.y >= _fieldA8) { @@ -10251,7 +10251,7 @@ bool Scene1750::Actor4::startAction(CursorType action, Event &event) { bool Scene1750::Actor5::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + Scene1750 *scene = (Scene1750 *)R2_GLOBALS._sceneManager._scene; switch (_fieldA4) { @@ -10294,7 +10294,7 @@ void Scene1750::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._uiElements._active = false; R2_GLOBALS._v5589E.set(0, 0, 320, 200); SceneExt::postInit(); - + R2_GLOBALS._player._characterScene[1] = 1750; R2_GLOBALS._player._characterScene[2] = 1750; R2_GLOBALS._player._oldCharacterScene[1] = 1750; @@ -10304,7 +10304,7 @@ void Scene1750::postInit(SceneObjectList *OwnerList) { _rotation->setDelay(0); _rotation->_idxChange = 0; _rotation->_countdown = 2; - + switch ((R2_GLOBALS._v565F6 + 2) % 4) { case 0: _rotation->_currIndex = 247; @@ -10321,7 +10321,7 @@ void Scene1750::postInit(SceneObjectList *OwnerList) { default: break; } - + byte tmpPal[768]; for (int i = 224; i < 255; i++) { @@ -10348,40 +10348,40 @@ void Scene1750::postInit(SceneObjectList *OwnerList) { _actor3.setPosition(Common::Point(49, 185)); _actor3.fixPriority(7); _actor3.setDetails(1750, 30, -1, -1, 1, (SceneItem *) NULL); - + _actor1.postInit(); _actor1.setup(1750, 2, 1); _actor1.setPosition(Common::Point(35, ((_rotation->_currIndex - 218) % 4) + ((R2_GLOBALS._v565F6 % 800) * 4) - 1440)); _actor1.fixPriority(8); - + _actor2.postInit(); _actor2.setup(1750, 1, 4); - + int tmpVar = abs(_actor1._position.y - 158) / 100; - + if (tmpVar >= 8) _actor2.hide(); else if (_actor1._position.y <= 158) _actor2.setPosition(Common::Point(137, (tmpVar * 7) + 122)); else _actor2.setPosition(Common::Point(148, (tmpVar * 7) + 122)); - + _actor4.subB1A76(1, 286, 143, 41, 15); _actor4.setDetails(1750, 24, 1, -1, 1, (SceneItem *) NULL); - + _actor5.postInit(); _actor5._fieldA4 = 1; _actor5.setup(1750, 1, 2); _actor5.setPosition(Common::Point(192, 140)); _actor5.setDetails(1750, 18, 1, -1, 1, (SceneItem *) NULL); - + _actor6.postInit(); _actor6._fieldA4 = 2; _actor6.setup(1750, 1, 3); _actor6.setPosition(Common::Point(192, 163)); _actor6.setDetails(1750, 18, 1, -1, 1, (SceneItem *) NULL); _actor6.hide(); - + _actor7.postInit(); _actor7._fieldA4 = 3; _actor7.setup(1750, 1, 5); @@ -10393,7 +10393,7 @@ void Scene1750::postInit(SceneObjectList *OwnerList) { _field413 = 0; _field415 = 0; _field419 = ((_rotation->_currIndex - 218) / 4) % 4; - + _item2.setDetails(Rect(129, 112, 155, 175), 1750, 21, -1, -1, 1, NULL); _item3.setDetails(Rect(93, 122, 126, 172), 1750, 15, -1, -1, 1, NULL); _item4.setDetails(Rect(3, 3, 157, 99), 1750, 9, -1, -1, 1, NULL); @@ -10403,15 +10403,15 @@ void Scene1750::postInit(SceneObjectList *OwnerList) { void Scene1750::remove() { _rotation->remove(); - + if (R2_GLOBALS._v565F6 == 2400) R2_GLOBALS._v565F6 = 2399; - + if (R2_GLOBALS._v565F6 == -2400) R2_GLOBALS._v565F6 = -2399; - + R2_GLOBALS._v565FA = R2_GLOBALS._v565F6; - + SceneExt::remove(); R2_GLOBALS._sound1.fadeOut2(NULL); R2_GLOBALS._v5589E.top = 3; @@ -10432,7 +10432,7 @@ void Scene1750::process(Event &event) { void Scene1750::dispatch() {} /*-------------------------------------------------------------------------- - * Scene 1800 - + * Scene 1800 - * *--------------------------------------------------------------------------*/ Scene1800::Scene1800() { @@ -10448,10 +10448,10 @@ void Scene1800::synchronize(Serializer &s) { bool Scene1800::Hotspot5::startAction(CursorType action, Event &event) { if ((action != R2_COM_SCANNER) && (action != R2_COM_SCANNER_2)) return false; - + Scene1800 *scene = (Scene1800 *)R2_GLOBALS._sceneManager._scene; - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); if (R2_GLOBALS._player._characterIndex == R2_QUINN) { if (R2_GLOBALS._v565F6 == 1201) { @@ -10624,41 +10624,41 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(116); _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); - + if (R2_GLOBALS._sceneManager._previousScene == -1) R2_GLOBALS._v565F6 = 1201; - + if (R2_GLOBALS._v565F6 == 1201) _field412 = 2; else _field412 = 0; - + scalePalette(65, 65, 65); _exit1.setDetails(Rect(0, 160, 319, 168), EXITCURSOR_S, 1800); _item5.setDetails(Rect(0, 0, 320, 200), -1, -1, -1, -1, 1, NULL); - + _actor6.postInit(); _actor6.setup(1801, 4, 1); _actor6.setPosition(Common::Point(170, 24)); _actor6.setDetails(1800, 13, 14, 15, 1, (SceneItem *) NULL); - + _actor7.postInit(); _actor7.setup(1801, 3, 1); _actor7.setPosition(Common::Point(160, 139)); _actor7.setDetails(1800, 6, -1, -1, 1, (SceneItem *) NULL); - + _actor8.postInit(); _actor8.setup(1800, 1, 1); _actor8.setPosition(Common::Point(110, 78)); _actor8.fixPriority(135); _actor8.setDetails(1800, 20, -1, -1, 1, (SceneItem *) NULL); - + _actor9.postInit(); _actor9.setup(1800, 2, 1); _actor9.setPosition(Common::Point(209, 78)); _actor9.fixPriority(135); _actor9.setDetails(1800, 20, -1, -1, 1, (SceneItem *) NULL); - + _actor4.postInit(); if ((_field412 != 1) && (_field412 != 3) && (!R2_GLOBALS.getFlag(64))) _actor4.setup(1801, 2, 1); @@ -10666,7 +10666,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { _actor4.setup(1801, 2, 10); _actor4.setPosition(Common::Point(76, 142)); _actor4.setDetails(1800, 3, -1, -1, 1, (SceneItem *) NULL); - + _actor5.postInit(); if ((_field412 != 1) && (_field412 != 3) && (!R2_GLOBALS.getFlag(64))) _actor5.setup(1801, 1, 1); @@ -10674,7 +10674,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { _actor5.setup(1801, 1, 10); _actor5.setPosition(Common::Point(243, 142)); _actor5.setDetails(1800, 3, -1, -1, 1, (SceneItem *) NULL); - + R2_GLOBALS._player.postInit(); R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); if (R2_GLOBALS._player._characterIndex == R2_QUINN) { @@ -10693,7 +10693,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setVisage(1503); R2_GLOBALS._player._moveDiff = Common::Point(2, 2); } - + _actor2.postInit(); _actor2.animate(ANIM_MODE_1, NULL); _actor2.setObjectWrapper(new SceneObjectWrapper()); @@ -10716,7 +10716,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { _actor2.setVisage(1503); _actor2._moveDiff = Common::Point(2, 2); } - + if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 1800) { if (R2_GLOBALS._player._characterIndex == R2_QUINN) { R2_GLOBALS._player.setPosition(Common::Point(114, 150)); @@ -10751,34 +10751,34 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { _actor2.setPosition(Common::Point(140, 160)); } } - + _actor1.postInit(); _actor1.fixPriority(10); if (R2_GLOBALS._player._characterIndex == R2_QUINN) _actor1.setVisage(1111); else _actor1.setVisage(1110); - + _actor1._effect = 5; _actor1._field9C = _field312; R2_GLOBALS._player._linkedActor = &_actor1; - + _actor3.postInit(); _actor3.fixPriority(10); if (R2_GLOBALS._player._characterIndex == R2_QUINN) _actor3.setVisage(1110); else _actor3.setVisage(1111); - + _actor3._effect = 5; _actor3._field9C = _field312; - + _actor2._linkedActor = &_actor3; - + R2_GLOBALS._player._characterScene[1] = 1800; R2_GLOBALS._player._characterScene[2] = 1800; - + _item2.setDetails(Rect(128, 95, 190, 135), 1800, 10, -1, -1, 1, NULL); _item1.setDetails(Rect(95, 3, 223, 135), 1800, 0, -1, -1, 1, NULL); @@ -10786,7 +10786,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { // This is *wrong*. The following statement is a wild guess based on good common sense _item3.setDetails(11, 1800, 23, 24, 25); _item4.setDetails(Rect(0, 0, 320, 200), 1800, 17, -1, 19, 1, NULL); - + R2_GLOBALS._player.disableControl(); if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 1800) { if ((R2_GLOBALS.getFlag(14)) && (R2_GLOBALS._player._characterIndex == R2_SEEKER)) { @@ -10822,7 +10822,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager, this, 1801, &R2_GLOBALS._player, &_actor2, NULL); } } - + R2_GLOBALS._player._oldCharacterScene[1] = 1800; R2_GLOBALS._player._oldCharacterScene[2] = 1800; } @@ -10956,7 +10956,7 @@ void Scene1800::saveCharacter(int characterIndex) { } /*-------------------------------------------------------------------------- - * Scene 1850 - + * Scene 1850 - * *--------------------------------------------------------------------------*/ Scene1850::Scene1850() { @@ -10970,7 +10970,7 @@ void Scene1850::synchronize(Serializer &s) { bool Scene1850::Hotspot2::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneHotspot::startAction(action, event); - + Scene1850 *scene = (Scene1850 *)R2_GLOBALS._sceneManager._scene; R2_GLOBALS._player.disableControl(); @@ -10988,7 +10988,7 @@ bool Scene1850::Hotspot2::startAction(CursorType action, Event &event) { scene->setAction(&scene->_sequenceManager1, scene, 1860, &R2_GLOBALS._player, &scene->_actor5, NULL); else scene->setAction(&scene->_sequenceManager1, scene, 1859, &R2_GLOBALS._player, &scene->_actor5, NULL); - + R2_GLOBALS.clearFlag(30); } else { scene->_sceneMode = 1853; @@ -10998,7 +10998,7 @@ bool Scene1850::Hotspot2::startAction(CursorType action, Event &event) { else scene->setAction(&scene->_sequenceManager1, scene, 1853, &R2_GLOBALS._player, NULL); } - + return true; } @@ -11009,10 +11009,10 @@ bool Scene1850::Actor5::startAction(CursorType action, Event &event) { case CURSOR_USE: if ((R2_GLOBALS._player._characterIndex != R2_SEEKER) || (R2_GLOBALS.getFlag(33)) || (R2_GLOBALS.getFlag(30))) return SceneActor::startAction(action, event); - + R2_GLOBALS._player.disableControl(); scene->_sceneMode = 1857; - + if (R2_GLOBALS.getFlag(32)) scene->setAction(&scene->_sequenceManager1, scene, 1858, &R2_GLOBALS._player, &scene->_actor5, NULL); else @@ -11026,7 +11026,7 @@ bool Scene1850::Actor5::startAction(CursorType action, Event &event) { SceneItem::display(1850, 2, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); else SceneItem::display(1850, 1, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); - + return true; break; case R2_AIRBAG: @@ -11046,7 +11046,7 @@ bool Scene1850::Actor5::startAction(CursorType action, Event &event) { R2_GLOBALS._player.disableControl(); scene->_sceneMode = 1875; scene->_actor2.postInit(); - + if (R2_GLOBALS.getFlag(32)) scene->setAction(&scene->_sequenceManager1, scene, 1876, &R2_GLOBALS._player, &scene->_actor2, NULL); else @@ -11059,7 +11059,7 @@ bool Scene1850::Actor5::startAction(CursorType action, Event &event) { R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); scene->_stripManager.start(557, scene); R2_GLOBALS.setFlag(69); - + return true; } else { return SceneActor::startAction(action, event); @@ -11074,7 +11074,7 @@ bool Scene1850::Actor5::startAction(CursorType action, Event &event) { scene->_sceneMode = 1878; scene->setAction(&scene->_sequenceManager1, scene, 1878, &R2_GLOBALS._player, &scene->_actor5, &scene->_actor2, NULL); } - + return true; break; default: @@ -11086,31 +11086,31 @@ bool Scene1850::Actor5::startAction(CursorType action, Event &event) { bool Scene1850::Actor6::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneHotspot::startAction(action, event); - + Scene1850 *scene = (Scene1850 *)R2_GLOBALS._sceneManager._scene; - + if (R2_GLOBALS.getFlag(32)) { SceneItem::display(3240, 4, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); return true; } - + R2_GLOBALS._player.disableControl(); if (scene->_field412 == 1851) R2_GLOBALS._player._effect = 1; - + if (_position.x >= 160) R2_GLOBALS.setFlag(29); - else + else R2_GLOBALS.clearFlag(29); - + if ((R2_GLOBALS._player._characterIndex == R2_SEEKER) && (R2_GLOBALS.getFlag(30))) { if (_position.x >= 160) scene->_field41E = 3; else scene->_field41E = 2; - + scene->_sceneMode = 1860; - + if (R2_GLOBALS.getFlag(32)) { scene->setAction(&scene->_sequenceManager1, scene, 1860, &R2_GLOBALS._player, &scene->_actor5, NULL); } else { @@ -11136,13 +11136,13 @@ bool Scene1850::Actor8::startAction(CursorType action, Event &event) { R2_GLOBALS._player.disableControl(); scene->_sceneMode = 1881; - + if (R2_GLOBALS._player._characterIndex == R2_QUINN) { scene->setAction(&scene->_sequenceManager1, scene, 1881, &R2_GLOBALS._player, NULL); } else { scene->setAction(&scene->_sequenceManager1, scene, 1880, &R2_GLOBALS._player, NULL); } - + return true; } @@ -11166,10 +11166,10 @@ void Scene1850::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == 3150) R2_GLOBALS._sound1.play(116); - + _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); - + _field418 = 0; _field41E = 0; _field41A = Common::Point(0, 0); @@ -11192,7 +11192,7 @@ void Scene1850::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._walkRegions.enableRegion(1); _actor5.postInit(); - + if (R2_GLOBALS.getFlag(34)) { R2_GLOBALS._walkRegions.enableRegion(2); _actor5.setup(1851, 4, 3); @@ -11371,7 +11371,7 @@ void Scene1850::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setPosition(Common::Point(164, 106)); } - } + } R2_GLOBALS._player.enableControl(); } else { // R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] != 1850 @@ -11412,7 +11412,7 @@ void Scene1850::postInit(SceneObjectList *OwnerList) { } _actor8.fixPriority(113); - + if (R2_GLOBALS.getFlag(34)) { _actor8.setDetails(1850, 25, -1, -1, 4, &_actor5); } else { @@ -11435,7 +11435,7 @@ void Scene1850::remove() { R2_GLOBALS._scenePalette._palette[765] = 255; R2_GLOBALS._scenePalette._palette[766] = 255; R2_GLOBALS._scenePalette._palette[767] = 255; - + SceneExt::remove(); } @@ -11447,9 +11447,9 @@ void Scene1850::signal() { _actor1._effect = 6; _actor1._shade = 6; - + R2_GLOBALS._walkRegions.enableRegion(5); - + if (R2_GLOBALS.getFlag(68)) { R2_GLOBALS._player.enableControl(); } else { @@ -11495,7 +11495,7 @@ void Scene1850::signal() { _palette1.loadPalette(1851); _field412 = 1851; } - + _field418 = 1; if (R2_GLOBALS.getFlag(30)) { _actor8.setAction(&_sequenceManager2, NULL, 1867, &_actor8, NULL); @@ -11511,33 +11511,33 @@ void Scene1850::signal() { R2_GLOBALS.setFlag(62); R2_GLOBALS.setFlag(34); R2_GLOBALS._walkRegions.enableRegion(2); - + _actor2.postInit(); _actor2.setDetails(1850, 6, -1, -1, 5, &_actor5); - + _sceneMode = 1879; _actor8.setAction(&_sequenceManager2, this, 1879, &_actor5, &_actor8, &_actor2, NULL); } else { _actor8.setAction(&_sequenceManager2, NULL, 1867, &_actor8, NULL); } - + if (R2_GLOBALS.getFlag(34)) R2_GLOBALS._scenePalette.addFader(_palette1._palette, 256, 5, NULL); else R2_GLOBALS._scenePalette.addFader(_palette1._palette, 256, 5, this); - + if (_field412 == 1851) _field416 = -20; else _field416 = 20; - + _field414 = 20; - + if (R2_GLOBALS._player._characterIndex == R2_QUINN) { if (_sceneMode == 1879) _sceneMode = 1854; - + if (R2_GLOBALS.getFlag(32)) { setAction(&_sequenceManager1, NULL, 1873, &R2_GLOBALS._player, NULL); } else { @@ -11546,7 +11546,7 @@ void Scene1850::signal() { } else { if (_sceneMode == 1879) _sceneMode = 1855; - + if (R2_GLOBALS.getFlag(32)) { setAction(&_sequenceManager1, NULL, 1874, &R2_GLOBALS._player, NULL); } else { @@ -11583,10 +11583,10 @@ void Scene1850::signal() { PlayerMover *mover = new PlayerMover(); R2_GLOBALS._player.addMover(mover, &_field41A, this); - + _field41A = Common::Point(0, 0); } - + switch (_field41E) { case 1: _sceneMode = 1853; @@ -11608,7 +11608,7 @@ void Scene1850::signal() { default: break; } - + _field41E = 0; break; case 1870: @@ -11632,16 +11632,16 @@ void Scene1850::signal() { } else { _actor3.setDetails(1850, 30, -1, -1, 2, (SceneItem *)NULL); } - + _actor4.postInit(); _actor4._effect = 6; - + if (R2_GLOBALS._player._characterIndex == R2_QUINN) { _actor4.setDetails(1850, 29, -1, -1, 2, (SceneItem *)NULL); } else { _actor4.setDetails(1850, 28, -1, -1, 2, (SceneItem *)NULL); } - + if (R2_GLOBALS.getFlag(31)) { _actor3._shade = 0; _actor4._shade = 0; @@ -11649,12 +11649,12 @@ void Scene1850::signal() { _actor3._shade = 6; _actor4._shade = 6; } - + R2_GLOBALS.clearFlag(30); _sceneMode = 15; setAction(&_sequenceManager1, this, 1869, &R2_GLOBALS._player, &_actor3, NULL); setAction(&_sequenceManager2, this, 1868, &_actor1, &_actor4, NULL); - break; + break; case 1878: R2_INVENTORY.setObjectScene(R2_REBREATHER_TANK, 1850); R2_GLOBALS.setFlag(33); @@ -11678,7 +11678,7 @@ void Scene1850::signal() { } void Scene1850::process(Event &event) { - if ( (event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_ARROW) + if ( (event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_ARROW) && (R2_GLOBALS._player._characterIndex == R2_SEEKER) && (R2_GLOBALS.getFlag(30))) { _field41A = event.mousePos; R2_GLOBALS._player.disableControl(); @@ -11691,7 +11691,7 @@ void Scene1850::process(Event &event) { R2_GLOBALS.clearFlag(32); event.handled = true; } - + Scene::process(event); } @@ -11700,7 +11700,7 @@ void Scene1850::dispatch() { _field414--; if (_field414 == 0) _field418 = 0; - + if (_field416 >= 0) { R2_GLOBALS._player._shade = (_field414 * 6) / _field416; } else { @@ -11726,12 +11726,12 @@ void Scene1850::dispatch() { if (R2_INVENTORY.getObjectScene(R2_AIRBAG) == 1850) { _actor2.setPosition(Common::Point(_actor8._position.x + 20, _actor8._position.y - 71)); } - + Scene::dispatch(); } /*-------------------------------------------------------------------------- - * Scene 1875 - + * Scene 1875 - * *--------------------------------------------------------------------------*/ Scene1875::Actor1875::Actor1875() { @@ -11821,7 +11821,7 @@ void Scene1875::Actor1875::subB8271(int indx) { void Scene1875::Actor1875::process(Event &event) { if ((R2_GLOBALS._player._uiEnabled) || (event.handled)) return; - + Scene1875 *scene = (Scene1875 *)R2_GLOBALS._sceneManager._scene; if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == R2_STEPPING_DISKS) && (_bounds.contains(event.mousePos)) && (_fieldA6 == 0)) { @@ -11841,7 +11841,7 @@ void Scene1875::Actor1875::process(Event &event) { _fieldA6 = 1; event.handled = true; } - + if ((event.eventType == EVENT_BUTTON_UP) && (_fieldA6 != 0)) { if ((_fieldA4 == 3) || (_fieldA4 == 4) || (_fieldA4 == 5)) { setStrip(1); @@ -11855,10 +11855,10 @@ void Scene1875::Actor1875::process(Event &event) { void Scene1875::postInit(SceneObjectList *OwnerList) { loadScene(1875); SceneExt::postInit(); - + R2_GLOBALS._player._characterScene[1] = 1875; R2_GLOBALS._player._characterScene[2] = 1875; - + _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); @@ -11867,11 +11867,11 @@ void Scene1875::postInit(SceneObjectList *OwnerList) { _actor6.subB8271(3); _actor7.subB8271(4); _actor8.subB8271(5); - + _actor1.postInit(); _actor1.setup(1855, 4, 1); _actor1.setPosition(Common::Point(160, 116)); - + R2_GLOBALS._player.postInit(); if (R2_GLOBALS._sceneManager._previousScene == 1625) { R2_GLOBALS._sound1.play(122); @@ -11885,10 +11885,10 @@ void Scene1875::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.enableControl(); R2_GLOBALS._player._canWalk = false; } - + _item2.setDetails(Rect(43, 14, 275, 122), 1875, 9, 1, -1, 1, NULL); _item1.setDetails(Rect(0, 0, 320, 200), 1875, 3, -1, -1, 1, NULL); - + R2_GLOBALS._player._characterScene[1] = 1875; R2_GLOBALS._player._characterScene[2] = 1875; R2_GLOBALS._player._oldCharacterScene[1] = 1875; @@ -11930,7 +11930,7 @@ void Scene1875::signal() { void Scene1875::process(Event &event) { Scene::process(event); - + _actor4.process(event); _actor5.process(event); _actor6.process(event); @@ -11939,7 +11939,7 @@ void Scene1875::process(Event &event) { } /*-------------------------------------------------------------------------- - * Scene 1900 - + * Scene 1900 - * *--------------------------------------------------------------------------*/ bool Scene1900::Actor2::startAction(CursorType action, Event &event) { @@ -12005,11 +12005,11 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene != 1875) R2_GLOBALS._sound1.play(200); - + _stripManager.setColors(60, 255); _stripManager.setFontNumber(3); _stripManager.addSpeaker(&_seekerSpeaker); - + _exit1.setDetails(Rect(0, 105, 14, 145), R2_COM_SCANNER, 2000); _exit1.setDest(Common::Point(14, 135)); @@ -12027,7 +12027,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { else R2_GLOBALS._player._moveDiff = Common::Point(5, 3); R2_GLOBALS._player.disableControl(); - + if (R2_GLOBALS._sceneManager._previousScene != 1925) R2_GLOBALS.clearFlag(29); @@ -12061,7 +12061,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { _object2.setPosition(Common::Point(223, 109)); _object2.fixPriority(80); } - + if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 1875) { R2_GLOBALS._player._characterIndex = R2_QUINN; _actor1.postInit(); @@ -12129,7 +12129,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { } R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 1900; } - + _item2.setDetails(Rect(77, 2, 240, 103), 1900, 6, -1, -1, 1, NULL); _item1.setDetails(Rect(0, 0, 320, 200), 1900, 3, -1, -1, 1, NULL); } @@ -12242,17 +12242,17 @@ bool Scene1925::Hotspot3::startAction(CursorType action, Event &event) { scene->_sceneMode = 1925; scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor1, NULL); return true; - } - + } + if ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 20) && (event.mousePos.y >= 30)) { scene->_sceneMode = 1931; } else if ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 200) && (event.mousePos.y < 140)) { scene->_sceneMode = 1932; - } else if ( ( ((R2_GLOBALS._player._position.x == 112) && (R2_GLOBALS._player._position.y == 101)) + } else if ( ( ((R2_GLOBALS._player._position.x == 112) && (R2_GLOBALS._player._position.y == 101)) || ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 110)) ) && (event.mousePos.y >= 100)) { scene->_sceneMode = 1926; - } else if ( ( ((R2_GLOBALS._player._position.x == 112) && (R2_GLOBALS._player._position.y == 101)) + } else if ( ( ((R2_GLOBALS._player._position.x == 112) && (R2_GLOBALS._player._position.y == 101)) || ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 110)) ) && (event.mousePos.y < 60)) { scene->_sceneMode = 1927; @@ -12415,7 +12415,7 @@ void Scene1925::postInit(SceneObjectList *OwnerList) { _actor1.setDetails(1925, 0, 1, 2, 1, (SceneItem *) NULL); _item2.setDetails(Rect(133, 68, 140, 77), 1925, 3, -1, 5, 1, NULL); // No break on purpose - case -3: + case -3: _exit3.setDetails(Rect(83, 38, 128, 101), EXITCURSOR_W, 1925); // No break on purpose default: @@ -12510,7 +12510,7 @@ void Scene1925::signal() { } /*-------------------------------------------------------------------------- - * Scene 1945 - + * Scene 1945 - * *--------------------------------------------------------------------------*/ Scene1945::Scene1945() { @@ -12588,7 +12588,7 @@ bool Scene1945::Hotspot4::startAction(CursorType action, Event &event) { R2_GLOBALS._player.enableControl(CURSOR_USE); R2_GLOBALS._player._canWalk = false; } - + if (scene->_sceneMode != 0) scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, NULL); @@ -12822,7 +12822,7 @@ void Scene1945::signal() { } /*-------------------------------------------------------------------------- - * Scene 1950 - + * Scene 1950 - * *--------------------------------------------------------------------------*/ Scene1950::Area1::Area1() { @@ -12831,7 +12831,7 @@ Scene1950::Area1::Area1() { } void Scene1950::Area1::synchronize(Serializer &s) { SceneArea::synchronize(s); - + s.syncAsByte(_field20); s.syncAsSint16LE(_fieldB65); } @@ -12846,7 +12846,7 @@ Scene1950::Scene1950() { void Scene1950::synchronize(Serializer &s) { SceneExt::synchronize(s); - + s.syncAsSint16LE(_field412); s.syncAsSint16LE(_field414); s.syncAsSint16LE(_field416); @@ -12863,7 +12863,7 @@ Scene1950::Area1::Actor10::Actor10() { void Scene1950::Area1::Actor10::synchronize(Serializer &s) { SceneActor::synchronize(s); - + s.syncAsSint16LE(_fieldA4); s.syncAsSint16LE(_fieldA6); s.syncAsSint16LE(_fieldA8); @@ -12925,7 +12925,7 @@ void Scene1950::Area1::remove() { SceneArea::remove(); R2_GLOBALS._insetUp--; // - + if (!R2_GLOBALS.getFlag(37)) R2_GLOBALS._sound2.play(278); @@ -12990,7 +12990,7 @@ void Scene1950::Area1::proc12(int visage, int stripFrameNum, int frameNum, int p _areaActor.fixPriority(248); scene->_exit3._enabled = false; proc13(1950, 27, 28, 27); - + for (_fieldB65 = 0; _fieldB65 < 16; _fieldB65++) _arrActor1[_fieldB65].init(_fieldB65); } @@ -13068,7 +13068,7 @@ Scene1950::Actor8::Actor8() { void Scene1950::Actor8::synchronize(Serializer &s) { SceneActor::synchronize(s); - + s.syncAsSint16LE(_fieldA4); s.syncAsSint16LE(_fieldA6); s.syncAsSint16LE(_fieldA8); @@ -13111,7 +13111,7 @@ void Scene1950::Actor8::signal() { _fieldA6 = _position.y -4; setVisage(1961); - + if (R2_GLOBALS._v566A5 == 3) setStrip(2); else @@ -13155,7 +13155,7 @@ void Scene1950::Actor8::signal() { for (_fieldAF = 0; _fieldAF < 18; ++_fieldAF) if (R2_GLOBALS._v56613[4 * _fieldAF] == 0) ++_fieldAE; - + if (_fieldAE == 18) { R2_GLOBALS.setFlag(36); _fieldAC = 23; @@ -13197,14 +13197,14 @@ bool Scene1950::Actor8::startAction(CursorType action, Event &event) { if ((R2_GLOBALS._v56613[(scene->_field41C - 1) * 4] == 0) || (action != R2_PHOTON_STUNNER)) return SceneActor::startAction(action, event); - + R2_GLOBALS._player.disableControl(); if (R2_GLOBALS._v56613[((scene->_field41C - 1) * 4) + 1] <= 1) _fieldAC = 21; else _fieldAC = 20; - + R2_GLOBALS._player.setVisage(25); if (R2_GLOBALS._v566A5 == 3) R2_GLOBALS._player.setStrip(2); @@ -13212,7 +13212,7 @@ bool Scene1950::Actor8::startAction(CursorType action, Event &event) { R2_GLOBALS._player.setStrip(1); R2_GLOBALS._player.animate(ANIM_MODE_5, this); R2_GLOBALS._sound3.play(99); - + return true; } @@ -13305,7 +13305,7 @@ void Scene1950::Exit6::changeScene() { Common::Point pt(-20, 160); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); - } else { + } else { if (!R2_GLOBALS.getFlag(36)) SceneItem::display(1950, 33, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); if ((R2_INVENTORY.getObjectScene(34) == 1950) || (R2_INVENTORY.getObjectScene(35) == 1950)) @@ -13612,7 +13612,7 @@ void Scene1950::subBDC1E() { default: break; } - + if (R2_GLOBALS._v566A4 != 1) R2_GLOBALS._walkRegions.load(1950); @@ -13806,11 +13806,11 @@ void Scene1950::subBDC1E() { R2_GLOBALS._walkRegions.enableRegion(13); break; } - + _object1.remove(); _object1.removeObject(); _actor1.remove(); - + switch (R2_GLOBALS._v566A4 - 4) { case 0: // No break on purpose @@ -13934,7 +13934,7 @@ void Scene1950::subBDC1E() { _actor1.fixPriority(220); break; } - + switch (R2_GLOBALS._v566A4 - 3) { case 0: // No break on purpose @@ -14162,7 +14162,7 @@ void Scene1950::subBE59B() { _actor6.setFrame(1); _actor6.setPosition(Common::Point(193, 158)); _actor6.setDetails(1950, 3, 4, 5, 2, (SceneItem *) NULL); - + _actor7.postInit(); _actor7.setVisage(1970); _actor7.setStrip(3); @@ -14172,7 +14172,7 @@ void Scene1950::subBE59B() { _actor7.fixPriority(159); _item2.setDetails(Rect(188, 124, 199, 133), 1950, 27, 28, -1, 2, NULL); - + if (R2_INVENTORY.getObjectScene(34) == 1950) { _actor5.postInit(); _actor5.setVisage(1970); @@ -14180,7 +14180,7 @@ void Scene1950::subBE59B() { _actor5.setFrame(2); _actor5.fixPriority(160); } - + if (R2_GLOBALS.getFlag(37)) { _actor5.setPosition(Common::Point(192, 118)); _actor5.setDetails(1950, 9, 4, -1, 2, (SceneItem *) NULL); @@ -14193,11 +14193,11 @@ void Scene1950::subBE59B() { _actor4.setPosition(Common::Point(192, 121)); _actor4.fixPriority(159); _actor4.setDetails(1950, 6, 7, 8, 2, (SceneItem *) NULL); - + _actor5.setPosition(Common::Point(192, 109)); _actor5.setDetails(1950, 9, 7, 8, 2, (SceneItem *) NULL); } - + _actor3.postInit(); _actor3.setVisage(1972); _actor3.setStrip(1); @@ -14208,7 +14208,7 @@ void Scene1950::subBE59B() { _actor3.setFrame(2); else _actor3.setFrame(1); - + _field414 = 1; } else if (_field414 != 0) { _actor6.remove(); @@ -14219,7 +14219,7 @@ void Scene1950::subBE59B() { _item1.setDetails(Rect(0, 0, 320, 200), 1950, 0, 1, 2, 2, NULL); } - + switch (R2_GLOBALS._v566A5) { case 0: _sceneMode = 1950; @@ -14263,7 +14263,7 @@ void Scene1950::subBE59B() { _actor8.setStrip(2); NpcMover *mover = new NpcMover(); _actor8.addMover(mover, &_field418, this); - + R2_GLOBALS._player.setPosition(Common::Point(-20, 160)); Common::Point pt2(30, 160); NpcMover *mover2 = new NpcMover(); @@ -14311,11 +14311,11 @@ void Scene1950::subBE59B() { R2_GLOBALS._v56AAB = 0; R2_GLOBALS._player.enableControl(CURSOR_USE); R2_GLOBALS._player._canWalk = false; - + _actor8.setStrip(1); NpcMover *mover = new NpcMover(); _actor8.addMover(mover, &_field418, this); - + R2_GLOBALS._player.setPosition(Common::Point(340, 160)); Common::Point pt2(289, 160); NpcMover *mover2 = new NpcMover(); @@ -14335,7 +14335,7 @@ void Scene1950::subBF4B4(int indx) { si = 3; } else si = 4; - + if (_area1._arrActor1[si]._fieldA8 == 0) { _area1._arrActor1[si].setFrame(2); _area1._arrActor1[si]._fieldA8 = 1; @@ -14343,14 +14343,14 @@ void Scene1950::subBF4B4(int indx) { _area1._arrActor1[si].setFrame(1); _area1._arrActor1[si]._fieldA8 = 0; } - + si = indx + 1; if ((indx / 4) == (si / 4)) { if (si > 15) si = 12; } else si -= 4; - + if (_area1._arrActor1[si]._fieldA8 == 0) { _area1._arrActor1[si].setFrame(2); _area1._arrActor1[si]._fieldA8 = 1; @@ -14358,7 +14358,7 @@ void Scene1950::subBF4B4(int indx) { _area1._arrActor1[si].setFrame(1); _area1._arrActor1[si]._fieldA8 = 0; } - + si = indx - 4; if (si < 0) si += 16; @@ -14370,7 +14370,7 @@ void Scene1950::subBF4B4(int indx) { _area1._arrActor1[si].setFrame(1); _area1._arrActor1[si]._fieldA8 = 0; } - + si = indx + 4; if (si > 15) si -= 16; @@ -14395,7 +14395,7 @@ void Scene1950::subBF4B4(int indx) { } else { R2_GLOBALS.setFlag(37); _sceneMode = 24; - // TODO: check if correct. The original doesn't countain a sceneActor in + // TODO: check if correct. The original doesn't countain a sceneActor in // this call, but it's extremely unusual setAction(&_sequenceManager, this, 1976, NULL); } @@ -14408,45 +14408,45 @@ void Scene1950::postInit(SceneObjectList *OwnerList) { _field41C = 0; if (R2_GLOBALS._sceneManager._previousScene == 300) R2_GLOBALS._v566A4 = 103; - + subBDC1E(); SceneExt::postInit(); R2_GLOBALS._sound1.play(105); _exit1.setDetails(Rect(130, 46, 189, 135), SHADECURSOR_UP, 1950); _exit1.setDest(Common::Point(160, 145)); - + _exit2.setDetails(Rect(208, 0, 255, 73), EXITCURSOR_N, 1950); _exit2.setDest(Common::Point(200, 151)); - + _exit3.setDetails(Rect(305, 95, 320, 147), EXITCURSOR_E, 1950); _exit3.setDest(Common::Point(312, 160)); - + _exit4.setDetails(Rect(208, 99, 255, 143), EXITCURSOR_S, 1950); _exit4.setDest(Common::Point(200, 151)); - + _exit5.setDetails(Rect(113, 154, 206, 168), SHADECURSOR_DOWN, 1950); _exit5.setDest(Common::Point(160, 165)); - + _exit6.setDetails(Rect(0, 95, 14, 147), EXITCURSOR_W, 1950); _exit6.setDest(Common::Point(7, 160)); - + _exit7.setDetails(Rect(72, 54, 120, 128), EXITCURSOR_NW, 1950); _exit7.setDest(Common::Point(120, 140)); - + _exit8.setDetails(Rect(258, 60, 300, 145), EXITCURSOR_NE, 1950); _exit8.setDest(Common::Point(268, 149)); - + R2_GLOBALS._player.postInit(); - if ( (R2_INVENTORY.getObjectScene(32) == 0) && (R2_INVENTORY.getObjectScene(33) == 0) + if ( (R2_INVENTORY.getObjectScene(32) == 0) && (R2_INVENTORY.getObjectScene(33) == 0) && (R2_INVENTORY.getObjectScene(46) == 0) && (!R2_GLOBALS.getFlag(36)) ) R2_GLOBALS._player.setVisage(22); else R2_GLOBALS._player.setVisage(20); - + R2_GLOBALS._player._moveDiff = Common::Point(5, 3); _item1.setDetails(Rect(0, 0, 320, 200), 1950, 0, 1, 2, 1, NULL); - + subBE59B(); } @@ -14578,7 +14578,7 @@ void Scene1950::signal() { R2_GLOBALS._player.setVisage(20); else R2_GLOBALS._player.setVisage(22); - + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); Common::Point pt(218, 165); NpcMover *mover = new NpcMover(); @@ -14593,7 +14593,7 @@ void Scene1950::signal() { R2_GLOBALS._player.setVisage(20); else R2_GLOBALS._player.setVisage(22); - R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); break; default: R2_GLOBALS._v56AAB = 0; @@ -14604,7 +14604,7 @@ void Scene1950::signal() { void Scene1950::process(Event &event) { if ( (event.eventType == EVENT_BUTTON_DOWN) - && (R2_GLOBALS._player._uiEnabled) + && (R2_GLOBALS._player._uiEnabled) && (R2_GLOBALS._events.getCursor() == R2_LIGHT_BULB) && (R2_GLOBALS._player._bounds.contains(event.mousePos)) && (R2_INVENTORY.getObjectScene(31) == 0)) { diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h index 5906030c5f..f65a89972d 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.h +++ b/engines/tsage/ringworld2/ringworld2_scenes1.h @@ -142,7 +142,7 @@ class Scene1200 : public SceneExt { virtual void proc12(int visage, int stripFrameNum, int frameNum, int posX, int posY); virtual void proc13(int resNum, int lookLineNum, int talkLineNum, int useLineNum); }; - + public: NamedHotspot _item1; SceneActor _actor1; @@ -567,7 +567,7 @@ class Scene1575 : public SceneExt { public: int _field34; int _field36; - + Hotspot1(); void synchronize(Serializer &s); void subA910D(int indx); @@ -750,7 +750,7 @@ public: Exit2 _exit2; Exit3 _exit3; SequenceManager _sequenceManager; - + int _field77A; int _field77C; @@ -772,7 +772,7 @@ class Scene1750 : public SceneExt { int _fieldAA; int _fieldAC; int _fieldAE; - + Actor4(); virtual void synchronize(Serializer &s); void subB1A76(int arg1, int arg2, int arg3, int arg4, int arg5); @@ -782,11 +782,11 @@ class Scene1750 : public SceneExt { virtual void process(Event &event); virtual bool startAction(CursorType action, Event &event); }; - + class Actor5 : public SceneActor { public: int _fieldA4; - + Actor5(); virtual void synchronize(Serializer &s); @@ -845,7 +845,7 @@ class Scene1800 : public SceneExt { public: virtual bool startAction(CursorType action, Event &event); }; - + class Exit1 : public SceneExit { public: virtual void changeScene(); @@ -897,7 +897,7 @@ class Scene1850 : public SceneExt { public: virtual bool startAction(CursorType action, Event &event); }; - + public: int _field412; int _field414; @@ -936,11 +936,11 @@ class Scene1875 : public SceneExt { public: int _fieldA4; int _fieldA6; - + Actor1875(); void subB84AB(); void subB8271(int indx); - + void synchronize(Serializer &s); virtual void process(Event &event); }; diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index 5567519046..6a030e5b44 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -261,7 +261,7 @@ void Scene2000::initExits() { _mazePlayerMode = 0; } else if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2350) _mazePlayerMode = 1; - else + else _mazePlayerMode = 10; R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 2000; R2_GLOBALS._sceneManager._previousScene = 2000; @@ -422,12 +422,12 @@ void Scene2000::Action1::signal() { default: break; } - + if (R2_GLOBALS._v56605[3 + _state] == R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) scene->_objList1[_state].show(); else scene->_objList1[_state].hide(); - + signal(); break; case 5: { @@ -783,7 +783,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(200); initExits(); g_globals->_sceneManager._fadeMode = FADEMODE_IMMEDIATE; - + R2_GLOBALS._player.postInit(); R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); @@ -1003,9 +1003,9 @@ void Scene2000::signal() { } void Scene2000::process(Event &event) { - if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN) && + if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_CROSSHAIRS)) { - + Common::Point pt(event.mousePos.x, 129); PlayerMover *mover = new PlayerMover(); R2_GLOBALS._player.addMover(mover, &pt, this); @@ -1048,7 +1048,7 @@ bool Scene2350::Actor3::startAction(CursorType action, Event &event) { void Scene2350::ExitUp::changeScene() { Scene2350 *scene = (Scene2350 *)R2_GLOBALS._sceneManager._scene; - + R2_GLOBALS._player.disableControl(CURSOR_CROSSHAIRS); scene->_sceneMode = 12; if (R2_GLOBALS._player._characterIndex == 1) @@ -1056,7 +1056,7 @@ void Scene2350::ExitUp::changeScene() { else scene->setAction(&scene->_sequenceManager, scene, 2352, &R2_GLOBALS._player, NULL); } - + void Scene2350::ExitWest::changeScene() { Scene2350 *scene = (Scene2350 *)R2_GLOBALS._sceneManager._scene; @@ -1129,7 +1129,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] == 34) { if (R2_GLOBALS._player._characterIndex == 1) _sceneMode = 2351; - else + else _sceneMode = 2353; setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL); } else { @@ -1147,7 +1147,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) { } R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 2350; } - + void Scene2350::remove() { R2_GLOBALS._sound1.fadeOut(NULL); SceneExt::remove(); @@ -1189,7 +1189,7 @@ void Scene2350::signal() { } void Scene2350::process(Event &event) { - if ((R2_GLOBALS._player._canWalk) && (event.eventType != EVENT_BUTTON_DOWN) && + if ((R2_GLOBALS._player._canWalk) && (event.eventType != EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_CROSSHAIRS)){ Common::Point pt(event.mousePos.x, 129); PlayerMover *mover = new PlayerMover(); @@ -1205,7 +1205,7 @@ void Scene2350::process(Event &event) { *--------------------------------------------------------------------------*/ void Scene2400::Exit1::changeScene() { Scene2400 *scene = (Scene2400 *)R2_GLOBALS._sceneManager._scene; - + R2_GLOBALS._player.disableControl(); scene->_sceneMode = 10; @@ -1214,7 +1214,7 @@ void Scene2400::Exit1::changeScene() { R2_GLOBALS._player.addMover(mover, &pt, scene); } - + void Scene2400::Exit2::changeScene() { Scene2400 *scene = (Scene2400 *)R2_GLOBALS._sceneManager._scene; @@ -1244,7 +1244,7 @@ void Scene2400::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager, this, 2401, &R2_GLOBALS._player, NULL); } } - + void Scene2400::signal() { switch (_sceneMode) { case 10: @@ -1339,7 +1339,7 @@ bool Scene2425::Actor1::startAction(CursorType action, Event &event) { } } else if (R2_GLOBALS._events.getCursor() == R2_GUNPOWDER) return false; - else + else return SceneActor::startAction(action, event); } @@ -1405,7 +1405,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) { _actor1.setup(2426, 1, 1); else _actor1.setup(2426, 1, 2); - + _actor1.setPosition(Common::Point(290, 9)); _actor1.fixPriority(20); _actor1.setDetails(2455, 12, -1, -1, 1, (SceneItem *)NULL); @@ -1511,7 +1511,7 @@ bool Scene2430::Actor3::startAction(CursorType action, Event &event) { void Scene2430::Exit1::changeScene() { Scene2430 *scene = (Scene2430 *)R2_GLOBALS._sceneManager._scene; - + scene->_sceneMode = 0; R2_GLOBALS._events.setCursor(R2_NEGATOR_GUN); R2_GLOBALS._player.disableControl(); @@ -1790,7 +1790,7 @@ bool Scene2440::Actor2::startAction(CursorType action, Event &event) { scene->_sceneMode = 2440; scene->setAction(&scene->_sequenceManager, scene, 2440, &R2_GLOBALS._player, &scene->_actor2, NULL); return true; - } + } return SceneActor::startAction(action, event); } @@ -2296,7 +2296,7 @@ void Scene2455::postInit(SceneObjectList *OwnerList) { _actor1.setup(2456, 3, 3); _actor1.setPosition(Common::Point(162, 165)); _actor1.setDetails(2455, 15, 1, -1, 1, (SceneItem *)NULL); - } + } } else { _actor3.postInit(); _actor3.setup(2456, 3, 1); @@ -2309,9 +2309,9 @@ void Scene2455::postInit(SceneObjectList *OwnerList) { _actor2.setup(2456, 3, 2); _actor2.setDetails(2455, 9, 1, -1, 1, (SceneItem *)NULL); } else { - if ((R2_INVENTORY.getObjectScene(50) != 2455) && (R2_INVENTORY.getObjectScene(49) != 2455)) + if ((R2_INVENTORY.getObjectScene(50) != 2455) && (R2_INVENTORY.getObjectScene(49) != 2455)) _actor2.setup(2455, 1, 1); - else + else _actor2.setup(2456, 1, 1); _actor2.setDetails(2455, 3, 1, -1, 1, (SceneItem *)NULL); } @@ -3679,7 +3679,7 @@ void Scene2700::process(Event &event) { break; } } - } + } } Scene::process(event); } @@ -4184,7 +4184,7 @@ bool Scene2800::Actor1::startAction(CursorType action, Event &event) { scene->_sceneMode = 10; scene->setAction(&scene->_sequenceManager, scene, 2802, &R2_GLOBALS._player, &scene->_actor2, &scene->_actor1, NULL); return true; - } else + } else return SceneActor::startAction(action, event); } @@ -4432,7 +4432,7 @@ void Scene2800::postInit(SceneObjectList *OwnerList) { _actor1.animate(ANIM_MODE_NONE, NULL); _actor1.setDetails(2800, -1, -1, -1, 1, (SceneItem *)NULL); } - + _item1.setDetails(Rect(0, 0, 320, 200), 2800, -1, -1, -1, 1, NULL); _stripManager.setColors(60, 255); diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index 2b97cba8e9..3dd566c900 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -30,7 +30,7 @@ namespace TsAGE { namespace Ringworld2 { /*-------------------------------------------------------------------------- - * Scene 3100 - + * Scene 3100 - * *--------------------------------------------------------------------------*/ Scene3100::Scene3100() { @@ -131,7 +131,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) { _guard.changeZoom(50); _guard.setPosition(Common::Point(10, 149)); _guard.setDetails(3100, 6, -1, -1, 2, (SceneItem *)NULL); - + _actor4.postInit(); _actor4.setup(3103, 1, 1); _actor4.setPosition(Common::Point(278, 113)); @@ -152,7 +152,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(243); } - + R2_GLOBALS._player._oldCharacterScene[1] = 3100; } @@ -322,7 +322,7 @@ void Scene3125::postInit(SceneObjectList *OwnerList) { _actor4.setup(3126, 1, 1); _actor4.setPosition(Common::Point(171, 160)); _actor4.fixPriority(201); - + _item3.setDetails(12, 3125, 9, 13, -1); _item2.setDetails(11, 3125, 15, 13, -1); _item1.setDetails(Rect(0, 0, 320, 200), 3125, 0, 1, 2, 1, NULL); @@ -442,7 +442,7 @@ bool Scene3150::Actor4::startAction(CursorType action, Event &event) { case CURSOR_USE: if (R2_GLOBALS.getFlag(75)) return SceneActor::startAction(action, event); - + R2_GLOBALS._player.disableControl(); scene->_sceneMode = 3151; scene->setAction(&scene->_sequenceManager, scene, 3151, &R2_GLOBALS._player, &scene->_actor4, NULL); @@ -504,7 +504,7 @@ bool Scene3150::Actor7::startAction(CursorType action, Event &event) { scene->setAction(&scene->_sequenceManager, scene, 3160, &R2_GLOBALS._player, &scene->_actor7, NULL); return true; } - + return SceneActor::startAction(action, event); } @@ -554,7 +554,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.postInit(); R2_GLOBALS._player.disableControl(); - + _actor2.postInit(); _actor2.setPosition(Common::Point(64, 139)); if (R2_GLOBALS.getFlag(78)) { @@ -686,7 +686,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) { _actor5.postInit(); _actor5._effect = 6; _actor5._shade = 3; - + setAction(&_sequenceManager, this, 3156, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor5, NULL); } else { if (R2_GLOBALS._v56AA0 != 2) @@ -1699,7 +1699,7 @@ void Scene3350::signal() { } /*-------------------------------------------------------------------------- - * Scene 3375 - + * Scene 3375 - * *--------------------------------------------------------------------------*/ Scene3375::Scene3375() { @@ -1799,13 +1799,13 @@ bool Scene3375::Actor1::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; if (R2_GLOBALS._player._characterIndex == 2) scene->_stripManager.start(3302, scene); else scene->_stripManager.start(3304, scene); - + return true; } @@ -1814,13 +1814,13 @@ bool Scene3375::Actor2::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; if (R2_GLOBALS._player._characterIndex == 3) scene->_stripManager.start(3302, scene); else scene->_stripManager.start(3301, scene); - + return true; } @@ -1829,10 +1829,10 @@ bool Scene3375::Actor3::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; scene->_stripManager.start(3303, scene); - + return true; } @@ -1841,7 +1841,7 @@ bool Scene3375::Actor4::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneActor::startAction(action, event); - + if (R2_GLOBALS._v56A9E != 0) { R2_GLOBALS._walkRegions.disableRegion(2); R2_GLOBALS._walkRegions.disableRegion(3); @@ -1855,10 +1855,10 @@ bool Scene3375::Actor4::startAction(CursorType action, Event &event) { R2_GLOBALS._walkRegions.disableRegion(8); R2_GLOBALS._player.disableControl(CURSOR_ARROW); - + scene->_sceneMode = 3375; scene->setAction(&scene->_sequenceManager, scene, 3375, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, &scene->_actor4, NULL); - + return true; } @@ -1944,10 +1944,10 @@ void Scene3375::postInit(SceneObjectList *OwnerList) { _field148A[1] = 3377; _field148A[2] = 3375; _field148A[3] = 3378; - + loadScene(_field148A[R2_GLOBALS._v56A9E]); SceneExt::postInit(); - + R2_GLOBALS._sound1.play(313); _stripManager.setColors(60, 255); @@ -1963,14 +1963,14 @@ void Scene3375::postInit(SceneObjectList *OwnerList) { setZoomPercents(126, 55, 200, 167); R2_GLOBALS._player.postInit(); - + if (R2_GLOBALS._player._characterIndex == 2) { R2_GLOBALS._player._moveDiff = Common::Point(5, 3); } else { R2_GLOBALS._player._moveDiff = Common::Point(3, 2); } R2_GLOBALS._player.changeZoom(-1); - + switch (R2_GLOBALS._player._characterIndex) { case 2: if (R2_GLOBALS._sceneManager._previousScene == 3385) @@ -1991,7 +1991,7 @@ void Scene3375::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setup(10, 3, 1); break; } - + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.disableControl(); @@ -2005,21 +2005,21 @@ void Scene3375::postInit(SceneObjectList *OwnerList) { } _actor1.changeZoom(-1); _actor1._effect = 1; - + int tmpStrip, tmpVisage; if (R2_GLOBALS._sceneManager._previousScene == 3385) tmpStrip = 1; else tmpStrip = 4; - + if (R2_GLOBALS._player._characterIndex == 2) tmpVisage = 10; else tmpVisage = 20; - + _actor1.setup(tmpVisage, tmpStrip, 1); _actor1.animate(ANIM_MODE_1, NULL); - + _actor2.postInit(); _actor2._moveDiff = Common::Point(3, 2); _actor2.changeZoom(-1); @@ -2033,10 +2033,10 @@ void Scene3375::postInit(SceneObjectList *OwnerList) { tmpVisage = 10; else tmpVisage = 30; - + _actor2.setup(tmpVisage, tmpStrip, 1); _actor2.animate(ANIM_MODE_1, NULL); - + _actor3.postInit(); _actor3._moveRate = 7; _actor3._moveDiff = Common::Point(5, 3); @@ -2049,34 +2049,34 @@ void Scene3375::postInit(SceneObjectList *OwnerList) { _actor3.setup(40, tmpStrip, 1); _actor3.animate(ANIM_MODE_1, NULL); - + _actor2.setDetails(3375, -1, -1, -1, 1, (SceneItem *)NULL); _actor3.setDetails(3375, 21, -1, -1, 1, (SceneItem *)NULL); _actor1.setDetails(3375, -1, -1, -1, 1, (SceneItem *)NULL); - + _actor4.postInit(); _actor4.setup(3375, 1, 1); _actor4.setPosition(Common::Point(254, 166)); _actor4.fixPriority(140); _actor4.hide(); - + _exit1.setDetails(Rect(0, 84, 24, 167), EXITCURSOR_W, 3375); _exit1.setDest(Common::Point(65, 155)); _exit2.setDetails(Rect(103, 152, 183, 170), SHADECURSOR_DOWN, 3375); _exit2.setDest(Common::Point(158, 151)); _exit3.setDetails(Rect(180, 75, 213, 132), EXITCURSOR_E, 3375); _exit3.setDest(Common::Point(201, 131)); - + for (int i = 0; i <= 12; ++i) _itemArray[i].setDetails(i, 3375, 3, -1, -1); - + _item1.setDetails(Rect(0, 0, 320, 200), 3375, 0, -1, 1, 1, NULL); if (R2_GLOBALS._sceneManager._previousScene == 3385) _sceneMode = 3379; else _sceneMode = 0; - + subFC696(_sceneMode); } @@ -2186,7 +2186,7 @@ void Scene3375::dispatch() { } /*-------------------------------------------------------------------------- - * Scene 3385 - + * Scene 3385 - * *--------------------------------------------------------------------------*/ Scene3385::Scene3385() { @@ -2204,13 +2204,13 @@ bool Scene3385::Actor1::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; if (R2_GLOBALS._player._characterIndex == 2) scene->_stripManager.start(3302, scene); else scene->_stripManager.start(3304, scene); - + return true; } @@ -2219,13 +2219,13 @@ bool Scene3385::Actor2::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; if (R2_GLOBALS._player._characterIndex == 3) scene->_stripManager.start(3302, scene); else scene->_stripManager.start(3301, scene); - + return true; } @@ -2234,10 +2234,10 @@ bool Scene3385::Actor3::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; scene->_stripManager.start(3303, scene); - + return true; } @@ -2253,7 +2253,7 @@ bool Scene3385::Actor4::startAction(CursorType action, Event &event) { scene->_sceneMode = 3386; scene->setAction(&scene->_sequenceManager, scene, 3386, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, &scene->_actor4, NULL); - + return true; } @@ -2303,21 +2303,21 @@ void Scene3385::postInit(SceneObjectList *OwnerList) { setZoomPercents(102, 40, 200, 160); R2_GLOBALS._player.postInit(); - + if (R2_GLOBALS._player._characterIndex == 2) R2_GLOBALS._player._moveDiff = Common::Point(5, 3); else R2_GLOBALS._player._moveDiff = Common::Point(3, 2); R2_GLOBALS._player.changeZoom(-1); - + if (R2_GLOBALS._player._characterIndex == 2) R2_GLOBALS._player.setup(20, _field11B2, 1); else if (R2_GLOBALS._player._characterIndex == 3) R2_GLOBALS._player.setup(30, _field11B2, 1); else R2_GLOBALS._player.setup(10, _field11B2, 1); - + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.disableControl(); @@ -2337,7 +2337,7 @@ void Scene3385::postInit(SceneObjectList *OwnerList) { _actor1.setup(20, _field11B2, 1); _actor1.animate(ANIM_MODE_1, NULL); _actor1.setDetails(3385, -1, -1, -1, 1, (SceneItem *) NULL); - + _actor2.postInit(); _actor2._moveDiff = Common::Point(3, 2); _actor2.changeZoom(-1); @@ -2356,15 +2356,15 @@ void Scene3385::postInit(SceneObjectList *OwnerList) { _actor3.setup(40, _field11B2, 1); _actor3.animate(ANIM_MODE_1, NULL); _actor3.setDetails(3385, 15, -1, -1, 1, (SceneItem *) NULL); - + _exit1.setDetails(Rect(103, 152, 217, 170), SHADECURSOR_DOWN, 3395); _exit1.setDest(Common::Point(158, 151)); - + _actor4.postInit(); _actor4.setPosition(Common::Point(160, 100)); _actor4.fixPriority(90); _actor4.setDetails(3385, 3, 4, -1, 1, (SceneItem *) NULL); - + if (R2_GLOBALS._sceneManager._previousScene == 3375) { R2_GLOBALS._player.setPosition(Common::Point(158, 102)); _actor1.setPosition(Common::Point(164, 100)); @@ -2385,7 +2385,7 @@ void Scene3385::postInit(SceneObjectList *OwnerList) { _actor4.setup(3385, 1, 1); _sceneMode = 3385; setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor3, NULL); - } + } _item1.setDetails(Rect(0, 0, 320, 200), 3385, 0, -1, -1, 1, NULL); R2_GLOBALS._v56A9E = 0; @@ -2418,7 +2418,7 @@ void Scene3385::signal() { } /*-------------------------------------------------------------------------- - * Scene 3395 - + * Scene 3395 - * *--------------------------------------------------------------------------*/ Scene3395::Scene3395() { @@ -2436,13 +2436,13 @@ bool Scene3395::Actor1::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; if (R2_GLOBALS._player._characterIndex == 2) scene->_stripManager.start(3302, scene); else scene->_stripManager.start(3304, scene); - + return true; } @@ -2451,13 +2451,13 @@ bool Scene3395::Actor2::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; if (R2_GLOBALS._player._characterIndex == 3) scene->_stripManager.start(3302, scene); else scene->_stripManager.start(3301, scene); - + return true; } @@ -2466,10 +2466,10 @@ bool Scene3395::Actor3::startAction(CursorType action, Event &event) { if (action != CURSOR_TALK) return SceneActor::startAction(action, event); - + scene->_sceneMode = 9999; scene->_stripManager.start(3303, scene); - + return true; } @@ -2485,7 +2485,7 @@ bool Scene3395::Actor4::startAction(CursorType action, Event &event) { scene->_sceneMode = 3396; scene->setAction(&scene->_sequenceManager, scene, 3396, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, &scene->_actor4, NULL); - + return true; } @@ -2523,21 +2523,21 @@ void Scene3395::postInit(SceneObjectList *OwnerList) { setZoomPercents(51, 40, 200, 137); R2_GLOBALS._player.postInit(); - + if (R2_GLOBALS._player._characterIndex == 2) R2_GLOBALS._player._moveDiff = Common::Point(5, 3); else R2_GLOBALS._player._moveDiff = Common::Point(3, 2); R2_GLOBALS._player.changeZoom(-1); - + if (R2_GLOBALS._player._characterIndex == 2) R2_GLOBALS._player.setup(20, _field142E, 1); else if (R2_GLOBALS._player._characterIndex == 3) R2_GLOBALS._player.setup(30, _field142E, 1); else R2_GLOBALS._player.setup(10, _field142E, 1); - + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.disableControl(); @@ -2576,7 +2576,7 @@ void Scene3395::postInit(SceneObjectList *OwnerList) { _actor3.setup(40, _field142E, 1); _actor3.animate(ANIM_MODE_1, NULL); _actor3.setDetails(3385, 18, -1, -1, 1, (SceneItem *) NULL); - + _actor4.postInit(); _actor4.setPosition(Common::Point(159, 50)); _actor4.fixPriority(40); @@ -2638,7 +2638,7 @@ void Scene3395::signal() { } /*-------------------------------------------------------------------------- - * Scene 3400 - + * Scene 3400 - * *--------------------------------------------------------------------------*/ Scene3400::Scene3400() { @@ -2802,7 +2802,7 @@ void Scene3400::signal() { _sceneMode = 3403; if (R2_GLOBALS._player._characterIndex == 2) setAction(&_sequenceManager, this, 3403, &R2_GLOBALS._player, &_actor3, &_actor7, NULL); - else + else setAction(&_sequenceManager, this, 3403, &_actor1, &_actor3, &_actor7, NULL); break; case 3309: @@ -2811,7 +2811,7 @@ void Scene3400::signal() { _sceneMode = 3405; if (R2_GLOBALS._player._characterIndex == 3) setAction(&_sequenceManager, this, 3405, &R2_GLOBALS._player, &_actor7, NULL); - else + else setAction(&_sequenceManager, this, 3405, &_actor2, &_actor7, NULL); break; case 3310: @@ -2885,7 +2885,7 @@ void Scene3400::signal() { } /*-------------------------------------------------------------------------- - * Scene 3500 - + * Scene 3500 - * *--------------------------------------------------------------------------*/ Scene3500::Action1::Action1() { @@ -2910,10 +2910,10 @@ void Scene3500::Action1::sub108670(int arg1) { _field1E = arg1; _field20 = 1; _field24 = 1; - + scene->_actor9.setStrip(2); scene->_actor9.show(); - + if (_field1E == 1) scene->_actor6.show(); else @@ -2954,7 +2954,7 @@ void Scene3500::Action1::sub108732(int arg1) { Common::Point pt(160, 73); NpcMover *mover = new NpcMover(); scene->_actor8.addMover(mover, &pt, NULL); - + scene->_fieldB9E = 160 - (_field1E * 2 * 160); Common::Point pt2(scene->_fieldB9E, 73); NpcMover *mover2 = new NpcMover(); @@ -3153,7 +3153,7 @@ void Scene3500::sub107F71(int arg1) { _action1.signal(); } else if (_action == 0) { _action1.sub108670(1); - setAction(&_action1, &_actor1, NULL); + setAction(&_action1, &_actor1, NULL); } break; case 104: @@ -3177,7 +3177,7 @@ void Scene3500::sub107F71(int arg1) { _action1.signal(); } else if (_action == 0) { _action1.sub108670(-1); - setAction(&_action1, &_actor1, NULL); + setAction(&_action1, &_actor1, NULL); } break; default: @@ -3221,16 +3221,16 @@ void Scene3500::Action1::signal() { int var4 = scene->_unkObj1.sub1097EF(scene->_field127C + 46) - 46; int di = abs(var2 - scene->_field127A); int var6 = abs(var4 - scene->_field127C); - + if ((scene->_actor1._frame % 2) != 0) { scene->_actor1._frameChange = _field1E; scene->_actor1.setFrame(scene->_actor1.changeFrame()); } int var8 = (scene->_action1._field1E * 2 + scene->_field1276); - if (var8 > 7) + if (var8 > 7) var8 = 1; - else if (var8 < 1) + else if (var8 < 1) var8 = 7; switch (var8) { @@ -3293,7 +3293,7 @@ void Scene3500::Action1::signal() { Common::Point pt(scene->_fieldAF8, 73); NpcMover *mover = new NpcMover(); scene->_actor8.addMover(mover, &pt, this); - + scene->_actor9.setPosition(Common::Point(160 + ((_field1E * 2) * 160), 73));; scene->_actor9._moveDiff.x = 160 - scene->_field126E; scene->_fieldB9E = 160; @@ -3315,7 +3315,7 @@ void Scene3500::Action1::signal() { else scene->_actor8.setStrip(2); scene->_actor8.fixPriority(1); - + scene->_actor9.setPosition(Common::Point(-160, 73)); scene->_actor9.setStrip(9); scene->_actor9.fixPriority(11); @@ -3343,12 +3343,12 @@ void Scene3500::Action1::signal() { // The following code allows the switch to work properly. warning("Checkme: fix for dead code"); int var_8 = (_field1E * 2 + scene->_field1276); - if (var_8 > 7) + if (var_8 > 7) var_8 = 1; - else if (var_8 < 1) + else if (var_8 < 1) var_8 = 7; // - + switch (var_8 - 1) { case 0: // No break on purpose @@ -3378,7 +3378,7 @@ void Scene3500::Action1::signal() { Common::Point pt(160, 73); NpcMover *mover = new NpcMover(); scene->_actor8.addMover(mover, &pt, NULL); - + scene->_fieldB9E = 160 - (_field1E * 2 * 160); Common::Point pt2(scene->_fieldB9E, 73); NpcMover *mover2 = new NpcMover(); @@ -3419,7 +3419,7 @@ void Scene3500::Action1::dispatch() { if ((_actionIndex == 1) && (scene->_field126E <= 4)) { scene->_rotation->_idxChange = 0; signal(); - } + } } void Scene3500::Action2::sub10831F(int arg1) { @@ -3451,12 +3451,12 @@ void Scene3500::Action2::signal() { scene->_fieldB9E = scene->_actor9._position.y; di = scene->_fieldB9E; } - + scene->_actor8._moveDiff.y = 9 - (scene->_field126E / 2); Common::Point pt(si, 73 - (_field1E * 12)); NpcMover *mover = new NpcMover(); scene->_actor8.addMover(mover, &pt, NULL); - + scene->_actor9._moveDiff.y = 9 - (scene->_field126E / 2); Common::Point pt2(di, 73 - (_field1E * 12)); NpcMover *mover2 = new NpcMover(); @@ -3474,7 +3474,7 @@ void Scene3500::Action2::signal() { si = scene->_actor8._position.x; di = scene->_actor9._position.x; } - + scene->_actor7.sub1094ED(); scene->_actor8._moveDiff.y = 9 - (scene->_field126E / 2); @@ -3486,7 +3486,7 @@ void Scene3500::Action2::signal() { Common::Point pt2(di, 73); NpcMover *mover2 = new NpcMover(); scene->_actor9.addMover(mover2, &pt2, NULL); - + scene->_actor3.setFrame2(2); } break; @@ -3500,13 +3500,13 @@ bool Scene3500::Item4::startAction(CursorType action, Event &event) { if (scene->_field1286 == 0) return true; - + if (scene->_field1286 != 4) return SceneHotspot::startAction(action, event); - + R2_GLOBALS._sound2.play(14); scene->sub107F71(_field34); - + return true; } @@ -3515,22 +3515,22 @@ void Scene3500::Actor7::process(Event &event) { if (scene->_field1286 == 0) return; - + if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE) && (_bounds.contains(event.mousePos))) { _fieldAE = 1 + event.mousePos.y - _position.y; event.eventType = EVENT_NONE; } - + if ((event.eventType == EVENT_BUTTON_UP) && (_fieldAE != 0)) { _fieldAE = 0; event.handled = true; if (scene->_action1._field24 == 0) sub1094ED(); } - + if (_fieldAE == 0) return; - + R2_GLOBALS._sound2.play(338); event.handled = true; @@ -3550,10 +3550,10 @@ bool Scene3500::Actor7::startAction(CursorType action, Event &event) { if (scene->_field1286 == 0) return true; - + if (scene->_field1286 == 4) return false; - + return SceneActor::startAction(action, event); } @@ -3586,7 +3586,7 @@ void Scene3500::postInit(SceneObjectList *OwnerList) { if (tmpIndex > 254) tmpIndex--; - + tmpPal[3 * i] = R2_GLOBALS._scenePalette._palette[3 * tmpIndex]; tmpPal[(3 * i) + 1] = R2_GLOBALS._scenePalette._palette[(3 * tmpIndex) + 1]; tmpPal[(3 * i) + 2] = R2_GLOBALS._scenePalette._palette[(3 * tmpIndex) + 2]; @@ -3597,7 +3597,7 @@ void Scene3500::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._scenePalette._palette[(3 * i) + 1] = tmpPal[(3 * i) + 1]; R2_GLOBALS._scenePalette._palette[(3 * i) + 2] = tmpPal[(3 * i) + 2]; } - + _actor7.sub109466(38, 165, 16, 32, _field1270); _actor7.setDetails(3500, 6, 7, -1, 1, (SceneItem *)NULL); R2_GLOBALS._sound1.play(276); @@ -3696,7 +3696,7 @@ void Scene3500::signal() { void Scene3500::process(Event &event) { if (_field1286 == 0) return; - + if (event.eventType == EVENT_KEYPRESS) { switch (event.kbd.keycode) { case Common::KEYCODE_1: @@ -3765,7 +3765,7 @@ void Scene3500::process(Event &event) { break; } } - + if (!event.handled) _actor7.process(event); @@ -3864,7 +3864,7 @@ void Scene3500::dispatch() { var_a = abs(var_6 - di); tmpVar = _unkObj1.sub109C09(Common::Point(var_field127A + 70, di + 46)); - if ( (((tmpVar == 23) || (tmpVar == 24) || (tmpVar == 4)) && (di <= var_6) && (_field127C>= var_6)) + if ( (((tmpVar == 23) || (tmpVar == 24) || (tmpVar == 4)) && (di <= var_6) && (_field127C>= var_6)) || (((tmpVar == 25) || (tmpVar == 26) || (tmpVar == 5) || (tmpVar == 14) || (tmpVar == 15)) && (_field126E >= var_a) && (_field126E > 3) && (_action1._field24 != 0)) ) { di = var_6; if ((tmpVar != 25) && (tmpVar != 26) && (tmpVar != 5) && (tmpVar != 14) && (tmpVar == 15)) @@ -3894,7 +3894,7 @@ void Scene3500::dispatch() { break; case 2: tmpVar = _unkObj1.sub109C09(Common::Point(var_field127A + 70, di + 46)); - if ( ((tmpVar == 12) || (tmpVar == 13) || (tmpVar == 11) || (tmpVar == 16) || (tmpVar == 31)) + if ( ((tmpVar == 12) || (tmpVar == 13) || (tmpVar == 11) || (tmpVar == 16) || (tmpVar == 31)) || (((tmpVar == 25) || (tmpVar == 23) || (tmpVar == 14) || (tmpVar == 5) || (tmpVar == 4)) && (var_a > 3)) ) { R2_GLOBALS._sound2.play(339); _rotation->_idxChange = 0; @@ -4003,7 +4003,7 @@ void Scene3500::dispatch() { var_6 = _unkObj1.sub1097EF(di + 46) - 46; var_a = abs(di - var_6); tmpVar = _unkObj1.sub109C09(Common::Point(var_field127A + 70, di + 46)); - if ( (((tmpVar == 25) || (tmpVar == 26) || (tmpVar == 5)) && (di >= var_6) && (_field127C <= var_6)) + if ( (((tmpVar == 25) || (tmpVar == 26) || (tmpVar == 5)) && (di >= var_6) && (_field127C <= var_6)) || (((tmpVar == 23) || (tmpVar == 24) || (tmpVar == 4) || (tmpVar == 14) || (tmpVar == 15)) && (_field126E >= var_a) && (_field126E <= 3) && (_action1._field24 != 0)) ){ if ((tmpVar != 23) && (tmpVar != 24) && (tmpVar != 4) && (tmpVar != 14) && (tmpVar != 15)) R2_GLOBALS._sound2.play(339); @@ -4179,7 +4179,7 @@ void Scene3500::dispatch() { } /*-------------------------------------------------------------------------- - * Scene 3600 - + * Scene 3600 - * *--------------------------------------------------------------------------*/ Scene3600::Scene3600() { @@ -4227,7 +4227,7 @@ void Scene3600::Action3600::signal() { R2_GLOBALS._sound2.fade(127, 5, 10, false, NULL); } setDelay(1); - warning("TODO: Palette fader using parameter 2 = 256"); + warning("TODO: Palette fader using parameter 2 = 256"); R2_GLOBALS._scenePalette.fade((const byte *)&scene->_palette1._palette, true, _field20); if (_field20 > 0) _field20 -= 2; @@ -4359,7 +4359,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) { g_globals->gfxManager()._bounds.moveTo(Common::Point(160, 0)); R2_GLOBALS._v558B6.set(25, 0, 260, 200); } - + loadScene(3600); SceneExt::postInit(); _field254C = 0; @@ -4502,7 +4502,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) { _action1._field1E = 1; _action1._field20 = 0; _action1.setActionIndex(1); - + _actor3.setAction(&_action1); _sceneMode = 3623; @@ -4768,7 +4768,7 @@ void Scene3600::signal() { R2_GLOBALS.setFlag(71); _sceneMode = 3626; setAction(&_sequenceManager1, this, 3626, &_actor13, NULL); - } + } break; case 3624: R2_GLOBALS._player.disableControl(); @@ -4946,7 +4946,7 @@ void Scene3700::signal() { } /*-------------------------------------------------------------------------- - * Scene 3800 - + * Scene 3800 - * *--------------------------------------------------------------------------*/ Scene3800::Scene3800() { @@ -5227,7 +5227,7 @@ void Scene3800::postInit(SceneObjectList *OwnerList) { _field412 = 0; initScene3800(); - + SceneExt::postInit(); R2_GLOBALS._sound1.play(231); @@ -5338,7 +5338,7 @@ void Scene3800::process(Event &event) { } /*-------------------------------------------------------------------------- - * Scene 3900 - + * Scene 3900 - * *--------------------------------------------------------------------------*/ void Scene3900::Exit1::changeScene() { @@ -5350,7 +5350,7 @@ void Scene3900::Exit1::changeScene() { R2_GLOBALS._v566AA = 1; R2_GLOBALS._v566A8 = 1; scene->_sceneMode = 14; - + Common::Point pt(160, 115); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); @@ -5365,7 +5365,7 @@ void Scene3900::Exit2::changeScene() { R2_GLOBALS._v566AA = 2; R2_GLOBALS._v566A8 = 1; scene->_sceneMode = 14; - + Common::Point pt(330, 145); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); @@ -5380,7 +5380,7 @@ void Scene3900::Exit3::changeScene() { R2_GLOBALS._v566AA = 3; R2_GLOBALS._v566A8 = 1; scene->_sceneMode = 14; - + Common::Point pt(160, 220); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); @@ -5395,7 +5395,7 @@ void Scene3900::Exit4::changeScene() { R2_GLOBALS._v566AA = 4; R2_GLOBALS._v566A8 = 1; scene->_sceneMode = 14; - + Common::Point pt(-10, 145); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); @@ -5407,7 +5407,7 @@ void Scene3900::Exit5::changeScene() { _enabled = false; R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 13; - + if (R2_GLOBALS._v566A9 == 4) { Common::Point pt(-10, 135); NpcMover *mover = new NpcMover(); diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h index 6088c88479..44787b9eef 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.h +++ b/engines/tsage/ringworld2/ringworld2_scenes3.h @@ -494,7 +494,7 @@ public: Exit1 _exit1; Action1 _action1; SequenceManager _sequenceManager; - + int _field11B2; Scene3385(); @@ -536,7 +536,7 @@ public: Actor4 _actor4; Action1 _action1; SequenceManager _sequenceManager; - + int _field142E; Scene3395(); @@ -600,10 +600,10 @@ class Scene3500 : public SceneExt { class Item4 : public NamedHotspot { public: int _field34; - + Item4(); virtual void synchronize(Serializer &s); - + virtual bool startAction(CursorType action, Event &event); }; @@ -615,7 +615,7 @@ class Scene3500 : public SceneExt { int _fieldAA; int _fieldAC; int _fieldAE; - + Actor7(); virtual void synchronize(Serializer &s); @@ -695,7 +695,7 @@ class Scene3600 : public SceneExt { class Action3600: public ActionExt { public: int _field1E, _field20; - + Action3600(); virtual void synchronize(Serializer &s); virtual void signal(); diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp index f729881e8f..da1449efdf 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -159,7 +159,7 @@ void VisualSpeaker::setText(const Common::String &msg) { if (s.empty()) _numFrames = 0; - + if (_fieldF6) { if ((R2_GLOBALS._speechSubtitles & SPEECH_TEXT) || !_soundId) _sceneText.hide(); @@ -229,7 +229,7 @@ void SpeakerCaptain3210::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -285,7 +285,7 @@ void SpeakerChief1100::proc15() { _object1.setPosition(_object2->_position); _object1._numFrames = 7; - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -342,7 +342,7 @@ void SpeakerGuard2800::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -382,7 +382,7 @@ void SpeakerJocko3200::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -405,7 +405,7 @@ void SpeakerJocko3220::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -428,7 +428,7 @@ void SpeakerJocko3230::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -442,7 +442,7 @@ void SpeakerJocko3230::proc15() { } //---------------------------------------------------------------------------- -// Classes related to MIRANDA +// Classes related to MIRANDA //---------------------------------------------------------------------------- SpeakerMiranda::SpeakerMiranda(): VisualSpeaker() { @@ -472,7 +472,7 @@ void SpeakerMiranda300::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -507,7 +507,7 @@ void SpeakerMiranda1625::proc15() { _object1.postInit(); _object1.setPosition(Common::Point(196, 65)); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -547,7 +547,7 @@ void SpeakerMiranda3375::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) + if (R2_GLOBALS._player._characterIndex == 3) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor2; @@ -558,7 +558,7 @@ void SpeakerMiranda3375::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (scene->_actor1._position.y != 163) R2_GLOBALS._player.setStrip(8); else @@ -574,7 +574,7 @@ void SpeakerMiranda3375::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -597,7 +597,7 @@ void SpeakerMiranda3385::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) + if (R2_GLOBALS._player._characterIndex == 3) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor2; @@ -608,7 +608,7 @@ void SpeakerMiranda3385::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3375) R2_GLOBALS._player.setStrip(4); else @@ -623,7 +623,7 @@ void SpeakerMiranda3385::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -646,7 +646,7 @@ void SpeakerMiranda3395::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) + if (R2_GLOBALS._player._characterIndex == 3) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor2; @@ -657,7 +657,7 @@ void SpeakerMiranda3395::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3385) R2_GLOBALS._player.setStrip(4); else @@ -673,7 +673,7 @@ void SpeakerMiranda3395::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -696,7 +696,7 @@ void SpeakerMiranda3400::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) + if (R2_GLOBALS._player._characterIndex == 3) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor2; @@ -740,7 +740,7 @@ void SpeakerMiranda3600::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) + if (R2_GLOBALS._player._characterIndex == 3) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor12; @@ -858,7 +858,7 @@ void SpeakerNej2700::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -893,7 +893,7 @@ void SpeakerNej2750::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -925,7 +925,7 @@ void SpeakerNej2800::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1002,7 +1002,7 @@ void SpeakerPrivate3210::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1047,7 +1047,7 @@ void SpeakerProtector3600::proc15() { R2_GLOBALS._player.disableControl(); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1107,7 +1107,7 @@ void SpeakerQuinn300::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1122,7 +1122,7 @@ void SpeakerQuinn300::proc15() { _object1.animate(ANIM_MODE_6, this); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - + switch (_object2->_visage) { case 10: _object1.setup((v - 1) / 4 + 4010, ((v - ((v - 1) / 4 * 4) - 1) % 8) * 2 + 1, 1); @@ -1158,7 +1158,7 @@ void SpeakerQuinn1100::proc15() { _object1.setPosition(_object2->_position); _object1._numFrames = 7; - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1250,7 +1250,7 @@ void SpeakerQuinn2700::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1281,7 +1281,7 @@ void SpeakerQuinn2750::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1312,7 +1312,7 @@ void SpeakerQuinn2800::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1371,9 +1371,9 @@ void SpeakerQuinn3375::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) + if (R2_GLOBALS._player._characterIndex == 1) _object2 = &R2_GLOBALS._player; - else if (R2_GLOBALS._player._characterIndex == 2) + else if (R2_GLOBALS._player._characterIndex == 2) _object2 = &scene->_actor1; else _object2 = &scene->_actor2; @@ -1384,7 +1384,7 @@ void SpeakerQuinn3375::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (scene->_actor1._position.y != 163) R2_GLOBALS._player.setStrip(8); else @@ -1399,7 +1399,7 @@ void SpeakerQuinn3375::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -1422,9 +1422,9 @@ void SpeakerQuinn3385::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) + if (R2_GLOBALS._player._characterIndex == 1) _object2 = &R2_GLOBALS._player; - else if (R2_GLOBALS._player._characterIndex == 2) + else if (R2_GLOBALS._player._characterIndex == 2) _object2 = &scene->_actor1; else _object2 = &scene->_actor2; @@ -1435,7 +1435,7 @@ void SpeakerQuinn3385::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3375) R2_GLOBALS._player.setStrip(4); else @@ -1450,7 +1450,7 @@ void SpeakerQuinn3385::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -1477,9 +1477,9 @@ void SpeakerQuinn3395::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) + if (R2_GLOBALS._player._characterIndex == 1) _object2 = &R2_GLOBALS._player; - else if (R2_GLOBALS._player._characterIndex == 2) + else if (R2_GLOBALS._player._characterIndex == 2) _object2 = &scene->_actor1; else _object2 = &scene->_actor2; @@ -1490,7 +1490,7 @@ void SpeakerQuinn3395::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3385) R2_GLOBALS._player.setStrip(4); else @@ -1505,7 +1505,7 @@ void SpeakerQuinn3395::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -1532,9 +1532,9 @@ void SpeakerQuinn3400::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) + if (R2_GLOBALS._player._characterIndex == 1) _object2 = &R2_GLOBALS._player; - else if (R2_GLOBALS._player._characterIndex == 2) + else if (R2_GLOBALS._player._characterIndex == 2) _object2 = &scene->_actor1; else _object2 = &scene->_actor2; @@ -1581,7 +1581,7 @@ void SpeakerQuinn3600::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) + if (R2_GLOBALS._player._characterIndex == 1) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor10; @@ -1736,7 +1736,7 @@ void SpeakerRalf3245::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1788,7 +1788,7 @@ void SpeakerRocko3200::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1811,7 +1811,7 @@ void SpeakerRocko3220::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1834,7 +1834,7 @@ void SpeakerRocko3230::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1879,7 +1879,7 @@ void SpeakerSeeker300::proc15() { _object1.fixPriority(140); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1918,7 +1918,7 @@ void SpeakerSeeker1100::proc15() { _object1.setPosition(_object2->_position); _object1._numFrames = 7; - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -1974,7 +1974,7 @@ void SpeakerSeeker1900::proc15() { _object1.setPosition(_object2->_position); _object1._numFrames = 7; - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2045,7 +2045,7 @@ void SpeakerSeeker3375::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) + if (R2_GLOBALS._player._characterIndex == 2) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor1; @@ -2056,7 +2056,7 @@ void SpeakerSeeker3375::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (scene->_actor1._position.y != 163) R2_GLOBALS._player.setStrip(8); else @@ -2071,7 +2071,7 @@ void SpeakerSeeker3375::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -2094,7 +2094,7 @@ void SpeakerSeeker3385::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) + if (R2_GLOBALS._player._characterIndex == 2) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor1; @@ -2105,7 +2105,7 @@ void SpeakerSeeker3385::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3375) R2_GLOBALS._player.setStrip(4); else @@ -2120,7 +2120,7 @@ void SpeakerSeeker3385::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -2143,7 +2143,7 @@ void SpeakerSeeker3395::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) + if (R2_GLOBALS._player._characterIndex == 2) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor1; @@ -2154,7 +2154,7 @@ void SpeakerSeeker3395::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3385) R2_GLOBALS._player.setStrip(4); else @@ -2169,7 +2169,7 @@ void SpeakerSeeker3395::proc15() { if (_object2->_mover) _object2->addMover(NULL); } - + switch (v) { case 0: @@ -2192,7 +2192,7 @@ void SpeakerSeeker3400::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) + if (R2_GLOBALS._player._characterIndex == 2) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor1; @@ -2251,7 +2251,7 @@ void SpeakerSeeker3600::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) + if (R2_GLOBALS._player._characterIndex == 2) _object2 = &R2_GLOBALS._player; else _object2 = &scene->_actor11; @@ -2394,7 +2394,7 @@ void SpeakerSocko3200::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2434,7 +2434,7 @@ void SpeakerSoldier300::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2478,7 +2478,7 @@ void SpeakerTeal300::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2502,7 +2502,7 @@ void SpeakerTeal1625::proc15() { _object1.postInit(); _object1.setPosition(Common::Point(68, 68)); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2525,7 +2525,7 @@ void SpeakerTeal3240::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2677,7 +2677,7 @@ void SpeakerTomko3245::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2729,7 +2729,7 @@ void SpeakerWebbster3240::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } @@ -2755,7 +2755,7 @@ void SpeakerWebbster3375::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (scene->_actor1._position.y != 163) R2_GLOBALS._player.setStrip(8); else @@ -2799,7 +2799,7 @@ void SpeakerWebbster3385::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3375) R2_GLOBALS._player.setStrip(4); else @@ -2843,7 +2843,7 @@ void SpeakerWebbster3395::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - + if (R2_GLOBALS._sceneManager._previousScene == 3385) R2_GLOBALS._player.setStrip(4); else diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index c091afe34c..0756d71d4c 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -240,7 +240,7 @@ void SceneManager::listenerSynchronize(Serializer &s) { if (s.isLoading()) { changeScene(_sceneNumber); - + if (_nextSceneNumber != -1) { sceneChange(); _nextSceneNumber = -1; @@ -317,7 +317,7 @@ void Scene::loadSceneData(int sceneNum) { _activeScreenNumber = sceneNum; if (g_vm->getGameID() == GType_Ringworld2) { - // Most scenes in Ringworld 2 don't have a scene size resource, but rather just have + // Most scenes in Ringworld 2 don't have a scene size resource, but rather just have // a standard 320x200 size. Only read the scene size data for the specific few scenes switch (sceneNum) { case 700: @@ -457,7 +457,7 @@ void Scene::refreshBackground(int xAmount, int yAmount) { Rect destBounds(xSectionDest * 160, ySectionDest * 100, (xSectionDest + 1) * 160, (ySectionDest + 1) * 100); if (g_vm->getGameID() != GType_Ringworld) { - // For Blue Force and Return to Ringworld, if the scene has an interface area, + // For Blue Force and Return to Ringworld, if the scene has an interface area, // exclude it from the copy srcBounds.bottom = MIN<int16>(srcBounds.bottom, BF_GLOBALS._interfaceY); destBounds.bottom = MIN<int16>(destBounds.bottom, BF_GLOBALS._interfaceY); diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp index c254565aca..a273ec2a0b 100644 --- a/engines/tsage/staticres.cpp +++ b/engines/tsage/staticres.cpp @@ -400,8 +400,8 @@ const byte k5A4D6[] = { const byte k5A72E[] = {0, 98, 135, 183, 229, 81, 133, 185, 235, 75, 131, 187, 241, 70, 129, 190, 247}; const byte k5A73F[] = {0, 42, 42, 42, 42, 67, 67, 67, 67, 92, 92, 92, 92, 116, 116, 116, 116}; const byte k5A750[] = { - 9, 10, 7, 13, 7, 8, 9, 7, 9, 10, - 2, 3, 3, 2, 2, 2, 4, 3, 3, 4, + 9, 10, 7, 13, 7, 8, 9, 7, 9, 10, + 2, 3, 3, 2, 2, 2, 4, 3, 3, 4, 3, 2, 3, 4, 3, 8, 10, 4, 0 }; const byte k5A76D[] = { diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp index ca9fddc6ce..10cb6961dc 100644 --- a/engines/tsage/user_interface.cpp +++ b/engines/tsage/user_interface.cpp @@ -316,7 +316,7 @@ void UIElements::synchronize(Serializer &s) { } void UIElements::process(Event &event) { - if (_clearScreen && GLOBALS._player._enabled && + if (_clearScreen && GLOBALS._player._enabled && ((g_vm->getGameID() != GType_BlueForce) || (GLOBALS._sceneManager._sceneNumber != 50))) { if (_bounds.contains(event.mousePos)) { // Cursor inside UI area |