diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-22 11:11:50 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:32:43 +0200 |
commit | 786e101acff29e07503a4d3c294b613d4a2714b3 (patch) | |
tree | a5cf2a6b05190591891cb4cbf913d1fd667c58c1 /src/audio/PolRadio.cpp | |
parent | Fix C3dMarkers::PlaceMarker calls in Radar (diff) | |
download | re3-786e101acff29e07503a4d3c294b613d4a2714b3.tar re3-786e101acff29e07503a4d3c294b613d4a2714b3.tar.gz re3-786e101acff29e07503a4d3c294b613d4a2714b3.tar.bz2 re3-786e101acff29e07503a4d3c294b613d4a2714b3.tar.lz re3-786e101acff29e07503a4d3c294b613d4a2714b3.tar.xz re3-786e101acff29e07503a4d3c294b613d4a2714b3.tar.zst re3-786e101acff29e07503a4d3c294b613d4a2714b3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/PolRadio.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp index cb12a2fe..3664796b 100644 --- a/src/audio/PolRadio.cpp +++ b/src/audio/PolRadio.cpp @@ -94,8 +94,8 @@ cAudioManager::InitialisePoliceRadio() for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE; - SampleManager.SetChannelReverbFlag(policeChannel, false); - gSpecialSuspectLastSeenReport = false; + SampleManager.SetChannelReverbFlag(policeChannel, FALSE); + gSpecialSuspectLastSeenReport = FALSE; for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++) gMinTimeToNextReport[i] = m_FrameCounter; } @@ -131,7 +131,7 @@ cAudioManager::DoPoliceRadioCrackle() m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nReleasingVolumeModificator = 10; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE); m_sQueueSample.m_nVolume = m_anRandomTable[2] % 20 + 15; @@ -139,11 +139,11 @@ cAudioManager::DoPoliceRadioCrackle() m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume; m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_POLICE_RADIO_CRACKLE); m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_POLICE_RADIO_CRACKLE); - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bReverbFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bReverbFlag = FALSE; m_sQueueSample.m_nOffset = 63; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } @@ -156,7 +156,7 @@ cAudioManager::ServicePoliceRadio() if(!m_bIsInitialised) return; if(m_nUserPause == 0) { - bool crimeReport = SetupCrimeReport(); + bool8 crimeReport = SetupCrimeReport(); #ifdef FIX_BUGS // Crash at 0x5fe6ef if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted) return; @@ -179,12 +179,12 @@ cAudioManager::ServicePoliceRadio() void cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) { - bool processed = false; + bool8 processed = FALSE; uint32 sample; int32 freq; static int cWait = 0; - static bool bChannelOpen = false; + static bool8 bChannelOpen = FALSE; static uint8 bMissionAudioPhysicalPlayingStatus = 0; static int32 PoliceChannelFreq = 5500; @@ -194,14 +194,14 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel); if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == 1 && SampleManager.IsStreamPlaying(1)) { - SampleManager.PauseStream(1, 1); + SampleManager.PauseStream(TRUE, 1); } } else { if (m_nPreviousUserPause && g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == 1) { - SampleManager.PauseStream(0, 1); + SampleManager.PauseStream(FALSE, 1); } - if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = false; + if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = FALSE; if (cWait) { --cWait; return; @@ -225,7 +225,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) } } else if (!SampleManager.GetChannelUsedFlag(policeChannel)) { SampleManager.PreloadStreamedFile(g_nMissionAudioSfx, 1); - SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 1); + SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE, 1); SampleManager.StartPreloadedStreamedFile(1); g_nMissionAudioPlayingStatus = 1; bMissionAudioPhysicalPlayingStatus = 0; @@ -246,8 +246,8 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) if (gSpecialSuspectLastSeenReport) { gSpecialSuspectLastSeenReport = 0; } else if (((sample >= SFX_POLICE_RADIO_MESSAGE_NOISE_1) && (sample <= SFX_POLICE_RADIO_MESSAGE_NOISE_3)) || sample == TOTAL_AUDIO_SAMPLES) { - bChannelOpen = false; - processed = true; + bChannelOpen = FALSE; + processed = TRUE; } } if (sample == TOTAL_AUDIO_SAMPLES) { @@ -259,7 +259,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) case SFX_POLICE_RADIO_MESSAGE_NOISE_2: case SFX_POLICE_RADIO_MESSAGE_NOISE_3: freq = m_anRandomTable[4] % 2000 + 10025; - bChannelOpen = bChannelOpen == false; + bChannelOpen = bChannelOpen == FALSE; break; default: freq = SampleManager.GetSampleBaseFrequency(sample); break; } @@ -276,7 +276,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) } } -bool +bool8 cAudioManager::SetupCrimeReport() { int16 audioZoneId; @@ -289,13 +289,13 @@ cAudioManager::SetupCrimeReport() float quarterY; int i; int32 sampleIndex; - bool processed = false; + bool8 processed = FALSE; - if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return false; + if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return FALSE; if (60 - m_sPoliceRadioQueue.policeChannelTimer <= 9) { AgeCrimes(); - return true; + return TRUE; } for (i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) { @@ -303,7 +303,7 @@ cAudioManager::SetupCrimeReport() break; } - if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return false; + if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return FALSE; audioZoneId = CTheZones::FindAudioZone(&m_sPoliceRadioQueue.crimes[i].position); if (audioZoneId >= 0 && audioZoneId < NUMAUDIOZONES) { zone = CTheZones::GetAudioZone(audioZoneId); @@ -336,10 +336,10 @@ cAudioManager::SetupCrimeReport() if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) { m_sPoliceRadioQueue.Add(SFX_NORTH); - processed = true; + processed = TRUE; } else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) { m_sPoliceRadioQueue.Add(SFX_SOUTH); - processed = true; + processed = TRUE; } if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX) @@ -359,7 +359,7 @@ cAudioManager::SetupCrimeReport() } m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE; AgeCrimes(); - return true; + return TRUE; } void @@ -714,7 +714,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z) float quarterX; float quarterY; int32 sample; - bool processed = false; + bool8 processed = false; CVector vec = CVector(x, y, z); if (!m_bIsInitialised) return; @@ -745,10 +745,10 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z) if (vec.y > halfY + quarterY) { m_sPoliceRadioQueue.Add(SFX_NORTH); - processed = true; + processed = TRUE; } else if (vec.y < halfY - quarterY) { m_sPoliceRadioQueue.Add(SFX_SOUTH); - processed = true; + processed = TRUE; } if (vec.x > halfX + quarterX) @@ -761,7 +761,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z) m_sPoliceRadioQueue.Add(sample); m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES); - gSpecialSuspectLastSeenReport = true; + gSpecialSuspectLastSeenReport = TRUE; break; } } |