diff options
Diffstat (limited to 'src/audio/PolRadio.cpp')
-rw-r--r-- | src/audio/PolRadio.cpp | 714 |
1 files changed, 342 insertions, 372 deletions
diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp index 7688566b..49b8368c 100644 --- a/src/audio/PolRadio.cpp +++ b/src/audio/PolRadio.cpp @@ -22,8 +22,6 @@ struct tPoliceRadioZone { }; tPoliceRadioZone ZoneSfx[NUMAUDIOZONES]; -char SubZo2Label[8]; -char SubZo3Label[8]; uint32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES; int8 g_nMissionAudioPlayingStatus = PLAY_STATUS_FINISHED; @@ -40,46 +38,22 @@ cAudioManager::InitialisePoliceRadioZones() strcpy(ZoneSfx[i].m_aName, name); \ ZoneSfx[i].m_nSampleIndex = sample; - SETZONESFX(0, "HOSPI_2", SFX_POLICE_RADIO_ROCKFORD); - SETZONESFX(1, "CONSTRU", SFX_POLICE_RADIO_FORT_STAUNTON); - SETZONESFX(2, "STADIUM", SFX_POLICE_RADIO_ASPATRIA); - SETZONESFX(3, "YAKUSA", SFX_POLICE_RADIO_TORRINGTON); - SETZONESFX(4, "SHOPING", SFX_POLICE_RADIO_BEDFORD_POINT); - SETZONESFX(5, "COM_EAS", SFX_POLICE_RADIO_NEWPORT); - SETZONESFX(6, "PARK", SFX_POLICE_RADIO_BELLEVILLE_PARK); - SETZONESFX(7, "UNIVERS", SFX_POLICE_RADIO_LIBERTY_CAMPUS); - SETZONESFX(8, "BIG_DAM", SFX_POLICE_RADIO_COCHRANE_DAM); - SETZONESFX(9, "SUB_IND", SFX_POLICE_RADIO_PIKE_CREEK); - SETZONESFX(10, "SWANKS", SFX_POLICE_RADIO_CEDAR_GROVE); - SETZONESFX(11, "PROJECT", SFX_POLICE_RADIO_WICHITA_GARDENS); - SETZONESFX(12, "AIRPORT", SFX_POLICE_RADIO_FRANCIS_INTERNATIONAL_AIRPORT); - SETZONESFX(13, "PORT_W", SFX_POLICE_RADIO_CALLAHAN_POINT); - SETZONESFX(14, "PORT_S", SFX_POLICE_RADIO_ATLANTIC_QUAYS); - SETZONESFX(15, "PORT_E", SFX_POLICE_RADIO_PORTLAND_HARBOUR); - SETZONESFX(16, "PORT_I", SFX_POLICE_RADIO_TRENTON); - SETZONESFX(17, "CHINA", SFX_POLICE_RADIO_CHINATOWN); - SETZONESFX(18, "REDLIGH", SFX_POLICE_RADIO_RED_LIGHT_DISTRICT); - SETZONESFX(19, "TOWERS", SFX_POLICE_RADIO_HEPBURN_HEIGHTS); - SETZONESFX(20, "LITTLEI", SFX_POLICE_RADIO_SAINT_MARKS); - SETZONESFX(21, "HARWOOD", SFX_POLICE_RADIO_HARWOOD); - SETZONESFX(22, "EASTBAY", SFX_POLICE_RADIO_PORTLAND_BEACH); - SETZONESFX(23, "S_VIEW", SFX_POLICE_RADIO_PORTLAND_STRAIGHTS); - SETZONESFX(24, "CITYZON", SFX_POLICE_RADIO_LIBERTY_CITY); - SETZONESFX(25, "IND_ZON", SFX_POLICE_RADIO_PORTLAND); - SETZONESFX(26, "COM_ZON", SFX_POLICE_RADIO_STAUNTON_ISLAND); - SETZONESFX(27, "SUB_ZON", SFX_POLICE_RADIO_SHORESIDE_VALE); - SETZONESFX(28, "SUB_ZO2", SFX_POLICE_RADIO_SHORESIDE_VALE); - SETZONESFX(29, "SUB_ZO3", SFX_POLICE_RADIO_SHORESIDE_VALE); - SETZONESFX(30, "A", SFX_POLICE_RADIO_ROCKFORD); - SETZONESFX(31, "A", SFX_POLICE_RADIO_ROCKFORD); - SETZONESFX(32, "A", SFX_POLICE_RADIO_ROCKFORD); - SETZONESFX(33, "A", SFX_POLICE_RADIO_ROCKFORD); - SETZONESFX(34, "A", SFX_POLICE_RADIO_ROCKFORD); + SETZONESFX(0, "VICE_C", SFX_POLICE_RADIO_VICE_CITY); + SETZONESFX(1, "IND_ZON", SFX_POLICE_RADIO_VICE_CITY_BEACH); + SETZONESFX(2, "COM_ZON", SFX_POLICE_RADIO_VICE_CITY_MAINLAND); + SETZONESFX(3, "BEACH1", SFX_POLICE_RADIO_OCEAN_BEACH); + SETZONESFX(4, "BEACH2", SFX_POLICE_RADIO_WASHINGTON_BEACH); + SETZONESFX(5, "BEACH3", SFX_POLICE_RADIO_VICE_POINT); + SETZONESFX(6, "GOLFC", SFX_POLICE_RADIO_LEAF_LINKS); + SETZONESFX(7, "STARI", SFX_POLICE_RADIO_STARFISH_ISLAND); + SETZONESFX(8, "DOCKS", SFX_POLICE_RADIO_VICEPORT); + SETZONESFX(9, "HAVANA", SFX_POLICE_RADIO_LITTLE_HAVANA); + SETZONESFX(10, "HAITI", SFX_POLICE_RADIO_LITTLE_HAITI); + SETZONESFX(11, "PORNI", SFX_POLICE_RADIO_PRAWN_ISLAND); + SETZONESFX(12, "DTOWN", SFX_POLICE_RADIO_DOWNTOWN); + SETZONESFX(13, "A_PORT", SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL); #undef SETZONESFX - - strcpy(SubZo2Label, "SUB_ZO2"); - strcpy(SubZo3Label, "SUB_ZO3"); } void @@ -88,8 +62,9 @@ cAudioManager::InitialisePoliceRadio() m_sPoliceRadioQueue.Reset(); for (int32 i = 0; i < ARRAY_SIZE(m_aCrimes); i++) m_aCrimes[i].type = CRIME_NONE; - +#if !defined(GTA_PS2) || defined(AUDIO_REVERB) SampleManager.SetChannelReverbFlag(CHANNEL_POLICE_RADIO, FALSE); +#endif gSpecialSuspectLastSeenReport = FALSE; for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++) gMinTimeToNextReport[i] = m_FrameCounter; @@ -134,7 +109,7 @@ cAudioManager::DoPoliceRadioCrackle() SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume); SET_LOOP_OFFSETS(SFX_POLICE_RADIO_CRACKLE) m_sQueueSample.m_bStatic = FALSE; - m_sQueueSample.m_bReverb = FALSE; + SET_SOUND_REVERB(FALSE); m_sQueueSample.m_nPan = 63; m_sQueueSample.m_nFramesToPlay = 3; SET_SOUND_REFLECTION(FALSE); @@ -155,18 +130,21 @@ cAudioManager::ServicePoliceRadio() if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted) return; #endif - wantedLevel = FindPlayerPed()->m_pWanted->GetWantedLevel(); - if(!crimeReport) { - if(wantedLevel != 0) { - if(nLastSeen != 0) { + CPlayerPed *playerPed = FindPlayerPed(); + if (playerPed) { + wantedLevel = playerPed->m_pWanted->GetWantedLevel(); + if (!crimeReport) { + if (wantedLevel != 0) { + if (nLastSeen != 0) #ifdef FIX_BUGS - nLastSeen -= CTimer::GetLogicalFramesPassed(); + nLastSeen -= CTimer::GetLogicalFramesPassed(); #else - --nLastSeen; + --nLastSeen; #endif - } else { - nLastSeen = m_anRandomTable[1] % 1000 + 2000; - SetupSuspectLastSeenReport(); + else { + nLastSeen = m_anRandomTable[1] % 1000 + 2000; + SetupSuspectLastSeenReport(); + } } } } @@ -184,18 +162,18 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) static int cWait = 0; static bool8 bChannelOpen = FALSE; static uint8 bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_STOPPED; - static int32 PoliceChannelFreq = 5500; + static int32 PoliceChannelFreq = 22050; if (!m_bIsInitialised) return; if (m_nUserPause) { if (SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) SampleManager.StopChannel(CHANNEL_POLICE_RADIO); - if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING && + if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING && SampleManager.IsStreamPlaying(1)) { SampleManager.PauseStream(TRUE, 1); } } else { - if (m_nPreviousUserPause && g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && + if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING) { SampleManager.PauseStream(FALSE, 1); } @@ -208,7 +186,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) #endif return; } - if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && !bChannelOpen) { + if (g_nMissionAudioSfx != NO_SAMPLE && !bChannelOpen) { if (g_nMissionAudioPlayingStatus != PLAY_STATUS_STOPPED) { if (g_nMissionAudioPlayingStatus == PLAY_STATUS_PLAYING && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_STOPPED && SampleManager.IsStreamPlaying(1)) { @@ -220,7 +198,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) } else { bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_FINISHED; g_nMissionAudioPlayingStatus = PLAY_STATUS_FINISHED; - g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES; + g_nMissionAudioSfx = NO_SAMPLE; cWait = 30; } return; @@ -235,25 +213,23 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) } } if (bChannelOpen) DoPoliceRadioCrackle(); - if ((g_nMissionAudioSfx == TOTAL_AUDIO_SAMPLES || g_nMissionAudioPlayingStatus != PLAY_STATUS_PLAYING) && + if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != PLAY_STATUS_PLAYING) && !SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO) && m_sPoliceRadioQueue.m_nSamplesInQueue != 0) { sample = m_sPoliceRadioQueue.Remove(); if (wantedLevel == 0) { if (gSpecialSuspectLastSeenReport) { gSpecialSuspectLastSeenReport = FALSE; - } else if (((sample >= SFX_POLICE_RADIO_MESSAGE_NOISE_1) && (sample <= SFX_POLICE_RADIO_MESSAGE_NOISE_3)) || sample == TOTAL_AUDIO_SAMPLES) { + } else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) { bChannelOpen = FALSE; processed = TRUE; } } - if (sample == TOTAL_AUDIO_SAMPLES) { + if (sample == NO_SAMPLE) { if (!processed) cWait = 30; } else { SampleManager.InitialiseChannel(CHANNEL_POLICE_RADIO, sample, SFX_BANK_0); switch (sample) { case SFX_POLICE_RADIO_MESSAGE_NOISE_1: - case SFX_POLICE_RADIO_MESSAGE_NOISE_2: - case SFX_POLICE_RADIO_MESSAGE_NOISE_3: freq = m_anRandomTable[4] % 2000 + 10025; bChannelOpen = bChannelOpen == FALSE; break; @@ -290,12 +266,12 @@ cAudioManager::SetupCrimeReport() float quarterX; float quarterY; int i; - uint32 sampleIndex; + int32 sampleIndex; bool8 processed = FALSE; if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return FALSE; - if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue <= 9) { + if (60 - m_sPoliceRadioQueue.m_nSamplesInQueue <= 9) { AgeCrimes(); return TRUE; } @@ -312,49 +288,54 @@ cAudioManager::SetupCrimeReport() for (int j = 0; j < NUMAUDIOZONES; j++) { if (strcmp(zone->name, ZoneSfx[j].m_aName) == 0) { sampleIndex = ZoneSfx[j].m_nSampleIndex; - m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_WEVE_GOT); - m_sPoliceRadioQueue.Add(m_anRandomTable[1] % 2 + SFX_A_10_1); + m_sPoliceRadioQueue.Add(SFX_A_10); switch (m_aCrimes[i].type) { - case CRIME_PED_BURNED: m_aCrimes[i].type = CRIME_HIT_PED; break; - case CRIME_COP_BURNED: m_aCrimes[i].type = CRIME_HIT_COP; break; + case CRIME_PED_BURNED: + case CRIME_HIT_PED_NASTYWEAPON: + m_aCrimes[i].type = CRIME_HIT_PED; + break; + case CRIME_COP_BURNED: + case CRIME_HIT_COP_NASTYWEAPON: + m_aCrimes[i].type = CRIME_HIT_COP; + break; case CRIME_VEHICLE_BURNED: m_aCrimes[i].type = CRIME_STEAL_CAR; break; case CRIME_DESTROYED_CESSNA: m_aCrimes[i].type = CRIME_SHOOT_HELI; break; + case CRIME_EXPLOSION: m_aCrimes[i].type = CRIME_STEAL_CAR; break; // huh? default: break; } +#ifdef FIX_BUGS m_sPoliceRadioQueue.Add(m_aCrimes[i].type + SFX_CRIME_1 - 1); +#else + m_sPoliceRadioQueue.Add(m_aCrimes[i].type + SFX_CRIME_1); +#endif m_sPoliceRadioQueue.Add(SFX_IN); - if (sampleIndex == SFX_POLICE_RADIO_SHORESIDE_VALE && - (strcmp(zone->name, SubZo2Label) == 0 || strcmp(zone->name, SubZo3Label) == 0)) { + rangeX = zone->maxx - zone->minx; + rangeY = zone->maxy - zone->miny; + halfX = 0.5f * rangeX + zone->minx; + halfY = 0.5f * rangeY + zone->miny; + quarterX = 0.25f * rangeX; + quarterY = 0.25f * rangeY; + + if (m_aCrimes[i].position.y > halfY + quarterY) { m_sPoliceRadioQueue.Add(SFX_NORTH); - m_sPoliceRadioQueue.Add(SFX_EAST); - } else { - rangeX = zone->maxx - zone->minx; - rangeY = zone->maxy - zone->miny; - halfX = 0.5f * rangeX + zone->minx; - halfY = 0.5f * rangeY + zone->miny; - quarterX = 0.25f * rangeX; - quarterY = 0.25f * rangeY; - - if (m_aCrimes[i].position.y > halfY + quarterY) { - m_sPoliceRadioQueue.Add(SFX_NORTH); - processed = TRUE; - } else if (m_aCrimes[i].position.y < halfY - quarterY) { - m_sPoliceRadioQueue.Add(SFX_SOUTH); - processed = TRUE; - } - - if (m_aCrimes[i].position.x > halfX + quarterX) - m_sPoliceRadioQueue.Add(SFX_EAST); - else if (m_aCrimes[i].position.x < halfX - quarterX) - m_sPoliceRadioQueue.Add(SFX_WEST); - else if (!processed) - m_sPoliceRadioQueue.Add(SFX_CENTRAL); - - m_sPoliceRadioQueue.Add(sampleIndex); - m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); - m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES); + processed = TRUE; + } else if (m_aCrimes[i].position.y < halfY - quarterY) { + m_sPoliceRadioQueue.Add(SFX_SOUTH); + processed = TRUE; } + + if (m_aCrimes[i].position.x > halfX + quarterX) + m_sPoliceRadioQueue.Add(SFX_EAST); + else if (m_aCrimes[i].position.x < halfX - quarterX) + m_sPoliceRadioQueue.Add(SFX_WEST); + else if (!processed) + m_sPoliceRadioQueue.Add(SFX_CENTRAL); + + m_sPoliceRadioQueue.Add(sampleIndex); + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); + m_sPoliceRadioQueue.Add(NO_SAMPLE); break; } } @@ -376,161 +357,105 @@ cAudioManager::SetupSuspectLastSeenReport() int32 color_post_modifier; const int32 gCarColourTable[][3] = { - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLACK, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_WHITE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, + {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}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, -#else - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, -#endif - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, -#else - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, -#endif - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, -#else - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, -#endif - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, -#else - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, -#endif - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, -#else - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, -#endif - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_BLUE}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, -#else - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, -#endif - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_GREY}, -#else - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, -#endif - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, -#else - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, -#endif - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, -#ifdef FIX_BUGS - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, -#else - {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES}, -#endif - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}, - {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES} + {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} }; if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) { - veh = FindPlayerVehicle(); + veh = FindVehicleOfPlayer(); if (veh != nil) { if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue > 9) { color1 = veh->m_currentColour1; @@ -541,136 +466,189 @@ cAudioManager::SetupSuspectLastSeenReport() color_pre_modifier = gCarColourTable[color1][0]; color_post_modifier = gCarColourTable[color1][2]; switch (veh->GetModelIndex()) { -#ifdef FIX_BUGS - case MI_COLUMB: - main_color = SFX_POLICE_RADIO_BLUE; - color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES; -#endif case MI_LANDSTAL: - case MI_BLISTA: sample = SFX_POLICE_RADIO_CRUISER; break; -#ifdef FIX_BUGS - case MI_YARDIE: - color_pre_modifier = TOTAL_AUDIO_SAMPLES; - main_color = SFX_POLICE_RADIO_RED; - color_post_modifier = SFX_POLICE_RADIO_YELLOW; - sample = SFX_POLICE_RADIO_CONVERTIBLE; break; - case MI_DIABLOS: - main_color = SFX_POLICE_RADIO_BLACK; -#endif + case MI_PATRIOT: + case MI_RANCHER: + case MI_FBIRANCH: + case MI_SANDKING: + sample = SFX_POLICE_RADIO_OFFROAD; + break; case MI_IDAHO: - case MI_STALLION: sample = SFX_POLICE_RADIO_CONVERTIBLE; break; -#ifdef FIX_BUGS - case MI_YAKUZA: - color_pre_modifier = TOTAL_AUDIO_SAMPLES; - main_color = SFX_POLICE_RADIO_SILVER; - color_post_modifier = SFX_POLICE_RADIO_RED; -#endif + case MI_MANANA: + case MI_ESPERANT: + case MI_CUBAN: + case MI_STALLION: + case MI_SABRE: + case MI_SABRETUR: + case MI_VIRGO: + case MI_BLISTAC: + sample = SFX_POLICE_RADIO_TUDOOR; + break; case MI_STINGER: case MI_INFERNUS: case MI_CHEETAH: - case MI_BANSHEE: sample = SFX_POLICE_RADIO_SPORTS_CAR; break; -#ifdef FIX_BUGS - case MI_MAFIA: - color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES; - main_color = SFX_POLICE_RADIO_GREY; - case MI_KURUMA: -#endif + case MI_BANSHEE: + case MI_PHEONIX: + case MI_COMET: + case MI_DELUXO: + case MI_HOTRING: + sample = SFX_POLICE_RADIO_SPORTS_CAR; + break; + case MI_LINERUN: + sample = SFX_POLICE_RADIO_RIG; + break; case MI_PEREN: + case MI_REGINA: + sample = SFX_POLICE_RADIO_STATION_WAGON; + break; case MI_SENTINEL: - case MI_FBICAR: sample = SFX_POLICE_RADIO_SALOON; break; - case MI_PATRIOT: - case MI_BOBCAT: sample = SFX_POLICE_RADIO_PICKUP; break; - case MI_FIRETRUCK: sample = SFX_POLICE_RADIO_FIRE_TRUCK; break; -#ifdef FIX_BUGS - case MI_LINERUN: - case MI_FLATBED: -#endif + case MI_FBICAR: + case MI_WASHING: + case MI_SENTXS: + case MI_ADMIRAL: + case MI_GLENDALE: + case MI_OCEANIC: + case MI_HERMES: + case MI_GREENWOO: + sample = SFX_POLICE_RADIO_SEDAN; + break; + case MI_RIO: + sample = SFX_POLICE_RADIO_CRUISER; + break; + case MI_FIRETRUCK: + sample = SFX_POLICE_RADIO_FIRE_TRUCK; + break; case MI_TRASH: - case MI_BARRACKS: sample = SFX_POLICE_RADIO_TRUCK; break; - case MI_STRETCH: sample = SFX_POLICE_RADIO_LIMO; break; -#ifdef FIX_BUGS - case MI_CORPSE: -#endif - case MI_MANANA: - case MI_ESPERANT: sample = SFX_POLICE_RADIO_2_DOOR; break; -#ifdef FIX_BUGS - case MI_HOODS: - color_pre_modifier = TOTAL_AUDIO_SAMPLES; - main_color = SFX_POLICE_RADIO_BLUE; - color_post_modifier = SFX_POLICE_RADIO_GREEN; - case MI_BELLYUP: - case MI_YANKEE: - case MI_TOYZ: - case MI_MRWONGS: - case MI_PANLANT: -#endif + sample = SFX_POLICE_RADIO_GARBAGE_TRUCK; + break; + case MI_STRETCH: + case MI_LOVEFIST: + sample = SFX_POLICE_RADIO_STRETCH; + break; + case MI_VOODOO: + sample = SFX_POLICE_RADIO_LOWRIDER; + break; case MI_PONY: - case MI_MULE: case MI_MOONBEAM: - case MI_ENFORCER: case MI_SECURICA: - case MI_RUMPO: sample = SFX_POLICE_RADIO_VAN; break; - case MI_AMBULAN: sample = SFX_POLICE_RADIO_AMBULANCE; break; + case MI_RUMPO: + case MI_GANGBUR: + case MI_YANKEE: + case MI_TOPFUN: + case MI_BURRITO: + case MI_SPAND: + sample = SFX_POLICE_RADIO_VAN; + break; + case MI_MULE: + case MI_BARRACKS: + case MI_PACKER: + case MI_FLATBED: + sample = SFX_POLICE_RADIO_TRUCK; + break; + case MI_AMBULAN: + sample = SFX_POLICE_RADIO_AMBULANCE; + break; case MI_TAXI: case MI_CABBIE: - case MI_BORGNINE: sample = SFX_POLICE_RADIO_TAXI; break; + case MI_ZEBRA: + case MI_KAUFMAN: + sample = SFX_POLICE_RADIO_TAXI; + break; + case MI_BOBCAT: + case MI_WALTON: + sample = SFX_POLICE_RADIO_PICKUP; + break; case MI_MRWHOOP: sample = SFX_POLICE_RADIO_ICE_CREAM_VAN; break; - case MI_BFINJECT: sample = SFX_POLICE_RADIO_BUGGY; break; - case MI_POLICE: sample = SFX_POLICE_RADIO_POLICE_CAR; break; -#ifdef FIX_BUGS + case MI_BFINJECT: + sample = SFX_POLICE_RADIO_BUGGY; + break; + case MI_HUNTER: + case MI_CHOPPER: + case MI_SEASPAR: + case MI_SPARROW: + case MI_MAVERICK: + case MI_VCNMAV: + case MI_POLMAV: + sample = SFX_POLICE_RADIO_HELICOPTER; + break; + case MI_POLICE: + sample = SFX_POLICE_RADIO_POLICE_CAR; + break; + case MI_ENFORCER: + sample = SFX_POLICE_RADIO_SWAT_VAN; + break; + case MI_PREDATOR: + case MI_SQUALO: case MI_SPEEDER: - case MI_REEFER: - case MI_GHOST: -#endif - case MI_PREDATOR: sample = SFX_POLICE_RADIO_BOAT; break; + sample = SFX_POLICE_RADIO_SPEEDBOAT; + break; case MI_BUS: - case MI_COACH: sample = SFX_POLICE_RADIO_BUS; break; + sample = SFX_POLICE_RADIO_BUS; + break; case MI_RHINO: sample = SFX_POLICE_RADIO_TANK; - main_color = TOTAL_AUDIO_SAMPLES; - color_post_modifier = TOTAL_AUDIO_SAMPLES; break; - case MI_TRAIN: - sample = SFX_POLICE_RADIO_SUBWAY_CAR; - main_color = TOTAL_AUDIO_SAMPLES; - color_post_modifier = TOTAL_AUDIO_SAMPLES; - + case MI_ANGEL: + case MI_PCJ600: + case MI_FREEWAY: + case MI_SANCHEZ: + sample = SFX_POLICE_RADIO_MOTOBIKE; + break; + case MI_COACH: + sample = SFX_POLICE_RADIO_COACH; + break; + case MI_ROMERO: + sample = SFX_POLICE_RADIO_HEARSE; + break; + case MI_PIZZABOY: + case MI_FAGGIO: + sample = SFX_POLICE_RADIO_MOPED; + break; + case MI_DEADDODO: + case MI_SKIMMER: + sample = SFX_POLICE_RADIO_PLANE; + break; + case MI_REEFER: + case MI_TROPIC: + case MI_COASTG: + case MI_MARQUIS: + case MI_JETMAX: + sample = SFX_POLICE_RADIO_BOAT; + break; + case MI_CADDY: + sample = SFX_POLICE_RADIO_GOLF_CART; + break; + case MI_DINGHY: + sample = SFX_POLICE_RADIO_DINGHY; break; default: - debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex()); + //debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex()); return; } - m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT); if (m_anRandomTable[3] % 2) m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN); -#ifdef FIX_BUGS - if (main_color == SFX_POLICE_RADIO_ORANGE && color_pre_modifier == TOTAL_AUDIO_SAMPLES) -#else - if (main_color == SFX_POLICE_RADIO_ORANGE) -#endif - m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_AN); - else - m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_A); - if (color_pre_modifier != TOTAL_AUDIO_SAMPLES) + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_A); + if (color_pre_modifier != NO_SAMPLE) m_sPoliceRadioQueue.Add(color_pre_modifier); - if (main_color != TOTAL_AUDIO_SAMPLES) + if (main_color != NO_SAMPLE) m_sPoliceRadioQueue.Add(main_color); - if (color_post_modifier != TOTAL_AUDIO_SAMPLES) + if (color_post_modifier != NO_SAMPLE) m_sPoliceRadioQueue.Add(color_post_modifier); m_sPoliceRadioQueue.Add(sample); - m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); - m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES); + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); + m_sPoliceRadioQueue.Add(NO_SAMPLE); } } } else if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue > 4) { m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT); m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_ON_FOOT); - m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); - m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES); + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); + m_sPoliceRadioQueue.Add(NO_SAMPLE); } } } @@ -688,9 +666,8 @@ cAudioManager::ReportCrime(eCrimeType type, const CVector &pos) m_aCrimes[i].timer = 0; return; } - } else { + } else lastCrime = i; - } } if (lastCrime < ARRAY_SIZE(m_aCrimes)) { @@ -714,7 +691,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z) float quarterX; float quarterY; int32 sample; - bool8 processed = false; + bool8 processed = FALSE; CVector vec = CVector(x, y, z); if (!m_bIsInitialised) return; @@ -726,41 +703,34 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z) for (int i = 0; i < NUMAUDIOZONES; i++) { if (strcmp(zone->name, ZoneSfx[i].m_aName) == 0) { sample = ZoneSfx[i].m_nSampleIndex; - m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT); m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN); m_sPoliceRadioQueue.Add(SFX_IN); - if (sample == SFX_POLICE_RADIO_SHORESIDE_VALE && - (strcmp(zone->name, SubZo2Label) == 0 || - strcmp(zone->name, SubZo3Label) == 0)) { + rangeX = zone->maxx - zone->minx; + rangeY = zone->maxy - zone->miny; + halfX = 0.5f * rangeX + zone->minx; + halfY = 0.5f * rangeY + zone->miny; + quarterX = 0.25f * rangeX; + quarterY = 0.25f * rangeY; + + if (vec.y > halfY + quarterY) { m_sPoliceRadioQueue.Add(SFX_NORTH); - m_sPoliceRadioQueue.Add(SFX_EAST); - } else { - rangeX = zone->maxx - zone->minx; - rangeY = zone->maxy - zone->miny; - halfX = 0.5f * rangeX + zone->minx; - halfY = 0.5f * rangeY + zone->miny; - quarterX = 0.25f * rangeX; - quarterY = 0.25f * rangeY; - - if (vec.y > halfY + quarterY) { - m_sPoliceRadioQueue.Add(SFX_NORTH); - processed = TRUE; - } else if (vec.y < halfY - quarterY) { - m_sPoliceRadioQueue.Add(SFX_SOUTH); - processed = TRUE; - } - - if (vec.x > halfX + quarterX) - m_sPoliceRadioQueue.Add(SFX_EAST); - else if (vec.x < halfX - quarterX) - m_sPoliceRadioQueue.Add(SFX_WEST); - else if (!processed) - m_sPoliceRadioQueue.Add(SFX_CENTRAL); + processed = TRUE; + } else if (vec.y < halfY - quarterY) { + m_sPoliceRadioQueue.Add(SFX_SOUTH); + processed = TRUE; } + + if (vec.x > halfX + quarterX) + m_sPoliceRadioQueue.Add(SFX_EAST); + else if (vec.x < halfX - quarterX) + m_sPoliceRadioQueue.Add(SFX_WEST); + else if (!processed) + m_sPoliceRadioQueue.Add(SFX_CENTRAL); m_sPoliceRadioQueue.Add(sample); - m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1); - m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES); + m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); + m_sPoliceRadioQueue.Add(NO_SAMPLE); gSpecialSuspectLastSeenReport = TRUE; break; } @@ -774,7 +744,7 @@ cAudioManager::AgeCrimes() { for (uint8 i = 0; i < ARRAY_SIZE(m_aCrimes); i++) { if (m_aCrimes[i].type != CRIME_NONE) { - if (++m_aCrimes[i].timer > 1500) m_aCrimes[i].type = CRIME_NONE; + if (++m_aCrimes[i].timer > 1200) m_aCrimes[i].type = CRIME_NONE; } } } |