diff options
Diffstat (limited to 'engines/tsage/blue_force')
-rw-r--r-- | engines/tsage/blue_force/blueforce_dialogs.cpp | 57 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 117 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.h | 14 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes0.cpp | 17 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes0.h | 4 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes1.cpp | 54 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes1.h | 4 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes2.cpp | 72 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes3.cpp | 54 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes4.cpp | 40 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes5.cpp | 100 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes5.h | 2 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes6.cpp | 22 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes7.cpp | 8 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes8.cpp | 76 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes9.cpp | 51 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes9.h | 8 |
17 files changed, 335 insertions, 365 deletions
diff --git a/engines/tsage/blue_force/blueforce_dialogs.cpp b/engines/tsage/blue_force/blueforce_dialogs.cpp index b9b3ad6c22..a76d5839a9 100644 --- a/engines/tsage/blue_force/blueforce_dialogs.cpp +++ b/engines/tsage/blue_force/blueforce_dialogs.cpp @@ -163,9 +163,12 @@ void RightClickDialog::execute() { } g_system->delayMillis(10); - g_system->updateScreen(); + GLOBALS._screenSurface.updateScreen(); } + // Deactivate the graphics manager used for the dialog + _gfxManager.deactivate(); + // Execute the specified action CursorType cursorNum = CURSOR_NONE; switch (_selectedAction) { @@ -193,8 +196,6 @@ void RightClickDialog::execute() { if (cursorNum != CURSOR_NONE) BF_GLOBALS._events.setCursor(cursorNum); - - _gfxManager.deactivate(); } /*--------------------------------------------------------------------------*/ @@ -243,7 +244,7 @@ void AmmoBeltDialog::execute() { } g_system->delayMillis(10); - g_system->updateScreen(); + GLOBALS._screenSurface.updateScreen(); } _gfxManager.deactivate(); @@ -343,7 +344,7 @@ void AmmoBeltDialog::draw() { // Draw the first clip if necessary if (clip1) { - GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip1Bullets); + GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip1Bullets + 1); _clip1Rect.resize(clipSurface, _clip1Rect.left, _clip1Rect.top, 100); g_globals->gfxManager().copyFrom(clipSurface, bounds.left + _clip1Rect.left, bounds.top + _clip1Rect.top); @@ -351,7 +352,7 @@ void AmmoBeltDialog::draw() { // Draw the second clip if necessary if (clip2) { - GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip2Bullets); + GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip2Bullets + 1); _clip2Rect.resize(clipSurface, _clip2Rect.left, _clip2Rect.top, 100); g_globals->gfxManager().copyFrom(clipSurface, bounds.left + _clip2Rect.left, bounds.top + _clip2Rect.top); @@ -435,29 +436,45 @@ void OptionsDialog::show() { OptionsDialog *dlg = new OptionsDialog(); dlg->draw(); + // Show the dialog GfxButton *btn = dlg->execute(); - if (btn == &dlg->_btnQuit) { + // Get which button was pressed + int btnIndex = -1; + if (btn == &dlg->_btnRestore) + btnIndex = 0; + else if (btn == &dlg->_btnSave) + btnIndex = 1; + else if (btn == &dlg->_btnRestart) + btnIndex = 2; + else if (btn == &dlg->_btnQuit) + btnIndex = 3; + else if (btn == &dlg->_btnSound) + btnIndex = 4; + + // Close the dialog + dlg->remove(); + delete dlg; + + // Execute the given selection + if (btnIndex == 0) { + // Restore button + g_globals->_game->restoreGame(); + } else if (btnIndex == 1) { + // Save button + g_globals->_game->saveGame(); + } else if (btnIndex == 2) { + // Restart game + g_globals->_game->restartGame(); + } else if (btnIndex == 3) { // Quit game if (MessageDialog::show(QUIT_CONFIRM_MSG, CANCEL_BTN_STRING, QUIT_BTN_STRING) == 1) { g_vm->quitGame(); } - } else if (btn == &dlg->_btnRestart) { - // Restart game - g_globals->_game->restartGame(); - } else if (btn == &dlg->_btnSound) { + } else if (btnIndex == 4) { // Sound dialog SoundDialog::execute(); - } else if (btn == &dlg->_btnSave) { - // Save button - g_globals->_game->saveGame(); - } else if (btn == &dlg->_btnRestore) { - // Restore button - g_globals->_game->restoreGame(); } - - dlg->remove(); - delete dlg; } OptionsDialog::OptionsDialog() { diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index 22299c1bf1..3aef18f4f0 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -20,6 +20,7 @@ * */ +#include "common/config-manager.h" #include "tsage/blue_force/blueforce_logic.h" #include "tsage/blue_force/blueforce_dialogs.h" #include "tsage/blue_force/blueforce_scenes0.h" @@ -42,8 +43,25 @@ namespace TsAGE { namespace BlueForce { void BlueForceGame::start() { - // Start the game - g_globals->_sceneManager.changeScene(20); + int slot = -1; + + // Check for a savegame to load straight from the launcher + if (ConfMan.hasKey("save_slot")) { + slot = ConfMan.getInt("save_slot"); + Common::String file = g_vm->generateSaveName(slot); + Common::InSaveFile *in = g_vm->_system->getSavefileManager()->openForLoading(file); + if (in) + delete in; + else + slot = -1; + } + + if (slot >= 0) + // Set the savegame slot to load in the main loop + g_globals->_sceneHandler->_loadGameSlot = slot; + else + // Switch to the title screen + g_globals->_sceneManager.setNewScene(20); } Scene *BlueForceGame::createScene(int sceneNumber) { @@ -255,14 +273,16 @@ Scene *BlueForceGame::createScene(int sceneNumber) { * Returns true if it is currently okay to restore a game */ bool BlueForceGame::canLoadGameStateCurrently() { - return true; + // Don't allow a game to be loaded if a dialog is active + return g_globals->_gfxManagers.size() == 1; } /** * Returns true if it is currently okay to save the game */ bool BlueForceGame::canSaveGameStateCurrently() { - return true; + // Don't allow a game to be saved if a dialog is active + return g_globals->_gfxManagers.size() == 1; } void BlueForceGame::rightClick() { @@ -533,35 +553,6 @@ bool NamedObject::startAction(CursorType action, Event &event) { return handled; } -void NamedObject::setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) { - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; - - switch (mode) { - case 2: - g_globals->_sceneItems.push_front(this); - break; - case 4: - g_globals->_sceneItems.addBefore(item, this); - break; - case 5: - g_globals->_sceneItems.addAfter(item, this); - break; - default: - g_globals->_sceneItems.push_back(this); - break; - } -} - -void NamedObject::setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum) { - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; -} - /*--------------------------------------------------------------------------*/ CountdownObject::CountdownObject(): NamedObject() { @@ -742,7 +733,7 @@ void SceneExt::remove() { _action->_endHandler = NULL; _action->remove(); } - + _focusObject = NULL; } @@ -1335,7 +1326,7 @@ bool BlueForceInvObjectList::SelectItem(int objectNumber) { AmmoBeltDialog *dlg = new AmmoBeltDialog(); dlg->execute(); delete dlg; - + return true; } @@ -1377,58 +1368,6 @@ bool NamedHotspot::startAction(CursorType action, Event &event) { } } -void NamedHotspot::setDetails(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum) { - setBounds(ys, xe, ye, xs); - _resNum = resnum; - _lookLineNum = lookLineNum; - _useLineNum = useLineNum; - _talkLineNum = -1; - g_globals->_sceneItems.addItems(this, NULL); -} - -void NamedHotspot::setDetails(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) { - setBounds(bounds); - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; - - switch (mode) { - case 2: - g_globals->_sceneItems.push_front(this); - break; - case 4: - g_globals->_sceneItems.addBefore(item, this); - break; - case 5: - g_globals->_sceneItems.addAfter(item, this); - break; - default: - g_globals->_sceneItems.push_back(this); - break; - } -} - -void NamedHotspot::setDetails(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode) { - _sceneRegionId = sceneRegionId; - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; - - // Handle adding hotspot to scene items list as necessary - switch (mode) { - case 2: - GLOBALS._sceneItems.push_front(this); - break; - case 3: - break; - default: - GLOBALS._sceneItems.push_back(this); - break; - } -} - void NamedHotspot::synchronize(Serializer &s) { SceneHotspot::synchronize(s); s.syncAsSint16LE(_resNum); @@ -1469,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(); } @@ -1500,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_logic.h b/engines/tsage/blue_force/blueforce_logic.h index d0d0e0ee40..59bc2b7a51 100644 --- a/engines/tsage/blue_force/blueforce_logic.h +++ b/engines/tsage/blue_force/blueforce_logic.h @@ -65,6 +65,9 @@ public: void add(EventHandler *obj); void remove(EventHandler *obj); + // The following line prevents compiler warnings about hiding the remove() + // method from the parent class. + virtual void remove() { EventHandler::remove(); } }; class Timer: public EventHandler { @@ -116,16 +119,10 @@ public: class NamedObject: public SceneObject { public: - int _resNum; - int _lookLineNum, _talkLineNum, _useLineNum; - virtual Common::String getClassName() { return "NamedObject"; } virtual void synchronize(Serializer &s); virtual void postInit(SceneObjectList *OwnerList = NULL); virtual bool startAction(CursorType action, Event &event); - - void setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item); - void setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum); }; class NamedObjectExt: public NamedObject { @@ -335,16 +332,11 @@ public: class NamedHotspot : public SceneHotspot { public: - int _resNum, _lookLineNum, _useLineNum, _talkLineNum; NamedHotspot(); - virtual bool startAction(CursorType action, Event &event); virtual Common::String getClassName() { return "NamedHotspot"; } virtual void synchronize(Serializer &s); - virtual void setDetails(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum); - virtual void setDetails(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item); - virtual void setDetails(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode); }; class NamedHotspotExt : public NamedHotspot { diff --git a/engines/tsage/blue_force/blueforce_scenes0.cpp b/engines/tsage/blue_force/blueforce_scenes0.cpp index 682e273716..95598babc6 100644 --- a/engines/tsage/blue_force/blueforce_scenes0.cpp +++ b/engines/tsage/blue_force/blueforce_scenes0.cpp @@ -209,6 +209,11 @@ void Scene50::Tooltip::synchronize(Serializer &s) { SavedObject::synchronize(s); _bounds.synchronize(s); s.syncString(_msg); + + if (s.getVersion() >= 10) { + s.syncAsSint16LE(_newSceneNumber); + s.syncAsSint16LE(_locationId); + } } void Scene50::Tooltip2::signal() { @@ -323,6 +328,18 @@ void Scene50::Tooltip::highlight(bool btnDown) { /*--------------------------------------------------------------------------*/ +Scene50::Scene50() { + _sceneNumber = 0; +} + + +void Scene50::synchronize(Serializer &s) { + if (s.getVersion() >= 10) { + SceneExt::synchronize(s); + s.syncAsSint16LE(_sceneNumber); + } +} + void Scene50::postInit(SceneObjectList *OwnerList) { SceneExt::postInit(); diff --git a/engines/tsage/blue_force/blueforce_scenes0.h b/engines/tsage/blue_force/blueforce_scenes0.h index 9b0bf556f4..dd502c5f30 100644 --- a/engines/tsage/blue_force/blueforce_scenes0.h +++ b/engines/tsage/blue_force/blueforce_scenes0.h @@ -88,7 +88,11 @@ public: Tooltip _location6, _location7, _location8, _location9; Timer _timer; public: + Scene50(); + virtual Common::String getClassName() { return "Scene50"; } + virtual void synchronize(Serializer &s); + virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void remove(); virtual void signal(); diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp index f17f2d7c83..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); } /*-------------------------------------------------------------------------- @@ -921,7 +921,7 @@ void Scene114::postInit(SceneObjectList *OwnerList) { _lyle._moveDiff.x = 2; _lyle._moveDiff.y = 1; _lyle.hide(); - _lyle.setDetails(114, 2, -1, -1, 1, NULL); + _lyle.setDetails(114, 2, -1, -1, 1, (SceneItem *)NULL); _vechile.postInit(); if (BF_GLOBALS.getFlag(fWithLyle)) { @@ -962,7 +962,7 @@ void Scene114::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player.enableControl(); } - _item1.setDetails(Rect(0, 0, 320, 200), 114, 3, -1, -1, 1, NULL); + _item1.setDetails(Rect(0, 0, 320, 200), 114, 3, -1, -1, 1, (SceneItem *)NULL); } void Scene114::signal() { @@ -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 @@ -2830,7 +2830,7 @@ void Scene180::postInit(SceneObjectList *OwnerList) { _vechile.setStrip(2); _vechile.setPosition(Common::Point(262, 131)); _vechile.setZoom(65); - _vechile.setDetails(180, 33, 34, 35, 1, NULL); + _vechile.setDetails(180, 33, 34, 35, 1, (SceneItem *)NULL); _object1.postInit(); _object1.setVisage(182); @@ -2845,7 +2845,7 @@ void Scene180::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player.disableControl(); _vechile.postInit(); - _vechile.setDetails(180, 33, 34, 35, 1, NULL); + _vechile.setDetails(180, 33, 34, 35, 1, (SceneItem *)NULL); _object1.postInit(); @@ -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 { @@ -2997,7 +2997,7 @@ void Scene180::signal() { BF_GLOBALS._player.disableControl(); _vechile.postInit(); - _vechile.setDetails(180, 33, 34, 35, 1, NULL); + _vechile.setDetails(180, 33, 34, 35, 1, (SceneItem *)NULL); _object1.postInit(); _sceneMode = 1801; @@ -3249,7 +3249,7 @@ void Scene190::postInit(SceneObjectList *OwnerList) { _flag.fixPriority(200); _flag.setPosition(Common::Point(170, 31)); _flag.animate(ANIM_MODE_7, 0, NULL); - _flag.setDetails(190, 8, 26, 19, 1, NULL); + _flag.setDetails(190, 8, 26, 19, 1, (SceneItem *)NULL); _fieldB52 = true; @@ -3263,7 +3263,7 @@ void Scene190::postInit(SceneObjectList *OwnerList) { _lyleCar.setVisage(444); _lyleCar.setFrame(2); _lyleCar.setPosition(Common::Point(54, 114)); - _lyleCar.setDetails(190, -1, -1, -1, 1, NULL); + _lyleCar.setDetails(190, -1, -1, -1, 1, (SceneItem *)NULL); switch (BF_GLOBALS._sceneManager._previousScene) { case 300: { 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 5a181af927..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)); @@ -983,17 +983,17 @@ void Scene270::postInit(SceneObjectList *OwnerList) { _fireplace.animate(ANIM_MODE_2, NULL); _fridge.setDetails(Rect(0, 56, 56, 130), 270, 9, 10, 11, 1, NULL); - _object3.setDetails(270, 12, 13, 14, 1, NULL); - _laura.setDetails(270, 15, -1, -1, 1, NULL); - _skip.setDetails(270, 14, -1, -1, 1, NULL); - _lyle.setDetails(270, 34, 35, 36, 1, NULL); - _tv.setDetails(270, 3, 4, 5, 1, NULL); - _fireplace.setDetails(270, 6, 7, 8, 1, NULL); + _object3.setDetails(270, 12, 13, 14, 1, (SceneItem *)NULL); + _laura.setDetails(270, 15, -1, -1, 1, (SceneItem *)NULL); + _skip.setDetails(270, 14, -1, -1, 1, (SceneItem *)NULL); + _lyle.setDetails(270, 34, 35, 36, 1, (SceneItem *)NULL); + _tv.setDetails(270, 3, 4, 5, 1, (SceneItem *)NULL); + _fireplace.setDetails(270, 6, 7, 8, 1, (SceneItem *)NULL); if ((BF_GLOBALS._sceneManager._previousScene == 710) && (BF_GLOBALS._bookmark == bTalkedToGrannyAboutSkipsCard)) { - _grandma.setDetails(270, 15, 16, 17, 1, NULL); + _grandma.setDetails(270, 15, 16, 17, 1, (SceneItem *)NULL); } else { - _grandma.setDetails(270, 40, 16, 17, 1, NULL); + _grandma.setDetails(270, 40, 16, 17, 1, (SceneItem *)NULL); } _afgan.setDetails(4, 270, 27, 28, 29, 1); @@ -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(); @@ -1420,20 +1420,20 @@ void Scene271::postInit(SceneObjectList *OwnerList) { _object5.hide(); _item5.setDetails(Rect(0, 56, 56, 130), 270, 9, 10, 11, 1, NULL); - _object6.setDetails(270, 12, 13, 14, 1, NULL); - _object7.setDetails(270, 15, -1, -1, 1, NULL); - _object8.setDetails(270, 14, -1, -1, 1, NULL); - _object11.setDetails(270, -1, -1, -1, 1, NULL); - _tv.setDetails(270, 3, 4, 5, 1, NULL); - _object10.setDetails(270, 6, 7, 8, 1, NULL); - _object12.setDetails(270, 15, 16, 17, 1, NULL); + _object6.setDetails(270, 12, 13, 14, 1, (SceneItem *)NULL); + _object7.setDetails(270, 15, -1, -1, 1, (SceneItem *)NULL); + _object8.setDetails(270, 14, -1, -1, 1, (SceneItem *)NULL); + _object11.setDetails(270, -1, -1, -1, 1, (SceneItem *)NULL); + _tv.setDetails(270, 3, 4, 5, 1, (SceneItem *)NULL); + _object10.setDetails(270, 6, 7, 8, 1, (SceneItem *)NULL); + _object12.setDetails(270, 15, 16, 17, 1, (SceneItem *)NULL); _item3.setDetails(4, 270, 27, 28, 29, 1); _item1.setDetails(1, 270, 18, 19, 20, 1); _item6.setDetails(Rect(278, 50, 318, 72), 270, 21, 22, 23, 1, NULL); _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 a63f45d8df..22c831f531 100644 --- a/engines/tsage/blue_force/blueforce_scenes3.cpp +++ b/engines/tsage/blue_force/blueforce_scenes3.cpp @@ -269,20 +269,20 @@ void Scene300::postInit(SceneObjectList *OwnerList) { _object17.setVisage(301); _object17.setStrip(1); _object17.setPosition(Common::Point(87, 88)); - _object17.setDetails(300, 11, 13, 2, 1, NULL); + _object17.setDetails(300, 11, 13, 2, 1, (SceneItem *)NULL); _object18.postInit(); _object18.setVisage(301); _object18.setStrip(1); _object18.setPosition(Common::Point(137, 92)); - _object18.setDetails(300, 11, 13, 3, 1, NULL); + _object18.setDetails(300, 11, 13, 3, 1, (SceneItem *)NULL); } _object19.postInit(); _object19.setVisage(301); _object19.setStrip(1); _object19.setPosition(Common::Point(175, 99)); - _object19.setDetails(300, 11, 13, 34, 1, NULL); + _object19.setDetails(300, 11, 13, 34, 1, (SceneItem *)NULL); _object11.postInit(); _object11.setVisage(301); @@ -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; } @@ -1015,7 +1015,7 @@ void Scene315::postInit(SceneObjectList *OwnerList) { _atfMemo.setStrip(4); _atfMemo.setFrame(4); _atfMemo.fixPriority(82); - _atfMemo.setDetails(315, -1, -1, -1, 1, NULL); + _atfMemo.setDetails(315, -1, -1, -1, 1, (SceneItem *)NULL); } if (BF_GLOBALS._dayNumber == 1) { @@ -1026,7 +1026,7 @@ void Scene315::postInit(SceneObjectList *OwnerList) { _bulletinMemo.setStrip(4); _bulletinMemo.setFrame(2); _bulletinMemo.fixPriority(82); - _bulletinMemo.setDetails(315, -1, -1, -1, 1, NULL); + _bulletinMemo.setDetails(315, -1, -1, -1, 1, (SceneItem *)NULL); } } else if ((BF_INVENTORY._daNote._sceneNumber != 1) && (BF_GLOBALS._dayNumber < 3)) { _object2.postInit(); @@ -1035,7 +1035,7 @@ void Scene315::postInit(SceneObjectList *OwnerList) { _object2.setFrame(2); _object2.setPosition(Common::Point(304, 31)); _object2.fixPriority(70); - _object2.setDetails(315, 3, 4, -1, 1, NULL); + _object2.setDetails(315, 3, 4, -1, 1, (SceneItem *)NULL); } _sutterSlot.setDetails(12, 315, 35, -1, 36, 1); @@ -2686,7 +2686,7 @@ void Scene350::postInit(SceneObjectList *OwnerList) { _harrison.setObjectWrapper(new SceneObjectWrapper()); _harrison.animate(ANIM_MODE_1, NULL); _harrison.changeZoom(-1); - _harrison.setDetails(350, 12, 13, 14, 1, NULL); + _harrison.setDetails(350, 12, 13, 14, 1, (SceneItem *)NULL); _harrison._moveDiff = Common::Point(2, 1); _stripManager.addSpeaker(&_harrisonSpeaker); @@ -3586,7 +3586,7 @@ void Scene355::postInit(SceneObjectList *OwnerList) { _lyle.setStrip(1); _lyle.setAction(&_action1); _lyle._flag = BF_GLOBALS.getFlag(fTookTrailerAmmo) ? 1 : 0; - _lyle.setDetails(355, 40, 42, 41, 1, NULL); + _lyle.setDetails(355, 40, 42, 41, 1, (SceneItem *)NULL); } if ((BF_INVENTORY.getObjectScene(INV_RAGS) == 0) && (BF_INVENTORY.getObjectScene(INV_JAR) == 0) && @@ -3671,7 +3671,7 @@ void Scene355::postInit(SceneObjectList *OwnerList) { } _item3._sceneRegionId = 18; - _harrison.setDetails(355, 18, 20, 19, 1, NULL); + _harrison.setDetails(355, 18, 20, 19, 1, (SceneItem *)NULL); _item6.setDetails(10, 355, 2, -1, 14, 1); _item7.setDetails(11, 355, 3, -1, 15, 1); _item8.setDetails(12, 355, 4, -1, 8, 1); @@ -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; @@ -4944,7 +4944,7 @@ void Scene370::signal() { case 3: break; case 3707: - _object5.setDetails(370, 6, -1, 7, 1, NULL); + _object5.setDetails(370, 6, -1, 7, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.push_back(&_object5); // Deliberate fall-through case 3700: @@ -5138,7 +5138,7 @@ void Scene380::postInit(SceneObjectList *OwnerList) { _door.setVisage(380); _door.setStrip(4); _door.setPosition(Common::Point(132, 66)); - _door.setDetails(380, 12, 13, -1, 1, NULL); + _door.setDetails(380, 12, 13, -1, 1, (SceneItem *)NULL); BF_GLOBALS._player.postInit(); BF_GLOBALS._player.setObjectWrapper(new SceneObjectWrapper()); @@ -5153,7 +5153,7 @@ void Scene380::postInit(SceneObjectList *OwnerList) { // Show vechile as car _vechile.setStrip(3); _vechile.setPosition(Common::Point(273, 125)); - _vechile.setDetails(580, 2, 3, -1, 1, NULL); + _vechile.setDetails(580, 2, 3, -1, 1, (SceneItem *)NULL); BF_GLOBALS._player.setVisage(129); BF_GLOBALS._walkRegions.disableRegion(12); @@ -5166,14 +5166,14 @@ void Scene380::postInit(SceneObjectList *OwnerList) { } else if (BF_GLOBALS.getFlag(onDuty)) { // Show on duty motorcycle _vechile.setStrip(2); - _vechile.setDetails(300, 11, 13, -1, 1, NULL); + _vechile.setDetails(300, 11, 13, -1, 1, (SceneItem *)NULL); _vechile.setPosition(Common::Point(252, 115)); BF_GLOBALS._player.setVisage(1341); } else { // Show off duty motorcycle _vechile.setStrip(1); - _vechile.setDetails(580, 0, 1, -1, 1, NULL); + _vechile.setDetails(580, 0, 1, -1, 1, (SceneItem *)NULL); _vechile.setPosition(Common::Point(249, 110)); BF_GLOBALS._player.setVisage(129); @@ -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); } @@ -5479,19 +5479,19 @@ void Scene385::postInit(SceneObjectList *OwnerList) { _jim.setVisage(385); _jim.setStrip(3); _jim.setPosition(Common::Point(304, 113)); - _jim.setDetails(385, 1, -1, 2, 1, NULL); + _jim.setDetails(385, 1, -1, 2, 1, (SceneItem *)NULL); _dezi.postInit(); _dezi.setVisage(385); _dezi.setStrip(2); _dezi.setPosition(Common::Point(235, 93)); _dezi.fixPriority(120); - _dezi.setDetails(385, 3, -1, 2, 1, NULL); + _dezi.setDetails(385, 3, -1, 2, 1, (SceneItem *)NULL); _door.postInit(); _door.setVisage(385); _door.setPosition(Common::Point(107, 27)); - _door.setDetails(385, 0, -1, -1, 1, NULL); + _door.setDetails(385, 0, -1, -1, 1, (SceneItem *)NULL); BF_GLOBALS._walkRegions.disableRegion(6); @@ -5875,13 +5875,13 @@ void Scene390::postInit(TsAGE::SceneObjectList *OwnerList) { _object2.setPosition(Common::Point(38, 84)); _object2.fixPriority(50); _object2._flag = 0; - _object2.setDetails(390, 10, 17, 10, 1, NULL); + _object2.setDetails(390, 10, 17, 10, 1, (SceneItem *)NULL); _door.postInit(); _door.setVisage(390); _door.setStrip(2); _door.setPosition(Common::Point(151, 18)); - _door.setDetails(390, 5, -1, -1, 1, NULL); + _door.setDetails(390, 5, -1, -1, 1, (SceneItem *)NULL); BF_GLOBALS._player.disableControl(); _sceneMode = 3901; @@ -5892,7 +5892,7 @@ void Scene390::postInit(TsAGE::SceneObjectList *OwnerList) { _green.setVisage(392); _green.setPosition(Common::Point(241, 164)); _green.fixPriority(153); - _green.setDetails(390, 12, -1, 13, 1, NULL); + _green.setDetails(390, 12, -1, 13, 1, (SceneItem *)NULL); _green._flag = 0; } @@ -5902,7 +5902,7 @@ void Scene390::postInit(TsAGE::SceneObjectList *OwnerList) { _gangMember1.setPosition(Common::Point(273, 169)); _gangMember1.fixPriority(152); _gangMember1._flag = 0; - _gangMember1.setDetails(390, 19, -1, 20, 1, NULL); + _gangMember1.setDetails(390, 19, -1, 20, 1, (SceneItem *)NULL); _gangMember2.postInit(); _gangMember2.setVisage(396); @@ -5910,7 +5910,7 @@ void Scene390::postInit(TsAGE::SceneObjectList *OwnerList) { _gangMember2.setPosition(Common::Point(241, 153)); _gangMember2.fixPriority(152); _gangMember2._flag = 0; - _gangMember2.setDetails(390, 19, -1, 20, 1, NULL); + _gangMember2.setDetails(390, 19, -1, 20, 1, (SceneItem *)NULL); } _item1.setDetails(Rect(22, 40, 77, 67), 390, 0, -1, 1, 1, NULL); @@ -5944,7 +5944,7 @@ void Scene390::signal() { _object3.setVisage(390); _object3.setPosition(Common::Point(250, 60)); _object3.fixPriority(255); - _object3.setDetails(390, 8, -1, 9, 2, NULL); + _object3.setDetails(390, 8, -1, 9, 2, (SceneItem *)NULL); BF_GLOBALS._player.enableControl(); break; diff --git a/engines/tsage/blue_force/blueforce_scenes4.cpp b/engines/tsage/blue_force/blueforce_scenes4.cpp index deff4f2518..a10f311791 100644 --- a/engines/tsage/blue_force/blueforce_scenes4.cpp +++ b/engines/tsage/blue_force/blueforce_scenes4.cpp @@ -547,13 +547,13 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _passenger.setVisage(415); _passenger.setStrip(1); _passenger.setPosition(Common::Point(278, 92)); - _passenger.setDetails(410, 4, -1, 5, 1, NULL); + _passenger.setDetails(410, 4, -1, 5, 1, (SceneItem *)NULL); _driver.postInit(); _driver.setVisage(416); _driver.setStrip(2); _driver.setPosition(Common::Point(244, 85)); - _driver.setDetails(410, 6, -1, 7, 1, NULL); + _driver.setDetails(410, 6, -1, 7, 1, (SceneItem *)NULL); _driver.changeZoom(-1); _object5.postInit(); @@ -583,13 +583,13 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _harrison.setVisage(343); _harrison.setObjectWrapper(new SceneObjectWrapper()); _harrison.animate(ANIM_MODE_1, NULL); - _harrison.setDetails(350, 12, 13, 14, 1, NULL); + _harrison.setDetails(350, 12, 13, 14, 1, (SceneItem *)NULL); _harrison.setPosition(Common::Point(97, 185)); _harrison.changeZoom(-1); _patrolCar.postInit(); _patrolCar.setVisage(410); - _patrolCar.setDetails(410, 8, 9, 10, 1, NULL); + _patrolCar.setDetails(410, 8, 9, 10, 1, (SceneItem *)NULL); _patrolCar.fixPriority(148); _patrolCar.setPosition(Common::Point(39, 168)); @@ -640,7 +640,7 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _harrison.setVisage(343); _harrison.setObjectWrapper(new SceneObjectWrapper()); _harrison.animate(ANIM_MODE_1, NULL); - _harrison.setDetails(350, 12, 13, 14, 1, NULL); + _harrison.setDetails(350, 12, 13, 14, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.addBefore(&_driver, &_harrison); _harrison.setPosition(Common::Point(-10, 124)); @@ -648,7 +648,7 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _patrolCar.postInit(); _patrolCar.setVisage(410); - _patrolCar.setDetails(410, 8, 9, 10, 1, NULL); + _patrolCar.setDetails(410, 8, 9, 10, 1, (SceneItem *)NULL); _patrolCar.fixPriority(148); if (_field1FC4) { @@ -1076,14 +1076,14 @@ void Scene415::postInit(SceneObjectList *OwnerList) { _dashDrawer.setVisage(411); _dashDrawer.setStrip(3); _dashDrawer.setPosition(Common::Point(151, 97)); - _dashDrawer.setDetails(415, 22, -1, -1, 1, NULL); + _dashDrawer.setDetails(415, 22, -1, -1, 1, (SceneItem *)NULL); _animatedSeat.postInit(); _animatedSeat.setVisage(419); _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); @@ -1140,7 +1140,7 @@ void Scene415::showBullets() { _theBullets.setFrame(2); _theBullets.setPosition(Common::Point(184, 86)); _theBullets.fixPriority(105); - _theBullets.setDetails(415, 16, 17, 18, 1, NULL); + _theBullets.setDetails(415, 16, 17, 18, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.remove(&_theBullets); BF_GLOBALS._sceneItems.push_front(&_theBullets); } @@ -1158,7 +1158,7 @@ void Scene415::showGunAndWig() { _gunAndWig.setFrame(2); _gunAndWig.setPosition(Common::Point(159, 88)); _gunAndWig.fixPriority(105); - _gunAndWig.setDetails(415, 13, 14, 15, 1, NULL); + _gunAndWig.setDetails(415, 13, 14, 15, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.remove(&_gunAndWig); BF_GLOBALS._sceneItems.push_front(&_gunAndWig); @@ -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); @@ -1559,13 +1559,13 @@ void Scene450::postInit(SceneObjectList *OwnerList) { _door.setVisage(450); _door.setStrip(2); _door.setPosition(Common::Point(72, 80)); - _door.setDetails(450, 15, -1, 13, 1, NULL); + _door.setDetails(450, 15, -1, 13, 1, (SceneItem *)NULL); _counterDoor.postInit(); _counterDoor.setVisage(450); _counterDoor.setPosition(Common::Point(39, 104)); _counterDoor.fixPriority(100); - _counterDoor.setDetails(450, 12, -1, 13, 1, NULL); + _counterDoor.setDetails(450, 12, -1, 13, 1, (SceneItem *)NULL); if (BF_GLOBALS._dayNumber != 3) { _pinBoy.postInit(); @@ -1598,7 +1598,7 @@ void Scene450::postInit(SceneObjectList *OwnerList) { _object2.setPosition(Common::Point(-30, 126)); ADD_MOVER_NULL(_object2, 27, 126); _object2.changeZoom(-1); - _object2.setDetails(450, 2, 18, 3, 1, NULL); + _object2.setDetails(450, 2, 18, 3, 1, (SceneItem *)NULL); BF_GLOBALS._walkRegions.disableRegion(4); diff --git a/engines/tsage/blue_force/blueforce_scenes5.cpp b/engines/tsage/blue_force/blueforce_scenes5.cpp index 7a250e2233..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); @@ -201,7 +201,7 @@ void Scene550::postInit(SceneObjectList *OwnerList) { _lyle.postInit(); _lyle.setVisage(835); _lyle.setPosition(Common::Point(139, 83)); - _lyle.setDetails(550, 29, 30, 31, 1, NULL); + _lyle.setDetails(550, 29, 30, 31, 1, (SceneItem *)NULL); _lyle.setStrip(8); BF_GLOBALS._player.setVisage(303); @@ -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(); @@ -702,16 +702,16 @@ void Scene551::postInit(SceneObjectList *OwnerList) { _object13.setStrip(2); _object13.setPosition(Common::Point(29, 92)); _object13.fixPriority(82); - _object13.setDetails(550, 8, -1, 9, 1, NULL); + _object13.setDetails(550, 8, -1, 9, 1, (SceneItem *)NULL); if (BF_GLOBALS.getFlag(didDrunk)) { _drunk._flag = 3; _drunk.setStrip(3); _object12.show(); - _object12.setDetails(550, 25, -1, 26, 1, NULL); + _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)); @@ -733,7 +733,7 @@ void Scene551::postInit(SceneObjectList *OwnerList) { _object11.setFrame(2); _object11.setPosition(Common::Point(116, 84)); _object11.fixPriority(77); - _object11.setDetails(550, 32, -1, 10, 1, NULL); + _object11.setDetails(550, 32, -1, 10, 1, (SceneItem *)NULL); _drunkStanding.postInit(); _drunkStanding._flag = 0; @@ -764,7 +764,7 @@ void Scene551::postInit(SceneObjectList *OwnerList) { _patrolCarTrunk.setFrame(1); _patrolCarTrunk.setPosition(Common::Point(149, 69)); _patrolCarTrunk.fixPriority(79); - _patrolCarTrunk.setDetails(550, 18, -1, 9, 1, NULL); + _patrolCarTrunk.setDetails(550, 18, -1, 9, 1, (SceneItem *)NULL); _object11.postInit(); _object11.setVisage(550); @@ -772,7 +772,7 @@ void Scene551::postInit(SceneObjectList *OwnerList) { _object11.setFrame(2); _object11.setPosition(Common::Point(116, 84)); _object11.fixPriority(77); - _object11.setDetails(550, 32, -1, 10, 1, NULL); + _object11.setDetails(550, 32, -1, 10, 1, (SceneItem *)NULL); _drunkStanding.postInit(); _drunkStanding._flag = 0; @@ -842,7 +842,7 @@ void Scene551::signal() { ADD_PLAYER_MOVER_NULL(_harrison, 88, 91); _object12.show(); - _object12.setDetails(550, 25, -1, 26, 1, NULL); + _object12.setDetails(550, 25, -1, 26, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.push_front(&_object12); BF_GLOBALS._player.enableControl(); @@ -1064,7 +1064,7 @@ void Scene560::SafeInset::postInit(SceneObjectList *OwnerList) { scene->_nickel.setFrame(3); scene->_nickel.fixPriority(252); scene->_nickel.setPosition(Common::Point(181, 140)); - scene->_nickel.setDetails(560, 47, 48, -1, 1, NULL); + scene->_nickel.setDetails(560, 47, 48, -1, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.remove(&scene->_nickel); BF_GLOBALS._sceneItems.push_front(&scene->_nickel); } @@ -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) { @@ -1201,7 +1201,7 @@ void Scene560::SafeInset::signal() { scene->_nickel.setFrame(3); scene->_nickel.fixPriority(252); scene->_nickel.setPosition(Common::Point(181, 140)); - scene->_nickel.setDetails(560, 47, 48, -1, 1, NULL); + scene->_nickel.setDetails(560, 47, 48, -1, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.remove(&scene->_nickel); BF_GLOBALS._sceneItems.push_front(&scene->_nickel); } @@ -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(); @@ -1405,7 +1405,7 @@ void Scene560::postInit(SceneObjectList *OwnerList) { _box.setStrip(4); _box.setFrame(1); _box.setPosition(Common::Point(295, 37)); - _box.setDetails(560, 41, 42, -1, 1, NULL); + _box.setDetails(560, 41, 42, -1, 1, (SceneItem *)NULL); } _deskChair.postInit(); @@ -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,13 +1448,13 @@ 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); } _computer.setDetails(Rect(16, 77, 58, 107), 560, 2, -1, -1, 1, NULL); - _deskChair.setDetails(560, 3, -1, -1, 1, NULL); + _deskChair.setDetails(560, 3, -1, -1, 1, (SceneItem *)NULL); _chair.setDetails(Rect(163, 64, 196, 102), 560, 13, 25, 36, 1, NULL); _lamp.setDetails(Rect(197, 43, 214, 56), 560, 7, 19, 30, 1, NULL); _item4.setDetails(Rect(121, 18, 156, 54), 560, 8, 20, 31, 1, NULL); @@ -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: @@ -2039,7 +2039,7 @@ void Scene570::postInit(SceneObjectList *OwnerList) { _powerSwitch.setStrip(4); _powerSwitch.setFrame(1); _powerSwitch.setPosition(Common::Point(163, 131)); - _powerSwitch.setDetails(570, 1, 15, -1, 1, NULL); + _powerSwitch.setDetails(570, 1, 15, -1, 1, (SceneItem *)NULL); _floppyDrive.setDetails(Rect(258, 111, 303, 120), 570, 0, 15, -1, 1, NULL); _item11.setDetails(0, 570, 15, 15, 15, 1); @@ -2070,7 +2070,7 @@ void Scene570::signal() { _printerIcon.setFrame(3); _printerIcon.setPosition(Common::Point(172, 71)); _printerIcon.fixPriority(2); - _printerIcon.setDetails(570, 14, 15, -1, 2, NULL); + _printerIcon.setDetails(570, 14, 15, -1, 2, (SceneItem *)NULL); _iconManager.setup(2); _folder1.setDetails(1, 1, 0, 2, SCENE570_C_DRIVE); @@ -2201,7 +2201,7 @@ void Scene580::postInit(SceneObjectList *OwnerList) { _door.setStrip(4); _door.setPosition(Common::Point(168, 41)); _door.hide(); - _door.setDetails(580, 5, -1, -1, 1, NULL); + _door.setDetails(580, 5, -1, -1, 1, (SceneItem *)NULL); _vechile.postInit(); _vechile.setVisage(580); @@ -2219,7 +2219,7 @@ void Scene580::postInit(SceneObjectList *OwnerList) { _vechile.changeZoom(90); _vechile.setStrip(3); _vechile.setPosition(Common::Point(165, 76)); - _vechile.setDetails(580, 2, 3, -1, 1, NULL); + _vechile.setDetails(580, 2, 3, -1, 1, (SceneItem *)NULL); BF_GLOBALS._player.setVisage(303); @@ -2233,13 +2233,13 @@ void Scene580::postInit(SceneObjectList *OwnerList) { if (BF_GLOBALS.getFlag(onDuty)) { _vechile.setStrip(1); _vechile.setFrame(2); - _vechile.setDetails(300, 11, 13, -1, 1, NULL); + _vechile.setDetails(300, 11, 13, -1, 1, (SceneItem *)NULL); BF_GLOBALS._player.setVisage(304); } else { _vechile.setStrip(2); _vechile.setFrame(3); - _vechile.setDetails(580, 0, 1, -1, 1, NULL); + _vechile.setDetails(580, 0, 1, -1, 1, (SceneItem *)NULL); BF_GLOBALS._player.setVisage(303); } @@ -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); @@ -2468,12 +2468,12 @@ void Scene590::postInit(SceneObjectList *OwnerList) { _skip.postInit(); _skip.setVisage(693); _skip.setPosition(Common::Point(271, 117)); - _skip.setDetails(590, 26, -1, 27, 1, NULL); + _skip.setDetails(590, 26, -1, 27, 1, (SceneItem *)NULL); _laura.postInit(); _laura.setVisage(692); _laura.setPosition(Common::Point(248, 115)); - _laura.setDetails(590, 24, -1, 25, 1, NULL); + _laura.setDetails(590, 24, -1, 25, 1, (SceneItem *)NULL); } } @@ -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 5fb1b562e0..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(); @@ -410,7 +410,7 @@ bool Scene690::Object2::startAction(CursorType action, Event &event) { scene->_object6.postInit(); scene->_object6.hide(); scene->_object6.fixPriority(1); - scene->_object6.setDetails(690, 21, 17, 23, 1, NULL); + scene->_object6.setDetails(690, 21, 17, 23, 1, (SceneItem *)NULL); BF_GLOBALS._player.disableControl(); scene->_sceneMode = 6902; @@ -441,36 +441,36 @@ void Scene690::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._dayNumber = 1; _stripManager.addSpeaker(&_jakeSpeaker); - + _object1.postInit(); _object1.setVisage(690); _object1.setStrip2(2); _object1.fixPriority(188); _object1.setPosition(Common::Point(50, 166)); - _object1.setDetails(690, 4, 17, 26, 1, NULL); + _object1.setDetails(690, 4, 17, 26, 1, (SceneItem *)NULL); _object3.postInit(); _object3.setVisage(690); _object3.fixPriority(100); _object3.setPosition(Common::Point(238, 125)); - _object3.setDetails(690, 7, 17, 28, 1, NULL); + _object3.setDetails(690, 7, 17, 28, 1, (SceneItem *)NULL); _object2.postInit(); _object2.setVisage(694); _object2.setStrip2(3); _object2.fixPriority(125); _object2.setPosition(Common::Point(100, 134)); - _object2.setDetails(690, 12, -1, 11, 1, NULL); + _object2.setDetails(690, 12, -1, 11, 1, (SceneItem *)NULL); BF_GLOBALS._player.postInit(); BF_GLOBALS._player.disableControl(); BF_GLOBALS._player._moveDiff.x = 8; _object4.postInit(); - _object4.setDetails(690, 13, -1, -1, 1, NULL); + _object4.setDetails(690, 13, -1, -1, 1, (SceneItem *)NULL); _object5.postInit(); - _object5.setDetails(690, 14, -1, -1, 1, NULL); + _object5.setDetails(690, 14, -1, -1, 1, (SceneItem *)NULL); _sceneMode = 6903; setAction(&_sequenceManager, this, 6903, &BF_GLOBALS._player, &_object3, &_object4, &_object5, NULL); diff --git a/engines/tsage/blue_force/blueforce_scenes7.cpp b/engines/tsage/blue_force/blueforce_scenes7.cpp index 7b84e3ccdd..bb29ad1f34 100644 --- a/engines/tsage/blue_force/blueforce_scenes7.cpp +++ b/engines/tsage/blue_force/blueforce_scenes7.cpp @@ -172,10 +172,10 @@ void Scene710::postInit(SceneObjectList *OwnerList) { _stick.animate(ANIM_MODE_2, NULL); _stick.setPosition(Common::Point(650, 160)); _stick._moveDiff.x = 16; - _stick.setDetails(710, 4, -1, -1, 1, NULL); - _laura.setDetails(710, 2, -1, -1, 1, NULL); - _kid.setDetails(710, 6, -1, -1, 1, NULL); - _dog.setDetails(710, 0, -1, -1, 1, NULL); + _stick.setDetails(710, 4, -1, -1, 1, (SceneItem *)NULL); + _laura.setDetails(710, 2, -1, -1, 1, (SceneItem *)NULL); + _kid.setDetails(710, 6, -1, -1, 1, (SceneItem *)NULL); + _dog.setDetails(710, 0, -1, -1, 1, (SceneItem *)NULL); _item1.setDetails(Rect(555, 68, 583, 101), 710, 7, 23, -1, 1, NULL); _item2.setDetails(Rect(583, 46, 611, 78), 710, 7, 23, -1, 1, NULL); diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp index 32cd376891..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(); @@ -1672,12 +1672,12 @@ void Scene830::postInit(SceneObjectList *OwnerList) { _rentalBoat.setStrip(1); _rentalBoat.setPosition(Common::Point(271, 146)); _rentalBoat.fixPriority(90); - _rentalBoat.setDetails(830, 0, 1, 2, 1, NULL); + _rentalBoat.setDetails(830, 0, 1, 2, 1, (SceneItem *)NULL); } _door.postInit(); _door.setVisage(830); - _door.setDetails(830, 3, 4, -1, 1, NULL); + _door.setDetails(830, 3, 4, -1, 1, (SceneItem *)NULL); _door.setStrip((BF_GLOBALS._dayNumber == 2) ? 4 : 3); _door.setPosition(Common::Point(182, 97)); @@ -1702,7 +1702,7 @@ void Scene830::postInit(SceneObjectList *OwnerList) { _object5.setStrip(2); _object5.setFrame(2); _object5.setPosition(Common::Point(126, 133)); - _object5.setDetails(830, 7, 8, -1, 1, NULL); + _object5.setDetails(830, 7, 8, -1, 1, (SceneItem *)NULL); } break; case 5: @@ -1718,7 +1718,7 @@ void Scene830::postInit(SceneObjectList *OwnerList) { _lyle.setStrip(4); _lyle.setPosition(Common::Point(180, 154)); _lyle._moveDiff = Common::Point(2, 0); - _lyle.setDetails(830, 28, -1, 29, 1, NULL); + _lyle.setDetails(830, 28, -1, 29, 1, (SceneItem *)NULL); _field18AC = 1; } @@ -1950,7 +1950,7 @@ void Scene840::BoatKeysInset::postInit(SceneObjectList *OwnerList) { _rentalKeys.setFrame(3); _rentalKeys.setPosition(Common::Point(120, 132)); _rentalKeys.fixPriority(255); - _rentalKeys.setDetails(840, 52, 8, -1, 2, NULL); + _rentalKeys.setDetails(840, 52, 8, -1, 2, (SceneItem *)NULL); } if (BF_INVENTORY.getObjectScene(INV_WAVE_KEYS) != 1) { @@ -1960,7 +1960,7 @@ void Scene840::BoatKeysInset::postInit(SceneObjectList *OwnerList) { _waveKeys.setFrame(2); _waveKeys.setPosition(Common::Point(201, 91)); _waveKeys.fixPriority(255); - _waveKeys.setDetails(840, 53, 8, -1, 2, NULL); + _waveKeys.setDetails(840, 53, 8, -1, 2, (SceneItem *)NULL); } _v1B4 = _v1B6 = 0; @@ -2035,7 +2035,7 @@ bool Scene840::BoatKeysInset::startAction(CursorType action, Event &event) { _rentalKeys.setFrame(3); _rentalKeys.setPosition(Common::Point(120, 132)); _rentalKeys.fixPriority(255); - _rentalKeys.setDetails(840, 52, 8, -1, 2, NULL); + _rentalKeys.setDetails(840, 52, 8, -1, 2, (SceneItem *)NULL); } if (BF_INVENTORY.getObjectScene(INV_WAVE_KEYS) == 1) { @@ -2046,7 +2046,7 @@ bool Scene840::BoatKeysInset::startAction(CursorType action, Event &event) { _waveKeys.setFrame(2); _waveKeys.setPosition(Common::Point(201, 91)); _waveKeys.fixPriority(255); - _waveKeys.setDetails(840, 53, 8, -1, 2, NULL); + _waveKeys.setDetails(840, 53, 8, -1, 2, (SceneItem *)NULL); } BF_INVENTORY.setObjectScene(INV_WAVE_KEYS, 0); @@ -2259,7 +2259,7 @@ void Scene840::postInit(SceneObjectList *OwnerList) { _doors.setVisage(840); _doors.setStrip(3); _doors.setPosition(Common::Point(157, 81)); - _doors.setDetails(840, 0, 1, 2, 1, NULL); + _doors.setDetails(840, 0, 1, 2, 1, (SceneItem *)NULL); _carter.postInit(); _carter.setVisage(843); @@ -2279,7 +2279,7 @@ void Scene840::postInit(SceneObjectList *OwnerList) { _item10.setDetails(Rect(199, 56, 236, 80), 840, 24, 14, 12, 1, NULL); _item11.setDetails(Rect(256, 94, 319, 118), 840, 25, 15, 13, 1, NULL); _item18.setDetails(6, 840, 38, 39, 40, 1); - _carter.setDetails(840, 3, 4, 5, 1, NULL); + _carter.setDetails(840, 3, 4, 5, 1, (SceneItem *)NULL); _item8.setDetails(Rect(259, 4, 319, 87), 840, 22, 15, 13, 1, NULL); _item15.setDetails(2, 840, 32, 33, 34, 1); _coins.setDetails(3, 840, -1, 6, 7, 1); @@ -2295,7 +2295,7 @@ void Scene840::postInit(SceneObjectList *OwnerList) { _boatKeys.setFrame(1); _boatKeys.setPosition(Common::Point(250, 83)); _boatKeys.fixPriority(120); - _boatKeys.setDetails(840, -1, 8, 9, 2, NULL); + _boatKeys.setDetails(840, -1, 8, 9, 2, (SceneItem *)NULL); _field1AC0 = 1; } @@ -2387,7 +2387,7 @@ void Scene840::signal() { case 4: _sceneMode = 8403; _boatKeys.postInit(); - _boatKeys.setDetails(840, -1, 8, 9, 2, NULL); + _boatKeys.setDetails(840, -1, 8, 9, 2, (SceneItem *)NULL); setAction(&_sequenceManager1, this, 8403, &_carter, &_boatKeys, NULL); break; case 5: @@ -2679,7 +2679,7 @@ void Scene860::postInit(SceneObjectList *OwnerList) { _object2.setVisage(880); _object2.setPosition(Common::Point(196, 81)); BF_GLOBALS._sceneItems.push_back(&_object2); - _object2.setDetails(860, 0, 1, -1, 1, NULL); + _object2.setDetails(860, 0, 1, -1, 1, (SceneItem *)NULL); _object2.fixPriority(20); _neRect = Rect(0, 0, 0, 0); @@ -2876,7 +2876,7 @@ void Scene870::CrateInset::initContents() { _jar.setPosition(Common::Point(scene->_crateInset._position.x + 5, scene->_crateInset._position.y - 26)); _jar.fixPriority(251); - _jar.setDetails(870, 39, 40, 41, 1, NULL); + _jar.setDetails(870, 39, 40, 41, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.remove(&_jar); BF_GLOBALS._sceneItems.push_front(&_jar); } @@ -2890,7 +2890,7 @@ void Scene870::CrateInset::initContents() { _rags.setPosition(Common::Point(scene->_crateInset._position.x - 18, scene->_crateInset._position.y - 18)); _rags.fixPriority(251); - _rags.setDetails(870, 42, 43, 44, 1, NULL); + _rags.setDetails(870, 42, 43, 44, 1, (SceneItem *)NULL); BF_GLOBALS._sceneItems.remove(&_rags); BF_GLOBALS._sceneItems.push_front(&_rags); } @@ -3063,7 +3063,7 @@ void Scene870::postInit(SceneObjectList *OwnerList) { _lyle.setObjectWrapper(new SceneObjectWrapper()); _lyle.animate(ANIM_MODE_1, NULL); _lyle._moveDiff = Common::Point(2, 1); - _lyle.setDetails(870, 27, 28, 29, 1, NULL); + _lyle.setDetails(870, 27, 28, 29, 1, (SceneItem *)NULL); } _yacht.postInit(); @@ -3071,7 +3071,7 @@ void Scene870::postInit(SceneObjectList *OwnerList) { _yacht.setStrip(4); _yacht.setFrame(4); _yacht.setPosition(Common::Point(232, 19)); - _yacht.setDetails(870, 30, 31, 32, 1, NULL); + _yacht.setDetails(870, 30, 31, 32, 1, (SceneItem *)NULL); if ((BF_INVENTORY.getObjectScene(INV_RAGS) == 0) && (BF_INVENTORY.getObjectScene(INV_FLARE) == 0) && (BF_INVENTORY.getObjectScene(INV_HANDCUFFS) == 355)) { @@ -3081,9 +3081,9 @@ void Scene870::postInit(SceneObjectList *OwnerList) { _green.setPosition(Common::Point(127, 109)); if (BF_GLOBALS._bookmark == bFinishedWGreen) { - _green.setDetails(870, 51, 54, 53, 1, NULL); + _green.setDetails(870, 51, 54, 53, 1, (SceneItem *)NULL); } else { - _green.setDetails(870, 51, 52, 53, 1, NULL); + _green.setDetails(870, 51, 52, 53, 1, (SceneItem *)NULL); } } } @@ -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); @@ -3358,11 +3358,11 @@ void Scene880::postInit(SceneObjectList *OwnerList) { _object2.postInit(); _object2.setVisage(880); _object2.setPosition(Common::Point(209, 76)); - _object2.setDetails(880, 4, 5, 6, 1, NULL); + _object2.setDetails(880, 4, 5, 6, 1, (SceneItem *)NULL); _object4.postInit(); _object4.setVisage(875); - _object4.setDetails(880, 7, -1, 9, 1, NULL); + _object4.setDetails(880, 7, -1, 9, 1, (SceneItem *)NULL); _object5.postInit(); _object5.setVisage(874); @@ -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 ea54bf6b1d..2178f31b30 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.cpp +++ b/engines/tsage/blue_force/blueforce_scenes9.cpp @@ -35,7 +35,7 @@ namespace BlueForce { * *--------------------------------------------------------------------------*/ -bool Scene900::Item1::startAction(CursorType action, Event &event) { +bool Scene900::Exterior::startAction(CursorType action, Event &event) { if (action == CURSOR_LOOK) { SceneItem::display2(900, 6); return true; @@ -44,7 +44,7 @@ bool Scene900::Item1::startAction(CursorType action, Event &event) { } } -bool Scene900::Item4::startAction(CursorType action, Event &event) { +bool Scene900::WestExit::startAction(CursorType action, Event &event) { Scene900 *scene = (Scene900 *)BF_GLOBALS._sceneManager._scene; BF_GLOBALS._player.disableControl(); @@ -386,7 +386,7 @@ void Scene900::Action3::signal() { break; default: break; - } + } } void Scene900::Action4::signal() { @@ -442,7 +442,7 @@ void Scene900::postInit(SceneObjectList *OwnerList) { _body.fixPriority(120); _body.setVisage(901); _body.setPosition(Common::Point(159,128)); - _body.setDetails(900, 15, 16, 17, ANIM_MODE_1, NULL); + _body.setDetails(900, 15, 16, 17, ANIM_MODE_1, (SceneItem *)NULL); } if (BF_GLOBALS._sceneManager._previousScene == 910) { _sceneBounds.moveTo(639, 0); @@ -458,14 +458,14 @@ void Scene900::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_jakeJacketSpeaker); _stripManager.addSpeaker(&_lyleHatSpeaker); - _item4.setDetails(Rect(0, 85, 20, 130), 900, -1, -1, -1, 1, 0); + _westExit.setDetails(Rect(0, 85, 20, 130), 900, -1, -1, -1, 1, 0); BF_GLOBALS._player.postInit(); _dog.postInit(); _dog.setVisage(902); _dog.setPosition(Common::Point(845, 135)); _dog.fixPriority(122); - _dog.setDetails(900, 8, -1, 9, 1, NULL); + _dog.setDetails(900, 8, -1, 9, 1, (SceneItem *)NULL); if (_dog._flag == 0) { _dog.animate(ANIM_MODE_1, NULL); @@ -524,7 +524,7 @@ void Scene900::postInit(SceneObjectList *OwnerList) { _lyle.postInit(); _lyle._moveDiff.y = 7; _lyle._flags |= OBJFLAG_CHECK_REGION; - _lyle.setDetails(900, 19, 20, 21, ANIM_MODE_1, NULL); + _lyle.setDetails(900, 19, 20, 21, ANIM_MODE_1, (SceneItem *)NULL); _lyleHatSpeaker._xp = 210; _jakeJacketSpeaker._xp = 75; setAction(&_sequenceManager1, this, 9013, &BF_GLOBALS._player, &_lyle, NULL); @@ -537,10 +537,10 @@ void Scene900::postInit(SceneObjectList *OwnerList) { _lyle.setPosition(Common::Point(780, 153)); _lyle._moveDiff.y = 7; _lyle._flags |= 0x1000; - _lyle.setDetails(900, 19, 20, 21, ANIM_MODE_1, NULL); + _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); @@ -553,17 +553,17 @@ void Scene900::postInit(SceneObjectList *OwnerList) { if (BF_GLOBALS.getFlag(fWithLyle)) { _lyle.postInit(); _lyle._flags |= 0x1000; - _lyle.setDetails(900, 19, 20, 21, ANIM_MODE_1, NULL); + _lyle.setDetails(900, 19, 20, 21, ANIM_MODE_1, (SceneItem *)NULL); setAction(&_sequenceManager1, this, 9014, &BF_GLOBALS._player, &_door, &_lyle, NULL); } else setAction(&_sequenceManager1, this, 9002, &BF_GLOBALS._player, &_door, NULL); } - _gate.setDetails(900, 0, -1, 1, 1, 0); - _door.setDetails(900, 2, -1, 5, 1, 0); + _gate.setDetails(900, 0, -1, 1, 1, (SceneItem *)NULL); + _door.setDetails(900, 2, -1, 5, 1, (SceneItem *)NULL); _item2.setDetails(Rect(0, 0, 225, 21), 666, 25, -1, -1, 1, NULL); _item3.setDetails(Rect(37, 21, 324, 50), 666, 26, -1, -1, 1, NULL); - _item1.setDetails(Rect(0, 0, 960, 200), 900, 7, -1, -1, 1, NULL); + _exterior.setDetails(Rect(0, 0, 960, 200), 900, 7, -1, -1, 1, NULL); } void Scene900::signal() { @@ -692,7 +692,7 @@ void Scene900::process(Event &event) { SceneExt::process(event); if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { - if (_item4.contains(event.mousePos)) { + if (_westExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_W); BF_GLOBALS._events.setCursor(surface); } else { @@ -1285,9 +1285,9 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) { } if (_mode != 1) - BF_GLOBALS._breakerBoxStatusArr[_state - 1] = (_state + 251) % 256; + BF_GLOBALS._breakerBoxStatusArr[_state - 1] = (_frame + 251) % 256; else - BF_GLOBALS._breakerBoxStatusArr[_state - 1] = _state; + BF_GLOBALS._breakerBoxStatusArr[_state - 1] = _frame; switch (_state) { case 1: @@ -2019,10 +2019,10 @@ void Scene910::postInit(SceneObjectList *OwnerList) { if (BF_GLOBALS._v4CEE2 == 0) _item16.setDetails(Rect(265, 18, 319, 102), 910, -1, -1, -1, 1, NULL); - _breakerBox.setDetails(910, 6, -1, -1, 1, NULL); + _breakerBox.setDetails(910, 6, -1, -1, 1, (SceneItem *)NULL); _item15.setDetails(Rect(0, 0, 320, 170), 910, 0, 1, 2, 1, NULL); - _yellowCord.setDetails(910, 52, 53, -1, 1, NULL); - _blackCord.setDetails(910, 54, 55, -1, 1, NULL); + _yellowCord.setDetails(910, 52, 53, -1, 1, (SceneItem *)NULL); + _blackCord.setDetails(910, 54, 55, -1, 1, (SceneItem *)NULL); _item2.setDetails(3, 910, 22, -1, 24, 1); _item4.setDetails(1, 910, 16, 17, 18, 1); _item8.setDetails(4, 910, 25, 26, 27, 1); @@ -2032,7 +2032,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { _item9.setDetails(Rect(266, 39, 274, 70), 910, 43, 44, 45, 1, NULL); _item10.setDetails(Rect(276, 27, 288, 83), 910, 46, 47, 48, 1, NULL); _item11.setDetails(Rect(295, 42, 312, 87), 910, 49, 50, 51, 1, NULL); - _fakeWall.setDetails(910, 28, -1, 30, 1, NULL); + _fakeWall.setDetails(910, 28, -1, 30, 1, (SceneItem *)NULL); _item3.setDetails(7, 910, 59, 60, 61, 1); _item5.setDetails(2, 910, 19, 20, 21, 1); _backWall.setDetails(6, 910, 28, 29, 30, 1); @@ -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); @@ -2209,7 +2209,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { _fakeWall.hide(); if (BF_GLOBALS._v4CECC != 2) _yellowCord.setPosition(Common::Point(291, -30)); - BF_GLOBALS._walkRegions.disableRegion(10); + BF_GLOBALS._walkRegions.enableRegion(10); } if (BF_GLOBALS._breakerBoxStatusArr[17] != 0) { @@ -2600,7 +2600,7 @@ void Scene910::signal() { BF_GLOBALS.setFlag(fBackupAt340); BF_GLOBALS._v4CEE2 = 4; _stuart.postInit(); - _nico.setDetails(910, 72, 73, 74, 3, NULL); + _nico.setDetails(910, 72, 73, 74, 3, (SceneItem *)NULL); _stuart.setDetails(910, 66, 67, 68, 5, &_nico); BF_GLOBALS._v4CEE8 = 0; _sceneMode = 9121; @@ -3358,14 +3358,14 @@ void Scene930::postInit(SceneObjectList *OwnerList) { _box.setVisage(930); _box.setStrip(1); _box.setPosition(Common::Point(223, 21)); - _box.setDetails(930, 66, 67, 68, 1, NULL); + _box.setDetails(930, 66, 67, 68, 1, (SceneItem *)NULL); } _boots.postInit(); _boots.setVisage(930); _boots.setStrip(2); _boots.setPosition(Common::Point(9, 161)); _boots.fixPriority(120); - _boots.setDetails(930, 62, 63, 64, 1, NULL); + _boots.setDetails(930, 62, 63, 64, 1, (SceneItem *)NULL); BF_GLOBALS._player.postInit(); BF_GLOBALS._player.setVisage(368); @@ -3375,6 +3375,7 @@ void Scene930::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player.fixPriority(80); BF_GLOBALS._player.changeZoom(-1); BF_GLOBALS._player.enableControl(); + BF_GLOBALS._events.setCursor(CURSOR_WALK); _item1.setDetails( 1, 930, 0, 1, 2, 1); _item2.setDetails( 2, 930, 4, 5, 6, 1); diff --git a/engines/tsage/blue_force/blueforce_scenes9.h b/engines/tsage/blue_force/blueforce_scenes9.h index 9ae542c21d..74708b94de 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.h +++ b/engines/tsage/blue_force/blueforce_scenes9.h @@ -41,11 +41,11 @@ using namespace TsAGE; class Scene900: public PalettedScene { /* Items */ - class Item1: public NamedHotspot { + class Exterior: public NamedHotspot { public: virtual bool startAction(CursorType action, Event &event); }; - class Item4: public NamedHotspot { + class WestExit: public NamedHotspot { public: virtual bool startAction(CursorType action, Event &event); }; @@ -94,7 +94,7 @@ public: SpeakerGameText _gameTextSpeaker; SpeakerJakeJacket _jakeJacketSpeaker; SpeakerLyleHat _lyleHatSpeaker; - Item1 _item1; + Exterior _exterior; Gate _gate; Door _door; Dog _dog; @@ -104,7 +104,7 @@ public: NamedObject _object5; Lyle _lyle; Body _body; - Item4 _item4; + WestExit _westExit; ASoundExt _sound1; Action1 _action1; Action2 _action2; |