diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-06-08 09:34:31 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-06-08 09:34:31 +0200 |
commit | 36a6d124aa4ef679a9429c990874576ce2ec27f1 (patch) | |
tree | 897389f5c60db94181f5275a184ff27341dcdd18 /src/control | |
parent | Scale font shadow (diff) | |
download | re3-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')
-rw-r--r-- | src/control/GameLogic.cpp | 8 | ||||
-rw-r--r-- | src/control/Script.cpp | 36 |
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: |