diff options
Diffstat (limited to 'src/audio/PolRadio.cpp')
-rw-r--r-- | src/audio/PolRadio.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp index b19886f5..30b19086 100644 --- a/src/audio/PolRadio.cpp +++ b/src/audio/PolRadio.cpp @@ -24,8 +24,8 @@ struct tPoliceRadioZone { tPoliceRadioZone ZoneSfx[NUMAUDIOZONES]; uint32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES; -int8 g_nMissionAudioPlayingStatus = 2; -uint8 gSpecialSuspectLastSeenReport; +int8 g_nMissionAudioPlayingStatus = PLAY_STATUS_FINISHED; +bool8 gSpecialSuspectLastSeenReport; uint32 gMinTimeToNextReport[NUM_CRIME_TYPES]; void @@ -83,8 +83,8 @@ void cAudioManager::SetMissionScriptPoliceAudio(uint32 sfx) { if (!m_bIsInitialised) return; - if (g_nMissionAudioPlayingStatus != 1) { - g_nMissionAudioPlayingStatus = 0; + if (g_nMissionAudioPlayingStatus != PLAY_STATUS_PLAYING) { + g_nMissionAudioPlayingStatus = PLAY_STATUS_STOPPED; g_nMissionAudioSfx = sfx; } } @@ -113,7 +113,7 @@ cAudioManager::DoPoliceRadioCrackle() m_sQueueSample.m_bReverbFlag = FALSE; m_sQueueSample.m_nOffset = 63; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bRequireReflection = FALSE; + SET_SOUND_REFLECTION(FALSE); AddSampleToRequestedQueue(); } @@ -125,7 +125,7 @@ cAudioManager::ServicePoliceRadio() if(!m_bIsInitialised) return; - if(m_nUserPause == 0) { + if(!m_nUserPause) { bool8 crimeReport = SetupCrimeReport(); #ifdef FIX_BUGS // Crash at 0x5fe6ef if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted) @@ -162,20 +162,20 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) static int cWait = 0; static bool8 bChannelOpen = FALSE; - static uint8 bMissionAudioPhysicalPlayingStatus = 0; + static uint8 bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_STOPPED; static int32 PoliceChannelFreq = 22050; if (!m_bIsInitialised) return; - if (m_nUserPause != 0) { + if (m_nUserPause) { if (SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) SampleManager.StopChannel(CHANNEL_POLICE_RADIO); - if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == 1 && + if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING && SampleManager.IsStreamPlaying(1)) { SampleManager.PauseStream(TRUE, 1); } } else { if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE && - bMissionAudioPhysicalPlayingStatus == 1) { + bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING) { SampleManager.PauseStream(FALSE, 1); } if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = FALSE; @@ -188,17 +188,17 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) return; } if (g_nMissionAudioSfx != NO_SAMPLE && !bChannelOpen) { - if (g_nMissionAudioPlayingStatus) { - if (g_nMissionAudioPlayingStatus == 1 && !bMissionAudioPhysicalPlayingStatus && + if (g_nMissionAudioPlayingStatus != PLAY_STATUS_STOPPED) { + if (g_nMissionAudioPlayingStatus == PLAY_STATUS_PLAYING && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_STOPPED && SampleManager.IsStreamPlaying(1)) { - bMissionAudioPhysicalPlayingStatus = 1; + bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_PLAYING; } - if (bMissionAudioPhysicalPlayingStatus == 1) { + if (bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING) { if (SampleManager.IsStreamPlaying(1)) { DoPoliceRadioCrackle(); } else { - bMissionAudioPhysicalPlayingStatus = 2; - g_nMissionAudioPlayingStatus = 2; + bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_FINISHED; + g_nMissionAudioPlayingStatus = PLAY_STATUS_FINISHED; g_nMissionAudioSfx = NO_SAMPLE; cWait = 30; } @@ -208,13 +208,13 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) SampleManager.PreloadStreamedFile(g_nMissionAudioSfx, 1); SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE, 1); SampleManager.StartPreloadedStreamedFile(1); - g_nMissionAudioPlayingStatus = 1; - bMissionAudioPhysicalPlayingStatus = 0; + g_nMissionAudioPlayingStatus = PLAY_STATUS_PLAYING; + bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_STOPPED; return; } } if (bChannelOpen) DoPoliceRadioCrackle(); - if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != 1) && + if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != PLAY_STATUS_PLAYING) && !SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO) && m_sPoliceRadioQueue.policeChannelTimer) { if (m_sPoliceRadioQueue.policeChannelTimer) { sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds]; @@ -225,7 +225,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) } if (wantedLevel == 0) { if (gSpecialSuspectLastSeenReport) { - gSpecialSuspectLastSeenReport = 0; + gSpecialSuspectLastSeenReport = FALSE; } else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) { bChannelOpen = FALSE; processed = TRUE; |