summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-06-08 09:34:31 +0200
committerSergeanur <s.anureev@yandex.ua>2020-06-08 09:34:31 +0200
commit36a6d124aa4ef679a9429c990874576ce2ec27f1 (patch)
tree897389f5c60db94181f5275a184ff27341dcdd18 /src/control/Script.cpp
parentScale font shadow (diff)
downloadre3-36a6d124aa4ef679a9429c990874576ce2ec27f1.tar
re3-36a6d124aa4ef679a9429c990874576ce2ec27f1.tar.gz
re3-36a6d124aa4ef679a9429c990874576ce2ec27f1.tar.bz2
re3-36a6d124aa4ef679a9429c990874576ce2ec27f1.tar.lz
re3-36a6d124aa4ef679a9429c990874576ce2ec27f1.tar.xz
re3-36a6d124aa4ef679a9429c990874576ce2ec27f1.tar.zst
re3-36a6d124aa4ef679a9429c990874576ce2ec27f1.zip
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp36
1 files changed, 7 insertions, 29 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index ff516136..ef25417c 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -318,8 +318,8 @@ void CMissionCleanup::Process()
//CSpecialFX::bLiftCam = false;
//CSpecialFX::bVideoCam = false;
//CTimeCycle::StopExtraColour(0);
- // TODO(MIAMI): change this to loop when it supports parameters
- DMAudio.ClearMissionAudio();
+ for (int i = 0; i < MISSION_AUDIO_SLOTS; i++)
+ DMAudio.ClearMissionAudio(i);
CWeather::ReleaseWeather();
for (int i = 0; i < NUM_OF_SPECIAL_CHARS; i++)
CStreaming::SetMissionDoesntRequireSpecialChar(i);
@@ -8664,40 +8664,23 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
str[i] = tolower(str[i]);
static bool bShowed = false;
m_nIp += KEY_LENGTH_IN_SCRIPT;
- if (!bShowed) {
- debug("LOAD_MISSION_AUDIO not implemented\n");
- bShowed = true;
- }
- //DMAudio.PreloadMissionAudio(str);
+ DMAudio.PreloadMissionAudio(ScriptParams[0] - 1, str);
return 0;
}
case COMMAND_HAS_MISSION_AUDIO_LOADED:
{
CollectParameters(&m_nIp, 1);
- static bool bShowed = false;
- if (!bShowed) {
- debug("HAS_MISSION_AUDIO_LOADED not implemented, default to TRUE\n");
- bShowed = true;
- }
- UpdateCompareFlag(true);
- //UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus() == 1);
+ UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus(ScriptParams[0] - 1) == 1);
return 0;
}
case COMMAND_PLAY_MISSION_AUDIO:
CollectParameters(&m_nIp, 1);
- debug("PLAY_MISSION_AUDIO doesn't support parameter yet, skipping\n");
- //DMAudio.PlayLoadedMissionAudio();
+ DMAudio.PlayLoadedMissionAudio(ScriptParams[0] - 1);
return 0;
case COMMAND_HAS_MISSION_AUDIO_FINISHED:
{
CollectParameters(&m_nIp, 1);
- static bool bShowed = false;
- if (!bShowed) {
- debug("HAS_MISSION_AUDIO_FINISHED not implemented, default to TRUE\n");
- bShowed = true;
- }
- UpdateCompareFlag(true);
- //UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished());
+ UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished(ScriptParams[0] - 1));
return 0;
}
case COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING:
@@ -8735,12 +8718,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
{
CollectParameters(&m_nIp, 4);
CVector pos = *(CVector*)&ScriptParams[1];
- static bool bShowed = false;
- if (!bShowed) {
- debug("SET_MISSION_AUDIO_POSITION not implemented\n");
- bShowed = true;
- }
- //DMAudio.SetMissionAudioLocation(pos.x, pos.y, pos.z);
+ DMAudio.SetMissionAudioLocation(ScriptParams[0] - 1, pos.x, pos.y, pos.z);
return 0;
}
case COMMAND_ACTIVATE_SAVE_MENU: