summaryrefslogtreecommitdiffstats
path: root/src/audio/PolRadio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/PolRadio.cpp')
-rw-r--r--src/audio/PolRadio.cpp218
1 files changed, 109 insertions, 109 deletions
diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp
index 69392d18..26ade81e 100644
--- a/src/audio/PolRadio.cpp
+++ b/src/audio/PolRadio.cpp
@@ -139,7 +139,7 @@ cAudioManager::ServicePoliceRadio()
#ifdef FIX_BUGS
nLastSeen -= CTimer::GetLogicalFramesPassed();
#else
- --nLastSeen;
+ nLastSeen--;
#endif
else {
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
@@ -157,12 +157,12 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
{
bool8 processed = FALSE;
uint32 sample;
- int32 freq;
+ uint32 freq;
static int cWait = 0;
static bool8 bChannelOpen = FALSE;
static uint8 bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_STOPPED;
- static int32 PoliceChannelFreq = 22050;
+ static uint32 PoliceChannelFreq = 22050;
if (!m_bIsInitialised) return;
@@ -266,12 +266,12 @@ cAudioManager::SetupCrimeReport()
float quarterX;
float quarterY;
int i;
- int32 sampleIndex;
+ uint32 sampleIndex;
bool8 processed = FALSE;
if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return FALSE;
- if (60 - m_sPoliceRadioQueue.m_nSamplesInQueue <= 9) {
+ if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue <= 9) {
AgeCrimes();
return TRUE;
}
@@ -345,114 +345,114 @@ cAudioManager::SetupCrimeReport()
return TRUE;
}
+Const uint32 gCarColourTable[][3] = {
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}
+};
+
void
cAudioManager::SetupSuspectLastSeenReport()
{
CVehicle *veh;
uint8 color1;
- int32 main_color;
- int32 sample;
-
- int32 color_pre_modifier;
- int32 color_post_modifier;
-
- const int32 gCarColourTable[][3] = {
- {NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
- {SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
- {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
- {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}
- };
+ uint32 main_color;
+ uint32 sample;
+
+ uint32 color_pre_modifier;
+ uint32 color_post_modifier;
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
veh = FindVehicleOfPlayer();
@@ -690,7 +690,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
float halfY;
float quarterX;
float quarterY;
- int32 sample;
+ uint32 sample;
bool8 processed = FALSE;
CVector vec = CVector(x, y, z);