diff options
Diffstat (limited to 'engines/bladerunner/script/script.cpp')
-rw-r--r-- | engines/bladerunner/script/script.cpp | 74 |
1 files changed, 33 insertions, 41 deletions
diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index c4352706f5..72f4e50a53 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -22,14 +22,13 @@ #include "bladerunner/script/script.h" -#include "bladerunner/bladerunner.h" - #include "bladerunner/actor.h" #include "bladerunner/actor_combat.h" #include "bladerunner/adq.h" #include "bladerunner/ambient_sounds.h" #include "bladerunner/audio_player.h" #include "bladerunner/audio_speech.h" +#include "bladerunner/bladerunner.h" #include "bladerunner/crimes_database.h" #include "bladerunner/combat.h" #include "bladerunner/dialogue_menu.h" @@ -39,6 +38,8 @@ #include "bladerunner/items.h" #include "bladerunner/item_pickup.h" #include "bladerunner/movement_track.h" +#include "bladerunner/regions.h" +#include "bladerunner/set.h" #include "bladerunner/settings.h" #include "bladerunner/set_effects.h" #include "bladerunner/scene.h" @@ -46,6 +47,7 @@ #include "bladerunner/slice_animations.h" #include "bladerunner/slice_renderer.h" #include "bladerunner/spinner.h" +#include "bladerunner/suspects_database.h" #include "bladerunner/text_resource.h" #include "bladerunner/vector.h" #include "bladerunner/waypoints.h" @@ -499,7 +501,7 @@ bool ScriptBase::Loop_Actor_Walk_To_XYZ(int actorId, float x, float y, float z, //TODO: //PlayerActorIdle = 0; bool isRunning; - bool result = _vm->_actors[actorId]->loopWalkToXYZ(Vector3(x, y, z), destinationOffset, a5, run, 1, &isRunning); + bool result = _vm->_actors[actorId]->loopWalkToXYZ(Vector3(x, y, z), destinationOffset, a5, run, true, &isRunning); // if (PlayerActorIdle == 1) { // result = 1; @@ -829,12 +831,12 @@ void ScriptBase::Scene_Loop_Set_Default(int loopId) { _vm->_scene->loopSetDefault(loopId); } -void ScriptBase::Scene_Loop_Start_Special(int sceneLoopMode, int loopId, int c) { - if (sceneLoopMode == 1) { - c = 1; +void ScriptBase::Scene_Loop_Start_Special(int sceneLoopMode, int loopId, bool immediately) { + if (sceneLoopMode == kSceneLoopModeChangeSet) { + immediately = true; } - _vm->_scene->loopStartSpecial(sceneLoopMode, loopId, c); - if (sceneLoopMode == 1) { + _vm->_scene->loopStartSpecial(sceneLoopMode, loopId, immediately); + if (sceneLoopMode == kSceneLoopModeChangeSet) { _vm->_settings->clearNewSetAndScene(); } } @@ -843,54 +845,44 @@ void ScriptBase::Outtake_Play(int id, int noLocalization, int container) { _vm->outtakePlay(id, noLocalization, container); } -void ScriptBase::Ambient_Sounds_Add_Sound(int id, int time1, int time2, int volume1, int volume2, int pan1begin, int pan1end, int pan2begin, int pan2end, int priority, int unk) { - _vm->_ambientSounds->addSound(id, time1, time2, volume1, volume2, pan1begin, pan1end, pan2begin, pan2end, priority, unk); +void ScriptBase::Ambient_Sounds_Add_Sound(int sfxId, int timeMin, int timeMax, int volumeMin, int volumeMax, int panStartMin, int panStartMax, int panEndMin, int panEndMax, int priority, int unk) { + _vm->_ambientSounds->addSound(sfxId, timeMin, timeMax, volumeMin, volumeMax, panStartMin, panStartMax, panEndMin, panEndMax, priority, unk); } -void ScriptBase::Ambient_Sounds_Remove_Sound(int id, bool a2) { - //TODO - warning("Ambient_Sounds_Remove_Sound(%d, %d)", id, a2); +void ScriptBase::Ambient_Sounds_Remove_Sound(int sfxId, bool stopPlaying) { + _vm->_ambientSounds->removeNonLoopingSound(sfxId, stopPlaying); } -void ScriptBase::Ambient_Sounds_Add_Speech_Sound(int id, int unk1, int time1, int time2, int volume1, int volume2, int pan1begin, int pan1end, int pan2begin, int pan2end, int priority, int unk2){ - //TODO - warning("Ambient_Sounds_Add_Speech_Sound(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", id, unk1, time1, time2, volume1, volume2, pan1begin, pan1end, pan2begin, pan2end, priority, unk2); +void ScriptBase::Ambient_Sounds_Add_Speech_Sound(int actorId, int sentenceId, int timeMin, int timeMax, int volumeMin, int volumeMax, int panStartMin, int panStartMax, int panEndMin, int panEndMax, int priority, int unk){ + _vm->_ambientSounds->addSpeech(actorId, sentenceId, timeMin, timeMax, volumeMin, volumeMax, panStartMin, panStartMax, panEndMin, panEndMax, priority, unk); } // ScriptBase::Ambient_Sounds_Remove_Speech_Sound -int ScriptBase::Ambient_Sounds_Play_Sound(int a1, int a2, int a3, int a4, int a5) { - //TODO - warning("Ambient_Sounds_Remove_Sound(%d, %d, %d, %d, %d)", a1, a2, a3, a4, a5); - return -1; +void ScriptBase::Ambient_Sounds_Play_Sound(int sfxId, int volume, int panStart, int panEnd, int priority) { + _vm->_ambientSounds->playSound(sfxId, volume, panStart, panEnd, priority); } // ScriptBase::Ambient_Sounds_Play_Speech_Sound -void ScriptBase::Ambient_Sounds_Remove_All_Non_Looping_Sounds(int time) { - //TODO - warning("Ambient_Sounds_Remove_All_Non_Looping_Sounds(%d)", time); - // _vm->_ambientSounds->removeAllNonLoopingSounds(time); +void ScriptBase::Ambient_Sounds_Remove_All_Non_Looping_Sounds(bool stopPlaying) { + _vm->_ambientSounds->removeAllNonLoopingSounds(stopPlaying); } -void ScriptBase::Ambient_Sounds_Add_Looping_Sound(int id, int volume, int pan, int fadeInTime) { - _vm->_ambientSounds->addLoopingSound(id, volume, pan, fadeInTime); +void ScriptBase::Ambient_Sounds_Add_Looping_Sound(int sfxId, int volume, int pan, int delay) { + _vm->_ambientSounds->addLoopingSound(sfxId, volume, pan, delay); } -void ScriptBase::Ambient_Sounds_Adjust_Looping_Sound(int id, int panBegin, int panEnd, int a4) { - //TODO - warning("Ambient_Sounds_Adjust_Looping_Sound(%d, %d, %d, %d)", id, panBegin, panEnd, a4); +void ScriptBase::Ambient_Sounds_Adjust_Looping_Sound(int sfxId, int volume, int pan, int delay) { + _vm->_ambientSounds->adjustLoopingSound(sfxId, volume, pan, delay); } -void ScriptBase::Ambient_Sounds_Remove_Looping_Sound(int id, bool a2){ - //TODO - warning("Ambient_Sounds_Remove_Looping_Sound(%d, %d)", id, a2); +void ScriptBase::Ambient_Sounds_Remove_Looping_Sound(int sfxId, int delay){ + _vm->_ambientSounds->removeLoopingSound(sfxId, delay); } -void ScriptBase::Ambient_Sounds_Remove_All_Looping_Sounds(int time) { - //TODO - warning("Ambient_Sounds_Remove_All_Looping_Sounds(%d)", time); - // _vm->_ambientSounds->removeAllLoopingSounds(time); +void ScriptBase::Ambient_Sounds_Remove_All_Looping_Sounds(int delay) { + _vm->_ambientSounds->removeAllLoopingSounds(delay); } void ScriptBase::Setup_Scene_Information(float actorX, float actorY, float actorZ, int actorFacing) { @@ -1067,14 +1059,14 @@ bool ScriptBase::SDB_Add_Other_Clue(int suspectId, int clueId) { return _vm->_suspectsDatabase->get(suspectId)->addOtherClue(clueId); } -void ScriptBase::Spinner_Set_Selectable_Destination_Flag(int a1, int a2) { - _vm->_spinner->setSelectableDestinationFlag(a1, a2); +void ScriptBase::Spinner_Set_Selectable_Destination_Flag(int destination, bool selectable) { + _vm->_spinner->setSelectableDestinationFlag(destination, selectable); } // ScriptBase::Spinner_Query_Selectable_Destination_Flag -int ScriptBase::Spinner_Interface_Choose_Dest(int a1, int a2) { - return _vm->_spinner->interfaceChooseDest(a1, a2); +int ScriptBase::Spinner_Interface_Choose_Dest(int loopId, bool immediately) { + return _vm->_spinner->chooseDestination(loopId, immediately); } void ScriptBase::ESPER_Flag_To_Activate() { @@ -1131,7 +1123,7 @@ void ScriptBase::Actor_Retired_Here(int actorId, int width, int height, int reti Vector3 actorPosition; actor->getXYZ(&actorPosition.x, &actorPosition.y, &actorPosition.z); actor->retire(retired, width, height, retiredByActorId); - actor->setAtXYZ(actorPosition, actor->getFacing(), true, 0, true); + actor->setAtXYZ(actorPosition, actor->getFacing(), true, false, true); _vm->_sceneObjects->setRetired(actorId + SCENE_OBJECTS_ACTORS_OFFSET, true); } |