summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/control')
-rw-r--r--src/control/GameLogic.cpp8
-rw-r--r--src/control/Script.cpp36
2 files changed, 11 insertions, 33 deletions
diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp
index a98315e2..5ec976d1 100644
--- a/src/control/GameLogic.cpp
+++ b/src/control/GameLogic.cpp
@@ -193,15 +193,15 @@ CGameLogic::Update()
pPlayerInfo.m_nBustedAudioStatus = BUSTEDAUDIO_LOADING;
char name[12];
sprintf(name, pPlayerInfo.m_nCurrentBustedAudio >= 10 ? "bust_%d" : "bust_0%d", pPlayerInfo.m_nCurrentBustedAudio);
- DMAudio.ClearMissionAudio(); // TODO(MIAMI): argument is 0
- DMAudio.PreloadMissionAudio(name); // TODO(MIAMI): argument is 0
+ DMAudio.ClearMissionAudio(0); // TODO(MIAMI): argument is 0
+ DMAudio.PreloadMissionAudio(0, name); // TODO(MIAMI): argument is 0
pPlayerInfo.m_nCurrentBustedAudio = pPlayerInfo.m_nCurrentBustedAudio % 28 + 1; // enum? const? TODO
}
}
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 4000 &&
pPlayerInfo.m_nBustedAudioStatus == BUSTEDAUDIO_LOADING &&
- DMAudio.GetMissionAudioLoadingStatus() == 1) { // TODO: argument is 0
- DMAudio.PlayLoadedMissionAudio(); // TODO: argument is 0
+ DMAudio.GetMissionAudioLoadingStatus(0) == 1) { // TODO: argument is 0
+ DMAudio.PlayLoadedMissionAudio(0); // TODO: argument is 0
pPlayerInfo.m_nBustedAudioStatus = BUSTEDAUDIO_DONE;
}
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: