diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/actor.cpp | 9 | ||||
-rw-r--r-- | engines/bladerunner/adq.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 33 | ||||
-rw-r--r-- | engines/bladerunner/bladerunner.h | 4 | ||||
-rw-r--r-- | engines/bladerunner/module.mk | 232 | ||||
-rw-r--r-- | engines/bladerunner/scene.cpp | 14 | ||||
-rw-r--r-- | engines/bladerunner/script/ai.cpp | 168 | ||||
-rw-r--r-- | engines/bladerunner/script/ai.h | 174 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mccoy.cpp (renamed from engines/bladerunner/script/ai_00_mccoy.cpp) | 64 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_leroy.cpp (renamed from engines/bladerunner/script/ai_23_officer_leroy.cpp) | 51 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/runciter.cpp (renamed from engines/bladerunner/script/ai_15_runciter.cpp) | 47 | ||||
-rw-r--r-- | engines/bladerunner/script/ai_00_mccoy.h | 83 | ||||
-rw-r--r-- | engines/bladerunner/script/ai_15_runciter.h | 65 | ||||
-rw-r--r-- | engines/bladerunner/script/ai_23_officer_leroy.h | 66 | ||||
-rw-r--r-- | engines/bladerunner/script/scene.cpp | 152 | ||||
-rw-r--r-- | engines/bladerunner/script/scene.h | 559 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ar01.cpp (renamed from engines/bladerunner/script/ar01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ar02.cpp (renamed from engines/bladerunner/script/ar02.cpp) | 34 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb01.cpp (renamed from engines/bladerunner/script/bb01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb02.cpp (renamed from engines/bladerunner/script/bb02.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb03.cpp (renamed from engines/bladerunner/script/bb03.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb04.cpp (renamed from engines/bladerunner/script/bb04.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb05.cpp (renamed from engines/bladerunner/script/bb05.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb06.cpp (renamed from engines/bladerunner/script/bb06.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb07.cpp (renamed from engines/bladerunner/script/bb07.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb08.cpp (renamed from engines/bladerunner/script/bb08.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb09.cpp (renamed from engines/bladerunner/script/bb09.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb10.cpp (renamed from engines/bladerunner/script/bb10.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb11.cpp (renamed from engines/bladerunner/script/bb11.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb12.cpp (renamed from engines/bladerunner/script/bb12.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/bb51.cpp (renamed from engines/bladerunner/script/bb51.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct01.cpp (renamed from engines/bladerunner/script/ct01.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct02.cpp (renamed from engines/bladerunner/script/ct02.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct03.cpp (renamed from engines/bladerunner/script/ct03.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct04.cpp (renamed from engines/bladerunner/script/ct04.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct05.cpp (renamed from engines/bladerunner/script/ct05.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct06.cpp (renamed from engines/bladerunner/script/ct06.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct07.cpp (renamed from engines/bladerunner/script/ct07.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct08.cpp (renamed from engines/bladerunner/script/ct08.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct09.cpp (renamed from engines/bladerunner/script/ct09.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct10.cpp (renamed from engines/bladerunner/script/ct10.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct11.cpp (renamed from engines/bladerunner/script/ct11.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct12.cpp (renamed from engines/bladerunner/script/ct12.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct51.cpp (renamed from engines/bladerunner/script/ct51.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr01.cpp (renamed from engines/bladerunner/script/dr01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr02.cpp (renamed from engines/bladerunner/script/dr02.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr03.cpp (renamed from engines/bladerunner/script/dr03.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr04.cpp (renamed from engines/bladerunner/script/dr04.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr05.cpp (renamed from engines/bladerunner/script/dr05.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr06.cpp (renamed from engines/bladerunner/script/dr06.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hc01.cpp (renamed from engines/bladerunner/script/hc01.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hc02.cpp (renamed from engines/bladerunner/script/hc02.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hc03.cpp (renamed from engines/bladerunner/script/hc03.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hc04.cpp (renamed from engines/bladerunner/script/hc04.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf01.cpp (renamed from engines/bladerunner/script/hf01.cpp) | 34 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf02.cpp (renamed from engines/bladerunner/script/hf02.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf03.cpp (renamed from engines/bladerunner/script/hf03.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf04.cpp (renamed from engines/bladerunner/script/hf04.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf05.cpp (renamed from engines/bladerunner/script/hf05.cpp) | 50 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf06.cpp (renamed from engines/bladerunner/script/hf06.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf07.cpp (renamed from engines/bladerunner/script/hf07.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp01.cpp (renamed from engines/bladerunner/script/kp01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp02.cpp (renamed from engines/bladerunner/script/kp02.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp03.cpp (renamed from engines/bladerunner/script/kp03.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp04.cpp (renamed from engines/bladerunner/script/kp04.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp05.cpp (renamed from engines/bladerunner/script/kp05.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp06.cpp (renamed from engines/bladerunner/script/kp06.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp07.cpp (renamed from engines/bladerunner/script/kp07.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma01.cpp (renamed from engines/bladerunner/script/ma01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma02.cpp (renamed from engines/bladerunner/script/ma02.cpp) | 34 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma04.cpp (renamed from engines/bladerunner/script/ma04.cpp) | 46 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma05.cpp (renamed from engines/bladerunner/script/ma05.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma06.cpp (renamed from engines/bladerunner/script/ma06.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma07.cpp (renamed from engines/bladerunner/script/ma07.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma08.cpp (renamed from engines/bladerunner/script/ma08.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr01.cpp (renamed from engines/bladerunner/script/nr01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr02.cpp (renamed from engines/bladerunner/script/nr02.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr03.cpp (renamed from engines/bladerunner/script/nr03.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr04.cpp (renamed from engines/bladerunner/script/nr04.cpp) | 34 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr05.cpp (renamed from engines/bladerunner/script/nr05.cpp) | 38 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr06.cpp (renamed from engines/bladerunner/script/nr06.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr07.cpp (renamed from engines/bladerunner/script/nr07.cpp) | 48 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr08.cpp (renamed from engines/bladerunner/script/nr08.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr09.cpp (renamed from engines/bladerunner/script/nr09.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr10.cpp (renamed from engines/bladerunner/script/nr10.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr11.cpp (renamed from engines/bladerunner/script/nr11.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps01.cpp (renamed from engines/bladerunner/script/ps01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps02.cpp (renamed from engines/bladerunner/script/ps02.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps03.cpp (renamed from engines/bladerunner/script/ps03.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps04.cpp (renamed from engines/bladerunner/script/ps04.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps05.cpp (renamed from engines/bladerunner/script/ps05.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps06.cpp (renamed from engines/bladerunner/script/ps06.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps07.cpp (renamed from engines/bladerunner/script/ps07.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps09.cpp (renamed from engines/bladerunner/script/ps09.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps10.cpp (renamed from engines/bladerunner/script/ps10.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps11.cpp (renamed from engines/bladerunner/script/ps11.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps12.cpp (renamed from engines/bladerunner/script/ps12.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps13.cpp (renamed from engines/bladerunner/script/ps13.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps14.cpp (renamed from engines/bladerunner/script/ps14.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps15.cpp (renamed from engines/bladerunner/script/ps15.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/rc01.cpp (renamed from engines/bladerunner/script/rc01.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/rc02.cpp (renamed from engines/bladerunner/script/rc02.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/rc03.cpp (renamed from engines/bladerunner/script/rc03.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/rc04.cpp (renamed from engines/bladerunner/script/rc04.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/rc51.cpp (renamed from engines/bladerunner/script/rc51.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/tb02.cpp (renamed from engines/bladerunner/script/tb02.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/tb03.cpp (renamed from engines/bladerunner/script/tb03.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/tb05.cpp (renamed from engines/bladerunner/script/tb05.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/tb06.cpp (renamed from engines/bladerunner/script/tb06.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/tb07.cpp (renamed from engines/bladerunner/script/tb07.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug01.cpp (renamed from engines/bladerunner/script/ug01.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug02.cpp (renamed from engines/bladerunner/script/ug02.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug03.cpp (renamed from engines/bladerunner/script/ug03.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug04.cpp (renamed from engines/bladerunner/script/ug04.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug05.cpp (renamed from engines/bladerunner/script/ug05.cpp) | 32 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug06.cpp (renamed from engines/bladerunner/script/ug06.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug07.cpp (renamed from engines/bladerunner/script/ug07.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug08.cpp (renamed from engines/bladerunner/script/ug08.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug09.cpp (renamed from engines/bladerunner/script/ug09.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug10.cpp (renamed from engines/bladerunner/script/ug10.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug12.cpp (renamed from engines/bladerunner/script/ug12.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug13.cpp (renamed from engines/bladerunner/script/ug13.cpp) | 42 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug14.cpp (renamed from engines/bladerunner/script/ug14.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug15.cpp (renamed from engines/bladerunner/script/ug15.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug16.cpp (renamed from engines/bladerunner/script/ug16.cpp) | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug17.cpp (renamed from engines/bladerunner/script/ug17.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug18.cpp (renamed from engines/bladerunner/script/ug18.cpp) | 40 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug19.cpp (renamed from engines/bladerunner/script/ug19.cpp) | 28 | ||||
-rw-r--r-- | engines/bladerunner/script/script.cpp | 257 | ||||
-rw-r--r-- | engines/bladerunner/script/script.h | 585 |
130 files changed, 2957 insertions, 2960 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 597dc60454..330ed58ddf 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -35,7 +35,8 @@ #include "bladerunner/movement_track.h" #include "bladerunner/scene.h" #include "bladerunner/scene_objects.h" -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" +#include "bladerunner/script/ai.h" #include "bladerunner/slice_animations.h" #include "bladerunner/slice_renderer.h" #include "bladerunner/waypoints.h" @@ -199,7 +200,7 @@ void Actor::countdownTimerUpdate(int timerId) { case 0: case 1: case 2: - if (!_vm->_aiScripts->IsInsideScript() && !_vm->_script->IsInsideScript()) { + if (!_vm->_aiScripts->IsInsideScript() && !_vm->_sceneScript->IsInsideScript()) { _vm->_aiScripts->TimerExpired(this->_id, timerId); this->_timersRemain[timerId] = 0; } else { @@ -926,7 +927,7 @@ void Actor::retire(bool retired, int width, int height, int retiredByActorId) { _vm->_playerDead = true; } if (_isRetired) { - //TODO: _vm->actorScript->Retired(_id, retiredByActorId); + _vm->_aiScripts->Retired(_id, retiredByActorId); } } @@ -1013,7 +1014,7 @@ void Actor::setGoal(int goalNumber) { } _vm->_aiScripts->GoalChanged(_id, oldGoalNumber, goalNumber); - _vm->_script->ActorChangedGoal(_id, goalNumber, oldGoalNumber, _vm->_scene->getSetId() == _setId); + _vm->_sceneScript->ActorChangedGoal(_id, goalNumber, oldGoalNumber, _vm->_scene->getSetId() == _setId); } int Actor::getGoal() { diff --git a/engines/bladerunner/adq.cpp b/engines/bladerunner/adq.cpp index d2d3dec6ce..71315e8492 100644 --- a/engines/bladerunner/adq.cpp +++ b/engines/bladerunner/adq.cpp @@ -28,7 +28,7 @@ #include "bladerunner/audio_speech.h" #include "bladerunner/scene.h" -#include "script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { @@ -99,7 +99,7 @@ void ADQ::flush(int a1, bool callScript) { } clear(); if (callScript) { - _vm->_script->DialogueQueueFlushed(a1); + _vm->_sceneScript->DialogueQueueFlushed(a1); } } diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index 6a06422a24..78239adbbb 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -43,7 +43,8 @@ #include "bladerunner/scene.h" #include "bladerunner/scene_objects.h" #include "bladerunner/script/init.h" -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" +#include "bladerunner/script/ai.h" #include "bladerunner/settings.h" #include "bladerunner/shape.h" #include "bladerunner/slice_animations.h" @@ -72,7 +73,7 @@ BladeRunnerEngine::BladeRunnerEngine(OSystem *syst) _playerLosesControlCounter = 0; _crimesDatabase = nullptr; - _script = new Script(this); + _sceneScript = new SceneScript(this); _settings = new Settings(this); _lights = new Lights(this); _combat = new Combat(this); @@ -120,7 +121,7 @@ BladeRunnerEngine::~BladeRunnerEngine() { delete _combat; delete _lights; delete _settings; - delete _script; + delete _sceneScript; } bool BladeRunnerEngine::hasFeature(EngineFeature f) const { @@ -346,11 +347,17 @@ bool BladeRunnerEngine::startup(bool hasSavegames) { void BladeRunnerEngine::initChapterAndScene() { // TODO: Init actors... - for (int i = 0, end = _gameInfo->getActorCount(); i != end; ++i) + for (int i = 0, end = _gameInfo->getActorCount(); i != end; ++i) { _aiScripts->Initialize(i); + } - for (int i = 0, end = _gameInfo->getActorCount(); i != end; ++i) + for (int i = 0, end = _gameInfo->getActorCount(); i != end; ++i) { _actors[i]->changeAnimationMode(0); + } + + for (int i = 1, end = _gameInfo->getActorCount(); i != end; ++i) { // skip first actor, probably player + _actors[i]->movementTrackNext(true); + } _settings->setChapter(1); _settings->setNewSetAndScene(_gameInfo->getInitialSetId(), _gameInfo->getInitialSceneId()); @@ -587,7 +594,7 @@ void BladeRunnerEngine::gameTick() { _adq->tick(); if (_scene->didPlayerWalkIn()) { - _script->PlayerWalkedIn(); + _sceneScript->PlayerWalkedIn(); } // TODO: Gun range announcements // TODO: ZBUF repair dirty rects @@ -597,7 +604,7 @@ void BladeRunnerEngine::gameTick() { bool backgroundChanged = false; int frame = _scene->advanceFrame(_surface1, _zBuffer1); if (frame >= 0) { - _script->SceneFrameAdvanced(frame); + _sceneScript->SceneFrameAdvanced(frame); backgroundChanged = true; } (void)backgroundChanged; @@ -626,7 +633,7 @@ void BladeRunnerEngine::gameTick() { //if (!dialogueMenu) actorsUpdate(); - if (_settings->getNewScene() == -1 || _script->IsInsideScript() || _aiScripts->IsInsideScript()) { + if (_settings->getNewScene() == -1 || _sceneScript->IsInsideScript() || _aiScripts->IsInsideScript()) { _sliceRenderer->setView(*_view); // Tick and draw all actors in current set @@ -846,28 +853,28 @@ void BladeRunnerEngine::handleMouseClick(int x, int y) { void BladeRunnerEngine::handleMouseClickExit(int x, int y, int exitIndex) { // clickedOnExit(exitType, x, y); debug("clicked on exit %d %d %d", exitIndex, x, y); - _script->ClickedOnExit(exitIndex); + _sceneScript->ClickedOnExit(exitIndex); } void BladeRunnerEngine::handleMouseClickRegion(int x, int y, int regionIndex) { debug("clicked on region %d %d %d", regionIndex, x, y); - _script->ClickedOn2DRegion(regionIndex); + _sceneScript->ClickedOn2DRegion(regionIndex); } void BladeRunnerEngine::handleMouseClick3DObject(int x, int y, int objectId, bool isClickable, bool isTarget) { const char *objectName = _scene->objectGetName(objectId); debug("Clicked on object %s", objectName); - _script->ClickedOn3DObject(objectName, false); + _sceneScript->ClickedOn3DObject(objectName, false); } void BladeRunnerEngine::handleMouseClickItem(int x, int y, int itemId) { debug("Clicked on item %d", itemId); - _script->ClickedOnItem(itemId, false); + _sceneScript->ClickedOnItem(itemId, false); } void BladeRunnerEngine::handleMouseClickActor(int x, int y, int actorId) { debug("Clicked on actor %d", actorId); - _script->ClickedOnActor(actorId); + _sceneScript->ClickedOnActor(actorId); } void BladeRunnerEngine::gameWaitForActive() { diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h index 0aab57625b..87bb7dbeca 100644 --- a/engines/bladerunner/bladerunner.h +++ b/engines/bladerunner/bladerunner.h @@ -55,7 +55,7 @@ class Mouse; class Obstacles; class Scene; class SceneObjects; -class Script; +class SceneScript; class Settings; class Shape; class SliceAnimations; @@ -91,7 +91,7 @@ public: Obstacles *_obstacles; Scene *_scene; SceneObjects *_sceneObjects; - Script *_script; + SceneScript *_sceneScript; Settings *_settings; SliceAnimations *_sliceAnimations; SliceRenderer *_sliceRenderer; diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk index f8394e9318..5ef5735a74 100644 --- a/engines/bladerunner/module.mk +++ b/engines/bladerunner/module.mk @@ -38,125 +38,127 @@ MODULE_OBJS = \ regions.o \ scene.o \ scene_objects.o \ - script/ai_00_mccoy.o \ - script/ai_15_runciter.o \ - script/ai_23_officer_leroy.o \ + script/script.o \ script/init.o \ script/kia.o \ script/vk.o \ script/esper.o \ - script/ar01.o \ - script/ar02.o \ - script/bb01.o \ - script/bb02.o \ - script/bb03.o \ - script/bb04.o \ - script/bb05.o \ - script/bb06.o \ - script/bb07.o \ - script/bb08.o \ - script/bb09.o \ - script/bb10.o \ - script/bb11.o \ - script/bb12.o \ - script/bb51.o \ - script/ct01.o \ - script/ct02.o \ - script/ct03.o \ - script/ct04.o \ - script/ct05.o \ - script/ct06.o \ - script/ct07.o \ - script/ct08.o \ - script/ct09.o \ - script/ct10.o \ - script/ct11.o \ - script/ct12.o \ - script/ct51.o \ - script/dr01.o \ - script/dr02.o \ - script/dr03.o \ - script/dr04.o \ - script/dr05.o \ - script/dr06.o \ - script/hc01.o \ - script/hc02.o \ - script/hc03.o \ - script/hc04.o \ - script/hf01.o \ - script/hf02.o \ - script/hf03.o \ - script/hf04.o \ - script/hf05.o \ - script/hf06.o \ - script/kp01.o \ - script/kp02.o \ - script/kp03.o \ - script/kp04.o \ - script/kp05.o \ - script/kp06.o \ - script/kp07.o \ - script/ma01.o \ - script/ma02.o \ - script/ma04.o \ - script/ma05.o \ - script/ma06.o \ - script/ma07.o \ - script/ma08.o \ - script/nr01.o \ - script/nr02.o \ - script/nr03.o \ - script/nr04.o \ - script/nr05.o \ - script/nr06.o \ - script/nr07.o \ - script/nr08.o \ - script/nr09.o \ - script/nr10.o \ - script/nr11.o \ - script/ps01.o \ - script/ps02.o \ - script/ps03.o \ - script/ps04.o \ - script/ps05.o \ - script/ps06.o \ - script/ps07.o \ - script/ps09.o \ - script/ps10.o \ - script/ps11.o \ - script/ps12.o \ - script/ps13.o \ - script/ps14.o \ - script/ps15.o \ - script/rc01.o \ - script/rc02.o \ - script/rc03.o \ - script/rc04.o \ - script/rc51.o \ - script/tb02.o \ - script/tb03.o \ - script/tb05.o \ - script/tb06.o \ - script/tb07.o \ - script/ug01.o \ - script/ug02.o \ - script/ug03.o \ - script/ug04.o \ - script/ug05.o \ - script/ug06.o \ - script/ug07.o \ - script/ug08.o \ - script/ug09.o \ - script/ug10.o \ - script/ug12.o \ - script/ug13.o \ - script/ug14.o \ - script/ug15.o \ - script/ug16.o \ - script/ug17.o \ - script/ug18.o \ - script/ug19.o \ - script/script.o \ + script/ai.o \ + script/ai/mccoy.o \ + script/ai/runciter.o \ + script/ai/officer_leroy.o \ + script/scene.o \ + script/scene/ar01.o \ + script/scene/ar02.o \ + script/scene/bb01.o \ + script/scene/bb02.o \ + script/scene/bb03.o \ + script/scene/bb04.o \ + script/scene/bb05.o \ + script/scene/bb06.o \ + script/scene/bb07.o \ + script/scene/bb08.o \ + script/scene/bb09.o \ + script/scene/bb10.o \ + script/scene/bb11.o \ + script/scene/bb12.o \ + script/scene/bb51.o \ + script/scene/ct01.o \ + script/scene/ct02.o \ + script/scene/ct03.o \ + script/scene/ct04.o \ + script/scene/ct05.o \ + script/scene/ct06.o \ + script/scene/ct07.o \ + script/scene/ct08.o \ + script/scene/ct09.o \ + script/scene/ct10.o \ + script/scene/ct11.o \ + script/scene/ct12.o \ + script/scene/ct51.o \ + script/scene/dr01.o \ + script/scene/dr02.o \ + script/scene/dr03.o \ + script/scene/dr04.o \ + script/scene/dr05.o \ + script/scene/dr06.o \ + script/scene/hc01.o \ + script/scene/hc02.o \ + script/scene/hc03.o \ + script/scene/hc04.o \ + script/scene/hf01.o \ + script/scene/hf02.o \ + script/scene/hf03.o \ + script/scene/hf04.o \ + script/scene/hf05.o \ + script/scene/hf06.o \ + script/scene/kp01.o \ + script/scene/kp02.o \ + script/scene/kp03.o \ + script/scene/kp04.o \ + script/scene/kp05.o \ + script/scene/kp06.o \ + script/scene/kp07.o \ + script/scene/ma01.o \ + script/scene/ma02.o \ + script/scene/ma04.o \ + script/scene/ma05.o \ + script/scene/ma06.o \ + script/scene/ma07.o \ + script/scene/ma08.o \ + script/scene/nr01.o \ + script/scene/nr02.o \ + script/scene/nr03.o \ + script/scene/nr04.o \ + script/scene/nr05.o \ + script/scene/nr06.o \ + script/scene/nr07.o \ + script/scene/nr08.o \ + script/scene/nr09.o \ + script/scene/nr10.o \ + script/scene/nr11.o \ + script/scene/ps01.o \ + script/scene/ps02.o \ + script/scene/ps03.o \ + script/scene/ps04.o \ + script/scene/ps05.o \ + script/scene/ps06.o \ + script/scene/ps07.o \ + script/scene/ps09.o \ + script/scene/ps10.o \ + script/scene/ps11.o \ + script/scene/ps12.o \ + script/scene/ps13.o \ + script/scene/ps14.o \ + script/scene/ps15.o \ + script/scene/rc01.o \ + script/scene/rc02.o \ + script/scene/rc03.o \ + script/scene/rc04.o \ + script/scene/rc51.o \ + script/scene/tb02.o \ + script/scene/tb03.o \ + script/scene/tb05.o \ + script/scene/tb06.o \ + script/scene/tb07.o \ + script/scene/ug01.o \ + script/scene/ug02.o \ + script/scene/ug03.o \ + script/scene/ug04.o \ + script/scene/ug05.o \ + script/scene/ug06.o \ + script/scene/ug07.o \ + script/scene/ug08.o \ + script/scene/ug09.o \ + script/scene/ug10.o \ + script/scene/ug12.o \ + script/scene/ug13.o \ + script/scene/ug14.o \ + script/scene/ug15.o \ + script/scene/ug16.o \ + script/scene/ug17.o \ + script/scene/ug18.o \ + script/scene/ug19.o \ set.o \ settings.o \ set_effects.o \ diff --git a/engines/bladerunner/scene.cpp b/engines/bladerunner/scene.cpp index abf0285660..05abfbe16e 100644 --- a/engines/bladerunner/scene.cpp +++ b/engines/bladerunner/scene.cpp @@ -31,7 +31,7 @@ #include "bladerunner/items.h" #include "bladerunner/settings.h" #include "bladerunner/scene_objects.h" -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" #include "bladerunner/slice_renderer.h" #include "common/str.h" @@ -78,11 +78,11 @@ bool Scene::open(int setId, int sceneId, bool isLoadingGame) { _vqaPlayer = new VQAPlayer(_vm); Common::String sceneName = _vm->_gameInfo->getSceneName(sceneId); - if (!_vm->_script->open(sceneName)) + if (!_vm->_sceneScript->Open(sceneName)) return false; if (!isLoadingGame) - _vm->_script->InitializeScene(); + _vm->_sceneScript->InitializeScene(); Common::String setResourceName = Common::String::format("%s-MIN.SET", sceneName.c_str()); if (!_set->open(setResourceName)) @@ -93,7 +93,7 @@ bool Scene::open(int setId, int sceneId, bool isLoadingGame) { if (isLoadingGame) { // TODO: Advance VQA frame if (sceneId >= 73 && sceneId <= 76) - _vm->_script->SceneLoaded(); + _vm->_sceneScript->SceneLoaded(); return true; } @@ -110,7 +110,7 @@ bool Scene::open(int setId, int sceneId, bool isLoadingGame) { _vm->_playerActor->setAtXYZ(_actorStartPosition, _actorStartFacing); _vm->_playerActor->setSetId(setId); - _vm->_script->SceneLoaded(); + _vm->_sceneScript->SceneLoaded(); _vm->_sceneObjects->clear(); @@ -137,7 +137,7 @@ bool Scene::open(int setId, int sceneId, bool isLoadingGame) { // TODO: calculate walking obstacles?? if (_specialLoopMode) { - _vm->_script->PlayerWalkedIn(); + _vm->_sceneScript->PlayerWalkedIn(); } return true; @@ -151,7 +151,7 @@ bool Scene::close(bool isLoadingGame) { //_vm->_policeMaze->clear(!isLoadingGame); if (isLoadingGame) { - _vm->_script->PlayerWalkedOut(); + _vm->_sceneScript->PlayerWalkedOut(); } // if (SceneScript_isLoaded() && !SceneScript_unload()) { diff --git a/engines/bladerunner/script/ai.cpp b/engines/bladerunner/script/ai.cpp new file mode 100644 index 0000000000..d51200dc55 --- /dev/null +++ b/engines/bladerunner/script/ai.cpp @@ -0,0 +1,168 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "bladerunner/script/ai.h" + +#include "bladerunner/bladerunner.h" + +#include "bladerunner/actor.h" + +namespace BladeRunner { + +AIScripts::AIScripts(BladeRunnerEngine *vm, int actorsCount) : _vm(vm), _inScriptCounter(0) { + _actorsCount = actorsCount; + _actorUpdating = new bool[actorsCount]; + _AIScripts = new AIScriptBase*[actorsCount]; + for (int i = 0; i < actorsCount; ++i) { + _AIScripts[i] = nullptr; + _actorUpdating[i] = false; + } + + _AIScripts[0] = new AIScriptMcCoy(_vm); + _AIScripts[15] = new AIScriptRunciter(_vm); + _AIScripts[23] = new AIScriptOfficerLeroy(_vm); +} + +AIScripts::~AIScripts() { + for (int i = 0; i < _actorsCount; ++i) { + delete _AIScripts[i]; + _AIScripts[i] = nullptr; + } + delete[] _AIScripts; + delete[] _actorUpdating; +} + +void AIScripts::Initialize(int actor) { + assert(actor < _actorsCount); + if (_AIScripts[actor]) + _AIScripts[actor]->Initialize(); +} + +void AIScripts::Update(int actor) { + assert(actor < _actorsCount); + if (this->_actorUpdating[actor] != 1) { + this->_actorUpdating[actor] = true; + ++this->_inScriptCounter; + if (_AIScripts[actor]) + _AIScripts[actor]->Update(); + --this->_inScriptCounter; + this->_actorUpdating[actor] = false; + } +} + +void AIScripts::TimerExpired(int actor, int timer) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->TimerExpired(timer); + } + _inScriptCounter--; +} + +void AIScripts::CompletedMovementTrack(int actor) { + assert(actor < _actorsCount); + if (!_vm->_actors[actor]->inCombat()) { + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->CompletedMovementTrack(); + } + _inScriptCounter--; + } +} + +void AIScripts::EnteredScene(int actor, int setId) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->EnteredScene(setId); + } + _inScriptCounter--; +} + +void AIScripts::OtherAgentEnteredThisScene(int actor, int otherActorId) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->OtherAgentEnteredThisScene(otherActorId); + } + _inScriptCounter--; +} + +void AIScripts::OtherAgentExitedThisScene(int actor, int otherActorId) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->OtherAgentExitedThisScene(otherActorId); + } + _inScriptCounter--; +} + +void AIScripts::Retired(int actor, int retiredByActorId) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->Retired(retiredByActorId); + } + _inScriptCounter--; +} + +void AIScripts::GoalChanged(int actor, int currentGoalNumber, int newGoalNumber) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->GoalChanged(currentGoalNumber, newGoalNumber); + } + _inScriptCounter--; +} + +bool AIScripts::ReachedMovementTrackWaypoint(int actor, int waypointId) { + assert(actor < _actorsCount); + bool result = false; + if (!_vm->_actors[actor]->inCombat()) { + _inScriptCounter++; + if (_AIScripts[actor]) { + result = _AIScripts[actor]->ReachedMovementTrackWaypoint(waypointId); + } + _inScriptCounter--; + } + return result; +} + +void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->UpdateAnimation(animation, frame); + } + _inScriptCounter--; +} + +void AIScripts::ChangeAnimationMode(int actor, int mode) { + assert(actor < _actorsCount); + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->ChangeAnimationMode(mode); + } + _inScriptCounter--; +} + +} // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ai.h b/engines/bladerunner/script/ai.h new file mode 100644 index 0000000000..056b22a333 --- /dev/null +++ b/engines/bladerunner/script/ai.h @@ -0,0 +1,174 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef BLADERUNNER_SCRIPT_AI_H +#define BLADERUNNER_SCRIPT_AI_H + +#include "bladerunner/script/script.h" + +namespace BladeRunner { + +class BladeRunnerEngine; + +class AIScriptBase : public ScriptBase { +public: + AIScriptBase(BladeRunnerEngine *vm) : ScriptBase(vm) {} + + virtual void Initialize() = 0; + virtual bool Update() = 0; + virtual void TimerExpired(int timer) = 0; + virtual void CompletedMovementTrack() = 0; + virtual void ReceivedClue(int clueId, int fromActorId) = 0; + virtual void ClickedByPlayer() = 0; + virtual void EnteredScene(int setId) = 0; + virtual void OtherAgentEnteredThisScene(int otherActorId) = 0; + virtual void OtherAgentExitedThisScene(int otherActorId) = 0; + virtual void OtherAgentEnteredCombatMode(int otherActorId, int combatMode) = 0; + virtual void ShotAtAndMissed() = 0; + virtual void ShotAtAndHit() = 0; + virtual void Retired(int byActorId) = 0; + virtual int GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) = 0; + virtual bool GoalChanged(int currentGoalNumber, int newGoalNumber) = 0; + virtual bool UpdateAnimation(int *animation, int *frame) = 0; + virtual bool ChangeAnimationMode(int mode) = 0; + virtual void QueryAnimationState(int *animationState, int *a2, int *a3, int *a4) = 0; + virtual void SetAnimationState(int animationState, int a2, int a3, int a4) = 0; + virtual bool ReachedMovementTrackWaypoint(int waypointId) = 0; + virtual void FledCombat() = 0; +}; + +#define DECLARE_SCRIPT(name) \ +class AIScript##name : public AIScriptBase { \ +public: \ + AIScript##name(BladeRunnerEngine *vm) \ + : AIScriptBase(vm) \ + {} \ + void Initialize(); \ + bool Update(); \ + void TimerExpired(int timer); \ + void CompletedMovementTrack(); \ + void ReceivedClue(int clueId, int fromActorId); \ + void ClickedByPlayer(); \ + void EnteredScene(int setId); \ + void OtherAgentEnteredThisScene(int otherActorId); \ + void OtherAgentExitedThisScene(int otherActorId); \ + void OtherAgentEnteredCombatMode(int otherActorId, int combatMode); \ + void ShotAtAndMissed(); \ + void ShotAtAndHit(); \ + void Retired(int byActorId); \ + int GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId); \ + bool GoalChanged(int currentGoalNumber, int newGoalNumber); \ + bool UpdateAnimation(int *animation, int *frame); \ + bool ChangeAnimationMode(int mode); \ + void QueryAnimationState(int *animationState, int *a2, int *a3, int *a4); \ + void SetAnimationState(int animationState, int a2, int a3, int a4); \ + bool ReachedMovementTrackWaypoint(int waypointId); \ + void FledCombat(); \ +private: +#define END_SCRIPT }; + +DECLARE_SCRIPT(McCoy) + int dword_45A0D0_animation_state; + int dword_45A0D4_animation_frame; + int dword_45A0D8; + int dword_45A0DC; + int dword_45A0E0; + int dword_45A0E4; + float off_45A0EC; + int dword_45A0E8; + int dword_45A0F0; + int dword_45A0F4; + int dword_45A0F8; + int dword_45A0FC; + int dword_462718; + int dword_46271C; + float off_45A100; + float flt_462710; + float flt_462714; + + void sub_4053E0(); + void sub_4054F0(); + void sub_405660(); + void sub_405800(); + void sub_4058B0(); + void sub_405920(); + void sub_405940(float a1); + void sub_4059D0(float a1); +END_SCRIPT + +DECLARE_SCRIPT(Runciter) + int var_45CD70_animation_state; + int var_45CD74_animation_frame; + int var_462800; + int var_462804; + int var_45CD78; + int var_45CD7C; + int var_45CD80; + int var_45CD84; + int var_45CD88; +END_SCRIPT + +DECLARE_SCRIPT(OfficerLeroy) + int var_45D5B0_animation_state; + int var_45D5B4_animation_frame; + int var_45D5B8; + int var_45D5BC; + int var_462880; + int var_462884; + + bool sub_431408(); + bool sub_431420(); +END_SCRIPT + +#undef DECLARE_SCRIPT +#undef END_SCRIPT + +class AIScripts { +private: + BladeRunnerEngine *_vm; + int _inScriptCounter; + int _actorsCount; + AIScriptBase **_AIScripts; + bool *_actorUpdating; +public: + AIScripts(BladeRunnerEngine *vm, int actorsCount); + ~AIScripts(); + + void Initialize(int actor); + void Update(int actor); + void TimerExpired(int actor, int timer); + void CompletedMovementTrack(int actor); + void EnteredScene(int actor, int setId); + void OtherAgentEnteredThisScene(int actor, int otherActorId); + void OtherAgentExitedThisScene(int actor, int otherActorId); + void Retired(int actor, int retiredByActorId); + void GoalChanged(int actor, int currentGoalNumber, int newGoalNumber); + bool ReachedMovementTrackWaypoint(int actor, int waypointId); + void UpdateAnimation(int actor, int *animation, int *frame); + void ChangeAnimationMode(int actor, int mode); + + bool IsInsideScript() { return _inScriptCounter > 0; } +}; + +} // End of namespace BladeRunner + +#endif diff --git a/engines/bladerunner/script/ai_00_mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 70f127213f..fb9561cbcb 100644 --- a/engines/bladerunner/script/ai_00_mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -20,15 +20,11 @@ * */ -#include "bladerunner/script/ai_00_mccoy.h" +#include "bladerunner/script/ai.h" namespace BladeRunner { -AIScript_McCoy::AIScript_McCoy(BladeRunnerEngine *vm) - : AIScriptBase(vm) { -} - -void AIScript_McCoy::Initialize() { +void AIScriptMcCoy::Initialize() { dword_45A0D0_animation_state = 0; dword_45A0D4_animation_frame = 0; dword_45A0D8 = 0; @@ -45,7 +41,7 @@ void AIScript_McCoy::Initialize() { Actor_Set_Goal_Number(0, 0); } -bool AIScript_McCoy::Update() { +bool AIScriptMcCoy::Update() { if (dword_45A0F8 != -1) { Sound_Play(dword_45A0F8, 100, 0, 0, 50); dword_45A0F8 = -1; @@ -98,13 +94,13 @@ bool AIScript_McCoy::Update() { return false; } -void AIScript_McCoy::TimerExpired(int timer) { +void AIScriptMcCoy::TimerExpired(int timer) { } -void AIScript_McCoy::CompletedMovementTrack() { +void AIScriptMcCoy::CompletedMovementTrack() { } -void AIScript_McCoy::ReceivedClue(int clueId, int fromActorId) { +void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) { switch (clueId) { case 8: case 9: @@ -205,28 +201,28 @@ void AIScript_McCoy::ReceivedClue(int clueId, int fromActorId) { } } -void AIScript_McCoy::ClickedByPlayer() { +void AIScriptMcCoy::ClickedByPlayer() { } -void AIScript_McCoy::EnteredScene(int sceneId) { +void AIScriptMcCoy::EnteredScene(int sceneId) { } -void AIScript_McCoy::OtherAgentEnteredThisScene(int otherActorId) { +void AIScriptMcCoy::OtherAgentEnteredThisScene(int otherActorId) { } -void AIScript_McCoy::OtherAgentExitedThisScene(int otherActorId) { +void AIScriptMcCoy::OtherAgentExitedThisScene(int otherActorId) { } -void AIScript_McCoy::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { +void AIScriptMcCoy::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { } -void AIScript_McCoy::ShotAtAndMissed() { +void AIScriptMcCoy::ShotAtAndMissed() { } -void AIScript_McCoy::ShotAtAndHit() { +void AIScriptMcCoy::ShotAtAndHit() { } -void AIScript_McCoy::Retired(int byActorId) { +void AIScriptMcCoy::Retired(int byActorId) { if (byActorId == 1 && Actor_Query_In_Set(1, 42)) { if (Actor_Query_In_Set(3, 42) && Actor_Query_Goal_Number(3) != 599) { Non_Player_Actor_Combat_Mode_On(1, 3, 1, 3, 15, 4, 7, 8, 0, 0, 100, 25, 300, 0); @@ -248,11 +244,11 @@ void AIScript_McCoy::Retired(int byActorId) { } } -int AIScript_McCoy::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { +int AIScriptMcCoy::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { return 0; } -bool AIScript_McCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { +bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { unsigned int v5; unsigned int v7; @@ -452,7 +448,7 @@ bool AIScript_McCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { return false; } -bool AIScript_McCoy::UpdateAnimation(int *animation, int *frame) { +bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { int v7, v18, v19, v46; switch (dword_45A0D0_animation_state) { case 71: @@ -1213,7 +1209,7 @@ bool AIScript_McCoy::UpdateAnimation(int *animation, int *frame) { return true; } -bool AIScript_McCoy::ChangeAnimationMode(int mode) { +bool AIScriptMcCoy::ChangeAnimationMode(int mode) { int v2; switch (mode) { case 85: @@ -1647,27 +1643,27 @@ bool AIScript_McCoy::ChangeAnimationMode(int mode) { return true; } -void AIScript_McCoy::QueryAnimationState(int *animationState, int *a2, int *a3, int *a4) { +void AIScriptMcCoy::QueryAnimationState(int *animationState, int *a2, int *a3, int *a4) { *animationState = dword_45A0D0_animation_state; *a2 = dword_45A0D4_animation_frame; *a3 = dword_462718; *a4 = dword_46271C; } -void AIScript_McCoy::SetAnimationState(int animationState, int a2, int a3, int a4) { +void AIScriptMcCoy::SetAnimationState(int animationState, int a2, int a3, int a4) { dword_45A0D0_animation_state = animationState; dword_45A0D4_animation_frame = a2; dword_462718 = a3; dword_46271C = a4; } -bool AIScript_McCoy::ReachedMovementTrackWaypoint(int waypointId) { +bool AIScriptMcCoy::ReachedMovementTrackWaypoint(int waypointId) { return true; } -void AIScript_McCoy::FledCombat() {} +void AIScriptMcCoy::FledCombat() {} -void AIScript_McCoy::sub_4053E0() { +void AIScriptMcCoy::sub_4053E0() { float x, y, z; Actor_Query_XYZ(0, &x, &y, &z); flt_462710 = flt_462710 + off_45A100; @@ -1681,7 +1677,7 @@ void AIScript_McCoy::sub_4053E0() { return Actor_Set_At_XYZ(0, x, flt_462710, z, Actor_Query_Facing_1024(0)); } -void AIScript_McCoy::sub_4054F0() { +void AIScriptMcCoy::sub_4054F0() { if (Actor_Query_Which_Set_In(0) == 87 && Actor_Query_Goal_Number(0) != 390 && !Game_Flag_Query(682)) { float x, y, z; Actor_Query_XYZ(0, &x, &y, &z); @@ -1700,7 +1696,7 @@ void AIScript_McCoy::sub_4054F0() { } } -void AIScript_McCoy::sub_405660() { +void AIScriptMcCoy::sub_405660() { if (Game_Flag_Query(550)) { if (dword_45A0D4_animation_frame <= 6) { int v1 = Random_Query(0, 2); @@ -1765,7 +1761,7 @@ void AIScript_McCoy::sub_405660() { } } -void AIScript_McCoy::sub_405800() { +void AIScriptMcCoy::sub_405800() { switch (dword_45A0D0_animation_state) { case 36: case 37: @@ -1804,7 +1800,7 @@ void AIScript_McCoy::sub_405800() { } } -void AIScript_McCoy::sub_4058B0() { +void AIScriptMcCoy::sub_4058B0() { int v0 = Actor_Query_Which_Set_In(0); if (v0 == 27) { dword_45A0D0_animation_state = 51; @@ -1817,12 +1813,12 @@ void AIScript_McCoy::sub_4058B0() { } } -void AIScript_McCoy::sub_405920() { +void AIScriptMcCoy::sub_405920() { dword_45A0D4_animation_frame = 0; dword_45A0D0_animation_state = 47; } -void AIScript_McCoy::sub_405940(float a1) { +void AIScriptMcCoy::sub_405940(float a1) { float x, y, z; int currentAngle = Actor_Query_Facing_1024(0); Actor_Query_XYZ(0, &x, &y, &z); @@ -1837,7 +1833,7 @@ void AIScript_McCoy::sub_405940(float a1) { Actor_Set_At_XYZ(0, x, y, z, angle); } -void AIScript_McCoy::sub_4059D0(float a1) { +void AIScriptMcCoy::sub_4059D0(float a1) { float x, y, z; int currentAngle = Actor_Query_Facing_1024(0); Actor_Query_XYZ(0, &x, &y, &z); diff --git a/engines/bladerunner/script/ai_23_officer_leroy.cpp b/engines/bladerunner/script/ai/officer_leroy.cpp index 8f97466a8a..9dc41650e8 100644 --- a/engines/bladerunner/script/ai_23_officer_leroy.cpp +++ b/engines/bladerunner/script/ai/officer_leroy.cpp @@ -20,14 +20,11 @@ * */ -#include "bladerunner/script/ai_23_officer_leroy.h" +#include "bladerunner/script/ai.h" namespace BladeRunner { -AIScript_Officer_Leroy::AIScript_Officer_Leroy(BladeRunnerEngine *vm) - : AIScriptBase(vm), var_45D5B0_animation_state(0), var_45D5B4_animation_frame(0), var_45D5B8(0), var_45D5BC(0), var_462880(0), var_462884(0) {} - -void AIScript_Officer_Leroy::Initialize() { +void AIScriptOfficerLeroy::Initialize() { var_45D5B0_animation_state = 0; var_45D5B4_animation_frame = 0; var_462880 = 0; @@ -40,7 +37,7 @@ void AIScript_Officer_Leroy::Initialize() { Actor_Set_Frame_Rate_FPS(23, 8); } -bool AIScript_Officer_Leroy::Update() { +bool AIScriptOfficerLeroy::Update() { if (Global_Variable_Query(1) == 4 && Actor_Query_Goal_Number(23) < 300) { AI_Movement_Track_Flush(23); Actor_Set_Goal_Number(23, 300); @@ -146,7 +143,7 @@ bool AIScript_Officer_Leroy::Update() { return false; } -void AIScript_Officer_Leroy::TimerExpired(int timer) { +void AIScriptOfficerLeroy::TimerExpired(int timer) { if (timer == 1) { AI_Countdown_Timer_Reset(23, 1); if (Actor_Query_In_Set(0, 41)) { @@ -161,7 +158,7 @@ void AIScript_Officer_Leroy::TimerExpired(int timer) { } } -void AIScript_Officer_Leroy::CompletedMovementTrack() { +void AIScriptOfficerLeroy::CompletedMovementTrack() { int v0; unsigned int v1; @@ -190,7 +187,7 @@ void AIScript_Officer_Leroy::CompletedMovementTrack() { Non_Player_Actor_Combat_Mode_On(23, 0, 1, 0, 12, 4, 7, 8, 0, -1, -1, 15, 300, 0); } -void AIScript_Officer_Leroy::ReceivedClue(int clueId, int fromActorId) { +void AIScriptOfficerLeroy::ReceivedClue(int clueId, int fromActorId) { if (clueId == 222) { Actor_Modify_Friendliness_To_Other(23, 0, 5); } @@ -199,30 +196,30 @@ void AIScript_Officer_Leroy::ReceivedClue(int clueId, int fromActorId) { } } -void AIScript_Officer_Leroy::ClickedByPlayer() {} +void AIScriptOfficerLeroy::ClickedByPlayer() {} -void AIScript_Officer_Leroy::EnteredScene(int sceneId) {} +void AIScriptOfficerLeroy::EnteredScene(int sceneId) {} -void AIScript_Officer_Leroy::OtherAgentEnteredThisScene(int otherActorId) {} +void AIScriptOfficerLeroy::OtherAgentEnteredThisScene(int otherActorId) {} -void AIScript_Officer_Leroy::OtherAgentExitedThisScene(int otherActorId) {} +void AIScriptOfficerLeroy::OtherAgentExitedThisScene(int otherActorId) {} -void AIScript_Officer_Leroy::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {} +void AIScriptOfficerLeroy::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {} -void AIScript_Officer_Leroy::ShotAtAndMissed() {} +void AIScriptOfficerLeroy::ShotAtAndMissed() {} -void AIScript_Officer_Leroy::ShotAtAndHit() { +void AIScriptOfficerLeroy::ShotAtAndHit() { if (Actor_Query_Goal_Number(23) == 307) { Actor_Set_Health(23, 50, 50); } } -void AIScript_Officer_Leroy::Retired(int byActorId) { +void AIScriptOfficerLeroy::Retired(int byActorId) { Actor_Set_Goal_Number(23, 599); Game_Flag_Set(607); } -int AIScript_Officer_Leroy::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { +int AIScriptOfficerLeroy::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { if (otherActorId) { return 0; } @@ -253,7 +250,7 @@ int AIScript_Officer_Leroy::GetFriendlinessModifierIfGetsClue(int otherActorId, return 0; } -bool AIScript_Officer_Leroy::GoalChanged(int currentGoalNumber, int newGoalNumber) { +bool AIScriptOfficerLeroy::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { case 1: AI_Movement_Track_Flush(23); @@ -489,7 +486,7 @@ bool AIScript_Officer_Leroy::GoalChanged(int currentGoalNumber, int newGoalNumbe } } -bool AIScript_Officer_Leroy::UpdateAnimation(int *animation, int *frame) { +bool AIScriptOfficerLeroy::UpdateAnimation(int *animation, int *frame) { int v57; int a1; @@ -891,7 +888,7 @@ bool AIScript_Officer_Leroy::UpdateAnimation(int *animation, int *frame) { } } -bool AIScript_Officer_Leroy::ChangeAnimationMode(int mode) { +bool AIScriptOfficerLeroy::ChangeAnimationMode(int mode) { int v1; switch (mode) { @@ -1178,21 +1175,21 @@ bool AIScript_Officer_Leroy::ChangeAnimationMode(int mode) { return true; } -void AIScript_Officer_Leroy::QueryAnimationState(int *animationState, int *animationFrame, int *a3, int *a4) { +void AIScriptOfficerLeroy::QueryAnimationState(int *animationState, int *animationFrame, int *a3, int *a4) { *animationState = var_45D5B0_animation_state; *animationFrame = var_45D5B4_animation_frame; *a3 = var_462880; *a4 = var_462884; } -void AIScript_Officer_Leroy::SetAnimationState(int animationState, int animationFrame, int a3, int a4) { +void AIScriptOfficerLeroy::SetAnimationState(int animationState, int animationFrame, int a3, int a4) { var_45D5B0_animation_state = animationState; var_45D5B4_animation_frame = animationFrame; var_462880 = a3; var_462884 = a4; } -bool AIScript_Officer_Leroy::ReachedMovementTrackWaypoint(int waypointId) { +bool AIScriptOfficerLeroy::ReachedMovementTrackWaypoint(int waypointId) { if (waypointId == 57 || waypointId == 58) { sub_431408(); AI_Countdown_Timer_Reset(23, 2); @@ -1201,16 +1198,16 @@ bool AIScript_Officer_Leroy::ReachedMovementTrackWaypoint(int waypointId) { return true; } -void AIScript_Officer_Leroy::FledCombat() { +void AIScriptOfficerLeroy::FledCombat() { Actor_Set_Goal_Number(23, 300); } -bool AIScript_Officer_Leroy::sub_431408() { +bool AIScriptOfficerLeroy::sub_431408() { Game_Flag_Set(199); return true; } -bool AIScript_Officer_Leroy::sub_431420() { +bool AIScriptOfficerLeroy::sub_431420() { Game_Flag_Reset(199); return true; } diff --git a/engines/bladerunner/script/ai_15_runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp index b26339b653..998f385a4f 100644 --- a/engines/bladerunner/script/ai_15_runciter.cpp +++ b/engines/bladerunner/script/ai/runciter.cpp @@ -20,14 +20,11 @@ * */ -#include "bladerunner/script/ai_15_runciter.h" +#include "bladerunner/script/ai.h" namespace BladeRunner { -AIScript_Runciter::AIScript_Runciter(BladeRunnerEngine *vm) - : AIScriptBase(vm) {} - -void AIScript_Runciter::Initialize() { +void AIScriptRunciter::Initialize() { var_45CD70_animation_state = 0; var_45CD74_animation_frame = 0; var_462800 = 0; @@ -39,7 +36,7 @@ void AIScript_Runciter::Initialize() { Actor_Set_Goal_Number(15, 0); } -bool AIScript_Runciter::Update() { +bool AIScriptRunciter::Update() { if (Actor_Query_Goal_Number(15) == 0 && Game_Flag_Query(186)) { Actor_Set_Goal_Number(15, 2); } @@ -49,9 +46,9 @@ bool AIScript_Runciter::Update() { return false; } -void AIScript_Runciter::TimerExpired(int timer) {} +void AIScriptRunciter::TimerExpired(int timer) {} -void AIScript_Runciter::CompletedMovementTrack() { +void AIScriptRunciter::CompletedMovementTrack() { if (Actor_Query_Goal_Number(15) == 1) { if (Player_Query_Current_Scene() == 79) { switch (Random_Query(1, 5)) { @@ -75,17 +72,17 @@ void AIScript_Runciter::CompletedMovementTrack() { //return false; } -void AIScript_Runciter::ReceivedClue(int clueId, int fromActorId) {} +void AIScriptRunciter::ReceivedClue(int clueId, int fromActorId) {} -void AIScript_Runciter::ClickedByPlayer() {} +void AIScriptRunciter::ClickedByPlayer() {} -void AIScript_Runciter::EnteredScene(int sceneId) {} +void AIScriptRunciter::EnteredScene(int sceneId) {} -void AIScript_Runciter::OtherAgentEnteredThisScene(int otherActorId) {} +void AIScriptRunciter::OtherAgentEnteredThisScene(int otherActorId) {} -void AIScript_Runciter::OtherAgentExitedThisScene(int otherActorId) {} +void AIScriptRunciter::OtherAgentExitedThisScene(int otherActorId) {} -void AIScript_Runciter::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { +void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { if (Actor_Query_Goal_Number(15) == 300 && combatMode == 1 && !Game_Flag_Query(705)) { Actor_Set_Targetable(15, true); Actor_Face_Actor(15, 0, true); @@ -133,9 +130,9 @@ void AIScript_Runciter::OtherAgentEnteredCombatMode(int otherActorId, int combat } } -void AIScript_Runciter::ShotAtAndMissed() {} +void AIScriptRunciter::ShotAtAndMissed() {} -void AIScript_Runciter::ShotAtAndHit() { +void AIScriptRunciter::ShotAtAndHit() { Actor_Set_Targetable(15, false); Actor_Change_Animation_Mode(15, 48); Actor_Set_Goal_Number(15, 599); @@ -151,13 +148,13 @@ void AIScript_Runciter::ShotAtAndHit() { Actor_Modify_Friendliness_To_Other(5, 0, 3); } -void AIScript_Runciter::Retired(int byActorId) {} +void AIScriptRunciter::Retired(int byActorId) {} -int AIScript_Runciter::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { +int AIScriptRunciter::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { return 0; } -bool AIScript_Runciter::GoalChanged(int currentGoalNumber, int newGoalNumber) { +bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (newGoalNumber == 0) { Actor_Put_In_Set(15, 16); Actor_Set_At_Waypoint(15, 92, 567); @@ -196,7 +193,7 @@ bool AIScript_Runciter::GoalChanged(int currentGoalNumber, int newGoalNumber) { return false; } -bool AIScript_Runciter::UpdateAnimation(int *animation, int *frame) { +bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) { switch (var_45CD70_animation_state) { case 15: @@ -466,7 +463,7 @@ bool AIScript_Runciter::UpdateAnimation(int *animation, int *frame) { return true; } -bool AIScript_Runciter::ChangeAnimationMode(int mode) { +bool AIScriptRunciter::ChangeAnimationMode(int mode) { switch (mode) { case 23: @@ -614,21 +611,21 @@ bool AIScript_Runciter::ChangeAnimationMode(int mode) { return true; } -void AIScript_Runciter::QueryAnimationState(int *animationState, int *animationFrame, int *a3, int *a4) { +void AIScriptRunciter::QueryAnimationState(int *animationState, int *animationFrame, int *a3, int *a4) { *animationState = var_45CD70_animation_state; *animationFrame = var_45CD74_animation_frame; *a3 = var_462800; *a4 = var_462804; } -void AIScript_Runciter::SetAnimationState(int animationState, int animationFrame, int a3, int a4) { +void AIScriptRunciter::SetAnimationState(int animationState, int animationFrame, int a3, int a4) { var_45CD70_animation_state = animationState; var_45CD74_animation_frame = animationFrame; var_462800 = a3; var_462804 = a4; } -bool AIScript_Runciter::ReachedMovementTrackWaypoint(int waypointId) { +bool AIScriptRunciter::ReachedMovementTrackWaypoint(int waypointId) { switch (waypointId) { case 93: Actor_Face_Heading(15, 1002, true); @@ -651,6 +648,6 @@ bool AIScript_Runciter::ReachedMovementTrackWaypoint(int waypointId) { return true; } -void AIScript_Runciter::FledCombat() {} +void AIScriptRunciter::FledCombat() {} } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ai_00_mccoy.h b/engines/bladerunner/script/ai_00_mccoy.h deleted file mode 100644 index 2fda82f2de..0000000000 --- a/engines/bladerunner/script/ai_00_mccoy.h +++ /dev/null @@ -1,83 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "bladerunner/script/script.h" - -#include "bladerunner/bladerunner.h" - -namespace BladeRunner { -class AIScript_McCoy : public AIScriptBase { - int dword_45A0D0_animation_state; - int dword_45A0D4_animation_frame; - int dword_45A0D8; - int dword_45A0DC; - int dword_45A0E0; - int dword_45A0E4; - float off_45A0EC; - int dword_45A0E8; - int dword_45A0F0; - int dword_45A0F4; - int dword_45A0F8; - int dword_45A0FC; - int dword_462718; - int dword_46271C; - float off_45A100; - float flt_462710; - float flt_462714; - -public: - AIScript_McCoy(BladeRunnerEngine *vm); - - void Initialize(); - bool Update(); - void TimerExpired(int timer); - void CompletedMovementTrack(); - void ReceivedClue(int clueId, int fromActorId); - void ClickedByPlayer(); - void EnteredScene(int sceneId); - void OtherAgentEnteredThisScene(int otherActorId); - void OtherAgentExitedThisScene(int otherActorId); - void OtherAgentEnteredCombatMode(int otherActorId, int combatMode); - void ShotAtAndMissed(); - void ShotAtAndHit(); - void Retired(int byActorId); - int GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId); - bool GoalChanged(int currentGoalNumber, int newGoalNumber); - bool UpdateAnimation(int *animation, int *frame); - bool ChangeAnimationMode(int mode); - void QueryAnimationState(int *animationState, int *a2, int *a3, int *a4); - void SetAnimationState(int animationState, int a2, int a3, int a4); - bool ReachedMovementTrackWaypoint(int a1); - void FledCombat(); - -private: - void sub_4053E0(); - void sub_4054F0(); - void sub_405660(); - void sub_405800(); - void sub_4058B0(); - void sub_405920(); - void sub_405940(float a1); - void sub_4059D0(float a1); - -}; -} // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ai_15_runciter.h b/engines/bladerunner/script/ai_15_runciter.h deleted file mode 100644 index b2cb70d2f8..0000000000 --- a/engines/bladerunner/script/ai_15_runciter.h +++ /dev/null @@ -1,65 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "bladerunner/script/script.h" - -#include "bladerunner/bladerunner.h" - -namespace BladeRunner { - -class AIScript_Runciter : public AIScriptBase { - int var_45CD70_animation_state; - int var_45CD74_animation_frame; - int var_462800; - int var_462804; - int var_45CD78; - int var_45CD7C; - int var_45CD80; - int var_45CD84; - int var_45CD88; -public: - AIScript_Runciter(BladeRunnerEngine *vm); - - void Initialize(); - bool Update(); - void TimerExpired(int timer); - void CompletedMovementTrack(); - void ReceivedClue(int clueId, int fromActorId); - void ClickedByPlayer(); - void EnteredScene(int sceneId); - void OtherAgentEnteredThisScene(int otherActorId); - void OtherAgentExitedThisScene(int otherActorId); - void OtherAgentEnteredCombatMode(int otherActorId, int combatMode); - void ShotAtAndMissed(); - void ShotAtAndHit(); - void Retired(int byActorId); - int GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId); - bool GoalChanged(int currentGoalNumber, int newGoalNumber); - bool UpdateAnimation(int *animation, int *frame); - bool ChangeAnimationMode(int mode); - void QueryAnimationState(int *animationState, int *animationFrame, int *a3, int *a4); - void SetAnimationState(int animationState, int animationFrame, int a3, int a4); - bool ReachedMovementTrackWaypoint(int a1); - void FledCombat(); -}; - -} // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ai_23_officer_leroy.h b/engines/bladerunner/script/ai_23_officer_leroy.h deleted file mode 100644 index c78d80db4e..0000000000 --- a/engines/bladerunner/script/ai_23_officer_leroy.h +++ /dev/null @@ -1,66 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "bladerunner/script/script.h" - -#include "bladerunner/bladerunner.h" - -namespace BladeRunner { - -class AIScript_Officer_Leroy : public AIScriptBase { - int var_45D5B0_animation_state; - int var_45D5B4_animation_frame; - int var_45D5B8; - int var_45D5BC; - int var_462880; - int var_462884; -public: - AIScript_Officer_Leroy(BladeRunnerEngine *vm); - - void Initialize(); - bool Update(); - void TimerExpired(int timer); - void CompletedMovementTrack(); - void ReceivedClue(int clueId, int fromActorId); - void ClickedByPlayer(); - void EnteredScene(int sceneId); - void OtherAgentEnteredThisScene(int otherActorId); - void OtherAgentExitedThisScene(int otherActorId); - void OtherAgentEnteredCombatMode(int otherActorId, int combatMode); - void ShotAtAndMissed(); - void ShotAtAndHit(); - void Retired(int byActorId); - int GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId); - bool GoalChanged(int currentGoalNumber, int newGoalNumber); - bool UpdateAnimation(int *animation, int *frame); - bool ChangeAnimationMode(int mode); - void QueryAnimationState(int *animationState, int *animationFrame, int *a3, int *a4); - void SetAnimationState(int animationState, int animationFrame, int a3, int a4); - bool ReachedMovementTrackWaypoint(int a1); - void FledCombat(); - -private: - bool sub_431408(); - bool sub_431420(); -}; - -} // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene.cpp b/engines/bladerunner/script/scene.cpp new file mode 100644 index 0000000000..1ca6408549 --- /dev/null +++ b/engines/bladerunner/script/scene.cpp @@ -0,0 +1,152 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "bladerunner/script/scene.h" + +namespace BladeRunner { + +bool SceneScript::Open(const Common::String &name) { + delete _currentScript; + + if (name == "RC01") { _currentScript = new SceneScriptRC01(_vm); return true; } + if (name == "RC02") { _currentScript = new SceneScriptRC02(_vm); return true; } + if (name == "RC03") { _currentScript = new SceneScriptRC03(_vm); return true; } + if (name == "RC04") { _currentScript = new SceneScriptRC04(_vm); return true; } + if (name == "RC51") { _currentScript = new SceneScriptRC51(_vm); return true; } + + return false; +} + +SceneScript::~SceneScript() { + delete _currentScript; +} + +void SceneScript::InitializeScene() { + _inScriptCounter++; + _currentScript->InitializeScene(); + _inScriptCounter--; +} + +void SceneScript::SceneLoaded() { + _inScriptCounter++; + _currentScript->SceneLoaded(); + _inScriptCounter--; +} + +bool SceneScript::MouseClick(int x, int y) { + if (_inScriptCounter > 0) + return true; + + _inScriptCounter++; + //MouseX = x; + //MouseY = y; + bool result = _currentScript->MouseClick(x, y); + //SelectedEntity = -1; + _inScriptCounter--; + //MouseX = -1; + //MouseY = -1; + return result; +} + +bool SceneScript::ClickedOn3DObject(const char *objectName, bool a2) { + if (_inScriptCounter > 0) + return true; + + _inScriptCounter++; + bool result = _currentScript->ClickedOn3DObject(objectName, a2); + _inScriptCounter--; + return result; +} + +bool SceneScript::ClickedOnActor(int actorId) { + if (_inScriptCounter > 0) + return true; + + _inScriptCounter++; + bool result = _currentScript->ClickedOnActor(actorId); + _inScriptCounter--; + return result; +} + +bool SceneScript::ClickedOnItem(int itemId, bool a2) { + if (_inScriptCounter > 0) + return true; + + _inScriptCounter++; + bool result = _currentScript->ClickedOnItem(itemId, a2); + _inScriptCounter--; + return result; +} + +bool SceneScript::ClickedOnExit(int exitId) { + if (_inScriptCounter > 0) + return true; + + _inScriptCounter++; + bool result = _currentScript->ClickedOnExit(exitId); + _inScriptCounter--; + return result; +} + +bool SceneScript::ClickedOn2DRegion(int region) { + if (_inScriptCounter > 0) + return true; + + _inScriptCounter++; + bool result = _currentScript->ClickedOn2DRegion(region); + _inScriptCounter--; + return result; +} + +void SceneScript::SceneFrameAdvanced(int frame) { + _inScriptCounter++; + _currentScript->SceneFrameAdvanced(frame); + _inScriptCounter--; +} + +void SceneScript::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { + _inScriptCounter++; + //TODO remove this check + if(_currentScript) + _currentScript->ActorChangedGoal(actorId, newGoal, oldGoal, currentSet); + _inScriptCounter--; +} + +void SceneScript::PlayerWalkedIn() { + _inScriptCounter++; + _currentScript->PlayerWalkedIn(); + _inScriptCounter--; +} + +void SceneScript::PlayerWalkedOut() { + _inScriptCounter++; + _currentScript->PlayerWalkedOut(); + _inScriptCounter--; +} + +void SceneScript::DialogueQueueFlushed(int a1) { + _inScriptCounter++; + _currentScript->DialogueQueueFlushed(a1); + _inScriptCounter--; +} + +} // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene.h b/engines/bladerunner/script/scene.h new file mode 100644 index 0000000000..0d4f574caa --- /dev/null +++ b/engines/bladerunner/script/scene.h @@ -0,0 +1,559 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef BLADERUNNER_SCRIPT_SCENE_H +#define BLADERUNNER_SCRIPT_SCENE_H + +#include "bladerunner/script/script.h" + +namespace BladeRunner { + +class BladeRunnerEngine; + +class SceneScriptBase : public ScriptBase { +public: + SceneScriptBase(BladeRunnerEngine *vm) : ScriptBase(vm) {} + + virtual void InitializeScene() = 0; + virtual void SceneLoaded() = 0; + virtual bool MouseClick(int x, int y) = 0; + virtual bool ClickedOn3DObject(const char *objectName, bool a2) = 0; + virtual bool ClickedOnActor(int actorId) = 0; + virtual bool ClickedOnItem(int itemId, bool a2) = 0; + virtual bool ClickedOnExit(int exitId) = 0; + virtual bool ClickedOn2DRegion(int region) = 0; + virtual void SceneFrameAdvanced(int frame) = 0; + virtual void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) = 0; + virtual void PlayerWalkedIn() = 0; + virtual void PlayerWalkedOut() = 0; + virtual void DialogueQueueFlushed(int a1) = 0; +}; + +#define DECLARE_SCRIPT(name) \ +class SceneScript##name : public SceneScriptBase { \ +public: \ + SceneScript##name(BladeRunnerEngine *vm) \ + : SceneScriptBase(vm) \ + {} \ + void InitializeScene(); \ + void SceneLoaded(); \ + bool MouseClick(int x, int y); \ + bool ClickedOn3DObject(const char *objectName, bool a2); \ + bool ClickedOnActor(int actorId); \ + bool ClickedOnItem(int itemId, bool a2); \ + bool ClickedOnExit(int exitId); \ + bool ClickedOn2DRegion(int region); \ + void SceneFrameAdvanced(int frame); \ + void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); \ + void PlayerWalkedIn(); \ + void PlayerWalkedOut(); \ + void DialogueQueueFlushed(int a1); \ +private: +#define END_SCRIPT }; + +DECLARE_SCRIPT(AR01) +END_SCRIPT + +DECLARE_SCRIPT(AR02) + void sub_402694(); + void sub_402AE0(); + void sub_402CE4(); +END_SCRIPT + +DECLARE_SCRIPT(BB01) +END_SCRIPT + +DECLARE_SCRIPT(BB02) +END_SCRIPT + +DECLARE_SCRIPT(BB03) +END_SCRIPT + +DECLARE_SCRIPT(BB04) +END_SCRIPT + +DECLARE_SCRIPT(BB05) +END_SCRIPT + +DECLARE_SCRIPT(BB06) +END_SCRIPT + +DECLARE_SCRIPT(BB07) +END_SCRIPT + +DECLARE_SCRIPT(BB08) +END_SCRIPT + +DECLARE_SCRIPT(BB09) +END_SCRIPT + +DECLARE_SCRIPT(BB10) +END_SCRIPT + +DECLARE_SCRIPT(BB11) +END_SCRIPT + +DECLARE_SCRIPT(BB12) +END_SCRIPT + +DECLARE_SCRIPT(BB51) +END_SCRIPT + +DECLARE_SCRIPT(CT01) + void sub_40269C(); +END_SCRIPT + +DECLARE_SCRIPT(CT02) + void sub_401ACC(); +END_SCRIPT + +DECLARE_SCRIPT(CT03) +END_SCRIPT + +DECLARE_SCRIPT(CT04) + void sub_401D4C(); +END_SCRIPT + +DECLARE_SCRIPT(CT05) +END_SCRIPT + +DECLARE_SCRIPT(CT06) +END_SCRIPT + +DECLARE_SCRIPT(CT07) +END_SCRIPT + +DECLARE_SCRIPT(CT08) +END_SCRIPT + +DECLARE_SCRIPT(CT09) +END_SCRIPT + +DECLARE_SCRIPT(CT10) + void sub_401844(); +END_SCRIPT + +DECLARE_SCRIPT(CT11) +END_SCRIPT + +DECLARE_SCRIPT(CT12) +END_SCRIPT + +DECLARE_SCRIPT(CT51) +END_SCRIPT + +DECLARE_SCRIPT(DR01) +END_SCRIPT + +DECLARE_SCRIPT(DR02) +END_SCRIPT + +DECLARE_SCRIPT(DR03) + void sub_401B18(); +END_SCRIPT + +DECLARE_SCRIPT(DR04) + bool sub_401160(); +END_SCRIPT + +DECLARE_SCRIPT(DR05) +END_SCRIPT + +DECLARE_SCRIPT(DR06) +END_SCRIPT + +DECLARE_SCRIPT(HC01) + void sub_402384(); + void sub_40346C(); +END_SCRIPT + +DECLARE_SCRIPT(HC02) +END_SCRIPT + +DECLARE_SCRIPT(HC03) +END_SCRIPT + +DECLARE_SCRIPT(HC04) + void sub_401B90(); +END_SCRIPT + +DECLARE_SCRIPT(HF01) + void sub_4026B4(); + void sub_4032DC(); + void sub_403484(); +END_SCRIPT + +DECLARE_SCRIPT(HF02) +END_SCRIPT + +DECLARE_SCRIPT(HF03) + void sub_401C80(); +END_SCRIPT + +DECLARE_SCRIPT(HF04) +END_SCRIPT + +DECLARE_SCRIPT(HF05) + void sub_402370(); + void sub_402970(); + void sub_402AE4(); + void sub_403738(); + void sub_403A34(int actorId); + void sub_403F0C(); + void sub_40410C(); + void sub_4042E4(); + void sub_404474(); + int sub_404858(); + int sub_4048C0(); +END_SCRIPT + +DECLARE_SCRIPT(HF06) + void sub_401EF4(); + void sub_4023E0(); +END_SCRIPT + +DECLARE_SCRIPT(HF07) + int sub_401864(); +END_SCRIPT + +DECLARE_SCRIPT(KP01) +END_SCRIPT + +DECLARE_SCRIPT(KP02) +END_SCRIPT + +DECLARE_SCRIPT(KP03) + void sub_401E54(); +END_SCRIPT + +DECLARE_SCRIPT(KP04) +END_SCRIPT + +DECLARE_SCRIPT(KP05) +END_SCRIPT + +DECLARE_SCRIPT(KP06) +END_SCRIPT + +DECLARE_SCRIPT(KP07) +END_SCRIPT + +DECLARE_SCRIPT(MA01) +END_SCRIPT + +DECLARE_SCRIPT(MA02) + void sub_401E4C(); + bool sub_401F7C(); + void sub_402044(); +END_SCRIPT + +//MA03 does not exists + +DECLARE_SCRIPT(MA04) + bool sub_402758(); + bool sub_402820(); + bool sub_402888(); + void sub_4028A8(); + void sub_402F2C(); + void sub_4032A0(); + void sub_4034D8(); + void sub_403864(); + void sub_403DA8(); +END_SCRIPT + +DECLARE_SCRIPT(MA05) + bool sub_401990(); +END_SCRIPT + +DECLARE_SCRIPT(MA06) + bool sub_4012C0(); + void sub_4014E4(); +END_SCRIPT + +DECLARE_SCRIPT(MA07) +END_SCRIPT + +DECLARE_SCRIPT(MA08) +END_SCRIPT + +DECLARE_SCRIPT(NR01) +END_SCRIPT + +DECLARE_SCRIPT(NR02) + void sub_402134(); +END_SCRIPT + +DECLARE_SCRIPT(NR03) + void sub_40259C(int frame); + void sub_402994(); +END_SCRIPT + +DECLARE_SCRIPT(NR04) + void sub_401DB0(); + void sub_402860(int frame); + void sub_402960(); +END_SCRIPT + +DECLARE_SCRIPT(NR05) + void sub_401F74(int frame); + void sub_4020B4(); + void sub_4022DC(); + void sub_402A48(int actorId); + void sub_402B9C(); +END_SCRIPT + +DECLARE_SCRIPT(NR06) + void sub_401BAC(); +END_SCRIPT + +DECLARE_SCRIPT(NR07) + void sub_4018D4(); + void sub_401A10(); + void sub_401C60(); + void sub_401EF4(); + void sub_4020F0(); + void sub_402284(); + void sub_402510(); + void sub_402614(); + void sub_402738(); + void sub_4028FC(); +END_SCRIPT + +DECLARE_SCRIPT(NR08) + void sub_4021B4(); +END_SCRIPT + +DECLARE_SCRIPT(NR09) + void sub_40172C(); +END_SCRIPT + +DECLARE_SCRIPT(NR10) +END_SCRIPT + +DECLARE_SCRIPT(NR11) + void sub_4027D0(int actorId, signed int frame); + void sub_4028EC(); +END_SCRIPT + +DECLARE_SCRIPT(PS01) +END_SCRIPT + +DECLARE_SCRIPT(PS02) + void sub_4018BC(); +END_SCRIPT + +DECLARE_SCRIPT(PS03) +END_SCRIPT + +DECLARE_SCRIPT(PS04) + void sub_4017E4(); +END_SCRIPT + +DECLARE_SCRIPT(PS05) + void sub_401B34(); + void sub_401C30(); +END_SCRIPT + +DECLARE_SCRIPT(PS06) +END_SCRIPT + +DECLARE_SCRIPT(PS07) + void sub_401D60(); +END_SCRIPT + +// PS08 does not exits + +DECLARE_SCRIPT(PS09) + void sub_402090(); +END_SCRIPT + +DECLARE_SCRIPT(PS10) + void sub_402238(); +END_SCRIPT + +DECLARE_SCRIPT(PS11) + void sub_402744(); +END_SCRIPT + +DECLARE_SCRIPT(PS12) + void sub_4028C4(); +END_SCRIPT + +DECLARE_SCRIPT(PS13) + void sub_40267C(); +END_SCRIPT + +DECLARE_SCRIPT(PS14) +END_SCRIPT + +DECLARE_SCRIPT(PS15) +END_SCRIPT + +DECLARE_SCRIPT(RC01) + void sub_403850(); + void sub_4037AC(); +END_SCRIPT + +DECLARE_SCRIPT(RC02) + void sub_402A7C(); +END_SCRIPT + +DECLARE_SCRIPT(RC03) + void sub_402834(); +END_SCRIPT + +DECLARE_SCRIPT(RC04) + void sub_401DF4(); +END_SCRIPT + +DECLARE_SCRIPT(RC51) +END_SCRIPT + +DECLARE_SCRIPT(TB02) + void sub_402644(); + void sub_402B50(); +END_SCRIPT + +DECLARE_SCRIPT(TB03) +END_SCRIPT + +DECLARE_SCRIPT(TB05) +END_SCRIPT + +DECLARE_SCRIPT(TB06) +END_SCRIPT + +DECLARE_SCRIPT(TB07) + void sub_401B0C(); +END_SCRIPT + +DECLARE_SCRIPT(UG01) +END_SCRIPT + +DECLARE_SCRIPT(UG02) + bool sub_402354(); +END_SCRIPT + +DECLARE_SCRIPT(UG03) +END_SCRIPT + +DECLARE_SCRIPT(UG04) +END_SCRIPT + +DECLARE_SCRIPT(UG05) + int sub_4021B0(); + void sub_402218(); +END_SCRIPT + +DECLARE_SCRIPT(UG06) +END_SCRIPT + +DECLARE_SCRIPT(UG07) +END_SCRIPT + +DECLARE_SCRIPT(UG08) +END_SCRIPT + +DECLARE_SCRIPT(UG09) +END_SCRIPT + +DECLARE_SCRIPT(UG10) +END_SCRIPT + +// UG11 does not exists + +DECLARE_SCRIPT(UG12) +END_SCRIPT + +DECLARE_SCRIPT(UG13) + void sub_40223C(); + void sub_4023D8(); + void sub_4025E0(); + void sub_402960(); + int sub_402AD0(); + void sub_402AD4(); + void sub_402E24(); +END_SCRIPT + +DECLARE_SCRIPT(UG14) +END_SCRIPT + +DECLARE_SCRIPT(UG15) +END_SCRIPT + +DECLARE_SCRIPT(UG16) + void sub_401D78(); +END_SCRIPT + +DECLARE_SCRIPT(UG17) +END_SCRIPT + +DECLARE_SCRIPT(UG18) + void sub_402734(); + void sub_402DE8(); + void sub_402F8C(); + void sub_403114(); + void sub_403278(); + void sub_403588(); +END_SCRIPT + +DECLARE_SCRIPT(UG19) +END_SCRIPT + +#undef DECLARE_SCRIPT +#undef END_SCRIPT + +class SceneScript { +protected: + BladeRunnerEngine *_vm; + int _inScriptCounter; + SceneScriptBase *_currentScript; + +public: + SceneScript(BladeRunnerEngine *vm) + : _vm(vm), + _inScriptCounter(0), + _currentScript(nullptr) { + } + ~SceneScript(); + + bool Open(const Common::String &name); + + void InitializeScene(); + void SceneLoaded(); + bool MouseClick(int x, int y); + bool ClickedOn3DObject(const char *objectName, bool a2); + bool ClickedOnActor(int actorId); + bool ClickedOnItem(int itemId, bool a2); + bool ClickedOnExit(int exitId); + bool ClickedOn2DRegion(int region); + void SceneFrameAdvanced(int frame); + void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); + void PlayerWalkedIn(); + void PlayerWalkedOut(); + void DialogueQueueFlushed(int a1); + bool IsInsideScript() { return _inScriptCounter > 0; } +}; + +} // End of namespace BladeRunner + +#endif diff --git a/engines/bladerunner/script/ar01.cpp b/engines/bladerunner/script/scene/ar01.cpp index dda8a8c3b9..757ec35c55 100644 --- a/engines/bladerunner/script/ar01.cpp +++ b/engines/bladerunner/script/scene/ar01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptAR01::InitializeScene() { +void SceneScriptAR01::InitializeScene() { Music_Play(0, 25, 0, 2, -1, 1, 2); if (Game_Flag_Query(323)) { Setup_Scene_Information(-477.0f, 0.0f, -149.0f, 333); @@ -89,20 +89,20 @@ void ScriptAR01::InitializeScene() { } } -void ScriptAR01::SceneLoaded() { +void SceneScriptAR01::SceneLoaded() { Obstacle_Object("DF_BOOTH", true); Unobstacle_Object("SPINNER BODY", true); } -bool ScriptAR01::MouseClick(int x, int y) { +bool SceneScriptAR01::MouseClick(int x, int y) { return false; } -bool ScriptAR01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptAR01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptAR01::ClickedOnActor(int actorId) { +bool SceneScriptAR01::ClickedOnActor(int actorId) { if (actorId == 16 || actorId == 20) { Actor_Face_Actor(0, actorId, true); Actor_Says(0, 8910, 14); @@ -160,11 +160,11 @@ bool ScriptAR01::ClickedOnActor(int actorId) { return false; } -bool ScriptAR01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptAR01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptAR01::ClickedOnExit(int exitId) { +bool SceneScriptAR01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -358.0, 0.0, -149.0, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(0, -477.0, 0.0, -149.0, 0, 0, false, 0); @@ -299,11 +299,11 @@ bool ScriptAR01::ClickedOnExit(int exitId) { return false; } -bool ScriptAR01::ClickedOn2DRegion(int region) { +bool SceneScriptAR01::ClickedOn2DRegion(int region) { return false; } -void ScriptAR01::SceneFrameAdvanced(int frame) { +void SceneScriptAR01::SceneFrameAdvanced(int frame) { if (frame == 16) { Ambient_Sounds_Play_Sound(118, 40, 0, 0, 99); } @@ -325,10 +325,10 @@ void ScriptAR01::SceneFrameAdvanced(int frame) { } } -void ScriptAR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptAR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptAR01::PlayerWalkedIn() { +void SceneScriptAR01::PlayerWalkedIn() { if (!Game_Flag_Query(710)) { Game_Flag_Set(710); } @@ -341,7 +341,7 @@ void ScriptAR01::PlayerWalkedIn() { } } -void ScriptAR01::PlayerWalkedOut() { +void SceneScriptAR01::PlayerWalkedOut() { Actor_Set_Invisible(0, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -355,7 +355,7 @@ void ScriptAR01::PlayerWalkedOut() { } } -void ScriptAR01::DialogueQueueFlushed(int a1) { +void SceneScriptAR01::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ar02.cpp b/engines/bladerunner/script/scene/ar02.cpp index 220402794e..0e754b3c24 100644 --- a/engines/bladerunner/script/ar02.cpp +++ b/engines/bladerunner/script/scene/ar02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptAR02::InitializeScene() { +void SceneScriptAR02::InitializeScene() { Music_Play(0, 22, 0, 2, -1, 1, 2); if (Game_Flag_Query(116)) { Setup_Scene_Information(-560.0f, 0.0f, -799.0f, 333); @@ -75,7 +75,7 @@ void ScriptAR02::InitializeScene() { } } -void ScriptAR02::SceneLoaded() { +void SceneScriptAR02::SceneLoaded() { Obstacle_Object("DF_BOOTH", true); if (!Game_Flag_Query(374)) { Item_Add_To_World(106, 976, 0, -442.84f, 36.77f, -1144.51f, 360, 36, 36, false, true, false, true); @@ -86,15 +86,15 @@ void ScriptAR02::SceneLoaded() { } } -bool ScriptAR02::MouseClick(int x, int y) { +bool SceneScriptAR02::MouseClick(int x, int y) { return Region_Check(250, 215, 325, 260); } -bool ScriptAR02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptAR02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptAR02::ClickedOnActor(int actorId) { +bool SceneScriptAR02::ClickedOnActor(int actorId) { if (actorId == 16) { if (!Loop_Actor_Walk_To_XYZ(0, -386.96f, 0.0f, -1078.45f, 12, 1, false, 0)) { Actor_Face_Actor(0, 16, true); @@ -169,7 +169,7 @@ bool ScriptAR02::ClickedOnActor(int actorId) { return false; } -bool ScriptAR02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptAR02::ClickedOnItem(int itemId, bool a2) { if (itemId == 106) { if (!Loop_Actor_Walk_To_XYZ(0, -386.96f, 0.0f, -1078.45f, 12, 1, false, 0)) { Actor_Face_Actor(0, 16, true); @@ -196,7 +196,7 @@ bool ScriptAR02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptAR02::ClickedOnExit(int exitId) { +bool SceneScriptAR02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -182.0f, 0.0f, -551.0f, 0, 1, false, 0)) { Game_Flag_Set(321); @@ -219,17 +219,17 @@ bool ScriptAR02::ClickedOnExit(int exitId) { return false; } -bool ScriptAR02::ClickedOn2DRegion(int region) { +bool SceneScriptAR02::ClickedOn2DRegion(int region) { return false; } -void ScriptAR02::SceneFrameAdvanced(int frame) { +void SceneScriptAR02::SceneFrameAdvanced(int frame) { } -void ScriptAR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptAR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptAR02::PlayerWalkedIn() { +void SceneScriptAR02::PlayerWalkedIn() { if (Game_Flag_Query(116) == 1) { Loop_Actor_Walk_To_XYZ(0, -465.0f, 0.0f, -799.0f, 0, 0, false, 0); Game_Flag_Reset(116); @@ -237,15 +237,15 @@ void ScriptAR02::PlayerWalkedIn() { Game_Flag_Set(726); } -void ScriptAR02::PlayerWalkedOut() { +void SceneScriptAR02::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptAR02::DialogueQueueFlushed(int a1) { +void SceneScriptAR02::DialogueQueueFlushed(int a1) { } -void ScriptAR02::sub_402694() { +void SceneScriptAR02::sub_402694() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 44) || Actor_Clue_Query(0, 47)) { DM_Add_To_List_Never_Repeat_Once_Selected(490, 3, 5, 5); @@ -297,7 +297,7 @@ void ScriptAR02::sub_402694() { } } -void ScriptAR02::sub_402AE0() { +void SceneScriptAR02::sub_402AE0() { Dialogue_Menu_Clear_List(); if (Global_Variable_Query(2) >= 15 || Query_Difficulty_Level() == 0) { DM_Add_To_List_Never_Repeat_Once_Selected(530, 7, 5, 3); @@ -324,7 +324,7 @@ void ScriptAR02::sub_402AE0() { } } -void ScriptAR02::sub_402CE4() { +void SceneScriptAR02::sub_402CE4() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 93)) { DM_Add_To_List_Never_Repeat_Once_Selected(550, 8, 5, 2); diff --git a/engines/bladerunner/script/bb01.cpp b/engines/bladerunner/script/scene/bb01.cpp index 6024a42b09..25abb5bcda 100644 --- a/engines/bladerunner/script/bb01.cpp +++ b/engines/bladerunner/script/scene/bb01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB01::InitializeScene() { +void SceneScriptBB01::InitializeScene() { if (Game_Flag_Query(265)) { Setup_Scene_Information(-253.0f, 9.0f, 715.0f, 266); } else if (Game_Flag_Query(263)) { @@ -63,27 +63,27 @@ void ScriptBB01::InitializeScene() { } } -void ScriptBB01::SceneLoaded() { +void SceneScriptBB01::SceneLoaded() { Obstacle_Object("COLUME", true); } -bool ScriptBB01::MouseClick(int x, int y) { +bool SceneScriptBB01::MouseClick(int x, int y) { return false; } -bool ScriptBB01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB01::ClickedOnActor(int actorId) { +bool SceneScriptBB01::ClickedOnActor(int actorId) { return false; } -bool ScriptBB01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB01::ClickedOnExit(int exitId) { +bool SceneScriptBB01::ClickedOnExit(int exitId) { if (exitId == 0) { Loop_Actor_Walk_To_XYZ(0, -140.0f, 9.0f, 818.0f, 0, 1, false, 0); if (!Loop_Actor_Walk_To_XYZ(0, -233.0f, 9.0f, 846.0f, 0, 1, false, 0)) { @@ -184,11 +184,11 @@ bool ScriptBB01::ClickedOnExit(int exitId) { return false; } -bool ScriptBB01::ClickedOn2DRegion(int region) { +bool SceneScriptBB01::ClickedOn2DRegion(int region) { return false; } -void ScriptBB01::SceneFrameAdvanced(int frame) { +void SceneScriptBB01::SceneFrameAdvanced(int frame) { if (frame == 193) { Sound_Play(118, 40, 0, 0, 50); } @@ -206,10 +206,10 @@ void ScriptBB01::SceneFrameAdvanced(int frame) { } } -void ScriptBB01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB01::PlayerWalkedIn() { +void SceneScriptBB01::PlayerWalkedIn() { Spinner_Set_Selectable_Destination_Flag(7, 1); if (Game_Flag_Query(265)) { Game_Flag_Reset(265); @@ -220,12 +220,12 @@ void ScriptBB01::PlayerWalkedIn() { } } -void ScriptBB01::PlayerWalkedOut() { +void SceneScriptBB01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptBB01::DialogueQueueFlushed(int a1) { +void SceneScriptBB01::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb02.cpp b/engines/bladerunner/script/scene/bb02.cpp index 0fa6b0c237..7b43ff4bb1 100644 --- a/engines/bladerunner/script/bb02.cpp +++ b/engines/bladerunner/script/scene/bb02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB02::InitializeScene() { +void SceneScriptBB02::InitializeScene() { if (Game_Flag_Query(281)) { Setup_Scene_Information(179.0f, -415.06f, 274.0f, 904); } else if (Game_Flag_Query(333)) { @@ -65,28 +65,28 @@ void ScriptBB02::InitializeScene() { } } -void ScriptBB02::SceneLoaded() { +void SceneScriptBB02::SceneLoaded() { Obstacle_Object("ELEVATOR01", true); Obstacle_Object("U2 DOOR", true); } -bool ScriptBB02::MouseClick(int x, int y) { +bool SceneScriptBB02::MouseClick(int x, int y) { return false; } -bool ScriptBB02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB02::ClickedOnActor(int actorId) { +bool SceneScriptBB02::ClickedOnActor(int actorId) { return false; } -bool ScriptBB02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB02::ClickedOnExit(int exitId) { +bool SceneScriptBB02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 98.0f, -415.06f, -593.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -121,11 +121,11 @@ bool ScriptBB02::ClickedOnExit(int exitId) { return false; } -bool ScriptBB02::ClickedOn2DRegion(int region) { +bool SceneScriptBB02::ClickedOn2DRegion(int region) { return false; } -void ScriptBB02::SceneFrameAdvanced(int frame) { +void SceneScriptBB02::SceneFrameAdvanced(int frame) { if (frame == 1) { Ambient_Sounds_Play_Sound(434, 40, -50, -50, 0); } @@ -134,10 +134,10 @@ void ScriptBB02::SceneFrameAdvanced(int frame) { } } -void ScriptBB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB02::PlayerWalkedIn() { +void SceneScriptBB02::PlayerWalkedIn() { if (Game_Flag_Query(281)) { Loop_Actor_Walk_To_XYZ(0, 86.0f, -415.06f, 174.0f, 0, 0, false, 0); Game_Flag_Reset(281); @@ -148,12 +148,12 @@ void ScriptBB02::PlayerWalkedIn() { } } -void ScriptBB02::PlayerWalkedOut() { +void SceneScriptBB02::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptBB02::DialogueQueueFlushed(int a1) { +void SceneScriptBB02::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb03.cpp b/engines/bladerunner/script/scene/bb03.cpp index 7307c5c3a1..db2747fac1 100644 --- a/engines/bladerunner/script/bb03.cpp +++ b/engines/bladerunner/script/scene/bb03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB03::InitializeScene() { +void SceneScriptBB03::InitializeScene() { Setup_Scene_Information(20.0f, 60.16f, 0.0f, 0); Game_Flag_Reset(282); if (Game_Flag_Query(284)) { @@ -61,28 +61,28 @@ void ScriptBB03::InitializeScene() { Ambient_Sounds_Add_Sound(74, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0); } -void ScriptBB03::SceneLoaded() { +void SceneScriptBB03::SceneLoaded() { Obstacle_Object("BACKWALL", true); Unobstacle_Object("BOX08", true); } -bool ScriptBB03::MouseClick(int x, int y) { +bool SceneScriptBB03::MouseClick(int x, int y) { return false; } -bool ScriptBB03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB03::ClickedOnActor(int actorId) { +bool SceneScriptBB03::ClickedOnActor(int actorId) { return false; } -bool ScriptBB03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB03::ClickedOnExit(int exitId) { +bool SceneScriptBB03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 176.0f, 60.16f, -64.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(0, 176.0f, 60.16f, 0.0f, 0, 0, false, 0); @@ -131,17 +131,17 @@ bool ScriptBB03::ClickedOnExit(int exitId) { return false; } -bool ScriptBB03::ClickedOn2DRegion(int region) { +bool SceneScriptBB03::ClickedOn2DRegion(int region) { return false; } -void ScriptBB03::SceneFrameAdvanced(int frame) { +void SceneScriptBB03::SceneFrameAdvanced(int frame) { } -void ScriptBB03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB03::PlayerWalkedIn() { +void SceneScriptBB03::PlayerWalkedIn() { if (Game_Flag_Query(286)) { Loop_Actor_Walk_To_XYZ(0, 164.0f, 60.16f, -164.0f, 0, 0, false, 0); Game_Flag_Reset(286); @@ -152,10 +152,10 @@ void ScriptBB03::PlayerWalkedIn() { } } -void ScriptBB03::PlayerWalkedOut() { +void SceneScriptBB03::PlayerWalkedOut() { } -void ScriptBB03::DialogueQueueFlushed(int a1) { +void SceneScriptBB03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp index b99ea5004d..3d7134c72f 100644 --- a/engines/bladerunner/script/bb04.cpp +++ b/engines/bladerunner/script/scene/bb04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB04::InitializeScene() { +void SceneScriptBB04::InitializeScene() { if (Game_Flag_Query(283)) { Setup_Scene_Information(-107.0f, -26.6f, 397.0f, 29); Game_Flag_Reset(283); @@ -58,27 +58,27 @@ void ScriptBB04::InitializeScene() { Ambient_Sounds_Add_Sound(74, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0); } -void ScriptBB04::SceneLoaded() { +void SceneScriptBB04::SceneLoaded() { Obstacle_Object("DH TRASH", true); } -bool ScriptBB04::MouseClick(int x, int y) { +bool SceneScriptBB04::MouseClick(int x, int y) { return false; } -bool ScriptBB04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB04::ClickedOnActor(int actorId) { +bool SceneScriptBB04::ClickedOnActor(int actorId) { return false; } -bool ScriptBB04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB04::ClickedOnExit(int exitId) { +bool SceneScriptBB04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -92.0f, -26.6f, 45.0f, 0, 1, false, 0)) { Player_Loses_Control(); @@ -103,17 +103,17 @@ bool ScriptBB04::ClickedOnExit(int exitId) { return false; } -bool ScriptBB04::ClickedOn2DRegion(int region) { +bool SceneScriptBB04::ClickedOn2DRegion(int region) { return false; } -void ScriptBB04::SceneFrameAdvanced(int frame) { +void SceneScriptBB04::SceneFrameAdvanced(int frame) { } -void ScriptBB04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB04::PlayerWalkedIn() { +void SceneScriptBB04::PlayerWalkedIn() { if (Game_Flag_Query(332)) { Loop_Actor_Walk_To_XYZ(0, -92.0f, -26.6f, 45.0f, 0, 0, false, 0); Player_Gains_Control(); @@ -121,10 +121,10 @@ void ScriptBB04::PlayerWalkedIn() { } } -void ScriptBB04::PlayerWalkedOut() { +void SceneScriptBB04::PlayerWalkedOut() { } -void ScriptBB04::DialogueQueueFlushed(int a1) { +void SceneScriptBB04::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb05.cpp b/engines/bladerunner/script/scene/bb05.cpp index aff2f7bdc6..d01054b8d1 100644 --- a/engines/bladerunner/script/bb05.cpp +++ b/engines/bladerunner/script/scene/bb05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB05::InitializeScene() { +void SceneScriptBB05::InitializeScene() { if (Game_Flag_Query(298)) { Setup_Scene_Information(95.0f, -60.31f, 331.0f, 0); } else if (Game_Flag_Query(302)) { @@ -63,7 +63,7 @@ void ScriptBB05::InitializeScene() { } } -void ScriptBB05::SceneLoaded() { +void SceneScriptBB05::SceneLoaded() { Obstacle_Object("PINHEAD", true); Obstacle_Object("X2WALLS&MOLDNG05", true); Obstacle_Object("QUADPATCH04", true); @@ -79,23 +79,23 @@ void ScriptBB05::SceneLoaded() { } } -bool ScriptBB05::MouseClick(int x, int y) { +bool SceneScriptBB05::MouseClick(int x, int y) { return false; } -bool ScriptBB05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB05::ClickedOnActor(int actorId) { +bool SceneScriptBB05::ClickedOnActor(int actorId) { return false; } -bool ScriptBB05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB05::ClickedOnExit(int exitId) { +bool SceneScriptBB05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -212.0f, -60.31f, 131.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -135,17 +135,17 @@ bool ScriptBB05::ClickedOnExit(int exitId) { return false; } -bool ScriptBB05::ClickedOn2DRegion(int region) { +bool SceneScriptBB05::ClickedOn2DRegion(int region) { return false; } -void ScriptBB05::SceneFrameAdvanced(int frame) { +void SceneScriptBB05::SceneFrameAdvanced(int frame) { } -void ScriptBB05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB05::PlayerWalkedIn() { +void SceneScriptBB05::PlayerWalkedIn() { if (Game_Flag_Query(298)) { Loop_Actor_Walk_To_XYZ(0, 95.0f, -60.31f, 303.0f, 0, 0, false, 0); Game_Flag_Reset(298); @@ -204,10 +204,10 @@ void ScriptBB05::PlayerWalkedIn() { } } -void ScriptBB05::PlayerWalkedOut() { +void SceneScriptBB05::PlayerWalkedOut() { } -void ScriptBB05::DialogueQueueFlushed(int a1) { +void SceneScriptBB05::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp index 66c9a85d3c..48d983d74a 100644 --- a/engines/bladerunner/script/bb06.cpp +++ b/engines/bladerunner/script/scene/bb06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB06::InitializeScene() { +void SceneScriptBB06::InitializeScene() { if (Game_Flag_Query(394)) { Setup_Scene_Information(76.0f, 0.0f, 79.0f, 622); } else if (Game_Flag_Query(395)) { @@ -64,17 +64,17 @@ void ScriptBB06::InitializeScene() { } } -void ScriptBB06::SceneLoaded() { +void SceneScriptBB06::SceneLoaded() { Obstacle_Object("V2CHESSTBL01", true); Clickable_Object("BOX31"); Item_Add_To_World(77, 931, 2, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true); } -bool ScriptBB06::MouseClick(int x, int y) { +bool SceneScriptBB06::MouseClick(int x, int y) { return false; } -bool ScriptBB06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB06::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BOX31", objectName)) { if (!Loop_Actor_Walk_To_Scene_Object(0, "BOX31", 24, 1, false)) { Actor_Face_Object(0, "BOX31", true); @@ -89,11 +89,11 @@ bool ScriptBB06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB06::ClickedOnActor(int actorId) { +bool SceneScriptBB06::ClickedOnActor(int actorId) { return false; } -bool ScriptBB06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) { if (itemId == 77) { if (Player_Query_Combat_Mode()) { Overlay_Play("BB06OVER", 1, 1, 1, 0); @@ -105,7 +105,7 @@ bool ScriptBB06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB06::ClickedOnExit(int exitId) { +bool SceneScriptBB06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -37.0f, 0.0f, 178.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -136,11 +136,11 @@ bool ScriptBB06::ClickedOnExit(int exitId) { return false; } -bool ScriptBB06::ClickedOn2DRegion(int region) { +bool SceneScriptBB06::ClickedOn2DRegion(int region) { return false; } -void ScriptBB06::SceneFrameAdvanced(int frame) { +void SceneScriptBB06::SceneFrameAdvanced(int frame) { if (frame == 34) { Ambient_Sounds_Play_Sound(447, 40, -50, -50, 10); } @@ -158,20 +158,20 @@ void ScriptBB06::SceneFrameAdvanced(int frame) { } } -void ScriptBB06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB06::PlayerWalkedIn() { +void SceneScriptBB06::PlayerWalkedIn() { if (Game_Flag_Query(297)) { Loop_Actor_Walk_To_XYZ(0, -36.0f, 0.0f, 145.0f, 0, 0, false, 0); Game_Flag_Reset(297); } } -void ScriptBB06::PlayerWalkedOut() { +void SceneScriptBB06::PlayerWalkedOut() { } -void ScriptBB06::DialogueQueueFlushed(int a1) { +void SceneScriptBB06::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb07.cpp b/engines/bladerunner/script/scene/bb07.cpp index 7b9b4aea1f..f088732675 100644 --- a/engines/bladerunner/script/bb07.cpp +++ b/engines/bladerunner/script/scene/bb07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB07::InitializeScene() { +void SceneScriptBB07::InitializeScene() { if (Game_Flag_Query(365)) { Setup_Scene_Information(-655.0f, 252.59f, -1136.0f, 323); } else if (Game_Flag_Query(363)) { @@ -54,17 +54,17 @@ void ScriptBB07::InitializeScene() { Overlay_Play("BB07OVER", 0, 1, 0, 0); } -void ScriptBB07::SceneLoaded() { +void SceneScriptBB07::SceneLoaded() { Obstacle_Object("COUCH", true); Unobstacle_Object("X2MAINWALLLEFT01", true); Clickable_Object("PRINTER"); } -bool ScriptBB07::MouseClick(int x, int y) { +bool SceneScriptBB07::MouseClick(int x, int y) { return false; } -bool ScriptBB07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB07::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("PRINTER", objectName)) { if (!Loop_Actor_Walk_To_XYZ(0, -472.63f, 252.59f, -1086.81f, 0, 0, false, 0)) { Actor_Face_Object(0, "PRINTER", true); @@ -86,11 +86,11 @@ bool ScriptBB07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB07::ClickedOnActor(int actorId) { +bool SceneScriptBB07::ClickedOnActor(int actorId) { return false; } -bool ScriptBB07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB07::ClickedOnItem(int itemId, bool a2) { if (itemId == 83) { if (!Loop_Actor_Walk_To_Item(0, 83, 36, 1, false)) { Actor_Face_Item(0, 83, true); @@ -104,7 +104,7 @@ bool ScriptBB07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB07::ClickedOnExit(int exitId) { +bool SceneScriptBB07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -615.0f, 252.59f, -1018.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -138,7 +138,7 @@ bool ScriptBB07::ClickedOnExit(int exitId) { return false; } -bool ScriptBB07::ClickedOn2DRegion(int region) { +bool SceneScriptBB07::ClickedOn2DRegion(int region) { if (region == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -568.63f, 252.59f, -1114.81f, 0, 1, false, 0)) { Actor_Face_Heading(0, 229, false); @@ -158,13 +158,13 @@ bool ScriptBB07::ClickedOn2DRegion(int region) { return false; } -void ScriptBB07::SceneFrameAdvanced(int frame) { +void SceneScriptBB07::SceneFrameAdvanced(int frame) { } -void ScriptBB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB07::PlayerWalkedIn() { +void SceneScriptBB07::PlayerWalkedIn() { if (Game_Flag_Query(299)) { Loop_Actor_Walk_To_XYZ(0, -594.0f, 252.59f, -1018.0f, 6, 0, false, 0); Game_Flag_Reset(299); @@ -175,10 +175,10 @@ void ScriptBB07::PlayerWalkedIn() { } } -void ScriptBB07::PlayerWalkedOut() { +void SceneScriptBB07::PlayerWalkedOut() { } -void ScriptBB07::DialogueQueueFlushed(int a1) { +void SceneScriptBB07::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb08.cpp b/engines/bladerunner/script/scene/bb08.cpp index 5464aabc28..b88eef6e3f 100644 --- a/engines/bladerunner/script/bb08.cpp +++ b/engines/bladerunner/script/scene/bb08.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB08::InitializeScene() { +void SceneScriptBB08::InitializeScene() { if (Game_Flag_Query(219)) { Setup_Scene_Information(204.0f, 0.0f, 92.0f, 875); } else { @@ -56,29 +56,29 @@ void ScriptBB08::InitializeScene() { } } -void ScriptBB08::SceneLoaded() { +void SceneScriptBB08::SceneLoaded() { Obstacle_Object("BATHTUB", true); Unobstacle_Object("DOORWAY", true); Unclickable_Object("BATHTUB"); } -bool ScriptBB08::MouseClick(int x, int y) { +bool SceneScriptBB08::MouseClick(int x, int y) { return false; } -bool ScriptBB08::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB08::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB08::ClickedOnActor(int actorId) { +bool SceneScriptBB08::ClickedOnActor(int actorId) { return false; } -bool ScriptBB08::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB08::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB08::ClickedOnExit(int exitId) { +bool SceneScriptBB08::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 204.0f, 0.1f, 94.0f, 0, 1, false, 0)) { Actor_Face_Heading(0, 256, false); @@ -104,17 +104,17 @@ bool ScriptBB08::ClickedOnExit(int exitId) { return false; } -bool ScriptBB08::ClickedOn2DRegion(int region) { +bool SceneScriptBB08::ClickedOn2DRegion(int region) { return false; } -void ScriptBB08::SceneFrameAdvanced(int frame) { +void SceneScriptBB08::SceneFrameAdvanced(int frame) { } -void ScriptBB08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB08::PlayerWalkedIn() { +void SceneScriptBB08::PlayerWalkedIn() { if (Game_Flag_Query(219)) { Actor_Set_At_XYZ(0, 204.0f, 96.1f, 94.0f, 256); Footstep_Sound_Override_On(2); @@ -127,10 +127,10 @@ void ScriptBB08::PlayerWalkedIn() { } } -void ScriptBB08::PlayerWalkedOut() { +void SceneScriptBB08::PlayerWalkedOut() { } -void ScriptBB08::DialogueQueueFlushed(int a1) { +void SceneScriptBB08::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb09.cpp b/engines/bladerunner/script/scene/bb09.cpp index 0d672612ae..dc3356e77b 100644 --- a/engines/bladerunner/script/bb09.cpp +++ b/engines/bladerunner/script/scene/bb09.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB09::InitializeScene() { +void SceneScriptBB09::InitializeScene() { Setup_Scene_Information(111.2f, -8.96f, 134.65f, 0); if (Game_Flag_Query(221)) { Game_Flag_Reset(221); @@ -56,29 +56,29 @@ void ScriptBB09::InitializeScene() { Actor_Set_Targetable(8, true); } -void ScriptBB09::SceneLoaded() { +void SceneScriptBB09::SceneLoaded() { Obstacle_Object("WICKER CHAIR ", true); Unobstacle_Object("ROOM03 RIGHT WALL", true); Unclickable_Object("WICKER CHAIR "); } -bool ScriptBB09::MouseClick(int x, int y) { +bool SceneScriptBB09::MouseClick(int x, int y) { return false; } -bool ScriptBB09::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB09::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB09::ClickedOnActor(int actorId) { +bool SceneScriptBB09::ClickedOnActor(int actorId) { return false; } -bool ScriptBB09::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB09::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB09::ClickedOnExit(int exitId) { +bool SceneScriptBB09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 454.56f, -9.0f, 190.31f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(0, 450.56f, -9.0f, 250.31f, 0, 0, false, 0); @@ -102,23 +102,23 @@ bool ScriptBB09::ClickedOnExit(int exitId) { return false; } -bool ScriptBB09::ClickedOn2DRegion(int region) { +bool SceneScriptBB09::ClickedOn2DRegion(int region) { return false; } -void ScriptBB09::SceneFrameAdvanced(int frame) { +void SceneScriptBB09::SceneFrameAdvanced(int frame) { } -void ScriptBB09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB09::PlayerWalkedIn() { +void SceneScriptBB09::PlayerWalkedIn() { } -void ScriptBB09::PlayerWalkedOut() { +void SceneScriptBB09::PlayerWalkedOut() { } -void ScriptBB09::DialogueQueueFlushed(int a1) { +void SceneScriptBB09::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb10.cpp b/engines/bladerunner/script/scene/bb10.cpp index 3a28ebb104..f40084be2d 100644 --- a/engines/bladerunner/script/bb10.cpp +++ b/engines/bladerunner/script/scene/bb10.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB10::InitializeScene() { +void SceneScriptBB10::InitializeScene() { if (Game_Flag_Query(223)) { Setup_Scene_Information(255.29f, 90.24f, -103.0f, 830); } else if (Game_Flag_Query(220)) { @@ -73,7 +73,7 @@ void ScriptBB10::InitializeScene() { } } -void ScriptBB10::SceneLoaded() { +void SceneScriptBB10::SceneLoaded() { Obstacle_Object("BARB NIGHT", true); Unclickable_Object("BARB NIGHT"); Unobstacle_Object("Box-Floor Hole01", true); @@ -81,23 +81,23 @@ void ScriptBB10::SceneLoaded() { Unobstacle_Object("Box-Floor Hole03", true); } -bool ScriptBB10::MouseClick(int x, int y) { +bool SceneScriptBB10::MouseClick(int x, int y) { return false; } -bool ScriptBB10::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB10::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB10::ClickedOnActor(int actorId) { +bool SceneScriptBB10::ClickedOnActor(int actorId) { return false; } -bool ScriptBB10::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB10::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB10::ClickedOnExit(int exitId) { +bool SceneScriptBB10::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 225.58f, 67.2f, -102.1f, 0, 1, false, 0)) { Player_Set_Combat_Mode(false); @@ -128,7 +128,7 @@ bool ScriptBB10::ClickedOnExit(int exitId) { return false; } -bool ScriptBB10::ClickedOn2DRegion(int region) { +bool SceneScriptBB10::ClickedOn2DRegion(int region) { if (!Loop_Actor_Walk_To_XYZ(0, 225.58f, 67.2f, -102.1f, 0, 1, false, 0)) { Actor_Face_Heading(0, 274, false); Sound_Play(Random_Query(289, 290), 40, 70, 70, 50); @@ -170,13 +170,13 @@ bool ScriptBB10::ClickedOn2DRegion(int region) { return true; } -void ScriptBB10::SceneFrameAdvanced(int frame) { +void SceneScriptBB10::SceneFrameAdvanced(int frame) { } -void ScriptBB10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB10::PlayerWalkedIn() { +void SceneScriptBB10::PlayerWalkedIn() { if (Game_Flag_Query(216)) { Player_Loses_Control(); Actor_Set_At_XYZ(0, 214.01f, 66.84f, -349.62f, 462); @@ -196,10 +196,10 @@ void ScriptBB10::PlayerWalkedIn() { } } -void ScriptBB10::PlayerWalkedOut() { +void SceneScriptBB10::PlayerWalkedOut() { } -void ScriptBB10::DialogueQueueFlushed(int a1) { +void SceneScriptBB10::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb11.cpp b/engines/bladerunner/script/scene/bb11.cpp index 686172d965..07dd2e2301 100644 --- a/engines/bladerunner/script/bb11.cpp +++ b/engines/bladerunner/script/scene/bb11.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB11::InitializeScene() { +void SceneScriptBB11::InitializeScene() { Setup_Scene_Information(43.39f, -10.27f, -20.52f, 200); if (!Game_Flag_Query(509)) { Scene_Exit_Add_2D_Exit(0, 280, 154, 388, 247, 2); @@ -53,7 +53,7 @@ void ScriptBB11::InitializeScene() { } } -void ScriptBB11::SceneLoaded() { +void SceneScriptBB11::SceneLoaded() { Obstacle_Object("X2AIRCON01", true); Unclickable_Object("X2AIRCON01"); if (Game_Flag_Query(509)) { @@ -65,23 +65,23 @@ void ScriptBB11::SceneLoaded() { } } -bool ScriptBB11::MouseClick(int x, int y) { +bool SceneScriptBB11::MouseClick(int x, int y) { return false; } -bool ScriptBB11::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB11::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB11::ClickedOnActor(int actorId) { +bool SceneScriptBB11::ClickedOnActor(int actorId) { return false; } -bool ScriptBB11::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB11::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB11::ClickedOnExit(int exitId) { +bool SceneScriptBB11::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 43.39f, -10.27f, -68.52f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -94,11 +94,11 @@ bool ScriptBB11::ClickedOnExit(int exitId) { return false; } -bool ScriptBB11::ClickedOn2DRegion(int region) { +bool SceneScriptBB11::ClickedOn2DRegion(int region) { return false; } -void ScriptBB11::SceneFrameAdvanced(int frame) { +void SceneScriptBB11::SceneFrameAdvanced(int frame) { if (Actor_Query_Goal_Number(8) == 105 && !Game_Flag_Query(375)) { Actor_Change_Animation_Mode(0, 48); Game_Flag_Set(375); @@ -109,10 +109,10 @@ void ScriptBB11::SceneFrameAdvanced(int frame) { } } -void ScriptBB11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB11::PlayerWalkedIn() { +void SceneScriptBB11::PlayerWalkedIn() { if (Actor_Query_Goal_Number(8) == 102 && Global_Variable_Query(1) == 2) { Actor_Set_Invisible(0, true); Actor_Set_Goal_Number(8, 103); @@ -121,12 +121,12 @@ void ScriptBB11::PlayerWalkedIn() { } } -void ScriptBB11::PlayerWalkedOut() { +void SceneScriptBB11::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptBB11::DialogueQueueFlushed(int a1) { +void SceneScriptBB11::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb12.cpp b/engines/bladerunner/script/scene/bb12.cpp index 336b0592cb..0546ae0225 100644 --- a/engines/bladerunner/script/bb12.cpp +++ b/engines/bladerunner/script/scene/bb12.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB12::InitializeScene() { +void SceneScriptBB12::InitializeScene() { if (Game_Flag_Query(364)) { Setup_Scene_Information(138.0f, 0.0f, 104.0f, 760); } else if (Game_Flag_Query(506)) { @@ -57,28 +57,28 @@ void ScriptBB12::InitializeScene() { } } -void ScriptBB12::SceneLoaded() { +void SceneScriptBB12::SceneLoaded() { Obstacle_Object("BALLS", true); Unclickable_Object("BALLS"); } -bool ScriptBB12::MouseClick(int x, int y) { +bool SceneScriptBB12::MouseClick(int x, int y) { return false; } -bool ScriptBB12::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB12::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB12::ClickedOnActor(int actorId) { +bool SceneScriptBB12::ClickedOnActor(int actorId) { return false; } -bool ScriptBB12::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB12::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB12::ClickedOnExit(int exitId) { +bool SceneScriptBB12::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -129.0f, 0.0f, 64.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -109,11 +109,11 @@ bool ScriptBB12::ClickedOnExit(int exitId) { return false; } -bool ScriptBB12::ClickedOn2DRegion(int region) { +bool SceneScriptBB12::ClickedOn2DRegion(int region) { return false; } -void ScriptBB12::SceneFrameAdvanced(int frame) { +void SceneScriptBB12::SceneFrameAdvanced(int frame) { if (frame == 10 || frame == 22 || frame == 33 || frame == 41) { Sound_Play(311, 17, -30, -30, 50); } @@ -122,10 +122,10 @@ void ScriptBB12::SceneFrameAdvanced(int frame) { } } -void ScriptBB12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB12::PlayerWalkedIn() { +void SceneScriptBB12::PlayerWalkedIn() { if (Game_Flag_Query(364)) { Loop_Actor_Walk_To_XYZ(0, 114.0f, 0.0f, 104.0f, 0, 0, false, 0); Game_Flag_Reset(364); @@ -135,10 +135,10 @@ void ScriptBB12::PlayerWalkedIn() { } } -void ScriptBB12::PlayerWalkedOut() { +void SceneScriptBB12::PlayerWalkedOut() { } -void ScriptBB12::DialogueQueueFlushed(int a1) { +void SceneScriptBB12::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb51.cpp b/engines/bladerunner/script/scene/bb51.cpp index 38079fa5be..5ef20430fb 100644 --- a/engines/bladerunner/script/bb51.cpp +++ b/engines/bladerunner/script/scene/bb51.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptBB51::InitializeScene() { +void SceneScriptBB51::InitializeScene() { Setup_Scene_Information(101.0f, 0.0f, -25.0f, 152); Game_Flag_Reset(393); Scene_Exit_Add_2D_Exit(0, 615, 0, 639, 479, 1); @@ -46,17 +46,17 @@ void ScriptBB51::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptBB51::SceneLoaded() { +void SceneScriptBB51::SceneLoaded() { Obstacle_Object("V2CHESSTBL01", true); Clickable_Object("V2CHESSTBL01"); Clickable_Object("TOP02"); } -bool ScriptBB51::MouseClick(int x, int y) { +bool SceneScriptBB51::MouseClick(int x, int y) { return false; } -bool ScriptBB51::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptBB51::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("V2CHESSTBL01", objectName)) { Actor_Face_Object(0, "V2CHESSTBL01", true); Actor_Voice_Over(80, 99); @@ -71,15 +71,15 @@ bool ScriptBB51::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptBB51::ClickedOnActor(int actorId) { +bool SceneScriptBB51::ClickedOnActor(int actorId) { return false; } -bool ScriptBB51::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptBB51::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptBB51::ClickedOnExit(int exitId) { +bool SceneScriptBB51::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 76.0f, 0.0f, 79.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -101,23 +101,23 @@ bool ScriptBB51::ClickedOnExit(int exitId) { return false; } -bool ScriptBB51::ClickedOn2DRegion(int region) { +bool SceneScriptBB51::ClickedOn2DRegion(int region) { return false; } -void ScriptBB51::SceneFrameAdvanced(int frame) { +void SceneScriptBB51::SceneFrameAdvanced(int frame) { } -void ScriptBB51::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptBB51::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptBB51::PlayerWalkedIn() { +void SceneScriptBB51::PlayerWalkedIn() { } -void ScriptBB51::PlayerWalkedOut() { +void SceneScriptBB51::PlayerWalkedOut() { } -void ScriptBB51::DialogueQueueFlushed(int a1) { +void SceneScriptBB51::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp index 001c70245d..84878d1b94 100644 --- a/engines/bladerunner/script/ct01.cpp +++ b/engines/bladerunner/script/scene/ct01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT01::InitializeScene() { +void SceneScriptCT01::InitializeScene() { Music_Play(3, 28, 0, 2, -1, 1, 0); Game_Flag_Reset(247); if (Game_Flag_Query(68)) { @@ -82,7 +82,7 @@ void ScriptCT01::InitializeScene() { } } -void ScriptCT01::SceneLoaded() { +void SceneScriptCT01::SceneLoaded() { Obstacle_Object("HYDRANT02", true); Obstacle_Object("HOWWALLRT", true); Obstacle_Object("HOW-CHAIR1", true); @@ -98,11 +98,11 @@ void ScriptCT01::SceneLoaded() { Unclickable_Object("OBJECT04"); } -bool ScriptCT01::MouseClick(int x, int y) { +bool SceneScriptCT01::MouseClick(int x, int y) { return false; } -bool ScriptCT01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT01::ClickedOn3DObject(const char *objectName, bool a2) { // if ("ASIANSITTINGANDEATI" == objectName) { //bug? if (Object_Query_Click("ASIANSITTINGANDEATI", objectName)) { Actor_Face_Object(0, "ASIANSITTINGANDEATI", true); @@ -113,7 +113,7 @@ bool ScriptCT01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT01::ClickedOnActor(int actorId) { +bool SceneScriptCT01::ClickedOnActor(int actorId) { if (actorId == 28) { Actor_Set_Goal_Number(28, 50); if (!Loop_Actor_Walk_To_XYZ(0, -335.23f, -6.5f, 578.97f, 12, 1, false, 0)) { @@ -195,11 +195,11 @@ bool ScriptCT01::ClickedOnActor(int actorId) { return false; } -bool ScriptCT01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT01::ClickedOnExit(int exitId) { +bool SceneScriptCT01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -327.5f, -6.5f, 352.28f, 0, 1, false, 0)) { Player_Loses_Control(); @@ -327,11 +327,11 @@ bool ScriptCT01::ClickedOnExit(int exitId) { return false; } -bool ScriptCT01::ClickedOn2DRegion(int region) { +bool SceneScriptCT01::ClickedOn2DRegion(int region) { return false; } -void ScriptCT01::SceneFrameAdvanced(int frame) { +void SceneScriptCT01::SceneFrameAdvanced(int frame) { if ((frame < 316 || frame > 435) && !((frame - 1) % 10)) { /*int v1; int v2 = Random_Query(0, 1); @@ -371,10 +371,10 @@ void ScriptCT01::SceneFrameAdvanced(int frame) { } } -void ScriptCT01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT01::PlayerWalkedIn() { +void SceneScriptCT01::PlayerWalkedIn() { if (Game_Flag_Query(234)) { Loop_Actor_Walk_To_XYZ(0, -327.2f, -6.5f, 352.28f, 0, 0, false, 0); Game_Flag_Reset(234); @@ -395,7 +395,7 @@ void ScriptCT01::PlayerWalkedIn() { } } -void ScriptCT01::PlayerWalkedOut() { +void SceneScriptCT01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); if (Game_Flag_Query(123)) { Ambient_Sounds_Remove_Looping_Sound(55, true); @@ -411,10 +411,10 @@ void ScriptCT01::PlayerWalkedOut() { } } -void ScriptCT01::DialogueQueueFlushed(int a1) { +void SceneScriptCT01::DialogueQueueFlushed(int a1) { } -void ScriptCT01::sub_40269C() { +void SceneScriptCT01::sub_40269C() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 13)) { DM_Add_To_List_Never_Repeat_Once_Selected(40, 4, 5, 6); diff --git a/engines/bladerunner/script/ct02.cpp b/engines/bladerunner/script/scene/ct02.cpp index aecf29139a..111ad640d6 100644 --- a/engines/bladerunner/script/ct02.cpp +++ b/engines/bladerunner/script/scene/ct02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT02::InitializeScene() { +void SceneScriptCT02::InitializeScene() { if (Game_Flag_Query(70)) { Game_Flag_Reset(70); Setup_Scene_Information(-154.83f, -145.11f, 9.39f, 516); @@ -57,7 +57,7 @@ void ScriptCT02::InitializeScene() { } } -void ScriptCT02::SceneLoaded() { +void SceneScriptCT02::SceneLoaded() { Obstacle_Object("STOVE-1", true); Unobstacle_Object("BACK-DOOR", true); Unclickable_Object("STOVE-1"); @@ -93,7 +93,7 @@ void ScriptCT02::SceneLoaded() { } } -bool ScriptCT02::MouseClick(int x, int y) { +bool SceneScriptCT02::MouseClick(int x, int y) { if (Actor_Query_Goal_Number(19) == 8) { Actor_Set_Goal_Number(0, 1); return true; @@ -101,11 +101,11 @@ bool ScriptCT02::MouseClick(int x, int y) { return false; } -bool ScriptCT02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -void ScriptCT02::sub_401ACC() { +void SceneScriptCT02::sub_401ACC() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 13)) { DM_Add_To_List_Never_Repeat_Once_Selected(270, 8, 5, 3); @@ -198,7 +198,7 @@ void ScriptCT02::sub_401ACC() { } } -bool ScriptCT02::ClickedOnActor(int actorId) { +bool SceneScriptCT02::ClickedOnActor(int actorId) { if (actorId == 19 && Actor_Query_Goal_Number(19) == 1) { if (!Loop_Actor_Walk_To_XYZ(0, -255.02f, -145.11f, 212.42f, 0, 1, false, 0)) { Actor_Face_Actor(0, 19, true); @@ -216,11 +216,11 @@ bool ScriptCT02::ClickedOnActor(int actorId) { return false; } -bool ScriptCT02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT02::ClickedOnExit(int exitId) { +bool SceneScriptCT02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -111.2f, -145.11f, 243.28f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -249,11 +249,11 @@ bool ScriptCT02::ClickedOnExit(int exitId) { return false; } -bool ScriptCT02::ClickedOn2DRegion(int region) { +bool SceneScriptCT02::ClickedOn2DRegion(int region) { return false; } -void ScriptCT02::SceneFrameAdvanced(int frame) { +void SceneScriptCT02::SceneFrameAdvanced(int frame) { if (frame == 6 || frame == 12 || frame == 19 || frame == 25 || frame == 46 || frame == 59) { Sound_Play(97, Random_Query(25, 33), -70, -70, 50); } @@ -275,20 +275,20 @@ void ScriptCT02::SceneFrameAdvanced(int frame) { } } -void ScriptCT02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT02::PlayerWalkedIn() { +void SceneScriptCT02::PlayerWalkedIn() { } -void ScriptCT02::PlayerWalkedOut() { +void SceneScriptCT02::PlayerWalkedOut() { if (Actor_Clue_Query(0, 18)) { return; } Overlay_Remove("ct02over"); } -void ScriptCT02::DialogueQueueFlushed(int a1) { +void SceneScriptCT02::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct03.cpp b/engines/bladerunner/script/scene/ct03.cpp index b7dcdd4e46..5b18a239b5 100644 --- a/engines/bladerunner/script/ct03.cpp +++ b/engines/bladerunner/script/scene/ct03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT03::InitializeScene() { +void SceneScriptCT03::InitializeScene() { if (Game_Flag_Query(719)) { Setup_Scene_Information(-852.58f, -621.3f, 285.6f, 0); } else if (Game_Flag_Query(69)) { @@ -56,30 +56,30 @@ void ScriptCT03::InitializeScene() { Ambient_Sounds_Add_Sound(377, 10, 60, 33, 50, -100, 100, -101, -101, 0, 0); } -void ScriptCT03::SceneLoaded() { +void SceneScriptCT03::SceneLoaded() { Obstacle_Object("TRASH CAN", true); Unclickable_Object("TRASH CAN"); Footstep_Sounds_Set(0, 0); Footstep_Sounds_Set(1, 1); } -bool ScriptCT03::MouseClick(int x, int y) { +bool SceneScriptCT03::MouseClick(int x, int y) { return false; } -bool ScriptCT03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT03::ClickedOnActor(int actorId) { +bool SceneScriptCT03::ClickedOnActor(int actorId) { return false; } -bool ScriptCT03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT03::ClickedOnExit(int exitId) { +bool SceneScriptCT03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -745.09f, -619.09f, 293.36f, 0, 1, false, 0)) { Game_Flag_Set(71); @@ -105,28 +105,28 @@ bool ScriptCT03::ClickedOnExit(int exitId) { return false; } -bool ScriptCT03::ClickedOn2DRegion(int region) { +bool SceneScriptCT03::ClickedOn2DRegion(int region) { return false; } -void ScriptCT03::SceneFrameAdvanced(int frame) { +void SceneScriptCT03::SceneFrameAdvanced(int frame) { } -void ScriptCT03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT03::PlayerWalkedIn() { +void SceneScriptCT03::PlayerWalkedIn() { if (Actor_Query_Goal_Number(19) == 2) { Actor_Set_Goal_Number(19, 13); } } -void ScriptCT03::PlayerWalkedOut() { +void SceneScriptCT03::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptCT03::DialogueQueueFlushed(int a1) { +void SceneScriptCT03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct04.cpp b/engines/bladerunner/script/scene/ct04.cpp index cad32dfdd2..a8987bdffa 100644 --- a/engines/bladerunner/script/ct04.cpp +++ b/engines/bladerunner/script/scene/ct04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT04::InitializeScene() { +void SceneScriptCT04::InitializeScene() { if (Game_Flag_Query(72)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); @@ -48,7 +48,7 @@ void ScriptCT04::InitializeScene() { Ambient_Sounds_Add_Sound(377, 10, 60, 33, 50, -100, 100, -101, -101, 0, 0); } -void ScriptCT04::SceneLoaded() { +void SceneScriptCT04::SceneLoaded() { Obstacle_Object("DUMPSTER", true); Obstacle_Object("RIGHTWALL01", true); Obstacle_Object("BACK-BLDNG", true); @@ -62,11 +62,11 @@ void ScriptCT04::SceneLoaded() { } } -bool ScriptCT04::MouseClick(int x, int y) { +bool SceneScriptCT04::MouseClick(int x, int y) { return false; } -bool ScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) { if (objectName) { if (!Game_Flag_Query(137) && !Game_Flag_Query(169) && !Actor_Query_Goal_Number(12)) { Game_Flag_Set(137); @@ -124,7 +124,7 @@ bool ScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -void ScriptCT04::sub_401D4C() { +void SceneScriptCT04::sub_401D4C() { Dialogue_Menu_Clear_List(); if (Global_Variable_Query(2) > 10 || Query_Difficulty_Level() == 0) { DM_Add_To_List_Never_Repeat_Once_Selected(410, 8, 4, -1); @@ -147,7 +147,7 @@ void ScriptCT04::sub_401D4C() { } } -bool ScriptCT04::ClickedOnActor(int actorId) { +bool SceneScriptCT04::ClickedOnActor(int actorId) { if (actorId == 12) { if (Game_Flag_Query(169)) { if (!Loop_Actor_Walk_To_Actor(0, 12, 36, 1, false)) { @@ -182,11 +182,11 @@ bool ScriptCT04::ClickedOnActor(int actorId) { return false; } -bool ScriptCT04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT04::ClickedOnExit(int exitId) { +bool SceneScriptCT04::ClickedOnExit(int exitId) { if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(0, -82.86f, -621.3f, 769.03f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -211,27 +211,27 @@ bool ScriptCT04::ClickedOnExit(int exitId) { return false; } -bool ScriptCT04::ClickedOn2DRegion(int region) { +bool SceneScriptCT04::ClickedOn2DRegion(int region) { return false; } -void ScriptCT04::SceneFrameAdvanced(int frame) { +void SceneScriptCT04::SceneFrameAdvanced(int frame) { if (Game_Flag_Query(325)) { Game_Flag_Reset(325); Sound_Play(180, 100, 80, 80, 50); } } -void ScriptCT04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT04::PlayerWalkedIn() { +void SceneScriptCT04::PlayerWalkedIn() { } -void ScriptCT04::PlayerWalkedOut() { +void SceneScriptCT04::PlayerWalkedOut() { } -void ScriptCT04::DialogueQueueFlushed(int a1) { +void SceneScriptCT04::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct05.cpp b/engines/bladerunner/script/scene/ct05.cpp index 0249110653..9a0c334585 100644 --- a/engines/bladerunner/script/ct05.cpp +++ b/engines/bladerunner/script/scene/ct05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT05::InitializeScene() { +void SceneScriptCT05::InitializeScene() { if (Game_Flag_Query(90)) { Game_Flag_Reset(90); Setup_Scene_Information(-128.42f, -109.91f, 112.83f, 516); @@ -54,7 +54,7 @@ void ScriptCT05::InitializeScene() { } } -void ScriptCT05::SceneLoaded() { +void SceneScriptCT05::SceneLoaded() { Obstacle_Object("STAIR 1", true); Obstacle_Object("STAIR 2", true); Obstacle_Object("GRGDOOR", true); @@ -76,11 +76,11 @@ void ScriptCT05::SceneLoaded() { Unclickable_Object("LFTDOORFRM"); } -bool ScriptCT05::MouseClick(int x, int y) { +bool SceneScriptCT05::MouseClick(int x, int y) { return false; } -bool ScriptCT05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT05::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("STAIR1", objectName)) { Actor_Face_Object(0, objectName, true); return true; @@ -127,15 +127,15 @@ bool ScriptCT05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT05::ClickedOnActor(int actorId) { +bool SceneScriptCT05::ClickedOnActor(int actorId) { return false; } -bool ScriptCT05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT05::ClickedOnExit(int exitId) { +bool SceneScriptCT05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -128.42f, -109.91f, 112.83f, 0, 1, false, 0)) { Game_Flag_Set(76); @@ -177,11 +177,11 @@ bool ScriptCT05::ClickedOnExit(int exitId) { return false; } -bool ScriptCT05::ClickedOn2DRegion(int region) { +bool SceneScriptCT05::ClickedOn2DRegion(int region) { return false; } -void ScriptCT05::SceneFrameAdvanced(int frame) { +void SceneScriptCT05::SceneFrameAdvanced(int frame) { if (frame == 7 || frame == 15 || frame == 29) { switch (Random_Query(0, 4)) { case 4: @@ -203,10 +203,10 @@ void ScriptCT05::SceneFrameAdvanced(int frame) { } } -void ScriptCT05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT05::PlayerWalkedIn() { +void SceneScriptCT05::PlayerWalkedIn() { if (Game_Flag_Query(74)) { Player_Loses_Control(); Game_Flag_Reset(74); @@ -230,12 +230,12 @@ void ScriptCT05::PlayerWalkedIn() { } } -void ScriptCT05::PlayerWalkedOut() { +void SceneScriptCT05::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptCT05::DialogueQueueFlushed(int a1) { +void SceneScriptCT05::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct06.cpp b/engines/bladerunner/script/scene/ct06.cpp index 30dfd19bd3..f334bd0132 100644 --- a/engines/bladerunner/script/ct06.cpp +++ b/engines/bladerunner/script/scene/ct06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT06::InitializeScene() { +void SceneScriptCT06::InitializeScene() { if (Game_Flag_Query(77)) { Setup_Scene_Information(20.41f, -58.23f, 2.17f, 247); Game_Flag_Reset(77); @@ -59,7 +59,7 @@ void ScriptCT06::InitializeScene() { } } -void ScriptCT06::SceneLoaded() { +void SceneScriptCT06::SceneLoaded() { Obstacle_Object("BOX02", true); Obstacle_Object("CB BOX01", true); Obstacle_Object("CB BOX02", true); @@ -78,15 +78,15 @@ void ScriptCT06::SceneLoaded() { } } -bool ScriptCT06::MouseClick(int x, int y) { +bool SceneScriptCT06::MouseClick(int x, int y) { return false; } -bool ScriptCT06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT06::ClickedOnActor(int actorId) { +bool SceneScriptCT06::ClickedOnActor(int actorId) { if (actorId == 19) { Loop_Actor_Walk_To_Actor(0, 19, 24, 1, false); Actor_Face_Actor(0, 19, true); @@ -111,11 +111,11 @@ bool ScriptCT06::ClickedOnActor(int actorId) { return false; } -bool ScriptCT06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT06::ClickedOnExit(int exitId) { +bool SceneScriptCT06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 20.41f, -58.23f, -2.17f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -155,26 +155,26 @@ bool ScriptCT06::ClickedOnExit(int exitId) { return false; } -bool ScriptCT06::ClickedOn2DRegion(int region) { +bool SceneScriptCT06::ClickedOn2DRegion(int region) { return false; } -void ScriptCT06::SceneFrameAdvanced(int frame) { +void SceneScriptCT06::SceneFrameAdvanced(int frame) { } -void ScriptCT06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT06::PlayerWalkedIn() { +void SceneScriptCT06::PlayerWalkedIn() { if (Game_Flag_Query(144) == 1) { Game_Flag_Reset(144); } } -void ScriptCT06::PlayerWalkedOut() { +void SceneScriptCT06::PlayerWalkedOut() { } -void ScriptCT06::DialogueQueueFlushed(int a1) { +void SceneScriptCT06::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct07.cpp b/engines/bladerunner/script/scene/ct07.cpp index 771d4be676..8ee2412368 100644 --- a/engines/bladerunner/script/ct07.cpp +++ b/engines/bladerunner/script/scene/ct07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT07::InitializeScene() { +void SceneScriptCT07::InitializeScene() { Setup_Scene_Information(202.32f, -58.23f, -12.86f, 225); Actor_Put_In_Set(19, 30); Actor_Set_At_XYZ(19, -9.68f, -58.23f, 11.14f, 250); @@ -46,7 +46,7 @@ void ScriptCT07::InitializeScene() { Ambient_Sounds_Add_Sound(64, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); } -void ScriptCT07::SceneLoaded() { +void SceneScriptCT07::SceneLoaded() { Obstacle_Object("BOX01", true); Obstacle_Object("BOX02", true); Obstacle_Object("BOX03", true); @@ -57,48 +57,48 @@ void ScriptCT07::SceneLoaded() { Unclickable_Object("BOX04"); } -bool ScriptCT07::MouseClick(int x, int y) { +bool SceneScriptCT07::MouseClick(int x, int y) { return true; } -bool ScriptCT07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT07::ClickedOnActor(int actorId) { +bool SceneScriptCT07::ClickedOnActor(int actorId) { return false; } -bool ScriptCT07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT07::ClickedOnExit(int exitId) { +bool SceneScriptCT07::ClickedOnExit(int exitId) { return false; } -bool ScriptCT07::ClickedOn2DRegion(int region) { +bool SceneScriptCT07::ClickedOn2DRegion(int region) { return false; } -void ScriptCT07::SceneFrameAdvanced(int frame) { +void SceneScriptCT07::SceneFrameAdvanced(int frame) { } -void ScriptCT07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT07::PlayerWalkedIn() { +void SceneScriptCT07::PlayerWalkedIn() { Player_Gains_Control(); Non_Player_Actor_Combat_Mode_On(19, 0, 0, 0, 2, 4, 7, 8, 0, 0, 100, 15, 300, 0); Game_Flag_Set(516); Actor_Face_Actor(0, 19, true); } -void ScriptCT07::PlayerWalkedOut() { +void SceneScriptCT07::PlayerWalkedOut() { Music_Stop(2); } -void ScriptCT07::DialogueQueueFlushed(int a1) { +void SceneScriptCT07::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct08.cpp b/engines/bladerunner/script/scene/ct08.cpp index 42b924e498..17cd8e5e61 100644 --- a/engines/bladerunner/script/ct08.cpp +++ b/engines/bladerunner/script/scene/ct08.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT08::InitializeScene() { +void SceneScriptCT08::InitializeScene() { if (Game_Flag_Query(679)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -72,7 +72,7 @@ void ScriptCT08::InitializeScene() { } } -void ScriptCT08::SceneLoaded() { +void SceneScriptCT08::SceneLoaded() { Obstacle_Object("ASHTRAY", 1); Unobstacle_Object("BLANKET03", 1); if (!Actor_Clue_Query(0, 85)) { @@ -83,19 +83,19 @@ void ScriptCT08::SceneLoaded() { } } -bool ScriptCT08::MouseClick(int x, int y) { +bool SceneScriptCT08::MouseClick(int x, int y) { return false; } -bool ScriptCT08::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT08::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT08::ClickedOnActor(int actorId) { +bool SceneScriptCT08::ClickedOnActor(int actorId) { return false; } -bool ScriptCT08::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT08::ClickedOnItem(int itemId, bool a2) { if (itemId == 81) { if (!Loop_Actor_Walk_To_Item(0, 81, 36, 1, 0) && !Game_Flag_Query(550)) { Actor_Clue_Acquire(0, 87, 1, -1); @@ -110,7 +110,7 @@ bool ScriptCT08::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT08::ClickedOnExit(int exitId) { +bool SceneScriptCT08::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -183.0f, 0.0f, 128.0f, 0, 1, 0, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -142,7 +142,7 @@ bool ScriptCT08::ClickedOnExit(int exitId) { return false; } -bool ScriptCT08::ClickedOn2DRegion(int region) { +bool SceneScriptCT08::ClickedOn2DRegion(int region) { if (region == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -108.0f, 0.0f, -178.0f, 0, 1, 0, 0)) { Actor_Face_Heading(0, 512, 0); @@ -158,13 +158,13 @@ bool ScriptCT08::ClickedOn2DRegion(int region) { return false; } -void ScriptCT08::SceneFrameAdvanced(int frame) { +void SceneScriptCT08::SceneFrameAdvanced(int frame) { } -void ScriptCT08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT08::PlayerWalkedIn() { +void SceneScriptCT08::PlayerWalkedIn() { if (Game_Flag_Query(550)) { Actor_Change_Animation_Mode(0, 3); Actor_Change_Animation_Mode(0, 0); @@ -184,13 +184,13 @@ void ScriptCT08::PlayerWalkedIn() { } } -void ScriptCT08::PlayerWalkedOut() { +void SceneScriptCT08::PlayerWalkedOut() { if (!Actor_Clue_Query(0, 85)) { Item_Remove_From_World(85); } } -void ScriptCT08::DialogueQueueFlushed(int a1) { +void SceneScriptCT08::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct09.cpp b/engines/bladerunner/script/scene/ct09.cpp index 0cc9910b19..0d70b5f13f 100644 --- a/engines/bladerunner/script/ct09.cpp +++ b/engines/bladerunner/script/scene/ct09.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT09::InitializeScene() { +void SceneScriptCT09::InitializeScene() { if (Game_Flag_Query(85)) { Setup_Scene_Information(160.0f, 349.0f, 587.0f, 490); } else if (Game_Flag_Query(81)) { @@ -41,18 +41,18 @@ void ScriptCT09::InitializeScene() { Ambient_Sounds_Add_Sound(377, 5, 180, 33, 33, 0, 0, -101, -101, 0, 0); } -void ScriptCT09::SceneLoaded() { +void SceneScriptCT09::SceneLoaded() { Obstacle_Object("PHONE01", true); Unobstacle_Object("MAINBEAM01", true); Unobstacle_Object("MIDDLE WALL", true); Clickable_Object("BELL"); } -bool ScriptCT09::MouseClick(int x, int y) { +bool SceneScriptCT09::MouseClick(int x, int y) { return false; } -bool ScriptCT09::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT09::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BELL", objectName)) { if (Actor_Query_Which_Set_In(62) != 31) { if (!Loop_Actor_Walk_To_XYZ(0, 229.0f, 348.52f, 851.0f, 36, 1, false, 0)) { @@ -68,7 +68,7 @@ bool ScriptCT09::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT09::ClickedOnActor(int actorId) { +bool SceneScriptCT09::ClickedOnActor(int actorId) { if (actorId == 27) { if (!Actor_Query_Goal_Number(27) && Actor_Query_Which_Set_In(62) != 31) { if (!Loop_Actor_Walk_To_XYZ(0, 270.0f, 348.52f, 846.0f, 12, 1, false, 0)) { @@ -101,11 +101,11 @@ bool ScriptCT09::ClickedOnActor(int actorId) { return false; } -bool ScriptCT09::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT09::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT09::ClickedOnExit(int exitId) { +bool SceneScriptCT09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 206.0f, 348.52f, 599.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(0, 235.0f, 348.52f, 599.0f, 0, 0, false, 0); @@ -137,20 +137,20 @@ bool ScriptCT09::ClickedOnExit(int exitId) { return false;; } -bool ScriptCT09::ClickedOn2DRegion(int region) { +bool SceneScriptCT09::ClickedOn2DRegion(int region) { return false; } -void ScriptCT09::SceneFrameAdvanced(int frame) { +void SceneScriptCT09::SceneFrameAdvanced(int frame) { if (frame == 6 || frame == 12 || frame == 19 || frame == 25 || frame == 46 || frame == 59) { Sound_Play(97, Random_Query(47, 47), 70, 70, 50); } } -void ScriptCT09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT09::PlayerWalkedIn() { +void SceneScriptCT09::PlayerWalkedIn() { bool v0 = false; if (Global_Variable_Query(1) == 3 && !Game_Flag_Query(538)) { Game_Flag_Set(538); @@ -197,10 +197,10 @@ void ScriptCT09::PlayerWalkedIn() { } } -void ScriptCT09::PlayerWalkedOut() { +void SceneScriptCT09::PlayerWalkedOut() { } -void ScriptCT09::DialogueQueueFlushed(int a1) { +void SceneScriptCT09::DialogueQueueFlushed(int a1) { Actor_Force_Stop_Walking(0); if (Actor_Query_Goal_Number(62) == 1 && !Game_Flag_Query(539)) { Player_Loses_Control(); diff --git a/engines/bladerunner/script/ct10.cpp b/engines/bladerunner/script/scene/ct10.cpp index 1781394c57..406ea6d098 100644 --- a/engines/bladerunner/script/ct10.cpp +++ b/engines/bladerunner/script/scene/ct10.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT10::InitializeScene() { +void SceneScriptCT10::InitializeScene() { Setup_Scene_Information(-121.0f, 0.0f, -78.0f, 446); Game_Flag_Reset(84); Scene_Exit_Add_2D_Exit(0, 135, 74, 238, 340, 0); @@ -34,7 +34,7 @@ void ScriptCT10::InitializeScene() { Ambient_Sounds_Add_Sound(377, 5, 180, 33, 33, 0, 0, -101, -101, 0, 0); } -void ScriptCT10::SceneLoaded() { +void SceneScriptCT10::SceneLoaded() { Obstacle_Object("BED", true); Unobstacle_Object("WINDOW", true); Unobstacle_Object("LOFT01", true); @@ -58,11 +58,11 @@ void ScriptCT10::SceneLoaded() { Scene_2D_Region_Add(0, 379, 229, 454, 375); } -bool ScriptCT10::MouseClick(int x, int y) { +bool SceneScriptCT10::MouseClick(int x, int y) { return false; } -void ScriptCT10::sub_401844() { +void SceneScriptCT10::sub_401844() { if (!Loop_Actor_Walk_To_XYZ(0, 10.6f, 0.0f, -50.5f, 0, 1, false, 0)) { Player_Loses_Control(); Actor_Face_Heading(0, 0, false); @@ -78,7 +78,7 @@ void ScriptCT10::sub_401844() { } } -bool ScriptCT10::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT10::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("TUB", objectName)) { if (!Loop_Actor_Walk_To_XYZ(0, -41.0f, 0.0f, -106.0f, 0, 1, false, 0)) { Player_Loses_Control(); @@ -106,15 +106,15 @@ bool ScriptCT10::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT10::ClickedOnActor(int actorId) { +bool SceneScriptCT10::ClickedOnActor(int actorId) { return false; } -bool ScriptCT10::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT10::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT10::ClickedOnExit(int exitId) { +bool SceneScriptCT10::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -93.0f, 0.0f, -38.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(0, -121.0f, 0.0f, -78.0f, 0, 0, false, 0); @@ -127,20 +127,20 @@ bool ScriptCT10::ClickedOnExit(int exitId) { return false; } -bool ScriptCT10::ClickedOn2DRegion(int region) { +bool SceneScriptCT10::ClickedOn2DRegion(int region) { if (region == 0) { sub_401844(); } return false; } -void ScriptCT10::SceneFrameAdvanced(int frame) { +void SceneScriptCT10::SceneFrameAdvanced(int frame) { } -void ScriptCT10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT10::PlayerWalkedIn() { +void SceneScriptCT10::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, -93.0f, 0.0f, -38.0f, 0, 0, false, 0); Loop_Actor_Walk_To_XYZ(0, -49.0f, 0.0f, -38.0f, 0, 0, false, 0); if (!Game_Flag_Query(525)) { @@ -151,10 +151,10 @@ void ScriptCT10::PlayerWalkedIn() { } } -void ScriptCT10::PlayerWalkedOut() { +void SceneScriptCT10::PlayerWalkedOut() { } -void ScriptCT10::DialogueQueueFlushed(int a1) { +void SceneScriptCT10::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct11.cpp b/engines/bladerunner/script/scene/ct11.cpp index 3ef0bec48d..ee0019fb42 100644 --- a/engines/bladerunner/script/ct11.cpp +++ b/engines/bladerunner/script/scene/ct11.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT11::InitializeScene() { +void SceneScriptCT11::InitializeScene() { if (Game_Flag_Query(91)) { Setup_Scene_Information(-378.0f, 9.68f, -55.0f, 440); } else if (Game_Flag_Query(558)) { @@ -48,7 +48,7 @@ void ScriptCT11::InitializeScene() { } } -void ScriptCT11::SceneLoaded() { +void SceneScriptCT11::SceneLoaded() { Obstacle_Object("TRASH CAN", true); Unobstacle_Object("BOX NORTHWEST 1", true); Unobstacle_Object("BOX SOUTH 1", true); @@ -81,23 +81,23 @@ void ScriptCT11::SceneLoaded() { Unclickable_Object("TRASH CAN"); } -bool ScriptCT11::MouseClick(int x, int y) { +bool SceneScriptCT11::MouseClick(int x, int y) { return false; } -bool ScriptCT11::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT11::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT11::ClickedOnActor(int actorId) { +bool SceneScriptCT11::ClickedOnActor(int actorId) { return false; } -bool ScriptCT11::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT11::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT11::ClickedOnExit(int exitId) { +bool SceneScriptCT11::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 121.0f, 9.6800003f, -42.0f, 0, 1, false, 0)) { Game_Flag_Set(304); @@ -125,7 +125,7 @@ bool ScriptCT11::ClickedOnExit(int exitId) { return false; } -bool ScriptCT11::ClickedOn2DRegion(int region) { +bool SceneScriptCT11::ClickedOn2DRegion(int region) { if (region == 0 && Game_Flag_Query(725)) { if (!Loop_Actor_Walk_To_XYZ(0, 686.0f, 0.0f, 658.0f, 12, 1, false, 0)) { Actor_Face_Heading(0, 47, false); @@ -179,13 +179,13 @@ bool ScriptCT11::ClickedOn2DRegion(int region) { return false; } -void ScriptCT11::SceneFrameAdvanced(int frame) { +void SceneScriptCT11::SceneFrameAdvanced(int frame) { } -void ScriptCT11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT11::PlayerWalkedIn() { +void SceneScriptCT11::PlayerWalkedIn() { if (Game_Flag_Query(91)) { Loop_Actor_Walk_To_XYZ(0, -358.0f, 9.68f, 32.0f, 0, 0, false, 0); Game_Flag_Reset(91); @@ -202,12 +202,12 @@ void ScriptCT11::PlayerWalkedIn() { } } -void ScriptCT11::PlayerWalkedOut() { +void SceneScriptCT11::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptCT11::DialogueQueueFlushed(int a1) { +void SceneScriptCT11::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp index eabd25b76c..a5f5c35dde 100644 --- a/engines/bladerunner/script/ct12.cpp +++ b/engines/bladerunner/script/scene/ct12.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT12::InitializeScene() { +void SceneScriptCT12::InitializeScene() { if (Game_Flag_Query(123)) { Setup_Scene_Information(-419.0f, -6.5f, 696.0f, 616); } else if (Game_Flag_Query(432)) { @@ -88,22 +88,22 @@ void ScriptCT12::InitializeScene() { } } -void ScriptCT12::SceneLoaded() { +void SceneScriptCT12::SceneLoaded() { Obstacle_Object("BOX18", true); Unobstacle_Object("SPINNER BODY", true); Unobstacle_Object("HOWFLOOR", true); Unclickable_Object("TURBINE"); } -bool ScriptCT12::MouseClick(int x, int y) { +bool SceneScriptCT12::MouseClick(int x, int y) { return false; } -bool ScriptCT12::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT12::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT12::ClickedOnActor(int actorId) { +bool SceneScriptCT12::ClickedOnActor(int actorId) { if (actorId == 28) { Actor_Face_Actor(0, 28, true); Actor_Says(0, 8910, 16); @@ -132,11 +132,11 @@ bool ScriptCT12::ClickedOnActor(int actorId) { return false; } -bool ScriptCT12::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT12::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT12::ClickedOnExit(int exitId) { +bool SceneScriptCT12::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -419.14999f, -6.5f, 696.94f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -187,11 +187,11 @@ bool ScriptCT12::ClickedOnExit(int exitId) { return false; } -bool ScriptCT12::ClickedOn2DRegion(int region) { +bool SceneScriptCT12::ClickedOn2DRegion(int region) { return false; } -void ScriptCT12::SceneFrameAdvanced(int frame) { +void SceneScriptCT12::SceneFrameAdvanced(int frame) { if (!((frame - 1) % 10)) { /*int v2 = Random_Query(0, 1); if (v2 <= 1) @@ -226,10 +226,10 @@ void ScriptCT12::SceneFrameAdvanced(int frame) { } } -void ScriptCT12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT12::PlayerWalkedIn() { +void SceneScriptCT12::PlayerWalkedIn() { if (Global_Variable_Query(1) < 2 && !Game_Flag_Query(64) && Actor_Query_Goal_Number(53) == 1) { Player_Loses_Control(); Loop_Actor_Walk_To_Actor(53, 0, 48, 0, false); @@ -270,7 +270,7 @@ void ScriptCT12::PlayerWalkedIn() { } } -void ScriptCT12::PlayerWalkedOut() { +void SceneScriptCT12::PlayerWalkedOut() { Game_Flag_Reset(443); if (Game_Flag_Query(433)) { Game_Flag_Reset(176); @@ -278,7 +278,7 @@ void ScriptCT12::PlayerWalkedOut() { } } -void ScriptCT12::DialogueQueueFlushed(int a1) { +void SceneScriptCT12::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ct51.cpp b/engines/bladerunner/script/scene/ct51.cpp index bc47dddb21..8fb866c554 100644 --- a/engines/bladerunner/script/ct51.cpp +++ b/engines/bladerunner/script/scene/ct51.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptCT51::InitializeScene() { +void SceneScriptCT51::InitializeScene() { Setup_Scene_Information(0.0f, 0.0f, -102.0f, 470); Game_Flag_Reset(379); Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3); @@ -38,7 +38,7 @@ void ScriptCT51::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptCT51::SceneLoaded() { +void SceneScriptCT51::SceneLoaded() { Unobstacle_Object("BLANKET03", true); Clickable_Object("BED02"); if (!Actor_Clue_Query(0, 85)) { @@ -49,11 +49,11 @@ void ScriptCT51::SceneLoaded() { } } -bool ScriptCT51::MouseClick(int x, int y) { +bool SceneScriptCT51::MouseClick(int x, int y) { return true; } -bool ScriptCT51::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptCT51::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BED02", objectName)) { if (Actor_Clue_Query(0, 84)) { Actor_Says(0, 8580, 12); @@ -67,11 +67,11 @@ bool ScriptCT51::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptCT51::ClickedOnActor(int actorId) { +bool SceneScriptCT51::ClickedOnActor(int actorId) { return false; } -bool ScriptCT51::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptCT51::ClickedOnItem(int itemId, bool a2) { if (itemId == 85) { Actor_Clue_Acquire(0, 85, 1, -1); Item_Pickup_Spin_Effect(943, 260, 200); @@ -89,7 +89,7 @@ bool ScriptCT51::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptCT51::ClickedOnExit(int exitId) { +bool SceneScriptCT51::ClickedOnExit(int exitId) { if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(0, 0.0f, 0.0f, -102.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(0, -11.0f, 0.0f, -156.0f, 0, 0, false, 0); @@ -104,26 +104,26 @@ bool ScriptCT51::ClickedOnExit(int exitId) { } -bool ScriptCT51::ClickedOn2DRegion(int region) { +bool SceneScriptCT51::ClickedOn2DRegion(int region) { return false; } -void ScriptCT51::SceneFrameAdvanced(int frame) { +void SceneScriptCT51::SceneFrameAdvanced(int frame) { } -void ScriptCT51::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptCT51::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptCT51::PlayerWalkedIn() { +void SceneScriptCT51::PlayerWalkedIn() { } -void ScriptCT51::PlayerWalkedOut() { +void SceneScriptCT51::PlayerWalkedOut() { if (!Actor_Clue_Query(0, 85)) { Item_Remove_From_World(85); } } -void ScriptCT51::DialogueQueueFlushed(int a1) { +void SceneScriptCT51::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/dr01.cpp b/engines/bladerunner/script/scene/dr01.cpp index e8d89a27fe..0da58d4e71 100644 --- a/engines/bladerunner/script/dr01.cpp +++ b/engines/bladerunner/script/scene/dr01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptDR01::InitializeScene() { +void SceneScriptDR01::InitializeScene() { if (Game_Flag_Query(225)) { Setup_Scene_Information(-835.0f, -0.04f, -118.0f, 664); } else if (Game_Flag_Query(11)) { @@ -72,7 +72,7 @@ void ScriptDR01::InitializeScene() { } } -void ScriptDR01::SceneLoaded() { +void SceneScriptDR01::SceneLoaded() { Obstacle_Object("TRASH CAN WITH FIRE", true); Obstacle_Object("V2PYLON02", true); Obstacle_Object("V2PYLON04", true); @@ -88,23 +88,23 @@ void ScriptDR01::SceneLoaded() { Unobstacle_Object("V2 BUILD01", true); } -bool ScriptDR01::MouseClick(int x, int y) { +bool SceneScriptDR01::MouseClick(int x, int y) { return false; } -bool ScriptDR01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptDR01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptDR01::ClickedOnActor(int actorId) { +bool SceneScriptDR01::ClickedOnActor(int actorId) { return actorId == 50; } -bool ScriptDR01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptDR01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptDR01::ClickedOnExit(int exitId) { +bool SceneScriptDR01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -835.0f, -0.04f, -118.0f, 0, 1, false, 0)) { Async_Actor_Walk_To_XYZ(0, -911.0f, -0.04f, -118.0f, 0, false); @@ -217,11 +217,11 @@ bool ScriptDR01::ClickedOnExit(int exitId) { return false; } -bool ScriptDR01::ClickedOn2DRegion(int region) { +bool SceneScriptDR01::ClickedOn2DRegion(int region) { return false; } -void ScriptDR01::SceneFrameAdvanced(int frame) { +void SceneScriptDR01::SceneFrameAdvanced(int frame) { if (frame < 75) { Actor_Set_Invisible(0, true); } else { @@ -232,10 +232,10 @@ void ScriptDR01::SceneFrameAdvanced(int frame) { } } -void ScriptDR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptDR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptDR01::PlayerWalkedIn() { +void SceneScriptDR01::PlayerWalkedIn() { if (Game_Flag_Query(531)) { Async_Actor_Walk_To_XYZ(0, -757.15f, -0.04f, 24.64f, 0, false); } else if (!Game_Flag_Query(225) && !Game_Flag_Query(11)) { @@ -248,7 +248,7 @@ void ScriptDR01::PlayerWalkedIn() { Game_Flag_Reset(531); } -void ScriptDR01::PlayerWalkedOut() { +void SceneScriptDR01::PlayerWalkedOut() { if (!Game_Flag_Query(10) && !Game_Flag_Query(224) && !Game_Flag_Query(558)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -256,7 +256,7 @@ void ScriptDR01::PlayerWalkedOut() { } } -void ScriptDR01::DialogueQueueFlushed(int a1) { +void SceneScriptDR01::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/dr02.cpp b/engines/bladerunner/script/scene/dr02.cpp index c075d808f5..2ff8f14a0f 100644 --- a/engines/bladerunner/script/dr02.cpp +++ b/engines/bladerunner/script/scene/dr02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptDR02::InitializeScene() { +void SceneScriptDR02::InitializeScene() { if (Game_Flag_Query(227)) { Setup_Scene_Information(-1162.0f, 7.18f, -322.0f, 552); } else if (Game_Flag_Query(224)) { @@ -57,7 +57,7 @@ void ScriptDR02::InitializeScene() { } } -void ScriptDR02::SceneLoaded() { +void SceneScriptDR02::SceneLoaded() { Obstacle_Object("TRASH CAN WITH FIRE", true); Obstacle_Object("V2PYLON02", true); Obstacle_Object("V2PYLON04", true); @@ -99,23 +99,23 @@ void ScriptDR02::SceneLoaded() { Unclickable_Object("V2CANPIPE02"); } -bool ScriptDR02::MouseClick(int x, int y) { +bool SceneScriptDR02::MouseClick(int x, int y) { return false; } -bool ScriptDR02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptDR02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptDR02::ClickedOnActor(int actorId) { +bool SceneScriptDR02::ClickedOnActor(int actorId) { return false; } -bool ScriptDR02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptDR02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptDR02::ClickedOnExit(int exitId) { +bool SceneScriptDR02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -835.0f, -0.04f, -118.0f, 0, 1, false, 0)) { Async_Actor_Walk_To_XYZ(0, -727.0f, -0.04f, -118.0f, 0, false); @@ -149,20 +149,20 @@ bool ScriptDR02::ClickedOnExit(int exitId) { return false; } -bool ScriptDR02::ClickedOn2DRegion(int region) { +bool SceneScriptDR02::ClickedOn2DRegion(int region) { return false; } -void ScriptDR02::SceneFrameAdvanced(int frame) { +void SceneScriptDR02::SceneFrameAdvanced(int frame) { if (frame == 1) { Sound_Play(1, 10, 85, 85, 50); } } -void ScriptDR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptDR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptDR02::PlayerWalkedIn() { +void SceneScriptDR02::PlayerWalkedIn() { if (Game_Flag_Query(227)) { Game_Flag_Reset(227); } @@ -174,10 +174,10 @@ void ScriptDR02::PlayerWalkedIn() { } } -void ScriptDR02::PlayerWalkedOut() { +void SceneScriptDR02::PlayerWalkedOut() { } -void ScriptDR02::DialogueQueueFlushed(int a1) { +void SceneScriptDR02::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/dr03.cpp b/engines/bladerunner/script/scene/dr03.cpp index cea23b7ec3..f0de30deb8 100644 --- a/engines/bladerunner/script/dr03.cpp +++ b/engines/bladerunner/script/scene/dr03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptDR03::InitializeScene() { +void SceneScriptDR03::InitializeScene() { if (Game_Flag_Query(226)) { Game_Flag_Reset(226); Setup_Scene_Information(330.31f, 4.27f, -910.91f, 297); @@ -44,21 +44,21 @@ void ScriptDR03::InitializeScene() { Ambient_Sounds_Add_Looping_Sound(95, 20, 70, 1); } -void ScriptDR03::SceneLoaded() { +void SceneScriptDR03::SceneLoaded() { Obstacle_Object("W2-CENTCASE02", 1); Obstacle_Object("W2-CARTTOP", 1); Obstacle_Object("W2-TANKAFLUID01", 1); } -bool ScriptDR03::MouseClick(int x, int y) { +bool SceneScriptDR03::MouseClick(int x, int y) { return false; } -bool ScriptDR03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptDR03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptDR03::ClickedOnActor(int actorId) { +bool SceneScriptDR03::ClickedOnActor(int actorId) { if (actorId == 52) { Actor_Face_Actor(0, 52, 1); Actor_Face_Actor(52, 0, 1); @@ -120,11 +120,11 @@ bool ScriptDR03::ClickedOnActor(int actorId) { return false; } -bool ScriptDR03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptDR03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptDR03::ClickedOnExit(int exitId) { +bool SceneScriptDR03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 330.31f, 4.27f, -910.91f, 24, 1, 0, 0)) { Game_Flag_Set(227); @@ -135,11 +135,11 @@ bool ScriptDR03::ClickedOnExit(int exitId) { return false; } -bool ScriptDR03::ClickedOn2DRegion(int region) { +bool SceneScriptDR03::ClickedOn2DRegion(int region) { return false; } -void ScriptDR03::SceneFrameAdvanced(int frame) { +void SceneScriptDR03::SceneFrameAdvanced(int frame) { if (frame == 1 || frame == 4 || frame == 8 || frame == 10 || frame == 19 || frame == 21 || frame == 22 || frame == 23 || frame == 30 || frame == 31 || frame == 32 || frame == 33 || frame == 46 || frame == 49) { if (Random_Query(0, 1)) { Sound_Play(97, Random_Query(20, 33), 80, 80, 50); @@ -149,10 +149,10 @@ void ScriptDR03::SceneFrameAdvanced(int frame) { } } -void ScriptDR03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptDR03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptDR03::PlayerWalkedIn() { +void SceneScriptDR03::PlayerWalkedIn() { if (!Game_Flag_Query(226)) { if (Random_Query(1, 2) == 1) { Actor_Says(52, 660, 14); @@ -167,13 +167,13 @@ void ScriptDR03::PlayerWalkedIn() { } } -void ScriptDR03::PlayerWalkedOut() { +void SceneScriptDR03::PlayerWalkedOut() { } -void ScriptDR03::DialogueQueueFlushed(int a1) { +void SceneScriptDR03::DialogueQueueFlushed(int a1) { } -void ScriptDR03::sub_401B18() { +void SceneScriptDR03::sub_401B18() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 67) || Actor_Clue_Query(0, 71) || Actor_Clue_Query(0, 68)) { DM_Add_To_List_Never_Repeat_Once_Selected(650, 5, 5, 5); diff --git a/engines/bladerunner/script/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp index 1cef91b967..4e2a101560 100644 --- a/engines/bladerunner/script/dr04.cpp +++ b/engines/bladerunner/script/scene/dr04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptDR04::InitializeScene() { +void SceneScriptDR04::InitializeScene() { if (Game_Flag_Query(515)) { Setup_Scene_Information(0.0f, 0.0f, 0.0f, 0); } else if (Game_Flag_Query(10)) { @@ -66,7 +66,7 @@ void ScriptDR04::InitializeScene() { } } -void ScriptDR04::SceneLoaded() { +void SceneScriptDR04::SceneLoaded() { Obstacle_Object("TRASH CAN WITH FIRE", true); Obstacle_Object("V2PYLON02", true); Obstacle_Object("V2PYLON04", true); @@ -83,15 +83,15 @@ void ScriptDR04::SceneLoaded() { Unclickable_Object("Z2DR2"); } -bool ScriptDR04::MouseClick(int x, int y) { +bool SceneScriptDR04::MouseClick(int x, int y) { return false; } -bool ScriptDR04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptDR04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptDR04::ClickedOnActor(int actorId) { +bool SceneScriptDR04::ClickedOnActor(int actorId) { if (actorId == 35 && !Player_Query_Combat_Mode()) { if (Actor_Query_Goal_Number(35) != 21) { if (Actor_Query_Goal_Number(35) == 23) { @@ -123,11 +123,11 @@ bool ScriptDR04::ClickedOnActor(int actorId) { return false; } -bool ScriptDR04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptDR04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptDR04::ClickedOnExit(int exitId) { +bool SceneScriptDR04::ClickedOnExit(int exitId) { if (Actor_Query_Goal_Number(35) == 21) { Actor_Force_Stop_Walking(0); Actor_Set_Goal_Number(35, 22); @@ -169,17 +169,17 @@ bool ScriptDR04::ClickedOnExit(int exitId) { return true; //bug? } -bool ScriptDR04::ClickedOn2DRegion(int region) { +bool SceneScriptDR04::ClickedOn2DRegion(int region) { return false; } -bool ScriptDR04::sub_401160() { +bool SceneScriptDR04::sub_401160() { float x, y, z; Actor_Query_XYZ(0, &x, &y, &z); return (x + 1089.94f) * (x + 1089.94f) + (z - 443.49f) * (z - 443.49f) >= (360.0f * 360.0f); } -void ScriptDR04::SceneFrameAdvanced(int frame) { +void SceneScriptDR04::SceneFrameAdvanced(int frame) { if (Game_Flag_Query(515)) { Game_Flag_Reset(515); Game_Flag_Reset(271); @@ -227,10 +227,10 @@ void ScriptDR04::SceneFrameAdvanced(int frame) { } } -void ScriptDR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptDR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptDR04::PlayerWalkedIn() { +void SceneScriptDR04::PlayerWalkedIn() { if (Game_Flag_Query(515)) { Player_Loses_Control(); Delay(4000); @@ -257,13 +257,13 @@ void ScriptDR04::PlayerWalkedIn() { Game_Flag_Reset(231); } -void ScriptDR04::PlayerWalkedOut() { +void SceneScriptDR04::PlayerWalkedOut() { Music_Stop(2); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptDR04::DialogueQueueFlushed(int a1) { +void SceneScriptDR04::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/dr05.cpp b/engines/bladerunner/script/scene/dr05.cpp index c7beafe6ba..0d3908bd94 100644 --- a/engines/bladerunner/script/dr05.cpp +++ b/engines/bladerunner/script/scene/dr05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptDR05::InitializeScene() { +void SceneScriptDR05::InitializeScene() { Setup_Scene_Information(-22.0f, 0.3f, 221.0f, 0); Game_Flag_Reset(228); Scene_Exit_Add_2D_Exit(0, 0, 38, 80, 467, 3); @@ -39,7 +39,7 @@ void ScriptDR05::InitializeScene() { } } -void ScriptDR05::SceneLoaded() { +void SceneScriptDR05::SceneLoaded() { Obstacle_Object("MAN PROPHI", true); Unobstacle_Object("BOX06", true); Unobstacle_Object("BOX183", true); @@ -52,11 +52,11 @@ void ScriptDR05::SceneLoaded() { } } -bool ScriptDR05::MouseClick(int x, int y) { +bool SceneScriptDR05::MouseClick(int x, int y) { return false; } -bool ScriptDR05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptDR05::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("T2 DOORWAY", objectName)) { if (Game_Flag_Query(276) || Actor_Query_Goal_Number(35)) { if (!Loop_Actor_Walk_To_XYZ(0, 57.61f, 0.3f, 69.27f, 0, 1, false, 0)) { @@ -74,11 +74,11 @@ bool ScriptDR05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptDR05::ClickedOnActor(int actorId) { +bool SceneScriptDR05::ClickedOnActor(int actorId) { return false; } -bool ScriptDR05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptDR05::ClickedOnItem(int itemId, bool a2) { if (itemId == 78) { if (Player_Query_Combat_Mode()) { Game_Flag_Set(271); @@ -103,7 +103,7 @@ bool ScriptDR05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptDR05::ClickedOnExit(int exitId) { +bool SceneScriptDR05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -22.0f, 0.3f, 221.0f, 0, 1, false, 0)) { Game_Flag_Reset(232); @@ -115,11 +115,11 @@ bool ScriptDR05::ClickedOnExit(int exitId) { return false; } -bool ScriptDR05::ClickedOn2DRegion(int region) { +bool SceneScriptDR05::ClickedOn2DRegion(int region) { return false; } -void ScriptDR05::SceneFrameAdvanced(int frame) { +void SceneScriptDR05::SceneFrameAdvanced(int frame) { if (frame == 49) { Sound_Play(148, Random_Query(50, 50), 80, 80, 50); } @@ -131,10 +131,10 @@ void ScriptDR05::SceneFrameAdvanced(int frame) { } } -void ScriptDR05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptDR05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptDR05::PlayerWalkedIn() { +void SceneScriptDR05::PlayerWalkedIn() { if (!Game_Flag_Query(511) && !Game_Flag_Query(270) && Game_Flag_Query(272)) { Item_Remove_From_World(122); } @@ -173,7 +173,7 @@ void ScriptDR05::PlayerWalkedIn() { //return false; } -void ScriptDR05::PlayerWalkedOut() { +void SceneScriptDR05::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (Actor_Query_Goal_Number(35) == 10 || Actor_Query_Goal_Number(35) == 18 || Actor_Query_Goal_Number(35) == 19) { @@ -183,7 +183,7 @@ void ScriptDR05::PlayerWalkedOut() { //return false; } -void ScriptDR05::DialogueQueueFlushed(int a1) { +void SceneScriptDR05::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp index f744d21a13..9000111638 100644 --- a/engines/bladerunner/script/dr06.cpp +++ b/engines/bladerunner/script/scene/dr06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptDR06::InitializeScene() { +void SceneScriptDR06::InitializeScene() { if (Game_Flag_Query(230)) { Setup_Scene_Information(-733.57001f, 136.60001f, -968.64001f, 0); } else { @@ -48,7 +48,7 @@ void ScriptDR06::InitializeScene() { } } -void ScriptDR06::SceneLoaded() { +void SceneScriptDR06::SceneLoaded() { Obstacle_Object("X2_ASHTRAY", true); Clickable_Object("X2_ASHTRAY"); Clickable_Object("X2KEYBRD02"); @@ -61,11 +61,11 @@ void ScriptDR06::SceneLoaded() { } } -bool ScriptDR06::MouseClick(int x, int y) { +bool SceneScriptDR06::MouseClick(int x, int y) { return false; } -bool ScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BOX16", objectName)) { Loop_Actor_Walk_To_XYZ(0, -743.0f, 136.6f, -1091.0f, 0, 1, false, 0); Actor_Face_Object(0, "BOX16", true); @@ -168,15 +168,15 @@ bool ScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) { return true; } -bool ScriptDR06::ClickedOnActor(int actorId) { +bool SceneScriptDR06::ClickedOnActor(int actorId) { return false; } -bool ScriptDR06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptDR06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptDR06::ClickedOnExit(int exitId) { +bool SceneScriptDR06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -733.0f, 136.6f, -980.0f, 0, 1, false, 0)) { Game_Flag_Set(231); @@ -194,17 +194,17 @@ bool ScriptDR06::ClickedOnExit(int exitId) { return false; } -bool ScriptDR06::ClickedOn2DRegion(int region) { +bool SceneScriptDR06::ClickedOn2DRegion(int region) { return false; } -void ScriptDR06::SceneFrameAdvanced(int frame) { +void SceneScriptDR06::SceneFrameAdvanced(int frame) { } -void ScriptDR06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptDR06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptDR06::PlayerWalkedIn() { +void SceneScriptDR06::PlayerWalkedIn() { if (Game_Flag_Query(230)) { Loop_Actor_Walk_To_XYZ(0, -729.57f, 136.6f, -1016.0f, 0, 0, false, 0); } @@ -212,13 +212,13 @@ void ScriptDR06::PlayerWalkedIn() { Game_Flag_Reset(551); } -void ScriptDR06::PlayerWalkedOut() { +void SceneScriptDR06::PlayerWalkedOut() { Overlay_Remove("DR06over"); Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptDR06::DialogueQueueFlushed(int a1) { +void SceneScriptDR06::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/hc01.cpp b/engines/bladerunner/script/scene/hc01.cpp index c59eab6ed5..891fa3e216 100644 --- a/engines/bladerunner/script/hc01.cpp +++ b/engines/bladerunner/script/scene/hc01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHC01::InitializeScene() { +void SceneScriptHC01::InitializeScene() { Music_Play(0, 31, 0, 2, -1, 1, 2); if (Game_Flag_Query(385)) { Setup_Scene_Information(64.0f, 0.14f, 83.0f, 266); @@ -65,7 +65,7 @@ void ScriptHC01::InitializeScene() { Scene_Loop_Set_Default(0); } -void ScriptHC01::SceneLoaded() { +void SceneScriptHC01::SceneLoaded() { Obstacle_Object("PILLAR", true); if (Game_Flag_Query(322)) { Preload(19); @@ -84,15 +84,15 @@ void ScriptHC01::SceneLoaded() { } } -bool ScriptHC01::MouseClick(int x, int y) { +bool SceneScriptHC01::MouseClick(int x, int y) { return false; } -bool ScriptHC01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHC01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHC01::ClickedOnActor(int actorId) { +bool SceneScriptHC01::ClickedOnActor(int actorId) { if (actorId == 7 && (Actor_Query_Goal_Number(7) == 150 || Actor_Query_Goal_Number(7) == 0)) { AI_Movement_Track_Pause(7); if (!Loop_Actor_Walk_To_XYZ(0, 624.43f, 0.14f, 83.0f, 0, 1, false, 0)) { @@ -122,7 +122,7 @@ bool ScriptHC01::ClickedOnActor(int actorId) { return false; } -bool ScriptHC01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHC01::ClickedOnItem(int itemId, bool a2) { if (itemId == 107) { Item_Remove_From_World(107); Item_Pickup_Spin_Effect(977, 361, 381); @@ -141,7 +141,7 @@ bool ScriptHC01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHC01::ClickedOnExit(int exitId) { +bool SceneScriptHC01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 814.0f, 0.14f, 153.0f, 0, 1, false, 0)) { Music_Adjust(12, 0, 2); @@ -170,11 +170,11 @@ bool ScriptHC01::ClickedOnExit(int exitId) { return false; } -bool ScriptHC01::ClickedOn2DRegion(int region) { +bool SceneScriptHC01::ClickedOn2DRegion(int region) { return false; } -void ScriptHC01::SceneFrameAdvanced(int frame) { +void SceneScriptHC01::SceneFrameAdvanced(int frame) { Set_Fade_Color(1.0f, 1.0f, 1.0f); if (frame >= 61 && frame < 65) { Set_Fade_Density((frame - 61) / 4.0f); @@ -197,10 +197,10 @@ void ScriptHC01::SceneFrameAdvanced(int frame) { } } -void ScriptHC01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHC01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHC01::PlayerWalkedIn() { +void SceneScriptHC01::PlayerWalkedIn() { if (Game_Flag_Query(385)) { Loop_Actor_Walk_To_XYZ(0, 105.0f, 0.14f, 103.0f, 0, 0, false, 0); Game_Flag_Reset(385); @@ -213,16 +213,16 @@ void ScriptHC01::PlayerWalkedIn() { } } -void ScriptHC01::PlayerWalkedOut() { +void SceneScriptHC01::PlayerWalkedOut() { Set_Fade_Density(0.0f); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptHC01::DialogueQueueFlushed(int a1) { +void SceneScriptHC01::DialogueQueueFlushed(int a1) { } -void ScriptHC01::sub_402384() { +void SceneScriptHC01::sub_402384() { if (!Game_Flag_Query(401)) { Actor_Says(0, 1055, 13); Actor_Says(7, 130, 13); @@ -418,7 +418,7 @@ void ScriptHC01::sub_402384() { } while (!end); } -void ScriptHC01::sub_40346C() { +void SceneScriptHC01::sub_40346C() { Actor_Set_Goal_Number(7, 1); Player_Loses_Control(); Actor_Says(7, 90, 3); diff --git a/engines/bladerunner/script/hc02.cpp b/engines/bladerunner/script/scene/hc02.cpp index c676938410..e4e2ee388d 100644 --- a/engines/bladerunner/script/hc02.cpp +++ b/engines/bladerunner/script/scene/hc02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHC02::InitializeScene() { +void SceneScriptHC02::InitializeScene() { Music_Play(4, 45, -60, 1, -1, 1, 3); if (Game_Flag_Query(109)) { Setup_Scene_Information(-88.0f, 0.14f, -463.0f, 540); @@ -73,19 +73,19 @@ void ScriptHC02::InitializeScene() { } } -void ScriptHC02::SceneLoaded() { +void SceneScriptHC02::SceneLoaded() { Obstacle_Object("BARSTOOL01", true); } -bool ScriptHC02::MouseClick(int x, int y) { +bool SceneScriptHC02::MouseClick(int x, int y) { return false; } -bool ScriptHC02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHC02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHC02::ClickedOnActor(int actorId) { +bool SceneScriptHC02::ClickedOnActor(int actorId) { if (actorId == 32) { if (!Loop_Actor_Walk_To_XYZ(0, -150.51f, 0.14f, 62.74f, 0, 1, false, 0)) { Actor_Face_Actor(0, 32, true); @@ -154,11 +154,11 @@ bool ScriptHC02::ClickedOnActor(int actorId) { return false; } -bool ScriptHC02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHC02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHC02::ClickedOnExit(int exitId) { +bool SceneScriptHC02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 7.0f, 0.14f, 79.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -181,11 +181,11 @@ bool ScriptHC02::ClickedOnExit(int exitId) { return false; } -bool ScriptHC02::ClickedOn2DRegion(int region) { +bool SceneScriptHC02::ClickedOn2DRegion(int region) { return false; } -void ScriptHC02::SceneFrameAdvanced(int frame) { +void SceneScriptHC02::SceneFrameAdvanced(int frame) { if (frame == 70) { Sound_Play(73, 11, 50, -90, 50); } @@ -197,20 +197,20 @@ void ScriptHC02::SceneFrameAdvanced(int frame) { } } -void ScriptHC02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHC02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHC02::PlayerWalkedIn() { +void SceneScriptHC02::PlayerWalkedIn() { if (Game_Flag_Query(109)) { Loop_Actor_Walk_To_XYZ(0, -76.0f, 0.14f, -339.0f, 0, 0, false, 0); Game_Flag_Reset(109); } } -void ScriptHC02::PlayerWalkedOut() { +void SceneScriptHC02::PlayerWalkedOut() { } -void ScriptHC02::DialogueQueueFlushed(int a1) { +void SceneScriptHC02::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/hc03.cpp b/engines/bladerunner/script/scene/hc03.cpp index 58a822c982..8758e3eff4 100644 --- a/engines/bladerunner/script/hc03.cpp +++ b/engines/bladerunner/script/scene/hc03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHC03::InitializeScene() { +void SceneScriptHC03::InitializeScene() { if (Game_Flag_Query(318)) { Setup_Scene_Information(656.0f, 1.61f, -95.0f, 497); Game_Flag_Set(388); @@ -74,7 +74,7 @@ void ScriptHC03::InitializeScene() { } } -void ScriptHC03::SceneLoaded() { +void SceneScriptHC03::SceneLoaded() { Obstacle_Object("GUITAR01", true); if (Game_Flag_Query(403) || Game_Flag_Query(388) || Global_Variable_Query(1) > 3) { Unobstacle_Object("GPscisGate", true); @@ -84,19 +84,19 @@ void ScriptHC03::SceneLoaded() { Unclickable_Object("GUITAR01"); } -bool ScriptHC03::MouseClick(int x, int y) { +bool SceneScriptHC03::MouseClick(int x, int y) { return false; } -bool ScriptHC03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHC03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHC03::ClickedOnActor(int actorId) { +bool SceneScriptHC03::ClickedOnActor(int actorId) { return false; } -bool ScriptHC03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHC03::ClickedOnItem(int itemId, bool a2) { if (itemId == 121) { if (a2) { Scene_Loop_Set_Default(3); @@ -127,7 +127,7 @@ bool ScriptHC03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHC03::ClickedOnExit(int exitId) { +bool SceneScriptHC03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 607.0f, 0.14f, 9.0f, 0, 1, false, 0)) { Game_Flag_Set(387); @@ -155,11 +155,11 @@ bool ScriptHC03::ClickedOnExit(int exitId) { return false; } -bool ScriptHC03::ClickedOn2DRegion(int region) { +bool SceneScriptHC03::ClickedOn2DRegion(int region) { return false; } -void ScriptHC03::SceneFrameAdvanced(int frame) { +void SceneScriptHC03::SceneFrameAdvanced(int frame) { if (frame == 10 || frame == 19 || frame == 29 || frame == 39 || frame == 49 || frame == 59 || frame == 71 || frame == 82 || frame == 91 || frame == 101 || frame == 111 || frame == 121 || frame == 131) { Sound_Play(281, Random_Query(33, 50), 50, 50, 50); } @@ -171,18 +171,18 @@ void ScriptHC03::SceneFrameAdvanced(int frame) { } } -void ScriptHC03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHC03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHC03::PlayerWalkedIn() { +void SceneScriptHC03::PlayerWalkedIn() { } -void ScriptHC03::PlayerWalkedOut() { +void SceneScriptHC03::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptHC03::DialogueQueueFlushed(int a1) { +void SceneScriptHC03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/hc04.cpp b/engines/bladerunner/script/scene/hc04.cpp index 5582a212b5..5f22cdd40c 100644 --- a/engines/bladerunner/script/hc04.cpp +++ b/engines/bladerunner/script/scene/hc04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHC04::InitializeScene() { +void SceneScriptHC04::InitializeScene() { if (Game_Flag_Query(108)) { Setup_Scene_Information(-112.0f, 0.14f, -655.0f, 460); Game_Flag_Reset(108); @@ -68,21 +68,21 @@ void ScriptHC04::InitializeScene() { } } -void ScriptHC04::SceneLoaded() { +void SceneScriptHC04::SceneLoaded() { Obstacle_Object("CAN FIRE", true); Unobstacle_Object("ASIANMALE01", true); Clickable_Object("CAN FIRE"); } -bool ScriptHC04::MouseClick(int x, int y) { +bool SceneScriptHC04::MouseClick(int x, int y) { return false; } -bool ScriptHC04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHC04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHC04::ClickedOnActor(int actorId) { +bool SceneScriptHC04::ClickedOnActor(int actorId) { if (actorId == 59) { if (!Loop_Actor_Walk_To_XYZ(0, -155.0f, 0.0f, -475.0f, 12, 1, false, 0)) { Actor_Face_Actor(0, 59, true); @@ -102,11 +102,11 @@ bool ScriptHC04::ClickedOnActor(int actorId) { return false; } -bool ScriptHC04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHC04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHC04::ClickedOnExit(int exitId) { +bool SceneScriptHC04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -108.0f, 0.14f, -639.0f, 0, 1, false, 0)) { Music_Stop(2); @@ -127,28 +127,28 @@ bool ScriptHC04::ClickedOnExit(int exitId) { return false; } -bool ScriptHC04::ClickedOn2DRegion(int region) { +bool SceneScriptHC04::ClickedOn2DRegion(int region) { return false; } -void ScriptHC04::SceneFrameAdvanced(int frame) { +void SceneScriptHC04::SceneFrameAdvanced(int frame) { } -void ScriptHC04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHC04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHC04::PlayerWalkedIn() { +void SceneScriptHC04::PlayerWalkedIn() { } -void ScriptHC04::PlayerWalkedOut() { +void SceneScriptHC04::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptHC04::DialogueQueueFlushed(int a1) { +void SceneScriptHC04::DialogueQueueFlushed(int a1) { } -void ScriptHC04::sub_401B90() { +void SceneScriptHC04::sub_401B90() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 263) || Actor_Clue_Query(0, 53)) { if (Actor_Clue_Query(0, 47)) { diff --git a/engines/bladerunner/script/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp index 509f472d74..9e5220ff82 100644 --- a/engines/bladerunner/script/hf01.cpp +++ b/engines/bladerunner/script/scene/hf01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHF01::InitializeScene() { +void SceneScriptHF01::InitializeScene() { if (Game_Flag_Query(617)) { Setup_Scene_Information(243.94f, 8.0f, -341.9f, 342); } else if (Game_Flag_Query(313)) { @@ -73,22 +73,22 @@ void ScriptHF01::InitializeScene() { } } -void ScriptHF01::SceneLoaded() { +void SceneScriptHF01::SceneLoaded() { Obstacle_Object("LOFT41", true); if (!Game_Flag_Query(256)) { Unobstacle_Object("OBSTACLE BOX15", true); } } -bool ScriptHF01::MouseClick(int x, int y) { +bool SceneScriptHF01::MouseClick(int x, int y) { return false; } -bool ScriptHF01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHF01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHF01::ClickedOnActor(int actorId) { +bool SceneScriptHF01::ClickedOnActor(int actorId) { int v1; if (Global_Variable_Query(45) == 2) { v1 = 3; @@ -150,11 +150,11 @@ bool ScriptHF01::ClickedOnActor(int actorId) { return false; } -bool ScriptHF01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHF01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHF01::ClickedOnExit(int exitId) { +bool SceneScriptHF01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -202.0f, 8.0f, -619.0f, 0, 1, false, 0)) { Game_Flag_Set(312); @@ -262,11 +262,11 @@ bool ScriptHF01::ClickedOnExit(int exitId) { return false; } -bool ScriptHF01::ClickedOn2DRegion(int region) { +bool SceneScriptHF01::ClickedOn2DRegion(int region) { return false; } -void ScriptHF01::SceneFrameAdvanced(int frame) { +void SceneScriptHF01::SceneFrameAdvanced(int frame) { if (frame == 10) { Sound_Play(118, 40, 0, 0, 50); } @@ -284,10 +284,10 @@ void ScriptHF01::SceneFrameAdvanced(int frame) { } } -void ScriptHF01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHF01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHF01::PlayerWalkedIn() { +void SceneScriptHF01::PlayerWalkedIn() { if (Game_Flag_Query(663)) { ADQ_Flush(); ADQ_Add(24, 280, 3); @@ -347,7 +347,7 @@ void ScriptHF01::PlayerWalkedIn() { //return false; } -void ScriptHF01::PlayerWalkedOut() { +void SceneScriptHF01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(312) && !Game_Flag_Query(308) && !Game_Flag_Query(310) && !Game_Flag_Query(722)) { @@ -369,10 +369,10 @@ void ScriptHF01::PlayerWalkedOut() { } } -void ScriptHF01::DialogueQueueFlushed(int a1) { +void SceneScriptHF01::DialogueQueueFlushed(int a1) { } -void ScriptHF01::sub_4026B4() { +void SceneScriptHF01::sub_4026B4() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 13) == 1) { DM_Add_To_List_Never_Repeat_Once_Selected(440, 8, 6, 3); @@ -437,7 +437,7 @@ void ScriptHF01::sub_4026B4() { } } -void ScriptHF01::sub_4032DC() { +void SceneScriptHF01::sub_4032DC() { Actor_Says(3, 0, 3); Actor_Says(0, 1400, 3); Actor_Says(3, 10, 3); @@ -454,7 +454,7 @@ void ScriptHF01::sub_4032DC() { Actor_Says(3, 80, 3); } -void ScriptHF01::sub_403484() { +void SceneScriptHF01::sub_403484() { Actor_Says(6, 0, 3); Actor_Says(0, 1425, 3); Actor_Says(6, 10, 3); diff --git a/engines/bladerunner/script/hf02.cpp b/engines/bladerunner/script/scene/hf02.cpp index 575e3f8604..a301f1f6dd 100644 --- a/engines/bladerunner/script/hf02.cpp +++ b/engines/bladerunner/script/scene/hf02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHF02::InitializeScene() { +void SceneScriptHF02::InitializeScene() { if (Game_Flag_Query(567)) { Setup_Scene_Information(874.0f, 47.76f, -252.0f, 775); Game_Flag_Reset(567); @@ -53,7 +53,7 @@ void ScriptHF02::InitializeScene() { Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); } -void ScriptHF02::SceneLoaded() { +void SceneScriptHF02::SceneLoaded() { Obstacle_Object("BARD_NEON", true); Unclickable_Object("BARD_NEON"); if (Actor_Query_Goal_Number(1) == 234) { @@ -65,24 +65,24 @@ void ScriptHF02::SceneLoaded() { } } -bool ScriptHF02::MouseClick(int x, int y) { +bool SceneScriptHF02::MouseClick(int x, int y) { return false; } -bool ScriptHF02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHF02::ClickedOn3DObject(const char *objectName, bool a2) { Sound_Play(342, 47, -80, 0, 50); return false; } -bool ScriptHF02::ClickedOnActor(int actorId) { +bool SceneScriptHF02::ClickedOnActor(int actorId) { return false; } -bool ScriptHF02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHF02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHF02::ClickedOnExit(int exitId) { +bool SceneScriptHF02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 42.0f, 47.76f, -296.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -104,18 +104,18 @@ bool ScriptHF02::ClickedOnExit(int exitId) { return false; } -bool ScriptHF02::ClickedOn2DRegion(int region) { +bool SceneScriptHF02::ClickedOn2DRegion(int region) { return false; } -void ScriptHF02::SceneFrameAdvanced(int frame) { +void SceneScriptHF02::SceneFrameAdvanced(int frame) { } -void ScriptHF02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHF02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHF02::PlayerWalkedIn() { +void SceneScriptHF02::PlayerWalkedIn() { if (Actor_Query_Goal_Number(1) == 240) { Actor_Set_Goal_Number(1, 241); } @@ -135,10 +135,10 @@ void ScriptHF02::PlayerWalkedIn() { } } -void ScriptHF02::PlayerWalkedOut() { +void SceneScriptHF02::PlayerWalkedOut() { } -void ScriptHF02::DialogueQueueFlushed(int a1) { +void SceneScriptHF02::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/hf03.cpp b/engines/bladerunner/script/scene/hf03.cpp index f146b08752..b95d8a6bab 100644 --- a/engines/bladerunner/script/hf03.cpp +++ b/engines/bladerunner/script/scene/hf03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHF03::InitializeScene() { +void SceneScriptHF03::InitializeScene() { if (Game_Flag_Query(527)) { Setup_Scene_Information(479.0f, 47.76f, -496.0f, 600); } else { @@ -45,23 +45,23 @@ void ScriptHF03::InitializeScene() { Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); } -void ScriptHF03::SceneLoaded() { +void SceneScriptHF03::SceneLoaded() { Obstacle_Object("MAIN", true); Unclickable_Object("MAIN"); } -bool ScriptHF03::MouseClick(int x, int y) { +bool SceneScriptHF03::MouseClick(int x, int y) { return false; } -bool ScriptHF03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHF03::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click(objectName, "MAIN")) { Actor_Says(0, Random_Query(0, 3) + 8525, 18); } return false; } -void ScriptHF03::sub_401C80() { +void SceneScriptHF03::sub_401C80() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(840, -1, 3, 8); DM_Add_To_List_Never_Repeat_Once_Selected(850, 6, 5, 2); @@ -148,7 +148,7 @@ void ScriptHF03::sub_401C80() { } } -bool ScriptHF03::ClickedOnActor(int actorId) { +bool SceneScriptHF03::ClickedOnActor(int actorId) { if (actorId == 6 && Actor_Query_Goal_Number(6) == 205) { if (Game_Flag_Query(46) ? !Loop_Actor_Walk_To_Waypoint(0, 377, 0, 1, false) : !Loop_Actor_Walk_To_Waypoint(0, 378, 0, 1, false)) { Actor_Face_Actor(0, 6, true); @@ -182,11 +182,11 @@ bool ScriptHF03::ClickedOnActor(int actorId) { return false; } -bool ScriptHF03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHF03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHF03::ClickedOnExit(int exitId) { +bool SceneScriptHF03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 179.0f, 46.76f, -824.0f, 0, 1, false, 0)) { Game_Flag_Set(311); @@ -211,17 +211,17 @@ bool ScriptHF03::ClickedOnExit(int exitId) { return false; } -bool ScriptHF03::ClickedOn2DRegion(int region) { +bool SceneScriptHF03::ClickedOn2DRegion(int region) { return false; } -void ScriptHF03::SceneFrameAdvanced(int frame) { +void SceneScriptHF03::SceneFrameAdvanced(int frame) { } -void ScriptHF03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHF03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHF03::PlayerWalkedIn() { +void SceneScriptHF03::PlayerWalkedIn() { if (Game_Flag_Query(527)) { Loop_Actor_Walk_To_XYZ(0, 479.0f, 47.76f, -524.0f, 0, 0, false, 0); Game_Flag_Reset(527); @@ -243,12 +243,12 @@ void ScriptHF03::PlayerWalkedIn() { } } -void ScriptHF03::PlayerWalkedOut() { +void SceneScriptHF03::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptHF03::DialogueQueueFlushed(int a1) { +void SceneScriptHF03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/hf04.cpp b/engines/bladerunner/script/scene/hf04.cpp index afeda9fdc3..3e699b7f05 100644 --- a/engines/bladerunner/script/hf04.cpp +++ b/engines/bladerunner/script/scene/hf04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHF04::InitializeScene() { +void SceneScriptHF04::InitializeScene() { Setup_Scene_Information(-33.85f, -0.31f, 395.0f, 0); Game_Flag_Reset(566); Scene_Exit_Add_2D_Exit(0, 602, 104, 639, 177, 1); @@ -43,7 +43,7 @@ void ScriptHF04::InitializeScene() { } } -void ScriptHF04::SceneLoaded() { +void SceneScriptHF04::SceneLoaded() { if (Game_Flag_Query(584)) { Unobstacle_Object("PIVOT_WALL#1", true); Unobstacle_Object("PIVOT_WALL#02", true); @@ -62,23 +62,23 @@ void ScriptHF04::SceneLoaded() { } } -bool ScriptHF04::MouseClick(int x, int y) { +bool SceneScriptHF04::MouseClick(int x, int y) { return false; } -bool ScriptHF04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHF04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHF04::ClickedOnActor(int actorId) { +bool SceneScriptHF04::ClickedOnActor(int actorId) { return false; } -bool ScriptHF04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHF04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHF04::ClickedOnExit(int exitId) { +bool SceneScriptHF04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 1132.27f, -0.31f, -113.46f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -91,11 +91,11 @@ bool ScriptHF04::ClickedOnExit(int exitId) { return false; } -bool ScriptHF04::ClickedOn2DRegion(int region) { +bool SceneScriptHF04::ClickedOn2DRegion(int region) { return false; } -void ScriptHF04::SceneFrameAdvanced(int frame) { +void SceneScriptHF04::SceneFrameAdvanced(int frame) { if (frame == 62) { Sound_Play(359, Random_Query(43, 43), 0, 0, 50); } @@ -145,10 +145,10 @@ void ScriptHF04::SceneFrameAdvanced(int frame) { //return false; } -void ScriptHF04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHF04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHF04::PlayerWalkedIn() { +void SceneScriptHF04::PlayerWalkedIn() { if (Actor_Query_Goal_Number(6) == 230 || Actor_Query_Goal_Number(6) == 233) { Player_Set_Combat_Mode(true); Music_Play(1, 60, 0, 2, -1, 0, 0); @@ -157,11 +157,11 @@ void ScriptHF04::PlayerWalkedIn() { Delay(2500); } -void ScriptHF04::PlayerWalkedOut() { +void SceneScriptHF04::PlayerWalkedOut() { Music_Stop(5); } -void ScriptHF04::DialogueQueueFlushed(int a1) { +void SceneScriptHF04::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp index f569f48b7d..5370cb9d56 100644 --- a/engines/bladerunner/script/hf05.cpp +++ b/engines/bladerunner/script/scene/hf05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHF05::InitializeScene() { +void SceneScriptHF05::InitializeScene() { if (Game_Flag_Query(530)) { Setup_Scene_Information(257.0f, 40.63f, 402.0f, 1000); } else if (Game_Flag_Query(358)) { @@ -49,7 +49,7 @@ void ScriptHF05::InitializeScene() { } } -void ScriptHF05::SceneLoaded() { +void SceneScriptHF05::SceneLoaded() { Obstacle_Object("MAINBASE", true); Unobstacle_Object("BTIRES02", true); Unobstacle_Object("LFTIRE02", true); @@ -61,11 +61,11 @@ void ScriptHF05::SceneLoaded() { Clickable_Object("TOP CON"); } -bool ScriptHF05::MouseClick(int x, int y) { +bool SceneScriptHF05::MouseClick(int x, int y) { return false; } -bool ScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("TOP CON", objectName) == 1) { if (!Loop_Actor_Walk_To_XYZ(0, 95.0f, 40.63f, 308.0f, 0, 1, false, 0)) { Actor_Face_Object(0, "TOP CON", true); @@ -127,7 +127,7 @@ bool ScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHF05::ClickedOnActor(int actorId) { +bool SceneScriptHF05::ClickedOnActor(int actorId) { if (actorId == 9) { if (!Loop_Actor_Walk_To_Actor(0, 9, 60, 1, false)) { Actor_Face_Actor(0, 9, true); @@ -138,11 +138,11 @@ bool ScriptHF05::ClickedOnActor(int actorId) { return false; } -bool ScriptHF05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHF05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHF05::ClickedOnExit(int exitId) { +bool SceneScriptHF05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 483.0f, 40.63f, -189.0f, 0, 1, false, 0) && !Game_Flag_Query(684)) { Game_Flag_Set(313); @@ -172,11 +172,11 @@ bool ScriptHF05::ClickedOnExit(int exitId) { return false; } -bool ScriptHF05::ClickedOn2DRegion(int region) { +bool SceneScriptHF05::ClickedOn2DRegion(int region) { return false; } -void ScriptHF05::SceneFrameAdvanced(int frame) { +void SceneScriptHF05::SceneFrameAdvanced(int frame) { switch (frame) { case 126: Sound_Play(352, 90, -20, 70, 50); @@ -222,7 +222,7 @@ void ScriptHF05::SceneFrameAdvanced(int frame) { //return true; } -void ScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == 23 && newGoal == 430) { Game_Flag_Set(684); sub_4042E4(); @@ -230,7 +230,7 @@ void ScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool cu //return false; } -void ScriptHF05::PlayerWalkedIn() { +void SceneScriptHF05::PlayerWalkedIn() { if (Game_Flag_Query(662)) { int v0 = sub_404858(); if (Game_Flag_Query(662) && v0 != -1) { @@ -289,7 +289,7 @@ void ScriptHF05::PlayerWalkedIn() { //return false; } -void ScriptHF05::PlayerWalkedOut() { +void SceneScriptHF05::PlayerWalkedOut() { if (Actor_Query_Goal_Number(9) == 210) { Actor_Set_Goal_Number(9, 2); } @@ -297,10 +297,10 @@ void ScriptHF05::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptHF05::DialogueQueueFlushed(int a1) { +void SceneScriptHF05::DialogueQueueFlushed(int a1) { } -void ScriptHF05::sub_402970() { +void SceneScriptHF05::sub_402970() { Loop_Actor_Walk_To_Actor(9, 0, 72, 0, false); Actor_Face_Actor(9, 0, true); Actor_Face_Actor(0, 9, true); @@ -315,7 +315,7 @@ void ScriptHF05::sub_402970() { Actor_Says(0, 1865, 3); } -void ScriptHF05::sub_402AE4() { +void SceneScriptHF05::sub_402AE4() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 99) == 1 && Global_Variable_Query(1) == 3) { DM_Add_To_List_Never_Repeat_Once_Selected(1180, 3, 6, 7); @@ -444,7 +444,7 @@ void ScriptHF05::sub_402AE4() { } } -void ScriptHF05::sub_403738() { +void SceneScriptHF05::sub_403738() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1250, -1, -1, 10); DM_Add_To_List_Never_Repeat_Once_Selected(1260, 10, 5, -1); @@ -482,7 +482,7 @@ void ScriptHF05::sub_403738() { } } -int ScriptHF05::sub_404858() { +int SceneScriptHF05::sub_404858() { if (Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(3) != 599) { return 3; } @@ -492,7 +492,7 @@ int ScriptHF05::sub_404858() { return -1; } -void ScriptHF05::sub_4042E4() { +void SceneScriptHF05::sub_4042E4() { Actor_Force_Stop_Walking(0); Actor_Put_In_Set(23, 41); Actor_Set_At_XYZ(23, 430.39999f, 40.630001f, -258.17999f, 300); @@ -505,7 +505,7 @@ void ScriptHF05::sub_4042E4() { return Non_Player_Actor_Combat_Mode_On(24, 3, 1, 0, 4, 4, 7, 8, 0, 0, 100, 100, 300, 1); } -void ScriptHF05::sub_403F0C() { +void SceneScriptHF05::sub_403F0C() { Actor_Face_Actor(0, 3, true); Actor_Face_Actor(3, 0, true); Actor_Says(3, 2660, 12); @@ -524,7 +524,7 @@ void ScriptHF05::sub_403F0C() { Actor_Says_With_Pause(0, 1780, 1.0f, 18); } -void ScriptHF05::sub_40410C() { +void SceneScriptHF05::sub_40410C() { Actor_Face_Actor(0, 6, true); Actor_Face_Actor(6, 0, true); Actor_Says(6, 400, 16); @@ -542,7 +542,7 @@ void ScriptHF05::sub_40410C() { Actor_Says_With_Pause(0, 1780, 1.0f, 18); } -void ScriptHF05::sub_403A34(int actorId) { +void SceneScriptHF05::sub_403A34(int actorId) { if (actorId != -1 && Actor_Query_In_Set(9, 41)) { Async_Actor_Walk_To_Waypoint(actorId, 437, 36, 0); Loop_Actor_Walk_To_Waypoint(0, 437, 0, 0, false); @@ -592,7 +592,7 @@ void ScriptHF05::sub_403A34(int actorId) { } } -void ScriptHF05::sub_402370() { +void SceneScriptHF05::sub_402370() { Player_Loses_Control(); if (Global_Variable_Query(1) == 3) { ADQ_Flush(); @@ -647,7 +647,7 @@ void ScriptHF05::sub_402370() { Player_Gains_Control(); } -void ScriptHF05::sub_404474() { +void SceneScriptHF05::sub_404474() { Ambient_Sounds_Add_Sound(87, 20, 80, 20, 100, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Speech_Sound(23, 250, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(23, 330, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1); @@ -660,7 +660,7 @@ void ScriptHF05::sub_404474() { Ambient_Sounds_Add_Speech_Sound(38, 280, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1); } -int ScriptHF05::sub_4048C0() { +int SceneScriptHF05::sub_4048C0() { if (Actor_Query_In_Set(3, 41) == 1 && Actor_Query_Goal_Number(3) != 599) { return 3; } diff --git a/engines/bladerunner/script/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp index d9a5b3a2fe..2be8565551 100644 --- a/engines/bladerunner/script/hf06.cpp +++ b/engines/bladerunner/script/scene/hf06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHF06::InitializeScene() { +void SceneScriptHF06::InitializeScene() { Setup_Scene_Information(150.0f, 349.93f, 502.0f, 229); Game_Flag_Reset(529); Scene_Exit_Add_2D_Exit(0, 195, 197, 271, 237, 2); @@ -44,7 +44,7 @@ void ScriptHF06::InitializeScene() { } } -void ScriptHF06::SceneLoaded() { +void SceneScriptHF06::SceneLoaded() { Unobstacle_Object("BOX22", true); Unobstacle_Object("BOX34", true); Clickable_Object("BOX19"); @@ -56,11 +56,11 @@ void ScriptHF06::SceneLoaded() { Clickable_Object("BOX30"); } -bool ScriptHF06::MouseClick(int x, int y) { +bool SceneScriptHF06::MouseClick(int x, int y) { return false; } -bool ScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BOX28", objectName) || Object_Query_Click("BOX29", objectName) || Object_Query_Click("BOX30", objectName) || Object_Query_Click("HOOD BOX", objectName)) { if (!Loop_Actor_Walk_To_XYZ(0, 14.33f, 367.93f, 399.0f, 0, 1, false, 0)) { Actor_Face_Heading(0, 486, true); @@ -95,7 +95,7 @@ bool ScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHF06::ClickedOnActor(int actorId) { +bool SceneScriptHF06::ClickedOnActor(int actorId) { if (actorId == 6 && Actor_Query_Goal_Number(6) != 599) { Actor_Face_Actor(6, 0, true); Actor_Face_Actor(0, 6, true); @@ -114,11 +114,11 @@ bool ScriptHF06::ClickedOnActor(int actorId) { return false; } -bool ScriptHF06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHF06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHF06::ClickedOnExit(int exitId) { +bool SceneScriptHF06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 170.0f, 367.93f, 497.0f, 0, 1, false, 0)) { Actor_Face_Heading(0, 730, false); @@ -133,14 +133,14 @@ bool ScriptHF06::ClickedOnExit(int exitId) { return false; } -bool ScriptHF06::ClickedOn2DRegion(int region) { +bool SceneScriptHF06::ClickedOn2DRegion(int region) { return false; } -void ScriptHF06::SceneFrameAdvanced(int frame) { +void SceneScriptHF06::SceneFrameAdvanced(int frame) { } -void ScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == 1 && oldGoal != 599 && newGoal == 599) { Loop_Actor_Walk_To_Actor(0, 1, 24, 0, false); Actor_Says(1, 250, -1); @@ -178,7 +178,7 @@ void ScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool cu } } -void ScriptHF06::PlayerWalkedIn() { +void SceneScriptHF06::PlayerWalkedIn() { if (Game_Flag_Query(662)) { int actor_id; if (Global_Variable_Query(45) == 3 && Actor_Query_Goal_Number(6) != 599) { @@ -205,14 +205,14 @@ void ScriptHF06::PlayerWalkedIn() { } } -void ScriptHF06::PlayerWalkedOut() { +void SceneScriptHF06::PlayerWalkedOut() { Music_Stop(2); } -void ScriptHF06::DialogueQueueFlushed(int a1) { +void SceneScriptHF06::DialogueQueueFlushed(int a1) { } -void ScriptHF06::sub_401EF4() { +void SceneScriptHF06::sub_401EF4() { int actorId; if (Actor_Query_In_Set(3, 42)) { @@ -270,7 +270,7 @@ void ScriptHF06::sub_401EF4() { Non_Player_Actor_Combat_Mode_On(1, 3, 1, actorId, 15, 4, 7, 8, 0, 0, 100, 10, 300, 0); } -void ScriptHF06::sub_4023E0() { +void SceneScriptHF06::sub_4023E0() { Ambient_Sounds_Add_Sound(87, 20, 80, 20, 100, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Speech_Sound(23, 250, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(23, 330, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1); diff --git a/engines/bladerunner/script/hf07.cpp b/engines/bladerunner/script/scene/hf07.cpp index aa096004b3..1669afb104 100644 --- a/engines/bladerunner/script/hf07.cpp +++ b/engines/bladerunner/script/scene/hf07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptHF07::InitializeScene() { +void SceneScriptHF07::InitializeScene() { if (Game_Flag_Query(361) ) { Setup_Scene_Information(-84.0f, 58.43f, -105.0f, 524); } else { @@ -44,29 +44,29 @@ void ScriptHF07::InitializeScene() { } } -void ScriptHF07::SceneLoaded() { +void SceneScriptHF07::SceneLoaded() { Obstacle_Object("BRIMS02", true); Unobstacle_Object("BOX50", true); Unobstacle_Object("BOX60", true); } -bool ScriptHF07::MouseClick(int x, int y) { +bool SceneScriptHF07::MouseClick(int x, int y) { return false; } -bool ScriptHF07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptHF07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptHF07::ClickedOnActor(int actorId) { +bool SceneScriptHF07::ClickedOnActor(int actorId) { return false; } -bool ScriptHF07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptHF07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptHF07::ClickedOnExit(int exitId) { +bool SceneScriptHF07::ClickedOnExit(int exitId) { if (exitId == 0) { if (Actor_Query_In_Set(3, 43)) { Async_Actor_Walk_To_XYZ(3, 235.0f, 58.43f, -100.0f, 0, false); @@ -104,17 +104,17 @@ bool ScriptHF07::ClickedOnExit(int exitId) { return false; } -bool ScriptHF07::ClickedOn2DRegion(int region) { +bool SceneScriptHF07::ClickedOn2DRegion(int region) { return false; } -void ScriptHF07::SceneFrameAdvanced(int frame) { +void SceneScriptHF07::SceneFrameAdvanced(int frame) { } -void ScriptHF07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptHF07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptHF07::PlayerWalkedIn() { +void SceneScriptHF07::PlayerWalkedIn() { if (Game_Flag_Query(662)) { int actorId = sub_401864(); if (Game_Flag_Query(662) && actorId != -1) { @@ -135,13 +135,13 @@ void ScriptHF07::PlayerWalkedIn() { Game_Flag_Reset(361); } -void ScriptHF07::PlayerWalkedOut() { +void SceneScriptHF07::PlayerWalkedOut() { } -void ScriptHF07::DialogueQueueFlushed(int a1) { +void SceneScriptHF07::DialogueQueueFlushed(int a1) { } -int ScriptHF07::sub_401864() { +int SceneScriptHF07::sub_401864() { if (Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(3) != 599) { return 3; } diff --git a/engines/bladerunner/script/kp01.cpp b/engines/bladerunner/script/scene/kp01.cpp index b4a91e79cf..cdaffe91be 100644 --- a/engines/bladerunner/script/kp01.cpp +++ b/engines/bladerunner/script/scene/kp01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptKP01::InitializeScene() { +void SceneScriptKP01::InitializeScene() { if (Game_Flag_Query(416)) { Setup_Scene_Information(-125.0f, -12.2f, -61.0f, 400); } else if (Game_Flag_Query(418)) { @@ -53,7 +53,7 @@ void ScriptKP01::InitializeScene() { Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0); } -void ScriptKP01::SceneLoaded() { +void SceneScriptKP01::SceneLoaded() { Unobstacle_Object("TRAINCAR-1", true); Unobstacle_Object("FORE-JUNK-02", true); Obstacle_Object("OBSTACLE1", true); @@ -61,23 +61,23 @@ void ScriptKP01::SceneLoaded() { Unclickable_Object("OBSTACLE1"); } -bool ScriptKP01::MouseClick(int x, int y) { +bool SceneScriptKP01::MouseClick(int x, int y) { return false; } -bool ScriptKP01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptKP01::ClickedOnActor(int actorId) { +bool SceneScriptKP01::ClickedOnActor(int actorId) { return false; } -bool ScriptKP01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptKP01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptKP01::ClickedOnExit(int exitId) { +bool SceneScriptKP01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -125.0f, -12.2f, -61.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -109,14 +109,14 @@ bool ScriptKP01::ClickedOnExit(int exitId) { } -bool ScriptKP01::ClickedOn2DRegion(int region) { +bool SceneScriptKP01::ClickedOn2DRegion(int region) { return false; } -void ScriptKP01::SceneFrameAdvanced(int frame) { +void SceneScriptKP01::SceneFrameAdvanced(int frame) { } -void ScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == 1) { if (newGoal == 422) { if (Game_Flag_Query(378) == 1) { @@ -143,7 +143,7 @@ void ScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool cu //return false; } -void ScriptKP01::PlayerWalkedIn() { +void SceneScriptKP01::PlayerWalkedIn() { if (Game_Flag_Query(416)) { Loop_Actor_Walk_To_XYZ(0, -93.0f, -12.2f, -61.0f, 0, 0, false, 0); Game_Flag_Reset(416); @@ -162,10 +162,10 @@ void ScriptKP01::PlayerWalkedIn() { } } -void ScriptKP01::PlayerWalkedOut() { +void SceneScriptKP01::PlayerWalkedOut() { } -void ScriptKP01::DialogueQueueFlushed(int a1) { +void SceneScriptKP01::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/kp02.cpp b/engines/bladerunner/script/scene/kp02.cpp index 08a2b835ac..906f80da28 100644 --- a/engines/bladerunner/script/kp02.cpp +++ b/engines/bladerunner/script/scene/kp02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptKP02::InitializeScene() { +void SceneScriptKP02::InitializeScene() { if (Game_Flag_Query(414)) { Setup_Scene_Information(-884.0f, -615.49f, 3065.0f, 20); } else { @@ -46,7 +46,7 @@ void ScriptKP02::InitializeScene() { Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0); } -void ScriptKP02::SceneLoaded() { +void SceneScriptKP02::SceneLoaded() { Obstacle_Object("VAN GRATE", true); Clickable_Object("VAN GRATE"); Unobstacle_Object("VAN GRATE", true); @@ -57,23 +57,23 @@ void ScriptKP02::SceneLoaded() { Unclickable_Object("VAN GRATE"); } -bool ScriptKP02::MouseClick(int x, int y) { +bool SceneScriptKP02::MouseClick(int x, int y) { return false; } -bool ScriptKP02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptKP02::ClickedOnActor(int actorId) { +bool SceneScriptKP02::ClickedOnActor(int actorId) { return false; } -bool ScriptKP02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptKP02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptKP02::ClickedOnExit(int exitId) { +bool SceneScriptKP02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -1040.0f, -615.49f, 2903.0f, 0, 1, false, 0)) { if (Actor_Query_Goal_Number(65) == 406 || Actor_Query_Goal_Number(64) == 406) { @@ -117,17 +117,17 @@ bool ScriptKP02::ClickedOnExit(int exitId) { return false; } -bool ScriptKP02::ClickedOn2DRegion(int region) { +bool SceneScriptKP02::ClickedOn2DRegion(int region) { return false; } -void ScriptKP02::SceneFrameAdvanced(int frame) { +void SceneScriptKP02::SceneFrameAdvanced(int frame) { } -void ScriptKP02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptKP02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptKP02::PlayerWalkedIn() { +void SceneScriptKP02::PlayerWalkedIn() { if (Game_Flag_Query(414)) { Loop_Actor_Walk_To_XYZ(0, -884.0f, -615.49f, 3035.0f, 0, 0, false, 0); Game_Flag_Reset(414); @@ -138,10 +138,10 @@ void ScriptKP02::PlayerWalkedIn() { //return false; } -void ScriptKP02::PlayerWalkedOut() { +void SceneScriptKP02::PlayerWalkedOut() { } -void ScriptKP02::DialogueQueueFlushed(int a1) { +void SceneScriptKP02::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/kp03.cpp b/engines/bladerunner/script/scene/kp03.cpp index 57a1eb521b..49fc01c1ec 100644 --- a/engines/bladerunner/script/kp03.cpp +++ b/engines/bladerunner/script/scene/kp03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptKP03::InitializeScene() { +void SceneScriptKP03::InitializeScene() { if (Game_Flag_Query(420)) { Setup_Scene_Information(1.0f, -36.55f, 111.0f, 200); } else { @@ -52,7 +52,7 @@ void ScriptKP03::InitializeScene() { } } -void ScriptKP03::SceneLoaded() { +void SceneScriptKP03::SceneLoaded() { Obstacle_Object("BRACK MID", true); Unobstacle_Object("OBSTACLE_REMOVE", true); Unobstacle_Object("BOX11", true); @@ -60,11 +60,11 @@ void ScriptKP03::SceneLoaded() { Clickable_Object("BRACK MID"); } -bool ScriptKP03::MouseClick(int x, int y) { +bool SceneScriptKP03::MouseClick(int x, int y) { return false; } -bool ScriptKP03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP03::ClickedOn3DObject(const char *objectName, bool a2) { Actor_Face_Object(1, "BRACK MID", true); if (Object_Query_Click("BRACK MID", objectName) && !Game_Flag_Query(422)) { if (a2) { @@ -103,7 +103,7 @@ bool ScriptKP03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptKP03::ClickedOnActor(int actorId) { +bool SceneScriptKP03::ClickedOnActor(int actorId) { if (actorId == 1 && Actor_Query_Goal_Number(1) == 411) { Actor_Face_Object(1, "BRACK MID", true); sub_401E54(); @@ -111,11 +111,11 @@ bool ScriptKP03::ClickedOnActor(int actorId) { return false; } -bool ScriptKP03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptKP03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptKP03::ClickedOnExit(int exitId) { +bool SceneScriptKP03::ClickedOnExit(int exitId) { if (Actor_Query_Goal_Number(1) == 410) { Actor_Set_Goal_Number(1, 418); } else { @@ -147,11 +147,11 @@ bool ScriptKP03::ClickedOnExit(int exitId) { return false; } -bool ScriptKP03::ClickedOn2DRegion(int region) { +bool SceneScriptKP03::ClickedOn2DRegion(int region) { return false; } -void ScriptKP03::SceneFrameAdvanced(int frame) { +void SceneScriptKP03::SceneFrameAdvanced(int frame) { int v1; float x, y, z; @@ -201,10 +201,10 @@ void ScriptKP03::SceneFrameAdvanced(int frame) { } } -void ScriptKP03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptKP03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptKP03::PlayerWalkedIn() { +void SceneScriptKP03::PlayerWalkedIn() { if (Game_Flag_Query(420)) { Loop_Actor_Walk_To_XYZ(0, 1.0f, -36.55f, 87.0f, 0, 0, false, 0); } @@ -221,13 +221,13 @@ void ScriptKP03::PlayerWalkedIn() { } } -void ScriptKP03::PlayerWalkedOut() { +void SceneScriptKP03::PlayerWalkedOut() { } -void ScriptKP03::DialogueQueueFlushed(int a1) { +void SceneScriptKP03::DialogueQueueFlushed(int a1) { } -void ScriptKP03::sub_401E54() { +void SceneScriptKP03::sub_401E54() { Player_Loses_Control(); Actor_Says(0, 2180, 14); Actor_Set_Goal_Number(1, 412); diff --git a/engines/bladerunner/script/kp04.cpp b/engines/bladerunner/script/scene/kp04.cpp index cc2ed3fe71..0ace6d23f8 100644 --- a/engines/bladerunner/script/kp04.cpp +++ b/engines/bladerunner/script/scene/kp04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptKP04::InitializeScene() { +void SceneScriptKP04::InitializeScene() { if (Game_Flag_Query(575)) { Setup_Scene_Information(-544.0f, 94.89f, 288.0f, 700); } else { @@ -46,29 +46,29 @@ void ScriptKP04::InitializeScene() { Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0); } -void ScriptKP04::SceneLoaded() { +void SceneScriptKP04::SceneLoaded() { Obstacle_Object("BUILDING04", true); Unobstacle_Object("BOX06", true); Unclickable_Object("BUILDING04"); } -bool ScriptKP04::MouseClick(int x, int y) { +bool SceneScriptKP04::MouseClick(int x, int y) { return false; } -bool ScriptKP04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptKP04::ClickedOnActor(int actorId) { +bool SceneScriptKP04::ClickedOnActor(int actorId) { return false; } -bool ScriptKP04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptKP04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptKP04::ClickedOnExit(int exitId) { +bool SceneScriptKP04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -905.0f, 94.89f, 1357.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -90,17 +90,17 @@ bool ScriptKP04::ClickedOnExit(int exitId) { return false; } -bool ScriptKP04::ClickedOn2DRegion(int region) { +bool SceneScriptKP04::ClickedOn2DRegion(int region) { return false; } -void ScriptKP04::SceneFrameAdvanced(int frame) { +void SceneScriptKP04::SceneFrameAdvanced(int frame) { } -void ScriptKP04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptKP04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptKP04::PlayerWalkedIn() { +void SceneScriptKP04::PlayerWalkedIn() { if (Game_Flag_Query(575)) { Loop_Actor_Walk_To_XYZ(0, -584.0f, 94.89f, 288.0f, 0, 0, false, 0); Game_Flag_Reset(575); @@ -109,10 +109,10 @@ void ScriptKP04::PlayerWalkedIn() { } } -void ScriptKP04::PlayerWalkedOut() { +void SceneScriptKP04::PlayerWalkedOut() { } -void ScriptKP04::DialogueQueueFlushed(int a1) { +void SceneScriptKP04::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/kp05.cpp b/engines/bladerunner/script/scene/kp05.cpp index 2e1de932d4..3fb963534d 100644 --- a/engines/bladerunner/script/kp05.cpp +++ b/engines/bladerunner/script/scene/kp05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptKP05::InitializeScene() { +void SceneScriptKP05::InitializeScene() { if (Game_Flag_Query(577)) { Setup_Scene_Information(-868.0f, 0.0f, -68.0f, 520); } else if (Game_Flag_Query(574)) { @@ -49,7 +49,7 @@ void ScriptKP05::InitializeScene() { Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0); } -void ScriptKP05::SceneLoaded() { +void SceneScriptKP05::SceneLoaded() { Unobstacle_Object("OBSTACLEBOX20", true); Clickable_Object("BRIDGE02"); Unclickable_Object("BRIDGE02"); @@ -58,19 +58,19 @@ void ScriptKP05::SceneLoaded() { } } -bool ScriptKP05::MouseClick(int x, int y) { +bool SceneScriptKP05::MouseClick(int x, int y) { return false; } -bool ScriptKP05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptKP05::ClickedOnActor(int actorId) { +bool SceneScriptKP05::ClickedOnActor(int actorId) { return false; } -bool ScriptKP05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptKP05::ClickedOnItem(int itemId, bool a2) { if (itemId == 118) { if (!Loop_Actor_Walk_To_XYZ(0, -1058.0f, 0.0f, 852.0f, 0, 1, false, 0)) { Actor_Face_Item(0, 118, true); @@ -82,7 +82,7 @@ bool ScriptKP05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptKP05::ClickedOnExit(int exitId) { +bool SceneScriptKP05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -802.0f, 0.0f, 972.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -114,17 +114,17 @@ bool ScriptKP05::ClickedOnExit(int exitId) { return false; } -bool ScriptKP05::ClickedOn2DRegion(int region) { +bool SceneScriptKP05::ClickedOn2DRegion(int region) { return false; } -void ScriptKP05::SceneFrameAdvanced(int frame) { +void SceneScriptKP05::SceneFrameAdvanced(int frame) { } -void ScriptKP05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptKP05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptKP05::PlayerWalkedIn() { +void SceneScriptKP05::PlayerWalkedIn() { if (Game_Flag_Query(577)) { Game_Flag_Reset(577); } else if (Game_Flag_Query(574)) { @@ -162,10 +162,10 @@ void ScriptKP05::PlayerWalkedIn() { } } -void ScriptKP05::PlayerWalkedOut() { +void SceneScriptKP05::PlayerWalkedOut() { } -void ScriptKP05::DialogueQueueFlushed(int a1) { +void SceneScriptKP05::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/kp06.cpp b/engines/bladerunner/script/scene/kp06.cpp index 094cc257c9..a56080af23 100644 --- a/engines/bladerunner/script/kp06.cpp +++ b/engines/bladerunner/script/scene/kp06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptKP06::InitializeScene() { +void SceneScriptKP06::InitializeScene() { if (Game_Flag_Query(579) ) { Setup_Scene_Information(-755.0f, 8.26f, -665.0f, 640); } else { @@ -53,7 +53,7 @@ void ScriptKP06::InitializeScene() { } } -void ScriptKP06::SceneLoaded() { +void SceneScriptKP06::SceneLoaded() { Obstacle_Object("TRASH CAN WITH FIRE", true); Obstacle_Object("MOONBUS", true); Obstacle_Object("STAIR 1", true); @@ -63,15 +63,15 @@ void ScriptKP06::SceneLoaded() { Unclickable_Object("TRASH CAN WITH FIRE"); } -bool ScriptKP06::MouseClick(int x, int y) { +bool SceneScriptKP06::MouseClick(int x, int y) { return false; } -bool ScriptKP06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptKP06::ClickedOnActor(int actorId) { +bool SceneScriptKP06::ClickedOnActor(int actorId) { if (actorId == 8 && !Game_Flag_Query(714)) { if (Actor_Clue_Query(8, 145)) { Actor_Face_Actor(0, 8, true); @@ -91,11 +91,11 @@ bool ScriptKP06::ClickedOnActor(int actorId) { return false; } -bool ScriptKP06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptKP06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptKP06::ClickedOnExit(int exitId) { +bool SceneScriptKP06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -868.0f, 8.26f, -68.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -140,17 +140,17 @@ bool ScriptKP06::ClickedOnExit(int exitId) { return false; } -bool ScriptKP06::ClickedOn2DRegion(int region) { +bool SceneScriptKP06::ClickedOn2DRegion(int region) { return false; } -void ScriptKP06::SceneFrameAdvanced(int frame) { +void SceneScriptKP06::SceneFrameAdvanced(int frame) { } -void ScriptKP06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptKP06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptKP06::PlayerWalkedIn() { +void SceneScriptKP06::PlayerWalkedIn() { if (!Game_Flag_Query(653) && Game_Flag_Query(579)) { Game_Flag_Reset(579); if (Actor_Query_Goal_Number(1) == 499) { @@ -225,13 +225,13 @@ void ScriptKP06::PlayerWalkedIn() { } } -void ScriptKP06::PlayerWalkedOut() { +void SceneScriptKP06::PlayerWalkedOut() { if (Game_Flag_Query(578) && Actor_Query_Goal_Number(1) == 433) { Actor_Set_Goal_Number(1, 499); } } -void ScriptKP06::DialogueQueueFlushed(int a1) { +void SceneScriptKP06::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp index 1c9f6a7b3f..8fe4bfbc04 100644 --- a/engines/bladerunner/script/kp07.cpp +++ b/engines/bladerunner/script/scene/kp07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptKP07::InitializeScene() { +void SceneScriptKP07::InitializeScene() { Setup_Scene_Information(-12.0f, -41.58f, 72.0f, 0); Game_Flag_Reset(578); Scene_Exit_Add_2D_Exit(0, 315, 185, 381, 285, 0); @@ -74,7 +74,7 @@ void ScriptKP07::InitializeScene() { } } -void ScriptKP07::SceneLoaded() { +void SceneScriptKP07::SceneLoaded() { if (!Game_Flag_Query(653)) { Music_Play(19, 25, 0, 0, -1, 1, 0); } @@ -86,15 +86,15 @@ void ScriptKP07::SceneLoaded() { } } -bool ScriptKP07::MouseClick(int x, int y) { +bool SceneScriptKP07::MouseClick(int x, int y) { return false; } -bool ScriptKP07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptKP07::ClickedOnActor(int actorId) { +bool SceneScriptKP07::ClickedOnActor(int actorId) { if (actorId == 5) { if (Game_Flag_Query(697) || actorId != 5 || Actor_Query_Goal_Number(5) == 599 || Actor_Query_Goal_Number(5) == 515) { return false; @@ -112,11 +112,11 @@ bool ScriptKP07::ClickedOnActor(int actorId) { return true; } -bool ScriptKP07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptKP07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptKP07::ClickedOnExit(int exitId) { +bool SceneScriptKP07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -12.0f, -41.58f, 72.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -129,17 +129,17 @@ bool ScriptKP07::ClickedOnExit(int exitId) { return false; } -bool ScriptKP07::ClickedOn2DRegion(int region) { +bool SceneScriptKP07::ClickedOn2DRegion(int region) { return false; } -void ScriptKP07::SceneFrameAdvanced(int frame) { +void SceneScriptKP07::SceneFrameAdvanced(int frame) { } -void ScriptKP07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptKP07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptKP07::PlayerWalkedIn() { +void SceneScriptKP07::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, 9.0f, -41.88f, -81.0f, 0, 0, false, 0); if (!Game_Flag_Query(658)) { if (Game_Flag_Query(653)) { @@ -162,11 +162,11 @@ void ScriptKP07::PlayerWalkedIn() { } } -void ScriptKP07::PlayerWalkedOut() { +void SceneScriptKP07::PlayerWalkedOut() { Music_Stop(3); } -void ScriptKP07::DialogueQueueFlushed(int a1) { +void SceneScriptKP07::DialogueQueueFlushed(int a1) { if (Actor_Query_Goal_Number(5) == 515) { Actor_Set_Targetable(5, false); Actor_Change_Animation_Mode(5, 21); diff --git a/engines/bladerunner/script/ma01.cpp b/engines/bladerunner/script/scene/ma01.cpp index 482c31ede9..094abc586e 100644 --- a/engines/bladerunner/script/ma01.cpp +++ b/engines/bladerunner/script/scene/ma01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptMA01::InitializeScene() { +void SceneScriptMA01::InitializeScene() { Setup_Scene_Information(381.0f, 0.0f, 54.0f, 992); if (Game_Flag_Query(250)) { Setup_Scene_Information(381.0f, 0.0f, 54.0f, 992); @@ -59,7 +59,7 @@ void ScriptMA01::InitializeScene() { } } -void ScriptMA01::SceneLoaded() { +void SceneScriptMA01::SceneLoaded() { Obstacle_Object("WRENCH", true); Unobstacle_Object("OBSTICLEBOX01", true); Clickable_Object("WRENCH"); @@ -68,23 +68,23 @@ void ScriptMA01::SceneLoaded() { Unclickable_Object("NGON01"); } -bool ScriptMA01::MouseClick(int x, int y) { +bool SceneScriptMA01::MouseClick(int x, int y) { return Region_Check(286, 326, 348, 384); } -bool ScriptMA01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptMA01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptMA01::ClickedOnActor(int actorId) { +bool SceneScriptMA01::ClickedOnActor(int actorId) { return false; } -bool ScriptMA01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptMA01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptMA01::ClickedOnExit(int exitId) { +bool SceneScriptMA01::ClickedOnExit(int exitId) { if (Actor_Query_Goal_Number(19) == 21) { return true; } @@ -192,11 +192,11 @@ bool ScriptMA01::ClickedOnExit(int exitId) { return false; } -bool ScriptMA01::ClickedOn2DRegion(int region) { +bool SceneScriptMA01::ClickedOn2DRegion(int region) { return false; } -void ScriptMA01::SceneFrameAdvanced(int frame) { +void SceneScriptMA01::SceneFrameAdvanced(int frame) { if (frame == 15) { Ambient_Sounds_Play_Sound(102, 70, -100, 100, 0); } @@ -232,13 +232,13 @@ void ScriptMA01::SceneFrameAdvanced(int frame) { //return true; } -void ScriptMA01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptMA01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptMA01::PlayerWalkedIn() { +void SceneScriptMA01::PlayerWalkedIn() { } -void ScriptMA01::PlayerWalkedOut() { +void SceneScriptMA01::PlayerWalkedOut() { Actor_Set_Invisible(0, false); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -251,7 +251,7 @@ void ScriptMA01::PlayerWalkedOut() { } } -void ScriptMA01::DialogueQueueFlushed(int a1) { +void SceneScriptMA01::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ma02.cpp b/engines/bladerunner/script/scene/ma02.cpp index 6448b93caa..063fddc90b 100644 --- a/engines/bladerunner/script/ma02.cpp +++ b/engines/bladerunner/script/scene/ma02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptMA02::InitializeScene() { +void SceneScriptMA02::InitializeScene() { if (Game_Flag_Query(36)) { Setup_Scene_Information(-172.0f, -144.13f, 6.27f, 500); } else { @@ -61,18 +61,18 @@ void ScriptMA02::InitializeScene() { } } -void ScriptMA02::SceneLoaded() { +void SceneScriptMA02::SceneLoaded() { Obstacle_Object("COUCH1", true); Unobstacle_Object("COUCH1", true); Clickable_Object("BAR-MAIN"); Clickable_Object("E-ESPER"); } -bool ScriptMA02::MouseClick(int x, int y) { +bool SceneScriptMA02::MouseClick(int x, int y) { return false; } -bool ScriptMA02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptMA02::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("E-ESPER", objectName)) { Actor_Face_Object(0, "E-ESPER", true); Delay(1000); @@ -101,7 +101,7 @@ bool ScriptMA02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptMA02::ClickedOnActor(int actorId) { +bool SceneScriptMA02::ClickedOnActor(int actorId) { if (actorId == 66 && Actor_Query_Goal_Number(66) == 599) { if (!Loop_Actor_Walk_To_Actor(0, 66, 30, 1, false)) { Actor_Face_Actor(0, 66, true); @@ -111,11 +111,11 @@ bool ScriptMA02::ClickedOnActor(int actorId) { return false; } -bool ScriptMA02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptMA02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptMA02::ClickedOnExit(int exitId) { +bool SceneScriptMA02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 23.19f, -144.12f, 378.27f, 0, 1, false, 0)) { Music_Stop(10); @@ -134,17 +134,17 @@ bool ScriptMA02::ClickedOnExit(int exitId) { return false; } -bool ScriptMA02::ClickedOn2DRegion(int region) { +bool SceneScriptMA02::ClickedOn2DRegion(int region) { return false; } -void ScriptMA02::SceneFrameAdvanced(int frame) { +void SceneScriptMA02::SceneFrameAdvanced(int frame) { } -void ScriptMA02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptMA02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptMA02::PlayerWalkedIn() { +void SceneScriptMA02::PlayerWalkedIn() { if (Game_Flag_Query(34)) { sub_402044(); } @@ -193,15 +193,15 @@ void ScriptMA02::PlayerWalkedIn() { return; } -void ScriptMA02::PlayerWalkedOut() { +void SceneScriptMA02::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptMA02::DialogueQueueFlushed(int a1) { +void SceneScriptMA02::DialogueQueueFlushed(int a1) { } -void ScriptMA02::sub_401E4C() { +void SceneScriptMA02::sub_401E4C() { Actor_Says(0, 2365, 13); Actor_Says(40, 0, 13); Actor_Says(0, 2370, 13); @@ -214,7 +214,7 @@ void ScriptMA02::sub_401E4C() { Delay(3000); } -bool ScriptMA02::sub_401F7C() { +bool SceneScriptMA02::sub_401F7C() { return Global_Variable_Query(1) == 5 && !Actor_Clue_Query(0, 143) && !Actor_Clue_Query(0, 144) @@ -224,7 +224,7 @@ bool ScriptMA02::sub_401F7C() { && !Actor_Clue_Query(0, 142); } -void ScriptMA02::sub_402044() { +void SceneScriptMA02::sub_402044() { // int v0; // int v1; // int v3[7]; diff --git a/engines/bladerunner/script/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp index f31c73275d..7025319c71 100644 --- a/engines/bladerunner/script/ma04.cpp +++ b/engines/bladerunner/script/scene/ma04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptMA04::InitializeScene() { +void SceneScriptMA04::InitializeScene() { if (Game_Flag_Query(63)) { Setup_Scene_Information(-7199.0f, 953.97f, 1579.0f, 502); if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) { @@ -60,7 +60,7 @@ void ScriptMA04::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptMA04::SceneLoaded() { +void SceneScriptMA04::SceneLoaded() { Obstacle_Object("BED-DOG DISH", true); Unobstacle_Object("BEDDog BONE", true); Unobstacle_Object("BED-BOOK1", true); @@ -74,11 +74,11 @@ void ScriptMA04::SceneLoaded() { } } -bool ScriptMA04::MouseClick(int x, int y) { +bool SceneScriptMA04::MouseClick(int x, int y) { return false; } -bool ScriptMA04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptMA04::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BED-SHEETS", objectName)) { sub_403DA8(); return false; @@ -97,15 +97,15 @@ bool ScriptMA04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptMA04::ClickedOnActor(int actorId) { +bool SceneScriptMA04::ClickedOnActor(int actorId) { return false; } -bool ScriptMA04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptMA04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptMA04::ClickedOnExit(int exitId) { +bool SceneScriptMA04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -7099.0f, 954.0f, 1866.0f, 0, 1, false, 0)) { Game_Flag_Set(36); @@ -140,7 +140,7 @@ bool ScriptMA04::ClickedOnExit(int exitId) { return false; } -bool ScriptMA04::ClickedOn2DRegion(int region) { +bool SceneScriptMA04::ClickedOn2DRegion(int region) { if (Player_Query_Combat_Mode()) { return false; } @@ -213,7 +213,7 @@ bool ScriptMA04::ClickedOn2DRegion(int region) { return false; } -void ScriptMA04::SceneFrameAdvanced(int frame) { +void SceneScriptMA04::SceneFrameAdvanced(int frame) { Set_Fade_Color(0, 0, 0); if (frame >= 91 && frame < 121) { Set_Fade_Density((frame - 91) / 30.0f); @@ -227,10 +227,10 @@ void ScriptMA04::SceneFrameAdvanced(int frame) { } } -void ScriptMA04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptMA04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptMA04::PlayerWalkedIn() { +void SceneScriptMA04::PlayerWalkedIn() { if (Game_Flag_Query(647)) { Player_Gains_Control(); } @@ -294,7 +294,7 @@ void ScriptMA04::PlayerWalkedIn() { } } -void ScriptMA04::PlayerWalkedOut() { +void SceneScriptMA04::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (Game_Flag_Query(678)) { @@ -305,23 +305,23 @@ void ScriptMA04::PlayerWalkedOut() { } } -void ScriptMA04::DialogueQueueFlushed(int a1) { +void SceneScriptMA04::DialogueQueueFlushed(int a1) { Overlay_Remove("MA04OVR2"); } -bool ScriptMA04::sub_402758() { +bool SceneScriptMA04::sub_402758() { return Global_Variable_Query(1) == 5 && !Actor_Clue_Query(0, 143) && !Actor_Clue_Query(0, 144) && !Actor_Clue_Query(0, 139) && !Actor_Clue_Query(0, 140) && !Actor_Clue_Query(0, 141) && !Actor_Clue_Query(0, 142); } -bool ScriptMA04::sub_402820() { +bool SceneScriptMA04::sub_402820() { return (Actor_Clue_Query(5, 222) && !Game_Flag_Query(649)) || (Actor_Clue_Query(6, 215) && !Game_Flag_Query(650)); } -bool ScriptMA04::sub_402888() { +bool SceneScriptMA04::sub_402888() { return sub_402820() || sub_402758(); } -void ScriptMA04::sub_4028A8() { +void SceneScriptMA04::sub_4028A8() { int answer; Actor_Says(3, 220, 3); Actor_Says(0, 2460, 0); @@ -386,7 +386,7 @@ void ScriptMA04::sub_4028A8() { } } -void ScriptMA04::sub_402F2C() { +void SceneScriptMA04::sub_402F2C() { Actor_Says(6, 530, 3); Actor_Says(0, 2545, 19); Actor_Says(6, 540, 3); @@ -421,7 +421,7 @@ void ScriptMA04::sub_402F2C() { Sound_Play(123, 100, 0, 0, 50); } -void ScriptMA04::sub_4032A0() { +void SceneScriptMA04::sub_4032A0() { Actor_Says(1, 680, 3); Actor_Says(0, 2630, 17); Actor_Says(1, 690, 3); @@ -442,7 +442,7 @@ void ScriptMA04::sub_4032A0() { Actor_Clue_Acquire(0, 144, 1, -1); } -void ScriptMA04::sub_4034D8() { +void SceneScriptMA04::sub_4034D8() { Actor_Says(5, 330, 3); Actor_Says(0, 2580, 14); Actor_Says(5, 340, 3); @@ -474,7 +474,7 @@ void ScriptMA04::sub_4034D8() { Actor_Clue_Acquire(0, 143, 1, -1); } -void ScriptMA04::sub_403864() { +void SceneScriptMA04::sub_403864() { Overlay_Play("MA04OVR2", 0, 1, 0, 0); switch (Global_Variable_Query(52)) { case 4: @@ -533,7 +533,7 @@ void ScriptMA04::sub_403864() { } } -void ScriptMA04::sub_403DA8() { +void SceneScriptMA04::sub_403DA8() { if (!Loop_Actor_Walk_To_Scene_Object(0, "BED-SHEETS", 12, 1, false)) { Actor_Says(0, 8530, 12); Music_Stop(4); diff --git a/engines/bladerunner/script/ma05.cpp b/engines/bladerunner/script/scene/ma05.cpp index 839d91388e..39295f956a 100644 --- a/engines/bladerunner/script/ma05.cpp +++ b/engines/bladerunner/script/scene/ma05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptMA05::InitializeScene() { +void SceneScriptMA05::InitializeScene() { if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) { Setup_Scene_Information(-7204.0f, 953.97f, 1651.0f, 0); } else { @@ -52,29 +52,29 @@ void ScriptMA05::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptMA05::SceneLoaded() { +void SceneScriptMA05::SceneLoaded() { Obstacle_Object("Z-BOX-RAIL03", true); Footstep_Sounds_Set(0, 0); Footstep_Sounds_Set(1, 3); } -bool ScriptMA05::MouseClick(int x, int y) { +bool SceneScriptMA05::MouseClick(int x, int y) { return false; } -bool ScriptMA05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptMA05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptMA05::ClickedOnActor(int actorId) { +bool SceneScriptMA05::ClickedOnActor(int actorId) { return false; } -bool ScriptMA05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptMA05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptMA05::ClickedOnExit(int exitId) { +bool SceneScriptMA05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -7199.0f, 956.17f, 1579.0f, 0, 0, false, 0)) { Loop_Actor_Walk_To_XYZ(0, -7199.0f, 956.17f, 1579.0f, 0, 0, false, 0); @@ -89,21 +89,21 @@ bool ScriptMA05::ClickedOnExit(int exitId) { return false; } -bool ScriptMA05::ClickedOn2DRegion(int region) { +bool SceneScriptMA05::ClickedOn2DRegion(int region) { return false; } -void ScriptMA05::SceneFrameAdvanced(int frame) { +void SceneScriptMA05::SceneFrameAdvanced(int frame) { if (frame == 20) { Sound_Play(102, 70, -100, 100, 50); } //return true; } -void ScriptMA05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptMA05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptMA05::PlayerWalkedIn() { +void SceneScriptMA05::PlayerWalkedIn() { Music_Play(2, 52, 0, 2, -1, 0, 0); if ((Random_Query(0, 4) == 1 || (Game_Flag_Query(146) == 1 && !Game_Flag_Query(61))) && Global_Variable_Query(1) == 1) { Scene_Loop_Set_Default(1); @@ -123,13 +123,13 @@ void ScriptMA05::PlayerWalkedIn() { //return false; } -void ScriptMA05::PlayerWalkedOut() { +void SceneScriptMA05::PlayerWalkedOut() { } -void ScriptMA05::DialogueQueueFlushed(int a1) { +void SceneScriptMA05::DialogueQueueFlushed(int a1) { } -bool ScriptMA05::sub_401990() { +bool SceneScriptMA05::sub_401990() { return Global_Variable_Query(1) == 5 && !Actor_Clue_Query(0, 143) && !Actor_Clue_Query(0, 144) diff --git a/engines/bladerunner/script/ma06.cpp b/engines/bladerunner/script/scene/ma06.cpp index caea6cd293..09c8637769 100644 --- a/engines/bladerunner/script/ma06.cpp +++ b/engines/bladerunner/script/scene/ma06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptMA06::InitializeScene() { +void SceneScriptMA06::InitializeScene() { Setup_Scene_Information(40.0f, 1.0f, -20.0f, 400); Ambient_Sounds_Add_Looping_Sound(210, 50, 0, 1); Ambient_Sounds_Add_Looping_Sound(408, 33, 0, 1); @@ -33,43 +33,43 @@ void ScriptMA06::InitializeScene() { Sound_Play(209, 100, 50, 50, 100); } -void ScriptMA06::SceneLoaded() { +void SceneScriptMA06::SceneLoaded() { Obstacle_Object("PANEL", true); Clickable_Object("PANEL"); Player_Loses_Control(); } -bool ScriptMA06::MouseClick(int x, int y) { +bool SceneScriptMA06::MouseClick(int x, int y) { return false; } -bool ScriptMA06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptMA06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptMA06::ClickedOnActor(int actorId) { +bool SceneScriptMA06::ClickedOnActor(int actorId) { return false; } -bool ScriptMA06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptMA06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptMA06::ClickedOnExit(int exitId) { +bool SceneScriptMA06::ClickedOnExit(int exitId) { return false; } -bool ScriptMA06::ClickedOn2DRegion(int region) { +bool SceneScriptMA06::ClickedOn2DRegion(int region) { return false; } -void ScriptMA06::SceneFrameAdvanced(int frame) { +void SceneScriptMA06::SceneFrameAdvanced(int frame) { } -void ScriptMA06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptMA06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptMA06::PlayerWalkedIn() { +void SceneScriptMA06::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, 40.0f, 1.35f, 0.0f, 0, 0, false, 0); Actor_Face_Object(0, "panel", true); Delay(500); @@ -93,20 +93,20 @@ void ScriptMA06::PlayerWalkedIn() { //return true; } -void ScriptMA06::PlayerWalkedOut() { +void SceneScriptMA06::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Player_Gains_Control(); } -void ScriptMA06::DialogueQueueFlushed(int a1) { +void SceneScriptMA06::DialogueQueueFlushed(int a1) { } -bool ScriptMA06::sub_4012C0() { +bool SceneScriptMA06::sub_4012C0() { return (Game_Flag_Query(37) && !Game_Flag_Query(38)) || (Game_Flag_Query(33) && !Game_Flag_Query(34)) || (Game_Flag_Query(57) && !Game_Flag_Query(58)); } -void ScriptMA06::sub_4014E4() { +void SceneScriptMA06::sub_4014E4() { Game_Flag_Reset(38); Game_Flag_Reset(34); Game_Flag_Reset(58); diff --git a/engines/bladerunner/script/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp index 4222453302..2fc19c0660 100644 --- a/engines/bladerunner/script/ma07.cpp +++ b/engines/bladerunner/script/scene/ma07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptMA07::InitializeScene() { +void SceneScriptMA07::InitializeScene() { if (Game_Flag_Query(356)) { Setup_Scene_Information(6.75f, -172.43f, 356.0f, 997); Game_Flag_Reset(356); @@ -50,27 +50,27 @@ void ScriptMA07::InitializeScene() { Scene_Exit_Add_2D_Exit(0, 270, 216, 382, 306, 0); } -void ScriptMA07::SceneLoaded() { +void SceneScriptMA07::SceneLoaded() { Obstacle_Object("BARRICADE", true); } -bool ScriptMA07::MouseClick(int x, int y) { +bool SceneScriptMA07::MouseClick(int x, int y) { return false; } -bool ScriptMA07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptMA07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptMA07::ClickedOnActor(int actorId) { +bool SceneScriptMA07::ClickedOnActor(int actorId) { return false; } -bool ScriptMA07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptMA07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptMA07::ClickedOnExit(int exitId) { +bool SceneScriptMA07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 104.0f, -162.0f, 56.0f, 12, 1, false, 0)) { if (Global_Variable_Query(1) == 4 && Game_Flag_Query(671)) { @@ -107,20 +107,20 @@ bool ScriptMA07::ClickedOnExit(int exitId) { return false; } -bool ScriptMA07::ClickedOn2DRegion(int region) { +bool SceneScriptMA07::ClickedOn2DRegion(int region) { return false; } -void ScriptMA07::SceneFrameAdvanced(int frame) { +void SceneScriptMA07::SceneFrameAdvanced(int frame) { } -void ScriptMA07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptMA07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == 53 && newGoal == 302) { Scene_Exits_Enable(); } } -void ScriptMA07::PlayerWalkedIn() { +void SceneScriptMA07::PlayerWalkedIn() { if (Game_Flag_Query(673)) { Loop_Actor_Walk_To_XYZ(0, -268.0f, -162.8f, 188.0f, 0, 0, false, 0); Game_Flag_Reset(673); @@ -150,10 +150,10 @@ void ScriptMA07::PlayerWalkedIn() { } -void ScriptMA07::PlayerWalkedOut() { +void SceneScriptMA07::PlayerWalkedOut() { } -void ScriptMA07::DialogueQueueFlushed(int a1) { +void SceneScriptMA07::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ma08.cpp b/engines/bladerunner/script/scene/ma08.cpp index d2f105af9a..bd7d15f235 100644 --- a/engines/bladerunner/script/ma08.cpp +++ b/engines/bladerunner/script/scene/ma08.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptMA08::InitializeScene() { +void SceneScriptMA08::InitializeScene() { Setup_Scene_Information(0, 0, 0, 0); Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1); Ambient_Sounds_Add_Sound(68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); @@ -34,48 +34,48 @@ void ScriptMA08::InitializeScene() { Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); } -void ScriptMA08::SceneLoaded() { +void SceneScriptMA08::SceneLoaded() { Obstacle_Object("(undefined)", true); Clickable_Object("(undefined)"); } -bool ScriptMA08::MouseClick(int x, int y) { +bool SceneScriptMA08::MouseClick(int x, int y) { return false; } -bool ScriptMA08::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptMA08::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptMA08::ClickedOnActor(int actorId) { +bool SceneScriptMA08::ClickedOnActor(int actorId) { return false; } -bool ScriptMA08::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptMA08::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptMA08::ClickedOnExit(int exitId) { +bool SceneScriptMA08::ClickedOnExit(int exitId) { return false; } -bool ScriptMA08::ClickedOn2DRegion(int region) { +bool SceneScriptMA08::ClickedOn2DRegion(int region) { return false; } -void ScriptMA08::SceneFrameAdvanced(int frame) { +void SceneScriptMA08::SceneFrameAdvanced(int frame) { } -void ScriptMA08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptMA08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptMA08::PlayerWalkedIn() { +void SceneScriptMA08::PlayerWalkedIn() { } -void ScriptMA08::PlayerWalkedOut() { +void SceneScriptMA08::PlayerWalkedOut() { } -void ScriptMA08::DialogueQueueFlushed(int a1) { +void SceneScriptMA08::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp index a7ff7b2e3e..f4ebbd01a4 100644 --- a/engines/bladerunner/script/nr01.cpp +++ b/engines/bladerunner/script/scene/nr01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR01::InitializeScene() { +void SceneScriptNR01::InitializeScene() { if (Game_Flag_Query(617)) { Setup_Scene_Information(-153.86f, 23.88f, -570.21f, 402); } else if (Game_Flag_Query(632)) { @@ -82,12 +82,12 @@ void ScriptNR01::InitializeScene() { } } -void ScriptNR01::SceneLoaded() { +void SceneScriptNR01::SceneLoaded() { Obstacle_Object("LAMPBASE01", true); Unclickable_Object("LAMPBASE01"); } -bool ScriptNR01::MouseClick(int x, int y) { +bool SceneScriptNR01::MouseClick(int x, int y) { if (Actor_Query_Goal_Number(0) == 212) { Global_Variable_Increment(47, 4); return true; @@ -95,19 +95,19 @@ bool ScriptNR01::MouseClick(int x, int y) { return false; } -bool ScriptNR01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR01::ClickedOnActor(int actorId) { +bool SceneScriptNR01::ClickedOnActor(int actorId) { return false; } -bool ScriptNR01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR01::ClickedOnExit(int exitId) { +bool SceneScriptNR01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -380.0f, 31.93f, -841.0f, 0, 1, false, 0)) { if (Global_Variable_Query(1) > 3) { @@ -236,7 +236,7 @@ bool ScriptNR01::ClickedOnExit(int exitId) { return false; } -bool ScriptNR01::ClickedOn2DRegion(int region) { +bool SceneScriptNR01::ClickedOn2DRegion(int region) { if (region == 0 && Player_Query_Combat_Mode()) { Sound_Play(517, 100, 0, 0, 50); Actor_Set_Goal_Number(1, 260); @@ -253,7 +253,7 @@ bool ScriptNR01::ClickedOn2DRegion(int region) { } -void ScriptNR01::SceneFrameAdvanced(int frame) { +void SceneScriptNR01::SceneFrameAdvanced(int frame) { if (frame == 61) { Sound_Play(118, 40, 0, 0, 50); } @@ -263,10 +263,10 @@ void ScriptNR01::SceneFrameAdvanced(int frame) { //return 0; } -void ScriptNR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR01::PlayerWalkedIn() { +void SceneScriptNR01::PlayerWalkedIn() { if (Game_Flag_Query(617)) { Actor_Set_Goal_Number(1, 280); Game_Flag_Reset(617); @@ -415,7 +415,7 @@ void ScriptNR01::PlayerWalkedIn() { return; } -void ScriptNR01::PlayerWalkedOut() { +void SceneScriptNR01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(343) && !Game_Flag_Query(532) && !Game_Flag_Query(535) && !Game_Flag_Query(632) && !Game_Flag_Query(722)) { @@ -427,7 +427,7 @@ void ScriptNR01::PlayerWalkedOut() { Game_Flag_Reset(722); } -void ScriptNR01::DialogueQueueFlushed(int a1) { +void SceneScriptNR01::DialogueQueueFlushed(int a1) { if (Actor_Query_Goal_Number(1) == 251 && Actor_Query_Goal_Number(2) != 299 && Actor_Query_Goal_Number(2) != 254 && Actor_Query_Goal_Number(2) != 255) { Actor_Set_Goal_Number(1, 252); } diff --git a/engines/bladerunner/script/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp index 72903906a7..1af8387a4b 100644 --- a/engines/bladerunner/script/nr02.cpp +++ b/engines/bladerunner/script/scene/nr02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR02::InitializeScene() { +void SceneScriptNR02::InitializeScene() { sub_402134(); Setup_Scene_Information(-283.0f, -24.0f, 326.0f, 200); Game_Flag_Reset(532); @@ -51,7 +51,7 @@ void ScriptNR02::InitializeScene() { Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); } -void ScriptNR02::SceneLoaded() { +void SceneScriptNR02::SceneLoaded() { Obstacle_Object("VID PHONE 01", true); Unobstacle_Object("VICTORIAN CHAIR", true); Unobstacle_Object("WALL CANDLES", true); @@ -67,11 +67,11 @@ void ScriptNR02::SceneLoaded() { Clickable_Object("VID PHONE 02"); } -bool ScriptNR02::MouseClick(int x, int y) { +bool SceneScriptNR02::MouseClick(int x, int y) { return false; } -bool ScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("VID PHONE 01", objectName) || Object_Query_Click("VID PHONE 02", objectName)) { if (!Loop_Actor_Walk_To_XYZ(0, -191.9f, -24.0f, 62.15f, 0, 1, false, 0)) { Actor_Face_Heading(0, 13, false); @@ -96,14 +96,14 @@ bool ScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR02::ClickedOnActor(int actorId) { +bool SceneScriptNR02::ClickedOnActor(int actorId) { if (actorId == 2 && Actor_Query_Goal_Number(2) == 201 && !Loop_Actor_Walk_To_XYZ(0, 67.37f, -24.0f, 389.32f, 0, 1, false, 0)) { Actor_Set_Goal_Number(2, 215); } return false; } -bool ScriptNR02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) { if ((itemId == 89 || itemId == 90) && !Loop_Actor_Walk_To_XYZ(0, 109.38f, -24.0f, 420.5f, 0, 1, false, 0)) { Actor_Face_Heading(0, 423, false); if (itemId == 89) { @@ -120,7 +120,7 @@ bool ScriptNR02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR02::ClickedOnExit(int exitId) { +bool SceneScriptNR02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -283.0f, -24.0f, 326.0f, 0, 1, false, 0)) { if (Actor_Query_Goal_Number(2) < 230 || Actor_Query_Goal_Number(2) > 250) { @@ -136,21 +136,21 @@ bool ScriptNR02::ClickedOnExit(int exitId) { return false; } -bool ScriptNR02::ClickedOn2DRegion(int region) { +bool SceneScriptNR02::ClickedOn2DRegion(int region) { return false; } -void ScriptNR02::SceneFrameAdvanced(int frame) { +void SceneScriptNR02::SceneFrameAdvanced(int frame) { if (!Music_Is_Playing() && (Actor_Query_Goal_Number(2) < 210 || Actor_Query_Goal_Number(2) > 222)) { sub_402134(); } //return false; } -void ScriptNR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR02::PlayerWalkedIn() { +void SceneScriptNR02::PlayerWalkedIn() { if (Actor_Query_Goal_Number(2) == 211) { Actor_Set_Goal_Number(2, 220); } @@ -164,14 +164,14 @@ void ScriptNR02::PlayerWalkedIn() { //return false; } -void ScriptNR02::PlayerWalkedOut() { +void SceneScriptNR02::PlayerWalkedOut() { Music_Stop(2); if (Actor_Query_Goal_Number(2) < 210 && Actor_Query_Goal_Number(2) >= 205) { Actor_Set_Goal_Number(2, 204); } } -void ScriptNR02::DialogueQueueFlushed(int a1) { +void SceneScriptNR02::DialogueQueueFlushed(int a1) { if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(2) == 206) { Sound_Play(575, 50, 0, 0, 50); Sound_Play(321, 50, 0, 0, 50); @@ -196,7 +196,7 @@ void ScriptNR02::DialogueQueueFlushed(int a1) { //return false; } -void ScriptNR02::sub_402134() { +void SceneScriptNR02::sub_402134() { int v0 = Global_Variable_Query(50); if (v0 == 0) { Music_Play(8, 41, 0, 2, -1, 0, 0); diff --git a/engines/bladerunner/script/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp index a4afdd36ec..6052f6bb55 100644 --- a/engines/bladerunner/script/nr03.cpp +++ b/engines/bladerunner/script/scene/nr03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR03::InitializeScene() { +void SceneScriptNR03::InitializeScene() { if (Game_Flag_Query(537)) { Setup_Scene_Information(-301.98f, -70.19f, -348.58f, 0); } else if (Game_Flag_Query(437)) { @@ -75,7 +75,7 @@ void ScriptNR03::InitializeScene() { } } -void ScriptNR03::SceneLoaded() { +void SceneScriptNR03::SceneLoaded() { Obstacle_Object("PG3", true); Obstacle_Object("X2BACKBARBOTTOM01", true); Obstacle_Object("X2BACKSTAGETOP", true); @@ -87,11 +87,11 @@ void ScriptNR03::SceneLoaded() { Unobstacle_Object("X2BACKSTAGETOP", true); } -bool ScriptNR03::MouseClick(int x, int y) { +bool SceneScriptNR03::MouseClick(int x, int y) { return false; } -bool ScriptNR03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR03::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("PG3", objectName)) { Actor_Face_Object(0, "PG3", true); Actor_Voice_Over(3770, 99); @@ -100,7 +100,7 @@ bool ScriptNR03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR03::ClickedOnActor(int actorId) { +bool SceneScriptNR03::ClickedOnActor(int actorId) { if (actorId == 25 && !Loop_Actor_Walk_To_Actor(0, 25, 48, 1, false)) { AI_Movement_Track_Pause(25); Actor_Face_Actor(0, 25, true); @@ -121,11 +121,11 @@ bool ScriptNR03::ClickedOnActor(int actorId) { return false; } -bool ScriptNR03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR03::ClickedOnExit(int exitId) { +bool SceneScriptNR03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 410.0f, -70.19f, -715.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -205,7 +205,7 @@ bool ScriptNR03::ClickedOnExit(int exitId) { return false; } -bool ScriptNR03::ClickedOn2DRegion(int region) { +bool SceneScriptNR03::ClickedOn2DRegion(int region) { if (region == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 79.2f, -70.19f, -984.0f, 12, 1, false, 0)) { Actor_Face_Actor(0, 47, true); @@ -225,7 +225,7 @@ bool ScriptNR03::ClickedOn2DRegion(int region) { return false; } -void ScriptNR03::SceneFrameAdvanced(int frame) { +void SceneScriptNR03::SceneFrameAdvanced(int frame) { if (!Music_Is_Playing()) { sub_402994(); } @@ -253,10 +253,10 @@ void ScriptNR03::SceneFrameAdvanced(int frame) { return; } -void ScriptNR03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR03::PlayerWalkedIn() { +void SceneScriptNR03::PlayerWalkedIn() { Player_Set_Combat_Mode(false); if (Game_Flag_Query(573)) { if (Game_Flag_Query(535) ) { @@ -277,7 +277,7 @@ void ScriptNR03::PlayerWalkedIn() { //return false; } -void ScriptNR03::PlayerWalkedOut() { +void SceneScriptNR03::PlayerWalkedOut() { if (!Game_Flag_Query(438)) { Music_Stop(2); } @@ -286,10 +286,10 @@ void ScriptNR03::PlayerWalkedOut() { } } -void ScriptNR03::DialogueQueueFlushed(int a1) { +void SceneScriptNR03::DialogueQueueFlushed(int a1) { } -void ScriptNR03::sub_40259C(int frame) { +void SceneScriptNR03::sub_40259C(int frame) { int facing; float angle, invertedAngle; @@ -328,7 +328,7 @@ void ScriptNR03::sub_40259C(int frame) { } } -void ScriptNR03::sub_402994() { +void SceneScriptNR03::sub_402994() { if (Music_Is_Playing()) { Music_Adjust(51, 0, 2); } else { diff --git a/engines/bladerunner/script/nr04.cpp b/engines/bladerunner/script/scene/nr04.cpp index 3af425762d..6fdf18efbe 100644 --- a/engines/bladerunner/script/nr04.cpp +++ b/engines/bladerunner/script/scene/nr04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR04::InitializeScene() { +void SceneScriptNR04::InitializeScene() { Music_Adjust(30, 80, 2); Setup_Scene_Information(53.0f, 0.0f, -110.0f, 569); Scene_Exit_Add_2D_Exit(0, 498, 126, 560, 238, 0); @@ -49,7 +49,7 @@ void ScriptNR04::InitializeScene() { Scene_Loop_Set_Default(0); } -void ScriptNR04::SceneLoaded() { +void SceneScriptNR04::SceneLoaded() { Clickable_Object("B.TV01"); Clickable_Object("B.TV02"); Clickable_Object("B.TV03"); @@ -61,7 +61,7 @@ void ScriptNR04::SceneLoaded() { Clickable_Object("BOX12"); } -bool ScriptNR04::MouseClick(int x, int y) { +bool SceneScriptNR04::MouseClick(int x, int y) { if (Actor_Query_Animation_Mode(0) == 85 || Actor_Query_Animation_Mode(0) == 29) { return true; } @@ -72,7 +72,7 @@ bool ScriptNR04::MouseClick(int x, int y) { return false; } -bool ScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("B.TV01", objectName) || Object_Query_Click("B.TV02", objectName) || Object_Query_Click("B.TV03", objectName) || Object_Query_Click("B.TV05", objectName) || Object_Query_Click("DESK", objectName)) { if (!Loop_Actor_Walk_To_Waypoint(0, 546, 0, 1, false)) { if (!Object_Query_Click("DESK", objectName)) { @@ -115,7 +115,7 @@ bool ScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR04::ClickedOnActor(int actorId) { +bool SceneScriptNR04::ClickedOnActor(int actorId) { if (actorId == 18 && Game_Flag_Query(606)) { Actor_Voice_Over(1640, 99); Actor_Voice_Over(1650, 99); @@ -127,11 +127,11 @@ bool ScriptNR04::ClickedOnActor(int actorId) { return false; } -bool ScriptNR04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR04::ClickedOnExit(int exitId) { +bool SceneScriptNR04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 45.0f, 0.0f, -106.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -144,7 +144,7 @@ bool ScriptNR04::ClickedOnExit(int exitId) { return false; } -bool ScriptNR04::ClickedOn2DRegion(int region) { +bool SceneScriptNR04::ClickedOn2DRegion(int region) { if ((region == 0 || region == 1 || region == 2) && Actor_Query_Which_Set_In(18) != 12 && Actor_Query_Animation_Mode(0) != 53 && !Loop_Actor_Walk_To_Waypoint(0, 445, 0, 1, false)) { Actor_Face_Heading(0, 49, false); Actor_Change_Animation_Mode(0, 85); @@ -166,7 +166,7 @@ bool ScriptNR04::ClickedOn2DRegion(int region) { return false; } -void ScriptNR04::SceneFrameAdvanced(int frame) { +void SceneScriptNR04::SceneFrameAdvanced(int frame) { if (frame == 1 && !Music_Is_Playing()) { sub_402960(); } @@ -179,7 +179,7 @@ void ScriptNR04::SceneFrameAdvanced(int frame) { //return false; } -void ScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == 18) { switch (newGoal) { case 214: @@ -258,7 +258,7 @@ void ScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool cu //return false; } -void ScriptNR04::PlayerWalkedIn() { +void SceneScriptNR04::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, 53.0f, 0.0f, -26.0f, 0, 0, false, 0); if (Game_Flag_Query(374)) { Overlay_Play("nr04over", 0, 1, 0, 0); @@ -268,13 +268,13 @@ void ScriptNR04::PlayerWalkedIn() { //return false; } -void ScriptNR04::PlayerWalkedOut() { +void SceneScriptNR04::PlayerWalkedOut() { } -void ScriptNR04::DialogueQueueFlushed(int a1) { +void SceneScriptNR04::DialogueQueueFlushed(int a1) { } -void ScriptNR04::sub_401DB0() { +void SceneScriptNR04::sub_401DB0() { Dialogue_Menu_Clear_List(); DM_Add_To_List(1530, 10, 5, 3); DM_Add_To_List(1540, 3, 5, 10); @@ -310,7 +310,7 @@ void ScriptNR04::sub_401DB0() { } } -void ScriptNR04::sub_402860(int frame) { +void SceneScriptNR04::sub_402860(int frame) { float colorMap[] = { 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, @@ -339,7 +339,7 @@ void ScriptNR04::sub_402860(int frame) { } } -void ScriptNR04::sub_402960() { +void SceneScriptNR04::sub_402960() { int v0 = Global_Variable_Query(53); if (!v0) { Music_Play(14, 11, 80, 2, -1, 0, 0); diff --git a/engines/bladerunner/script/nr05.cpp b/engines/bladerunner/script/scene/nr05.cpp index d686bce374..1459077258 100644 --- a/engines/bladerunner/script/nr05.cpp +++ b/engines/bladerunner/script/scene/nr05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR05::InitializeScene() { +void SceneScriptNR05::InitializeScene() { if (Game_Flag_Query(547)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); @@ -74,21 +74,21 @@ void ScriptNR05::InitializeScene() { } } -void ScriptNR05::SceneLoaded() { +void SceneScriptNR05::SceneLoaded() { Obstacle_Object("NM1-1+", true); Clickable_Object("NM1-1+"); Unclickable_Object("NM1-1+"); } -bool ScriptNR05::MouseClick(int x, int y) { +bool SceneScriptNR05::MouseClick(int x, int y) { return false; } -bool ScriptNR05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR05::ClickedOnActor(int actorId) { +bool SceneScriptNR05::ClickedOnActor(int actorId) { if (actorId == 42) { if (!Loop_Actor_Walk_To_Actor(0, 42, 120, 1, false)) { sub_4020B4(); @@ -106,11 +106,11 @@ bool ScriptNR05::ClickedOnActor(int actorId) { return false; } -bool ScriptNR05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR05::ClickedOnExit(int exitId) { +bool SceneScriptNR05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -444.0f, 0.0f, -451.0f, 0, 1, false, 0)) { Player_Loses_Control(); @@ -134,11 +134,11 @@ bool ScriptNR05::ClickedOnExit(int exitId) { return false; } -bool ScriptNR05::ClickedOn2DRegion(int region) { +bool SceneScriptNR05::ClickedOn2DRegion(int region) { return false; } -void ScriptNR05::SceneFrameAdvanced(int frame) { +void SceneScriptNR05::SceneFrameAdvanced(int frame) { if (!Music_Is_Playing()) { sub_402B9C(); } @@ -170,10 +170,10 @@ void ScriptNR05::SceneFrameAdvanced(int frame) { } -void ScriptNR05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR05::PlayerWalkedIn() { +void SceneScriptNR05::PlayerWalkedIn() { if (Game_Flag_Query(547)) { Music_Stop(2); Loop_Actor_Walk_To_XYZ(0, -697.56f, 0.0f, -174.86f, 0, 1, false, 0); @@ -182,7 +182,7 @@ void ScriptNR05::PlayerWalkedIn() { // return false; } -void ScriptNR05::PlayerWalkedOut() { +void SceneScriptNR05::PlayerWalkedOut() { if (Game_Flag_Query(537)) { Music_Stop(2); } @@ -190,10 +190,10 @@ void ScriptNR05::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptNR05::DialogueQueueFlushed(int a1) { +void SceneScriptNR05::DialogueQueueFlushed(int a1) { } -void ScriptNR05::sub_401F74(int frame) { +void SceneScriptNR05::sub_401F74(int frame) { float angle = cos((frame - 65) * (M_PI / 57.0f)) * M_PI_2; float invertedAngle = M_PI - angle; if (!Game_Flag_Query(537)) { @@ -216,7 +216,7 @@ void ScriptNR05::sub_401F74(int frame) { Actor_Set_At_XYZ(0, x, 0.0f, z, facing); } -void ScriptNR05::sub_4020B4() { +void SceneScriptNR05::sub_4020B4() { Actor_Face_Actor(0, 42, true); Actor_Face_Actor(42, 0, true); if (Game_Flag_Query(588)) { @@ -245,7 +245,7 @@ void ScriptNR05::sub_4020B4() { } } -void ScriptNR05::sub_4022DC() { +void SceneScriptNR05::sub_4022DC() { if (Actor_Query_Goal_Number(18) == 220) { Actor_Set_Goal_Number(18, 221); } @@ -329,7 +329,7 @@ void ScriptNR05::sub_4022DC() { } } -void ScriptNR05::sub_402A48(int actorId) { +void SceneScriptNR05::sub_402A48(int actorId) { int animationMode = Actor_Query_Animation_Mode(actorId); if (animationMode == 1 || animationMode == 2 || animationMode == 7 || animationMode == 8) { return; @@ -346,7 +346,7 @@ void ScriptNR05::sub_402A48(int actorId) { } } -void ScriptNR05::sub_402B9C() { +void SceneScriptNR05::sub_402B9C() { if (Music_Is_Playing()) { Music_Adjust(51, 0, 2); } else { diff --git a/engines/bladerunner/script/nr06.cpp b/engines/bladerunner/script/scene/nr06.cpp index e21bb49bbc..ba93ace7c3 100644 --- a/engines/bladerunner/script/nr06.cpp +++ b/engines/bladerunner/script/scene/nr06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR06::InitializeScene() { +void SceneScriptNR06::InitializeScene() { sub_401BAC(); if (Game_Flag_Query(442)) { Setup_Scene_Information(48.0f, -71.88f, -26.0f, 782); @@ -55,7 +55,7 @@ void ScriptNR06::InitializeScene() { Ambient_Sounds_Add_Sound(195, 5, 70, 8, 8, -100, 100, -101, -101, 0, 0); } -void ScriptNR06::SceneLoaded() { +void SceneScriptNR06::SceneLoaded() { Obstacle_Object("CHAIR01", true); Unobstacle_Object("LOFT04", true); Unobstacle_Object("LINE02", true); @@ -63,23 +63,23 @@ void ScriptNR06::SceneLoaded() { Unclickable_Object("CHAIR01"); } -bool ScriptNR06::MouseClick(int x, int y) { +bool SceneScriptNR06::MouseClick(int x, int y) { return false; } -bool ScriptNR06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR06::ClickedOnActor(int actorId) { +bool SceneScriptNR06::ClickedOnActor(int actorId) { return false; } -bool ScriptNR06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR06::ClickedOnExit(int exitId) { +bool SceneScriptNR06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 48.0f, -71.88f, -26.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -103,21 +103,21 @@ bool ScriptNR06::ClickedOnExit(int exitId) { return false; } -bool ScriptNR06::ClickedOn2DRegion(int region) { +bool SceneScriptNR06::ClickedOn2DRegion(int region) { return false; } -void ScriptNR06::SceneFrameAdvanced(int frame) { +void SceneScriptNR06::SceneFrameAdvanced(int frame) { if (!Music_Is_Playing()) { sub_401BAC(); } //return false; } -void ScriptNR06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR06::PlayerWalkedIn() { +void SceneScriptNR06::PlayerWalkedIn() { if (Game_Flag_Query(442)) { Loop_Actor_Walk_To_XYZ(0, -3.0f, -71.88f, -26.0f, 0, 0, false, 0); Game_Flag_Reset(442); @@ -130,16 +130,16 @@ void ScriptNR06::PlayerWalkedIn() { //return false; } -void ScriptNR06::PlayerWalkedOut() { +void SceneScriptNR06::PlayerWalkedOut() { if (Game_Flag_Query(441)) { Music_Stop(2); } } -void ScriptNR06::DialogueQueueFlushed(int a1) { +void SceneScriptNR06::DialogueQueueFlushed(int a1) { } -void ScriptNR06::sub_401BAC() { +void SceneScriptNR06::sub_401BAC() { if (Music_Is_Playing()) { Music_Adjust(31, 80, 2); } else { diff --git a/engines/bladerunner/script/nr07.cpp b/engines/bladerunner/script/scene/nr07.cpp index 99b7aff2b1..c1e2e2d6ff 100644 --- a/engines/bladerunner/script/nr07.cpp +++ b/engines/bladerunner/script/scene/nr07.cpp @@ -20,26 +20,26 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR07::InitializeScene() { +void SceneScriptNR07::InitializeScene() { Setup_Scene_Information(-110.0f, -73.5f, -193.0f, 554); Scene_Exit_Add_2D_Exit(0, 429, 137, 506, 251, 0); Ambient_Sounds_Add_Looping_Sound(111, 25, 0, 1); } -void ScriptNR07::SceneLoaded() { +void SceneScriptNR07::SceneLoaded() { Obstacle_Object("VANITY", true); Clickable_Object("VASE"); } -bool ScriptNR07::MouseClick(int x, int y) { +bool SceneScriptNR07::MouseClick(int x, int y) { return false; } -bool ScriptNR07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR07::ClickedOn3DObject(const char *objectName, bool a2) { Actor_Set_Goal_Number(25, 201); if (Object_Query_Click("VASE", objectName)) { sub_401C60(); @@ -48,7 +48,7 @@ bool ScriptNR07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR07::ClickedOnActor(int actorId) { +bool SceneScriptNR07::ClickedOnActor(int actorId) { if (actorId == 3) { if (Actor_Query_Goal_Number(33) <= 239) { Actor_Set_Goal_Number(25, 201); @@ -110,11 +110,11 @@ bool ScriptNR07::ClickedOnActor(int actorId) { return false; } -bool ScriptNR07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR07::ClickedOnExit(int exitId) { +bool SceneScriptNR07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -102.0f, -73.5f, -233.0f, 0, 1, false, 0)) { Actor_Set_Goal_Number(25, 201); @@ -128,17 +128,17 @@ bool ScriptNR07::ClickedOnExit(int exitId) { return false; } -bool ScriptNR07::ClickedOn2DRegion(int region) { +bool SceneScriptNR07::ClickedOn2DRegion(int region) { return false; } -void ScriptNR07::SceneFrameAdvanced(int frame) { +void SceneScriptNR07::SceneFrameAdvanced(int frame) { } -void ScriptNR07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR07::PlayerWalkedIn() { +void SceneScriptNR07::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, -110.0f, -73.5f, -169.0f, 0, 0, false, 0); if (Actor_Query_In_Set(3, 57)) { if (Game_Flag_Query(508)) { @@ -163,14 +163,14 @@ void ScriptNR07::PlayerWalkedIn() { //return false; } -void ScriptNR07::PlayerWalkedOut() { +void SceneScriptNR07::PlayerWalkedOut() { } -void ScriptNR07::DialogueQueueFlushed(int a1) { +void SceneScriptNR07::DialogueQueueFlushed(int a1) { } -void ScriptNR07::sub_4018D4() { +void SceneScriptNR07::sub_4018D4() { Actor_Set_Goal_Number(25, 201); Player_Loses_Control(); Actor_Set_At_XYZ(3, -136.0f, -73.0f, -18.0f, 300); @@ -188,7 +188,7 @@ void ScriptNR07::sub_4018D4() { Player_Gains_Control(); } -void ScriptNR07::sub_401A10() { +void SceneScriptNR07::sub_401A10() { Scene_Exits_Disable(); Actor_Set_Goal_Number(25, 201); Actor_Says_With_Pause(3, 930, 1.0f, 30); @@ -212,7 +212,7 @@ void ScriptNR07::sub_401A10() { Actor_Set_Goal_Number(33, 240); } -void ScriptNR07::sub_401C60() { +void SceneScriptNR07::sub_401C60() { Loop_Actor_Walk_To_XYZ(0, -109.0f, -73.0f, -89.0f, 0, 0, false, 0); Actor_Face_Object(0, "VASE", true); if (Actor_Query_Is_In_Current_Set(3)) { @@ -242,7 +242,7 @@ void ScriptNR07::sub_401C60() { } } -void ScriptNR07::sub_401EF4() { +void SceneScriptNR07::sub_401EF4() { Actor_Clue_Acquire(0, 96, 1, -1); Actor_Says(0, 3625, 19); Actor_Says(3, 570, 30); @@ -268,7 +268,7 @@ void ScriptNR07::sub_401EF4() { sub_4020F0(); } -void ScriptNR07::sub_4020F0() { +void SceneScriptNR07::sub_4020F0() { if (Actor_Clue_Query(3, 213) && Actor_Clue_Query(3, 214)) { Actor_Modify_Friendliness_To_Other(3, 0, -1); } @@ -287,7 +287,7 @@ void ScriptNR07::sub_4020F0() { Actor_Face_Object(3, "VANITY", true); } -void ScriptNR07::sub_402284() { +void SceneScriptNR07::sub_402284() { Actor_Clue_Acquire(0, 94, 1, -1); Actor_Start_Speech_Sample(0, 3660); Loop_Actor_Walk_To_XYZ(0, -109.0f, -73.0f, -89.0f, 0, 0, false, 0); @@ -315,7 +315,7 @@ void ScriptNR07::sub_402284() { } } -void ScriptNR07::sub_402510() { +void SceneScriptNR07::sub_402510() { Actor_Says(0, 3690, 14); Actor_Start_Speech_Sample(3, 750); Loop_Actor_Walk_To_XYZ(0, -109.0f, -73.0f, -89.0f, 0, 0, false, 0); @@ -330,7 +330,7 @@ void ScriptNR07::sub_402510() { } } -void ScriptNR07::sub_402614() { +void SceneScriptNR07::sub_402614() { Actor_Says(0, 3705, 19); Actor_Says(3, 760, 53); if (Game_Flag_Query(47)) { @@ -346,7 +346,7 @@ void ScriptNR07::sub_402614() { } } -void ScriptNR07::sub_402738() { +void SceneScriptNR07::sub_402738() { Actor_Modify_Friendliness_To_Other(3, 0, -3); Actor_Says(0, 3615, 16); Actor_Says(3, 770, 30); @@ -363,7 +363,7 @@ void ScriptNR07::sub_402738() { Actor_Says(0, 3740, 19); } -void ScriptNR07::sub_4028FC() { +void SceneScriptNR07::sub_4028FC() { Actor_Says(0, 3620, 19); Actor_Says(3, 840, 30); Actor_Says(0, 3745, 9); diff --git a/engines/bladerunner/script/nr08.cpp b/engines/bladerunner/script/scene/nr08.cpp index 62bf3c7bfd..3d1058901e 100644 --- a/engines/bladerunner/script/nr08.cpp +++ b/engines/bladerunner/script/scene/nr08.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR08::InitializeScene() { +void SceneScriptNR08::InitializeScene() { if (Actor_Query_Goal_Number(1) == 231) { Setup_Scene_Information(-1174.1f, 0.32f, 303.9f, 435); } else if (Game_Flag_Query(546)) { @@ -69,7 +69,7 @@ void ScriptNR08::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptNR08::SceneLoaded() { +void SceneScriptNR08::SceneLoaded() { Obstacle_Object("BOX283", true); Unobstacle_Object("BOX283", true); if (Actor_Query_Goal_Number(3) == 210) { @@ -77,23 +77,23 @@ void ScriptNR08::SceneLoaded() { } } -bool ScriptNR08::MouseClick(int x, int y) { +bool SceneScriptNR08::MouseClick(int x, int y) { return false; } -bool ScriptNR08::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR08::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR08::ClickedOnActor(int actorId) { +bool SceneScriptNR08::ClickedOnActor(int actorId) { return false; } -bool ScriptNR08::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR08::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR08::ClickedOnExit(int exitId) { +bool SceneScriptNR08::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -1102.88f, 0.0f, 107.43f, 0, 1, false, 0)) { Game_Flag_Set(547); @@ -123,11 +123,11 @@ bool ScriptNR08::ClickedOnExit(int exitId) { return false; } -bool ScriptNR08::ClickedOn2DRegion(int region) { +bool SceneScriptNR08::ClickedOn2DRegion(int region) { return false; } -void ScriptNR08::SceneFrameAdvanced(int frame) { +void SceneScriptNR08::SceneFrameAdvanced(int frame) { if (!Music_Is_Playing()) { sub_4021B4(); } @@ -166,10 +166,10 @@ void ScriptNR08::SceneFrameAdvanced(int frame) { //return false; } -void ScriptNR08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR08::PlayerWalkedIn() { +void SceneScriptNR08::PlayerWalkedIn() { if (Actor_Query_Goal_Number(3) != 210 || Game_Flag_Query(729)) { Music_Adjust(51, 0, 2); } else { @@ -206,7 +206,7 @@ void ScriptNR08::PlayerWalkedIn() { } } -void ScriptNR08::PlayerWalkedOut() { +void SceneScriptNR08::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(547)) { @@ -214,10 +214,10 @@ void ScriptNR08::PlayerWalkedOut() { } } -void ScriptNR08::DialogueQueueFlushed(int a1) { +void SceneScriptNR08::DialogueQueueFlushed(int a1) { } -void ScriptNR08::sub_4021B4() { +void SceneScriptNR08::sub_4021B4() { if (Music_Is_Playing()) { Music_Adjust(51, 0, 2); } else if (Actor_Query_Goal_Number(3) == 210) { diff --git a/engines/bladerunner/script/nr09.cpp b/engines/bladerunner/script/scene/nr09.cpp index 8453fa3420..19a95e30e2 100644 --- a/engines/bladerunner/script/nr09.cpp +++ b/engines/bladerunner/script/scene/nr09.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR09::InitializeScene() { +void SceneScriptNR09::InitializeScene() { if (Game_Flag_Query(476)) { if (!Game_Flag_Query(640)) { Ambient_Sounds_Adjust_Looping_Sound(452, 22, 100, 2); @@ -49,29 +49,29 @@ void ScriptNR09::InitializeScene() { Ambient_Sounds_Add_Sound(308, 2, 50, 7, 17, -100, 100, -101, -101, 0, 0); } -void ScriptNR09::SceneLoaded() { +void SceneScriptNR09::SceneLoaded() { Obstacle_Object("X2NEWSPAPER", true); Unobstacle_Object("X2NEWSPAPER", true); Unclickable_Object("X2NEWSPAPER"); } -bool ScriptNR09::MouseClick(int x, int y) { +bool SceneScriptNR09::MouseClick(int x, int y) { return false; } -bool ScriptNR09::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR09::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR09::ClickedOnActor(int actorId) { +bool SceneScriptNR09::ClickedOnActor(int actorId) { return false; } -bool ScriptNR09::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR09::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR09::ClickedOnExit(int exitId) { +bool SceneScriptNR09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -564.07f, 0.35f, 399.04f, 0, 1, false, 0)) { Game_Flag_Set(475); @@ -92,20 +92,20 @@ bool ScriptNR09::ClickedOnExit(int exitId) { return false; } -bool ScriptNR09::ClickedOn2DRegion(int region) { +bool SceneScriptNR09::ClickedOn2DRegion(int region) { return false; } -void ScriptNR09::SceneFrameAdvanced(int frame) { +void SceneScriptNR09::SceneFrameAdvanced(int frame) { if (!Music_Is_Playing()) { sub_40172C(); } } -void ScriptNR09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR09::PlayerWalkedIn() { +void SceneScriptNR09::PlayerWalkedIn() { if (Game_Flag_Query(614)) { Loop_Actor_Walk_To_XYZ(0, -704.07001f, 0.35f, 623.04f, 0, 0, false, 0); Game_Flag_Reset(614); @@ -113,16 +113,16 @@ void ScriptNR09::PlayerWalkedIn() { //return false; } -void ScriptNR09::PlayerWalkedOut() { +void SceneScriptNR09::PlayerWalkedOut() { if (Game_Flag_Query(475)) { Music_Stop(2); } } -void ScriptNR09::DialogueQueueFlushed(int a1) { +void SceneScriptNR09::DialogueQueueFlushed(int a1) { } -void ScriptNR09::sub_40172C() { +void SceneScriptNR09::sub_40172C() { if (Music_Is_Playing()) { Music_Adjust(31, -80, 2); } else { diff --git a/engines/bladerunner/script/nr10.cpp b/engines/bladerunner/script/scene/nr10.cpp index f52d80889d..708e1ccb9a 100644 --- a/engines/bladerunner/script/nr10.cpp +++ b/engines/bladerunner/script/scene/nr10.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR10::InitializeScene() { +void SceneScriptNR10::InitializeScene() { if (Game_Flag_Query(475)) { Game_Flag_Reset(475); Setup_Scene_Information(-136.78f, 2.84f, -234.43f, 320); @@ -50,18 +50,18 @@ void ScriptNR10::InitializeScene() { } } -void ScriptNR10::SceneLoaded() { +void SceneScriptNR10::SceneLoaded() { Obstacle_Object("HOOK 01", true); Unobstacle_Object("BOX21", true); Unobstacle_Object("BOX23", true); Unclickable_Object("BOX18"); } -bool ScriptNR10::MouseClick(int x, int y) { +bool SceneScriptNR10::MouseClick(int x, int y) { return Game_Flag_Query(642); } -bool ScriptNR10::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR10::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BOX18", objectName) && a2 && Game_Flag_Query(642)) { Actor_Set_Goal_Number(3, 250); Game_Flag_Set(640); @@ -79,15 +79,15 @@ bool ScriptNR10::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR10::ClickedOnActor(int actorId) { +bool SceneScriptNR10::ClickedOnActor(int actorId) { return false; } -bool ScriptNR10::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR10::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR10::ClickedOnExit(int exitId) { +bool SceneScriptNR10::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -152.78f, 2.84f, -238.43f, 0, 1, false, 0)) { Game_Flag_Set(476); @@ -107,11 +107,11 @@ bool ScriptNR10::ClickedOnExit(int exitId) { return false; } -bool ScriptNR10::ClickedOn2DRegion(int region) { +bool SceneScriptNR10::ClickedOn2DRegion(int region) { return false; } -void ScriptNR10::SceneFrameAdvanced(int frame) { +void SceneScriptNR10::SceneFrameAdvanced(int frame) { if (frame == 122) { Game_Flag_Set(642); Actor_Set_Invisible(0, true); @@ -131,10 +131,10 @@ void ScriptNR10::SceneFrameAdvanced(int frame) { //return false; } -void ScriptNR10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR10::PlayerWalkedIn() { +void SceneScriptNR10::PlayerWalkedIn() { if (Actor_Query_Goal_Number(3) == 246) { Player_Set_Combat_Mode(true); //return true; @@ -155,10 +155,10 @@ void ScriptNR10::PlayerWalkedIn() { // return false; } -void ScriptNR10::PlayerWalkedOut() { +void SceneScriptNR10::PlayerWalkedOut() { } -void ScriptNR10::DialogueQueueFlushed(int a1) { +void SceneScriptNR10::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp index 40d7478d2e..171b6fcd5d 100644 --- a/engines/bladerunner/script/nr11.cpp +++ b/engines/bladerunner/script/scene/nr11.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptNR11::InitializeScene() { +void SceneScriptNR11::InitializeScene() { Setup_Scene_Information(100.0f, 1.75f, -4.0f, 0); Scene_Exit_Add_2D_Exit(0, 450, 305, 565, 345, 2); if (!Game_Flag_Query(640)) { @@ -50,7 +50,7 @@ void ScriptNR11::InitializeScene() { } } -void ScriptNR11::SceneLoaded() { +void SceneScriptNR11::SceneLoaded() { Obstacle_Object("COATRACK", true); Unobstacle_Object("BOX13", true); Clickable_Object("LOFT04"); @@ -105,11 +105,11 @@ void ScriptNR11::SceneLoaded() { } } -bool ScriptNR11::MouseClick(int x, int y) { +bool SceneScriptNR11::MouseClick(int x, int y) { return false; } -bool ScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("CLOTHING02", objectName) || Object_Query_Click("BOX27", objectName) || Object_Query_Click("BOX39", objectName) || Object_Query_Click("BOX44", objectName) || Object_Query_Click("DRESS", objectName) || Object_Query_Click("COATRACK", objectName) || Object_Query_Click("COLUMN3 DETS", objectName) || Object_Query_Click("COLUMN PIPE01", objectName) || Object_Query_Click("RECTANGLE02", objectName) || Object_Query_Click("COLUMN04", objectName) || Object_Query_Click("COATRACK01", objectName) || Object_Query_Click("SHIRT", objectName) || Object_Query_Click("SKIRT 02", objectName) || Object_Query_Click("CLOTHING B 03", objectName) || Object_Query_Click("BUST BUST", objectName)) { if (a2) { @@ -196,15 +196,15 @@ bool ScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptNR11::ClickedOnActor(int actorId) { +bool SceneScriptNR11::ClickedOnActor(int actorId) { return false; } -bool ScriptNR11::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptNR11::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptNR11::ClickedOnExit(int exitId) { +bool SceneScriptNR11::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 100.0f, 1.75f, -8.0f, 0, 1, false, 0)) { Game_Flag_Set(477); @@ -215,11 +215,11 @@ bool ScriptNR11::ClickedOnExit(int exitId) { return false; } -bool ScriptNR11::ClickedOn2DRegion(int region) { +bool SceneScriptNR11::ClickedOn2DRegion(int region) { return false; } -void ScriptNR11::SceneFrameAdvanced(int frame) { +void SceneScriptNR11::SceneFrameAdvanced(int frame) { if (frame == 62) { Ambient_Sounds_Play_Sound(449, 40, 100, 100, 10); } @@ -283,10 +283,10 @@ void ScriptNR11::SceneFrameAdvanced(int frame) { //return true; } -void ScriptNR11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptNR11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptNR11::PlayerWalkedIn() { +void SceneScriptNR11::PlayerWalkedIn() { if (Actor_Query_Goal_Number(3) == 250) { Player_Set_Combat_Mode(true); if (Game_Flag_Query(47)) { @@ -334,14 +334,14 @@ void ScriptNR11::PlayerWalkedIn() { // return true; } -void ScriptNR11::PlayerWalkedOut() { +void SceneScriptNR11::PlayerWalkedOut() { } -void ScriptNR11::DialogueQueueFlushed(int a1) { +void SceneScriptNR11::DialogueQueueFlushed(int a1) { } -void ScriptNR11::sub_4027D0(int actorId, signed int frame) { +void SceneScriptNR11::sub_4027D0(int actorId, signed int frame) { float x; float y; float z; @@ -361,7 +361,7 @@ void ScriptNR11::sub_4027D0(int actorId, signed int frame) { Actor_Face_XYZ(actorId, x, y, z, true); } -void ScriptNR11::sub_4028EC() { +void SceneScriptNR11::sub_4028EC() { Un_Combat_Target_Object("CLOTHING02"); Un_Combat_Target_Object("BOX27"); Un_Combat_Target_Object("BOX39"); diff --git a/engines/bladerunner/script/ps01.cpp b/engines/bladerunner/script/scene/ps01.cpp index 1af1b93ed7..e3c9e4d62f 100644 --- a/engines/bladerunner/script/ps01.cpp +++ b/engines/bladerunner/script/scene/ps01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS01::InitializeScene() { +void SceneScriptPS01::InitializeScene() { Setup_Scene_Information(1872.0f, 16592.0f, -2975.0f, 200); Scene_Exit_Add_2D_Exit(0, 36, 194, 138, 326, 0); if (Game_Flag_Query(251)) { @@ -51,7 +51,7 @@ void ScriptPS01::InitializeScene() { } } -void ScriptPS01::SceneLoaded() { +void SceneScriptPS01::SceneLoaded() { Obstacle_Object("TUBE81", true); if (Game_Flag_Query(251)) { Unobstacle_Object("Barrier Obstacle", true); @@ -60,23 +60,23 @@ void ScriptPS01::SceneLoaded() { Unobstacle_Object("TUBE81", true); } -bool ScriptPS01::MouseClick(int x, int y) { +bool SceneScriptPS01::MouseClick(int x, int y) { return false; } -bool ScriptPS01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS01::ClickedOnActor(int actorId) { +bool SceneScriptPS01::ClickedOnActor(int actorId) { return false; } -bool ScriptPS01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS01::ClickedOnExit(int exitId) { +bool SceneScriptPS01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 1920.0f, 16581.0f, -2653.0f, 12, 1, false, 0)) { Game_Flag_Set(718); @@ -174,11 +174,11 @@ bool ScriptPS01::ClickedOnExit(int exitId) { return false; } -bool ScriptPS01::ClickedOn2DRegion(int region) { +bool SceneScriptPS01::ClickedOn2DRegion(int region) { return false; } -void ScriptPS01::SceneFrameAdvanced(int frame) { +void SceneScriptPS01::SceneFrameAdvanced(int frame) { if (frame == 71 || frame == 188) { Sound_Play(116, 100, 40, 0, 50); } @@ -249,10 +249,10 @@ void ScriptPS01::SceneFrameAdvanced(int frame) { return; } -void ScriptPS01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS01::PlayerWalkedIn() { +void SceneScriptPS01::PlayerWalkedIn() { if (Game_Flag_Query(130)) { Actor_Set_At_XYZ(0, 1920.0f, 16581.0f, -2653.0f, 150); Game_Flag_Reset(130); @@ -260,7 +260,7 @@ void ScriptPS01::PlayerWalkedIn() { //return false; } -void ScriptPS01::PlayerWalkedOut() { +void SceneScriptPS01::PlayerWalkedOut() { Actor_Set_Invisible(0, false); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -271,7 +271,7 @@ void ScriptPS01::PlayerWalkedOut() { } } -void ScriptPS01::DialogueQueueFlushed(int a1) { +void SceneScriptPS01::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ps02.cpp b/engines/bladerunner/script/scene/ps02.cpp index 3ca56e1550..84ae31d82c 100644 --- a/engines/bladerunner/script/ps02.cpp +++ b/engines/bladerunner/script/scene/ps02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS02::InitializeScene() { +void SceneScriptPS02::InitializeScene() { Player_Loses_Control(); Setup_Scene_Information(-13.31f, -40.28f, -48.12f, 30); Scene_Exit_Add_2D_Exit(0, 0, 0, 240, 479, 3); @@ -36,18 +36,18 @@ void ScriptPS02::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptPS02::SceneLoaded() { +void SceneScriptPS02::SceneLoaded() { Obstacle_Object("E.DOOR01", true); Obstacle_Object("E.DOOR02", true); Clickable_Object("E.DOOR01"); Clickable_Object("E.DOOR02"); } -bool ScriptPS02::MouseClick(int x, int y) { +bool SceneScriptPS02::MouseClick(int x, int y) { return false; } -bool ScriptPS02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS02::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("E.DOOR01", objectName) || Object_Query_Click("E.D00R02", objectName)) { if (Game_Flag_Query(130) ) { if (!Loop_Actor_Walk_To_XYZ(0, -5.0f, -40.0f, -15.0f, 0, 1, false, 0)) { @@ -87,23 +87,23 @@ bool ScriptPS02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS02::ClickedOnActor(int actorId) { +bool SceneScriptPS02::ClickedOnActor(int actorId) { return false; } -bool ScriptPS02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS02::ClickedOnExit(int exitId) { +bool SceneScriptPS02::ClickedOnExit(int exitId) { return false; } -bool ScriptPS02::ClickedOn2DRegion(int region) { +bool SceneScriptPS02::ClickedOn2DRegion(int region) { return false; } -void ScriptPS02::SceneFrameAdvanced(int frame) { +void SceneScriptPS02::SceneFrameAdvanced(int frame) { if (frame == 1) { Ambient_Sounds_Play_Sound(208, 45, 0, 0, 0); } @@ -113,10 +113,10 @@ void ScriptPS02::SceneFrameAdvanced(int frame) { //return true; } -void ScriptPS02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS02::PlayerWalkedIn() { +void SceneScriptPS02::PlayerWalkedIn() { Game_Flag_Reset(718); Actor_Face_XYZ(0, 0, 0, 450.0f, true); Player_Gains_Control(); @@ -141,16 +141,16 @@ void ScriptPS02::PlayerWalkedIn() { //return true; } -void ScriptPS02::PlayerWalkedOut() { +void SceneScriptPS02::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Player_Gains_Control(); } -void ScriptPS02::DialogueQueueFlushed(int a1) { +void SceneScriptPS02::DialogueQueueFlushed(int a1) { } -void ScriptPS02::sub_4018BC() { +void SceneScriptPS02::sub_4018BC() { Scene_Exits_Disable(); switch (Elevator_Activate(2)) { case 7: diff --git a/engines/bladerunner/script/ps03.cpp b/engines/bladerunner/script/scene/ps03.cpp index e3835d04db..347c52305b 100644 --- a/engines/bladerunner/script/ps03.cpp +++ b/engines/bladerunner/script/scene/ps03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS03::InitializeScene() { +void SceneScriptPS03::InitializeScene() { if (Game_Flag_Query(39)) { Actor_Set_At_XYZ(0, -674.0f, -354.0f, 550.0f, 900); Setup_Scene_Information(-674.0f, -354.62f, 550.0f, 900); @@ -51,29 +51,29 @@ void ScriptPS03::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptPS03::SceneLoaded() { +void SceneScriptPS03::SceneLoaded() { Obstacle_Object("TABLE05", true); Unclickable_Object("COP1PS03"); Unclickable_Object("COP2PS03"); } -bool ScriptPS03::MouseClick(int x, int y) { +bool SceneScriptPS03::MouseClick(int x, int y) { return false; } -bool ScriptPS03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS03::ClickedOnActor(int actorId) { +bool SceneScriptPS03::ClickedOnActor(int actorId) { return false; } -bool ScriptPS03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS03::ClickedOnExit(int exitId) { +bool SceneScriptPS03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -674.0f, -354.0f, 550.0f, 0, 1, false, 0)) { Game_Flag_Set(42); @@ -107,17 +107,17 @@ bool ScriptPS03::ClickedOnExit(int exitId) { return false; } -bool ScriptPS03::ClickedOn2DRegion(int region) { +bool SceneScriptPS03::ClickedOn2DRegion(int region) { return false; } -void ScriptPS03::SceneFrameAdvanced(int frame) { +void SceneScriptPS03::SceneFrameAdvanced(int frame) { } -void ScriptPS03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS03::PlayerWalkedIn() { +void SceneScriptPS03::PlayerWalkedIn() { if (!Game_Flag_Query(478)) { Game_Flag_Set(478); //return true; @@ -125,10 +125,10 @@ void ScriptPS03::PlayerWalkedIn() { //return false; } -void ScriptPS03::PlayerWalkedOut() { +void SceneScriptPS03::PlayerWalkedOut() { } -void ScriptPS03::DialogueQueueFlushed(int a1) { +void SceneScriptPS03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ps04.cpp b/engines/bladerunner/script/scene/ps04.cpp index 3718c6d513..65dea816b9 100644 --- a/engines/bladerunner/script/ps04.cpp +++ b/engines/bladerunner/script/scene/ps04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS04::InitializeScene() { +void SceneScriptPS04::InitializeScene() { AI_Movement_Track_Pause(4); if (Game_Flag_Query(42)) { Game_Flag_Reset(42); @@ -50,7 +50,7 @@ void ScriptPS04::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptPS04::SceneLoaded() { +void SceneScriptPS04::SceneLoaded() { Obstacle_Object("CHAIR07", true); Unobstacle_Object("GOOD B.WALL", true); Unobstacle_Object("B.DOOR", true); @@ -65,15 +65,15 @@ void ScriptPS04::SceneLoaded() { } } -bool ScriptPS04::MouseClick(int x, int y) { +bool SceneScriptPS04::MouseClick(int x, int y) { return false; } -bool ScriptPS04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS04::ClickedOnActor(int actorId) { +bool SceneScriptPS04::ClickedOnActor(int actorId) { if (actorId == 4) { if (!Loop_Actor_Walk_To_Actor(0, 4, 36, 1, false)) { Actor_Face_Actor(0, 4, true); @@ -85,7 +85,7 @@ bool ScriptPS04::ClickedOnActor(int actorId) { return false; } -bool ScriptPS04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS04::ClickedOnItem(int itemId, bool a2) { if (itemId == 111 && Actor_Query_Is_In_Current_Set(4)) { Actor_Says(4, 560, 30); } else if (!Actor_Clue_Query(0, 80)) { @@ -97,7 +97,7 @@ bool ScriptPS04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS04::ClickedOnExit(int exitId) { +bool SceneScriptPS04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -668.0f, -350.85f, 962.0f, 0, 1, false, 0)) { Game_Flag_Set(39); @@ -110,31 +110,31 @@ bool ScriptPS04::ClickedOnExit(int exitId) { return false; } -bool ScriptPS04::ClickedOn2DRegion(int region) { +bool SceneScriptPS04::ClickedOn2DRegion(int region) { return false; } -void ScriptPS04::SceneFrameAdvanced(int frame) { +void SceneScriptPS04::SceneFrameAdvanced(int frame) { } -void ScriptPS04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS04::PlayerWalkedIn() { +void SceneScriptPS04::PlayerWalkedIn() { if (Actor_Query_Which_Set_In(4) == 64) { Actor_Face_Actor(0, 4, true); } //return false; } -void ScriptPS04::PlayerWalkedOut() { +void SceneScriptPS04::PlayerWalkedOut() { AI_Movement_Track_Unpause(4); } -void ScriptPS04::DialogueQueueFlushed(int a1) { +void SceneScriptPS04::DialogueQueueFlushed(int a1) { } -void ScriptPS04::sub_4017E4() { +void SceneScriptPS04::sub_4017E4() { Dialogue_Menu_Clear_List(); if (Global_Variable_Query(1) > 1) { if (Actor_Clue_Query(0, 51)) { diff --git a/engines/bladerunner/script/ps05.cpp b/engines/bladerunner/script/scene/ps05.cpp index 0636daf163..97778f6f5f 100644 --- a/engines/bladerunner/script/ps05.cpp +++ b/engines/bladerunner/script/scene/ps05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS05::InitializeScene() { +void SceneScriptPS05::InitializeScene() { if (Game_Flag_Query(21)) { Setup_Scene_Information(547.59f, 0.18f, -216.84f, 334); } else if (Game_Flag_Query(22)) { @@ -47,7 +47,7 @@ void ScriptPS05::InitializeScene() { Ambient_Sounds_Add_Sound(74, 5, 20, 5, 9, -70, 70, -101, -101, 0, 0); } -void ScriptPS05::SceneLoaded() { +void SceneScriptPS05::SceneLoaded() { Obstacle_Object("WATER FOUNTAIN", true); Clickable_Object("WATER FOUNTAIN"); Clickable_Object("ASHTRAY"); @@ -59,11 +59,11 @@ void ScriptPS05::SceneLoaded() { Unclickable_Object("CUP"); } -bool ScriptPS05::MouseClick(int x, int y) { +bool SceneScriptPS05::MouseClick(int x, int y) { return false; } -bool ScriptPS05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS05::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("WATER FOUNTAIN", objectName) && !Loop_Actor_Walk_To_Scene_Object(0, "WATER FOUNTAIN", 12, 1, false)) { Actor_Face_Object(0, "WATER FOUNTAIN", true); Actor_Says(0, 3490, 18); @@ -86,11 +86,11 @@ bool ScriptPS05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS05::ClickedOnActor(int actorId) { +bool SceneScriptPS05::ClickedOnActor(int actorId) { return false; } -bool ScriptPS05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS05::ClickedOnItem(int itemId, bool a2) { if (Game_Flag_Query(23)) { Actor_Set_At_XYZ(0, 718.72f, 0.37f, -461.26f, 600); } else if (Game_Flag_Query(22)) { @@ -104,7 +104,7 @@ bool ScriptPS05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS05::ClickedOnExit(int exitId) { +bool SceneScriptPS05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_Waypoint(0, 2, 24, 1, false)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -133,7 +133,7 @@ bool ScriptPS05::ClickedOnExit(int exitId) { return false; } -bool ScriptPS05::ClickedOn2DRegion(int region) { +bool SceneScriptPS05::ClickedOn2DRegion(int region) { if (region == 0 && !Loop_Actor_Walk_To_XYZ(0, 694.78f, 0.37f, -321.05f, 0, 1, false, 0)) { Actor_Face_Heading(0, 130, false); View_Score_Board(); @@ -141,27 +141,27 @@ bool ScriptPS05::ClickedOn2DRegion(int region) { return false; } -void ScriptPS05::SceneFrameAdvanced(int frame) { +void SceneScriptPS05::SceneFrameAdvanced(int frame) { if (frame == 1 || frame == 16 || frame == 31 || frame == 46) { Sound_Play(149, Random_Query(10, 10), 70, 70, 50); } //return true; } -void ScriptPS05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS05::PlayerWalkedIn() { +void SceneScriptPS05::PlayerWalkedIn() { } -void ScriptPS05::PlayerWalkedOut() { +void SceneScriptPS05::PlayerWalkedOut() { } -void ScriptPS05::DialogueQueueFlushed(int a1) { +void SceneScriptPS05::DialogueQueueFlushed(int a1) { Overlay_Remove("PS05OVER"); } -void ScriptPS05::sub_401B34() { +void SceneScriptPS05::sub_401B34() { int v0; int v1; int v3[7]; @@ -190,7 +190,7 @@ void ScriptPS05::sub_401B34() { } } -void ScriptPS05::sub_401C30() { +void SceneScriptPS05::sub_401C30() { switch (Global_Variable_Query(52)) { case 4: if (!Game_Flag_Query(692)) { diff --git a/engines/bladerunner/script/ps06.cpp b/engines/bladerunner/script/scene/ps06.cpp index a3a1bdfc0a..fdb5e9b109 100644 --- a/engines/bladerunner/script/ps06.cpp +++ b/engines/bladerunner/script/scene/ps06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS06::InitializeScene() { +void SceneScriptPS06::InitializeScene() { Setup_Scene_Information(11257.26f, 707.3f, -4778.31f, 120); Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1); Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); @@ -32,7 +32,7 @@ void ScriptPS06::InitializeScene() { } -void ScriptPS06::SceneLoaded() { +void SceneScriptPS06::SceneLoaded() { Obstacle_Object("E.SCREEN02", true); Clickable_Object("E.SCREEN02"); Clickable_Object("E.MONITOR1"); @@ -40,11 +40,11 @@ void ScriptPS06::SceneLoaded() { Clickable_Object("E.MONITOR3"); } -bool ScriptPS06::MouseClick(int x, int y) { +bool SceneScriptPS06::MouseClick(int x, int y) { return false; } -bool ScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("E.MONITOR1", objectName)) { ESPER_Flag_To_Activate(); return true; @@ -93,15 +93,15 @@ bool ScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS06::ClickedOnActor(int actorId) { +bool SceneScriptPS06::ClickedOnActor(int actorId) { return false; } -bool ScriptPS06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS06::ClickedOnExit(int exitId) { +bool SceneScriptPS06::ClickedOnExit(int exitId) { if (exitId == 0) { Game_Flag_Set(23); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -112,26 +112,26 @@ bool ScriptPS06::ClickedOnExit(int exitId) { return false; } -bool ScriptPS06::ClickedOn2DRegion(int region) { +bool SceneScriptPS06::ClickedOn2DRegion(int region) { return false; } -void ScriptPS06::SceneFrameAdvanced(int frame) { +void SceneScriptPS06::SceneFrameAdvanced(int frame) { } -void ScriptPS06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS06::PlayerWalkedIn() { +void SceneScriptPS06::PlayerWalkedIn() { if (Game_Flag_Query(136)) { Game_Flag_Reset(136); } } -void ScriptPS06::PlayerWalkedOut() { +void SceneScriptPS06::PlayerWalkedOut() { } -void ScriptPS06::DialogueQueueFlushed(int a1) { +void SceneScriptPS06::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ps07.cpp b/engines/bladerunner/script/scene/ps07.cpp index 8d8ade5d78..c67ccaf658 100644 --- a/engines/bladerunner/script/ps07.cpp +++ b/engines/bladerunner/script/scene/ps07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS07::InitializeScene() { +void SceneScriptPS07::InitializeScene() { Setup_Scene_Information(609.07f, 0.22f, -598.67f, 768); Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1); Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); @@ -42,16 +42,16 @@ void ScriptPS07::InitializeScene() { Ambient_Sounds_Add_Sound(145, 5, 30, 5, 8, -100, 100, -101, -101, 0, 0); } -void ScriptPS07::SceneLoaded() { +void SceneScriptPS07::SceneLoaded() { Obstacle_Object("RICE BOX01", true); Unobstacle_Object("RICE BOX01", true); } -bool ScriptPS07::MouseClick(int x, int y) { +bool SceneScriptPS07::MouseClick(int x, int y) { return false; } -bool ScriptPS07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS07::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("L.MOUSE", objectName)) { Sound_Play(155, 70, 0, 0, 50); if (Actor_Query_Goal_Number(30) < 4 && Actor_Query_Goal_Number(30) > 0) { @@ -64,7 +64,7 @@ bool ScriptPS07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS07::ClickedOnActor(int actorId) { +bool SceneScriptPS07::ClickedOnActor(int actorId) { if (actorId == 30) { Actor_Face_Actor(0, 30, true); Actor_Set_Goal_Number(30, 3); @@ -130,11 +130,11 @@ bool ScriptPS07::ClickedOnActor(int actorId) { } -bool ScriptPS07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS07::ClickedOnExit(int exitId) { +bool SceneScriptPS07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 609.07f, 0.22f, -598.67f, 0, 0, false, 0)) { Set_Enter(62, 66); @@ -144,32 +144,32 @@ bool ScriptPS07::ClickedOnExit(int exitId) { return false; } -bool ScriptPS07::ClickedOn2DRegion(int region) { +bool SceneScriptPS07::ClickedOn2DRegion(int region) { return false; } -void ScriptPS07::SceneFrameAdvanced(int frame) { +void SceneScriptPS07::SceneFrameAdvanced(int frame) { } -void ScriptPS07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS07::PlayerWalkedIn() { +void SceneScriptPS07::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, 561.07f, 0.34f, -606.67f, 6, 0, false, 0); Game_Flag_Reset(131); //return false; } -void ScriptPS07::PlayerWalkedOut() { +void SceneScriptPS07::PlayerWalkedOut() { if (!Game_Flag_Query(138) && Global_Variable_Query(1) == 1) { Actor_Set_Goal_Number(30, 0); } } -void ScriptPS07::DialogueQueueFlushed(int a1) { +void SceneScriptPS07::DialogueQueueFlushed(int a1) { } -void ScriptPS07::sub_401D60() { +void SceneScriptPS07::sub_401D60() { Actor_Says(30, 100, 13); Actor_Says(0, 4145, 13); Actor_Says(30, 110, 12); diff --git a/engines/bladerunner/script/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp index 4977056a54..fa28841a47 100644 --- a/engines/bladerunner/script/ps09.cpp +++ b/engines/bladerunner/script/scene/ps09.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS09::InitializeScene() { +void SceneScriptPS09::InitializeScene() { if (Game_Flag_Query(465)) { Setup_Scene_Information(-410.0f, 0.26f, -200.0f, 512); } else { @@ -57,21 +57,21 @@ void ScriptPS09::InitializeScene() { } } -void ScriptPS09::SceneLoaded() { +void SceneScriptPS09::SceneLoaded() { Obstacle_Object("OFFICE DOOR", true); Unobstacle_Object("OFFICE DOOR", true); Unclickable_Object("OFFICE DOOR"); } -bool ScriptPS09::MouseClick(int x, int y) { +bool SceneScriptPS09::MouseClick(int x, int y) { return false; } -bool ScriptPS09::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS09::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS09::ClickedOnActor(int actorId) { +bool SceneScriptPS09::ClickedOnActor(int actorId) { if (actorId == 11 && !Loop_Actor_Walk_To_XYZ(0, -381.11f, 0.0f, -135.55f, 0, 1, false, 0)) { Actor_Face_Actor(0, 11, true); Actor_Face_Actor(11, 0, true); @@ -170,11 +170,11 @@ bool ScriptPS09::ClickedOnActor(int actorId) { return false; } -bool ScriptPS09::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS09::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS09::ClickedOnExit(int exitId) { +bool SceneScriptPS09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -559.15f, 0.0f, -85.06f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -187,21 +187,21 @@ bool ScriptPS09::ClickedOnExit(int exitId) { return false; } -bool ScriptPS09::ClickedOn2DRegion(int region) { +bool SceneScriptPS09::ClickedOn2DRegion(int region) { return false; } -void ScriptPS09::SceneFrameAdvanced(int frame) { +void SceneScriptPS09::SceneFrameAdvanced(int frame) { if (frame == 1 || frame == 15 || frame == 20 || frame == 31 || frame == 33 || frame == 35 || frame == 52 || frame == 54) { Sound_Play(97, Random_Query(50, 33), 10, 10, 50); } //return true; } -void ScriptPS09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS09::PlayerWalkedIn() { +void SceneScriptPS09::PlayerWalkedIn() { if (Game_Flag_Query(465)) { Player_Loses_Control(); Delay(2000); @@ -223,13 +223,13 @@ void ScriptPS09::PlayerWalkedIn() { //return false; } -void ScriptPS09::PlayerWalkedOut() { +void SceneScriptPS09::PlayerWalkedOut() { } -void ScriptPS09::DialogueQueueFlushed(int a1) { +void SceneScriptPS09::DialogueQueueFlushed(int a1) { } -void ScriptPS09::sub_402090() { +void SceneScriptPS09::sub_402090() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 179) || Actor_Clue_Query(0, 180) || Actor_Clue_Query(0, 181) ) { DM_Add_To_List_Never_Repeat_Once_Selected(170, 5, 5, 3); diff --git a/engines/bladerunner/script/ps10.cpp b/engines/bladerunner/script/scene/ps10.cpp index 0135bffade..a00868cb6a 100644 --- a/engines/bladerunner/script/ps10.cpp +++ b/engines/bladerunner/script/scene/ps10.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS10::InitializeScene() { +void SceneScriptPS10::InitializeScene() { Police_Maze_Set_Pause_State(1); if (Game_Flag_Query(15)) { float x = World_Waypoint_Query_X(4); @@ -63,7 +63,7 @@ static int track_data_6[] = {-26, 10, 20, -18, 10, 20, -9, 6, -5, 264, -1, 0, -7 static int track_data_7[] = {-26, 10, 20, -18, 10, 20, -9, 7, -5, 993, -1, 0, -7, 4000, 6000, -8, 7, -10, 159, 100, -15, 7, 1, -23, 7, -2, 34, -3, 500, -22, 7, -6, 491, 80, -2, 20, -3, 0, -24, 27, 33, -2, 0, -9, 7, -11, 3, -12, 7, -4}; static int track_data_8[] = {-26, 10, 20, -18, 10, 20, -9, 8, -5, 738, -1, 0, -7, 2000, 5000, -15, 8, 1, -22, 8, -8, 8, -10, 0, 33, -2, 23, -10, 0, 33, -3, 200, -10, 32, 33, -6, 498, 100, -10, 0, 33, -3, 100, -24, 27, 33, -10, 32, 33, -2, 35, -10, 32, 33, -3, 100, -24, 27, 33, -10, 0, 33, -2, 23, -10, 32, 33, -3, 100, -24, 27, 33, -10, 32, 33, -6, 758, 100, -10, 32, 33, -2, 89, -10, 0, 33, -7, 4000, 6000, -15, 8, 1, -22, 8, -5, 216, -10, 32, 33, -2, 69, -3, 100, -10, 32, 33, -6, 498, 100, -3, 100, -24, 27, 33, -10, 0, 33, -6, 216, 100, -10, 32, 33, -2, 0, -9, 8, -12, 8, -4}; -void ScriptPS10::SceneLoaded() { +void SceneScriptPS10::SceneLoaded() { Obstacle_Object("PARKMETR01", true); Obstacle_Object("PARKMETR02", true); Obstacle_Object("PARKMETR03", true); @@ -117,19 +117,19 @@ void ScriptPS10::SceneLoaded() { Preload(450); } -bool ScriptPS10::MouseClick(int x, int y) { +bool SceneScriptPS10::MouseClick(int x, int y) { return false; } -bool ScriptPS10::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS10::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS10::ClickedOnActor(int actorId) { +bool SceneScriptPS10::ClickedOnActor(int actorId) { return false; } -bool ScriptPS10::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS10::ClickedOnItem(int itemId, bool a2) { if (Player_Query_Combat_Mode()) { switch (itemId) { case 3: @@ -183,7 +183,7 @@ bool ScriptPS10::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS10::ClickedOnExit(int exitId) { +bool SceneScriptPS10::ClickedOnExit(int exitId) { if (exitId == 1) { if (!Loop_Actor_Walk_To_Waypoint(0, 6, 12, 1, false)) { Game_Flag_Set(14); @@ -198,17 +198,17 @@ bool ScriptPS10::ClickedOnExit(int exitId) { return false; } -bool ScriptPS10::ClickedOn2DRegion(int region) { +bool SceneScriptPS10::ClickedOn2DRegion(int region) { return false; } -void ScriptPS10::SceneFrameAdvanced(int frame) { +void SceneScriptPS10::SceneFrameAdvanced(int frame) { } -void ScriptPS10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS10::PlayerWalkedIn() { +void SceneScriptPS10::PlayerWalkedIn() { if (Game_Flag_Query(15)) { Loop_Actor_Walk_To_XYZ(0, -352.09f, -9.23f, 267.95f, 0, 0, true, 0); Police_Maze_Set_Pause_State(0); @@ -227,13 +227,13 @@ void ScriptPS10::PlayerWalkedIn() { } } -void ScriptPS10::PlayerWalkedOut() { +void SceneScriptPS10::PlayerWalkedOut() { } -void ScriptPS10::DialogueQueueFlushed(int a1) { +void SceneScriptPS10::DialogueQueueFlushed(int a1) { } -void ScriptPS10::sub_402238() { +void SceneScriptPS10::sub_402238() { Item_Remove_From_World(0); Item_Remove_From_World(1); Item_Remove_From_World(2); diff --git a/engines/bladerunner/script/ps11.cpp b/engines/bladerunner/script/scene/ps11.cpp index d979619480..1b20781451 100644 --- a/engines/bladerunner/script/ps11.cpp +++ b/engines/bladerunner/script/scene/ps11.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS11::InitializeScene() { +void SceneScriptPS11::InitializeScene() { if (Game_Flag_Query(14)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); @@ -55,7 +55,7 @@ static int track_data_22[] = {-26, 11, 20, -18, 11, 20, -9, 22, -5, 255, -1, 0, static int track_data_23[] = {-26, 11, 20, -18, 11, 20, -9, 23, -5, 310, -1, 0, -7, 3000, 6000, -15, 23, 1, -23, 23, -8, 23, -3, 1000, -2, 24, -3, 1000, -2, 0, -25, -9, 23, -13, 22, 17, -12, 23, -1, 0, -4}; static int track_data_27[] = {-26, 11, 20, -18, 11, 20, -9, 27, -5, 346, -1, 0, -3, 0, -15, 27, 1, -22, 27, -8, 27, -2, 14, -3, 1000, -24, 12, 33, -2, 0, -9, 27, -13, 21, 20, -12, 27, -1, 0, -4}; -void ScriptPS11::SceneLoaded() { +void SceneScriptPS11::SceneLoaded() { Obstacle_Object("PARKMETR01", true); Obstacle_Object("PARKMETR02", true); Obstacle_Object("PARKMETR03", true); @@ -127,19 +127,19 @@ void ScriptPS11::SceneLoaded() { Ambient_Sounds_Add_Sound(308, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); } -bool ScriptPS11::MouseClick(int x, int y) { +bool SceneScriptPS11::MouseClick(int x, int y) { return false; } -bool ScriptPS11::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS11::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS11::ClickedOnActor(int actorId) { +bool SceneScriptPS11::ClickedOnActor(int actorId) { return false; } -bool ScriptPS11::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS11::ClickedOnItem(int itemId, bool a2) { if (Player_Query_Combat_Mode()) { switch (itemId) { case 15: @@ -221,7 +221,7 @@ bool ScriptPS11::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS11::ClickedOnExit(int exitId) { +bool SceneScriptPS11::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_Waypoint(0, 6, 12, 1, false)) { Game_Flag_Set(15); @@ -243,27 +243,27 @@ bool ScriptPS11::ClickedOnExit(int exitId) { return false; } -bool ScriptPS11::ClickedOn2DRegion(int region) { +bool SceneScriptPS11::ClickedOn2DRegion(int region) { return false; } -void ScriptPS11::SceneFrameAdvanced(int frame) { +void SceneScriptPS11::SceneFrameAdvanced(int frame) { } -void ScriptPS11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS11::PlayerWalkedIn() { +void SceneScriptPS11::PlayerWalkedIn() { Police_Maze_Set_Pause_State(0); } -void ScriptPS11::PlayerWalkedOut() { +void SceneScriptPS11::PlayerWalkedOut() { } -void ScriptPS11::DialogueQueueFlushed(int a1) { +void SceneScriptPS11::DialogueQueueFlushed(int a1) { } -void ScriptPS11::sub_402744() { +void SceneScriptPS11::sub_402744() { Item_Remove_From_World(9); Item_Remove_From_World(10); Item_Remove_From_World(11); diff --git a/engines/bladerunner/script/ps12.cpp b/engines/bladerunner/script/scene/ps12.cpp index b99eafd2fc..c13fd3c535 100644 --- a/engines/bladerunner/script/ps12.cpp +++ b/engines/bladerunner/script/scene/ps12.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS12::InitializeScene() { +void SceneScriptPS12::InitializeScene() { Police_Maze_Set_Pause_State(1); if (Game_Flag_Query(16)) { Scene_Loop_Start_Special(0, 0, 0); @@ -56,7 +56,7 @@ static int track_data_43[] = {-26, 12, 20, -18, 12, 20, -9, 43, -5, 540, -1, 0, static int track_data_44[] = {-26, 12, 20, -18, 12, 20, -9, 44, -5, 109, -1, 0, -7, 5000, 5000, -8, 44, -10, 29, 33, -15, 44, 1, -23, 44, -2, 5, -7, 2000, 2000, -10, 29, 33, -2, 0, -25, -9, 44, -13, 42, 29, -12, 44, -4}; static int track_data_45[] = {-26, 12, 20, -18, 12, 20, -9, 45, -5, 540, -1, 0, -7, 3000, 10000, -8, 45, -10, 33, 33, -15, 45, 1, -2, 9, -3, 1000, -22, 45, -6, 284, 80, -3, 0, -6, 28, 80, -3, 1000, -24, 27, 33, -10, 34, 33, -2, 0, -9, 45, -11, 43, -12, 45, -4}; -void ScriptPS12::SceneLoaded() { +void SceneScriptPS12::SceneLoaded() { Obstacle_Object("PARKMETR01", true); Obstacle_Object("PARKMETR02", true); Obstacle_Object("PARKMETR03", true); @@ -129,19 +129,19 @@ void ScriptPS12::SceneLoaded() { Ambient_Sounds_Add_Sound(308, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); } -bool ScriptPS12::MouseClick(int x, int y) { +bool SceneScriptPS12::MouseClick(int x, int y) { return false; } -bool ScriptPS12::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS12::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS12::ClickedOnActor(int actorId) { +bool SceneScriptPS12::ClickedOnActor(int actorId) { return false; } -bool ScriptPS12::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS12::ClickedOnItem(int itemId, bool a2) { if (Player_Query_Combat_Mode()) { switch (itemId) { case 31: @@ -230,7 +230,7 @@ bool ScriptPS12::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS12::ClickedOnExit(int exitId) { +bool SceneScriptPS12::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_Waypoint(0, 8, 12, 1, false)) { Game_Flag_Set(17); @@ -255,17 +255,17 @@ bool ScriptPS12::ClickedOnExit(int exitId) { return false; } -bool ScriptPS12::ClickedOn2DRegion(int region) { +bool SceneScriptPS12::ClickedOn2DRegion(int region) { return false; } -void ScriptPS12::SceneFrameAdvanced(int frame) { +void SceneScriptPS12::SceneFrameAdvanced(int frame) { } -void ScriptPS12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS12::PlayerWalkedIn() { +void SceneScriptPS12::PlayerWalkedIn() { if (Game_Flag_Query(16)) { Loop_Actor_Walk_To_XYZ(0, -546.0f, -9.06f, 570.0f, 0, 1, false, 0); Game_Flag_Reset(16); @@ -273,13 +273,13 @@ void ScriptPS12::PlayerWalkedIn() { Police_Maze_Set_Pause_State(0); } -void ScriptPS12::PlayerWalkedOut() { +void SceneScriptPS12::PlayerWalkedOut() { } -void ScriptPS12::DialogueQueueFlushed(int a1) { +void SceneScriptPS12::DialogueQueueFlushed(int a1) { } -void ScriptPS12::sub_4028C4() { +void SceneScriptPS12::sub_4028C4() { Item_Remove_From_World(29); Item_Remove_From_World(30); Item_Remove_From_World(31); diff --git a/engines/bladerunner/script/ps13.cpp b/engines/bladerunner/script/scene/ps13.cpp index 5b5ac20eb8..134376c0cb 100644 --- a/engines/bladerunner/script/ps13.cpp +++ b/engines/bladerunner/script/scene/ps13.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS13::InitializeScene() { +void SceneScriptPS13::InitializeScene() { Police_Maze_Set_Pause_State(1); if (Game_Flag_Query(18)) { Scene_Loop_Start_Special(0, 0, 0); @@ -71,7 +71,7 @@ static int track_data_58[] = {-26, 13, 20, -18, 13, 20, -9, 58, -5, 922, -1, 0, static int track_data_62[] = {-26, 13, 20, -18, 13, 20, -9, 62, -5, 465, -1, 0, -7, 3000, 3000, -8, 62, -10, 33, 33, -15, 62, 1, -23, 62, -2, 14, -3, 1000, -22, 62, -6, 650, 80, -3, 0, -6, 937, 80, -3, 1000, -24, 27, 33, -3, 500, -6, 650, 80, -3, 0, -6, 465, 80, -2, 0, -9, 62, -13, 46, 63, -12, 62, -4}; static int track_data_63[] = {-26, 13, 20, -18, 13, 20, -9, 63, -5, 465, -1, 0, -3, 3000, -8, 63, -10, 33, 33, -15, 63, 1, -23, 63, -2, 9, -3, 1000, -22, 63, -6, 710, 80, -3, 0, -6, 960, 80, -3, 1000, -24, 27, 33, -3, 500, -6, 710, 80, -3, 0, -6, 460, 80, -2, 0, -9, 63, -13, 46, 62, -12, 63, -4}; -void ScriptPS13::SceneLoaded() { +void SceneScriptPS13::SceneLoaded() { Obstacle_Object("PARKMETR01", true); Obstacle_Object("PARKMETR02", true); Obstacle_Object("PARKMETR03", true); @@ -124,19 +124,19 @@ void ScriptPS13::SceneLoaded() { Police_Maze_Target_Track_Add(63, -325.0f, -7.75f, 1543.0f, -300.0f, -7.75f, 1543.0f, 10, track_data_63, false); } -bool ScriptPS13::MouseClick(int x, int y) { +bool SceneScriptPS13::MouseClick(int x, int y) { return false; } -bool ScriptPS13::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS13::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS13::ClickedOnActor(int actorId) { +bool SceneScriptPS13::ClickedOnActor(int actorId) { return false; } -bool ScriptPS13::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS13::ClickedOnItem(int itemId, bool a2) { if (Player_Query_Combat_Mode()) { switch (itemId) { case 48: @@ -214,7 +214,7 @@ bool ScriptPS13::ClickedOnItem(int itemId, bool a2) { } -bool ScriptPS13::ClickedOnExit(int exitId) { +bool SceneScriptPS13::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_Waypoint(0, 10, 12, 1, false)) { Game_Flag_Set(19); @@ -244,27 +244,27 @@ bool ScriptPS13::ClickedOnExit(int exitId) { return false; } -bool ScriptPS13::ClickedOn2DRegion(int region) { +bool SceneScriptPS13::ClickedOn2DRegion(int region) { return false; } -void ScriptPS13::SceneFrameAdvanced(int frame) { +void SceneScriptPS13::SceneFrameAdvanced(int frame) { } -void ScriptPS13::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS13::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS13::PlayerWalkedIn() { +void SceneScriptPS13::PlayerWalkedIn() { Police_Maze_Set_Pause_State(0); } -void ScriptPS13::PlayerWalkedOut() { +void SceneScriptPS13::PlayerWalkedOut() { } -void ScriptPS13::DialogueQueueFlushed(int a1) { +void SceneScriptPS13::DialogueQueueFlushed(int a1) { } -void ScriptPS13::sub_40267C() { +void SceneScriptPS13::sub_40267C() { Item_Remove_From_World(46); Item_Remove_From_World(47); Item_Remove_From_World(48); diff --git a/engines/bladerunner/script/ps14.cpp b/engines/bladerunner/script/scene/ps14.cpp index e68460252f..54b5d19498 100644 --- a/engines/bladerunner/script/ps14.cpp +++ b/engines/bladerunner/script/scene/ps14.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS14::InitializeScene() { +void SceneScriptPS14::InitializeScene() { if (Game_Flag_Query(134)) { Setup_Scene_Information(-1119.61f, 508.14f, -1208.22f, 315); Game_Flag_Reset(134); @@ -42,30 +42,30 @@ void ScriptPS14::InitializeScene() { Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); } -void ScriptPS14::SceneLoaded() { +void SceneScriptPS14::SceneLoaded() { Obstacle_Object("CABLES UPPER RIGHT", true); Unobstacle_Object("CYLINDER63", true); Clickable_Object("CABLES UPPER RIGHT"); Unclickable_Object("CABLES UPPER RIGHT"); } -bool ScriptPS14::MouseClick(int x, int y) { +bool SceneScriptPS14::MouseClick(int x, int y) { return false; } -bool ScriptPS14::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS14::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS14::ClickedOnActor(int actorId) { +bool SceneScriptPS14::ClickedOnActor(int actorId) { return false; } -bool ScriptPS14::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS14::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS14::ClickedOnExit(int exitId) { +bool SceneScriptPS14::ClickedOnExit(int exitId) { if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(0, -2101.0f, 508.14f, -1361.0f, 0, 1, false, 0)) { Actor_Face_Heading(0, 819, false); @@ -100,17 +100,17 @@ bool ScriptPS14::ClickedOnExit(int exitId) { return false; } -bool ScriptPS14::ClickedOn2DRegion(int region) { +bool SceneScriptPS14::ClickedOn2DRegion(int region) { return false; } -void ScriptPS14::SceneFrameAdvanced(int frame) { +void SceneScriptPS14::SceneFrameAdvanced(int frame) { } -void ScriptPS14::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS14::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS14::PlayerWalkedIn() { +void SceneScriptPS14::PlayerWalkedIn() { if (Game_Flag_Query(672)) { Loop_Actor_Walk_To_XYZ(0, -801.45f, 508.14f, -1596.68f, 0, 0, false, 0); Game_Flag_Reset(672); @@ -118,10 +118,10 @@ void ScriptPS14::PlayerWalkedIn() { //return false; } -void ScriptPS14::PlayerWalkedOut() { +void SceneScriptPS14::PlayerWalkedOut() { } -void ScriptPS14::DialogueQueueFlushed(int a1) { +void SceneScriptPS14::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ps15.cpp b/engines/bladerunner/script/scene/ps15.cpp index 5200d89f7c..a9a058d599 100644 --- a/engines/bladerunner/script/ps15.cpp +++ b/engines/bladerunner/script/scene/ps15.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptPS15::InitializeScene() { +void SceneScriptPS15::InitializeScene() { Setup_Scene_Information(-360.0f, -113.43f, 50.0f, 0); Scene_Exit_Add_2D_Exit(0, 0, 0, 20, 479, 3); Scene_Exit_Add_2D_Exit(1, 620, 0, 639, 479, 1); @@ -40,22 +40,22 @@ void ScriptPS15::InitializeScene() { Actor_Set_At_XYZ(34, -265.4f, -113.43f, -31.29f, 623); } -void ScriptPS15::SceneLoaded() { +void SceneScriptPS15::SceneLoaded() { Obstacle_Object("E.ARCH", true); if (Global_Variable_Query(1) == 2) { Item_Add_To_World(110, 983, 101, -208.0f, -113.43f, 30.28f, 750, 16, 12, false, true, false, true); } } -bool ScriptPS15::MouseClick(int x, int y) { +bool SceneScriptPS15::MouseClick(int x, int y) { return false; } -bool ScriptPS15::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS15::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptPS15::ClickedOnActor(int actorId) { +bool SceneScriptPS15::ClickedOnActor(int actorId) { if (actorId == 34) { if ((Actor_Clue_Query(0, 80) || Actor_Clue_Query(0, 83)) && !Actor_Clue_Query(0, 81)) { if (!Loop_Actor_Walk_To_XYZ(0, -256.0f, -113.43f, 43.51f, 0, 1, false, 0)) { @@ -83,7 +83,7 @@ bool ScriptPS15::ClickedOnActor(int actorId) { return false; } -bool ScriptPS15::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS15::ClickedOnItem(int itemId, bool a2) { if (itemId == 110) { if (Actor_Clue_Query(0, 80) && Actor_Clue_Query(0, 83)) { Actor_Says(0, 8570, 14); @@ -102,7 +102,7 @@ bool ScriptPS15::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptPS15::ClickedOnExit(int exitId) { +bool SceneScriptPS15::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -360.0f, -113.43f, 50.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -126,17 +126,17 @@ bool ScriptPS15::ClickedOnExit(int exitId) { return false; } -bool ScriptPS15::ClickedOn2DRegion(int region) { +bool SceneScriptPS15::ClickedOn2DRegion(int region) { return false; } -void ScriptPS15::SceneFrameAdvanced(int frame) { +void SceneScriptPS15::SceneFrameAdvanced(int frame) { } -void ScriptPS15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptPS15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptPS15::PlayerWalkedIn() { +void SceneScriptPS15::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, -326.93f, -113.43f, 101.42f, 0, 0, false, 0); if (!Game_Flag_Query(43)) { Actor_Face_Actor(0, 34, true); @@ -164,10 +164,10 @@ void ScriptPS15::PlayerWalkedIn() { } } -void ScriptPS15::PlayerWalkedOut() { +void SceneScriptPS15::PlayerWalkedOut() { } -void ScriptPS15::DialogueQueueFlushed(int a1) { +void SceneScriptPS15::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp index f3a7748c57..8d8b604a89 100644 --- a/engines/bladerunner/script/rc01.cpp +++ b/engines/bladerunner/script/scene/rc01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptRC01::InitializeScene() { +void SceneScriptRC01::InitializeScene() { #if _DEBUG //TODO: not part of game, remove Game_Flag_Set(24); // force skip intro @@ -124,7 +124,7 @@ void ScriptRC01::InitializeScene() { I_Sez(""); } -void ScriptRC01::SceneLoaded() { +void SceneScriptRC01::SceneLoaded() { Obstacle_Object("HYDRANT02", true); Obstacle_Object("PARKING METER 04", true); Obstacle_Object("CHEVY PROP", true); @@ -197,11 +197,11 @@ void ScriptRC01::SceneLoaded() { } } -bool ScriptRC01::MouseClick(int x, int y) { +bool SceneScriptRC01::MouseClick(int x, int y) { return y >= 430; } -bool ScriptRC01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptRC01::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BARICADE01", objectName) || Object_Query_Click("BARICADE03", objectName) || Object_Query_Click("BARICADE04", objectName) @@ -258,7 +258,7 @@ bool ScriptRC01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptRC01::ClickedOnActor(int actorId) { +bool SceneScriptRC01::ClickedOnActor(int actorId) { if (actorId == 23 && Global_Variable_Query(1) == 1) { if (!Loop_Actor_Walk_To_Actor(0, 23, 36, 1, false)) { Actor_Face_Actor(0, 23, true); @@ -319,7 +319,7 @@ bool ScriptRC01::ClickedOnActor(int actorId) { return false; } -bool ScriptRC01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptRC01::ClickedOnItem(int itemId, bool a2) { if (itemId == 66) { Actor_Set_Goal_Number(23, 0); if (!Loop_Actor_Walk_To_Item(0, 66, 36, 1, false)) { @@ -346,7 +346,7 @@ bool ScriptRC01::ClickedOnItem(int itemId, bool a2) { } -void ScriptRC01::sub_4037AC() { +void SceneScriptRC01::sub_4037AC() { Player_Loses_Control(); Game_Flag_Set(182); Actor_Set_Immunity_To_Obstacles(0, true); @@ -355,7 +355,7 @@ void ScriptRC01::sub_4037AC() { Player_Gains_Control(); } -bool ScriptRC01::ClickedOnExit(int exitId) { +bool SceneScriptRC01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -174.77f, 5.55f, 25.95f, 12, 1, false, 0)) { @@ -529,7 +529,7 @@ bool ScriptRC01::ClickedOnExit(int exitId) { return false; } -void ScriptRC01::sub_403850() { +void SceneScriptRC01::sub_403850() { if (!Game_Flag_Query(186) && !Loop_Actor_Walk_To_Scene_Object(0, "BARICADE03", 36, true, false)) { Actor_Set_Goal_Number(23, 0); Actor_Face_Object(0, "BARICADE03", true); @@ -542,7 +542,7 @@ void ScriptRC01::sub_403850() { } } -bool ScriptRC01::ClickedOn2DRegion(int region) { +bool SceneScriptRC01::ClickedOn2DRegion(int region) { if (region == 0) { sub_403850(); return true; @@ -550,7 +550,7 @@ bool ScriptRC01::ClickedOn2DRegion(int region) { return false; } -void ScriptRC01::SceneFrameAdvanced(int frame) { +void SceneScriptRC01::SceneFrameAdvanced(int frame) { if (frame == 1) { Sound_Play(118, 40, 0, 0, 50); // CARDOWN3.AUD } @@ -574,10 +574,10 @@ void ScriptRC01::SceneFrameAdvanced(int frame) { } } -void ScriptRC01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptRC01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptRC01::PlayerWalkedIn() { +void SceneScriptRC01::PlayerWalkedIn() { if (Game_Flag_Query(249) && !Game_Flag_Query(9) && !Game_Flag_Query(114)) { sub_4037AC(); } @@ -606,7 +606,7 @@ void ScriptRC01::PlayerWalkedIn() { //return false; } -void ScriptRC01::PlayerWalkedOut() { +void SceneScriptRC01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(8) && !Game_Flag_Query(115) && Global_Variable_Query(1)) { @@ -617,7 +617,7 @@ void ScriptRC01::PlayerWalkedOut() { // return 1; } -void ScriptRC01::DialogueQueueFlushed(int a1) { +void SceneScriptRC01::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp index 7a387c2583..6e6000dfa3 100644 --- a/engines/bladerunner/script/rc02.cpp +++ b/engines/bladerunner/script/scene/rc02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptRC02::InitializeScene() { +void SceneScriptRC02::InitializeScene() { if (Game_Flag_Query(8)) { Setup_Scene_Information(-103.0f, -1238.89f, 108603.04f, 1007); } else { @@ -53,7 +53,7 @@ void ScriptRC02::InitializeScene() { Ambient_Sounds_Add_Sound(87, 20, 80, 10, 20, 100, 100, -101, -101, 0, 0); } -void ScriptRC02::SceneLoaded() { +void SceneScriptRC02::SceneLoaded() { Obstacle_Object("TABLETOP", true); Obstacle_Object("DRAPE01", true); Obstacle_Object("DRAPE03", true); @@ -86,11 +86,11 @@ void ScriptRC02::SceneLoaded() { } } -bool ScriptRC02::MouseClick(int x, int y) { +bool SceneScriptRC02::MouseClick(int x, int y) { return false; } -bool ScriptRC02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptRC02::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("SCRTY CA03", objectName) && !Actor_Clue_Query(0, 12)) { if (Actor_Clue_Query(0, 22) && Actor_Query_Is_In_Current_Set(15)) { AI_Movement_Track_Pause(15); @@ -127,7 +127,7 @@ bool ScriptRC02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -void ScriptRC02::sub_402A7C() { +void SceneScriptRC02::sub_402A7C() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(0, 5, 6, 2); DM_Add_To_List_Never_Repeat_Once_Selected(10, 5, 4, 8); @@ -198,7 +198,7 @@ void ScriptRC02::sub_402A7C() { } } -bool ScriptRC02::ClickedOnActor(int actorId) { +bool SceneScriptRC02::ClickedOnActor(int actorId) { if (actorId != 15) { return false; } @@ -295,7 +295,7 @@ bool ScriptRC02::ClickedOnActor(int actorId) { return true; } -bool ScriptRC02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptRC02::ClickedOnItem(int itemId, bool a2) { if (itemId == 100 || itemId == 101 || itemId == 102) { if (!Loop_Actor_Walk_To_Item(0, 100, 24, 1, false)) { Actor_Face_Item(0, 100, true); @@ -312,7 +312,7 @@ bool ScriptRC02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptRC02::ClickedOnExit(int exitId) { +bool SceneScriptRC02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -71.51f, -1238.89f, 108587.15f, 0, 1, false, 0)) { Game_Flag_Set(9); @@ -335,17 +335,17 @@ bool ScriptRC02::ClickedOnExit(int exitId) { return false; } -bool ScriptRC02::ClickedOn2DRegion(int region) { +bool SceneScriptRC02::ClickedOn2DRegion(int region) { return false; } -void ScriptRC02::SceneFrameAdvanced(int frame) { +void SceneScriptRC02::SceneFrameAdvanced(int frame) { } -void ScriptRC02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptRC02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptRC02::PlayerWalkedIn() { +void SceneScriptRC02::PlayerWalkedIn() { Player_Set_Combat_Mode(false); if (Game_Flag_Query(8)) { Player_Loses_Control(); @@ -383,10 +383,10 @@ void ScriptRC02::PlayerWalkedIn() { } } -void ScriptRC02::PlayerWalkedOut() { +void SceneScriptRC02::PlayerWalkedOut() { } -void ScriptRC02::DialogueQueueFlushed(int a1) { +void SceneScriptRC02::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp index 92074a8af9..17e96f3895 100644 --- a/engines/bladerunner/script/rc03.cpp +++ b/engines/bladerunner/script/scene/rc03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptRC03::InitializeScene() { +void SceneScriptRC03::InitializeScene() { if (Game_Flag_Query(115) ) { Setup_Scene_Information(298.0f, -4.0f, 405.0f, 800); Game_Flag_Reset(115); @@ -82,7 +82,7 @@ void ScriptRC03::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptRC03::SceneLoaded() { +void SceneScriptRC03::SceneLoaded() { Obstacle_Object("Box-Streetlight01", true); Obstacle_Object("Box-Streetlight02", true); Obstacle_Object("Parking Meter 01", true); @@ -118,23 +118,23 @@ void ScriptRC03::SceneLoaded() { Unclickable_Object("FOREGROUND JUNK01"); } -bool ScriptRC03::MouseClick(int x, int y) { +bool SceneScriptRC03::MouseClick(int x, int y) { return false; } -bool ScriptRC03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptRC03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptRC03::ClickedOnActor(int actorId) { +bool SceneScriptRC03::ClickedOnActor(int actorId) { return false; } -bool ScriptRC03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptRC03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptRC03::ClickedOnExit(int exitId) { +bool SceneScriptRC03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 298.0f, -4.0f, 405.0f, 0, 1, false, 0)) { if (Game_Flag_Query(289)) { @@ -198,11 +198,11 @@ bool ScriptRC03::ClickedOnExit(int exitId) { return false; } -bool ScriptRC03::ClickedOn2DRegion(int region) { +bool SceneScriptRC03::ClickedOn2DRegion(int region) { return false; } -void ScriptRC03::SceneFrameAdvanced(int frame) { +void SceneScriptRC03::SceneFrameAdvanced(int frame) { if (frame == 1) { Sound_Play(286, Random_Query(33, 33), 100, -100, 50); } @@ -211,10 +211,10 @@ void ScriptRC03::SceneFrameAdvanced(int frame) { } } -void ScriptRC03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptRC03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptRC03::sub_402834() { +void SceneScriptRC03::sub_402834() { Actor_Face_Actor(1, 0, true); Actor_Says(1, 1820, 3); Actor_Face_Actor(0, 1, true); @@ -232,7 +232,7 @@ void ScriptRC03::sub_402834() { Actor_Says(1, 2000, 3); } -void ScriptRC03::PlayerWalkedIn() { +void SceneScriptRC03::PlayerWalkedIn() { if (Actor_Query_Goal_Number(7) == 102) { Scene_Exits_Disable(); if (Game_Flag_Query(119) ) { @@ -287,7 +287,7 @@ void ScriptRC03::PlayerWalkedIn() { } } -void ScriptRC03::PlayerWalkedOut() { +void SceneScriptRC03::PlayerWalkedOut() { if (Actor_Query_Goal_Number(7) == 199) { Actor_Set_Goal_Number(7, 198); } @@ -295,7 +295,7 @@ void ScriptRC03::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptRC03::DialogueQueueFlushed(int a1) { +void SceneScriptRC03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/rc04.cpp b/engines/bladerunner/script/scene/rc04.cpp index 830b7f5893..e28653058f 100644 --- a/engines/bladerunner/script/rc04.cpp +++ b/engines/bladerunner/script/scene/rc04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptRC04::InitializeScene() { +void SceneScriptRC04::InitializeScene() { Setup_Scene_Information(45.0f, 0.15f, 68.0f, 1018); Game_Flag_Reset(120); Scene_Exit_Add_2D_Exit(0, 225, 47, 359, 248, 0); @@ -41,7 +41,7 @@ void ScriptRC04::InitializeScene() { Ambient_Sounds_Add_Sound(84, 5, 30, 10, 20, -100, 100, -101, -101, 0, 0); } -void ScriptRC04::SceneLoaded() { +void SceneScriptRC04::SceneLoaded() { Obstacle_Object("Door New 01", true); Obstacle_Object("GRNDNEON05", true); Obstacle_Object("GRNDNEON06", true); @@ -51,15 +51,15 @@ void ScriptRC04::SceneLoaded() { Actor_Set_Goal_Number(67, 200); } -bool ScriptRC04::MouseClick(int x, int y) { +bool SceneScriptRC04::MouseClick(int x, int y) { return false; } -bool ScriptRC04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptRC04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -void ScriptRC04::sub_401DF4() { +void SceneScriptRC04::sub_401DF4() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(0, 11) && !Actor_Clue_Query(0, 62)) { DM_Add_To_List_Never_Repeat_Once_Selected(580, -1, 4, 9); @@ -284,7 +284,7 @@ void ScriptRC04::sub_401DF4() { } } -bool ScriptRC04::ClickedOnActor(int actorId) { +bool SceneScriptRC04::ClickedOnActor(int actorId) { if (Player_Query_Combat_Mode()) { return false; } @@ -364,11 +364,11 @@ bool ScriptRC04::ClickedOnActor(int actorId) { return false; } -bool ScriptRC04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptRC04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptRC04::ClickedOnExit(int exitId) { +bool SceneScriptRC04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 45.0f, 0.15f, 68.0f, 0, 1, false, 0)) { Game_Flag_Set(121); @@ -379,17 +379,17 @@ bool ScriptRC04::ClickedOnExit(int exitId) { return false; } -bool ScriptRC04::ClickedOn2DRegion(int region) { +bool SceneScriptRC04::ClickedOn2DRegion(int region) { return false; } -void ScriptRC04::SceneFrameAdvanced(int frame) { +void SceneScriptRC04::SceneFrameAdvanced(int frame) { } -void ScriptRC04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptRC04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptRC04::PlayerWalkedIn() { +void SceneScriptRC04::PlayerWalkedIn() { Loop_Actor_Walk_To_Waypoint(0, 103, 0, 0, false); if (Global_Variable_Query(1) != 2 || Game_Flag_Query(287) || Player_Query_Combat_Mode()) { if (Global_Variable_Query(1) == 4 && !Game_Flag_Query(289) && !Game_Flag_Query(306)) { @@ -410,11 +410,11 @@ void ScriptRC04::PlayerWalkedIn() { } } -void ScriptRC04::PlayerWalkedOut() { +void SceneScriptRC04::PlayerWalkedOut() { Game_Flag_Reset(303); } -void ScriptRC04::DialogueQueueFlushed(int a1) { +void SceneScriptRC04::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/rc51.cpp b/engines/bladerunner/script/scene/rc51.cpp index 907ffd8ba3..dd62c53aba 100644 --- a/engines/bladerunner/script/rc51.cpp +++ b/engines/bladerunner/script/scene/rc51.cpp @@ -20,18 +20,18 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptRC51::InitializeScene() { +void SceneScriptRC51::InitializeScene() { Setup_Scene_Information(-8.87f, -1238.89f, 108164.27f, 66); Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2); Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); } -void ScriptRC51::SceneLoaded() { +void SceneScriptRC51::SceneLoaded() { Obstacle_Object("POSTER_2", true); Obstacle_Object("CURTAIN", true); Clickable_Object("POSTER_2"); @@ -49,11 +49,11 @@ void ScriptRC51::SceneLoaded() { } } -bool ScriptRC51::MouseClick(int x, int y) { +bool SceneScriptRC51::MouseClick(int x, int y) { return false; } -bool ScriptRC51::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptRC51::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("POSTER_2", objectName)) { Actor_Face_Object(0, "POSTER_2", true); Actor_Says(0, 8620, 3); @@ -62,11 +62,11 @@ bool ScriptRC51::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptRC51::ClickedOnActor(int actorId) { +bool SceneScriptRC51::ClickedOnActor(int actorId) { return false; } -bool ScriptRC51::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptRC51::ClickedOnItem(int itemId, bool a2) { if (itemId == 82 && !Loop_Actor_Walk_To_XYZ(0, 17.97f, -1238.89f, 108053.5f, 0, 1, false, 0)) { Actor_Face_Item(0, 82, true); Actor_Clue_Acquire(0, 8, 1, -1); @@ -99,7 +99,7 @@ bool ScriptRC51::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptRC51::ClickedOnExit(int exitId) { +bool SceneScriptRC51::ClickedOnExit(int exitId) { if (exitId == 0 && !Loop_Actor_Walk_To_XYZ(0, -8.87f, -1238.89f, 108173.27f, 0, 1, false, 0)) { Set_Enter(16, 79); return true; @@ -107,24 +107,24 @@ bool ScriptRC51::ClickedOnExit(int exitId) { return false; } -bool ScriptRC51::ClickedOn2DRegion(int region) { +bool SceneScriptRC51::ClickedOn2DRegion(int region) { return false; } -void ScriptRC51::SceneFrameAdvanced(int frame) { +void SceneScriptRC51::SceneFrameAdvanced(int frame) { } -void ScriptRC51::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptRC51::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptRC51::PlayerWalkedIn() { +void SceneScriptRC51::PlayerWalkedIn() { Game_Flag_Set(709); } -void ScriptRC51::PlayerWalkedOut() { +void SceneScriptRC51::PlayerWalkedOut() { } -void ScriptRC51::DialogueQueueFlushed(int a1) { +void SceneScriptRC51::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/tb02.cpp b/engines/bladerunner/script/scene/tb02.cpp index 50f3b9728e..c3aa0c207d 100644 --- a/engines/bladerunner/script/tb02.cpp +++ b/engines/bladerunner/script/scene/tb02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptTB02::InitializeScene() { +void SceneScriptTB02::InitializeScene() { if (Game_Flag_Query(155)) { Setup_Scene_Information(-152.0f, 0.0f, 1774.0f, 999); } else if (Game_Flag_Query(95)) { @@ -82,20 +82,20 @@ void ScriptTB02::InitializeScene() { } } -void ScriptTB02::SceneLoaded() { +void SceneScriptTB02::SceneLoaded() { Obstacle_Object("SPHERE02", true); Unobstacle_Object("BOX36", true); } -bool ScriptTB02::MouseClick(int x, int y) { +bool SceneScriptTB02::MouseClick(int x, int y) { return Region_Check(600, 300, 639, 479); } -bool ScriptTB02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptTB02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptTB02::ClickedOnActor(int actorId) { +bool SceneScriptTB02::ClickedOnActor(int actorId) { if (actorId == 17) { if (!Loop_Actor_Walk_To_XYZ(0, -76.35f, 0.15f, 1564.2f, 0, 1, false, 0)) { Actor_Face_Actor(0, 17, true); @@ -147,11 +147,11 @@ bool ScriptTB02::ClickedOnActor(int actorId) { return false; } -bool ScriptTB02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptTB02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptTB02::ClickedOnExit(int exitId) { +bool SceneScriptTB02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -152.0f, 0.0f, 1774.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -258,17 +258,17 @@ bool ScriptTB02::ClickedOnExit(int exitId) { return false; } -bool ScriptTB02::ClickedOn2DRegion(int region) { +bool SceneScriptTB02::ClickedOn2DRegion(int region) { return false; } -void ScriptTB02::SceneFrameAdvanced(int frame) { +void SceneScriptTB02::SceneFrameAdvanced(int frame) { } -void ScriptTB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptTB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptTB02::PlayerWalkedIn() { +void SceneScriptTB02::PlayerWalkedIn() { if (Game_Flag_Query(625) && ((Game_Flag_Reset(625) , Global_Variable_Query(1) == 2) || Global_Variable_Query(1) == 3)) { Set_Enter(18, 108); //return true; @@ -350,15 +350,15 @@ void ScriptTB02::PlayerWalkedIn() { //return false; } -void ScriptTB02::PlayerWalkedOut() { +void SceneScriptTB02::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptTB02::DialogueQueueFlushed(int a1) { +void SceneScriptTB02::DialogueQueueFlushed(int a1) { } -void ScriptTB02::sub_402644() { +void SceneScriptTB02::sub_402644() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(700, 4, 5, 6); if (Actor_Clue_Query(0, 44)) { @@ -420,7 +420,7 @@ void ScriptTB02::sub_402644() { } } -void ScriptTB02::sub_402B50() { +void SceneScriptTB02::sub_402B50() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(740, 4, 5, 6); DM_Add_To_List_Never_Repeat_Once_Selected(750, 3, 5, 5); diff --git a/engines/bladerunner/script/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp index 5a2996f6d9..ec5128346f 100644 --- a/engines/bladerunner/script/tb03.cpp +++ b/engines/bladerunner/script/scene/tb03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptTB03::InitializeScene() { +void SceneScriptTB03::InitializeScene() { if (Game_Flag_Query(448)) { Setup_Scene_Information(-260.0f, 0.15f, 2014.0f, 276); } else { @@ -81,27 +81,27 @@ void ScriptTB03::InitializeScene() { } } -void ScriptTB03::SceneLoaded() { +void SceneScriptTB03::SceneLoaded() { Obstacle_Object("SPHERE02", true); } -bool ScriptTB03::MouseClick(int x, int y) { +bool SceneScriptTB03::MouseClick(int x, int y) { return false; } -bool ScriptTB03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptTB03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptTB03::ClickedOnActor(int actorId) { +bool SceneScriptTB03::ClickedOnActor(int actorId) { return false; } -bool ScriptTB03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptTB03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptTB03::ClickedOnExit(int exitId) { +bool SceneScriptTB03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -260.0f, 0.15f, 2014.0f, 0, 1, false, 0)) { Actor_Set_Goal_Number(17, 304); @@ -125,17 +125,17 @@ bool ScriptTB03::ClickedOnExit(int exitId) { return false; } -bool ScriptTB03::ClickedOn2DRegion(int region) { +bool SceneScriptTB03::ClickedOn2DRegion(int region) { return false; } -void ScriptTB03::SceneFrameAdvanced(int frame) { +void SceneScriptTB03::SceneFrameAdvanced(int frame) { } -void ScriptTB03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptTB03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptTB03::PlayerWalkedIn() { +void SceneScriptTB03::PlayerWalkedIn() { if (Actor_Query_Goal_Number(17) == 304) { Player_Set_Combat_Mode(false); Actor_Says(24, 260, -1); @@ -145,11 +145,11 @@ void ScriptTB03::PlayerWalkedIn() { } } -void ScriptTB03::PlayerWalkedOut() { +void SceneScriptTB03::PlayerWalkedOut() { Music_Stop(2); } -void ScriptTB03::DialogueQueueFlushed(int a1) { +void SceneScriptTB03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/tb05.cpp b/engines/bladerunner/script/scene/tb05.cpp index e61fec4a2d..4bd417a7ae 100644 --- a/engines/bladerunner/script/tb05.cpp +++ b/engines/bladerunner/script/scene/tb05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptTB05::InitializeScene() { +void SceneScriptTB05::InitializeScene() { if (Game_Flag_Query(98)) { Setup_Scene_Information(23.0f, 151.53f, -205.0f, 450); Game_Flag_Set(102); @@ -48,7 +48,7 @@ void ScriptTB05::InitializeScene() { Scene_Loop_Set_Default(0); } -void ScriptTB05::SceneLoaded() { +void SceneScriptTB05::SceneLoaded() { Clickable_Object("MONITOR05"); Unclickable_Object("SMUDGE_GLASS01"); if (!Actor_Clue_Query(0, 44)) { @@ -59,11 +59,11 @@ void ScriptTB05::SceneLoaded() { } } -bool ScriptTB05::MouseClick(int x, int y) { +bool SceneScriptTB05::MouseClick(int x, int y) { return false; } -bool ScriptTB05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptTB05::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("MONITOR05", objectName) && !Loop_Actor_Walk_To_XYZ(0, 122.54f, 147.12f, -197.17f, 0, 1, false, 0)) { Actor_Face_Heading(0, 38, false); if (!Actor_Clue_Query(0, 152) && !Game_Flag_Query(99)) { @@ -116,11 +116,11 @@ bool ScriptTB05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptTB05::ClickedOnActor(int actorId) { +bool SceneScriptTB05::ClickedOnActor(int actorId) { return false; } -bool ScriptTB05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptTB05::ClickedOnItem(int itemId, bool a2) { if (itemId == 76 && !Loop_Actor_Walk_To_XYZ(0, 54.0f, 147.12f, -209.0f, 0, 1, false, 0)) { Actor_Face_Heading(0, 126, false); Item_Remove_From_World(76); @@ -147,7 +147,7 @@ bool ScriptTB05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptTB05::ClickedOnExit(int exitId) { +bool SceneScriptTB05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 23.0f, 151.53f, -205.0f, 12, 1, false, 0)) { Game_Flag_Set(97); @@ -166,11 +166,11 @@ bool ScriptTB05::ClickedOnExit(int exitId) { return false; } -bool ScriptTB05::ClickedOn2DRegion(int region) { +bool SceneScriptTB05::ClickedOn2DRegion(int region) { return false; } -void ScriptTB05::SceneFrameAdvanced(int frame) { +void SceneScriptTB05::SceneFrameAdvanced(int frame) { if (frame == 61) { Sound_Play(150, Random_Query(52, 52), 0, 0, 50); } @@ -180,18 +180,18 @@ void ScriptTB05::SceneFrameAdvanced(int frame) { //return true; } -void ScriptTB05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptTB05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptTB05::PlayerWalkedIn() { +void SceneScriptTB05::PlayerWalkedIn() { } -void ScriptTB05::PlayerWalkedOut() { +void SceneScriptTB05::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptTB05::DialogueQueueFlushed(int a1) { +void SceneScriptTB05::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/tb06.cpp b/engines/bladerunner/script/scene/tb06.cpp index d266e52b28..08975274a8 100644 --- a/engines/bladerunner/script/tb06.cpp +++ b/engines/bladerunner/script/scene/tb06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptTB06::InitializeScene() { +void SceneScriptTB06::InitializeScene() { Setup_Scene_Information(-16.0f, 149.0f, -466.0f, 990); Scene_Exit_Add_2D_Exit(0, 330, 195, 417, 334, 0); Ambient_Sounds_Add_Looping_Sound(236, 50, 0, 1); @@ -43,7 +43,7 @@ void ScriptTB06::InitializeScene() { } } -void ScriptTB06::SceneLoaded() { +void SceneScriptTB06::SceneLoaded() { Obstacle_Object("DOOR", true); Unobstacle_Object("GLASS01", true); Clickable_Object("DOOR"); @@ -61,15 +61,15 @@ void ScriptTB06::SceneLoaded() { } } -bool ScriptTB06::MouseClick(int x, int y) { +bool SceneScriptTB06::MouseClick(int x, int y) { return false; } -bool ScriptTB06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptTB06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptTB06::ClickedOnActor(int actorId) { +bool SceneScriptTB06::ClickedOnActor(int actorId) { if (actorId == 21 && !Loop_Actor_Walk_To_Actor(0, 21, 24, 1, false)) { if (Actor_Clue_Query(0, 49)) { Actor_Says(0, 8665, 13); @@ -90,7 +90,7 @@ bool ScriptTB06::ClickedOnActor(int actorId) { return false; } -bool ScriptTB06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptTB06::ClickedOnItem(int itemId, bool a2) { if (itemId == 84 && !Loop_Actor_Walk_To_Item(0, 84, 12, 1, false)) { Actor_Face_Item(0, 84, true); Actor_Clue_Acquire(0, 65, 1, -1); @@ -124,7 +124,7 @@ bool ScriptTB06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptTB06::ClickedOnExit(int exitId) { +bool SceneScriptTB06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -16.0f, 149.0f, -427.0f, 12, 1, false, 0)) { Game_Flag_Set(98); @@ -136,11 +136,11 @@ bool ScriptTB06::ClickedOnExit(int exitId) { return false; } -bool ScriptTB06::ClickedOn2DRegion(int region) { +bool SceneScriptTB06::ClickedOn2DRegion(int region) { return false; } -void ScriptTB06::SceneFrameAdvanced(int frame) { +void SceneScriptTB06::SceneFrameAdvanced(int frame) { if (frame == 61) { Sound_Play(150, Random_Query(52, 52), 0, 0, 50); } @@ -150,10 +150,10 @@ void ScriptTB06::SceneFrameAdvanced(int frame) { //return true; } -void ScriptTB06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptTB06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptTB06::PlayerWalkedIn() { +void SceneScriptTB06::PlayerWalkedIn() { if (!Game_Flag_Query(102) && !Game_Flag_Query(483)) { Actor_Face_Actor(0, 21, true); Actor_Says(0, 5290, 3); @@ -181,12 +181,12 @@ void ScriptTB06::PlayerWalkedIn() { return; } -void ScriptTB06::PlayerWalkedOut() { +void SceneScriptTB06::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptTB06::DialogueQueueFlushed(int a1) { +void SceneScriptTB06::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/tb07.cpp b/engines/bladerunner/script/scene/tb07.cpp index ca42ebbcd5..31c19423e9 100644 --- a/engines/bladerunner/script/tb07.cpp +++ b/engines/bladerunner/script/scene/tb07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptTB07::InitializeScene() { +void SceneScriptTB07::InitializeScene() { Setup_Scene_Information(68.0f, 12.0f, 288.0f, 0); Scene_Exit_Add_2D_Exit(0, 383, 445, 639, 479, 2); Ambient_Sounds_Add_Looping_Sound(109, 20, 0, 1); @@ -47,24 +47,24 @@ void ScriptTB07::InitializeScene() { } } -void ScriptTB07::SceneLoaded() { +void SceneScriptTB07::SceneLoaded() { Obstacle_Object("EAGLE01", true); Clickable_Object("EAGLE01"); } -bool ScriptTB07::MouseClick(int x, int y) { +bool SceneScriptTB07::MouseClick(int x, int y) { return false; } -bool ScriptTB07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptTB07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptTB07::ClickedOnActor(int actorId) { +bool SceneScriptTB07::ClickedOnActor(int actorId) { return false; } -bool ScriptTB07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptTB07::ClickedOnItem(int itemId, bool a2) { if (!Loop_Actor_Walk_To_Item(0, itemId, 36, 1, false)) { Actor_Face_Item(0, itemId, true); if (itemId == 83) { @@ -76,7 +76,7 @@ bool ScriptTB07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptTB07::ClickedOnExit(int exitId) { +bool SceneScriptTB07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 68.0f, 12.0f, 288.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -160,21 +160,21 @@ bool ScriptTB07::ClickedOnExit(int exitId) { return false; } -bool ScriptTB07::ClickedOn2DRegion(int region) { +bool SceneScriptTB07::ClickedOn2DRegion(int region) { return false; } -void ScriptTB07::SceneFrameAdvanced(int frame) { +void SceneScriptTB07::SceneFrameAdvanced(int frame) { if (frame == 66) { Ambient_Sounds_Play_Sound(591, 20, 99, 0, 0); } //return false; } -void ScriptTB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptTB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptTB07::PlayerWalkedIn() { +void SceneScriptTB07::PlayerWalkedIn() { int v0 = Global_Variable_Query(1); Loop_Actor_Walk_To_XYZ(0, 44.0f, 12.0f, 176.0f, 0, 0, false, 0); if ((v0 == 2 || v0 == 3) && !Game_Flag_Query(612)) { @@ -183,13 +183,13 @@ void ScriptTB07::PlayerWalkedIn() { } } -void ScriptTB07::PlayerWalkedOut() { +void SceneScriptTB07::PlayerWalkedOut() { } -void ScriptTB07::DialogueQueueFlushed(int a1) { +void SceneScriptTB07::DialogueQueueFlushed(int a1) { } -void ScriptTB07::sub_401B0C() { +void SceneScriptTB07::sub_401B0C() { Game_Flag_Set(612); Delay(1500); Loop_Actor_Walk_To_XYZ(0, 44.98f, 12.0f, 49.79f, 0, 0, false, 0); diff --git a/engines/bladerunner/script/ug01.cpp b/engines/bladerunner/script/scene/ug01.cpp index 1d39e9553e..6be3fe67ef 100644 --- a/engines/bladerunner/script/ug01.cpp +++ b/engines/bladerunner/script/scene/ug01.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG01::InitializeScene() { +void SceneScriptUG01::InitializeScene() { if (Game_Flag_Query(317)) { Setup_Scene_Information(34.47f, -50.13f, -924.11f, 500); Game_Flag_Reset(317); @@ -64,18 +64,18 @@ void ScriptUG01::InitializeScene() { } } -void ScriptUG01::SceneLoaded() { +void SceneScriptUG01::SceneLoaded() { Unobstacle_Object("BEAM02", true); Unobstacle_Object("BEAM03", true); Unobstacle_Object("BEAM04", true); Clickable_Object("PIPES_FG_LFT"); } -bool ScriptUG01::MouseClick(int x, int y) { +bool SceneScriptUG01::MouseClick(int x, int y) { return false; } -bool ScriptUG01::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG01::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("PIPES_FG_LFT", objectName)) { if (!Loop_Actor_Walk_To_XYZ(0, -9.0f, -50.13f, -148.0f, 0, 1, false, 0) && !Game_Flag_Query(324)) { Actor_Says(0, 8525, 13); @@ -89,15 +89,15 @@ bool ScriptUG01::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG01::ClickedOnActor(int actorId) { +bool SceneScriptUG01::ClickedOnActor(int actorId) { return false; } -bool ScriptUG01::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG01::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG01::ClickedOnExit(int exitId) { +bool SceneScriptUG01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -32.0f, -50.13f, -1350.0f, 12, 1, false, 0)) { Game_Flag_Set(316); @@ -126,11 +126,11 @@ bool ScriptUG01::ClickedOnExit(int exitId) { return false; } -bool ScriptUG01::ClickedOn2DRegion(int region) { +bool SceneScriptUG01::ClickedOn2DRegion(int region) { return false; } -void ScriptUG01::SceneFrameAdvanced(int frame) { +void SceneScriptUG01::SceneFrameAdvanced(int frame) { if (frame >= 61 && frame <= 120) { float v1 = (120 - frame) / 29500.0f; Set_Fog_Density("BoxFog01", v1); @@ -146,10 +146,10 @@ void ScriptUG01::SceneFrameAdvanced(int frame) { //return false; } -void ScriptUG01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG01::PlayerWalkedIn() { +void SceneScriptUG01::PlayerWalkedIn() { if (Game_Flag_Query(315)) { Loop_Actor_Walk_To_XYZ(0, -55.0f, -50.13f, -288.0f, 12, 0, false, 0); Game_Flag_Reset(315); @@ -167,12 +167,12 @@ void ScriptUG01::PlayerWalkedIn() { //return false; } -void ScriptUG01::PlayerWalkedOut() { +void SceneScriptUG01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptUG01::DialogueQueueFlushed(int a1) { +void SceneScriptUG01::DialogueQueueFlushed(int a1) { } diff --git a/engines/bladerunner/script/ug02.cpp b/engines/bladerunner/script/scene/ug02.cpp index d58806c335..ce09c871b6 100644 --- a/engines/bladerunner/script/ug02.cpp +++ b/engines/bladerunner/script/scene/ug02.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG02::InitializeScene() { +void SceneScriptUG02::InitializeScene() { if (Game_Flag_Query(319)) { Setup_Scene_Information(-313.0f, 155.73f, -128.0f, 556); } else { @@ -53,7 +53,7 @@ void ScriptUG02::InitializeScene() { Ambient_Sounds_Add_Sound(53, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); } -void ScriptUG02::SceneLoaded() { +void SceneScriptUG02::SceneLoaded() { Unobstacle_Object("BOX BACKROOM 2", true); Unobstacle_Object("BACK_ROOM HALFWALL_", true); Unobstacle_Object("GUN_4", true); @@ -72,7 +72,7 @@ void ScriptUG02::SceneLoaded() { } } -bool ScriptUG02::MouseClick(int x, int y) { +bool SceneScriptUG02::MouseClick(int x, int y) { if (Game_Flag_Query(499)) { return false; } @@ -88,7 +88,7 @@ bool ScriptUG02::MouseClick(int x, int y) { return false; } -bool ScriptUG02::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG02::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("GUN_1", objectName) || Object_Query_Click("GUN_2", objectName) || Object_Query_Click("CRATE_3", objectName)) { Actor_Face_Object(0, "GUN_1", true); if (!Game_Flag_Query(449) && Global_Variable_Query(1) < 4) { @@ -127,11 +127,11 @@ bool ScriptUG02::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG02::ClickedOnActor(int actorId) { +bool SceneScriptUG02::ClickedOnActor(int actorId) { return false; } -bool ScriptUG02::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG02::ClickedOnItem(int itemId, bool a2) { if (itemId == 88) { Actor_Face_Item(0, 88, true); Actor_Clue_Acquire(0, 62, 1, -1); @@ -143,7 +143,7 @@ bool ScriptUG02::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG02::ClickedOnExit(int exitId) { +bool SceneScriptUG02::ClickedOnExit(int exitId) { if (exitId == 0) { if (Game_Flag_Query(498) || !sub_402354()) { int v2 = Player_Query_Combat_Mode(); @@ -187,18 +187,18 @@ bool ScriptUG02::ClickedOnExit(int exitId) { return false; } -bool ScriptUG02::ClickedOn2DRegion(int region) { +bool SceneScriptUG02::ClickedOn2DRegion(int region) { return false; } -void ScriptUG02::SceneFrameAdvanced(int frame) { +void SceneScriptUG02::SceneFrameAdvanced(int frame) { //return true; } -void ScriptUG02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG02::PlayerWalkedIn() { +void SceneScriptUG02::PlayerWalkedIn() { if (Game_Flag_Query(314)) { Actor_Set_At_XYZ(0, -106.01f, 84.13f, -228.62f, 575); Loop_Actor_Walk_To_XYZ(0, -148.0f, 84.13f, -67.0f, 0, 0, false, 0); @@ -221,15 +221,15 @@ void ScriptUG02::PlayerWalkedIn() { //return false; } -void ScriptUG02::PlayerWalkedOut() { +void SceneScriptUG02::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptUG02::DialogueQueueFlushed(int a1) { +void SceneScriptUG02::DialogueQueueFlushed(int a1) { } -bool ScriptUG02::sub_402354() { +bool SceneScriptUG02::sub_402354() { if (!Game_Flag_Query(498)) { int v0 = Player_Query_Combat_Mode(); Loop_Actor_Walk_To_XYZ(0, -340.75f, 155.75f, -119.0f, 0, 0, v0, 0); diff --git a/engines/bladerunner/script/ug03.cpp b/engines/bladerunner/script/scene/ug03.cpp index 89c142dcb5..aae97e34e6 100644 --- a/engines/bladerunner/script/ug03.cpp +++ b/engines/bladerunner/script/scene/ug03.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG03::InitializeScene() { +void SceneScriptUG03::InitializeScene() { if (Game_Flag_Query(335)) { Setup_Scene_Information(-51.0f, 0.03f, 255.0f, 780); Game_Flag_Reset(335); @@ -60,7 +60,7 @@ void ScriptUG03::InitializeScene() { Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); } -void ScriptUG03::SceneLoaded() { +void SceneScriptUG03::SceneLoaded() { Obstacle_Object("=WALL_RIGHT_HOLE", true); Unobstacle_Object("=HOLERUBBLE1", true); Clickable_Object("CHAIR_HEADZAPPER"); @@ -70,11 +70,11 @@ void ScriptUG03::SceneLoaded() { Clickable_Object("CHAIR_STRAPLEGRIGHT"); } -bool ScriptUG03::MouseClick(int x, int y) { +bool SceneScriptUG03::MouseClick(int x, int y) { return false; } -bool ScriptUG03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG03::ClickedOn3DObject(const char *objectName, bool a2) { if ((Object_Query_Click("CHAIR_BACK", objectName) || Object_Query_Click("CHAIR_SEAT", objectName) || Object_Query_Click("CHAIR_HEADZAPPER", objectName)) && !Loop_Actor_Walk_To_Scene_Object(0, "CHAIR_BACK", 36, 1, false)) { Actor_Face_Object(0, "CHAIR_BACK", true); if (!Actor_Clue_Query(0, 120)) { @@ -89,15 +89,15 @@ bool ScriptUG03::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG03::ClickedOnActor(int actorId) { +bool SceneScriptUG03::ClickedOnActor(int actorId) { return false; } -bool ScriptUG03::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG03::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG03::ClickedOnExit(int exitId) { +bool SceneScriptUG03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -139.0f, 0.0f, -13.0f, 0, 1, false, 0)) { if (Global_Variable_Query(1) < 4) { @@ -123,23 +123,23 @@ bool ScriptUG03::ClickedOnExit(int exitId) { return false; } -bool ScriptUG03::ClickedOn2DRegion(int region) { +bool SceneScriptUG03::ClickedOn2DRegion(int region) { return false; } -void ScriptUG03::SceneFrameAdvanced(int frame) { +void SceneScriptUG03::SceneFrameAdvanced(int frame) { } -void ScriptUG03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG03::PlayerWalkedIn() { +void SceneScriptUG03::PlayerWalkedIn() { } -void ScriptUG03::PlayerWalkedOut() { +void SceneScriptUG03::PlayerWalkedOut() { } -void ScriptUG03::DialogueQueueFlushed(int a1) { +void SceneScriptUG03::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp index c65d74fdf5..3a1370fec6 100644 --- a/engines/bladerunner/script/ug04.cpp +++ b/engines/bladerunner/script/scene/ug04.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG04::InitializeScene() { +void SceneScriptUG04::InitializeScene() { if (Game_Flag_Query(339)) { Setup_Scene_Information(0.0f, -1.74f, -2400.0f, 496); Game_Flag_Reset(339); @@ -60,7 +60,7 @@ void ScriptUG04::InitializeScene() { Scene_Loop_Set_Default(1); } -void ScriptUG04::SceneLoaded() { +void SceneScriptUG04::SceneLoaded() { Obstacle_Object("NAV", true); Unobstacle_Object("RUBBLE", true); Unobstacle_Object("FLOOR DEBRIS WADS", true); @@ -68,23 +68,23 @@ void ScriptUG04::SceneLoaded() { Unobstacle_Object("FLOOR DEBRIS WADS02", true); } -bool ScriptUG04::MouseClick(int x, int y) { +bool SceneScriptUG04::MouseClick(int x, int y) { return false; } -bool ScriptUG04::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG04::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG04::ClickedOnActor(int actorId) { +bool SceneScriptUG04::ClickedOnActor(int actorId) { return false; } -bool ScriptUG04::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG04::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG04::ClickedOnExit(int exitId) { +bool SceneScriptUG04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -172.0f, 16.29f, -735.0f, 0, 1, false, 0)) { Game_Flag_Set(335); @@ -109,32 +109,32 @@ bool ScriptUG04::ClickedOnExit(int exitId) { return false; } -bool ScriptUG04::ClickedOn2DRegion(int region) { +bool SceneScriptUG04::ClickedOn2DRegion(int region) { return false; } -void ScriptUG04::SceneFrameAdvanced(int frame) { +void SceneScriptUG04::SceneFrameAdvanced(int frame) { if (frame == 1) { Ambient_Sounds_Play_Sound(367, 90, -100, 100, 100); } } -void ScriptUG04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG04::PlayerWalkedIn() { +void SceneScriptUG04::PlayerWalkedIn() { if (Game_Flag_Query(341)) { Loop_Actor_Walk_To_XYZ(0, 60.0f, -1.74f, -976.0f, 6, 0, false, 0); Game_Flag_Reset(341); } } -void ScriptUG04::PlayerWalkedOut() { +void SceneScriptUG04::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptUG04::DialogueQueueFlushed(int a1) { +void SceneScriptUG04::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp index e087cacf92..fed485906d 100644 --- a/engines/bladerunner/script/ug05.cpp +++ b/engines/bladerunner/script/scene/ug05.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG05::InitializeScene() { +void SceneScriptUG05::InitializeScene() { if (Game_Flag_Query(360)) { if (Game_Flag_Query(663) && !Game_Flag_Query(368)) { Setup_Scene_Information(-356.35f, 132.77f, -1092.36f, 389); @@ -69,22 +69,22 @@ void ScriptUG05::InitializeScene() { } } -void ScriptUG05::SceneLoaded() { +void SceneScriptUG05::SceneLoaded() { if (!Game_Flag_Query(368)) { Unobstacle_Object("DROPPED CAR OBSTACL", true); } Obstacle_Object("VANBODY", true); } -bool ScriptUG05::MouseClick(int x, int y) { +bool SceneScriptUG05::MouseClick(int x, int y) { return false; } -bool ScriptUG05::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG05::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG05::ClickedOnActor(int actorId) { +bool SceneScriptUG05::ClickedOnActor(int actorId) { if (!Loop_Actor_Walk_To_Actor(0, actorId, 30, 1, false)) { Actor_Face_Actor(0, actorId, true); int v1 = sub_4021B0(); @@ -107,11 +107,11 @@ bool ScriptUG05::ClickedOnActor(int actorId) { return false; } -bool ScriptUG05::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG05::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG05::ClickedOnExit(int exitId) { +bool SceneScriptUG05::ClickedOnExit(int exitId) { if (exitId == 0) { if (Game_Flag_Query(663) && !Game_Flag_Query(368)) { Loop_Actor_Walk_To_XYZ(0, -356.35f, 132.77f, -1092.36f, 0, 0, false, 0); @@ -159,17 +159,17 @@ bool ScriptUG05::ClickedOnExit(int exitId) { return false; } -bool ScriptUG05::ClickedOn2DRegion(int region) { +bool SceneScriptUG05::ClickedOn2DRegion(int region) { return false; } -void ScriptUG05::SceneFrameAdvanced(int frame) { +void SceneScriptUG05::SceneFrameAdvanced(int frame) { } -void ScriptUG05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG05::PlayerWalkedIn() { +void SceneScriptUG05::PlayerWalkedIn() { if (Game_Flag_Query(663)) { if (Game_Flag_Query(368)) { Music_Stop(2); @@ -213,15 +213,15 @@ void ScriptUG05::PlayerWalkedIn() { Game_Flag_Reset(360); } -void ScriptUG05::PlayerWalkedOut() { +void SceneScriptUG05::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptUG05::DialogueQueueFlushed(int a1) { +void SceneScriptUG05::DialogueQueueFlushed(int a1) { } -int ScriptUG05::sub_4021B0() { +int SceneScriptUG05::sub_4021B0() { if (Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(3) != 599) { return 3; } @@ -231,7 +231,7 @@ int ScriptUG05::sub_4021B0() { return -1; } -void ScriptUG05::sub_402218() { +void SceneScriptUG05::sub_402218() { int v0 = sub_4021B0(); if (v0 != -1) { Actor_Face_Actor(0, v0, true); diff --git a/engines/bladerunner/script/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp index b3198c79ea..7765a6089a 100644 --- a/engines/bladerunner/script/ug06.cpp +++ b/engines/bladerunner/script/scene/ug06.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG06::InitializeScene() { +void SceneScriptUG06::InitializeScene() { if (Game_Flag_Query(680)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -65,7 +65,7 @@ void ScriptUG06::InitializeScene() { Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); } -void ScriptUG06::SceneLoaded() { +void SceneScriptUG06::SceneLoaded() { Obstacle_Object("BOX06", true); Unobstacle_Object("BOX06", true); Unobstacle_Object("BOX07", true); @@ -73,23 +73,23 @@ void ScriptUG06::SceneLoaded() { Unobstacle_Object("BOX05", true); } -bool ScriptUG06::MouseClick(int x, int y) { +bool SceneScriptUG06::MouseClick(int x, int y) { return false; } -bool ScriptUG06::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG06::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG06::ClickedOnActor(int actorId) { +bool SceneScriptUG06::ClickedOnActor(int actorId) { return false; } -bool ScriptUG06::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG06::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG06::ClickedOnExit(int exitId) { +bool SceneScriptUG06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 23.0f, 0.0f, 321.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -114,17 +114,17 @@ bool ScriptUG06::ClickedOnExit(int exitId) { return false; } -bool ScriptUG06::ClickedOn2DRegion(int region) { +bool SceneScriptUG06::ClickedOn2DRegion(int region) { return false; } -void ScriptUG06::SceneFrameAdvanced(int frame) { +void SceneScriptUG06::SceneFrameAdvanced(int frame) { } -void ScriptUG06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG06::PlayerWalkedIn() { +void SceneScriptUG06::PlayerWalkedIn() { if (Game_Flag_Query(340)) { Loop_Actor_Walk_To_XYZ(0, 23.0f, 0.0f, 273.0f, 0, 0, false, 0); Game_Flag_Reset(340); @@ -152,10 +152,10 @@ void ScriptUG06::PlayerWalkedIn() { //return false; } -void ScriptUG06::PlayerWalkedOut() { +void SceneScriptUG06::PlayerWalkedOut() { } -void ScriptUG06::DialogueQueueFlushed(int a1) { +void SceneScriptUG06::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp index b27063b8ce..e276c8e8e0 100644 --- a/engines/bladerunner/script/ug07.cpp +++ b/engines/bladerunner/script/scene/ug07.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG07::InitializeScene() { +void SceneScriptUG07::InitializeScene() { if (Game_Flag_Query(428)) { Setup_Scene_Information(-76.0f, -12.21f, -738.0f, 505); Game_Flag_Reset(428); @@ -57,7 +57,7 @@ void ScriptUG07::InitializeScene() { Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); } -void ScriptUG07::SceneLoaded() { +void SceneScriptUG07::SceneLoaded() { Obstacle_Object("BOX RIGHT WALL 01", true); Obstacle_Object("BOX RIGHT WALL 09", true); Obstacle_Object("SLIDING DOOR", true); @@ -76,23 +76,23 @@ void ScriptUG07::SceneLoaded() { Unobstacle_Object("BOX FOR WALL LEFT13", true); } -bool ScriptUG07::MouseClick(int x, int y) { +bool SceneScriptUG07::MouseClick(int x, int y) { return false; } -bool ScriptUG07::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG07::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG07::ClickedOnActor(int actorId) { +bool SceneScriptUG07::ClickedOnActor(int actorId) { return false; } -bool ScriptUG07::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG07::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG07::ClickedOnExit(int exitId) { +bool SceneScriptUG07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -94.0f, -12.21f, -710.0f, 0, 1, false, 0) && Actor_Query_Goal_Number(5) != 402) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -154,17 +154,17 @@ bool ScriptUG07::ClickedOnExit(int exitId) { return false; } -bool ScriptUG07::ClickedOn2DRegion(int region) { +bool SceneScriptUG07::ClickedOn2DRegion(int region) { return false; } -void ScriptUG07::SceneFrameAdvanced(int frame) { +void SceneScriptUG07::SceneFrameAdvanced(int frame) { } -void ScriptUG07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG07::PlayerWalkedIn() { +void SceneScriptUG07::PlayerWalkedIn() { if (Global_Variable_Query(1) == 4 && !Game_Flag_Query(623)) { Actor_Set_Goal_Number(23, 307); Actor_Set_Goal_Number(24, 307); @@ -175,7 +175,7 @@ void ScriptUG07::PlayerWalkedIn() { } } -void ScriptUG07::PlayerWalkedOut() { +void SceneScriptUG07::PlayerWalkedOut() { if (Global_Variable_Query(1) == 4 && (Actor_Query_Goal_Number(23) == 307 || Actor_Query_Goal_Number(24) == 307)) { Non_Player_Actor_Combat_Mode_Off(23); Non_Player_Actor_Combat_Mode_Off(24); @@ -187,7 +187,7 @@ void ScriptUG07::PlayerWalkedOut() { } } -void ScriptUG07::DialogueQueueFlushed(int a1) { +void SceneScriptUG07::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug08.cpp b/engines/bladerunner/script/scene/ug08.cpp index 34c1943cd7..5681926725 100644 --- a/engines/bladerunner/script/ug08.cpp +++ b/engines/bladerunner/script/scene/ug08.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG08::InitializeScene() { +void SceneScriptUG08::InitializeScene() { if (Game_Flag_Query(430)) { Setup_Scene_Information(-124.0f, 93.18f, 71.0f, 745); } else { @@ -61,29 +61,29 @@ void ScriptUG08::InitializeScene() { } } -void ScriptUG08::SceneLoaded() { +void SceneScriptUG08::SceneLoaded() { Obstacle_Object("ELEV LEGS", true); Unobstacle_Object("ELEV LEGS", true); Unobstacle_Object("BOX RIGHT WALL ", true); } -bool ScriptUG08::MouseClick(int x, int y) { +bool SceneScriptUG08::MouseClick(int x, int y) { return false; } -bool ScriptUG08::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG08::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG08::ClickedOnActor(int actorId) { +bool SceneScriptUG08::ClickedOnActor(int actorId) { return false; } -bool ScriptUG08::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG08::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG08::ClickedOnExit(int exitId) { +bool SceneScriptUG08::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -432.0f, 0.0f, -152.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -109,20 +109,20 @@ bool ScriptUG08::ClickedOnExit(int exitId) { return false; } -bool ScriptUG08::ClickedOn2DRegion(int region) { +bool SceneScriptUG08::ClickedOn2DRegion(int region) { return false; } -void ScriptUG08::SceneFrameAdvanced(int frame) { +void SceneScriptUG08::SceneFrameAdvanced(int frame) { if (frame == 91) { Ambient_Sounds_Play_Sound(372, 90, 0, 0, 100); } } -void ScriptUG08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG08::PlayerWalkedIn() { +void SceneScriptUG08::PlayerWalkedIn() { if (Game_Flag_Query(430)) { Loop_Actor_Walk_To_XYZ(0, -167.0f, 93.18f, 71.0f, 0, 0, false, 0); Loop_Actor_Walk_To_XYZ(0, -180.0f, 93.18f, 134.0f, 0, 0, false, 0); @@ -136,10 +136,10 @@ void ScriptUG08::PlayerWalkedIn() { Game_Flag_Reset(430); } -void ScriptUG08::PlayerWalkedOut() { +void SceneScriptUG08::PlayerWalkedOut() { } -void ScriptUG08::DialogueQueueFlushed(int a1) { +void SceneScriptUG08::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug09.cpp b/engines/bladerunner/script/scene/ug09.cpp index e76f9870b7..92476fbe3d 100644 --- a/engines/bladerunner/script/ug09.cpp +++ b/engines/bladerunner/script/scene/ug09.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG09::InitializeScene() { +void SceneScriptUG09::InitializeScene() { if (Game_Flag_Query(433)) { Setup_Scene_Information(-67.0f, 156.94f, -425.0f, 500); Game_Flag_Reset(433); @@ -58,7 +58,7 @@ void ScriptUG09::InitializeScene() { Ambient_Sounds_Add_Sound(199, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); } -void ScriptUG09::SceneLoaded() { +void SceneScriptUG09::SceneLoaded() { Obstacle_Object("FACADE_CANOPY", true); Obstacle_Object("VW PROP SLAB", true); Obstacle_Object("WALL_LEFT FRONT", true); @@ -82,23 +82,23 @@ void ScriptUG09::SceneLoaded() { Clickable_Object("FACADE_CANOPY"); } -bool ScriptUG09::MouseClick(int x, int y) { +bool SceneScriptUG09::MouseClick(int x, int y) { return false; } -bool ScriptUG09::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG09::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG09::ClickedOnActor(int actorId) { +bool SceneScriptUG09::ClickedOnActor(int actorId) { return false; } -bool ScriptUG09::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG09::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG09::ClickedOnExit(int exitId) { +bool SceneScriptUG09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -67.0f, 156.94f, -425.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -120,24 +120,24 @@ bool ScriptUG09::ClickedOnExit(int exitId) { return false; } -bool ScriptUG09::ClickedOn2DRegion(int region) { +bool SceneScriptUG09::ClickedOn2DRegion(int region) { return false; } -void ScriptUG09::SceneFrameAdvanced(int frame) { +void SceneScriptUG09::SceneFrameAdvanced(int frame) { //return false; } -void ScriptUG09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG09::PlayerWalkedIn() { +void SceneScriptUG09::PlayerWalkedIn() { if (Global_Variable_Query(1) == 4 && Game_Flag_Query(623)) { Game_Flag_Set(630); } } -void ScriptUG09::PlayerWalkedOut() { +void SceneScriptUG09::PlayerWalkedOut() { if (Global_Variable_Query(1) == 4 && Global_Variable_Query(1) != 5) { Game_Flag_Reset(630); } @@ -147,7 +147,7 @@ void ScriptUG09::PlayerWalkedOut() { } } -void ScriptUG09::DialogueQueueFlushed(int a1) { +void SceneScriptUG09::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug10.cpp b/engines/bladerunner/script/scene/ug10.cpp index 9879b6e204..ba153ff36f 100644 --- a/engines/bladerunner/script/ug10.cpp +++ b/engines/bladerunner/script/scene/ug10.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG10::InitializeScene() { +void SceneScriptUG10::InitializeScene() { if (Game_Flag_Query(336)) { Setup_Scene_Information(-92.0f, 81.33f, -652.0f, 520); } else if (Game_Flag_Query(423)) { @@ -70,7 +70,7 @@ void ScriptUG10::InitializeScene() { } } -void ScriptUG10::SceneLoaded() { +void SceneScriptUG10::SceneLoaded() { Obstacle_Object("SLUICEGATE_LEVER", true); if (Global_Variable_Query(1) == 4 && !Game_Flag_Query(474) && Game_Flag_Query(172) && !Game_Flag_Query(693)) { Scene_Loop_Set_Default(1); @@ -81,23 +81,23 @@ void ScriptUG10::SceneLoaded() { //return false; } -bool ScriptUG10::MouseClick(int x, int y) { +bool SceneScriptUG10::MouseClick(int x, int y) { return false; } -bool ScriptUG10::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG10::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG10::ClickedOnActor(int actorId) { +bool SceneScriptUG10::ClickedOnActor(int actorId) { return false; } -bool ScriptUG10::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG10::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG10::ClickedOnExit(int exitId) { +bool SceneScriptUG10::ClickedOnExit(int exitId) { float x, y, z; Actor_Query_XYZ(0, &x, &y, &z); if (exitId == 0) { @@ -149,7 +149,7 @@ bool ScriptUG10::ClickedOnExit(int exitId) { return false; } -bool ScriptUG10::ClickedOn2DRegion(int region) { +bool SceneScriptUG10::ClickedOn2DRegion(int region) { float x, y, z; Actor_Query_XYZ(0, &x, &y, &z); if (region == 0 && !Player_Query_Combat_Mode()) { @@ -175,7 +175,7 @@ bool ScriptUG10::ClickedOn2DRegion(int region) { return false; } -void ScriptUG10::SceneFrameAdvanced(int frame) { +void SceneScriptUG10::SceneFrameAdvanced(int frame) { if (frame == 121) { Ambient_Sounds_Play_Sound(558, 90, 0, 0, 99); } @@ -200,10 +200,10 @@ void ScriptUG10::SceneFrameAdvanced(int frame) { //return false; } -void ScriptUG10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG10::PlayerWalkedIn() { +void SceneScriptUG10::PlayerWalkedIn() { if (Game_Flag_Query(346)) { Game_Flag_Reset(346); Loop_Actor_Walk_To_XYZ(0, 2.5f, 1.15f, 377.0f, 0, 0, false, 0); @@ -223,12 +223,12 @@ void ScriptUG10::PlayerWalkedIn() { } } -void ScriptUG10::PlayerWalkedOut() { +void SceneScriptUG10::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); } -void ScriptUG10::DialogueQueueFlushed(int a1) { +void SceneScriptUG10::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug12.cpp b/engines/bladerunner/script/scene/ug12.cpp index 695d3093ca..948d05604f 100644 --- a/engines/bladerunner/script/ug12.cpp +++ b/engines/bladerunner/script/scene/ug12.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG12::InitializeScene() { +void SceneScriptUG12::InitializeScene() { if (Game_Flag_Query(411)) { Setup_Scene_Information(207.0f, -126.21f, -364.0f, 561); Game_Flag_Reset(411); @@ -57,28 +57,28 @@ void ScriptUG12::InitializeScene() { } } -void ScriptUG12::SceneLoaded() { +void SceneScriptUG12::SceneLoaded() { Unobstacle_Object("GATE1", true); Obstacle_Object("TRAIN WRECK", true); } -bool ScriptUG12::MouseClick(int x, int y) { +bool SceneScriptUG12::MouseClick(int x, int y) { return false; } -bool ScriptUG12::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG12::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG12::ClickedOnActor(int actorId) { +bool SceneScriptUG12::ClickedOnActor(int actorId) { return false; } -bool ScriptUG12::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG12::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG12::ClickedOnExit(int exitId) { +bool SceneScriptUG12::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 375.0f, -126.21f, 180.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -100,23 +100,23 @@ bool ScriptUG12::ClickedOnExit(int exitId) { return false; } -bool ScriptUG12::ClickedOn2DRegion(int region) { +bool SceneScriptUG12::ClickedOn2DRegion(int region) { return false; } -void ScriptUG12::SceneFrameAdvanced(int frame) { +void SceneScriptUG12::SceneFrameAdvanced(int frame) { } -void ScriptUG12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG12::PlayerWalkedIn() { +void SceneScriptUG12::PlayerWalkedIn() { } -void ScriptUG12::PlayerWalkedOut() { +void SceneScriptUG12::PlayerWalkedOut() { } -void ScriptUG12::DialogueQueueFlushed(int a1) { +void SceneScriptUG12::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp index 6391b8b97f..bd5614275a 100644 --- a/engines/bladerunner/script/ug13.cpp +++ b/engines/bladerunner/script/scene/ug13.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG13::InitializeScene() { +void SceneScriptUG13::InitializeScene() { if (Game_Flag_Query(435)) { Setup_Scene_Information(-477.0f, 141.9f, -870.0f, 378); } else if (Game_Flag_Query(350)) { @@ -62,7 +62,7 @@ void ScriptUG13::InitializeScene() { } } -void ScriptUG13::SceneLoaded() { +void SceneScriptUG13::SceneLoaded() { Obstacle_Object("BASKET", true); Obstacle_Object("BOLLARD", true); Unobstacle_Object("STAIR", true); @@ -77,11 +77,11 @@ void ScriptUG13::SceneLoaded() { } } -bool ScriptUG13::MouseClick(int x, int y) { +bool SceneScriptUG13::MouseClick(int x, int y) { return false; } -bool ScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BOLLARD", objectName) && !Loop_Actor_Walk_To_XYZ(0, 7.0f, 44.0f, -695.0f, 0, 1, false, 0)) { Actor_Face_Object(0, "BOLLARD", true); @@ -102,7 +102,7 @@ bool ScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG13::ClickedOnActor(int actorId) { +bool SceneScriptUG13::ClickedOnActor(int actorId) { if (actorId == 12 && Global_Variable_Query(1) == 4 && !Loop_Actor_Walk_To_XYZ(0, -248.0f, 44.0f, -390.0f, 12, 1, false, 0)) { Actor_Face_Actor(0, 12, true); if (Actor_Query_Goal_Number(12) != 6 && Actor_Query_Goal_Number(12) != 599) { @@ -132,7 +132,7 @@ bool ScriptUG13::ClickedOnActor(int actorId) { return false; } -bool ScriptUG13::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG13::ClickedOnItem(int itemId, bool a2) { if (itemId == 111 && !Loop_Actor_Walk_To_Item(0, 111, 36, 1, false)) { Actor_Face_Item(0, 111, true); Actor_Clue_Acquire(0, 128, 1, -1); @@ -149,7 +149,7 @@ bool ScriptUG13::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG13::ClickedOnExit(int exitId) { +bool SceneScriptUG13::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -32.0f, 54.63f, -883.0f, 0, 1, false, 0)) { @@ -190,11 +190,11 @@ bool ScriptUG13::ClickedOnExit(int exitId) { return false; } -bool ScriptUG13::ClickedOn2DRegion(int region) { +bool SceneScriptUG13::ClickedOn2DRegion(int region) { return false; } -void ScriptUG13::SceneFrameAdvanced(int frame) { +void SceneScriptUG13::SceneFrameAdvanced(int frame) { if (frame == 94) { Ambient_Sounds_Play_Sound(372, 90, 0, 0, 100); } @@ -215,10 +215,10 @@ void ScriptUG13::SceneFrameAdvanced(int frame) { return; } -void ScriptUG13::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG13::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG13::PlayerWalkedIn() { +void SceneScriptUG13::PlayerWalkedIn() { if (Game_Flag_Query(435)) { Loop_Actor_Walk_To_XYZ(0, -389.0f, 143.0f, -844.0f, 0, 0, false, 0); Actor_Face_Heading(0, 325, false); @@ -247,7 +247,7 @@ void ScriptUG13::PlayerWalkedIn() { //return false; } -void ScriptUG13::PlayerWalkedOut() { +void SceneScriptUG13::PlayerWalkedOut() { Actor_Set_Invisible(0, false); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (Game_Flag_Query(430)) { @@ -261,10 +261,10 @@ void ScriptUG13::PlayerWalkedOut() { } } -void ScriptUG13::DialogueQueueFlushed(int a1) { +void SceneScriptUG13::DialogueQueueFlushed(int a1) { } -void ScriptUG13::sub_40223C() { +void SceneScriptUG13::sub_40223C() { Actor_Face_Actor(0, 12, true); Game_Flag_Set(554); Actor_Says(0, 5560, 13); @@ -275,7 +275,7 @@ void ScriptUG13::sub_40223C() { Actor_Says(12, 90, 32); } -void ScriptUG13::sub_4023D8() { +void SceneScriptUG13::sub_4023D8() { Actor_Face_Actor(0, 12, true); Actor_Clue_Acquire(0, 122, 0, 12); Actor_Modify_Friendliness_To_Other(12, 0, -5); @@ -295,7 +295,7 @@ void ScriptUG13::sub_4023D8() { Actor_Says(12, 200, 31); } -void ScriptUG13::sub_4025E0() { +void SceneScriptUG13::sub_4025E0() { Actor_Clue_Acquire(0, 123, 0, 12); Actor_Modify_Friendliness_To_Other(12, 0, -10); Actor_Says(12, 220, 30); @@ -308,7 +308,7 @@ void ScriptUG13::sub_4025E0() { Actor_Says(12, 260, 32); } -void ScriptUG13::sub_402960() { +void SceneScriptUG13::sub_402960() { Actor_Says(0, 5670, 9); Actor_Says(12, 340, 31); Actor_Says(0, 5690, 19); @@ -320,11 +320,11 @@ void ScriptUG13::sub_402960() { Actor_Clue_Acquire(0, 124, 0, 12); } -int ScriptUG13::sub_402AD0() { +int SceneScriptUG13::sub_402AD0() { return 0; } -void ScriptUG13::sub_402AD4() { +void SceneScriptUG13::sub_402AD4() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1320, 6, 3, 1); if (Actor_Clue_Query(0, 122)) { @@ -375,7 +375,7 @@ void ScriptUG13::sub_402AD4() { } } -void ScriptUG13::sub_402E24() { +void SceneScriptUG13::sub_402E24() { Actor_Set_Friendliness_To_Other(12, 0, 40); Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1370, 1, 1, 8); diff --git a/engines/bladerunner/script/ug14.cpp b/engines/bladerunner/script/scene/ug14.cpp index 156f405b0b..26d0060476 100644 --- a/engines/bladerunner/script/ug14.cpp +++ b/engines/bladerunner/script/scene/ug14.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG14::InitializeScene() { +void SceneScriptUG14::InitializeScene() { if (Game_Flag_Query(349)) { Setup_Scene_Information(-278.0f, 12.97f, -152.0f, 200); } else if (Game_Flag_Query(344)) { @@ -53,29 +53,29 @@ void ScriptUG14::InitializeScene() { Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); } -void ScriptUG14::SceneLoaded() { +void SceneScriptUG14::SceneLoaded() { Obstacle_Object("OBSTACLE02", true); Unobstacle_Object("WALL_E_01", true); Unclickable_Object("OBSTACLE02"); } -bool ScriptUG14::MouseClick(int x, int y) { +bool SceneScriptUG14::MouseClick(int x, int y) { return false; } -bool ScriptUG14::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG14::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG14::ClickedOnActor(int actorId) { +bool SceneScriptUG14::ClickedOnActor(int actorId) { return false; } -bool ScriptUG14::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG14::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG14::ClickedOnExit(int exitId) { +bool SceneScriptUG14::ClickedOnExit(int exitId) { float x, y, z; Actor_Query_XYZ(0, &x, &y, &z); bool v1 = y > 57.0f; @@ -144,17 +144,17 @@ bool ScriptUG14::ClickedOnExit(int exitId) { return false; } -bool ScriptUG14::ClickedOn2DRegion(int region) { +bool SceneScriptUG14::ClickedOn2DRegion(int region) { return false; } -void ScriptUG14::SceneFrameAdvanced(int frame) { +void SceneScriptUG14::SceneFrameAdvanced(int frame) { } -void ScriptUG14::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG14::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG14::PlayerWalkedIn() { +void SceneScriptUG14::PlayerWalkedIn() { if (Game_Flag_Query(349)) { Loop_Actor_Walk_To_XYZ(0, -250.0f, 12.97f, -152.0f, 0, 0, false, 0); Game_Flag_Reset(349); @@ -184,10 +184,10 @@ void ScriptUG14::PlayerWalkedIn() { //return false; } -void ScriptUG14::PlayerWalkedOut() { +void SceneScriptUG14::PlayerWalkedOut() { } -void ScriptUG14::DialogueQueueFlushed(int a1) { +void SceneScriptUG14::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp index c43288241d..5403cbac40 100644 --- a/engines/bladerunner/script/ug15.cpp +++ b/engines/bladerunner/script/scene/ug15.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG15::InitializeScene() { +void SceneScriptUG15::InitializeScene() { if (Game_Flag_Query(353)) { Setup_Scene_Information(-25.0f, 26.309999f, -434.0f, 520); } else if (Game_Flag_Query(153)) { @@ -78,30 +78,30 @@ void ScriptUG15::InitializeScene() { } -void ScriptUG15::SceneLoaded() { +void SceneScriptUG15::SceneLoaded() { Unobstacle_Object("CATWALK_01_RAIL02", true); Unobstacle_Object("LOFT01", true); Obstacle_Object("NUT1", true); Clickable_Object("NUT1"); } -bool ScriptUG15::MouseClick(int x, int y) { +bool SceneScriptUG15::MouseClick(int x, int y) { return false; } -bool ScriptUG15::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG15::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG15::ClickedOnActor(int actorId) { +bool SceneScriptUG15::ClickedOnActor(int actorId) { return false; } -bool ScriptUG15::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG15::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG15::ClickedOnExit(int exitId) { +bool SceneScriptUG15::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -25.0f, 26.31f, -434.0f, 0, 1, false, 0)) { @@ -146,11 +146,11 @@ bool ScriptUG15::ClickedOnExit(int exitId) { } -bool ScriptUG15::ClickedOn2DRegion(int region) { +bool SceneScriptUG15::ClickedOn2DRegion(int region) { return false; } -void ScriptUG15::SceneFrameAdvanced(int frame) { +void SceneScriptUG15::SceneFrameAdvanced(int frame) { if (Actor_Query_Goal_Number(64) == 300) { float x, y, z; Actor_Query_XYZ(0, &x, &y, &z); @@ -179,10 +179,10 @@ void ScriptUG15::SceneFrameAdvanced(int frame) { // return false; } -void ScriptUG15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG15::PlayerWalkedIn() { +void SceneScriptUG15::PlayerWalkedIn() { if (Game_Flag_Query(355)) { Loop_Actor_Walk_To_XYZ(0, -62.0f, 48.07f, 102.0f, 0, 0, false, 0); Game_Flag_Reset(355); @@ -194,10 +194,10 @@ void ScriptUG15::PlayerWalkedIn() { } } -void ScriptUG15::PlayerWalkedOut() { +void SceneScriptUG15::PlayerWalkedOut() { } -void ScriptUG15::DialogueQueueFlushed(int a1) { +void SceneScriptUG15::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp index 2a4a028c3d..422647473c 100644 --- a/engines/bladerunner/script/ug16.cpp +++ b/engines/bladerunner/script/scene/ug16.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG16::InitializeScene() { +void SceneScriptUG16::InitializeScene() { if (Game_Flag_Query(552)) { Setup_Scene_Information(-270.76f, -34.88f, -504.02f, 404); Game_Flag_Reset(552); @@ -48,7 +48,7 @@ void ScriptUG16::InitializeScene() { } } -void ScriptUG16::SceneLoaded() { +void SceneScriptUG16::SceneLoaded() { Obstacle_Object("BED", true); Obstacle_Object("QUADPATCH07", true); Obstacle_Object("QUADPATCH05", true); @@ -70,11 +70,11 @@ void ScriptUG16::SceneLoaded() { Footstep_Sounds_Set(6, 3); } -bool ScriptUG16::MouseClick(int x, int y) { +bool SceneScriptUG16::MouseClick(int x, int y) { return false; } -bool ScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("QUADPATCH05", objectName) && !Loop_Actor_Walk_To_XYZ(0, 194.0f, -35.0f, 160.8f, 0, 1, false, 0)) { Actor_Face_Heading(0, 870, false); if (!Game_Flag_Query(597) && Game_Flag_Query(595)) { @@ -115,7 +115,7 @@ bool ScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG16::ClickedOnActor(int actorId) { +bool SceneScriptUG16::ClickedOnActor(int actorId) { if (Actor_Query_Goal_Number(10) < 490) { sub_401D78(); return true; @@ -123,11 +123,11 @@ bool ScriptUG16::ClickedOnActor(int actorId) { return false; } -bool ScriptUG16::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG16::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG16::ClickedOnExit(int exitId) { +bool SceneScriptUG16::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -322.0f, -34.0f, -216.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -160,20 +160,20 @@ bool ScriptUG16::ClickedOnExit(int exitId) { return false; } -bool ScriptUG16::ClickedOn2DRegion(int region) { +bool SceneScriptUG16::ClickedOn2DRegion(int region) { return false; } -void ScriptUG16::SceneFrameAdvanced(int frame) { +void SceneScriptUG16::SceneFrameAdvanced(int frame) { if (frame == 132) { Ambient_Sounds_Remove_Looping_Sound(516, true); } } -void ScriptUG16::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG16::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG16::PlayerWalkedIn() { +void SceneScriptUG16::PlayerWalkedIn() { Game_Flag_Set(715); if (!Game_Flag_Query(595)) { Actor_Set_Goal_Number(10, 403); @@ -199,7 +199,7 @@ void ScriptUG16::PlayerWalkedIn() { } } -void ScriptUG16::PlayerWalkedOut() { +void SceneScriptUG16::PlayerWalkedOut() { if (!Game_Flag_Query(595)) { Actor_Set_Goal_Number(10, 401); //return true; @@ -207,10 +207,10 @@ void ScriptUG16::PlayerWalkedOut() { //return false; } -void ScriptUG16::DialogueQueueFlushed(int a1) { +void SceneScriptUG16::DialogueQueueFlushed(int a1) { } -void ScriptUG16::sub_401D78() { +void SceneScriptUG16::sub_401D78() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1400, 5, 6, 2); DM_Add_To_List_Never_Repeat_Once_Selected(1410, 5, 4, 8); diff --git a/engines/bladerunner/script/ug17.cpp b/engines/bladerunner/script/scene/ug17.cpp index d438a62ae4..b8eca81b3c 100644 --- a/engines/bladerunner/script/ug17.cpp +++ b/engines/bladerunner/script/scene/ug17.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG17::InitializeScene() { +void SceneScriptUG17::InitializeScene() { if (Game_Flag_Query(447)) { Setup_Scene_Information(1013.0f, 67.96f, -1892.0f, 525); Game_Flag_Reset(447); @@ -41,28 +41,28 @@ void ScriptUG17::InitializeScene() { Overlay_Play("UG17OVER", 0, 1, 0, 0); } -void ScriptUG17::SceneLoaded() { +void SceneScriptUG17::SceneLoaded() { Obstacle_Object("BOX FOR BIG VENT13", true); Unclickable_Object("BOX FOR BIG VENT13"); } -bool ScriptUG17::MouseClick(int x, int y) { +bool SceneScriptUG17::MouseClick(int x, int y) { return false; } -bool ScriptUG17::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG17::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG17::ClickedOnActor(int actorId) { +bool SceneScriptUG17::ClickedOnActor(int actorId) { return false; } -bool ScriptUG17::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG17::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG17::ClickedOnExit(int exitId) { +bool SceneScriptUG17::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 1000.0f, 67.96f, -1539.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -90,17 +90,17 @@ bool ScriptUG17::ClickedOnExit(int exitId) { return false; } -bool ScriptUG17::ClickedOn2DRegion(int region) { +bool SceneScriptUG17::ClickedOn2DRegion(int region) { return false; } -void ScriptUG17::SceneFrameAdvanced(int frame) { +void SceneScriptUG17::SceneFrameAdvanced(int frame) { } -void ScriptUG17::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG17::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG17::PlayerWalkedIn() { +void SceneScriptUG17::PlayerWalkedIn() { if (Game_Flag_Query(352)) { Loop_Actor_Walk_To_XYZ(0, 961.0f, 67.96f, -1539.0f, 0, 0, false, 0); Game_Flag_Reset(352); @@ -108,10 +108,10 @@ void ScriptUG17::PlayerWalkedIn() { //return false; } -void ScriptUG17::PlayerWalkedOut() { +void SceneScriptUG17::PlayerWalkedOut() { } -void ScriptUG17::DialogueQueueFlushed(int a1) { +void SceneScriptUG17::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ug18.cpp b/engines/bladerunner/script/scene/ug18.cpp index 215d447a85..74c81bd518 100644 --- a/engines/bladerunner/script/ug18.cpp +++ b/engines/bladerunner/script/scene/ug18.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG18::InitializeScene() { +void SceneScriptUG18::InitializeScene() { Setup_Scene_Information(-684.71f, 0.0f, 171.59f, 0); Game_Flag_Reset(434); Scene_Exit_Add_2D_Exit(0, 0, 158, 100, 340, 3); @@ -62,7 +62,7 @@ void ScriptUG18::InitializeScene() { } } -void ScriptUG18::SceneLoaded() { +void SceneScriptUG18::SceneLoaded() { Obstacle_Object("MACHINE_01", true); Unobstacle_Object("PLATFM_RAIL 01", true); Unobstacle_Object("PLATFM_RAIL 02", true); @@ -83,19 +83,19 @@ void ScriptUG18::SceneLoaded() { } -bool ScriptUG18::MouseClick(int x, int y) { +bool SceneScriptUG18::MouseClick(int x, int y) { return false; } -bool ScriptUG18::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG18::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG18::ClickedOnActor(int actorId) { +bool SceneScriptUG18::ClickedOnActor(int actorId) { return false; } -bool ScriptUG18::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG18::ClickedOnItem(int itemId, bool a2) { if (itemId == 91) { if (a2) { Item_Remove_From_World(91); @@ -109,7 +109,7 @@ bool ScriptUG18::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG18::ClickedOnExit(int exitId) { +bool SceneScriptUG18::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, -684.712f, 0.0f, 171.59f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); @@ -122,14 +122,14 @@ bool ScriptUG18::ClickedOnExit(int exitId) { return false; } -bool ScriptUG18::ClickedOn2DRegion(int region) { +bool SceneScriptUG18::ClickedOn2DRegion(int region) { return false; } -void ScriptUG18::SceneFrameAdvanced(int frame) { +void SceneScriptUG18::SceneFrameAdvanced(int frame) { } -void ScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == 4) { if (newGoal == 303) { Game_Flag_Set(607); @@ -174,7 +174,7 @@ void ScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool cu } } -void ScriptUG18::PlayerWalkedIn() { +void SceneScriptUG18::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(0, -488.71f, 0.0f, 123.59f, 0, 0, false, 0); if (Game_Flag_Query(670) && !Game_Flag_Query(671) && Actor_Query_Is_In_Current_Set(4)) { Scene_Exits_Disable(); @@ -184,10 +184,10 @@ void ScriptUG18::PlayerWalkedIn() { } } -void ScriptUG18::PlayerWalkedOut() { +void SceneScriptUG18::PlayerWalkedOut() { } -void ScriptUG18::DialogueQueueFlushed(int a1) { +void SceneScriptUG18::DialogueQueueFlushed(int a1) { int v0 = Actor_Query_Goal_Number(4); if (v0 == 301) { Actor_Set_Goal_Number(4, 302); @@ -262,7 +262,7 @@ void ScriptUG18::DialogueQueueFlushed(int a1) { } } -void ScriptUG18::sub_402734() { +void SceneScriptUG18::sub_402734() { Actor_Face_Actor(0, 4, true); Actor_Says(0, 5860, 9); Delay(500); @@ -323,7 +323,7 @@ void ScriptUG18::sub_402734() { } } -void ScriptUG18::sub_402DE8() { +void SceneScriptUG18::sub_402DE8() { if (Player_Query_Agenda()) { if (Global_Variable_Query(45) > 1 || Player_Query_Agenda() == 2) { @@ -341,7 +341,7 @@ void ScriptUG18::sub_402DE8() { } } -void ScriptUG18::sub_402F8C() { +void SceneScriptUG18::sub_402F8C() { Loop_Actor_Walk_To_XYZ(0, -117.13f, 0.0f, -284.47f, 0, 0, false, 0); Actor_Face_Actor(0, 4, true); Actor_Says(0, 5945, 12); @@ -356,7 +356,7 @@ void ScriptUG18::sub_402F8C() { Actor_Says(4, 1100, 13); } -void ScriptUG18::sub_403114() { +void SceneScriptUG18::sub_403114() { Actor_Modify_Friendliness_To_Other(5, 0, 20); Actor_Modify_Friendliness_To_Other(8, 0, 10); Loop_Actor_Walk_To_XYZ(0, -117.13f, 0.0f, -284.47f, 0, 0, false, 0); @@ -370,7 +370,7 @@ void ScriptUG18::sub_403114() { Actor_Says(4, 1140, 16); } -void ScriptUG18::sub_403278() { +void SceneScriptUG18::sub_403278() { ADQ_Flush(); Actor_Start_Speech_Sample(5, 590); Delay(500); @@ -392,7 +392,7 @@ void ScriptUG18::sub_403278() { ADQ_Add(4, 1200, 59); } -void ScriptUG18::sub_403588() { +void SceneScriptUG18::sub_403588() { Actor_Says(5, 660, 13); Actor_Says(0, 5995, 13); Actor_Says(5, 670, 13); diff --git a/engines/bladerunner/script/ug19.cpp b/engines/bladerunner/script/scene/ug19.cpp index 9a6000d363..e7e963d520 100644 --- a/engines/bladerunner/script/ug19.cpp +++ b/engines/bladerunner/script/scene/ug19.cpp @@ -20,11 +20,11 @@ * */ -#include "bladerunner/script/script.h" +#include "bladerunner/script/scene.h" namespace BladeRunner { -void ScriptUG19::InitializeScene() { +void SceneScriptUG19::InitializeScene() { if (Game_Flag_Query(357)) { Setup_Scene_Information(67.03f, 105.0f, -74.97f, 256); } else { @@ -59,30 +59,30 @@ void ScriptUG19::InitializeScene() { } -void ScriptUG19::SceneLoaded() { +void SceneScriptUG19::SceneLoaded() { Obstacle_Object("LADDER", true); Unclickable_Object("LADDER"); Footstep_Sounds_Set(1, 0); Footstep_Sounds_Set(0, 3); } -bool ScriptUG19::MouseClick(int x, int y) { +bool SceneScriptUG19::MouseClick(int x, int y) { return false; } -bool ScriptUG19::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptUG19::ClickedOn3DObject(const char *objectName, bool a2) { return false; } -bool ScriptUG19::ClickedOnActor(int actorId) { +bool SceneScriptUG19::ClickedOnActor(int actorId) { return false; } -bool ScriptUG19::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG19::ClickedOnItem(int itemId, bool a2) { return false; } -bool ScriptUG19::ClickedOnExit(int exitId) { +bool SceneScriptUG19::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(0, 67.03f, 7.29f, -74.97f, 0, 1, false, 0)) { Actor_Face_Heading(0, 256, false); @@ -108,17 +108,17 @@ bool ScriptUG19::ClickedOnExit(int exitId) { return false; } -bool ScriptUG19::ClickedOn2DRegion(int region) { +bool SceneScriptUG19::ClickedOn2DRegion(int region) { return false; } -void ScriptUG19::SceneFrameAdvanced(int frame) { +void SceneScriptUG19::SceneFrameAdvanced(int frame) { } -void ScriptUG19::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScriptUG19::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { } -void ScriptUG19::PlayerWalkedIn() { +void SceneScriptUG19::PlayerWalkedIn() { if (Game_Flag_Query(348)) { Game_Flag_Reset(348); Loop_Actor_Walk_To_XYZ(0, 129.0f, 11.52f, -18.0f, 0, 0, false, 0); @@ -130,10 +130,10 @@ void ScriptUG19::PlayerWalkedIn() { } } -void ScriptUG19::PlayerWalkedOut() { +void SceneScriptUG19::PlayerWalkedOut() { } -void ScriptUG19::DialogueQueueFlushed(int a1) { +void SceneScriptUG19::DialogueQueueFlushed(int a1) { } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index bc6679051c..846d33617b 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -47,137 +47,8 @@ #include "bladerunner/vector.h" #include "bladerunner/waypoints.h" -#include "bladerunner/script/ai_00_mccoy.h" -#include "bladerunner/script/ai_15_runciter.h" -#include "bladerunner/script/ai_23_officer_leroy.h" - namespace BladeRunner { -bool Script::open(const Common::String &name) { - delete _currentScript; - - if (name == "RC01") { _currentScript = new ScriptRC01(_vm); return true; } - if (name == "RC02") { _currentScript = new ScriptRC02(_vm); return true; } - if (name == "RC03") { _currentScript = new ScriptRC03(_vm); return true; } - if (name == "RC04") { _currentScript = new ScriptRC04(_vm); return true; } - if (name == "RC51") { _currentScript = new ScriptRC51(_vm); return true; } - - return false; -} - -Script::~Script() { - delete _currentScript; -} - -void Script::InitializeScene() { - _inScriptCounter++; - _currentScript->InitializeScene(); - _inScriptCounter--; -} - -void Script::SceneLoaded() { - _inScriptCounter++; - _currentScript->SceneLoaded(); - _inScriptCounter--; -} - -bool Script::MouseClick(int x, int y) { - if (_inScriptCounter > 0) - return true; - - _inScriptCounter++; - //MouseX = x; - //MouseY = y; - bool result = _currentScript->MouseClick(x, y); - //SelectedEntity = -1; - _inScriptCounter--; - //MouseX = -1; - //MouseY = -1; - return result; -} - -bool Script::ClickedOn3DObject(const char *objectName, bool a2) { - if (_inScriptCounter > 0) - return true; - - _inScriptCounter++; - bool result = _currentScript->ClickedOn3DObject(objectName, a2); - _inScriptCounter--; - return result; -} - -bool Script::ClickedOnActor(int actorId) { - if (_inScriptCounter > 0) - return true; - - _inScriptCounter++; - bool result = _currentScript->ClickedOnActor(actorId); - _inScriptCounter--; - return result; -} - -bool Script::ClickedOnItem(int itemId, bool a2) { - if (_inScriptCounter > 0) - return true; - - _inScriptCounter++; - bool result = _currentScript->ClickedOnItem(itemId, a2); - _inScriptCounter--; - return result; -} - -bool Script::ClickedOnExit(int exitId) { - if (_inScriptCounter > 0) - return true; - - _inScriptCounter++; - bool result = _currentScript->ClickedOnExit(exitId); - _inScriptCounter--; - return result; -} - -bool Script::ClickedOn2DRegion(int region) { - if (_inScriptCounter > 0) - return true; - - _inScriptCounter++; - bool result = _currentScript->ClickedOn2DRegion(region); - _inScriptCounter--; - return result; -} - -void Script::SceneFrameAdvanced(int frame) { - _inScriptCounter++; - _currentScript->SceneFrameAdvanced(frame); - _inScriptCounter--; -} - -void Script::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { - _inScriptCounter++; - //TODO remove this check - if(_currentScript) - _currentScript->ActorChangedGoal(actorId, newGoal, oldGoal, currentSet); - _inScriptCounter--; -} - -void Script::PlayerWalkedIn() { - _inScriptCounter++; - _currentScript->PlayerWalkedIn(); - _inScriptCounter--; -} - -void Script::PlayerWalkedOut() { - _inScriptCounter++; - _currentScript->PlayerWalkedOut(); - _inScriptCounter--; -} - -void Script::DialogueQueueFlushed(int a1) { - _inScriptCounter++; - _currentScript->DialogueQueueFlushed(a1); - _inScriptCounter--; -} - void ScriptBase::Preload(int animationId) { _vm->_sliceRenderer->preload(animationId); } @@ -1454,132 +1325,4 @@ void ScriptBase::VK_Play_Speech_Line(int actorIndex, int a2, float a3) { warning("VK_Play_Speech_Line(%d, %d, %g)", actorIndex, a2, a3); } -AIScripts::AIScripts(BladeRunnerEngine *vm, int actorsCount) : _vm(vm), _inScriptCounter(0) { - _actorsCount = actorsCount; - _actorUpdating = new bool[actorsCount]; - _AIScripts = new AIScriptBase*[actorsCount]; - for (int i = 0; i < actorsCount; ++i) { - _AIScripts[i] = nullptr; - _actorUpdating[i] = false; - } - - _AIScripts[0] = new AIScript_McCoy(_vm); - _AIScripts[15] = new AIScript_Runciter(_vm); - _AIScripts[23] = new AIScript_Officer_Leroy(_vm); -} - -AIScripts::~AIScripts() { - for (int i = 0; i < _actorsCount; ++i) { - delete _AIScripts[i]; - _AIScripts[i] = nullptr; - } - delete[] _AIScripts; - delete[] _actorUpdating; -} - -void AIScripts::Initialize(int actor) { - assert(actor < _actorsCount); - if (_AIScripts[actor]) - _AIScripts[actor]->Initialize(); -} - -void AIScripts::Update(int actor) { - assert(actor < _actorsCount); - if (this->_actorUpdating[actor] != 1) { - this->_actorUpdating[actor] = true; - ++this->_inScriptCounter; - if (_AIScripts[actor]) - _AIScripts[actor]->Update(); - --this->_inScriptCounter; - this->_actorUpdating[actor] = false; - } -} - -void AIScripts::TimerExpired(int actor, int timer) { - assert(actor < _actorsCount); - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->TimerExpired(timer); - } - _inScriptCounter--; -} - -void AIScripts::CompletedMovementTrack(int actor) { - assert(actor < _actorsCount); - if (!_vm->_actors[actor]->inCombat()) { - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->CompletedMovementTrack(); - } - _inScriptCounter--; - } -} - -void AIScripts::EnteredScene(int actor, int setId) { - assert(actor < _actorsCount); - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->EnteredScene(setId); - } - _inScriptCounter--; -} - -void AIScripts::OtherAgentEnteredThisScene(int actor, int otherActorId) { - assert(actor < _actorsCount); - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->OtherAgentEnteredThisScene(otherActorId); - } - _inScriptCounter--; -} - -void AIScripts::OtherAgentExitedThisScene(int actor, int otherActorId) { - assert(actor < _actorsCount); - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->OtherAgentExitedThisScene(otherActorId); - } - _inScriptCounter--; -} - -void AIScripts::GoalChanged(int actor, int currentGoalNumber, int newGoalNumber) { - assert(actor < _actorsCount); - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->GoalChanged(currentGoalNumber, newGoalNumber); - } - _inScriptCounter--; -} - -bool AIScripts::ReachedMovementTrackWaypoint(int actor, int waypointId) { - assert(actor < _actorsCount); - bool result = false; - if (!_vm->_actors[actor]->inCombat()) { - _inScriptCounter++; - if (_AIScripts[actor]) { - result = _AIScripts[actor]->ReachedMovementTrackWaypoint(waypointId); - } - _inScriptCounter--; - } - return result; -} - -void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) { - assert(actor < _actorsCount); - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->UpdateAnimation(animation, frame); - } - _inScriptCounter--; -} - -void AIScripts::ChangeAnimationMode(int actor, int mode) { - assert(actor < _actorsCount); - _inScriptCounter++; - if (_AIScripts[actor]) { - _AIScripts[actor]->ChangeAnimationMode(mode); - } - _inScriptCounter--; -} - } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h index 8577078c0d..f90fbc92de 100644 --- a/engines/bladerunner/script/script.h +++ b/engines/bladerunner/script/script.h @@ -280,591 +280,6 @@ protected: void VK_Eye_Animates(int a1); }; -class SceneScriptBase : public ScriptBase { -public: - SceneScriptBase(BladeRunnerEngine *vm) : ScriptBase(vm) {} - - virtual void InitializeScene() = 0; - virtual void SceneLoaded() = 0; - virtual bool MouseClick(int x, int y) = 0; - virtual bool ClickedOn3DObject(const char *objectName, bool a2) = 0; - virtual bool ClickedOnActor(int actorId) = 0; - virtual bool ClickedOnItem(int itemId, bool a2) = 0; - virtual bool ClickedOnExit(int exitId) = 0; - virtual bool ClickedOn2DRegion(int region) = 0; - virtual void SceneFrameAdvanced(int frame) = 0; - virtual void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) = 0; - virtual void PlayerWalkedIn() = 0; - virtual void PlayerWalkedOut() = 0; - virtual void DialogueQueueFlushed(int a1) = 0; -}; - -/* - * Scene Scripts - */ - -class Script { -protected: - BladeRunnerEngine *_vm; - int _inScriptCounter; - SceneScriptBase *_currentScript; - -public: - Script(BladeRunnerEngine *vm) - : _vm(vm), - _inScriptCounter(0), - _currentScript(nullptr) { - } - ~Script(); - - bool open(const Common::String &name); - - void InitializeScene(); - void SceneLoaded(); - bool MouseClick(int x, int y); - bool ClickedOn3DObject(const char *objectName, bool a2); - bool ClickedOnActor(int actorId); - bool ClickedOnItem(int itemId, bool a2); - bool ClickedOnExit(int exitId); - bool ClickedOn2DRegion(int region); - void SceneFrameAdvanced(int frame); - void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); - void PlayerWalkedIn(); - void PlayerWalkedOut(); - void DialogueQueueFlushed(int a1); - bool IsInsideScript() { return _inScriptCounter > 0; } -}; - -#define DECLARE_SCRIPT(name) \ -class Script##name : public SceneScriptBase { \ -public: \ - Script##name(BladeRunnerEngine *vm) \ - : SceneScriptBase(vm) \ - {} \ - void InitializeScene(); \ - void SceneLoaded(); \ - bool MouseClick(int x, int y); \ - bool ClickedOn3DObject(const char *objectName, bool a2); \ - bool ClickedOnActor(int actorId); \ - bool ClickedOnItem(int itemId, bool a2); \ - bool ClickedOnExit(int exitId); \ - bool ClickedOn2DRegion(int region); \ - void SceneFrameAdvanced(int frame); \ - void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); \ - void PlayerWalkedIn(); \ - void PlayerWalkedOut(); \ - void DialogueQueueFlushed(int a1); \ -private: -#define END_SCRIPT }; - -DECLARE_SCRIPT(AR01) -END_SCRIPT - -DECLARE_SCRIPT(AR02) - void sub_402694(); - void sub_402AE0(); - void sub_402CE4(); -END_SCRIPT - -DECLARE_SCRIPT(BB01) -END_SCRIPT - -DECLARE_SCRIPT(BB02) -END_SCRIPT - -DECLARE_SCRIPT(BB03) -END_SCRIPT - -DECLARE_SCRIPT(BB04) -END_SCRIPT - -DECLARE_SCRIPT(BB05) -END_SCRIPT - -DECLARE_SCRIPT(BB06) -END_SCRIPT - -DECLARE_SCRIPT(BB07) -END_SCRIPT - -DECLARE_SCRIPT(BB08) -END_SCRIPT - -DECLARE_SCRIPT(BB09) -END_SCRIPT - -DECLARE_SCRIPT(BB10) -END_SCRIPT - -DECLARE_SCRIPT(BB11) -END_SCRIPT - -DECLARE_SCRIPT(BB12) -END_SCRIPT - -DECLARE_SCRIPT(BB51) -END_SCRIPT - -DECLARE_SCRIPT(CT01) - void sub_40269C(); -END_SCRIPT - -DECLARE_SCRIPT(CT02) - void sub_401ACC(); -END_SCRIPT - -DECLARE_SCRIPT(CT03) -END_SCRIPT - -DECLARE_SCRIPT(CT04) - void sub_401D4C(); -END_SCRIPT - -DECLARE_SCRIPT(CT05) -END_SCRIPT - -DECLARE_SCRIPT(CT06) -END_SCRIPT - -DECLARE_SCRIPT(CT07) -END_SCRIPT - -DECLARE_SCRIPT(CT08) -END_SCRIPT - -DECLARE_SCRIPT(CT09) -END_SCRIPT - -DECLARE_SCRIPT(CT10) - void sub_401844(); -END_SCRIPT - -DECLARE_SCRIPT(CT11) -END_SCRIPT - -DECLARE_SCRIPT(CT12) -END_SCRIPT - -DECLARE_SCRIPT(CT51) -END_SCRIPT - -DECLARE_SCRIPT(DR01) -END_SCRIPT - -DECLARE_SCRIPT(DR02) -END_SCRIPT - -DECLARE_SCRIPT(DR03) - void sub_401B18(); -END_SCRIPT - -DECLARE_SCRIPT(DR04) - bool sub_401160(); -END_SCRIPT - -DECLARE_SCRIPT(DR05) -END_SCRIPT - -DECLARE_SCRIPT(DR06) -END_SCRIPT - -DECLARE_SCRIPT(HC01) - void sub_402384(); - void sub_40346C(); -END_SCRIPT - -DECLARE_SCRIPT(HC02) -END_SCRIPT - -DECLARE_SCRIPT(HC03) -END_SCRIPT - -DECLARE_SCRIPT(HC04) - void sub_401B90(); -END_SCRIPT - -DECLARE_SCRIPT(HF01) - void sub_4026B4(); - void sub_4032DC(); - void sub_403484(); -END_SCRIPT - -DECLARE_SCRIPT(HF02) -END_SCRIPT - -DECLARE_SCRIPT(HF03) - void sub_401C80(); -END_SCRIPT - -DECLARE_SCRIPT(HF04) -END_SCRIPT - -DECLARE_SCRIPT(HF05) - void sub_402370(); - void sub_402970(); - void sub_402AE4(); - void sub_403738(); - void sub_403A34(int actorId); - void sub_403F0C(); - void sub_40410C(); - void sub_4042E4(); - void sub_404474(); - int sub_404858(); - int sub_4048C0(); -END_SCRIPT - -DECLARE_SCRIPT(HF06) - void sub_401EF4(); - void sub_4023E0(); -END_SCRIPT - -DECLARE_SCRIPT(HF07) - int sub_401864(); -END_SCRIPT - -DECLARE_SCRIPT(KP01) -END_SCRIPT - -DECLARE_SCRIPT(KP02) -END_SCRIPT - -DECLARE_SCRIPT(KP03) - void sub_401E54(); -END_SCRIPT - -DECLARE_SCRIPT(KP04) -END_SCRIPT - -DECLARE_SCRIPT(KP05) -END_SCRIPT - -DECLARE_SCRIPT(KP06) -END_SCRIPT - -DECLARE_SCRIPT(KP07) -END_SCRIPT - -DECLARE_SCRIPT(MA01) -END_SCRIPT - -DECLARE_SCRIPT(MA02) - void sub_401E4C(); - bool sub_401F7C(); - void sub_402044(); -END_SCRIPT - -//MA03 does not exists - -DECLARE_SCRIPT(MA04) - bool sub_402758(); - bool sub_402820(); - bool sub_402888(); - void sub_4028A8(); - void sub_402F2C(); - void sub_4032A0(); - void sub_4034D8(); - void sub_403864(); - void sub_403DA8(); -END_SCRIPT - -DECLARE_SCRIPT(MA05) - bool sub_401990(); -END_SCRIPT - -DECLARE_SCRIPT(MA06) - bool sub_4012C0(); - void sub_4014E4(); -END_SCRIPT - -DECLARE_SCRIPT(MA07) -END_SCRIPT - -DECLARE_SCRIPT(MA08) -END_SCRIPT - -DECLARE_SCRIPT(NR01) -END_SCRIPT - -DECLARE_SCRIPT(NR02) - void sub_402134(); -END_SCRIPT - -DECLARE_SCRIPT(NR03) - void sub_40259C(int frame); - void sub_402994(); -END_SCRIPT - -DECLARE_SCRIPT(NR04) - void sub_401DB0(); - void sub_402860(int frame); - void sub_402960(); -END_SCRIPT - -DECLARE_SCRIPT(NR05) - void sub_401F74(int frame); - void sub_4020B4(); - void sub_4022DC(); - void sub_402A48(int actorId); - void sub_402B9C(); -END_SCRIPT - -DECLARE_SCRIPT(NR06) - void sub_401BAC(); -END_SCRIPT - -DECLARE_SCRIPT(NR07) - void sub_4018D4(); - void sub_401A10(); - void sub_401C60(); - void sub_401EF4(); - void sub_4020F0(); - void sub_402284(); - void sub_402510(); - void sub_402614(); - void sub_402738(); - void sub_4028FC(); -END_SCRIPT - -DECLARE_SCRIPT(NR08) - void sub_4021B4(); -END_SCRIPT - -DECLARE_SCRIPT(NR09) - void sub_40172C(); -END_SCRIPT - -DECLARE_SCRIPT(NR10) -END_SCRIPT - -DECLARE_SCRIPT(NR11) - void sub_4027D0(int actorId, signed int frame); - void sub_4028EC(); -END_SCRIPT - -DECLARE_SCRIPT(PS01) -END_SCRIPT - -DECLARE_SCRIPT(PS02) - void sub_4018BC(); -END_SCRIPT - -DECLARE_SCRIPT(PS03) -END_SCRIPT - -DECLARE_SCRIPT(PS04) - void sub_4017E4(); -END_SCRIPT - -DECLARE_SCRIPT(PS05) - void sub_401B34(); - void sub_401C30(); -END_SCRIPT - -DECLARE_SCRIPT(PS06) -END_SCRIPT - -DECLARE_SCRIPT(PS07) - void sub_401D60(); -END_SCRIPT - -// PS08 does not exits - -DECLARE_SCRIPT(PS09) - void sub_402090(); -END_SCRIPT - -DECLARE_SCRIPT(PS10) - void sub_402238(); -END_SCRIPT - -DECLARE_SCRIPT(PS11) - void sub_402744(); -END_SCRIPT - -DECLARE_SCRIPT(PS12) - void sub_4028C4(); -END_SCRIPT - -DECLARE_SCRIPT(PS13) - void sub_40267C(); -END_SCRIPT - -DECLARE_SCRIPT(PS14) -END_SCRIPT - -DECLARE_SCRIPT(PS15) -END_SCRIPT - -DECLARE_SCRIPT(RC01) - void sub_403850(); - void sub_4037AC(); -END_SCRIPT - -DECLARE_SCRIPT(RC02) - void sub_402A7C(); -END_SCRIPT - -DECLARE_SCRIPT(RC03) - void sub_402834(); -END_SCRIPT - -DECLARE_SCRIPT(RC04) - void sub_401DF4(); -END_SCRIPT - -DECLARE_SCRIPT(RC51) -END_SCRIPT - -DECLARE_SCRIPT(TB02) - void sub_402644(); - void sub_402B50(); -END_SCRIPT - -DECLARE_SCRIPT(TB03) -END_SCRIPT - -DECLARE_SCRIPT(TB05) -END_SCRIPT - -DECLARE_SCRIPT(TB06) -END_SCRIPT - -DECLARE_SCRIPT(TB07) - void sub_401B0C(); -END_SCRIPT - -DECLARE_SCRIPT(UG01) -END_SCRIPT - -DECLARE_SCRIPT(UG02) - bool sub_402354(); -END_SCRIPT - -DECLARE_SCRIPT(UG03) -END_SCRIPT - -DECLARE_SCRIPT(UG04) -END_SCRIPT - -DECLARE_SCRIPT(UG05) - int sub_4021B0(); - void sub_402218(); -END_SCRIPT - -DECLARE_SCRIPT(UG06) -END_SCRIPT - -DECLARE_SCRIPT(UG07) -END_SCRIPT - -DECLARE_SCRIPT(UG08) -END_SCRIPT - -DECLARE_SCRIPT(UG09) -END_SCRIPT - -DECLARE_SCRIPT(UG10) -END_SCRIPT - -// UG11 does not exists - -DECLARE_SCRIPT(UG12) -END_SCRIPT - -DECLARE_SCRIPT(UG13) - void sub_40223C(); - void sub_4023D8(); - void sub_4025E0(); - void sub_402960(); - int sub_402AD0(); - void sub_402AD4(); - void sub_402E24(); -END_SCRIPT - -DECLARE_SCRIPT(UG14) -END_SCRIPT - -DECLARE_SCRIPT(UG15) -END_SCRIPT - -DECLARE_SCRIPT(UG16) - void sub_401D78(); -END_SCRIPT - -DECLARE_SCRIPT(UG17) -END_SCRIPT - -DECLARE_SCRIPT(UG18) - void sub_402734(); - void sub_402DE8(); - void sub_402F8C(); - void sub_403114(); - void sub_403278(); - void sub_403588(); -END_SCRIPT - -DECLARE_SCRIPT(UG19) -END_SCRIPT - -#undef DECLARE_SCRIPT - -/* - * Actor Scripts - */ - -class AIScriptBase : public ScriptBase { -public: - AIScriptBase(BladeRunnerEngine *vm) : ScriptBase(vm) {} - - virtual void Initialize() = 0; - virtual bool Update() = 0; - virtual void TimerExpired(int timer) = 0; - virtual void CompletedMovementTrack() = 0; - virtual void ReceivedClue(int clueId, int fromActorId) = 0; - virtual void ClickedByPlayer() = 0; - virtual void EnteredScene(int setId) = 0; - virtual void OtherAgentEnteredThisScene(int otherActorId) = 0; - virtual void OtherAgentExitedThisScene(int otherActorId) = 0; - virtual void OtherAgentEnteredCombatMode(int otherActorId, int combatMode) = 0; - virtual void ShotAtAndMissed() = 0; - virtual void ShotAtAndHit() = 0; - virtual void Retired(int byActorId) = 0; - virtual int GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) = 0; - virtual bool GoalChanged(int currentGoalNumber, int newGoalNumber) = 0; - virtual bool UpdateAnimation(int *animation, int *frame) = 0; - virtual bool ChangeAnimationMode(int mode) = 0; - virtual void QueryAnimationState(int *animationState, int *a2, int *a3, int *a4) = 0; - virtual void SetAnimationState(int animationState, int a2, int a3, int a4) = 0; - virtual bool ReachedMovementTrackWaypoint(int waypointId) = 0; - virtual void FledCombat() = 0; -}; - -class AIScripts { -private: - BladeRunnerEngine *_vm; - int _inScriptCounter; - int _actorsCount; - AIScriptBase **_AIScripts; - bool *_actorUpdating; -public: - AIScripts(BladeRunnerEngine *vm, int actorsCount); - ~AIScripts(); - - void Initialize(int actor); - void Update(int actor); - void TimerExpired(int actor, int timer); - void CompletedMovementTrack(int actor); - void EnteredScene(int actor, int setId); - void OtherAgentEnteredThisScene(int actor, int otherActorId); - void OtherAgentExitedThisScene(int actor, int otherActorId); - void GoalChanged(int actor, int currentGoalNumber, int newGoalNumber); - bool ReachedMovementTrackWaypoint(int actor, int waypointId); - void UpdateAnimation(int actor, int *animation, int *frame); - void ChangeAnimationMode(int actor, int mode); - - bool IsInsideScript() { return _inScriptCounter > 0; } -}; - } // End of namespace BladeRunner #endif |