diff options
Diffstat (limited to 'src')
145 files changed, 15209 insertions, 4853 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c8ab281..28090d7e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -50,6 +50,7 @@ if(LIBRW_PLATFORM_D3D9) endif() target_compile_definitions(${EXECUTABLE} PRIVATE CMAKE_BUILD) +target_compile_definitions(${EXECUTABLE} PRIVATE USE_OUR_VERSIONING) if(${PROJECT}_AUDIO STREQUAL "OAL") find_package(OpenAL REQUIRED) diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp index 250cd18e..decb73e5 100644 --- a/src/audio/AudioCollision.cpp +++ b/src/audio/AudioCollision.cpp @@ -158,7 +158,7 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio void cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter) { - bool distCalculated = false; + bool8 distCalculated = FALSE; if(col.m_fIntensity2 > 0.0016f) { uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col); if(emittingVol) { @@ -168,20 +168,17 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun m_sQueueSample.m_nCounter = counter; m_sQueueSample.m_vecPos = col.m_vecPosition; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 7; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = - SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = - SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -311,17 +308,16 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col) if(counter >= 255) counter = 28; m_sQueueSample.m_vecPos = col.m_vecPosition; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 11; m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -332,13 +328,12 @@ void cAudioManager::ServiceCollisions() { int i, j; - bool abRepeatedCollision1[NUMAUDIOCOLLISIONS]; - bool abRepeatedCollision2[NUMAUDIOCOLLISIONS]; + bool8 abRepeatedCollision1[NUMAUDIOCOLLISIONS]; + bool8 abRepeatedCollision2[NUMAUDIOCOLLISIONS]; m_sQueueSample.m_nEntityIndex = m_nCollisionEntity; - for (int i = 0; i < NUMAUDIOCOLLISIONS; i++) - abRepeatedCollision1[i] = abRepeatedCollision2[i] = false; + for (int i = 0; i < NUMAUDIOCOLLISIONS; i++) abRepeatedCollision1[i] = abRepeatedCollision2[i] = FALSE; for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) { for (j = 0; j < NUMAUDIOCOLLISIONS; j++) { @@ -348,8 +343,8 @@ cAudioManager::ServiceCollisions() && (m_sCollisionManager.m_asCollisions1[index].m_bSurface1 == m_sCollisionManager.m_asCollisions2[j].m_bSurface1) && (m_sCollisionManager.m_asCollisions1[index].m_bSurface2 == m_sCollisionManager.m_asCollisions2[j].m_bSurface2) ) { - abRepeatedCollision1[index] = true; - abRepeatedCollision2[j] = true; + abRepeatedCollision1[index] = TRUE; + abRepeatedCollision2[j] = TRUE; m_sCollisionManager.m_asCollisions1[index].m_nBaseVolume = ++m_sCollisionManager.m_asCollisions2[j].m_nBaseVolume; SetUpLoopingCollisionSound(m_sCollisionManager.m_asCollisions1[index], j); break; diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 7469f579..5ee5ddd1 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -43,9 +43,9 @@ #include "Script.h" #include "Wanted.h" -const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples); -const int policeChannel = channels + 1; -const int allChannels = channels + 2; +#ifndef GTA_PS2 +#define CHANNEL_PLAYER_VEHICLE_ENGINE m_nActiveSamples +#endif enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED }; enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED }; @@ -123,62 +123,62 @@ cAudioManager::PostInitialiseGameSpecificSetup() { m_nFireAudioEntity = CreateEntity(AUDIOTYPE_FIRE, &gFireManager); if (m_nFireAudioEntity >= 0) - SetEntityStatus(m_nFireAudioEntity, true); + SetEntityStatus(m_nFireAudioEntity, TRUE); m_nCollisionEntity = CreateEntity(AUDIOTYPE_COLLISION, (void *)1); if (m_nCollisionEntity >= 0) - SetEntityStatus(m_nCollisionEntity, true); + SetEntityStatus(m_nCollisionEntity, TRUE); m_nFrontEndEntity = CreateEntity(AUDIOTYPE_FRONTEND, (void *)1); if (m_nFrontEndEntity >= 0) - SetEntityStatus(m_nFrontEndEntity, true); + SetEntityStatus(m_nFrontEndEntity, TRUE); m_nProjectileEntity = CreateEntity(AUDIOTYPE_PROJECTILE, (void *)1); if (m_nProjectileEntity >= 0) - SetEntityStatus(m_nProjectileEntity, true); + SetEntityStatus(m_nProjectileEntity, TRUE); m_nWaterCannonEntity = CreateEntity(AUDIOTYPE_WATERCANNON, (void *)1); if (m_nWaterCannonEntity >= 0) - SetEntityStatus(m_nWaterCannonEntity, true); + SetEntityStatus(m_nWaterCannonEntity, TRUE); m_nPoliceChannelEntity = CreateEntity(AUDIOTYPE_POLICERADIO, (void *)1); if (m_nPoliceChannelEntity >= 0) - SetEntityStatus(m_nPoliceChannelEntity, true); + SetEntityStatus(m_nPoliceChannelEntity, TRUE); #ifdef GTA_BRIDGE m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void*)1); if (m_nBridgeEntity >= 0) - SetEntityStatus(m_nBridgeEntity, true); + SetEntityStatus(m_nBridgeEntity, TRUE); #endif // GTA_BRIDGE m_nEscalatorEntity = CreateEntity(AUDIOTYPE_ESCALATOR, (void*)1); if (m_nEscalatorEntity >= 0) - SetEntityStatus(m_nEscalatorEntity, true); + SetEntityStatus(m_nEscalatorEntity, TRUE); m_nExtraSoundsEntity = CreateEntity(AUDIOTYPE_EXTRA_SOUNDS, (void*)1); if (m_nExtraSoundsEntity >= 0) - SetEntityStatus(m_nExtraSoundsEntity, true); + SetEntityStatus(m_nExtraSoundsEntity, TRUE); m_sMissionAudio.m_nSampleIndex[0] = NO_SAMPLE; m_sMissionAudio.m_nLoadingStatus[0] = LOADING_STATUS_NOT_LOADED; m_sMissionAudio.m_nPlayStatus[0] = PLAY_STATUS_STOPPED; - m_sMissionAudio.m_bIsPlaying[0] = false; - m_sMissionAudio.m_bIsPlayed[0] = false; - m_sMissionAudio.m_bPredefinedProperties[0] = true; + m_sMissionAudio.m_bIsPlaying[0] = FALSE; + m_sMissionAudio.m_bIsPlayed[0] = FALSE; + m_sMissionAudio.m_bPredefinedProperties[0] = TRUE; m_sMissionAudio.m_nMissionAudioCounter[0] = 0; - m_sMissionAudio.m_bIsMobile[0] = false; + m_sMissionAudio.m_bIsMobile[0] = FALSE; field_5538 = 127; m_sMissionAudio.m_nSampleIndex[1] = NO_SAMPLE; m_sMissionAudio.m_nLoadingStatus[1] = LOADING_STATUS_NOT_LOADED; m_sMissionAudio.m_nPlayStatus[1] = PLAY_STATUS_STOPPED; - m_sMissionAudio.m_bIsPlaying[1] = false; - m_sMissionAudio.m_bIsPlayed[1] = false; - m_sMissionAudio.m_bPredefinedProperties[1] = true; + m_sMissionAudio.m_bIsPlaying[1] = FALSE; + m_sMissionAudio.m_bIsPlayed[1] = FALSE; + m_sMissionAudio.m_bPredefinedProperties[1] = TRUE; m_sMissionAudio.m_nMissionAudioCounter[1] = 0; - m_sMissionAudio.m_bIsMobile[1] = false; + m_sMissionAudio.m_bIsMobile[1] = FALSE; field_5538 = 127; ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds()); - m_bIsPlayerShutUp = false; + m_bIsPlayerShutUp = FALSE; m_nPlayerMood = PLAYER_MOOD_CALM; m_nPlayerMoodTimer = 0; } @@ -246,23 +246,25 @@ cAudioManager::ResetAudioLogicTimers(uint32 timer) } ClearMissionAudio(0); ClearMissionAudio(1); - SampleManager.StopChannel(policeChannel); + SampleManager.StopChannel(CHANNEL_POLICE_RADIO); } void cAudioManager::ProcessReverb() const { #ifdef FIX_BUGS - const uint32 numChannels = channels; + const uint32 numChannels = NUM_CHANNELS_GENERIC; #else - const uint32 numChannels = 28; + const uint32 numChannels = NUM_CHANNELS_GENERIC+1; #endif if (SampleManager.UpdateReverb() && m_bDynamicAcousticModelingStatus) { +#ifndef GTA_PS2 for (uint32 i = 0; i < numChannels; i++) { if (m_asActiveSamples[i].m_bReverbFlag) - SampleManager.SetChannelReverbFlag(i, true); + SampleManager.SetChannelReverbFlag(i, TRUE); } +#endif } } @@ -274,11 +276,11 @@ cAudioManager::GetDistanceSquared(const CVector &v) const } void -cAudioManager::CalculateDistance(bool &distCalculated, float dist) +cAudioManager::CalculateDistance(bool8 &distCalculated, float dist) { if (!distCalculated) { m_sQueueSample.m_fDistance = Sqrt(dist); - distCalculated = true; + distCalculated = TRUE; } } @@ -347,7 +349,7 @@ cAudioManager::ProcessSpecial() if (playerPed->m_audioEntityId >= 0 && m_asAudioEntities[playerPed->m_audioEntityId].m_bIsUsed) { if (playerPed->EnteringCar()) { if(!playerPed->bInVehicle && CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle == nil) - SampleManager.StopChannel(m_nActiveSamples); + SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); } } } @@ -362,56 +364,56 @@ cAudioManager::ProcessEntity(int32 id) switch (m_asAudioEntities[id].m_nType) { case AUDIOTYPE_PHYSICAL: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessPhysical(id); } break; case AUDIOTYPE_EXPLOSION: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessExplosions(id); } break; case AUDIOTYPE_FIRE: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessFires(id); } break; case AUDIOTYPE_WEATHER: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; if(CGame::currArea == AREA_MAIN_MAP || CGame::currArea == AREA_EVERYWHERE) ProcessWeather(id); } break; /* case AUDIOTYPE_CRANE: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessCrane(); } break;*/ case AUDIOTYPE_SCRIPTOBJECT: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessScriptObject(id); } break; #ifdef GTA_BRIDGE case AUDIOTYPE_BRIDGE: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessBridge(); } break; #endif case AUDIOTYPE_FRONTEND: - m_sQueueSample.m_bReverbFlag = false; + m_sQueueSample.m_bReverbFlag = FALSE; ProcessFrontEnd(); break; case AUDIOTYPE_PROJECTILE: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessProjectiles(); } break; @@ -421,25 +423,25 @@ cAudioManager::ProcessEntity(int32 id) break; case AUDIOTYPE_FIREHYDRANT: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessFireHydrant(); } break; case AUDIOTYPE_WATERCANNON: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessWaterCannon(id); } break; case AUDIOTYPE_ESCALATOR: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessEscalators(); } break; case AUDIOTYPE_EXTRA_SOUNDS: if (!m_nUserPause) { - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; ProcessExtraSounds(); } break; @@ -719,25 +721,25 @@ const tVehicleSampleData aVehicleSettings[MAX_CARS] = { -bool bPlayerJustEnteredCar; - -const bool hornPatternsArray[8][44] = { - {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, - false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false}, - {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false}, - {false, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, true, true, true, true, true, false, - false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false}, - {false, false, true, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true, - true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false}, - {false, false, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, - {false, false, true, true, true, false, false, false, true, true, true, false, false, false, false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, - {false, false, true, true, true, true, false, false, false, false, true, true, true, false, false, true, true, true, false, false, true, true, - true, true, true, true, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, false, false}, - {false, false, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true, true, - false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false}, +bool8 bPlayerJustEnteredCar; + +const bool8 hornPatternsArray[8][44] = { + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, + FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, + FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, + TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, + TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE}, }; void cAudioManager::ProcessVehicle(CVehicle* veh) @@ -756,7 +758,7 @@ void cAudioManager::ProcessVehicle(CVehicle* veh) || CGame::currArea == AREA_MALL || CGame::currArea == AREA_MAIN_MAP) { m_sQueueSample.m_vecPos = veh->GetPosition(); - params.m_bDistanceCalculated = false; + params.m_bDistanceCalculated = FALSE; params.m_pVehicle = veh; params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); params.m_pTransmission = veh->pHandling != nil ? &veh->pHandling->Transmission : nil; @@ -882,24 +884,23 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params) veh->m_bRainSamplesCounter = 68; m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_CAR_RAIN_1; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 9; m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 4000 + 28000; m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bReverbFlag = false; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bReverbFlag = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } } -bool +bool8 cAudioManager::ProcessReverseGear(cVehicleParams& params) { const int reverseGearIntensity = 30; @@ -909,10 +910,10 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params) uint8 emittingVolume; if (params.m_fDistance >= SQR(reverseGearIntensity)) - return false; + return FALSE; automobile = (CAutomobile*)params.m_pVehicle; if (automobile->m_modelIndex == MI_CADDY) - return true; + return TRUE; if (automobile->bEngineOn && (automobile->m_fGasPedal < 0.0f || automobile->m_nCurrentGear == 0)) { CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); if (automobile->m_nDriveWheelsOnGround != 0) { @@ -935,23 +936,22 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params) m_sQueueSample.m_nSampleIndex = SFX_REVERSE_GEAR; } m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nFrequency = (6000.0f * modificator) + 7000; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVolume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_fSoundIntensity = reverseGearIntensity; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } - return true; + return TRUE; } void @@ -966,14 +966,14 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params) int16 acceletateState; int16 brakeState; uint8 volume; - bool isPlayerVeh; - bool vehSlowdown; + bool8 isPlayerVeh; + bool8 vehSlowdown; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) return; if (FindPlayerVehicle() == params.m_pVehicle) - isPlayerVeh = true; + isPlayerVeh = TRUE; else #ifdef FIX_BUGS isPlayerVeh = CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle == params.m_pVehicle; @@ -989,8 +989,8 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params) freq = 25000; } if (isPlayerVeh) { - volume = clamp2(volume, prevVolume, 7); - freq = clamp2(freq, prevFreq, 800); + volume = Clamp2(volume, prevVolume, 7); + freq = Clamp2(freq, prevFreq, 800); } if (volume > 0) { CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); @@ -999,19 +999,18 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params) m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nSampleIndex = SFX_RC_REV; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = volume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_RC_REV); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_RC_REV); + SET_LOOP_OFFSETS(SFX_RC_REV) m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -1030,17 +1029,17 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params) if (acceletateState < brakeState) acceletateState = brakeState; if (acceletateState <= 0) { - vehSlowdown = true; + vehSlowdown = TRUE; volume = 127; freq = 18000; } else { - vehSlowdown = false; + vehSlowdown = FALSE; volume = Min(127, (127 * acceletateState / 255) * 3.0f * Abs(params.m_fVelocityChange)); freq = Min(22000, (8000 * acceletateState / 255 + 14000) * 3.0f * Abs(params.m_fVelocityChange)); } if (isPlayerVeh && !vehSlowdown) { - volume = clamp2(volume, prevVolume, 7); - freq = clamp2(freq, prevFreq, 800); + volume = Clamp2(volume, prevVolume, 7); + freq = Clamp2(freq, prevFreq, 800); } if (!vehSlowdown) #ifdef THIS_IS_STUPID @@ -1064,18 +1063,17 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params) m_sQueueSample.m_nReleasingVolumeDivider = 4; } m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = volume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -1096,7 +1094,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params) static uint32 prevFreq = 22050; uint32 freq; - bool isPlayerVeh; + bool8 isPlayerVeh; int16 acceletateState; int16 brakeState; @@ -1104,7 +1102,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params) return; if (FindPlayerVehicle() == params.m_pVehicle) - isPlayerVeh = true; + isPlayerVeh = TRUE; else #ifdef FIX_BUGS isPlayerVeh = CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle == params.m_pVehicle; @@ -1120,33 +1118,32 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params) } if (acceletateState < brakeState) acceletateState = brakeState; - freq = clamp2(5 * acceletateState + 22050, prevFreq, 30); + freq = Clamp2(5 * acceletateState + 22050, prevFreq, 30); CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); m_sQueueSample.m_nVolume = ComputeVolume(70, SOUND_INTENSITY, m_sQueueSample.m_fDistance); if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nSampleIndex = SFX_CAR_RC_HELI; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = 70; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_RC_HELI); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_RC_HELI); + SET_LOOP_OFFSETS(SFX_CAR_RC_HELI) m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } if (isPlayerVeh) prevFreq = freq; } -bool +bool8 cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params) { const float SOUND_INTENSITY = 95.0f; @@ -1159,10 +1156,10 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params) uint8 wheelsOnGround; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; switch (params.m_VehicleType) { case VEHICLE_TYPE_CAR: wheelsOnGround = ((CAutomobile*)params.m_pVehicle)->m_nWheelsOnGround; @@ -1175,7 +1172,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params) break; } if (params.m_pTransmission == nil || wheelsOnGround == 0) - return true; + return TRUE; velocity = Abs(params.m_fVelocityChange); if (velocity > 0.0f) { @@ -1185,7 +1182,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params) if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; if (params.m_pVehicle->m_nSurfaceTouched == SURFACE_WATER) { m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP; @@ -1199,22 +1196,21 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params) m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } - return true; + return TRUE; } -bool +bool8 cAudioManager::ProcessWetRoadNoise(cVehicleParams& params) { const float SOUND_INTENSITY = 30.0f; @@ -1227,7 +1223,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params) uint8 wheelsOnGround; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; switch (params.m_VehicleType) { case VEHICLE_TYPE_CAR: wheelsOnGround = ((CAutomobile*)params.m_pVehicle)->m_nWheelsOnGround; @@ -1240,7 +1236,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params) break; } if (params.m_pTransmission == nil || wheelsOnGround == 0) - return true; + return TRUE; velocity = Abs(params.m_fVelocityChange); if (velocity > 0.0f) { @@ -1252,26 +1248,25 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params) m_sQueueSample.m_nCounter = 1; m_sQueueSample.m_nSampleIndex = SFX_ROAD_NOISE; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; multiplier = (m_sQueueSample.m_fDistance / SOUND_INTENSITY) * 0.5f; freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE); m_sQueueSample.m_nFrequency = freq + freq * multiplier; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } - return true; + return TRUE; } void @@ -1296,18 +1291,18 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params) float relativeChange; float modificator; float traction; - bool isMoped; - bool caddyBool; + bool8 isMoped; + bool8 caddyBool; - isMoped = false; - caddyBool = false; + isMoped = FALSE; + caddyBool = FALSE; traction = 0.0f; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) return; playerVeh = FindPlayerVehicle(); veh = params.m_pVehicle; if (playerVeh == veh && veh->GetStatus() == STATUS_WRECKED) { - SampleManager.StopChannel(m_nActiveSamples); + SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); return; } if (!veh->bEngineOn) @@ -1322,12 +1317,12 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params) switch (veh->m_modelIndex) { case MI_PIZZABOY: case MI_FAGGIO: - isMoped = true; + isMoped = TRUE; currentGear = transmission->nNumberOfGears; break; case MI_CADDY: currentGear = transmission->nNumberOfGears; - caddyBool = true; + caddyBool = TRUE; break; default: currentGear = veh->m_nCurrentGear; @@ -1354,7 +1349,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params) } if (wheelsOnGround != 0) { - if (!veh->bIsHandbrakeOn || isMoped && caddyBool) { //mb bug, bcs it's can't be true together + if (!veh->bIsHandbrakeOn || isMoped && caddyBool) { //mb bug, bcs it's can't be TRUE together if (veh->GetStatus() == STATUS_SIMPLE || isMoped || caddyBool) { traction = 0.0f; } else { @@ -1478,20 +1473,19 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params) m_sQueueSample.m_nFrequency = freq + 20 * m_sQueueSample.m_nBankIndex % 100; } m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_5 || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_5) m_sQueueSample.m_nFrequency /= 2; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 8; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -1517,7 +1511,7 @@ void cAudioManager::PlayerJustGotInCar() const { if (m_bIsInitialised) - bPlayerJustEnteredCar = true; + bPlayerJustEnteredCar = TRUE; } void @@ -1527,7 +1521,7 @@ cAudioManager::PlayerJustLeftCar(void) const } void -cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping) +cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping) { m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, 50.f, m_sQueueSample.m_fDistance); if (m_sQueueSample.m_nVolume != 0) { @@ -1538,7 +1532,7 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl #else m_sQueueSample.m_nBankIndex = SFX_BANK_0; #endif // GTA_PS2 - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nFrequency = freq; if (notLooping) { @@ -1548,13 +1542,12 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl m_sQueueSample.m_nLoopCount = 1; } m_sQueueSample.m_nEmittingVolume = emittingVolume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = 50.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -1569,19 +1562,18 @@ cAudioManager::ProcessCesna(cVehicleParams ¶ms) m_sQueueSample.m_nCounter = 52; m_sQueueSample.m_nSampleIndex = SFX_CESNA_IDLE; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nFrequency = 12500; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nReleasingVolumeDivider = 8; m_sQueueSample.m_nEmittingVolume = 80; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = 200.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } if(params.m_fDistance < SQR(90)) { @@ -1590,19 +1582,18 @@ cAudioManager::ProcessCesna(cVehicleParams ¶ms) m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nFrequency = 25000; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nReleasingVolumeDivider = 4; m_sQueueSample.m_nEmittingVolume = 80; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = 90.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -1639,41 +1630,41 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh float velocityChangeForAudio; float relativeVelocityChange; float time; - bool channelUsed; - bool lostTraction; - bool noGearBox; - bool stuckInSand; - bool processedAccelSampleStopped; - bool isMoped; + bool8 channelUsed; + bool8 lostTraction; + bool8 noGearBox; + bool8 stuckInSand; + bool8 processedAccelSampleStopped; + bool8 isMoped; static uint32 gearSoundStartTime = CTimer::GetTimeInMilliseconds(); static int32 nCruising = 0; static int16 LastAccel = 0; static uint8 CurrentPretendGear = 1; - static bool bLostTractionLastFrame = false; - static bool bHandbrakeOnLastFrame = false; - static bool bAccelSampleStopped = true; + static bool8 bLostTractionLastFrame = FALSE; + static bool8 bHandbrakeOnLastFrame = FALSE; + static bool8 bAccelSampleStopped = TRUE; - lostTraction = false; + lostTraction = FALSE; isMoped = params.m_pVehicle->m_modelIndex == MI_PIZZABOY || params.m_pVehicle->m_modelIndex == MI_FAGGIO; - processedAccelSampleStopped = false; + processedAccelSampleStopped = FALSE; if (bPlayerJustEnteredCar) { - bAccelSampleStopped = true; - bPlayerJustEnteredCar = false; + bAccelSampleStopped = TRUE; + bPlayerJustEnteredCar = FALSE; nCruising = 0; LastAccel = 0; - bLostTractionLastFrame = false; + bLostTractionLastFrame = FALSE; CurrentPretendGear = 1; - bHandbrakeOnLastFrame = false; + bHandbrakeOnLastFrame = FALSE; } if (CReplay::IsPlayingBack()) { - accelerateState = (255.0f * clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f)); - brakeState = (255.0f * clamp(params.m_pVehicle->m_fBrakePedal, 0.0f, 1.0f)); + accelerateState = (255.0f * Clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f)); + brakeState = (255.0f * Clamp(params.m_pVehicle->m_fBrakePedal, 0.0f, 1.0f)); } else { accelerateState = Pads[0].GetAccelerate(); brakeState = Pads[0].GetBrake(); } - channelUsed = SampleManager.GetChannelUsedFlag(m_nActiveSamples); + channelUsed = SampleManager.GetChannelUsedFlag(CHANNEL_PLAYER_VEHICLE_ENGINE); if (isMoped) { CurrentPretendGear = params.m_pTransmission->nNumberOfGears; currentGear = CurrentPretendGear; @@ -1720,26 +1711,26 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh ++wheelInUseCounter; } if (wheelInUseCounter > 2) - lostTraction = true; + lostTraction = TRUE; } break; case 'F': if (params.m_VehicleType == VEHICLE_TYPE_BIKE) { if (wheelState[BIKEWHEEL_FRONT] != WHEEL_STATE_NORMAL) - lostTraction = true; + lostTraction = TRUE; } else { if ((wheelState[CARWHEEL_FRONT_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_FRONT_RIGHT] != WHEEL_STATE_NORMAL) && (wheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL)) - lostTraction = true; + lostTraction = TRUE; } break; case 'R': if (params.m_VehicleType == VEHICLE_TYPE_BIKE) { if (wheelState[BIKEWHEEL_REAR] != WHEEL_STATE_NORMAL) - lostTraction = true; + lostTraction = TRUE; } else { if (wheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL) - lostTraction = true; + lostTraction = TRUE; } break; default: @@ -1761,7 +1752,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh gearSoundLength = 0; engineSoundType = aVehicleSettings[params.m_nIndex].m_nBank; soundOffset = 3 * (engineSoundType - CAR_SFX_BANKS_OFFSET); - noGearBox = false; + noGearBox = FALSE; switch (engineSoundType) { case SFX_BANK_PONTIAC: gearSoundLength = 2526; @@ -1806,7 +1797,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh gearSoundLength = 2410; break; default: - noGearBox = true; + noGearBox = TRUE; break; } if (!channelUsed || nCruising || noGearBox) { @@ -1814,12 +1805,12 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh } else { gearSoundLength -= 1000; if (CTimer::GetTimeInMilliseconds() - gearSoundStartTime > gearSoundLength) { - channelUsed = false; + channelUsed = FALSE; gearSoundStartTime = CTimer::GetTimeInMilliseconds(); } } relativeVelocityChange = 2.0f * params.m_fVelocityChange / params.m_pTransmission->fMaxVelocity; - accelerationMultipler = clamp(relativeVelocityChange, 0.0f, 1.0f); + accelerationMultipler = Clamp(relativeVelocityChange, 0.0f, 1.0f); gasPedalAudio = accelerationMultipler; switch (engineSoundType) { case SFX_BANK_MOPED: @@ -1837,8 +1828,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh if (accelerateState <= 0) { if (params.m_fVelocityChange < -0.001f) { if (channelUsed) { - SampleManager.StopChannel(m_nActiveSamples); - bAccelSampleStopped = true; + SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); + bAccelSampleStopped = TRUE; } if (wheelsOnGround == 0 || params.m_pVehicle->bIsHandbrakeOn || lostTraction) gasPedalAudio = *gasPedalAudioPtr; @@ -1849,8 +1840,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh *gasPedalAudioPtr = Max(0.0f, gasPedalAudio); } else if (LastAccel > 0) { if (channelUsed) { - SampleManager.StopChannel(m_nActiveSamples); - bAccelSampleStopped = true; + SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); + bAccelSampleStopped = TRUE; } nCruising = 0; if (wheelsOnGround == 0 @@ -1871,7 +1862,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh vol /= 4; if (engineSoundType == SFX_BANK_TRUCK) freq /= 2; - AddPlayerCarSample(vol, freq, soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1, engineSoundType, 63, false); + AddPlayerCarSample(vol, freq, soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1, engineSoundType, 63, FALSE); } } freq = (10000.f * gasPedalAudio) + 22050; @@ -1880,7 +1871,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh freq /= 2; if (params.m_pVehicle->bIsDrowning) vol /= 4; - AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1, SFX_BANK_0, 52, true); + AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1, SFX_BANK_0, 52, TRUE); CurrentPretendGear = Max(1, currentGear); } @@ -1910,70 +1901,70 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh if (engineSoundType == SFX_BANK_TRUCK) freq /= 2; if (channelUsed) { - SampleManager.StopChannel(m_nActiveSamples); - bAccelSampleStopped = true; + SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); + bAccelSampleStopped = TRUE; } if (params.m_pVehicle->bIsDrowning) vol /= 4; - AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1, SFX_BANK_0, 2, true); + AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1, SFX_BANK_0, 2, TRUE); } else { TranslateEntity(&m_sQueueSample.m_vecPos, &pos); if (bAccelSampleStopped) { if (CurrentPretendGear != 1 || currentGear != 2) CurrentPretendGear = Max(1, currentGear - 1); - processedAccelSampleStopped = true; - bAccelSampleStopped = false; + processedAccelSampleStopped = TRUE; + bAccelSampleStopped = FALSE; } if (channelUsed) { - SampleManager.SetChannelEmittingVolume(m_nActiveSamples, 120); - SampleManager.SetChannel3DPosition(m_nActiveSamples, pos.x, pos.y, pos.z); - SampleManager.SetChannel3DDistances(m_nActiveSamples, 50.0f, 12.5f); + SampleManager.SetChannelEmittingVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, 120); + SampleManager.SetChannel3DPosition(CHANNEL_PLAYER_VEHICLE_ENGINE, pos.x, pos.y, pos.z); + SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 12.5f); freq = (GearFreqAdj[CurrentPretendGear] + freqModifier + 22050) ; if (engineSoundType == SFX_BANK_TRUCK) freq /= 2; - SampleManager.SetChannelFrequency(m_nActiveSamples, freq); + SampleManager.SetChannelFrequency(CHANNEL_PLAYER_VEHICLE_ENGINE, freq); if (!channelUsed) { - SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false); - SampleManager.StartChannel(m_nActiveSamples); + SampleManager.SetChannelReverbFlag(CHANNEL_PLAYER_VEHICLE_ENGINE, m_bDynamicAcousticModelingStatus != FALSE); + SampleManager.StartChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); } } else if (processedAccelSampleStopped) { gearSoundStartTime = CTimer::GetTimeInMilliseconds(); - params.m_pVehicle->bAudioChangingGear = true; - if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0)) + params.m_pVehicle->bAudioChangingGear = TRUE; + if (!SampleManager.InitialiseChannel(CHANNEL_PLAYER_VEHICLE_ENGINE, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0)) return; - SampleManager.SetChannelLoopCount(m_nActiveSamples, 1); - SampleManager.SetChannelLoopPoints(m_nActiveSamples, 0, -1); + SampleManager.SetChannelLoopCount(CHANNEL_PLAYER_VEHICLE_ENGINE, 1); + SampleManager.SetChannelLoopPoints(CHANNEL_PLAYER_VEHICLE_ENGINE, 0, -1); - SampleManager.SetChannelEmittingVolume(m_nActiveSamples, 120); - SampleManager.SetChannel3DPosition(m_nActiveSamples, pos.x, pos.y, pos.z); - SampleManager.SetChannel3DDistances(m_nActiveSamples, 50.0f, 12.5f); + SampleManager.SetChannelEmittingVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, 120); + SampleManager.SetChannel3DPosition(CHANNEL_PLAYER_VEHICLE_ENGINE, pos.x, pos.y, pos.z); + SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 12.5f); freq = (GearFreqAdj[CurrentPretendGear] + freqModifier + 22050); if (engineSoundType == SFX_BANK_TRUCK) freq /= 2; - SampleManager.SetChannelFrequency(m_nActiveSamples, freq); + SampleManager.SetChannelFrequency(CHANNEL_PLAYER_VEHICLE_ENGINE, freq); if (!channelUsed) { - SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false); - SampleManager.StartChannel(m_nActiveSamples); + SampleManager.SetChannelReverbFlag(CHANNEL_PLAYER_VEHICLE_ENGINE, m_bDynamicAcousticModelingStatus != FALSE); + SampleManager.StartChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); } } else if (CurrentPretendGear < params.m_pTransmission->nNumberOfGears - 1) { ++CurrentPretendGear; gearSoundStartTime = CTimer::GetTimeInMilliseconds(); - params.m_pVehicle->bAudioChangingGear = true; - if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0)) + params.m_pVehicle->bAudioChangingGear = TRUE; + if (!SampleManager.InitialiseChannel(CHANNEL_PLAYER_VEHICLE_ENGINE, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0)) return; - SampleManager.SetChannelLoopCount(m_nActiveSamples, 1); - SampleManager.SetChannelLoopPoints(m_nActiveSamples, 0, -1); + SampleManager.SetChannelLoopCount(CHANNEL_PLAYER_VEHICLE_ENGINE, 1); + SampleManager.SetChannelLoopPoints(CHANNEL_PLAYER_VEHICLE_ENGINE, 0, -1); - SampleManager.SetChannelEmittingVolume(m_nActiveSamples, 120); - SampleManager.SetChannel3DPosition(m_nActiveSamples, pos.x, pos.y, pos.z); - SampleManager.SetChannel3DDistances(m_nActiveSamples, 50.0f, 12.5f); + SampleManager.SetChannelEmittingVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, 120); + SampleManager.SetChannel3DPosition(CHANNEL_PLAYER_VEHICLE_ENGINE, pos.x, pos.y, pos.z); + SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 12.5f); freq = (GearFreqAdj[CurrentPretendGear] + freqModifier + 22050); if (engineSoundType == SFX_BANK_TRUCK) freq /= 2; - SampleManager.SetChannelFrequency(m_nActiveSamples, freq); + SampleManager.SetChannelFrequency(CHANNEL_PLAYER_VEHICLE_ENGINE, freq); if (!channelUsed) { - SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false); - SampleManager.StartChannel(m_nActiveSamples); + SampleManager.SetChannelReverbFlag(CHANNEL_PLAYER_VEHICLE_ENGINE, m_bDynamicAcousticModelingStatus != FALSE); + SampleManager.StartChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); } } else { nCruising = 1; @@ -1982,8 +1973,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh } } else { PlayCruising: - bAccelSampleStopped = true; - SampleManager.StopChannel(m_nActiveSamples); + bAccelSampleStopped = TRUE; + SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); if (isMoped || accelerateState >= 150 && wheelsOnGround && brakeState <= 0 && !params.m_pVehicle->bIsHandbrakeOn && !lostTraction && currentGear >= params.m_pTransmission->nNumberOfGears - 1) { if (accelerateState >= 220 && params.m_fVelocityChange + 0.001f >= velocityChangeForAudio) { @@ -1995,7 +1986,7 @@ PlayCruising: freq = 27 * nCruising + freqModifier + 22050; if (engineSoundType == SFX_BANK_TRUCK) freq /= 2; - AddPlayerCarSample(120, freq, soundOffset + SFX_CAR_AFTER_ACCEL_1, engineSoundType, 64, true); + AddPlayerCarSample(120, freq, soundOffset + SFX_CAR_AFTER_ACCEL_1, engineSoundType, 64, TRUE); } else { nCruising = 0; } @@ -2007,7 +1998,7 @@ PlayCruising: return; } -bool +bool8 cAudioManager::ProcessVehicleSkidding(cVehicleParams& params) { const float SOUND_INTENSITY = 40.0f; @@ -2026,7 +2017,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params) float skidVal = 0.0f; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; switch (params.m_VehicleType) { case VEHICLE_TYPE_CAR: automobile = (CAutomobile*)params.m_pVehicle; @@ -2044,10 +2035,10 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params) break; default: debug("\n * AUDIOLOG: ProcessVehicleSkidding() Unsupported vehicle type %d * \n", params.m_VehicleType); - return true; + return TRUE; } if (wheelsOnGround == 0) - return true; + return TRUE; CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); for (int32 i = 0; i < numWheels; i++) { @@ -2089,7 +2080,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params) m_sQueueSample.m_nFrequency = 13000.f * skidVal + 35000.f; m_sQueueSample.m_nVolume /= 4; if (m_sQueueSample.m_nVolume == 0) - return true; + return TRUE; break; case SURFACE_GRAVEL: case SURFACE_MUD_DRY: @@ -2109,22 +2100,21 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params) } m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 8; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } - return true; + return TRUE; } float @@ -2173,7 +2163,7 @@ cAudioManager::GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheel return Max(relativeVelChange, Min(1.0f, Abs(veh->m_vecTurnSpeed.z) * 20.0f)); } -bool +bool8 cAudioManager::ProcessVehicleHorn(cVehicleParams& params) { const float SOUND_INTENSITY = 40.0f; @@ -2182,17 +2172,17 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params) uint8 volume; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; veh = params.m_pVehicle; if (veh->m_bSirenOrAlarm && UsesSirenSwitching(params)) - return true; + return TRUE; if (veh->m_modelIndex == MI_MRWHOOP) - return true; + return TRUE; if (veh->IsAlarmOn()) - return true; + return TRUE; if (veh->m_nCarHornTimer != 0) { if (veh->GetStatus() != STATUS_PLAYER) { @@ -2201,7 +2191,7 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params) veh->m_nCarHornPattern = (m_FrameCounter + m_sQueueSample.m_nEntityIndex) & 7; if (!hornPatternsArray[veh->m_nCarHornPattern][44 - veh->m_nCarHornTimer]) - return true; + return TRUE; } CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); @@ -2211,7 +2201,7 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params) m_sQueueSample.m_nCounter = 4; m_sQueueSample.m_nSampleIndex = aVehicleSettings[params.m_nIndex].m_nHornSample; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 2; m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency; m_sQueueSample.m_nLoopCount = 0; @@ -2220,35 +2210,34 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params) #else m_sQueueSample.m_nEmittingVolume = 80; #endif - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 5.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } - return true; + return TRUE; } -bool +bool8 cAudioManager::UsesSiren(cVehicleParams& params) const { return params.m_pVehicle->UsesSiren(); } -bool +bool8 cAudioManager::UsesSirenSwitching(cVehicleParams& params) const { if (params.m_nIndex == FIRETRUK || params.m_nIndex == MRWHOOP) - return false; + return FALSE; return UsesSiren(params); } -bool +bool8 cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params) { const float SOUND_INTENSITY = 110.0f; @@ -2257,18 +2246,18 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params) uint8 volume; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; veh = params.m_pVehicle; if (!veh->m_bSirenOrAlarm && !veh->IsAlarmOn()) - return true; + return TRUE; if (veh->IsAlarmOn()) { if (CTimer::GetTimeInMilliseconds() > veh->m_nCarHornTimer) veh->m_nCarHornTimer = CTimer::GetTimeInMilliseconds() + 750; if (veh->m_nCarHornTimer < CTimer::GetTimeInMilliseconds() + 375) - return true; + return TRUE; } CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); @@ -2278,7 +2267,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params) m_sQueueSample.m_nCounter = 5; if (UsesSiren(params)) { if (params.m_pVehicle->GetStatus() == STATUS_ABANDONED) - return true; + return TRUE; if (veh->m_nCarHornTimer != 0 && params.m_nIndex != FIRETRUK && params.m_nIndex != MRWHOOP) { m_sQueueSample.m_nSampleIndex = SFX_SIREN_FAST; if (params.m_nIndex == FBIRANCH) @@ -2298,30 +2287,29 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params) m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency; } m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = volume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 7.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } - return true; + return TRUE; } -bool +bool8 cAudioManager::UsesReverseWarning(int32 model) const { return model == LINERUN || model == FIRETRUK || model == BUS || model == COACH || model == PACKER || model == FLATBED; } -bool +bool8 cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params) { const float SOUND_INTENSITY = 50.0f; @@ -2330,7 +2318,7 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params) uint8 volume; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; if (veh->bEngineOn && veh->m_fGasPedal < 0.0f) { CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); @@ -2340,7 +2328,7 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params) m_sQueueSample.m_nCounter = 12; m_sQueueSample.m_nSampleIndex = SFX_REVERSE_WARNING; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 2; m_sQueueSample.m_nFrequency = (100 * m_sQueueSample.m_nEntityIndex & 1023) + SampleManager.GetSampleBaseFrequency(SFX_REVERSE_WARNING); m_sQueueSample.m_nLoopCount = 0; @@ -2349,21 +2337,20 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params) #else m_sQueueSample.m_nEmittingVolume = 60; #endif - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } - return true; + return TRUE; } -bool +bool8 cAudioManager::ProcessVehicleDoors(cVehicleParams& params) { const float SOUND_INTENSITY = 40.0f; @@ -2374,7 +2361,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params) float velocity; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; automobile = (CAutomobile *)params.m_pVehicle; CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); @@ -2391,27 +2378,26 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params) m_sQueueSample.m_nSampleIndex = m_anRandomTable[1] % 6 + SFX_COL_CAR_PANEL_1; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) + RandomDisplacement(1000); m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 10; m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_fSpeedMultiplier = 1.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; AddSampleToRequestedQueue(); } } } } } - return true; + return TRUE; } -bool +bool8 cAudioManager::ProcessAirBrakes(cVehicleParams& params) { const float SOUND_INTENSITY = 30.0f; @@ -2419,14 +2405,14 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params) uint8 volume; if (params.m_fDistance > SQR(SOUND_INTENSITY)) - return false; + return FALSE; automobile = (CAutomobile *)params.m_pVehicle; if (!automobile->bEngineOn) - return true; + return TRUE; if ((automobile->m_fVelocityChangeForAudio < 0.025f || params.m_fVelocityChange >= 0.025f) && (automobile->m_fVelocityChangeForAudio > -0.025f || params.m_fVelocityChange <= 0.025f)) - return true; + return TRUE; CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); volume = m_anRandomTable[0] % 10 + 70; @@ -2437,31 +2423,30 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params) m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AIR_BRAKES); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16); m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 10; m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nEmittingVolume = volume; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } - return true; + return TRUE; } -bool +bool8 cAudioManager::HasAirBrakes(int32 model) const { return model == LINERUN || model == FIRETRUK || model == TRASH || model == BUS || model == BARRACKS || model == COACH || model == PACKER || model == FLATBED; } -bool +bool8 cAudioManager::ProcessEngineDamage(cVehicleParams& params) { const float SOUND_INTENSITY = 40.0f; @@ -2470,11 +2455,11 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params) uint8 emittingVolume; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; if (params.m_pVehicle->m_modelIndex == MI_CADDY) - return true; + return TRUE; if (params.m_pVehicle->GetStatus() == STATUS_WRECKED) - return true; + return TRUE; health = params.m_pVehicle->m_fHealth; if (health < 390.0f) { if (health < 250.0f) { @@ -2495,24 +2480,23 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params) if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 28; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVolume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } - return true; + return TRUE; } -bool +bool8 cAudioManager::ProcessCarBombTick(cVehicleParams& params) { const float SOUND_INTENSITY = 40.0f; @@ -2521,7 +2505,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params) uint8 bombType; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; if (params.m_pVehicle->bEngineOn) { switch (params.m_VehicleType) { case VEHICLE_TYPE_CAR: @@ -2532,7 +2516,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params) break; default: debug("\n * AUDIOLOG: ProcessCarBombTick() Unsupported vehicle type %d * \n", params.m_VehicleType); - return true; + return TRUE; break; } if (bombType == CARBOMB_TIMEDACTIVE) { @@ -2542,24 +2526,23 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params) m_sQueueSample.m_nCounter = 35; m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN); m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } } - return true; + return TRUE; } void @@ -2569,15 +2552,15 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) uint8 emittingVol; float relVol; float vol; - bool noReflections; - bool isHeli; + bool8 noReflections; + bool8 isHeli; float maxDist; static uint8 GunIndex = 53; for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) { - noReflections = false; - isHeli = false; - m_sQueueSample.m_bRequireReflection = false; + noReflections = FALSE; + isHeli = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; event = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]; switch (event) { case SOUND_CAR_DOOR_CLOSE_BONNET: @@ -2620,7 +2603,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; break; } case SOUND_CAR_DOOR_OPEN_BONNET: @@ -2660,7 +2643,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; break; } case SOUND_CAR_WINDSHIELD_CRACK: { @@ -2735,7 +2718,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; break; } case SOUND_CAR_LIGHT_BREAK: { @@ -2780,7 +2763,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; m_sQueueSample.m_nReleasingVolumeDivider = 7; - noReflections = true; + noReflections = TRUE; maxDist = SQR(SOUND_INTENSITY); emittingVol = m_anRandomTable[0] % 15 + 55; break; @@ -2865,7 +2848,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; emittingVol = (37.0f * vol * 625.0f / 24.0f) + 90; maxDist = SQR(SOUND_INTENSITY); - noReflections = true; + noReflections = TRUE; break; } case SOUND_CAR_BOMB_TICK: { @@ -2878,7 +2861,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; maxDist = SQR(SOUND_INTENSITY); - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVol = 60; break; } @@ -2960,8 +2943,8 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_nReleasingVolumeModificator = 2; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = true; - isHeli = true; + m_sQueueSample.m_bRequireReflection = TRUE; + isHeli = TRUE; break; default: { @@ -3014,7 +2997,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; break; } } @@ -3046,7 +3029,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVol = 50; maxDist = SQR(SOUND_INTENSITY); break; @@ -3060,7 +3043,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) } /* case SOUND_PED_BODYCAST_HIT: pedParams.m_pPed = nil; - pedParams.m_bDistanceCalculated = false; + pedParams.m_bDistanceCalculated = FALSE; pedParams.m_fDistance = 0.0f; pedParams.m_bDistanceCalculated = params.m_bDistanceCalculated; pedParams.m_fDistance = params.m_fDistance; @@ -3087,7 +3070,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; maxDist = SQR(SOUND_INTENSITY); - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVol = m_anRandomTable[4] % 20 + 90; break; } @@ -3105,7 +3088,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) maxDist = SQR(SOUND_INTENSITY); emittingVol = m_anRandomTable[4] % 20 + 55; CrunchOffset %= 2; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; break; } case SOUND_CAR_PED_COLLISION: { @@ -3135,18 +3118,17 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) if (m_sQueueSample.m_nVolume != 0) { if (noReflections) { m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; } else { m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; } - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; if (isHeli) { if (0.2f * m_sQueueSample.m_fSoundIntensity > m_sQueueSample.m_fDistance) { - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nOffset = 0; #ifdef THIS_IS_STUPID goto AddSample; @@ -3157,14 +3139,14 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) m_sQueueSample.m_nCounter = GunIndex++; if (GunIndex > 58) GunIndex = 53; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); continue; #endif } - isHeli = false; + isHeli = FALSE; } - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; #ifdef THIS_IS_STUPID AddSample: AddSampleToRequestedQueue(); @@ -3188,7 +3170,7 @@ AddSample: } #ifdef GTA_TRAIN -bool +bool8 cAudioManager::ProcessTrainNoise(cVehicleParams& params) { const float SOUND_INTENSITY = 300.0f; @@ -3198,7 +3180,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params) float speedMultipler; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) - return false; + return FALSE; if (params.m_fVelocityChange > 0.0f) { CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); @@ -3211,19 +3193,18 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params) m_sQueueSample.m_nCounter = 32; m_sQueueSample.m_nSampleIndex = SFX_TRAIN_FAR; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 2; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_FAR); m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3234,33 +3215,32 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params) m_sQueueSample.m_nCounter = 33; m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 5; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) + 100 * m_sQueueSample.m_nEntityIndex % 987; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } } - return true; + return TRUE; } #endif -bool +bool8 cAudioManager::ProcessBoatEngine(cVehicleParams& params) { CBoat *boat; float padRelativeAccerate; - bool isV12 = false; + bool8 isV12 = FALSE; static int32 LastFreq = 2000; static int8 LastVol = 0; @@ -3269,7 +3249,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params) if (params.m_fDistance < SQR(intensity)) { boat = (CBoat *)params.m_pVehicle; if(boat->GetStatus() == STATUS_WRECKED) - return true; + return TRUE; float freqModificator; float volModificator; @@ -3291,7 +3271,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params) case MI_JETMAX: freqModificator = 6000.0f; volModificator = 60.0f; - isV12 = true; + isV12 = TRUE; BaseFreq = 9000; BaseVol = 20; break; @@ -3309,18 +3289,18 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params) BaseFreq = 1782; break; default: - return true; + return TRUE; } - bool bIsPlayerVeh; + bool8 bIsPlayerVeh; if(FindPlayerVehicle() == params.m_pVehicle) { float padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake()); padRelativeAccerate = padAccelerate / 255.0f; - bIsPlayerVeh = true; + bIsPlayerVeh = TRUE; } else { padRelativeAccerate = Max(params.m_pVehicle->m_fGasPedal, params.m_pVehicle->m_fBrakePedal); - bIsPlayerVeh = false; + bIsPlayerVeh = FALSE; } int Freq = BaseFreq + (padRelativeAccerate * freqModificator); @@ -3358,18 +3338,17 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params) else m_sQueueSample.m_nSampleIndex = SFX_BOAT_CRUISER_LOOP; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = Vol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = intensity; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 7; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3383,18 +3362,17 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params) m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE; m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = 80; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = intensity; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 7; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3402,12 +3380,12 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params) LastFreq = Freq; LastVol = Vol; } - return true; + return TRUE; } - return false; + return FALSE; } -bool +bool8 cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params) { float velocityChange; @@ -3415,11 +3393,11 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params) float multiplier; if (params.m_fDistance > SQR(50)) - return false; + return FALSE; velocityChange = Abs(params.m_fVelocityChange); if (velocityChange <= 0.0005f && ((CBoat*)params.m_pVehicle)->bBoatInWater) - return true; + return TRUE; velocityChange = Min(0.75f, velocityChange); multiplier = (velocityChange - 0.0005f) / (1499.0f / 2000.0f); @@ -3430,23 +3408,22 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params) m_sQueueSample.m_nCounter = 38; m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nFrequency = (6050.f * multiplier) + 16000; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = vol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = 50.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 6; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } - return true; + return TRUE; } void @@ -3466,12 +3443,12 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) float propellerSpeed; float freqModifier; //may be relate to angle with horison float cameraAngle; - bool distanceCalculatedOld; + bool8 distanceCalculatedOld; float distanceOld; CVector vecPosOld; float volumeModifier;//TODO find better name - bool hunterBool; + bool8 hunterBool; static uint32 freqFrontPrev = 14287; static uint32 freqPropellerPrev = 7143; @@ -3479,7 +3456,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) boat = nil; automobile = nil; - hunterBool = false; + hunterBool = FALSE; if (params.m_fDistance >= SQR(SOUND_INTENSITY)) return; @@ -3494,7 +3471,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) brakeState = veh->m_fBrakePedal * 255.0f; } freqModifier = Abs(veh->GetUp().y); - cameraAngle = (DotProduct(veh->m_matrix.GetForward(), TheCamera.GetForward()) + 1.0f) / 2.0f; + cameraAngle = (DotProduct(veh->GetMatrix().GetForward(), TheCamera.GetForward()) + 1.0f) / 2.0f; if (veh->m_modelIndex == MI_SKIMMER) { boat = (CBoat*)veh; propellerSpeed = boat->m_fMovingSpeed * 50.0f / 11.0f; @@ -3535,21 +3512,31 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex); } - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 2; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } + + CVector backPropellerPos; + if (automobile != nil) + automobile->GetComponentWorldPosition(CAR_BOOT, backPropellerPos); + else if (params.m_VehicleType == VEHICLE_TYPE_HELI) +#ifdef FIX_BUGS + backPropellerPos = +#endif + params.m_pVehicle->GetMatrix() * CVector(0.0f, -10.0f, 0.0f); + else + backPropellerPos = m_sQueueSample.m_vecPos; if (params.m_fDistance >= SQR(140.0f)) return; @@ -3563,7 +3550,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) if (playerVeh == veh && (accelerateState > 0 || brakeState > 0) && freq < 1300)//unnesesary freqModifier alredy <= 1300 freq = 1300; if (veh->m_modelIndex == MI_HUNTER) - hunterBool = true; + hunterBool = TRUE; } @@ -3576,18 +3563,17 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) m_sQueueSample.m_nSampleIndex = SFX_HELI_APACHE_1; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000 + freq; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = 140.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } else if (boat != nil) { m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO1; @@ -3599,38 +3585,36 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) m_sQueueSample.m_nFrequency = 14287 + Min(1.0f, freqModifier) * 3713; if (propellerSpeed < 1.0f) m_sQueueSample.m_nFrequency = (propellerSpeed + 1.0f) * (m_sQueueSample.m_nFrequency / 2.0f); - m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqFrontPrev, 197); + m_sQueueSample.m_nFrequency = Clamp2(m_sQueueSample.m_nFrequency, freqFrontPrev, 197); freqFrontPrev = m_sQueueSample.m_nFrequency; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = 140.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } else { m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_MAI; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = 140.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3657,25 +3641,24 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) if (propellerSpeed < 1.0f) m_sQueueSample.m_nFrequency = (propellerSpeed + 1) * (m_sQueueSample.m_nFrequency / 2); - m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqPropellerPrev, 98); + m_sQueueSample.m_nFrequency = Clamp2(m_sQueueSample.m_nFrequency, freqPropellerPrev, 98); freqPropellerPrev = m_sQueueSample.m_nFrequency; } else { m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_MAI2; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq; } - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = 140.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } @@ -3698,18 +3681,17 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) } m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nCounter = 12; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = 30.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 30; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3728,24 +3710,23 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) m_sQueueSample.m_nFrequency = 14287 + Min(1.0f, freqModifier) * 3713; if (propellerSpeed < 1.0f) m_sQueueSample.m_nFrequency = (propellerSpeed + 1) * (m_sQueueSample.m_nFrequency / 2.0f); - m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqSkimmerPrev, 197); + m_sQueueSample.m_nFrequency = Clamp2(m_sQueueSample.m_nFrequency, freqSkimmerPrev, 197); freqSkimmerPrev = m_sQueueSample.m_nFrequency; m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO4; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = 12; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = propellerSpeed * 100.0f; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_SEAPLANE_PRO4); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_SEAPLANE_PRO4); + SET_LOOP_OFFSETS(SFX_SEAPLANE_PRO4) m_sQueueSample.m_fSpeedMultiplier = 5.0f; m_sQueueSample.m_fSoundIntensity = 20.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 7; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3754,13 +3735,9 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) vecPosOld = m_sQueueSample.m_vecPos; distanceCalculatedOld = params.m_bDistanceCalculated; distanceOld = params.m_fDistance; - - if (automobile != nil) - automobile->GetComponentWorldPosition(CAR_BOOT, m_sQueueSample.m_vecPos); - else if (params.m_VehicleType == VEHICLE_TYPE_HELI) - m_sQueueSample.m_vecPos = CVector(0.0f, -10.0f, 0.0f); //this is from android, but for real it's not used - params.m_bDistanceCalculated = false; + m_sQueueSample.m_vecPos = backPropellerPos; + params.m_bDistanceCalculated = FALSE; params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); if (params.m_fDistance < SQR(27.0f)) { CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); @@ -3768,20 +3745,19 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) if (m_sQueueSample.m_nVolume) { m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nSampleIndex = hunterBool ? SFX_HELI_APACHE_3 : SFX_CAR_HELI_REA; - m_sQueueSample.m_nBankIndex = 0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_nBankIndex = SFX_BANK_0; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = volumeModifier * 25.0f; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 6.0f; m_sQueueSample.m_fSoundIntensity = 27.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3799,7 +3775,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params) CAutomobile* automobile; CBike* bike; - bool wheelBurst; + bool8 wheelBurst; uint8 emittingVol; float modifier; @@ -3810,19 +3786,19 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params) switch (params.m_VehicleType) { case VEHICLE_TYPE_CAR: automobile = (CAutomobile*)params.m_pVehicle; - wheelBurst = false; + wheelBurst = FALSE; for (int i = 0; i < 4; i++) if (automobile->Damage.GetWheelStatus(i) == WHEEL_STATUS_BURST && automobile->m_aWheelTimer[i] > 0.0f) - wheelBurst = true; + wheelBurst = TRUE; if (!wheelBurst) return; break; case VEHICLE_TYPE_BIKE: bike = (CBike*)params.m_pVehicle; - wheelBurst = false; + wheelBurst = FALSE; for(int i = 0; i < 2; i++) if (bike->m_wheelStatus[i] == WHEEL_STATUS_BURST && bike->m_aWheelTimer[i] > 0.0f) - wheelBurst = true; + wheelBurst = TRUE; if (!wheelBurst) return; break; @@ -3837,20 +3813,19 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params) if (m_sQueueSample.m_nVolume) { m_sQueueSample.m_nCounter = 95; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 5; m_sQueueSample.m_nSampleIndex = SFX_TYRE_BURST_L; m_sQueueSample.m_nFrequency = (5500.0f * modifier) + 8000; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_TYRE_BURST_L); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_TYRE_BURST_L); + SET_LOOP_OFFSETS(SFX_TYRE_BURST_L) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -3989,12 +3964,12 @@ cAudioManager::ProcessJumboDecel(CPlane *plane) } } -bool +bool8 cAudioManager::SetupJumboTaxiSound(uint8 vol) { const float SOUND_INTENSITY = 180.0f; if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY) - return false; + return FALSE; uint8 emittingVol = (vol / 2) + ((vol / 2) * m_sQueueSample.m_fDistance / SOUND_INTENSITY); @@ -4006,31 +3981,30 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol) m_sQueueSample.m_nCounter = 1; m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = GetJumboTaxiFreq(); m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } - return true; + return TRUE; } -bool +bool8 cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq) { const float SOUND_INTENSITY = 170.0f; if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY) - return false; + return FALSE; m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); @@ -4038,30 +4012,29 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq) m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nSampleIndex = SFX_JUMBO_WHINE; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } - return true; + return TRUE; } -bool +bool8 cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq) { const float SOUND_INTENSITY = 180.0f; if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY) - return false; + return FALSE; uint8 emittingVol = vol - gJumboVolOffsetPercentage / 100; m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); @@ -4069,29 +4042,28 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq) m_sQueueSample.m_nCounter = 3; m_sQueueSample.m_nSampleIndex = SFX_JUMBO_ENGINE; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 4; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } - return true; + return TRUE; } -bool +bool8 cAudioManager::SetupJumboFlySound(uint8 emittingVol) { const float SOUND_INTENSITY = 440.0f; - if(m_sQueueSample.m_fDistance >= SOUND_INTENSITY) return false; + if(m_sQueueSample.m_fDistance >= SOUND_INTENSITY) return FALSE; int32 vol = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); m_sQueueSample.m_nVolume = vol; @@ -4099,30 +4071,29 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol) m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY); m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; // todo port fix to re3 + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; // todo port fix to re3 AddSampleToRequestedQueue(); } - return true; + return TRUE; } -bool +bool8 cAudioManager::SetupJumboRumbleSound(uint8 emittingVol) { const float SOUND_INTENSITY = 240.0f; if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY) - return false; + return FALSE; m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); @@ -4130,20 +4101,19 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol) m_sQueueSample.m_nCounter = 5; m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_RUMBLE); m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 12; m_sQueueSample.m_nOffset = 0; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); m_sQueueSample.m_nCounter = 6; m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE; @@ -4151,7 +4121,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol) m_sQueueSample.m_nOffset = MAX_VOLUME; AddSampleToRequestedQueue(); } - return true; + return TRUE; } int32 @@ -4172,7 +4142,7 @@ cAudioManager::ProcessPed(CPhysical *ped) m_sQueueSample.m_vecPos = ped->GetPosition(); - params.m_bDistanceCalculated = false; + params.m_bDistanceCalculated = FALSE; params.m_pPed = (CPed *)ped; params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); ProcessPedOneShots(params); @@ -4186,9 +4156,9 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) CPed *ped = params.m_pPed; - bool narrowSoundRange; + bool8 narrowSoundRange; int16 sound; - bool stereo; + bool8 stereo; CWeapon *weapon; float maxDist = 0.f; // uninitialized variable @@ -4197,9 +4167,9 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) weapon = params.m_pPed->GetWeapon(); for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) { - stereo = false; - narrowSoundRange = false; - m_sQueueSample.m_bRequireReflection = false; + stereo = FALSE; + narrowSoundRange = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; sound = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]; switch (sound) { case SOUND_STEP_START: @@ -4273,12 +4243,11 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 20.0f; m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SOUND_FALL_LAND: case SOUND_FALL_COLLAPSE: @@ -4301,12 +4270,11 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 30.0f; m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SOUND_FIGHT_37: m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1; @@ -4388,20 +4356,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) } m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound; - narrowSoundRange = true; + narrowSoundRange = TRUE; ++iSound; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 30.0f; maxDist = SQR(30); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[3] % 26 + 100; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SOUND_WEAPON_BAT_ATTACK: case SOUND_WEAPON_KNIFE_ATTACK: @@ -4434,7 +4401,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000; - stereo = true; + stereo = TRUE; break; } } @@ -4445,26 +4412,29 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16); } m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 30.0f; maxDist = SQR(30); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[2] % 20 + 100; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; } - case SOUND_WEAPON_CHAINSAW_ATTACK: + case SOUND_WEAPON_CHAINSAW_IDLE: if (FindVehicleOfPlayer()) continue; - m_sQueueSample.m_nSampleIndex = SFX_CAR_ACCEL_13; - m_sQueueSample.m_nBankIndex = SFX_BANK_0; // SFX_BANK_CAR_CHAINSAW + m_sQueueSample.m_nSampleIndex = SFX_CAR_CHAINSAW_IDLE; +#ifdef GTA_PS2 + m_sQueueSample.m_nBankIndex = SFX_BANK_CAR_CHAINSAW; +#else + m_sQueueSample.m_nBankIndex = SFX_BANK_0; +#endif m_sQueueSample.m_nCounter = 70; m_sQueueSample.m_nFrequency = 27000; m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4473,18 +4443,21 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) maxDist = SQR(50); m_sQueueSample.m_nLoopCount = 0; emittingVol = 100; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_ACCEL_13); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_ACCEL_13); + SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_IDLE) m_sQueueSample.m_nEmittingVolume = 100; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; break; - case SOUND_WEAPON_CHAINSAW_IDLE: + case SOUND_WEAPON_CHAINSAW_ATTACK: if (FindVehicleOfPlayer()) continue; - m_sQueueSample.m_nSampleIndex = SFX_CAR_AFTER_ACCEL_13; - m_sQueueSample.m_nBankIndex = SFX_BANK_0; // SFX_BANK_CAR_CHAINSAW + m_sQueueSample.m_nSampleIndex = SFX_CAR_CHAINSAW_ATTACK; +#ifdef GTA_PS2 + m_sQueueSample.m_nBankIndex = SFX_BANK_CAR_CHAINSAW; +#else + m_sQueueSample.m_nBankIndex = SFX_BANK_0; +#endif m_sQueueSample.m_nCounter = 68; m_sQueueSample.m_nFrequency = 27000; m_sQueueSample.m_nReleasingVolumeModificator = 2; @@ -4493,11 +4466,10 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) maxDist = SQR(60); m_sQueueSample.m_nLoopCount = 0; emittingVol = 100; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_AFTER_ACCEL_13); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_AFTER_ACCEL_13); + SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_ATTACK) m_sQueueSample.m_nEmittingVolume = 100; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; break; case SOUND_WEAPON_CHAINSAW_MADECONTACT: @@ -4505,8 +4477,12 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) continue; if ((int32)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i] != ENTITY_TYPE_PED) ReportCollision(params.m_pPed, params.m_pPed, SURFACE_CAR, SURFACE_TARMAC, 0.0f, 0.09f); - m_sQueueSample.m_nSampleIndex = SFX_CAR_AFTER_ACCEL_13; - m_sQueueSample.m_nBankIndex = SFX_BANK_0; // SFX_BANK_CAR_CHAINSAW + m_sQueueSample.m_nSampleIndex = SFX_CAR_CHAINSAW_ATTACK; +#ifdef GTA_PS2 + m_sQueueSample.m_nBankIndex = SFX_BANK_CAR_CHAINSAW; +#else + m_sQueueSample.m_nBankIndex = SFX_BANK_0; +#endif m_sQueueSample.m_nCounter = 68; m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 22000; m_sQueueSample.m_nReleasingVolumeModificator = 2; @@ -4515,11 +4491,10 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) maxDist = SQR(60); m_sQueueSample.m_nLoopCount = 0; emittingVol = 100; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_AFTER_ACCEL_13); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_AFTER_ACCEL_13); + SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_ATTACK) m_sQueueSample.m_nEmittingVolume = 100; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 5; break; case SOUND_WEAPON_SHOT_FIRED: @@ -4532,7 +4507,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 1; @@ -4540,20 +4515,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[0] % 20 + 80; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; + stereo = TRUE; break; case WEAPONTYPE_COLT45: m_sQueueSample.m_nSampleIndex = SFX_COLT45_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4561,20 +4535,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[1] % 10 + 90; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; + stereo = TRUE; break; case WEAPONTYPE_PYTHON: m_sQueueSample.m_nSampleIndex = SFX_PYTHON_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PYTHON_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4582,21 +4555,20 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = 127; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; + stereo = TRUE; break; case WEAPONTYPE_SHOTGUN: case WEAPONTYPE_STUBBY_SHOTGUN: m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4604,20 +4576,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[2] % 10 + 100; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; + stereo = TRUE; break; case WEAPONTYPE_SPAS12_SHOTGUN: m_sQueueSample.m_nSampleIndex = SFX_SPAS12_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SPAS12_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4625,40 +4596,38 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[2] % 10 + 100; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; + stereo = TRUE; break; case WEAPONTYPE_TEC9: m_sQueueSample.m_nSampleIndex = SFX_TEC_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 17000; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[3] % 15 + 70; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + stereo = TRUE; break; case WEAPONTYPE_UZI: case WEAPONTYPE_MINIGUN: m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4666,38 +4635,36 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[3] % 15 + 70; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + stereo = TRUE; break; case WEAPONTYPE_SILENCED_INGRAM: m_sQueueSample.m_nSampleIndex = SFX_TEC_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 34000; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[3] % 15 + 70; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + stereo = TRUE; break; case WEAPONTYPE_MP5: m_sQueueSample.m_nSampleIndex = SFX_MP5_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_MP5_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4705,38 +4672,36 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[3] % 15 + 70; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + stereo = TRUE; break; case WEAPONTYPE_M4: m_sQueueSample.m_nSampleIndex = SFX_RUGER_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 43150; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[3] % 15 + 90; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + stereo = TRUE; break; case WEAPONTYPE_RUGER: m_sQueueSample.m_nSampleIndex = SFX_RUGER_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RUGER_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4744,20 +4709,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[3] % 15 + 90; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + stereo = TRUE; break; case WEAPONTYPE_SNIPERRIFLE: case WEAPONTYPE_LASERSCOPE: m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; if (weapon->m_eWeaponType == WEAPONTYPE_SNIPERRIFLE) m_sQueueSample.m_nFrequency = 25472; else @@ -4768,14 +4732,13 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[4] % 10 + 110; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; + stereo = TRUE; break; case WEAPONTYPE_FLAMETHROWER: m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_LEFT; @@ -4788,20 +4751,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 60.0f; maxDist = SQR(60); m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_nEmittingVolume = 90; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 6; - stereo = true; + stereo = TRUE; break; case WEAPONTYPE_M60: case WEAPONTYPE_HELICANNON: m_sQueueSample.m_nSampleIndex = SFX_M60_LEFT; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M60_LEFT); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -4809,13 +4771,12 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = 127; m_sQueueSample.m_nEmittingVolume = 127; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - stereo = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + stereo = TRUE; break; default: continue; @@ -4860,7 +4821,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) } emittingVol = 75; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency += RandomDisplacement(300); m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nReleasingVolumeModificator = 5; @@ -4868,12 +4829,11 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 30.0f; maxDist = SQR(30); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_nEmittingVolume = 75; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SOUND_WEAPON_AK47_BULLET_ECHO: { @@ -4905,7 +4865,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) } m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; switch (weaponType) { case WEAPONTYPE_TEC9: m_sQueueSample.m_nFrequency = 13000; @@ -4932,13 +4892,12 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 120.0f; maxDist = SQR(120); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[4] % 10 + 80; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; } case SOUND_WEAPON_FLAMETHROWER_FIRE: @@ -4952,18 +4911,17 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 60.0f; maxDist = SQR(60); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = 70; m_sQueueSample.m_nEmittingVolume = 70; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; break; case SOUND_WEAPON_HIT_PED: m_sQueueSample.m_nSampleIndex = SFX_BULLET_PED; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BULLET_PED); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8); m_sQueueSample.m_nReleasingVolumeModificator = 7; @@ -4971,12 +4929,11 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 30.0f; maxDist = SQR(30); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[0] % 20 + 90; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; break; case SOUND_SPLASH: if (m_FrameCounter <= iSplashFrame) @@ -4985,20 +4942,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = 40.0f; maxDist = SQR(40); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; + RESET_LOOP_OFFSETS emittingVol = m_anRandomTable[2] % 30 + 70; - m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SOUND_MELEE_ATTACK_START: { @@ -5018,7 +4974,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) } m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound++; - narrowSoundRange = true; + narrowSoundRange = TRUE; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16); m_sQueueSample.m_nReleasingVolumeModificator = 3; @@ -5030,12 +4986,11 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) emittingVol = m_anRandomTable[2] % 20 + 70; maxDist = SQR(30); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; } case SOUND_SKATING: @@ -5046,7 +5001,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_nSampleIndex = (m_anRandomTable[3] & 1) + SFX_SKATE_1; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nCounter = iSound; - stereo = true; + stereo = TRUE; ++iSound; m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 1000 + 17000; if (param2 == 0) @@ -5056,13 +5011,12 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 20.0f; maxDist = SQR(20); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = (m_anRandomTable[2] % 20 + 70) * param1 / 127; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; } case SOUND_WEAPON_MINIGUN_ATTACK: @@ -5076,11 +5030,10 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) emittingVol = 127; maxDist = SQR(150); m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_LEFT); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_MINIGUN_FIRE_LEFT); + SET_LOOP_OFFSETS(SFX_MINIGUN_FIRE_LEFT) m_sQueueSample.m_nEmittingVolume = 127; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; break; case SOUND_WEAPON_MINIGUN_2: @@ -5094,11 +5047,10 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) emittingVol = 127.0f * m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i]; maxDist = SQR(150); m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_RIGHT); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_MINIGUN_FIRE_RIGHT); + SET_LOOP_OFFSETS(SFX_MINIGUN_FIRE_RIGHT) m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; break; case SOUND_WEAPON_MINIGUN_3: @@ -5111,13 +5063,12 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 150.0f; maxDist = SQR(150); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS emittingVol = 127; m_sQueueSample.m_nEmittingVolume = 127; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SOUND_SHIRT_WIND_FLAP: if (params.m_pPed->IsPlayer() && params.m_pPed->m_pMyVehicle) { @@ -5155,11 +5106,10 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) m_sQueueSample.m_fSoundIntensity = 15.0f; maxDist = SQR(15); m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; } } @@ -5177,13 +5127,13 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) if (m_sQueueSample.m_nVolume != 0) { if (stereo) { if (m_sQueueSample.m_fDistance < 0.2f * m_sQueueSample.m_fSoundIntensity) { - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nOffset = 0; } else { - stereo = false; + stereo = FALSE; } } - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; AddSampleToRequestedQueue(); if (stereo) { m_sQueueSample.m_nOffset = 127; @@ -5204,7 +5154,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) } void -cAudioManager::SetPedTalkingStatus(CPed *ped, uint8 status) +cAudioManager::SetPedTalkingStatus(CPed *ped, bool8 status) { if (ped != nil) ped->m_canTalk = status; @@ -5232,12 +5182,12 @@ cAudioManager::SetupPedComments(cPedParams ¶ms, uint16 sound) if(ped != nil) { if(!ped->m_canTalk) return; - m_bGenericSfx = false; + m_bGenericSfx = FALSE; pedComment.m_nSampleIndex = GetPedCommentSfx(ped, sound); if(pedComment.m_nSampleIndex == NO_SAMPLE) return; soundIntensity = 40.0f; } else { - m_bGenericSfx = true; + m_bGenericSfx = TRUE; switch(sound) { case SOUND_PED_HELI_PLAYER_FOUND: soundIntensity = 400.0f; @@ -5453,23 +5403,23 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) if(m_bIsPlayerShutUp) return NO_SAMPLE; switch(sound) { - case SOUND_PED_DEATH: return 9796; + case SOUND_PED_DEATH: return SFX_PLAYER_DEATH; case SOUND_PED_DAMAGE: - case SOUND_PED_BULLET_HIT: GetPhrase(sfx, ped->m_lastComment, 9815, 33); break; + case SOUND_PED_BULLET_HIT: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_HIT_BULLET_1, 33); break; case SOUND_PED_HIT: - case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, 9883, 42); break; - case SOUND_PED_LAND: GetPhrase(sfx, ped->m_lastComment, 9848, 35); break; - case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, 9925, 16); break; + case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_HIT_FIST_1, 42); break; + case SOUND_PED_LAND: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_HIT_GROUND_1, 35); break; + case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ON_FIRE_1, 16); break; case SOUND_PED_PLAYER_REACTTOCOP: switch(m_nPlayerMood) { case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8694, 38); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_BUSTED_1, 38); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9615, 20); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_BUSTED_1, 20); break; default: - GetPhrase(sfx, ped->m_lastComment, 9046, 22); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_BUSTED_1, 22); break; } break; @@ -5477,16 +5427,16 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(8); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9586, 29); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_SHOOT_1, 29); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 9007, 39); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_SHOOT_1, 39); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9787, 9); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_SHOOT_1, 9); break; default: - GetPhrase(sfx, ped->m_lastComment, 9322, 35); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_SHOOT_1, 35); break; } break; @@ -5495,16 +5445,16 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(8); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9561, 25); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_PULL_GUN_1, 25); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8937, 52); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_PULL_GUN_1, 52); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9758, 19); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_PULL_GUN_1, 19); break; default: - GetPhrase(sfx, ped->m_lastComment, 9275, 39); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_PULL_GUN_1, 39); break; } break; @@ -5513,16 +5463,16 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9483, 36); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_JACKING_1, 36); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8876, 43); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_JACKING_1, 43); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9706, 18); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_JACKING_1, 18); break; default: - GetPhrase(sfx, ped->m_lastComment, 9202, 40); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_JACKING_1, 40); break; } break; @@ -5531,16 +5481,16 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(8); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9519, 25); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_1, 25); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8919, 12); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_PICK_UP_CASH_1, 12); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9724, 23); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_PICK_UP_CASH_1, 23); break; default: - GetPhrase(sfx, ped->m_lastComment, 9242, 11); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_PICK_UP_CASH_1, 11); break; } break; @@ -5549,31 +5499,31 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9462, 21); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_JACKED_1, 21); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8843, 33); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_JACKED_1, 33); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9688, 18); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_JACKED_1, 18); break; default: - GetPhrase(sfx, ped->m_lastComment, 9178, 24); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_JACKED_1, 24); break; } break; } - case SOUND_PED_PLAYER_AFTERSEX: GetPhrase(sfx, ped->m_lastComment, 9797, 18); break; + case SOUND_PED_PLAYER_AFTERSEX: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_AFTERSEX_1, 18); break; case SOUND_PED_PLAYER_BEFORESEX: switch(m_nPlayerMood) { case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8989, 18); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_SEX_1, 18); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9777, 10); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_SEX_1, 10); break; default: - GetPhrase(sfx, ped->m_lastComment, 9314, 8); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_SEX_1, 8); break; } break; @@ -5581,13 +5531,13 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8732, 9); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_CHASED_1, 9); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9635, 7); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_CHASED_1, 7); break; default: - GetPhrase(sfx, ped->m_lastComment, 9068, 20); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_CHASED_1, 20); break; } break; @@ -5596,16 +5546,16 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9401, 61); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_FIGHT_1, 61); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8782, 61); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_FIGHT_1, 61); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9661, 27); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_FIGHT_1, 27); break; default: - GetPhrase(sfx, ped->m_lastComment, 9131, 47); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_FIGHT_1, 47); break; } break; @@ -5616,16 +5566,16 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9357, 44); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_CRASH_1, 44); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8741, 41); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_CRASH_1, 41); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9642, 19); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_CRASH_1, 19); break; default: - GetPhrase(sfx, ped->m_lastComment, 9088, 43); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_CRASH_1, 43); break; } break; @@ -5634,16 +5584,16 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, 9544, 17); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_1, 17); break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, 8931, 6); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_PICK_UP_HOOKER_1, 6); break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, 9747, 11); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_1, 11); break; default: - GetPhrase(sfx, ped->m_lastComment, 9253, 22); + GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_PICK_UP_HOOKER_1, 22); break; } break; @@ -5659,33 +5609,38 @@ cAudioManager::GetCopTalkSfx(CPed *ped, int16 sound) uint32 sfx; PedState objective; switch(sound) { - case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, 8469, 4); break; - case SOUND_PED_PULLOUTWEAPON: GetPhrase(sfx, ped->m_lastComment, 8473, 3); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 8500, 2); break; - case SOUND_PED_COP_UNK_129: GetPhrase(sfx, ped->m_lastComment, 8510, 4); break; - case SOUND_PED_COP_MANYCOPSAROUND: GetPhrase(sfx, ped->m_lastComment, 8508, 2); break; - case SOUND_PED_GUNAIMEDAT2: GetPhrase(sfx, ped->m_lastComment, 8498, 2); break; - case SOUND_PED_COP_ALONE: GetPhrase(sfx, ped->m_lastComment, 8504, 4); break; - case SOUND_PED_GUNAIMEDAT3: GetPhrase(sfx, ped->m_lastComment, 8485, 2); break; - case SOUND_PED_COP_REACTION: { + case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_ARREST_1, 4); break; + case SOUND_PED_PULLOUTWEAPON: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_PULLOUTWEAPON_1, 3); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_SAVED_1, 2); break; + case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_TARGETING_1, 4); break; + case SOUND_PED_COP_MANYCOPSAROUND: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_MANYCOPSAROUND_1, 2); break; + case SOUND_PED_GUNAIMEDAT2: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_GUNAIMEDAT2_1, 2); break; + case SOUND_PED_COP_ALONE: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_ALONE_1, 4); break; + case SOUND_PED_GUNAIMEDAT3: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_GUNAIMEDAT2_1, 2); break; + case SOUND_PED_COP_ASK_FOR_ID: { cooldown_phrase(4); - GetPhrase(sfx, ped->m_lastComment, 8502, 2); + GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_ASK_FOR_ID_1, 2); break; } case SOUND_PED_COP_LITTLECOPSAROUND: objective = FindPlayerPed()->m_nPedState; if(objective == PED_ARRESTED || objective == PED_DEAD || objective == PED_DIE) return NO_SAMPLE; - GetPhrase(sfx, ped->m_lastComment, 8481, 4); + GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_1, 4); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 8494, 4); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8491, 3); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_FIGHT_1, 4); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_DODGE_1, 3); break; +#ifdef FIX_BUGS + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_CAR_CRASH_1, 4); break; +#endif case SOUND_PED_PED_COLLISION: - if(FindPlayerPed()->m_pWanted->GetWantedLevel() <= 0) return NO_SAMPLE; - GetPhrase(sfx, ped->m_lastComment, 8476, 5); + if(FindPlayerPed()->m_pWanted->GetWantedLevel() > 0) + GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_BUMP_1, 5); + else + return NO_SAMPLE; break; default: return GetGenericMaleTalkSfx(ped, sound); } - return 45 * (m_sQueueSample.m_nEntityIndex % 5) + sfx; + return (SFX_COP_VOICE_2_ARREST_1 - SFX_COP_VOICE_1_ARREST_1) * (m_sQueueSample.m_nEntityIndex % 5) + sfx; } uint32 @@ -5693,12 +5648,12 @@ cAudioManager::GetSwatTalkSfx(CPed *ped, int16 sound) { uint32 sfx; switch(sound) { - case SOUND_PED_COP_HELIPILOTPHRASE: GetPhrase(sfx, ped->m_lastComment, 3285, 7); break; - case SOUND_PED_COP_UNK_129: GetPhrase(sfx, ped->m_lastComment, 3292, 4); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3282, 3); break; + case SOUND_PED_COP_HELIPILOTPHRASE: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_1, 7); break; + case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_COP_TARGETING_1, 4); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_DODGE_1, 3); break; default: return GetGenericMaleTalkSfx(ped, sound); } - sfx += 14 * (m_sQueueSample.m_nEntityIndex % 3); + sfx += (SFX_SWAT_VOICE_2_DODGE_1 - SFX_SWAT_VOICE_1_DODGE_1) * (m_sQueueSample.m_nEntityIndex % 3); return sfx; } @@ -5707,15 +5662,23 @@ cAudioManager::GetFBITalkSfx(CPed *ped, int16 sound) { uint32 sfx; switch(sound) { - case SOUND_PED_COP_UNK_129: GetPhrase(sfx, ped->m_lastComment, 3240u, 4u); break; - case SOUND_PED_COP_MANYCOPSAROUND: GetPhrase(sfx, ped->m_lastComment, 3237u, 3u); break; - case SOUND_PED_GUNAIMEDAT2: sfx = 3236; break; - case SOUND_PED_GUNAIMEDAT3: GetPhrase(sfx, ped->m_lastComment, 3228u, 4u); break; +#ifdef FIX_BUGS + case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_COP_TARGETING_1, 6); break; +#else + case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_COP_TARGETING_1, 4); break; +#endif + case SOUND_PED_COP_MANYCOPSAROUND: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_1, 3); break; + case SOUND_PED_GUNAIMEDAT2: sfx = SFX_FBI_VOICE_1_GUNAIMEDAT2_1; break; + case SOUND_PED_GUNAIMEDAT3: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_GUNAIMEDAT3_1, 4); break; case SOUND_PED_CRASH_VEHICLE: - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3232u, 4u); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_CAR_CRASH_1, 4); break; default: return GetGenericMaleTalkSfx(ped, sound); } +#ifdef FIX_BUGS + sfx += (SFX_FBI_VOICE_2_GUNAIMEDAT3_1 - SFX_FBI_VOICE_1_GUNAIMEDAT3_1) * (m_sQueueSample.m_nEntityIndex % 3); +#else sfx += 16 * (m_sQueueSample.m_nEntityIndex % 3); +#endif return sfx; } @@ -5730,12 +5693,12 @@ cAudioManager::GetMedicTalkSfx(CPed *ped, int16 sound) { uint32 sfx; switch(sound) { - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 3162, 6); break; - case SOUND_PED_HEALING: GetPhrase(sfx, ped->m_lastComment, 3178, 17); break; - case SOUND_PED_LEAVE_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 3168, 10); break; // SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_1 + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_MEDIC_VOICE_1_FIGHT_1, 6); break; + case SOUND_PED_HEALING: GetPhrase(sfx, ped->m_lastComment, SFX_MEDIC_VOICE_1_AT_VICTIM_1, 17); break; + case SOUND_PED_LEAVE_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } - sfx += 33 * (m_sQueueSample.m_nEntityIndex % 2); + sfx += (SFX_MEDIC_VOICE_2_FIGHT_1 - SFX_MEDIC_VOICE_1_FIGHT_1) * (m_sQueueSample.m_nEntityIndex % 2); return sfx; } @@ -5751,22 +5714,29 @@ cAudioManager::GetDefaultTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 2033, 12); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 2045, 12); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 2075, 4); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 2098, 4); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 2108, 5); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 2004, 16); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 1979, 19); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 2079, 19); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 2020, 13); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 1939, 15); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 1898, 16); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 2070, 5); break; - case SOUND_153: GetPhrase(sfx, ped->m_lastComment, 1998, 6); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 2102, 6); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 1914, 25); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 1954, 25); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_GUN_PANIC_1, 12); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_JACKED_1, 12); break; +#ifdef FIX_BUGS + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_JACKING_1, 13); break; +#endif + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_MUGGED_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_SAVED_1, 4); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_TAXI_1, 5); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_FIGHT_1, 16); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_DODGE_1, 19); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_RUN_1, 19); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_GENERIC_CRASH_1, 13); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_CAR_CRASH_1, 15); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_BLOCKED_1, 16); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_LOST_1, 5); break; +#ifdef FIX_BUGS + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_EYEING_1, 6); break; +#else + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_EYEING_1, 6); break; +#endif + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_SHOCKED_1, 6); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_BUMP_1, 25); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_CHAT_1, 25); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -5777,20 +5747,20 @@ cAudioManager::GetHFYSTTalkSfx(CPed *ped, int16 sound) { uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 5736, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 5747, 4); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 5755, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5741, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5753, 2); break; - case SOUND_PED_TAXI_WAIT: return 5759; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5722, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5712, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5729, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5695, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5678, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 5751, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5685, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5703, 9); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_JACKING_1, 4); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_MUGGING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_MUGGED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_HFYST_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_BLOCKED_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_LOST_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYST_CHAT_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -5802,18 +5772,18 @@ cAudioManager::GetHFOSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 4382, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4388, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4398, 3); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 4401, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4363, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4353, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4371, 11); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4334, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 4313, 9); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 4396, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4322, 12); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4342, 11); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_GUN_COOL_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_MUGGED_1, 3); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_GENERIC_CRASH_1, 11); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_BLOCKED_1, 9); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_LOST_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_BUMP_1, 12); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOST_CHAT_1, 11); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -5825,16 +5795,16 @@ cAudioManager::GetHMYSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7961, 6); break; - case SOUND_PED_ACCIDENTREACTION1: return 7971; - case SOUND_PED_TAXI_WAIT: return 7974; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7946, 6); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7967, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7954, 7); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 7952, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7972, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7922, 13); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7935, 11); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_GUN_PANIC_1, 6); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HMYST_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_HMYST_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_DODGE_1, 6); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_BUMP_1, 13); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYST_CHAT_1, 11); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -5846,20 +5816,20 @@ cAudioManager::GetHMOSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 5820, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 5831, 3); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5825, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5836, 2); break; - case SOUND_PED_TAXI_WAIT: return 5838; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5805, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5795, 9); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5813, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5777, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5760, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 5834, 2); break; - case SOUND_PED_CHAT_SEXY: return 5804; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5767, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5784, 11); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_JACKING_1, 3); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_MUGGED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_HMOST_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_DODGE_1, 9); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_BLOCKED_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: return SFX_HMOST_EYEING_1; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HMOST_CHAT_1, 11); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -5871,19 +5841,19 @@ cAudioManager::GetHFYRITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6965, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6970, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6978, 4); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6986, 2); break; - case SOUND_PED_TAXI_WAIT: return 6991; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6948, 10); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 6982, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6958, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6940, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6923, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 6976, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 6988, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6931, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_MUGGED_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_HFYRI_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_DODGE_1, 10); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_LOST_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFYRI_BUMP_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -5895,20 +5865,20 @@ cAudioManager::GetHFORITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7244, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7250, 9); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7261, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 7267; - case SOUND_PED_TAXI_WAIT: return 7270; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7229, 6); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7263, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7237, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7222, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 7206, 6); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 7259, 2); break; - case SOUND_153: GetPhrase(sfx, ped->m_lastComment, 7235, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7268, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7212, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_GUN_PANIC_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_JACKED_1, 9); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HFORI_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_HFORI_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_DODGE_1, 6); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_BLOCKED_1, 6); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFORI_BUMP_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -5920,17 +5890,17 @@ cAudioManager::GetHMYRITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 5890, 7); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 5905, 3); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5897, 8); break; - case SOUND_PED_ROBBED: return 5908; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5873, 5); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5864, 9); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5878, 12); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5856, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5839, 7); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 5909, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5846, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_GUN_PANIC_1, 7); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_JACKING_1, 3); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_JACKED_1, 8); break; + case SOUND_PED_ROBBED: return SFX_HMYRI_MUGGED_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_FIGHT_1, 5); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_DODGE_1, 9); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_GENERIC_CRASH_1, 12); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_BLOCKED_1, 7); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMYRI_BUMP_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -5943,18 +5913,18 @@ cAudioManager::GetHMORITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4454, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4459, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4469, 3); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 4478, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4436, 7); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 4472, 6); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4443, 11); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4422, 6); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 4403, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 4467, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4411, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4428, 8); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_MUGGED_1, 3); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_DODGE_1, 7); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_RUN_1, 6); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_GENERIC_CRASH_1, 11); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_CAR_CRASH_1, 6); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_LOST_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HMORI_CHAT_1, 8); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -5966,16 +5936,19 @@ cAudioManager::GetHFYBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6897, 7); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6904, 7); break; - case SOUND_PED_TAXI_WAIT: return 6922; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6878, 11); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6889, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6862, 6); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 6911, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 6920, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6854, 8); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 6868, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_GUN_PANIC_1, 7); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_JACKED_1, 7); break; + case SOUND_PED_TAXI_WAIT: return SFX_HFYBE_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_DODGE_1, 11); break; +#ifdef FIX_BUGS // assumption + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_RUN_1, 7); break; +#endif + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_CAR_CRASH_1, 6); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_LOST_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_BUMP_1, 8); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBE_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -5987,19 +5960,19 @@ cAudioManager::GetHFOBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 1018, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 1023, 6); break; - case SOUND_PED_ACCIDENTREACTION1: return 1035; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 1038, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 1006, 7); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 1031, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 1013, 5); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 990, 6); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 973, 6); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 1029, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 1036, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 979, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 996, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_JACKED_1, 6); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HFOBE_SAVED_1; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_DODGE_1, 7); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_GENERIC_CRASH_1, 5); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_CAR_CRASH_1, 6); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_BLOCKED_1, 6); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_LOST_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOBE_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6011,20 +5984,20 @@ cAudioManager::GetHMYBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4892, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4902, 12); break; - case SOUND_PED_ACCIDENTREACTION1: return 4917; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 4898, 4); break; - case SOUND_PED_TAXI_WAIT: return 4920; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4874, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4862, 7); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4882, 10); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4845, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 4914, 3); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 4869, 5); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 4918, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4835, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4852, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_GUN_PANIC_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_JACKED_1, 12); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HMYBE_SAVED_1; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_INNOCENT_1, 4); break; + case SOUND_PED_TAXI_WAIT: return SFX_HMYBE_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_DODGE_1, 7); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_GENERIC_CRASH_1, 10); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_CAR_CRASH_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_LOST_1, 3); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_EYEING_1, 5); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYBE_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6036,13 +6009,13 @@ cAudioManager::GetHMOBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4703, 3); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4709, 6); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 4706, 3); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4690, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 4672, 10); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 4699, 4); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4682, 8); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HMOBE_GUN_PANIC_1, 3); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HMOBE_JACKED_1, 6); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_HMOBE_INNOCENT_1, 3); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMOBE_DODGE_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HMOBE_BLOCKED_1, 10); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_HMOBE_EYEING_1, 4); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMOBE_BUMP_1, 8); break; default: return GetGenericMaleTalkSfx(ped, sound); } @@ -6056,19 +6029,19 @@ cAudioManager::GetHFYBUTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4771, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 4782, 3); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4776, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4787, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 4789; - case SOUND_PED_TAXI_WAIT: return 4790; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4752, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4742, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4759, 12); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4734, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 4715, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 4785, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4723, 11); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_JACKING_1, 3); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HFYBU_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_HFYBU_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_GENERIC_CRASH_1, 12); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_LOST_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFYBU_BUMP_1, 11); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6080,14 +6053,18 @@ cAudioManager::GetHFYMDTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6014, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6019, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6021, 3); break; - case SOUND_PED_TAXI_WAIT: return 8231; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 6005, 9); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5997, 8); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 6024, 15); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5988, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYMD_GUN_PANIC_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYMD_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_HFYMD_SAVED_1, 3); break; +#ifdef FIX_BUGS + case SOUND_PED_TAXI_WAIT: return SFX_HFYMD_TAXI_1; +#else + case SOUND_PED_TAXI_WAIT: return SFX_BFOBE_TAXI_1; +#endif + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYMD_FIGHT_1, 9); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYMD_DODGE_1, 8); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYMD_SOLICIT_1, 15); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFYMD_BUMP_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6099,14 +6076,18 @@ cAudioManager::GetHFYCGTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4808, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4813, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 4819; - case SOUND_PED_TAXI_WAIT: return 8231; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4800, 8); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 4815, 4); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 4820, 14); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4791, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HFYCG_GUN_PANIC_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYCG_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HFYCG_SAVED_1; +#ifdef FIX_BUGS + case SOUND_PED_TAXI_WAIT: return SFX_HFYCG_TAXI_1; +#else + case SOUND_PED_TAXI_WAIT: return SFX_BFOBE_TAXI_1; +#endif + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYCG_DODGE_1, 8); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HFYCG_RUN_1, 4); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYCG_SOLICIT_1, 14); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFYCG_BUMP_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6118,17 +6099,17 @@ cAudioManager::GetHFYPRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 5964, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5970, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5972; - case SOUND_PED_PLAYER_BEFORESEX: GetPhrase(sfx, ped->m_lastComment, 5956, 8); break; - case SOUND_PED_TAXI_WAIT: return 5987; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5946, 10); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5934, 9); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 5973, 14); break; - case SOUND_153: GetPhrase(sfx, ped->m_lastComment, 5943, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5912, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5922, 12); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_GUN_COOL_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HFYPR_SAVED_1; + case SOUND_PED_PLAYER_BEFORESEX: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_FUCKING_1, 8); break; + case SOUND_PED_TAXI_WAIT: return SFX_HFYPR_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_FIGHT_1, 10); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_DODGE_1, 9); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_SOLICIT_1, 14); break; + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_EYEING_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HFYPR_CHAT_1, 12); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6140,15 +6121,15 @@ cAudioManager::GetHFOTRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 4660, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4665, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 4667; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 4670, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4654, 6); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4646, 8); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 4668, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4623, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4634, 12); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_GUN_COOL_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_HFOTR_SAVED_1; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_FIGHT_1, 6); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_DODGE_1, 8); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HFOTR_CHAT_1, 12); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6160,15 +6141,15 @@ cAudioManager::GetHMOTRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 4515, 6); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 4521, 2); break; - case SOUND_PED_TAXI_WAIT: return 4534; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4508, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4497, 11); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 4526, 8); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 4523, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4480, 8); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4488, 9); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_GUN_COOL_1, 6); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_HMOTR_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_DODGE_1, 11); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_SOLICIT_1, 8); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_BUMP_1, 8); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HMOTR_CHAT_1, 9); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6180,21 +6161,21 @@ cAudioManager::GetHMYAPTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4591, 7); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 4605, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4598, 7); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4611, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 4619, 2); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 4621, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4573, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 4613, 6); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4585, 6); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4555, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 4535, 9); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 4609, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 4582, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4544, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4564, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_GUN_PANIC_1, 7); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_JACKED_1, 7); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_RUN_1, 6); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_GENERIC_CRASH_1, 6); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_BLOCKED_1, 9); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_EYEING_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HMYAP_CHAT_1, 9); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6206,16 +6187,16 @@ cAudioManager::GetHMOCATalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 3506, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 3521, 11); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 3511, 10); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 3532, 7); break; - case SOUND_PED_TAXI_WAIT: return 3541; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 3539, 2); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3486, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3478, 8); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 3504, 2); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3494, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_JACKING_1, 11); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_JACKED_1, 10); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_MUGGED_1, 7); break; + case SOUND_PED_TAXI_WAIT: return SFX_HMOCA_TAXI_1; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_RUN_1, 2); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_BLOCKED_1, 8); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_EYEING_1, 2); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HMOCA_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6227,26 +6208,27 @@ cAudioManager::GetBMODKTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6831, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6838, 9); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6847, 2); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 6835, 3); break; - case SOUND_PED_TAXI_WAIT: return 6853; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6817, 7); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 6849, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6824, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6794, 10); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6776, 8); break; - case SOUND_PED_147: - GetPhrase(sfx, ped->m_lastComment, 6805, 11); + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_GUN_PANIC_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_JACKED_1, 9); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_MUGGED_1, 2); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_INNOCENT_1, 3); break; + case SOUND_PED_TAXI_WAIT: return SFX_BMODK_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_DODGE_1, 7); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_CAR_CRASH_1, 10); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_BLOCKED_1, 8); break; + case SOUND_PED_147: // this is some cut behaviour, the guy was selling something + GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_UNK_147_1, 11); + // what is this? some sort of censorship? switch(sfx) { - case 6809: - case 6810: - case 6811: GetPhrase(sfx, ped->m_lastComment, 6805, 4); break; + case SFX_BMODK_UNK_147_5: + case SFX_BMODK_UNK_147_6: + case SFX_BMODK_UNK_147_7: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_UNK_147_1, 4); break; default: break; } break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6784, 10); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMODK_BUMP_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6258,20 +6240,20 @@ cAudioManager::GetBMYCRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 6578, 6); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 6594, 12); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 6609, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6588, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6606, 3); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6615, 2); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 6584, 4); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 6563, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6553, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6571, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6544, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6521, 12); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 6561, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6533, 11); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_GUN_COOL_1, 6); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_JACKING_1, 12); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_MUGGING_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_MUGGED_1, 3); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_SAVED_1, 2); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_INNOCENT_1, 4); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_DODGE_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_BLOCKED_1, 12); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMYCR_BUMP_1, 11); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6283,19 +6265,19 @@ cAudioManager::GetBFYSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7184, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7188, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7195, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 7203, 2); break; - case SOUND_PED_TAXI_WAIT: return 7205; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7167, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7197, 6); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7176, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7149, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 7132, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 7193, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7140, 9); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7158, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_GUN_PANIC_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_JACKED_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_BFYST_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_RUN_1, 6); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_LOST_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_BUMP_1, 9); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYST_CHAT_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6307,19 +6289,19 @@ cAudioManager::GetBFOSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7046, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7051, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7061, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 7067, 2); break; - case SOUND_PED_TAXI_WAIT: return 7069; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7027, 11); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7063, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7038, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7009, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6992, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 7059, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6999, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7017, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_BFOST_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_DODGE_1, 11); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_BLOCKED_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_LOST_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BFOST_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6331,19 +6313,23 @@ cAudioManager::GetBMYSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 6413, 6); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 6427, 4); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 6433, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6419, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6431, 2); break; - case SOUND_PED_TAXI_WAIT: return 6437; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 6400, 6); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6392, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6406, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6371, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6352, 8); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6360, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 6380, 12); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_GUN_COOL_1, 6); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_JACKING_1, 4); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_MUGGING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_MUGGED_1, 2); break; +#ifdef FIX_BUGS + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_TAXI_1, 2); break; +#else + case SOUND_PED_TAXI_WAIT: return SFX_BMYST_TAXI_1; +#endif + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_FIGHT_1, 6); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_DODGE_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_BLOCKED_1, 8); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYST_CHAT_1, 12); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6355,18 +6341,18 @@ cAudioManager::GetBMOSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4292, 9); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4307, 4); break; - case SOUND_PED_ACCIDENTREACTION1: return 4311; - case SOUND_PED_TAXI_WAIT: return 4312; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4272, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4258, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4279, 13); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4232, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 4301, 6); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 4266, 6); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4215, 17); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4240, 18); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_GUN_PANIC_1, 9); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_MUGGED_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BMOST_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_BMOST_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_DODGE_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_GENERIC_CRASH_1, 13); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_CAR_CRASH_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_LOST_1, 6); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_EYEING_1, 6); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_BUMP_1, 17); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BMOST_CHAT_1, 18); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6378,21 +6364,21 @@ cAudioManager::GetBFYRITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6161, 4); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 6173, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6165, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6179, 3); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6188, 2); break; - case SOUND_PED_TAXI_WAIT: return 6194; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6143, 8); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 6182, 6); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6154, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6135, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6117, 9); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 6177, 2); break; - case SOUND_153: GetPhrase(sfx, ped->m_lastComment, 6151, 3); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 6190, 4); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6126, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_GUN_PANIC_1, 4); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_MUGGED_1, 3); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_BFYRI_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_DODGE_1, 8); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_RUN_1, 6); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_BLOCKED_1, 9); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_EYEING_1, 3); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_SHOCKED_1, 4); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BFYRI_BUMP_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6404,19 +6390,19 @@ cAudioManager::GetBFORITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7110, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7115, 4); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7121, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 7127; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 7130, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7094, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7123, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7103, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7087, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 7070, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 7119, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7128, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7078, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_JACKED_1, 4); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BFORI_SAVED_1; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_LOST_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BFORI_BUMP_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6429,20 +6415,20 @@ cAudioManager::GetBMYRITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 5430, 7); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5437, 4); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5443, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5449; - case SOUND_PED_TAXI_WAIT: return 5453; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5414, 8); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 5445, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5423, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5407, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5394, 6); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 5441, 2); break; - case SOUND_PED_CHAT_SEXY: return 5422; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 5450, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5400, 7); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_GUN_PANIC_1, 7); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_JACKED_1, 4); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BMYRI_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_BMYRI_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_DODGE_1, 8); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_BLOCKED_1, 6); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: return SFX_BMYRI_EYEING_1; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMYRI_BUMP_1, 7); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6454,20 +6440,28 @@ cAudioManager::GetBFYBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 6255, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6261, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6273, 5); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6284, 2); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 6290, 3); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6233, 10); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 6278, 6); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6247, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6207, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6195, 12); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 6269, 4); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 6243, 4); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 6286, 4); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 6217, 16); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_GUN_COOL_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_MUGGED_1, 5); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_TAXI_1, 3); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_DODGE_1, 10); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_RUN_1, 6); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_GENERIC_CRASH_1, 8); break; +#ifdef FIX_BUGS + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_CAR_CRASH_1, 10); break; +#else + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_CAR_CRASH_1, 8); break; +#endif + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_BLOCKED_1, 12); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_LOST_1, 4); break; +#ifdef FIX_BUGS + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_EYEING_1, 4); break; +#else + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_EYEING_1, 4); break; +#endif + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_SHOCKED_1, 4); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYBE_CHAT_1, 16); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6479,21 +6473,21 @@ cAudioManager::GetBMYBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 956, 4); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 966, 3); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 960, 6); break; - case SOUND_PED_ROBBED: return 970; - case SOUND_PED_ACCIDENTREACTION1: return 971; - case SOUND_PED_TAXI_WAIT: return 972; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 940, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 928, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 948, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 910, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 892, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: return 969; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 938, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 900, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 918, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_GUN_COOL_1, 4); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_JACKING_1, 3); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_JACKED_1, 6); break; + case SOUND_PED_ROBBED: return SFX_BMYBE_MUGGED_1; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BMYBE_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_BMYBE_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: return SFX_BMYBE_LOST_1; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBE_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6502,22 +6496,21 @@ cAudioManager::GetBMYBETalkSfx(CPed *ped, int16 sound) uint32 cAudioManager::GetBFOBETalkSfx(CPed *ped, int16 sound) { - uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 8213, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 8223, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 8218, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 8227, 2); break; - case SOUND_PED_TAXI_WAIT: return 8231; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8197, 9); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 8206, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 8182, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 8166, 8); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 8229, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 8174, 8); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 8189, 8); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_JACKED_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_MUGGED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_BFOBE_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_DODGE_1, 9); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_BLOCKED_1, 8); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_BUMP_1, 8); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BFOBE_CHAT_1, 8); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6529,18 +6522,18 @@ cAudioManager::GetBMOBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7611, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7616, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7622, 4); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 7626, 3); break; - case SOUND_PED_TAXI_WAIT: return 7632; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 7594, 10); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7583, 11); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7604, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7564, 9); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7629, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7559, 5); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7573, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_MUGGED_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_SAVED_1, 3); break; + case SOUND_PED_TAXI_WAIT: return SFX_BMOBE_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_FIGHT_1, 10); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_DODGE_1, 11); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_CAR_CRASH_1, 9); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_BUMP_1, 5); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BMOBE_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6552,20 +6545,20 @@ cAudioManager::GetBMYBUTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 5500, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5507, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5513, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5515; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 5505, 2); break; - case SOUND_PED_TAXI_WAIT: return 5518; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5488, 5); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5476, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5493, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5469, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5454, 8); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 5486, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 5516, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5462, 7); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BMYBU_SAVED_1; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_INNOCENT_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_BMYBU_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_FIGHT_1, 5); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_BLOCKED_1, 8); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBU_BUMP_1, 7); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6577,17 +6570,17 @@ cAudioManager::GetBFYPRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 5369, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5374, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5376; - case SOUND_PED_PLAYER_BEFORESEX: GetPhrase(sfx, ped->m_lastComment, 5362, 7); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 5392, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5355, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5348, 7); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 5379, 13); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 5377, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5324, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5335, 13); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_GUN_COOL_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BFYPR_SAVED_1; + case SOUND_PED_PLAYER_BEFORESEX: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_FUCKING_1, 7); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_DODGE_1, 7); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_SOLICIT_1, 13); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BFYPR_CHAT_1, 13); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6599,17 +6592,17 @@ cAudioManager::GetBFOTRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 5232, 6); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 5240, 3); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5238, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5243; - case SOUND_PED_TAXI_WAIT: return 5252; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5226, 6); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5217, 9); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 5247, 5); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 5244, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5192, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5202, 15); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_GUN_COOL_1, 6); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_MUGGING_1, 3); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BFOTR_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_BFOTR_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_FIGHT_1, 6); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_DODGE_1, 9); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_SOLICIT_1, 5); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BFOTR_CHAT_1, 15); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6621,16 +6614,16 @@ cAudioManager::GetBMOTRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 6327, 5); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6343, 1); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 6332, 4); break; - case SOUND_PED_TAXI_WAIT: return 6351; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6313, 11); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 6336, 7); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 6344, 7); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 6324, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6293, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 6303, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_GUN_COOL_1, 5); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_SAVED_1, 1); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_INNOCENT_1, 4); break; + case SOUND_PED_TAXI_WAIT: return SFX_BMOTR_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_DODGE_1, 11); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_RUN_1, 7); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_SOLICIT_1, 7); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_EYEING_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BMOTR_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6642,19 +6635,19 @@ cAudioManager::GetBMYPITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 4033, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 4044, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4038, 6); break; - case SOUND_PED_ROBBED: return 4048; - case SOUND_PED_ACCIDENTREACTION1: return 4049; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 4050, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4012, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3998, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4020, 13); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3993, 5); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3978, 6); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 4008, 4); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3984, 9); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_JACKED_1, 6); break; + case SOUND_PED_ROBBED: return SFX_BMYPI_MUGGED_1; + case SOUND_PED_ACCIDENTREACTION1: return SFX_BMYPI_SAVED_1; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_GENERIC_CRASH_1, 13); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_CAR_CRASH_1, 5); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_BLOCKED_1, 6); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_EYEING_1, 4); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMYPI_BUMP_1, 9); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6666,25 +6659,25 @@ cAudioManager::GetBMYBBTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 639, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 659, 9); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 691, 8); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 648, 11); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 686, 5); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 699, 6); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 644, 4); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 711, 3); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 618, 12); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 584, 18); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 630, 9); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 554, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 524, 13); break; - case SOUND_PED_149: GetPhrase(sfx, ped->m_lastComment, 668, 16); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 684, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 602, 16); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 705, 6); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 537, 17); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 563, 21); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_JACKING_1, 9); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_MUGGING_1, 8); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_JACKED_1, 11); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_MUGGED_1, 5); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_SAVED_1, 6); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_INNOCENT_1, 4); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_TAXI_1, 3); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_FIGHT_1, 12); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_DODGE_1, 18); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_GENERIC_CRASH_1, 9); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_BLOCKED_1, 13); break; + case SOUND_PED_JEER: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_JEER_1, 16); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_EYEING_1, 16); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_SHOCKED_1, 6); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_BUMP_1, 17); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BMYBB_CHAT_1, 21); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6696,16 +6689,16 @@ cAudioManager::GetWMYCRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 5056, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 5061, 6); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 5070, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5067, 3); break; - case SOUND_PED_TAXI_WAIT: return 5075; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5040, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5030, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5047, 9); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5021, 9); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5003, 18); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_JACKING_1, 6); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_MUGGING_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_MUGGED_1, 3); break; + case SOUND_PED_TAXI_WAIT: return SFX_WMYCR_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_GENERIC_CRASH_1, 9); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_CAR_CRASH_1, 9); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCR_BUMP_1, 18); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6717,21 +6710,21 @@ cAudioManager::GetWFYSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 8445, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 8456, 4); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 8463, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 8450, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 8461, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 8467; - case SOUND_PED_TAXI_WAIT: return 8468; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 8430, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8420, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 8437, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 8402, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 8386, 6); break; - case SOUND_PED_WAIT_DOUBLEBACK: return 8460; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 8392, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 8410, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_JACKING_1, 4); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_MUGGING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFYST_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WFYST_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_BLOCKED_1, 6); break; + case SOUND_PED_WAIT_DOUBLEBACK: return SFX_WFYST_LOST_1; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYST_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6743,19 +6736,19 @@ cAudioManager::GetWFOSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 8354, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 8358, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 8369, 5); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 8381, 4); break; - case SOUND_PED_TAXI_WAIT: return 8385; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8332, 12); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 8374, 7); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 8344, 10); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 8305, 11); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 8274, 12); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 8366, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 8286, 19); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 8316, 16); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_GUN_PANIC_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_MUGGED_1, 5); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_SAVED_1, 4); break; + case SOUND_PED_TAXI_WAIT: return SFX_WFOST_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_DODGE_1, 12); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_RUN_1, 7); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_GENERIC_CRASH_1, 10); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_CAR_CRASH_1, 11); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_BLOCKED_1, 12); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_LOST_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_BUMP_1, 19); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOST_CHAT_1, 16); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6767,22 +6760,22 @@ cAudioManager::GetWMYSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 3947, 5); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 3963, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 3955, 5); break; - case SOUND_PED_ROBBED: return 3962; - case SOUND_PED_ACCIDENTREACTION1: return 3975; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 3952, 3); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 3976, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3930, 10); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 3968, 7); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 3942, 5); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3912, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3893, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 3960, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 3940, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3901, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3920, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_GUN_PANIC_1, 5); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_MUGGING_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_JACKED_1, 5); break; + case SOUND_PED_ROBBED: return SFX_WMYST_MUGGED_1; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMYST_SAVED_1; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_INNOCENT_1, 3); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_DODGE_1, 10); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_RUN_1, 7); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_GENERIC_CRASH_1, 5); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYST_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6794,22 +6787,22 @@ cAudioManager::GetWMOSTTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 5170, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5178, 4); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5188, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5190; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 5175, 3); break; - case SOUND_PED_TAXI_WAIT: return 5191; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5155, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5145, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5163, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5129, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5111, 8); break; - case SOUND_PED_149: GetPhrase(sfx, ped->m_lastComment, 5182, 4); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 5186, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 5153, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5119, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5136, 9); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_JACKED_1, 4); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMOST_SAVED_1; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_INNOCENT_1, 3); break; + case SOUND_PED_TAXI_WAIT: return SFX_WMOST_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_DODGE_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_BLOCKED_1, 8); break; + case SOUND_PED_JEER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_JEER_1, 4); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOST_CHAT_1, 9); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6821,20 +6814,20 @@ cAudioManager::GetWFYRITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 5299, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5304, 7); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5313, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5320; - case SOUND_PED_TAXI_WAIT: return 5323; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5280, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 5315, 5); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5291, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5271, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5253, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 5311, 2); break; - case SOUND_153: GetPhrase(sfx, ped->m_lastComment, 5289, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 5321, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5261, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_JACKED_1, 7); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFYRI_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WFYRI_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_RUN_1, 5); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYRI_BUMP_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6846,19 +6839,19 @@ cAudioManager::GetWFORITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7825, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7831, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7839, 3); break; - case SOUND_PED_ACCIDENTREACTION1: return 7842; - case SOUND_PED_TAXI_WAIT: return 7846; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 7810, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7799, 11); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7817, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7789, 10); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 7771, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 7837, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7843, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7778, 11); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_GUN_PANIC_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_MUGGED_1, 3); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFORI_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WFORI_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_DODGE_1, 11); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_CAR_CRASH_1, 10); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_BLOCKED_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_LOST_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFORI_BUMP_1, 11); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6870,19 +6863,22 @@ cAudioManager::GetWMYRITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4186, 8); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4194, 8); break; - case SOUND_PED_ACCIDENTREACTION1: return 4208; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 4213, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4163, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 4203, 5); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4175, 11); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4144, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 4126, 10); break; - case SOUND_PED_WAIT_DOUBLEBACK: return 4202; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 4172, 3); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 4209, 4); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4136, 8); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_GUN_PANIC_1, 8); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_JACKED_1, 8); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMYRI_SAVED_1; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_RUN_1, 5); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_GENERIC_CRASH_1, 11); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_BLOCKED_1, 10); break; + case SOUND_PED_WAIT_DOUBLEBACK: return SFX_WMYRI_LOST_1; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_EYEING_1, 3); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_SHOCKED_1, 4); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_BUMP_1, 8); break; +#ifdef FIX_BUGS + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYRI_CHAT_1, 10); break; +#endif default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6894,20 +6890,20 @@ cAudioManager::GetWMORITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6668, 9); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6677, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6685, 4); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6701, 2); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 6707, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6647, 10); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 6689, 12); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6660, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6641, 6); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6617, 10); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 6683, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 6657, 3); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 6703, 4); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6627, 14); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_GUN_PANIC_1, 9); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_MUGGED_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_DODGE_1, 10); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_RUN_1, 12); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_CAR_CRASH_1, 6); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_BLOCKED_1, 10); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_EYEING_1, 3); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_SHOCKED_1, 4); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMORI_BUMP_1, 14); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6919,18 +6915,18 @@ cAudioManager::GetWFYBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7752, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7757, 4); break; - case SOUND_PED_ACCIDENTREACTION1: return 7766; - case SOUND_PED_TAXI_WAIT: return 7770; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7738, 8); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7761, 5); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7746, 6); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7722, 6); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 7704, 7); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7767, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7711, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7728, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_JACKED_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFYBE_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WFYBE_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_DODGE_1, 8); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_RUN_1, 5); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_GENERIC_CRASH_1, 6); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_CAR_CRASH_1, 6); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_BLOCKED_1, 7); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBE_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6942,20 +6938,20 @@ cAudioManager::GetWMYBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 8127, 8); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 8142, 3); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 8135, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8105, 12); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 8155, 5); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 8119, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 8086, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 8063, 9); break; - case SOUND_PED_149: GetPhrase(sfx, ped->m_lastComment, 8145, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 8152, 3); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 8117, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 8160, 6); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 8072, 14); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 8094, 11); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_GUN_PANIC_1, 8); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_JACKING_1, 3); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_JACKED_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_DODGE_1, 12); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_RUN_1, 5); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_BLOCKED_1, 9); break; + case SOUND_PED_JEER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_JEER_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_LOST_1, 3); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_SHOCKED_1, 6); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_BUMP_1, 14); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBE_CHAT_1, 11); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -6967,18 +6963,18 @@ cAudioManager::GetWFOBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6093, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6098, 4); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6109, 3); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 6115, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6075, 8); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 6102, 7); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6083, 10); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6058, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6040, 8); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 6112, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6048, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 6065, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_JACKED_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_SAVED_1, 3); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_DODGE_1, 8); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_RUN_1, 7); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_GENERIC_CRASH_1, 10); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_BLOCKED_1, 8); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOBE_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -6990,21 +6986,21 @@ cAudioManager::GetWMOBETalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 3759, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 3772, 4); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 3792, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 3764, 8); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 3802, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3742, 8); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 3798, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 3752, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3724, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3706, 6); break; - case SOUND_PED_149: GetPhrase(sfx, ped->m_lastComment, 3776, 16); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 3750, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 3804, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3712, 12); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3732, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_JACKING_1, 4); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_MUGGING_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_JACKED_1, 8); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_SAVED_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_DODGE_1, 8); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_BLOCKED_1, 6); break; + case SOUND_PED_JEER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_JEER_1, 16); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_BUMP_1, 12); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7016,21 +7012,24 @@ cAudioManager::GetWMYCWTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 5650, 6); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 5670, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 5659, 6); break; - case SOUND_PED_ROBBED: return 5676; - case SOUND_PED_TAXI_WAIT: return 5677; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5635, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5622, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 5643, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 5598, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5580, 9); break; - case SOUND_PED_149: GetPhrase(sfx, ped->m_lastComment, 5665, 5); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 5674, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 5632, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5589, 9); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5607, 15); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_GUN_PANIC_1, 6); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_JACKED_1, 6); break; + case SOUND_PED_ROBBED: return SFX_WMYCW_MUGGED_1; +#ifdef FIX_BUGS + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_INNOCENT_1, 3); break; +#endif + case SOUND_PED_TAXI_WAIT: return SFX_WMYCW_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_BLOCKED_1, 9); break; + case SOUND_PED_JEER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_JEER_1, 5); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_EYEING_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_BUMP_1, 9); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYCW_CHAT_1, 15); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7042,19 +7041,19 @@ cAudioManager::GetWMYGOTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7679, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7684, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7690, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 7698; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 7701, 3); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7659, 11); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7692, 6); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7672, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7642, 7); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 7670, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7699, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7633, 9); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7649, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMYGO_SAVED_1; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_TAXI_1, 3); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_DODGE_1, 11); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_RUN_1, 6); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_CAR_CRASH_1, 7); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_BUMP_1, 9); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYGO_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7066,18 +7065,18 @@ cAudioManager::GetWFOGOTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7904, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7909, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7915, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 7919; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 7883, 14); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7874, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7917, 2); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7897, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7855, 8); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7920, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7847, 8); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7863, 11); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFOGO_SAVED_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_FIGHT_1, 14); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_RUN_1, 2); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_CAR_CRASH_1, 8); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_BUMP_1, 8); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOGO_CHAT_1, 11); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7089,19 +7088,19 @@ cAudioManager::GetWMOGOTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 4982, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 4987, 6); break; - case SOUND_PED_ACCIDENTREACTION1: return 4998; - case SOUND_PED_TAXI_WAIT: return 5002; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4961, 13); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4947, 12); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 4993, 5); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 4974, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 4929, 9); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 4959, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 4999, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4921, 8); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4938, 9); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_GUN_PANIC_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_JACKED_1, 6); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMOGO_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WMOGO_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_FIGHT_1, 13); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_DODGE_1, 12); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_RUN_1, 5); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_CAR_CRASH_1, 9); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_BUMP_1, 8); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOGO_CHAT_1, 9); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7113,13 +7112,13 @@ cAudioManager::GetWFYLGTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 8267, 5); break; - case SOUND_PED_ACCIDENTREACTION1: return 8272; - case SOUND_PED_TAXI_WAIT: return 8273; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 8260, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8252, 8); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 8232, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 8242, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFYLG_GUN_COOL_1, 5); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFYLG_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WFYLG_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYLG_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYLG_DODGE_1, 8); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYLG_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYLG_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7131,13 +7130,13 @@ cAudioManager::GetWMYLGTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 3698, 6); break; - case SOUND_PED_ACCIDENTREACTION1: return 3704; - case SOUND_PED_TAXI_WAIT: return 3705; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 3691, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3682, 9); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3662, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3672, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WMYLG_GUN_COOL_1, 6); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMYLG_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WMYLG_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYLG_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYLG_DODGE_1, 9); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYLG_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYLG_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7149,15 +7148,15 @@ cAudioManager::GetWFYBUTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7309, 8); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 7317, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7325, 4); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 7340, 2); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7329, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 7301, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7292, 9); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7337, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7271, 21); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_GUN_PANIC_1, 8); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_MUGGED_1, 4); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_TAXI_1, 2); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_RUN_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_CAR_CRASH_1, 9); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYBU_BUMP_1, 21); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7169,22 +7168,26 @@ cAudioManager::GetWMYBUTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 3862, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 3870, 5); break; - case SOUND_PED_ROBBED: return 3880; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 3884, 2); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 3868, 2); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 3891, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3845, 10); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 3881, 3); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 3857, 5); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3826, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3706, 6); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 3875, 5); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 3855, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 3886, 5); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3815, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3835, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_GUN_PANIC_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_JACKED_1, 5); break; + case SOUND_PED_ROBBED: return SFX_WMYBU_MUGGED_1; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_SAVED_1, 2); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_INNOCENT_1, 2); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_DODGE_1, 10); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_RUN_1, 3); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_GENERIC_CRASH_1, 5); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_CAR_CRASH_1, 9); break; +#ifdef FIX_BUGS + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_BLOCKED_1, 9); break; +#else + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBE_BLOCKED_1, 6); break; +#endif + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_LOST_1, 5); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_SHOCKED_1, 5); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYBU_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7196,19 +7199,19 @@ cAudioManager::GetWMOBUTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 6753, 6); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6759, 7); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6769, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6771, 3); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 6774, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 6743, 3); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6733, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6746, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6726, 7); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6709, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 6766, 3); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 6741, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6716, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_GUN_PANIC_1, 6); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_JACKED_1, 7); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_SAVED_1, 3); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_FIGHT_1, 3); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_DODGE_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_CAR_CRASH_1, 7); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_BLOCKED_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_LOST_1, 3); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMOBU_BUMP_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7220,16 +7223,16 @@ cAudioManager::GetWFYPRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 4101, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 4107, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 4109; - case SOUND_PED_PLAYER_BEFORESEX: GetPhrase(sfx, ped->m_lastComment, 4096, 5); break; - case SOUND_PED_TAXI_WAIT: return 4125; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 4087, 9); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 4077, 10); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 4110, 15); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 4052, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 4063, 14); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_GUN_COOL_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFYPR_SAVED_1; + case SOUND_PED_PLAYER_BEFORESEX: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_FUCKING_1, 5); break; + case SOUND_PED_TAXI_WAIT: return SFX_WFYPR_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_FIGHT_1, 9); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_DODGE_1, 10); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_SOLICIT_1, 15); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYPR_CHAT_1, 14); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7241,14 +7244,14 @@ cAudioManager::GetWFOTRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 7371, 6); break; - case SOUND_PED_ACCIDENTREACTION1: return 7383; - case SOUND_PED_TAXI_WAIT: return 7393; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7362, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7377, 6); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 7384, 9); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7342, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7353, 9); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFOTR_GUN_COOL_1, 6); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFOTR_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WFOTR_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOTR_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFOTR_RUN_1, 6); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOTR_SOLICIT_1, 9); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFOTR_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOTR_CHAT_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7260,16 +7263,16 @@ cAudioManager::GetWMOTRTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 7542, 5); break; - case SOUND_PED_ACCIDENTREACTION1: return 7547; - case SOUND_PED_TAXI_WAIT: return 7558; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 7536, 6); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7517, 17); break; - case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, 7551, 7); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 7534, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7548, 3); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7494, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7504, 13); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_GUN_COOL_1, 5); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMOTR_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WMOTR_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_FIGHT_1, 6); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_DODGE_1, 17); break; + case SOUND_PED_SOLICIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_SOLICIT_1, 7); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_SHOCKED_1, 3); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMOTR_CHAT_1, 13); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7281,20 +7284,24 @@ cAudioManager::GetWMYPITalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 6496, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 6509, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 6503, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 6513, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 6515, 2); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 6501, 2); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 6517, 4); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 6479, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 6465, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 6488, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 6457, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 6439, 8); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 6473, 6); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 6447, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_SAVED_1, 2); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_INNOCENT_1, 2); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_TAXI_1, 4); break; +#ifdef FIX_BUGS + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_FIGHT_1, 9); break; +#else + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_FIGHT_1, 7); break; +#endif + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_DODGE_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_BLOCKED_1, 8); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_EYEING_1, 6); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYPI_BUMP_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7306,19 +7313,19 @@ cAudioManager::GetWMOCATalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 8032, 6); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 8048, 11); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 8038, 10); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 8059, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 8061; - case SOUND_PED_TAXI_WAIT: return 8062; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 8015, 8); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8003, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 8023, 9); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 7993, 10); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 7975, 12); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 8013, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7987, 6); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_GUN_PANIC_1, 6); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_JACKING_1, 11); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_JACKED_1, 10); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMOCA_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WMOCA_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_FIGHT_1, 8); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_GENERIC_CRASH_1, 9); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_CAR_CRASH_1, 10); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_BLOCKED_1, 12); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMOCA_BUMP_1, 6); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7329,12 +7336,12 @@ cAudioManager::GetWFYJGTalkSfx(CPed *ped, int16 sound) { uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 7414, 4); break; - case SOUND_PED_ACCIDENTREACTION1: sfx = 7424; break; - case SOUND_PED_TAXI_WAIT: sfx = 7425; break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7406, 8); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7418, 6); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7394, 12); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYJG_GUN_PANIC_1, 4); break; + case SOUND_PED_ACCIDENTREACTION1: sfx = SFX_WFYJG_SAVED_1; break; + case SOUND_PED_TAXI_WAIT: sfx = SFX_WFYJG_TAXI_1; break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYJG_DODGE_1, 8); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFYJG_RUN_1, 6); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYJG_BUMP_1, 12); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7346,14 +7353,14 @@ cAudioManager::GetWMYJGTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 5098, 4); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5102, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 5109; - case SOUND_PED_TAXI_WAIT: return 5110; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 5104, 5); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 5076, 10); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 5096, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5086, 10); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYJG_GUN_PANIC_1, 4); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYJG_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WMYJG_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WMYJG_TAXI_1; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WMYJG_RUN_1, 5); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYJG_BLOCKED_1, 10); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYJG_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYJG_BUMP_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7365,14 +7372,14 @@ cAudioManager::GetWFYSKTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 3652, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 3657, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 3659, 2); break; - case SOUND_PED_TAXI_WAIT: return 3661; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 3641, 11); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3632, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3603, 11); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3614, 18); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSK_GUN_PANIC_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSK_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSK_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: return SFX_WFYSK_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSK_FIGHT_1, 11); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSK_DODGE_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSK_BLOCKED_1, 11); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSK_BUMP_1, 18); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7384,18 +7391,18 @@ cAudioManager::GetWMYSKTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 5563, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 5573, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 5575, 2); break; - case SOUND_PED_UNK_126: GetPhrase(sfx, ped->m_lastComment, 5568, 3); break; - case SOUND_PED_TAXI_WAIT: return 5579; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 5558, 5); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 5546, 10); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 5571, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 5556, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 5577, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 5519, 14); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 5533, 13); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_GUN_PANIC_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_SAVED_1, 2); break; + case SOUND_PED_INNOCENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_INNOCENT_1, 3); break; + case SOUND_PED_TAXI_WAIT: return SFX_WMYSK_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_FIGHT_1, 5); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_DODGE_1, 10); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_BUMP_1, 14); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WMYSK_CHAT_1, 13); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7407,16 +7414,16 @@ cAudioManager::GetWFYSHTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 7459, 9); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 7470, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 7483, 4); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 7492, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 7448, 11); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 7472, 11); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 7468, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 7487, 5); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 7426, 12); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 7438, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_GUN_COOL_1, 9); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_SAVED_1, 4); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_DODGE_1, 11); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_RUN_1, 11); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_LOST_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_SHOCKED_1, 5); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_BUMP_1, 12); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYSH_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7428,16 +7435,16 @@ cAudioManager::GetWFOSHTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 3571, 10); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 3583, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 3594, 3); break; - case SOUND_PED_TAXI_WAIT: return 3602; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3561, 10); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 3585, 9); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 3581, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 3597, 5); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3542, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3552, 9); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_GUN_COOL_1, 10); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_SAVED_1, 3); break; + case SOUND_PED_TAXI_WAIT: return SFX_WFOSH_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_DODGE_1, 10); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_RUN_1, 9); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_LOST_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_SHOCKED_1, 5); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFOSH_CHAT_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7449,20 +7456,20 @@ cAudioManager::GetJFOTOTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 811, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 815, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 821, 2); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 828, 2); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 831, 2); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 796, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 823, 5); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 805, 6); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 775, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 757, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: return 820; - case SOUND_PED_CHAT_EVENT: return 830; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 765, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 783, 13); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_GUN_PANIC_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_JACKED_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_SAVED_1, 2); break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_TAXI_1, 2); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_RUN_1, 5); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_GENERIC_CRASH_1, 6); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: return SFX_JFOTO_LOST_1; + case SOUND_PED_CHAT_EVENT: return SFX_JFOTO_SHOCKED_1; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_JFOTO_CHAT_1, 13); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7474,20 +7481,20 @@ cAudioManager::GetJMOTOTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, 874, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 878, 4); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 883, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 889; - case SOUND_PED_TAXI_WAIT: return 891; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 862, 6); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 885, 4); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 868, 6); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 849, 6); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 833, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: return 882; - case SOUND_PED_CHAT_EVENT: return 890; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 841, 8); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 855, 7); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_GUN_PANIC_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_JACKED_1, 4); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_JMOTO_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_JMOTO_TAXI_1; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_DODGE_1, 6); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_RUN_1, 4); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_GENERIC_CRASH_1, 6); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_CAR_CRASH_1, 6); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: return SFX_JMOTO_LOST_1; + case SOUND_PED_CHAT_EVENT: return SFX_JMOTO_SHOCKED_1; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_BUMP_1, 8); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_JMOTO_CHAT_1, 7); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -7499,24 +7506,24 @@ cAudioManager::GetCBTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 2178, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 2187, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 2183, 4); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 2194, 2); break; - case SOUND_PED_ACCIDENTREACTION1: sfx = 2196; break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 2197, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 2161, 9); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 2150, 9); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 2170, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 2132, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 2113, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 2192, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 2159, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 2121, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 2140, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_JACKING_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_JACKED_1, 4); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: sfx = SFX_CUBAN_GANG_1_SAVED_1; break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_FIGHT_1, 9); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_DODGE_1, 9); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_CAR_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_GANG_1_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } - return 86 * (m_sQueueSample.m_nEntityIndex % 3) + sfx; + return (SFX_CUBAN_GANG_2_BLOCKED_1 - SFX_CUBAN_GANG_1_BLOCKED_1) * (m_sQueueSample.m_nEntityIndex % 3) + sfx; } uint32 @@ -7525,24 +7532,24 @@ cAudioManager::GetHNTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 2692, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 2703, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 2697, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 2711, 3); break; - case SOUND_PED_ACCIDENTREACTION1: sfx = 2714; break; - case SOUND_PED_TAXI_WAIT: sfx = 2715; break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 2673, 10); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 2661, 10); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 2683, 9); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 2638, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 2617, 9); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 2707, 4); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 2671, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 2626, 12); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 2647, 14); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_MUGGED_1, 3); break; + case SOUND_PED_ACCIDENTREACTION1: sfx = SFX_HAITIAN_GANG_1_SAVED_1; break; + case SOUND_PED_TAXI_WAIT: sfx = SFX_HAITIAN_GANG_1_TAXI_1; break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_FIGHT_1, 10); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_DODGE_1, 10); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_GENERIC_CRASH_1, 9); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_BLOCKED_1, 9); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_LOST_1, 4); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_BUMP_1, 12); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_HAITIAN_GANG_1_CHAT_1, 14); break; default: return GetGenericMaleTalkSfx(ped, sound); } - return 99 * (m_sQueueSample.m_nEntityIndex % 3) + sfx; + return (SFX_HAITIAN_GANG_2_BLOCKED_1 - SFX_HAITIAN_GANG_1_BLOCKED_1) * (m_sQueueSample.m_nEntityIndex % 3) + sfx; } uint32 @@ -7551,26 +7558,26 @@ cAudioManager::GetSGTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 1104, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 1114, 5); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 1124, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 1109, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 1121, 3); break; - case SOUND_PED_ACCIDENTREACTION1: sfx = 1129; break; - case SOUND_PED_TAXI_WAIT: sfx = 1132; break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 1088, 10); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 1076, 9); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 1098, 6); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 1058, 6); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 1040, 8); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 1119, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 1085, 3); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 1130, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 1048, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 1064, 12); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_JACKING_1, 5); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_MUGGING_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_JACKED_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_MUGGED_1, 3); break; + case SOUND_PED_ACCIDENTREACTION1: sfx = SFX_STREET_GANG_1_SAVED_1; break; + case SOUND_PED_TAXI_WAIT: sfx = SFX_STREET_GANG_1_TAXI_1; break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_FIGHT_1, 10); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_DODGE_1, 9); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_GENERIC_CRASH_1, 6); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_CAR_CRASH_1, 6); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_BLOCKED_1, 8); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_EYEING_1, 3); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_CHAT_1, 12); break; default: return GetGenericMaleTalkSfx(ped, sound); } - if(ped->GetModelIndex() == MI_SGB) sfx += 93; + if(ped->GetModelIndex() == MI_SGB) sfx += (SFX_STREET_GANG_2_BLOCKED_1 - SFX_STREET_GANG_1_BLOCKED_1); return sfx; } @@ -7580,24 +7587,24 @@ cAudioManager::GetCLTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 1299, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 1310, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 1304, 6); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 1317, 2); break; - case SOUND_PED_ACCIDENTREACTION1: sfx = 1319; break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 1320, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 1281, 10); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 1266, 13); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 1291, 8); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 1246, 10); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 1226, 10); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 1315, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 1279, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 1236, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 1256, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_JACKING_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_JACKED_1, 6); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: sfx = SFX_CUBAN_LORD_GANG_1_SAVED_1; break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_FIGHT_1, 10); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_DODGE_1, 13); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_1, 8); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_CAR_CRASH_1, 10); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_BLOCKED_1, 10); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_EYEING_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_CUBAN_LORD_GANG_1_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } - return 96 * (m_sQueueSample.m_nEntityIndex % 3) + sfx; + return (SFX_CUBAN_LORD_GANG_2_BLOCKED_1 - SFX_CUBAN_LORD_GANG_1_BLOCKED_1) * (m_sQueueSample.m_nEntityIndex % 3) + sfx; } uint32 @@ -7606,18 +7613,18 @@ cAudioManager::GetGDTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 1762, 6); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, 1770, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 1755, 7); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 1744, 9); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 1768, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 1753, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 1772, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 1724, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 1734, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_GUN_COOL_1, 6); break; + case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_SAVED_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_FIGHT_1, 7); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_DODGE_1, 9); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_GUARD_DUTY_1_CHAT_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } - return 50 * (m_sQueueSample.m_nEntityIndex % 3) + sfx; + return (SFX_GUARD_DUTY_2_BUMP_1 - SFX_GUARD_DUTY_1_BUMP_1) * (m_sQueueSample.m_nEntityIndex % 3) + sfx; } uint32 @@ -7626,22 +7633,22 @@ cAudioManager::GetBKTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 2429, 5); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 2442, 4); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 2434, 8); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 2448, 2); break; - case SOUND_PED_ACCIDENTREACTION1: sfx = 2450; break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 2451, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 2412, 9); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 2403, 9); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 2421, 8); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 2371, 10); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 2446, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 2381, 10); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 2391, 12); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_GUN_COOL_1, 5); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_JACKING_1, 4); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_JACKED_1, 8); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: sfx = SFX_BIKER_GANG_1_SAVED_1; break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_FIGHT_1, 9); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_DODGE_1, 9); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_GENERIC_CRASH_1, 8); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_BLOCKED_1, 10); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_LOST_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_BUMP_1, 10); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_BIKER_GANG_1_CHAT_1, 12); break; default: return GetGenericMaleTalkSfx(ped, sound); } - return 82 * (m_sQueueSample.m_nEntityIndex % 3) + sfx; + return (SFX_BIKER_GANG_2_BLOCKED_1 - SFX_BIKER_GANG_1_BLOCKED_1) * (m_sQueueSample.m_nEntityIndex % 3) + sfx; } uint32 @@ -7650,25 +7657,25 @@ cAudioManager::GetPGTalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 1561, 4); break; - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, 1570, 5); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 1565, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 1577, 2); break; - case SOUND_PED_ACCIDENTREACTION1: sfx = 1579; break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, 1582, 2); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 1551, 5); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 1542, 7); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 1556, 5); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 1529, 5); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 1514, 10); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 1575, 2); break; - case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, ped->m_lastComment, 1549, 2); break; - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, 1580, 2); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 1524, 5); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 1534, 8); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_GUN_COOL_1, 4); break; + case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_JACKING_1, 5); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_JACKED_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: sfx = SFX_PLAYER_GANG_1_SAVED_1; break; + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_TAXI_1, 2); break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_FIGHT_1, 5); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_DODGE_1, 7); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_GENERIC_CRASH_1, 5); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_CAR_CRASH_1, 5); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_BLOCKED_1, 10); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_LOST_1, 2); break; + case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_SHOCKED_1, 2); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_BUMP_1, 5); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_GANG_1_CHAT_1, 8); break; default: return GetGenericMaleTalkSfx(ped, sound); } - return 70 * (m_sQueueSample.m_nEntityIndex % 3) + sfx; + return (SFX_PLAYER_GANG_2_BLOCKED_1 - SFX_PLAYER_GANG_1_BLOCKED_1) * (m_sQueueSample.m_nEntityIndex % 3) + sfx; } uint32 @@ -7678,18 +7685,18 @@ cAudioManager::GetVICETalkSfx(CPed *ped, int16 sound, int16 model) if(model == MI_VICE6) { switch(sound) { - case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, 1894, 3); break; - case SOUND_PED_MIAMIVICE_EXITING_CAR: return 1897; + case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, SFX_VICE_VOICE_6_ARREST_1, 3); break; + case SOUND_PED_MIAMIVICE_EXITING_CAR: return SFX_VICE_VOICE_6_MIAMIVICE_EXITING_CAR_1; default: return GetGenericMaleTalkSfx(ped, sound); } } switch(sound) { - case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, 1874, 3); break; - case SOUND_PED_MIAMIVICE_EXITING_CAR: sfx = 1877; break; + case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, SFX_VICE_VOICE_1_ARREST_1, 3); break; + case SOUND_PED_MIAMIVICE_EXITING_CAR: sfx = SFX_VICE_VOICE_1_MIAMIVICE_EXITING_CAR_1; break; default: return GetGenericMaleTalkSfx(ped, sound); } - sfx += 4 * (m_sQueueSample.m_nEntityIndex % 5); + sfx += (SFX_VICE_VOICE_2_ARREST_1-SFX_VICE_VOICE_1_ARREST_1) * (m_sQueueSample.m_nEntityIndex % 5); return sfx; } @@ -7699,23 +7706,23 @@ cAudioManager::GetWFYG1TalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 3383, 6); break; - case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, 3399, 2); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 3389, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 3397, 2); break; - case SOUND_PED_ACCIDENTREACTION1: return 3403; - case SOUND_PED_TAXI_WAIT: return 3405; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 3372, 4); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3361, 9); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, 3401, 2); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 3376, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3342, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3324, 7); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, 3394, 3); break; - case SOUND_153: GetPhrase(sfx, ped->m_lastComment, 3370, 2); break; - case SOUND_PED_CHAT_EVENT: return 3404; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3331, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3351, 10); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_GUN_COOL_1, 6); break; + case SOUND_PED_MUGGING: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_MUGGING_1, 2); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_JACKED_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_MUGGED_1, 2); break; + case SOUND_PED_ACCIDENTREACTION1: return SFX_WFYG1_SAVED_1; + case SOUND_PED_TAXI_WAIT: return SFX_WFYG1_TAXI_1; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_FIGHT_1, 4); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_DODGE_1, 9); break; + case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_RUN_1, 2); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_BLOCKED_1, 7); break; + case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_LOST_1, 3); break; + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_EYEING_1, 2); break; + case SOUND_PED_CHAT_EVENT: return SFX_WFYG1_SHOCKED_1; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG1_CHAT_1, 10); break; default: return GetGenericFemaleTalkSfx(ped, sound); } return sfx; @@ -7727,20 +7734,24 @@ cAudioManager::GetWFYG2TalkSfx(CPed *ped, int16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, 3464, 3); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, 3467, 5); break; - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, 3473, 2); break; - case SOUND_PED_TAXI_WAIT: return 3476; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 3452, 5); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 3440, 8); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, 3457, 7); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, 3422, 9); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, 3406, 5); break; - case SOUND_PED_WAIT_DOUBLEBACK: return 3472; - case SOUND_153: GetPhrase(sfx, ped->m_lastComment, 3448, 4); break; - case SOUND_PED_CHAT_EVENT: return 3475; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, 3411, 11); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, 3431, 9); break; + case SOUND_PED_HANDS_UP: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_GUN_COOL_1, 3); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_JACKED_1, 5); break; + case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_MUGGED_1, 2); break; +#ifdef FIX_BUGS + case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_TAXI_1, 2); break; +#else + case SOUND_PED_TAXI_WAIT: return SFX_WFYG2_TAXI_1; +#endif + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_FIGHT_1, 5); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_DODGE_1, 8); break; + case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_GENERIC_CRASH_1, 7); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_CAR_CRASH_1, 9); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_BLOCKED_1, 5); break; + case SOUND_PED_WAIT_DOUBLEBACK: return SFX_WFYG2_LOST_1; + case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_EYEING_1, 4); break; + case SOUND_PED_CHAT_EVENT: return SFX_WFYG2_SHOCKED_1; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_BUMP_1, 11); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_WFYG2_CHAT_1, 9); break; default: return GetGenericFemaleTalkSfx(ped, sound); } @@ -7752,7 +7763,7 @@ cAudioManager::GetGenericMaleTalkSfx(CPed *ped, int16 sound) { uint32 sfx; - m_bGenericSfx = true; + m_bGenericSfx = TRUE; switch(sound) { case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_MALE_DEATH_1, 41); break; case SOUND_PED_BULLET_HIT: @@ -7768,13 +7779,13 @@ uint32 cAudioManager::GetGenericFemaleTalkSfx(CPed *ped, int16 sound) { uint32 sfx; - m_bGenericSfx = true; + m_bGenericSfx = TRUE; switch(sound) { - case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, 2931, 22); break; + case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_DEATH_1, 22); break; case SOUND_PED_BULLET_HIT: - case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, 2953, 33); break; - case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, 2914, 17); break; - case SOUND_PED_FLEE_SPRINT: GetPhrase(sfx, ped->m_lastComment, 2986, 27); break; + case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_GRUNT_1, 33); break; + case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_FIRE_1, 17); break; + case SOUND_PED_FLEE_SPRINT: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_PANIC_1, 27); break; default: return NO_SAMPLE; } return sfx; @@ -7816,7 +7827,7 @@ cPedComments::Process() uint32 sampleIndex; uint8 actualUsedBank; tPedComment *comment; - bool prevUsed = false; + bool8 prevUsed = FALSE; static uint8 counter = 0; static int32 prevSamples[10]; @@ -7827,7 +7838,7 @@ cPedComments::Process() if(m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nSampleIndex == prevSamples[(counter + 1 + i) % ARRAY_SIZE(prevSamples)]) { m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nProcess = -1; - prevUsed = true; + prevUsed = TRUE; break; } } @@ -7847,19 +7858,21 @@ cPedComments::Process() AudioManager.m_sQueueSample.m_nVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_bVolume; AudioManager.m_sQueueSample.m_fDistance = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_fDistance; AudioManager.m_sQueueSample.m_nLoopCount = 1; +#ifndef GTA_PS2 AudioManager.m_sQueueSample.m_nLoopStart = 0; AudioManager.m_sQueueSample.m_nLoopEnd = -1; +#endif AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME; AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f; AudioManager.m_sQueueSample.m_fSoundIntensity = 40.0f; - AudioManager.m_sQueueSample.m_bReleasingSoundFlag = true; + AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE; AudioManager.m_sQueueSample.m_vecPos = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos; - AudioManager.m_sQueueSample.m_bReverbFlag = true; - AudioManager.m_sQueueSample.m_bRequireReflection = true; - AudioManager.m_sQueueSample.m_bIs2D = false; + AudioManager.m_sQueueSample.m_bReverbFlag = TRUE; + AudioManager.m_sQueueSample.m_bRequireReflection = TRUE; + AudioManager.m_sQueueSample.m_bIs2D = FALSE; #ifdef FIX_BUGS - if (sampleIndex >= 8694 && sampleIndex < TOTAL_AUDIO_SAMPLES) { // check if player sfx, TODO: enum - AudioManager.m_sQueueSample.m_bIs2D = true; + if (sampleIndex >= SFX_PLAYER_ANGRY_BUSTED_1 && sampleIndex < TOTAL_AUDIO_SAMPLES) { // check if player sfx + AudioManager.m_sQueueSample.m_bIs2D = TRUE; AudioManager.m_sQueueSample.m_nOffset = 63; } #endif // FIX_BUGS @@ -7872,19 +7885,19 @@ cPedComments::Process() AudioManager.AddSampleToRequestedQueue(); #if defined(GTA_PC) && !defined(FIX_BUGS) m_nDelayTimer = CTimer::GetTimeInMilliseconds(); - m_bDelay = true; + m_bDelay = TRUE; #endif } } } // Switch bank - if (m_nActiveBank) { - actualUsedBank = SFX_BANK_PED_COMMENTS; - m_nActiveBank = SFX_BANK_0; + if (m_nActiveBank == 0) { + actualUsedBank = 0; + m_nActiveBank = 1; } else { - actualUsedBank = SFX_BANK_0; - m_nActiveBank = SFX_BANK_PED_COMMENTS; + actualUsedBank = 1; + m_nActiveBank = 0; } comment = m_asPedComments[actualUsedBank]; for (uint32 i = 0; i < m_nCommentsInBank[actualUsedBank]; i++) { @@ -7900,7 +7913,7 @@ cPedComments::Process() m_nCommentsInBank[actualUsedBank] = 0; #if defined(GTA_PC) && !defined(FIX_BUGS) if(m_bDelay) - if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = false; + if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = FALSE; #endif } @@ -7930,7 +7943,7 @@ cAudioManager::ProcessExplosions(int32 explosion) m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; break; case EXPLOSION_MOLOTOV: m_sQueueSample.m_fSoundIntensity = 150.0f; @@ -7938,7 +7951,7 @@ cAudioManager::ProcessExplosions(int32 explosion) m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bRequireReflection = FALSE; break; case EXPLOSION_MINE: case EXPLOSION_HELI_BOMB: @@ -7947,7 +7960,7 @@ cAudioManager::ProcessExplosions(int32 explosion) m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 12347; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; break; default: m_sQueueSample.m_fSoundIntensity = 200.0f; @@ -7967,13 +7980,12 @@ cAudioManager::ProcessExplosions(int32 explosion) if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = i; m_sQueueSample.m_fSpeedMultiplier = 2.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; m_sQueueSample.m_nEmittingVolume = MAX_VOLUME; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; - m_sQueueSample.m_bReverbFlag = true; + RESET_LOOP_OFFSETS + m_sQueueSample.m_bReverbFlag = TRUE; AddSampleToRequestedQueue(); } } @@ -8034,19 +8046,18 @@ cAudioManager::ProcessFires(int32) m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_nReleasingVolumeDivider = 10; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } if (gFireManager.m_aFires[i].m_bExtinguishedWithWater) { - gFireManager.m_aFires[i].m_bExtinguishedWithWater = false; + gFireManager.m_aFires[i].m_bExtinguishedWithWater = FALSE; emittingVol = 100.0f * gFireManager.m_aFires[i].m_fWaterExtinguishCountdown; m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); if (m_sQueueSample.m_nVolume != 0) { @@ -8058,14 +8069,13 @@ cAudioManager::ProcessFires(int32) m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_nReleasingVolumeDivider = 10; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -8094,14 +8104,13 @@ cAudioManager::ProcessWaterCannon(int32) m_sQueueSample.m_nCounter = i; m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_nReleasingVolumeDivider = 8; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nEmittingVolume = 50; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -8131,17 +8140,16 @@ cAudioManager::ProcessExtraSounds() m_sQueueSample.m_nSampleIndex = SFX_ARCADE; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARCADE); - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 4; m_sQueueSample.m_fSpeedMultiplier = 3.0f; m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_ARCADE); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_ARCADE); - m_sQueueSample.m_bReverbFlag = true; + SET_LOOP_OFFSETS(SFX_ARCADE) + m_sQueueSample.m_bReverbFlag = TRUE; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bRequireReflection = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; AddSampleToRequestedQueue(); } @@ -8174,14 +8182,13 @@ cAudioManager::ProcessEscalators() m_sQueueSample.m_nReleasingVolumeDivider = 5; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; m_sQueueSample.m_nCounter = i; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_BOAT_V12_LOOP); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_BOAT_V12_LOOP); - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(SFX_BOAT_V12_LOOP) + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -8226,8 +8233,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; emittingVolume = 60; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SCRIPT_SOUND_GARAGE_DOOR_CLUNK: m_sQueueSample.m_fSoundIntensity = 80.0f; @@ -8238,8 +8245,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 4; emittingVolume = 60; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_HIT: case SCRIPT_SOUND_BULLET_HIT_GROUND_1: @@ -8252,7 +8259,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32); m_sQueueSample.m_nReleasingVolumeModificator = 9; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; emittingVolume = m_anRandomTable[2] % 20 + 90; break; case SCRIPT_SOUND_WILLIE_CARD_SWIPE: @@ -8263,8 +8270,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = 20159; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_fSpeedMultiplier = 1.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; break; case SCRIPT_SOUND_MALE_AMBULANCE_OUCH: { @@ -8288,8 +8295,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_HORN_JEEP); // BUG? m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bIs2D = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; break; case SCRIPT_SOUND_PAYPHONE_RINGING: m_sQueueSample.m_fSoundIntensity = 80.0f; @@ -8299,8 +8306,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING); m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_fSpeedMultiplier = 2.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; break; case SCRIPT_SOUND_GLASS_BREAK_L: m_sQueueSample.m_fSoundIntensity = 60.0f; @@ -8310,7 +8317,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH); m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_GLASS_BREAK_S: m_sQueueSample.m_fSoundIntensity = 60.0f; @@ -8320,7 +8327,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH); m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_GLASS_CRACK: m_sQueueSample.m_fSoundIntensity = 60.0f; @@ -8330,8 +8337,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK); m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; break; case SCRIPT_SOUND_GLASS_LIGHT_BREAK: m_sQueueSample.m_fSoundIntensity = 55.0f; @@ -8340,7 +8347,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 19000; m_sQueueSample.m_nReleasingVolumeModificator = 9; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; emittingVolume = RandomDisplacement(11) + 25; break; case SCRIPT_SOUND_BOX_DESTROYED_1: @@ -8350,8 +8357,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVolume = m_anRandomTable[2] % 20 + 80; break; case SCRIPT_SOUND_BOX_DESTROYED_2: @@ -8361,8 +8368,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVolume = m_anRandomTable[2] % 20 + 80; break; case SCRIPT_SOUND_METAL_COLLISION: @@ -8373,8 +8380,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16); m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVolume = m_anRandomTable[2] % 30 + 70; break; case SCRIPT_SOUND_TIRE_COLLISION: @@ -8385,8 +8392,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16); m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVolume = m_anRandomTable[2] % 30 + 60; break; case SCRIPT_SOUND_HIT_BALL: @@ -8397,8 +8404,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16); m_sQueueSample.m_nReleasingVolumeModificator = 5; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bRequireReflection = TRUE; emittingVolume = m_anRandomTable[2] % 30 + 60; break; case SCRIPT_SOUND_GUNSHELL_DROP: @@ -8434,7 +8441,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_fSoundIntensity = 20.0f; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; emittingVolume = m_anRandomTable[2] % 20 + 30; break; case SCRIPT_SOUND_GUNSHELL_DROP_SOFT: @@ -8444,7 +8451,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_fSoundIntensity = 20.0f; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_fSpeedMultiplier = 0.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; emittingVolume = m_anRandomTable[2] % 20 + 30; break; default: @@ -8458,11 +8465,10 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = iSound++; m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; m_sQueueSample.m_nEmittingVolume = emittingVolume; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; - m_sQueueSample.m_bReverbFlag = true; + RESET_LOOP_OFFSETS + m_sQueueSample.m_bReverbFlag = TRUE; AddSampleToRequestedQueue(); } } @@ -8484,7 +8490,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 2; m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_fSpeedMultiplier = 2.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP: case SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP: @@ -8496,7 +8502,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_fSpeedMultiplier = 2.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_SNORING_LOOP: m_sQueueSample.m_fSoundIntensity = 6.0f; @@ -8507,7 +8513,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 6; m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_fSpeedMultiplier = 3.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP: m_sQueueSample.m_fSoundIntensity = 40.0f; @@ -8518,7 +8524,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 4; m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_fSpeedMultiplier = 2.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_BAR_1: m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_1; @@ -8529,7 +8535,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_BAR_2: m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_2; @@ -8540,7 +8546,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_BAR_3: m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_3; @@ -8551,7 +8557,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_BAR_4: m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_4; @@ -8562,7 +8568,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_MALIBU_1: if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return; @@ -8575,7 +8581,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_MALIBU_2: if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return; @@ -8588,7 +8594,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_MALIBU_3: if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return; @@ -8601,7 +8607,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_STRIP_1: if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return; @@ -8614,7 +8620,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_STRIP_2: if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return; @@ -8627,7 +8633,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_STRIP_3: if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return; @@ -8640,7 +8646,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_BUILDING_CHURCH: m_sQueueSample.m_nSampleIndex = SFX_BUILDING_CHURCH; @@ -8651,7 +8657,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15; m_sQueueSample.m_fSpeedMultiplier = 4.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; case SCRIPT_SOUND_NEW_WATERFALL: emittingVolume = 30; @@ -8662,7 +8668,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nReleasingVolumeModificator = 4; m_sQueueSample.m_nReleasingVolumeDivider = 9; m_sQueueSample.m_fSpeedMultiplier = 2.0f; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; break; default: return; } @@ -8673,14 +8679,13 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); if(m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bReverbFlag = true; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bReverbFlag = TRUE; m_sQueueSample.m_nEmittingVolume = emittingVolume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -8718,14 +8723,13 @@ cAudioManager::ProcessWeather(int32 id) m_sQueueSample.m_nCounter = iSound++; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nOffset = (m_anRandomTable[2] & 15) + 55; - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; - m_sQueueSample.m_bReverbFlag = false; - m_sQueueSample.m_bRequireReflection = false; + RESET_LOOP_OFFSETS + m_sQueueSample.m_bReverbFlag = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } if (CWeather::Rain > 0.0f && (!CCullZones::CamNoRain() || !CCullZones::PlayerNoRain())) { @@ -8736,15 +8740,14 @@ cAudioManager::ProcessWeather(int32 id) m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nOffset = 63; - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 30; - m_sQueueSample.m_bReverbFlag = false; + m_sQueueSample.m_bReverbFlag = FALSE; m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } x = 0.0f; @@ -8761,15 +8764,14 @@ cAudioManager::ProcessWeather(int32 id) m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nOffset = 63; - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 7; - m_sQueueSample.m_bReverbFlag = false; + m_sQueueSample.m_bReverbFlag = FALSE; m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); CObject::fDistToNearestTree = 999999.9f; } @@ -8778,11 +8780,11 @@ cAudioManager::ProcessWeather(int32 id) void cAudioManager::ProcessFrontEnd() { - bool stereo; - bool processedPickup; - bool processedMission; - bool staticFreq; - bool center; + bool8 stereo; + bool8 processedPickup; + bool8 processedMission; + bool8 staticFreq; + bool8 center; int16 sample; static uint8 iSound = 0; @@ -8791,11 +8793,11 @@ cAudioManager::ProcessFrontEnd() static uint32 radioDial = SFX_RADIO_DIAL_1; for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) { - staticFreq = false; - processedPickup = false; - center = false; - processedMission = false; - stereo = false; + staticFreq = FALSE; + processedPickup = FALSE; + center = FALSE; + processedMission = FALSE; + stereo = FALSE; switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) { case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM: m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE; @@ -8807,9 +8809,9 @@ cAudioManager::ProcessFrontEnd() case SOUND_GARAGE_BAD_VEHICLE: case SOUND_GARAGE_BOMB_ALREADY_SET: m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT; - stereo = true; - staticFreq = true; - center = true; + stereo = TRUE; + staticFreq = TRUE; + center = TRUE; break; case SOUND_GARAGE_OPENING: case SOUND_71: //case SOUND_41: @@ -8817,8 +8819,8 @@ cAudioManager::ProcessFrontEnd() case SOUND_GARAGE_VEHICLE_ACCEPTED: case SOUND_EVIDENCE_PICKUP: case SOUND_UNLOAD_GOLD: - stereo = true; - processedPickup = true; + stereo = TRUE; + processedPickup = TRUE; m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT; break; case SOUND_GARAGE_BOMB1_SET: @@ -8826,60 +8828,60 @@ cAudioManager::ProcessFrontEnd() case SOUND_GARAGE_BOMB3_SET: case SOUND_PICKUP_WEAPON_BOUGHT: case SOUND_PICKUP_WEAPON: - center = true; - processedPickup = true; + center = TRUE; + processedPickup = TRUE; m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT; - stereo = true; + stereo = TRUE; break; case SOUND_PICKUP_HEALTH: case SOUND_81: //case SOUND_4B: case SOUND_PICKUP_ADRENALINE: case SOUND_PICKUP_ARMOUR: - stereo = true; - processedPickup = true; + stereo = TRUE; + processedPickup = TRUE; m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT; break; case SOUND_80: - stereo = true; - processedPickup = true; + stereo = TRUE; + processedPickup = TRUE; m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT; - center = true; - staticFreq = true; + center = TRUE; + staticFreq = TRUE; break; case SOUND_PICKUP_BONUS: case SOUND_FRONTEND_MENU_STARTING: case SOUND_HUD: - stereo = true; + stereo = TRUE; m_sQueueSample.m_nSampleIndex = SFX_INFO_LEFT; - center = true; + center = TRUE; break; case SOUND_PICKUP_MONEY: - stereo = true; - processedPickup = true; + stereo = TRUE; + processedPickup = TRUE; m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT; break; case SOUND_PICKUP_HIDDEN_PACKAGE: case SOUND_PICKUP_PACMAN_PILL: case SOUND_PICKUP_PACMAN_PACKAGE: case SOUND_PICKUP_FLOAT_PACKAGE: - center = true; - processedPickup = true; + center = TRUE; + processedPickup = TRUE; m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT; - stereo = true; + stereo = TRUE; break; case SOUND_RACE_START_3: case SOUND_RACE_START_2: case SOUND_RACE_START_1: case SOUND_PART_MISSION_COMPLETE: - stereo = true; + stereo = TRUE; m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT; - processedMission = true; - center = true; + processedMission = TRUE; + center = TRUE; break; case SOUND_RACE_START_GO: - stereo = true; + stereo = TRUE; m_sQueueSample.m_nSampleIndex = SFX_GO_LEFT; - center = true; + center = TRUE; break; case SOUND_CLOCK_TICK: m_sQueueSample.m_nSampleIndex = SFX_TIMER; @@ -8905,19 +8907,19 @@ cAudioManager::ProcessFrontEnd() radioDial = m_sQueueSample.m_nSampleIndex; break; case SOUND_FRONTEND_HIGHLIGHT_OPTION: - stereo = true; + stereo = TRUE; m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT; break; case SOUND_FRONTEND_ENTER_OR_ADJUST: - stereo = true; + stereo = TRUE; m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT_LEFT; break; case SOUND_FRONTEND_BACK: - stereo = true; + stereo = TRUE; m_sQueueSample.m_nSampleIndex = SFX_FE_BACK_LEFT; break; case SOUND_FRONTEND_FAIL: - stereo = true; + stereo = TRUE; m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT; break; case SOUND_FRONTEND_AUDIO_TEST: @@ -8956,34 +8958,34 @@ cAudioManager::ProcessFrontEnd() m_sQueueSample.m_nVolume = (CWeather::Wind - 1.0f) * m_sQueueSample.m_nVolume; m_sQueueSample.m_nCounter = iSound++; m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; m_sQueueSample.m_nBankIndex = SFX_BANK_FRONT_END_MENU; m_sQueueSample.m_nReleasingVolumeModificator = 0; - m_sQueueSample.m_bIs2D = true; + m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; - m_sQueueSample.m_fDistance = 1.0f; - if (stereo) + RESET_LOOP_OFFSETS + if (stereo) { m_sQueueSample.m_nOffset = 0; - else { + m_sQueueSample.m_fDistance = 1.0f; + } else { sample = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]; if (sample == SOUND_BULLETTRACE_1) { m_sQueueSample.m_nOffset = 20; m_sQueueSample.m_nVolume = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i]; m_sQueueSample.m_nReleasingVolumeModificator = 10; m_sQueueSample.m_fDistance = 100.0f; - } - if (sample == SOUND_BULLETTRACE_2) { + } else if (sample == SOUND_BULLETTRACE_2) { m_sQueueSample.m_nOffset = 107; m_sQueueSample.m_nVolume = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i]; m_sQueueSample.m_nReleasingVolumeModificator = 10; m_sQueueSample.m_fDistance = 100.0f; + } else { + m_sQueueSample.m_nOffset = 63; + m_sQueueSample.m_fDistance = 1.0f; } - m_sQueueSample.m_nOffset = 63; } - m_sQueueSample.m_bReverbFlag = false; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); if (stereo) { ++m_sQueueSample.m_nSampleIndex; @@ -9006,7 +9008,7 @@ cAudioManager::ProcessCrane() { CCrane *crane = (CCrane *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity; float distSquared; - bool distCalculated = false; + bool8 distCalculated = FALSE; static const int intensity = 80; if (crane) { @@ -9021,19 +9023,18 @@ cAudioManager::ProcessCrane() m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nSampleIndex = SFX_CRANE_MAGNET; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 2; m_sQueueSample.m_nFrequency = 6000; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = 100; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = intensity; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } if (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents) { @@ -9041,9 +9042,9 @@ cAudioManager::ProcessCrane() m_sQueueSample.m_nSampleIndex = SFX_COL_CAR_2; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COL_CAR_2); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = TRUE; AddSampleToRequestedQueue(); } } @@ -9097,14 +9098,13 @@ cAudioManager::ProcessProjectiles() m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = i; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -9122,7 +9122,7 @@ cAudioManager::ProcessGarages() uint32 sampleIndex; uint8 j; float distSquared; - bool distCalculated; + bool8 distCalculated; static uint8 iSound = 32; @@ -9133,7 +9133,7 @@ cAudioManager::ProcessGarages() if (entity == nil) continue; m_sQueueSample.m_vecPos = entity->GetPosition(); - distCalculated = false; + distCalculated = FALSE; distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(SOUND_INTENSITY)) { state = CGarages::aGarages[i].m_eGarageState; @@ -9153,7 +9153,7 @@ cAudioManager::ProcessGarages() m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) / 2; m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16); m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; m_sQueueSample.m_nCounter = iSound++; if (iSound < 32) iSound = 32; @@ -9165,7 +9165,7 @@ cAudioManager::ProcessGarages() m_sQueueSample.m_nCounter = i; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; } } else { m_sQueueSample.m_nSampleIndex = SFX_GARAGE_DOOR_LOOP; @@ -9174,19 +9174,18 @@ cAudioManager::ProcessGarages() m_sQueueSample.m_nCounter = i; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; } m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nEmittingVolume = 90; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } break; @@ -9215,16 +9214,15 @@ cAudioManager::ProcessGarages() m_sQueueSample.m_nEmittingVolume = 60; m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReverbFlag = true; - m_sQueueSample.m_bIs2D = false; - m_sQueueSample.m_bReleasingSoundFlag = true; + m_sQueueSample.m_bReverbFlag = TRUE; + m_sQueueSample.m_bIs2D = FALSE; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; m_sQueueSample.m_nLoopCount = 1; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_nCounter = iSound++; if (iSound < 32) iSound = 32; - m_sQueueSample.m_bRequireReflection = true; + m_sQueueSample.m_bRequireReflection = TRUE; AddSampleToRequestedQueue(); } } @@ -9242,7 +9240,7 @@ cAudioManager::ProcessFireHydrant() const float SOUND_INTENSITY = 35; float distSquared; - bool distCalculated = false; + bool8 distCalculated = FALSE; m_sQueueSample.m_vecPos = ((CEntity *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition(); distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); @@ -9256,13 +9254,12 @@ cAudioManager::ProcessFireHydrant() m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nEmittingVolume = 40; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = false; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_fSpeedMultiplier = 2.0f; AddSampleToRequestedQueue(); @@ -9277,7 +9274,7 @@ void cAudioManager::ProcessBridge() { float dist; - bool distCalculated = false; + bool8 distCalculated = FALSE; if (CBridge::pLiftRoad) { m_sQueueSample.m_vecPos = CBridge::pLiftRoad->GetPosition(); @@ -9312,19 +9309,18 @@ cAudioManager::ProcessBridgeWarning() m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING; m_sQueueSample.m_nBankIndex = SAMPLEBANK_EXTRAS; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING); m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = 100; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = 450.0f; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 8; - m_sQueueSample.m_bReverbFlag = false; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReverbFlag = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -9339,18 +9335,17 @@ cAudioManager::ProcessBridgeMotor() m_sQueueSample.m_nCounter = 1; m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE; // todo check sfx name m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = 5500; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = MAX_VOLUME; - m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = bridgeIntensity; - m_sQueueSample.m_bReleasingSoundFlag = false; + m_sQueueSample.m_bReleasingSoundFlag = FALSE; m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = false; + m_sQueueSample.m_bReverbFlag = FALSE; AddSampleToRequestedQueue(); } } @@ -9374,18 +9369,17 @@ cAudioManager::ProcessBridgeOneShots() if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = false; + m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nEmittingVolume = MAX_VOLUME; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSoundIntensity = bridgeIntensity; - m_sQueueSample.m_bReleasingSoundFlag = true; - m_sQueueSample.m_bReverbFlag = false; - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bReleasingSoundFlag = TRUE; + m_sQueueSample.m_bReverbFlag = FALSE; + m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } } @@ -9394,7 +9388,7 @@ cAudioManager::ProcessBridgeOneShots() #endif #pragma region MISSION_AUDIO -bool g_bMissionAudioLoadFailed[MISSION_AUDIO_SLOTS]; +bool8 g_bMissionAudioLoadFailed[MISSION_AUDIO_SLOTS]; struct MissionAudioData { const char *m_pName; @@ -9789,10 +9783,10 @@ FindMissionAudioSfx(const char *name) return NO_SAMPLE; } -bool +bool8 cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const { - return false; + return FALSE; } void @@ -9804,12 +9798,12 @@ cAudioManager::PreloadMissionAudio(uint8 slot, Const char *name) m_sMissionAudio.m_nSampleIndex[slot] = missionAudioSfx; m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED; m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED; - m_sMissionAudio.m_bIsPlaying[slot] = false; + m_sMissionAudio.m_bIsPlaying[slot] = FALSE; m_sMissionAudio.m_nMissionAudioCounter[slot] = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000; m_sMissionAudio.m_nMissionAudioCounter[slot] *= 4; - m_sMissionAudio.m_bIsPlayed[slot] = false; - m_sMissionAudio.m_bPredefinedProperties[slot] = true; - g_bMissionAudioLoadFailed[slot] = false; + m_sMissionAudio.m_bIsPlayed[slot] = FALSE; + m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE; + g_bMissionAudioLoadFailed[slot] = FALSE; } } } @@ -9827,7 +9821,7 @@ void cAudioManager::SetMissionAudioLocation(uint8 slot, float x, float y, float z) { if (m_bIsInitialised && slot < MISSION_AUDIO_SLOTS) { - m_sMissionAudio.m_bPredefinedProperties[slot] = false; + m_sMissionAudio.m_bPredefinedProperties[slot] = FALSE; m_sMissionAudio.m_vecPos[slot] = CVector(x, y, z); } } @@ -9837,25 +9831,25 @@ cAudioManager::PlayLoadedMissionAudio(uint8 slot) { if (m_bIsInitialised && slot < MISSION_AUDIO_SLOTS && m_sMissionAudio.m_nSampleIndex[slot] != NO_SAMPLE && m_sMissionAudio.m_nLoadingStatus[slot] == LOADING_STATUS_LOADED && m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_STOPPED) - m_sMissionAudio.m_bIsPlayed[slot] = true; + m_sMissionAudio.m_bIsPlayed[slot] = TRUE; } -bool +bool8 cAudioManager::ShouldDuckMissionAudio(uint8 slot) const { if (IsMissionAudioSamplePlaying(slot)) return m_sMissionAudio.m_nSampleIndex[slot] != STREAMED_SOUND_MISSION_ROK2_01; - return false; + return FALSE; } -bool +bool8 cAudioManager::IsMissionAudioSamplePlaying(uint8 slot) const { if (m_bIsInitialised) { if (slot < MISSION_AUDIO_SLOTS) return m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_PLAYING; else - return true; + return TRUE; } else { static int32 cPretendFrame[MISSION_AUDIO_SLOTS] = { 1, 1 }; @@ -9863,14 +9857,14 @@ cAudioManager::IsMissionAudioSamplePlaying(uint8 slot) const } } -bool +bool8 cAudioManager::IsMissionAudioSampleFinished(uint8 slot) { if (m_bIsInitialised) { if (slot < MISSION_AUDIO_SLOTS) return m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_FINISHED; else - return true; + return TRUE; } static int32 cPretendFrame[MISSION_AUDIO_SLOTS] = { 1, 1 }; @@ -9885,11 +9879,11 @@ cAudioManager::ClearMissionAudio(uint8 slot) m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE; m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED; m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED; - m_sMissionAudio.m_bIsPlaying[slot] = false; - m_sMissionAudio.m_bIsPlayed[slot] = false; - m_sMissionAudio.m_bPredefinedProperties[slot] = true; + m_sMissionAudio.m_bIsPlaying[slot] = FALSE; + m_sMissionAudio.m_bIsPlayed[slot] = FALSE; + m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE; m_sMissionAudio.m_nMissionAudioCounter[slot] = 0; - m_sMissionAudio.m_bIsMobile[slot] = false; + m_sMissionAudio.m_bIsMobile[slot] = FALSE; SampleManager.StopStreamedFile(slot + 1); } } @@ -9941,14 +9935,14 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) SetMissionScriptPoliceAudio(m_sMissionAudio.m_nSampleIndex[slot]); } else { if (m_nUserPause) - SampleManager.PauseStream(1, slot + 1); + SampleManager.PauseStream(TRUE, slot + 1); if (m_sMissionAudio.m_bPredefinedProperties[slot]) { if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_CAMERAL) - SampleManager.SetStreamedVolumeAndPan(80, 0, 1, slot + 1); + SampleManager.SetStreamedVolumeAndPan(80, 0, TRUE, slot + 1); else if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_CAMERAR) - SampleManager.SetStreamedVolumeAndPan(80, 127, 1, slot + 1); + SampleManager.SetStreamedVolumeAndPan(80, 127, TRUE, slot + 1); else - SampleManager.SetStreamedVolumeAndPan(80, 63, 1, slot + 1); + SampleManager.SetStreamedVolumeAndPan(80, 63, TRUE, slot + 1); } else { distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos[slot]); if (distSquared >= SQR(80.0f)) { @@ -9963,14 +9957,14 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) TranslateEntity(&m_sMissionAudio.m_vecPos[slot], &vec); pan = ComputePan(80.f, &vec); } - SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, 1, slot + 1); + SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, slot + 1); } SampleManager.StartPreloadedStreamedFile(slot + 1); } m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_PLAYING; nCheckPlayingDelay[slot] = 30; if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A) - m_sMissionAudio.m_bIsMobile[slot] = true; + m_sMissionAudio.m_bIsMobile[slot] = TRUE; break; case PLAY_STATUS_PLAYING: if (m_bTimerJustReset) { @@ -9982,8 +9976,10 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) if (!m_nUserPause) { if (nCheckPlayingDelay[slot]) { --nCheckPlayingDelay[slot]; - } else if (GetMissionScriptPoliceAudioPlayingStatus() == PLAY_STATUS_FINISHED || m_sMissionAudio.m_nMissionAudioCounter[slot]-- == 0) { + } else if ((g_bMissionAudioLoadFailed[slot] && m_sMissionAudio.m_nMissionAudioCounter[slot]-- == 0) || GetMissionScriptPoliceAudioPlayingStatus() == PLAY_STATUS_FINISHED) { m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_FINISHED; + if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A) + m_sMissionAudio.m_bIsMobile[slot] = FALSE; m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE; SampleManager.StopStreamedFile(slot + 1); m_sMissionAudio.m_nMissionAudioCounter[slot] = 0; @@ -9992,10 +9988,10 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) } else if (m_sMissionAudio.m_bIsPlaying[slot]) { if (SampleManager.IsStreamPlaying(slot + 1) || m_nUserPause || m_nPreviousUserPause) { if (m_nUserPause) - SampleManager.PauseStream(1, slot + 1); + SampleManager.PauseStream(TRUE, slot + 1); else { - SampleManager.PauseStream(0, slot + 1); + SampleManager.PauseStream(FALSE, slot + 1); if (!m_sMissionAudio.m_bPredefinedProperties[slot]) { distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos[slot]); if (distSquared >= SQR(80.0f)) { @@ -10010,7 +10006,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) TranslateEntity(&m_sMissionAudio.m_vecPos[slot], &vec); pan = ComputePan(80.f, &vec); } - SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, 1, slot + 1); + SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, slot + 1); } } } else if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_ROK2_01) { @@ -10018,7 +10014,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) } else { m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_FINISHED; if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A) - m_sMissionAudio.m_bIsMobile[slot] = false; + m_sMissionAudio.m_bIsMobile[slot] = FALSE; m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE; SampleManager.StopStreamedFile(slot + 1); m_sMissionAudio.m_nMissionAudioCounter[slot] = 0; @@ -10031,7 +10027,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) break; nCheckPlayingDelay[slot] = 0; } - m_sMissionAudio.m_bIsPlaying[slot] = true; + m_sMissionAudio.m_bIsPlaying[slot] = TRUE; } break; default: @@ -10041,7 +10037,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) case LOADING_STATUS_FAILED: if (++nFramesUntilFailedLoad[slot] >= 120) { nFramesForPretendPlaying[slot] = 0; - g_bMissionAudioLoadFailed[slot] = true; + g_bMissionAudioLoadFailed[slot] = TRUE; nFramesUntilFailedLoad[slot] = 0; m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_LOADED; } diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 2304b4c4..131704dc 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -14,21 +14,17 @@ cAudioManager AudioManager; -const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples); -const int policeChannel = channels + 1; -const int allChannels = channels + 2; - #define SPEED_OF_SOUND 343.f #define TIME_SPENT 40 cAudioManager::cAudioManager() { - m_bIsInitialised = false; - m_bReverb = true; + m_bIsInitialised = FALSE; + m_bReverb = TRUE; field_6 = 0; m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT; m_nTimeSpent = TIME_SPENT; - m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS; + m_nActiveSamples = NUM_CHANNELS_GENERIC; m_nActiveSampleQueue = 1; ClearRequestedQueue(); m_nActiveSampleQueue = 0; @@ -36,16 +32,16 @@ cAudioManager::cAudioManager() ClearActiveSamples(); GenerateIntegerRandomNumberTable(); field_4 = 0; - m_bDynamicAcousticModelingStatus = true; + m_bDynamicAcousticModelingStatus = TRUE; for (int i = 0; i < NUM_AUDIOENTITIES; i++) { - m_asAudioEntities[i].m_bIsUsed = false; + m_asAudioEntities[i].m_bIsUsed = FALSE; m_anAudioEntityIndices[i] = NUM_AUDIOENTITIES; } m_nAudioEntitiesTotal = 0; m_FrameCounter = 0; - m_bFifthFrameFlag = false; - m_bTimerJustReset = false; + m_bFifthFrameFlag = FALSE; + m_bTimerJustReset = FALSE; m_nTimer = 0; } @@ -83,7 +79,7 @@ cAudioManager::Terminate() MusicManager.Terminate(); for (uint32 i = 0; i < NUM_AUDIOENTITIES; i++) { - m_asAudioEntities[i].m_bIsUsed = false; + m_asAudioEntities[i].m_bIsUsed = FALSE; m_anAudioEntityIndices[i] = ARRAY_SIZE(m_anAudioEntityIndices); } @@ -98,7 +94,7 @@ cAudioManager::Terminate() SampleManager.Terminate(); - m_bIsInitialised = false; + m_bIsInitialised = FALSE; PostTerminateGameSpecificShutdown(); } } @@ -110,7 +106,7 @@ cAudioManager::Service() if (m_bTimerJustReset) { ResetAudioLogicTimers(m_nTimer); MusicManager.ResetTimers(m_nTimer); - m_bTimerJustReset = false; + m_bTimerJustReset = FALSE; } if (m_bIsInitialised) { m_nPreviousUserPause = m_nUserPause; @@ -132,8 +128,8 @@ cAudioManager::CreateEntity(eAudioType type, void *entity) return AEHANDLE_ERROR_BADAUDIOTYPE; for (uint32 i = 0; i < ARRAY_SIZE(m_asAudioEntities); i++) { if (!m_asAudioEntities[i].m_bIsUsed) { - m_asAudioEntities[i].m_bIsUsed = true; - m_asAudioEntities[i].m_bStatus = false; + m_asAudioEntities[i].m_bIsUsed = TRUE; + m_asAudioEntities[i].m_bStatus = FALSE; m_asAudioEntities[i].m_nType = type; m_asAudioEntities[i].m_pEntity = entity; m_asAudioEntities[i].m_awAudioEvent[0] = SOUND_NO_SOUND; @@ -152,7 +148,7 @@ void cAudioManager::DestroyEntity(int32 id) { if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed) { - m_asAudioEntities[id].m_bIsUsed = false; + m_asAudioEntities[id].m_bIsUsed = FALSE; for (int32 i = 0; i < m_nAudioEntitiesTotal; ++i) { if (id == m_anAudioEntityIndices[i]) { if (i < NUM_AUDIOENTITIES - 1) @@ -165,7 +161,7 @@ cAudioManager::DestroyEntity(int32 id) } void -cAudioManager::SetEntityStatus(int32 id, uint8 status) +cAudioManager::SetEntityStatus(int32 id, bool8 status) { if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed) m_asAudioEntities[id].m_bStatus = status; @@ -193,7 +189,7 @@ cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol) } } else { int32 i = 0; - while (true) { + while (TRUE) { if (i >= entity.m_AudioEvents) { if (entity.m_AudioEvents < ARRAY_SIZE(entity.m_awAudioEvent)) { entity.m_awAudioEvent[i] = sound; @@ -246,7 +242,7 @@ cAudioManager::SetEffectsFadeVol(uint8 volume) const } void -cAudioManager::SetMonoMode(uint8 mono) +cAudioManager::SetMonoMode(bool8 mono) { SampleManager.SetMonoMode(mono); } @@ -261,7 +257,7 @@ void cAudioManager::ResetTimers(uint32 time) { if (m_bIsInitialised) { - m_bTimerJustReset = true; + m_bTimerJustReset = TRUE; m_nTimer = time; ClearRequestedQueue(); if (m_nActiveSampleQueue) { @@ -276,11 +272,11 @@ cAudioManager::ResetTimers(uint32 time) ClearActiveSamples(); ClearMissionAudio(0); ClearMissionAudio(1); - SampleManager.StopChannel(policeChannel); + SampleManager.StopChannel(CHANNEL_POLICE_RADIO); SampleManager.SetEffectsFadeVolume(0); SampleManager.SetMusicFadeVolume(0); MusicManager.ResetMusicAfterReload(); - m_bIsPlayerShutUp = false; + m_bIsPlayerShutUp = FALSE; #ifdef AUDIO_OAL SampleManager.Service(); #endif @@ -335,7 +331,7 @@ cAudioManager::Get3DProviderName(uint8 id) const if (!m_bIsInitialised) return nil; #ifdef AUDIO_OAL - id = clamp(id, 0, SampleManager.GetNum3DProvidersAvailable() - 1); + id = Clamp(id, 0, SampleManager.GetNum3DProvidersAvailable() - 1); #else // We don't want that either since it will crash the game, but skipping for now if (id >= SampleManager.GetNum3DProvidersAvailable()) @@ -391,13 +387,13 @@ cAudioManager::SetSpeakerConfig(int32 conf) const SampleManager.SetSpeakerConfig(conf); } -bool +bool8 cAudioManager::IsMP3RadioChannelAvailable() const { if (m_bIsInitialised) return SampleManager.IsMP3RadioChannelAvailable(); - return false; + return FALSE; } void @@ -417,25 +413,25 @@ cAudioManager::ReacquireDigitalHandle() const } void -cAudioManager::SetDynamicAcousticModelingStatus(uint8 status) +cAudioManager::SetDynamicAcousticModelingStatus(bool8 status) { - m_bDynamicAcousticModelingStatus = status!=0; + m_bDynamicAcousticModelingStatus = status; } -bool +bool8 cAudioManager::CheckForAnAudioFileOnCD() const { return SampleManager.CheckForAnAudioFileOnCD(); } -uint8 +char cAudioManager::GetCDAudioDriveLetter() const { if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter(); - return 0; + return '\0'; } -bool +bool8 cAudioManager::IsAudioInitialised() const { return m_bIsInitialised; @@ -444,9 +440,12 @@ cAudioManager::IsAudioInitialised() const void cAudioManager::ServiceSoundEffects() { +#ifdef FIX_BUGS + if(CTimer::GetLogicalFramesPassed() != 0) +#endif m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0; if (m_nUserPause && !m_nPreviousUserPause) { - for (int32 i = 0; i < allChannels; i++) + for (int32 i = 0; i < NUM_CHANNELS; i++) SampleManager.StopChannel(i); ClearRequestedQueue(); @@ -532,7 +531,7 @@ cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, if (dist != 0.0f) { float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier; if (m_fSpeedOfSound > Abs(speedOfSource)) { - speedOfSource = clamp2(speedOfSource, 0.0f, 1.5f); + speedOfSource = Clamp2(speedOfSource, 0.0f, 1.5f); newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound); } } @@ -545,7 +544,7 @@ cAudioManager::RandomDisplacement(uint32 seed) const { int32 value; - static bool bPos = true; + static bool8 bPos = TRUE; static uint32 Adjustment = 0; if (!seed) @@ -576,7 +575,7 @@ cAudioManager::AddSampleToRequestedQueue() { int32 calculatedVolume; uint8 sampleIndex; - bool bReflections; + bool8 bReflections; if (m_sQueueSample.m_nSampleIndex < TOTAL_AUDIO_SAMPLES) { calculatedVolume = m_sQueueSample.m_nReleasingVolumeModificator * (MAX_VOLUME - m_sQueueSample.m_nVolume); @@ -589,24 +588,24 @@ cAudioManager::AddSampleToRequestedQueue() ++m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; } m_sQueueSample.m_nCalculatedVolume = calculatedVolume; - m_sQueueSample.m_bLoopEnded = false; + m_sQueueSample.m_bLoopEnded = FALSE; if (m_sQueueSample.m_bIs2D || CCullZones::InRoomForAudio()) { - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bRequireReflection = FALSE; m_sQueueSample.m_nLoopsRemaining = 0; } if (m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount) { bReflections = m_sQueueSample.m_bRequireReflection; } else { - bReflections = false; + bReflections = FALSE; m_sQueueSample.m_nLoopsRemaining = 0; } - m_sQueueSample.m_bRequireReflection = false; + m_sQueueSample.m_bRequireReflection = FALSE; if ( m_bReverb && m_sQueueSample.m_bIs2D ) m_sQueueSample.field_4C = 30; if (!m_bDynamicAcousticModelingStatus) - m_sQueueSample.m_bReverbFlag = false; + m_sQueueSample.m_bReverbFlag = FALSE; m_asSamples[m_nActiveSampleQueue][sampleIndex] = m_sQueueSample; @@ -773,7 +772,12 @@ cAudioManager::UpdateReflections() void cAudioManager::AddReleasingSounds() { - bool toProcess[44]; // why not 27? + // in case someone would want to increase it +#ifdef FIX_BUGS + bool8 toProcess[NUM_CHANNELS_GENERIC]; +#else + bool8 toProcess[44]; +#endif int8 queue = m_nActiveSampleQueue == 0 ? 1 : 0; @@ -782,19 +786,19 @@ cAudioManager::AddReleasingSounds() if (sample.m_bLoopEnded) continue; - toProcess[i] = false; + toProcess[i] = FALSE; for (int32 j = 0; j < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; j++) { if (sample.m_nEntityIndex == m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][j]].m_nEntityIndex && sample.m_nCounter == m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][j]].m_nCounter) { - toProcess[i] = true; + toProcess[i] = TRUE; break; } } if (!toProcess[i]) { if (sample.m_nCounter <= 255 || !sample.m_nLoopsRemaining) { - if (!sample.m_nReleasingVolumeDivider) + if (sample.m_nReleasingVolumeDivider == 0) continue; - if (!sample.m_nLoopCount) { + if (sample.m_nLoopCount == 0) { if (sample.m_nVolumeChange == -1) { sample.m_nVolumeChange = sample.m_nVolume / sample.m_nReleasingVolumeDivider; if (sample.m_nVolumeChange <= 0) @@ -806,12 +810,15 @@ cAudioManager::AddReleasingSounds() } sample.m_nVolume -= sample.m_nVolumeChange; } +#ifdef FIX_BUGS + if(CTimer::GetLogicalFramesPassed() != 0) +#endif --sample.m_nReleasingVolumeDivider; if (m_bFifthFrameFlag) { if (sample.m_nReleasingVolumeModificator < 20) ++sample.m_nReleasingVolumeModificator; } - sample.m_bReleasingSoundFlag = false; + sample.m_bReleasingSoundFlag = FALSE; } memcpy(&m_sQueueSample, &sample, sizeof(tSound)); AddSampleToRequestedQueue(); @@ -829,12 +836,12 @@ cAudioManager::ProcessActiveQueues() uint8 vol; uint8 offset; float x; - bool flag; - bool missionState; + bool8 flag; + bool8 missionState; for (int32 i = 0; i < m_nActiveSamples; i++) { - m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false; - m_asActiveSamples[i].m_bIsProcessed = false; + m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = FALSE; + m_asActiveSamples[i].m_bIsProcessed = FALSE; } for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) { tSound& sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]]; @@ -847,19 +854,19 @@ cAudioManager::ProcessActiveQueues() if (m_FrameCounter & 1) { if (!(j & 1)) { - flag = false; + flag = FALSE; } else { - flag = true; + flag = TRUE; } } else if (j & 1) { - flag = false; + flag = FALSE; } else { - flag = true; + flag = TRUE; } if (flag && !SampleManager.GetChannelUsedFlag(j)) { - sample.m_bLoopEnded = true; - m_asActiveSamples[j].m_bLoopEnded = true; + sample.m_bLoopEnded = TRUE; + m_asActiveSamples[j].m_bLoopEnded = TRUE; m_asActiveSamples[j].m_nSampleIndex = NO_SAMPLE; m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE; continue; @@ -867,8 +874,8 @@ cAudioManager::ProcessActiveQueues() if (!sample.m_nReleasingVolumeDivider) sample.m_nReleasingVolumeDivider = 1; } - sample.m_bIsProcessed = true; - m_asActiveSamples[j].m_bIsProcessed = true; + sample.m_bIsProcessed = TRUE; + m_asActiveSamples[j].m_bIsProcessed = TRUE; sample.m_nVolumeChange = -1; if (!sample.m_bReleasingSoundFlag) { if (sample.m_bIs2D) { @@ -888,11 +895,11 @@ cAudioManager::ProcessActiveQueues() sample.m_fSpeedMultiplier); if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) { - m_asActiveSamples[j].m_nFrequency = clamp2((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency, 6000); + m_asActiveSamples[j].m_nFrequency = Clamp2((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency, 6000); SampleManager.SetChannelFrequency(j, m_asActiveSamples[j].m_nFrequency); } if (sample.m_nEmittingVolume != m_asActiveSamples[j].m_nEmittingVolume) { - vol = clamp2((int8)sample.m_nEmittingVolume, (int8)m_asActiveSamples[j].m_nEmittingVolume, 10); + vol = Clamp2((int8)sample.m_nEmittingVolume, (int8)m_asActiveSamples[j].m_nEmittingVolume, 10); if (field_4) { emittingVol = 2 * Min(63, vol); @@ -900,10 +907,10 @@ cAudioManager::ProcessActiveQueues() emittingVol = vol; } - missionState = false; + missionState = FALSE; for (int32 k = 0; k < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); k++) { if (m_sMissionAudio.m_bIsMobile[k]) { - missionState = true; + missionState = TRUE; break; } } @@ -924,8 +931,8 @@ cAudioManager::ProcessActiveQueues() SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag); break; //continue for i } - sample.m_bIsProcessed = false; - m_asActiveSamples[j].m_bIsProcessed = false; + sample.m_bIsProcessed = FALSE; + m_asActiveSamples[j].m_bIsProcessed = FALSE; //continue for j } } @@ -966,10 +973,10 @@ cAudioManager::ProcessActiveQueues() } if (SampleManager.InitialiseChannel(k, m_asActiveSamples[k].m_nSampleIndex, m_asActiveSamples[k].m_nBankIndex)) { SampleManager.SetChannelFrequency(k, m_asActiveSamples[k].m_nFrequency); - bool isMobile = false; + bool8 isMobile = FALSE; for (int32 l = 0; l < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); l++) { if (m_sMissionAudio.m_bIsMobile[l]) { - isMobile = true; + isMobile = TRUE; break; } } @@ -1000,8 +1007,8 @@ cAudioManager::ProcessActiveQueues() SampleManager.SetChannel3DDistances(k, m_asActiveSamples[k].m_fSoundIntensity, 0.25f * m_asActiveSamples[k].m_fSoundIntensity); SampleManager.StartChannel(k); } - m_asActiveSamples[k].m_bIsProcessed = true; - sample.m_bIsProcessed = true; + m_asActiveSamples[k].m_bIsProcessed = TRUE; + sample.m_bIsProcessed = TRUE; sample.m_nVolumeChange = -1; break; } @@ -1029,28 +1036,30 @@ cAudioManager::ClearActiveSamples() m_asActiveSamples[i].m_nCounter = 0; m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE; m_asActiveSamples[i].m_nBankIndex = INVALID_SFX_BANK; - m_asActiveSamples[i].m_bIs2D = false; + m_asActiveSamples[i].m_bIs2D = FALSE; m_asActiveSamples[i].m_nReleasingVolumeModificator = 5; m_asActiveSamples[i].m_nFrequency = 0; m_asActiveSamples[i].m_nVolume = 0; m_asActiveSamples[i].m_nEmittingVolume = 0; m_asActiveSamples[i].m_fDistance = 0.0f; - m_asActiveSamples[i].m_bIsProcessed = false; - m_asActiveSamples[i].m_bLoopEnded = false; + m_asActiveSamples[i].m_bIsProcessed = FALSE; + m_asActiveSamples[i].m_bLoopEnded = FALSE; m_asActiveSamples[i].m_nLoopCount = 1; +#ifndef GTA_PS2 m_asActiveSamples[i].m_nLoopStart = 0; m_asActiveSamples[i].m_nLoopEnd = -1; +#endif m_asActiveSamples[i].m_fSpeedMultiplier = 0.0f; m_asActiveSamples[i].m_fSoundIntensity = 200.0f; m_asActiveSamples[i].m_nOffset = 63; - m_asActiveSamples[i].m_bReleasingSoundFlag = false; + m_asActiveSamples[i].m_bReleasingSoundFlag = FALSE; m_asActiveSamples[i].m_nCalculatedVolume = 0; m_asActiveSamples[i].m_nReleasingVolumeDivider = 0; m_asActiveSamples[i].m_nVolumeChange = -1; m_asActiveSamples[i].m_vecPos = CVector(0.0f, 0.0f, 0.0f); - m_asActiveSamples[i].m_bReverbFlag = false; + m_asActiveSamples[i].m_bReverbFlag = FALSE; m_asActiveSamples[i].m_nLoopsRemaining = 0; - m_asActiveSamples[i].m_bRequireReflection = false; + m_asActiveSamples[i].m_bRequireReflection = FALSE; } } @@ -1067,7 +1076,7 @@ void cAudioManager::AdjustSamplesVolume() { for (int i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) { - tSound *pSample = &m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i] + 1]; + tSound *pSample = &m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]]; if (!pSample->m_bIs2D) pSample->m_nEmittingVolume = ComputeEmittingVolume(pSample->m_nEmittingVolume, pSample->m_fSoundIntensity, pSample->m_fDistance); diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 14eacda5..2e3aeb6d 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -2,7 +2,7 @@ #include "audio_enums.h" #include "AudioCollision.h" -#include "PoliceRadio.h" +#include "PolRadio.h" #include "VehicleModelInfo.h" #include "Vehicle.h" @@ -13,27 +13,29 @@ public: int32 m_nCounter; int32 m_nSampleIndex; uint8 m_nBankIndex; - bool m_bIs2D; + bool8 m_bIs2D; int32 m_nReleasingVolumeModificator; uint32 m_nFrequency; uint8 m_nVolume; float m_fDistance; int32 m_nLoopCount; +#ifndef GTA_PS2 int32 m_nLoopStart; int32 m_nLoopEnd; +#endif uint8 m_nEmittingVolume; float m_fSpeedMultiplier; float m_fSoundIntensity; - bool m_bReleasingSoundFlag; + bool8 m_bReleasingSoundFlag; CVector m_vecPos; - bool m_bReverbFlag; + bool8 m_bReverbFlag; uint8 m_nLoopsRemaining; - bool m_bRequireReflection; // Used for oneshots + bool8 m_bRequireReflection; // Used for oneshots uint8 m_nOffset; uint8 field_4C; int32 m_nReleasingVolumeDivider; - bool m_bIsProcessed; - bool m_bLoopEnded; + bool8 m_bIsProcessed; + bool8 m_bLoopEnded; int32 m_nCalculatedVolume; int8 m_nVolumeChange; }; @@ -48,7 +50,7 @@ class tAudioEntity public: eAudioType m_nType; void *m_pEntity; - bool m_bIsUsed; + bool8 m_bIsUsed; uint8 m_bStatus; int16 m_awAudioEvent[NUM_AUDIOENTITY_EVENTS]; float m_afVolume[NUM_AUDIOENTITY_EVENTS]; @@ -78,7 +80,7 @@ public: uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS]; uint8 m_nActiveBank; #ifdef GTA_PC - bool m_bDelay; + bool8 m_bDelay; uint32 m_nDelayTimer; #endif @@ -110,14 +112,14 @@ class cMissionAudio { public: CVector m_vecPos[MISSION_AUDIO_SLOTS]; - bool m_bPredefinedProperties[MISSION_AUDIO_SLOTS]; + bool8 m_bPredefinedProperties[MISSION_AUDIO_SLOTS]; int32 m_nSampleIndex[MISSION_AUDIO_SLOTS]; uint8 m_nLoadingStatus[MISSION_AUDIO_SLOTS]; uint8 m_nPlayStatus[MISSION_AUDIO_SLOTS]; - bool m_bIsPlaying[MISSION_AUDIO_SLOTS]; + bool8 m_bIsPlaying[MISSION_AUDIO_SLOTS]; int32 m_nMissionAudioCounter[MISSION_AUDIO_SLOTS]; - bool m_bIsPlayed[MISSION_AUDIO_SLOTS]; - bool m_bIsMobile[MISSION_AUDIO_SLOTS]; + bool8 m_bIsPlayed[MISSION_AUDIO_SLOTS]; + bool8 m_bIsMobile[MISSION_AUDIO_SLOTS]; }; VALIDATE_SIZE(cMissionAudio, 0x38); @@ -141,7 +143,7 @@ class CPed; class cPedParams { public: - bool m_bDistanceCalculated; + bool8 m_bDistanceCalculated; float m_fDistance; CPed *m_pPed; @@ -157,7 +159,7 @@ class cVehicleParams { public: int32 m_VehicleType; - bool m_bDistanceCalculated; + bool8 m_bDistanceCalculated; float m_fDistance; CVehicle *m_pVehicle; cTransmission *m_pTransmission; @@ -193,22 +195,22 @@ enum { class cAudioManager { public: - bool m_bIsInitialised; + bool8 m_bIsInitialised; uint8 m_bReverb; // unused - bool m_bFifthFrameFlag; + bool8 m_bFifthFrameFlag; uint8 m_nActiveSamples; uint8 field_4; // unused - bool m_bDynamicAcousticModelingStatus; + bool8 m_bDynamicAcousticModelingStatus; int8 field_6; float m_fSpeedOfSound; - bool m_bTimerJustReset; + bool8 m_bTimerJustReset; int32 m_nTimer; tSound m_sQueueSample; uint8 m_nActiveSampleQueue; - tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS]; - uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS]; + tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_CHANNELS_GENERIC]; + uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_CHANNELS_GENERIC]; uint8 m_SampleRequestQueuesStatus[NUM_SOUNDS_SAMPLES_BANKS]; - tSound m_asActiveSamples[NUM_SOUNDS_SAMPLES_SLOTS]; + tSound m_asActiveSamples[NUM_CHANNELS_GENERIC]; tAudioEntity m_asAudioEntities[NUM_AUDIOENTITIES]; int32 m_anAudioEntityIndices[NUM_AUDIOENTITIES]; int32 m_nAudioEntitiesTotal; @@ -217,11 +219,11 @@ public: cAudioScriptObjectManager m_sAudioScriptObjectManager; // miami - uint8 m_bIsPlayerShutUp; + bool8 m_bIsPlayerShutUp; uint8 m_nPlayerMood; uint32 m_nPlayerMoodTimer; uint8 field_rest[4]; - bool m_bGenericSfx; + bool8 m_bGenericSfx; cPedComments m_sPedComments; int32 m_nFireAudioEntity; @@ -253,19 +255,19 @@ public: float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; } int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; } - bool IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; } - bool ShouldDuckMissionAudio(uint8 slot) const; + bool8 IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; } + bool8 ShouldDuckMissionAudio(uint8 slot) const; // "Should" be in alphabetic order, except "getXTalkSfx" void AddDetailsToRequestedOrderList(uint8 sample); // done (inlined in vc) - void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping); // done + void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping); // done void AddReflectionsToRequestedQueue(); // done void AddReleasingSounds(); // done void AddSampleToRequestedQueue(); // done void AgeCrimes(); // done (inlined in vc) - void CalculateDistance(bool &condition, float dist); // done - bool CheckForAnAudioFileOnCD() const; // done + void CalculateDistance(bool8 &condition, float dist); // done + bool8 CheckForAnAudioFileOnCD() const; // done void ClearActiveSamples(); // done void ClearMissionAudio(uint8 slot); // done (inlined in vc) void ClearRequestedQueue(); // done (inlined in vc) @@ -379,7 +381,7 @@ public: void GenerateIntegerRandomNumberTable(); // done char *Get3DProviderName(uint8 id) const; // done - uint8 GetCDAudioDriveLetter() const; // done + char GetCDAudioDriveLetter() const; // done int8 GetCurrent3DProviderIndex() const; // done int8 AutoDetect3DProviders() const; // done float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used @@ -396,17 +398,17 @@ public: float velocityChange); // done float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); // done - bool HasAirBrakes(int32 model) const; // done + bool8 HasAirBrakes(int32 model) const; // done void Initialise(); // done void InitialisePoliceRadio(); // done void InitialisePoliceRadioZones(); // done void InterrogateAudioEntities(); // done (inlined) - bool IsAudioInitialised() const; // done - bool IsMissionAudioSampleFinished(uint8 slot); // done - bool IsMP3RadioChannelAvailable() const; // done + bool8 IsAudioInitialised() const; // done + bool8 IsMissionAudioSampleFinished(uint8 slot); // done + bool8 IsMP3RadioChannelAvailable() const; // done - bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done + bool8 MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done void PlayLoadedMissionAudio(uint8 slot); // done void PlayOneShot(int32 index, uint16 sound, float vol); // done @@ -420,20 +422,20 @@ public: void PreTerminateGameSpecificShutdown(); // done /// processX - main logic of adding new sounds void ProcessActiveQueues(); // done - bool ProcessAirBrakes(cVehicleParams& params); // done - bool ProcessBoatEngine(cVehicleParams& params); - bool ProcessBoatMovingOverWater(cVehicleParams& params); //done + bool8 ProcessAirBrakes(cVehicleParams& params); // done + bool8 ProcessBoatEngine(cVehicleParams& params); + bool8 ProcessBoatMovingOverWater(cVehicleParams& params); //done #ifdef GTA_BRIDGE void ProcessBridge(); // done(bcs not exists in VC) void ProcessBridgeMotor(); // done(bcs not exists in VC) void ProcessBridgeOneShots(); // done(bcs not exists in VC) void ProcessBridgeWarning(); // done(bcs not exists in VC) #endif - bool ProcessCarBombTick(cVehicleParams& params); // done + bool8 ProcessCarBombTick(cVehicleParams& params); // done void ProcessCarHeli(cVehicleParams& params); // done void ProcessCesna(cVehicleParams& params); // done //void ProcessCrane(); // done(bcs not exists in VC) - bool ProcessEngineDamage(cVehicleParams& params); // done + bool8 ProcessEngineDamage(cVehicleParams& params); // done void ProcessEntity(int32 sound); // done void ProcessExplosions(int32 explosion); // done void ProcessFireHydrant(); // done @@ -462,25 +464,25 @@ public: void ProcessProjectiles(); // done void ProcessRainOnVehicle(cVehicleParams& params); // done void ProcessReverb() const; // done - bool ProcessReverseGear(cVehicleParams& params); // done + bool8 ProcessReverseGear(cVehicleParams& params); // done void ProcessScriptObject(int32 id); // done void ProcessSpecial(); // done #ifdef GTA_TRAIN - bool ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC) + bool8 ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC) #endif void ProcessVehicle(CVehicle *vehicle); // done - bool ProcessVehicleDoors(cVehicleParams ¶ms); // done + bool8 ProcessVehicleDoors(cVehicleParams ¶ms); // done void ProcessVehicleEngine(cVehicleParams ¶ms); // done void ProcessVehicleFlatTyre(cVehicleParams ¶ms); // done - bool ProcessVehicleHorn(cVehicleParams ¶ms); // done + bool8 ProcessVehicleHorn(cVehicleParams ¶ms); // done void ProcessVehicleOneShots(cVehicleParams ¶ms); // done - bool ProcessVehicleReverseWarning(cVehicleParams ¶ms); // done - bool ProcessVehicleRoadNoise(cVehicleParams ¶ms); // done - bool ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); // done - bool ProcessVehicleSkidding(cVehicleParams ¶ms); // done + bool8 ProcessVehicleReverseWarning(cVehicleParams ¶ms); // done + bool8 ProcessVehicleRoadNoise(cVehicleParams ¶ms); // done + bool8 ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); // done + bool8 ProcessVehicleSkidding(cVehicleParams ¶ms); // done void ProcessWaterCannon(int32); // done void ProcessWeather(int32 id); // done - bool ProcessWetRoadNoise(cVehicleParams& params); // done + bool8 ProcessWetRoadNoise(cVehicleParams& params); // done void ProcessEscalators(); // done void ProcessExtraSounds(); // done @@ -499,26 +501,26 @@ public: void ServicePoliceRadioChannel(uint8 wantedLevel); // done void ServiceSoundEffects(); // done int8 SetCurrent3DProvider(uint8 which); // done - void SetDynamicAcousticModelingStatus(uint8 status); // done + void SetDynamicAcousticModelingStatus(bool8 status); // done void SetEffectsFadeVol(uint8 volume) const; // done void SetEffectsMasterVolume(uint8 volume) const; // done void SetMP3BoostVolume(uint8 volume) const; // done - void SetEntityStatus(int32 id, uint8 status); // done + void SetEntityStatus(int32 id, bool8 status); // done uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); // done void SetMissionAudioLocation(uint8 slot, float x, float y, float z); // done void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized - void SetMonoMode(uint8 mono); // done + void SetMonoMode(bool8 mono); // done void SetMusicFadeVol(uint8 volume) const; // done void SetMusicMasterVolume(uint8 volume) const; // done void SetSpeakerConfig(int32 conf) const; // done void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); // done void SetUpOneShotCollisionSound(const cAudioCollision &col); // done - bool SetupCrimeReport(); // done - bool SetupJumboEngineSound(uint8 vol, uint32 freq); // done - bool SetupJumboFlySound(uint8 emittingVol); // done - bool SetupJumboRumbleSound(uint8 emittingVol); // done - bool SetupJumboTaxiSound(uint8 vol); // done - bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done + bool8 SetupCrimeReport(); // done + bool8 SetupJumboEngineSound(uint8 vol, uint32 freq); // done + bool8 SetupJumboFlySound(uint8 emittingVol); // done + bool8 SetupJumboRumbleSound(uint8 emittingVol); // done + bool8 SetupJumboTaxiSound(uint8 vol); // done + bool8 SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done void SetupPedComments(cPedParams ¶ms, uint16 sound); // done void SetupSuspectLastSeenReport(); @@ -527,12 +529,12 @@ public: void UpdateGasPedalAudio(CVehicle *veh, int vehType); // done void UpdateReflections(); // done - bool UsesReverseWarning(int32 model) const; // done - bool UsesSiren(cVehicleParams ¶ms) const; // done - bool UsesSirenSwitching(cVehicleParams ¶ms) const; // done + bool8 UsesReverseWarning(int32 model) const; // done + bool8 UsesSiren(cVehicleParams ¶ms) const; // done + bool8 UsesSirenSwitching(cVehicleParams ¶ms) const; // done CVehicle *FindVehicleOfPlayer(); // done - void SetPedTalkingStatus(CPed *ped, uint8 status); // done + void SetPedTalkingStatus(CPed *ped, bool8 status); // done void SetPlayersMood(uint8 mood, uint32 time); // done float Sqrt(float v) const { return v <= 0.0f ? 0.0f : ::Sqrt(v); } @@ -544,7 +546,24 @@ public: #endif }; -#ifdef AUDIO_MSS +/* + Manual loop points are not on PS2 so let's have these macros to avoid massive ifndefs. + Setting these manually was pointless anyway since they never change from sdt values. + What were they thinking? +*/ +#ifndef GTA_PS2 +#define RESET_LOOP_OFFSETS \ + m_sQueueSample.m_nLoopStart = 0; \ + m_sQueueSample.m_nLoopEnd = -1; +#define SET_LOOP_OFFSETS(sample) \ + m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(sample); \ + m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(sample); +#else +#define RESET_LOOP_OFFSETS +#define SET_LOOP_OFFSETS(sample) +#endif + +#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS) static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error"); #endif diff --git a/src/audio/AudioSamples.h b/src/audio/AudioSamples.h index 5c5d857d..b98bfd7c 100644 --- a/src/audio/AudioSamples.h +++ b/src/audio/AudioSamples.h @@ -225,8 +225,8 @@ enum eSfxSample SFX_POLICE_RADIO_WASHINGTON_BEACH, SFX_POLICE_RADIO_VICE_POINT, SFX_POLICE_RADIO_LEAF_LINKS, - SFX_POLICE_RADIO_STRAFISH_ISLAND, //??????????? - SFX_POLICE_RADIO_VICE_PORT, + SFX_POLICE_RADIO_STARFISH_ISLAND, //??????????? + SFX_POLICE_RADIO_VICEPORT, SFX_POLICE_RADIO_LITTLE_HAVANA, SFX_POLICE_RADIO_LITTLE_HAITI, SFX_POLICE_RADIO_PRAWN_ISLAND, //??????????? IS THAT HOW SHE PRONOUNCES ISLAND? @@ -243,7 +243,7 @@ enum eSfxSample SFX_POLICE_RADIO_GREEN, SFX_POLICE_RADIO_SILVER, SFX_POLICE_RADIO_AMBULANCE, - SFX_POLICE_RADIO_2_DOOR, + SFX_POLICE_RADIO_TUDOOR, SFX_POLICE_RADIO_TRUCK, SFX_POLICE_RADIO_FIRE_TRUCK, SFX_POLICE_RADIO_PICKUP, @@ -446,12 +446,9 @@ enum eSfxSample SFX_CAR_FINGER_OFF_ACCEL_12, // some CHAINSAW STUFF - // SFX_CAR_CHAINSAW, //10973 - // SFX_CAR_CHAINSAW, //10974 - // SFX_CAR_CHAINSAW, //10975 - SFX_CAR_ACCEL_13, - SFX_CAR_AFTER_ACCEL_13, - SFX_CAR_FINGER_OFF_ACCEL_13, + SFX_CAR_CHAINSAW_IDLE, + SFX_CAR_CHAINSAW_ATTACK, + SFX_CAR_CHAINSAW_EMPTY, // unused SFX_RC_IDLE, // 10976 SFX_RC_REV, // 10977 @@ -575,8 +572,200 @@ enum eSfxSample SFX_FOOTSTEP_SAND_3, SFX_FOOTSTEP_SAND_4, - // TODO: miami ped comments... THERE'S OVER 9000 - SFX_POLICE_BOAT_1 = 714, + // ped comments + + SFX_BMYBB_BLOCKED_1, + SFX_BMYBB_BLOCKED_2, + SFX_BMYBB_BLOCKED_3, + SFX_BMYBB_BLOCKED_4, + SFX_BMYBB_BLOCKED_5, + SFX_BMYBB_BLOCKED_6, + SFX_BMYBB_BLOCKED_7, + SFX_BMYBB_BLOCKED_8, + SFX_BMYBB_BLOCKED_9, + SFX_BMYBB_BLOCKED_10, + SFX_BMYBB_BLOCKED_11, + SFX_BMYBB_BLOCKED_12, + SFX_BMYBB_BLOCKED_13, + SFX_BMYBB_BUMP_1, + SFX_BMYBB_BUMP_2, + SFX_BMYBB_BUMP_3, + SFX_BMYBB_BUMP_4, + SFX_BMYBB_BUMP_5, + SFX_BMYBB_BUMP_6, + SFX_BMYBB_BUMP_7, + SFX_BMYBB_BUMP_8, + SFX_BMYBB_BUMP_9, + SFX_BMYBB_BUMP_10, + SFX_BMYBB_BUMP_11, + SFX_BMYBB_BUMP_12, + SFX_BMYBB_BUMP_13, + SFX_BMYBB_BUMP_14, + SFX_BMYBB_BUMP_15, + SFX_BMYBB_BUMP_16, + SFX_BMYBB_BUMP_17, + SFX_BMYBB_CAR_CRASH_1, + SFX_BMYBB_CAR_CRASH_2, + SFX_BMYBB_CAR_CRASH_3, + SFX_BMYBB_CAR_CRASH_4, + SFX_BMYBB_CAR_CRASH_5, + SFX_BMYBB_CAR_CRASH_6, + SFX_BMYBB_CAR_CRASH_7, + SFX_BMYBB_CAR_CRASH_8, + SFX_BMYBB_CAR_CRASH_9, + SFX_BMYBB_CHAT_1, + SFX_BMYBB_CHAT_2, + SFX_BMYBB_CHAT_3, + SFX_BMYBB_CHAT_4, + SFX_BMYBB_CHAT_5, + SFX_BMYBB_CHAT_6, + SFX_BMYBB_CHAT_7, + SFX_BMYBB_CHAT_8, + SFX_BMYBB_CHAT_9, + SFX_BMYBB_CHAT_10, + SFX_BMYBB_CHAT_11, + SFX_BMYBB_CHAT_12, + SFX_BMYBB_CHAT_13, + SFX_BMYBB_CHAT_14, + SFX_BMYBB_CHAT_15, + SFX_BMYBB_CHAT_16, + SFX_BMYBB_CHAT_17, + SFX_BMYBB_CHAT_18, + SFX_BMYBB_CHAT_19, + SFX_BMYBB_CHAT_20, + SFX_BMYBB_CHAT_21, + SFX_BMYBB_DODGE_1, + SFX_BMYBB_DODGE_2, + SFX_BMYBB_DODGE_3, + SFX_BMYBB_DODGE_4, + SFX_BMYBB_DODGE_5, + SFX_BMYBB_DODGE_6, + SFX_BMYBB_DODGE_7, + SFX_BMYBB_DODGE_8, + SFX_BMYBB_DODGE_9, + SFX_BMYBB_DODGE_10, + SFX_BMYBB_DODGE_11, + SFX_BMYBB_DODGE_12, + SFX_BMYBB_DODGE_13, + SFX_BMYBB_DODGE_14, + SFX_BMYBB_DODGE_15, + SFX_BMYBB_DODGE_16, + SFX_BMYBB_DODGE_17, + SFX_BMYBB_DODGE_18, + SFX_BMYBB_EYEING_1, + SFX_BMYBB_EYEING_2, + SFX_BMYBB_EYEING_3, + SFX_BMYBB_EYEING_4, + SFX_BMYBB_EYEING_5, + SFX_BMYBB_EYEING_6, + SFX_BMYBB_EYEING_7, + SFX_BMYBB_EYEING_8, + SFX_BMYBB_EYEING_9, + SFX_BMYBB_EYEING_10, + SFX_BMYBB_EYEING_11, + SFX_BMYBB_EYEING_12, + SFX_BMYBB_EYEING_13, + SFX_BMYBB_EYEING_14, + SFX_BMYBB_EYEING_15, + SFX_BMYBB_EYEING_16, + SFX_BMYBB_FIGHT_1, + SFX_BMYBB_FIGHT_2, + SFX_BMYBB_FIGHT_3, + SFX_BMYBB_FIGHT_4, + SFX_BMYBB_FIGHT_5, + SFX_BMYBB_FIGHT_6, + SFX_BMYBB_FIGHT_7, + SFX_BMYBB_FIGHT_8, + SFX_BMYBB_FIGHT_9, + SFX_BMYBB_FIGHT_10, + SFX_BMYBB_FIGHT_11, + SFX_BMYBB_FIGHT_12, + SFX_BMYBB_GENERIC_CRASH_1, + SFX_BMYBB_GENERIC_CRASH_2, + SFX_BMYBB_GENERIC_CRASH_3, + SFX_BMYBB_GENERIC_CRASH_4, + SFX_BMYBB_GENERIC_CRASH_5, + SFX_BMYBB_GENERIC_CRASH_6, + SFX_BMYBB_GENERIC_CRASH_7, + SFX_BMYBB_GENERIC_CRASH_8, + SFX_BMYBB_GENERIC_CRASH_9, + SFX_BMYBB_GUN_COOL_1, + SFX_BMYBB_GUN_COOL_2, + SFX_BMYBB_GUN_COOL_3, + SFX_BMYBB_GUN_COOL_4, + SFX_BMYBB_GUN_COOL_5, + SFX_BMYBB_INNOCENT_1, + SFX_BMYBB_INNOCENT_2, + SFX_BMYBB_INNOCENT_3, + SFX_BMYBB_INNOCENT_4, + SFX_BMYBB_JACKED_1, + SFX_BMYBB_JACKED_2, + SFX_BMYBB_JACKED_3, + SFX_BMYBB_JACKED_4, + SFX_BMYBB_JACKED_5, + SFX_BMYBB_JACKED_6, + SFX_BMYBB_JACKED_7, + SFX_BMYBB_JACKED_8, + SFX_BMYBB_JACKED_9, + SFX_BMYBB_JACKED_10, + SFX_BMYBB_JACKED_11, + SFX_BMYBB_JACKING_1, + SFX_BMYBB_JACKING_2, + SFX_BMYBB_JACKING_3, + SFX_BMYBB_JACKING_4, + SFX_BMYBB_JACKING_5, + SFX_BMYBB_JACKING_6, + SFX_BMYBB_JACKING_7, + SFX_BMYBB_JACKING_8, + SFX_BMYBB_JACKING_9, + SFX_BMYBB_JEER_1, + SFX_BMYBB_JEER_2, + SFX_BMYBB_JEER_3, + SFX_BMYBB_JEER_4, + SFX_BMYBB_JEER_5, + SFX_BMYBB_JEER_6, + SFX_BMYBB_JEER_7, + SFX_BMYBB_JEER_8, + SFX_BMYBB_JEER_9, + SFX_BMYBB_JEER_10, + SFX_BMYBB_JEER_11, + SFX_BMYBB_JEER_12, + SFX_BMYBB_JEER_13, + SFX_BMYBB_JEER_14, + SFX_BMYBB_JEER_15, + SFX_BMYBB_JEER_16, + SFX_BMYBB_LOST_1, + SFX_BMYBB_LOST_2, + SFX_BMYBB_MUGGED_1, + SFX_BMYBB_MUGGED_2, + SFX_BMYBB_MUGGED_3, + SFX_BMYBB_MUGGED_4, + SFX_BMYBB_MUGGED_5, + SFX_BMYBB_MUGGING_1, + SFX_BMYBB_MUGGING_2, + SFX_BMYBB_MUGGING_3, + SFX_BMYBB_MUGGING_4, + SFX_BMYBB_MUGGING_5, + SFX_BMYBB_MUGGING_6, + SFX_BMYBB_MUGGING_7, + SFX_BMYBB_MUGGING_8, + SFX_BMYBB_SAVED_1, + SFX_BMYBB_SAVED_2, + SFX_BMYBB_SAVED_3, + SFX_BMYBB_SAVED_4, + SFX_BMYBB_SAVED_5, + SFX_BMYBB_SAVED_6, + SFX_BMYBB_SHOCKED_1, + SFX_BMYBB_SHOCKED_2, + SFX_BMYBB_SHOCKED_3, + SFX_BMYBB_SHOCKED_4, + SFX_BMYBB_SHOCKED_5, + SFX_BMYBB_SHOCKED_6, + SFX_BMYBB_TAXI_1, + SFX_BMYBB_TAXI_2, + SFX_BMYBB_TAXI_3, + + SFX_POLICE_BOAT_1, SFX_POLICE_BOAT_2, SFX_POLICE_BOAT_3, SFX_POLICE_BOAT_4, @@ -621,190 +810,9311 @@ enum eSfxSample SFX_POLICE_HELI_19, SFX_POLICE_HELI_20, - SFX_GENERIC_FEMALE_GRUNT_1 = 2953, - SFX_GENERIC_FEMALE_GRUNT_2 = 2954, - SFX_GENERIC_FEMALE_GRUNT_3 = 2955, - SFX_GENERIC_FEMALE_GRUNT_4 = 2956, - SFX_GENERIC_FEMALE_GRUNT_5 = 2957, - SFX_GENERIC_FEMALE_GRUNT_6 = 2958, - SFX_GENERIC_FEMALE_GRUNT_7 = 2959, - SFX_GENERIC_FEMALE_GRUNT_8 = 2960, - SFX_GENERIC_FEMALE_GRUNT_9 = 2961, - SFX_GENERIC_FEMALE_GRUNT_10 = 2962, - SFX_GENERIC_FEMALE_GRUNT_11 = 2963, - SFX_GENERIC_FEMALE_GRUNT_12 = 2964, - SFX_GENERIC_FEMALE_GRUNT_13 = 2965, - SFX_GENERIC_FEMALE_GRUNT_14 = 2966, - SFX_GENERIC_FEMALE_GRUNT_15 = 2967, - SFX_GENERIC_FEMALE_GRUNT_16 = 2968, - SFX_GENERIC_FEMALE_GRUNT_17 = 2969, - SFX_GENERIC_FEMALE_GRUNT_18 = 2970, - SFX_GENERIC_FEMALE_GRUNT_19 = 2971, - SFX_GENERIC_FEMALE_GRUNT_20 = 2972, - SFX_GENERIC_FEMALE_GRUNT_21 = 2973, - SFX_GENERIC_FEMALE_GRUNT_22 = 2974, - SFX_GENERIC_FEMALE_GRUNT_23 = 2975, - SFX_GENERIC_FEMALE_GRUNT_24 = 2976, - SFX_GENERIC_FEMALE_GRUNT_25 = 2977, - SFX_GENERIC_FEMALE_GRUNT_26 = 2978, - SFX_GENERIC_FEMALE_GRUNT_27 = 2979, - SFX_GENERIC_FEMALE_GRUNT_28 = 2980, - SFX_GENERIC_FEMALE_GRUNT_29 = 2981, - SFX_GENERIC_FEMALE_GRUNT_30 = 2982, - SFX_GENERIC_FEMALE_GRUNT_31 = 2983, - SFX_GENERIC_FEMALE_GRUNT_32 = 2984, - SFX_GENERIC_FEMALE_GRUNT_33 = 2985, - SFX_GENERIC_MALE_FIRE_1 = 3013, - SFX_GENERIC_MALE_FIRE_2 = 3014, - SFX_GENERIC_MALE_FIRE_3 = 3015, - SFX_GENERIC_MALE_FIRE_4 = 3016, - SFX_GENERIC_MALE_FIRE_5 = 3017, - SFX_GENERIC_MALE_FIRE_6 = 3018, - SFX_GENERIC_MALE_FIRE_7 = 3019, - SFX_GENERIC_MALE_FIRE_8 = 3020, - SFX_GENERIC_MALE_FIRE_9 = 3021, - SFX_GENERIC_MALE_FIRE_10 = 3022, - SFX_GENERIC_MALE_FIRE_11 = 3023, - SFX_GENERIC_MALE_FIRE_12 = 3024, - SFX_GENERIC_MALE_FIRE_13 = 3025, - SFX_GENERIC_MALE_FIRE_14 = 3026, - SFX_GENERIC_MALE_FIRE_15 = 3027, - SFX_GENERIC_MALE_FIRE_16 = 3028, - SFX_GENERIC_MALE_FIRE_17 = 3029, - SFX_GENERIC_MALE_FIRE_18 = 3030, - SFX_GENERIC_MALE_FIRE_19 = 3031, - SFX_GENERIC_MALE_FIRE_20 = 3032, - SFX_GENERIC_MALE_FIRE_21 = 3033, - SFX_GENERIC_MALE_FIRE_22 = 3034, - SFX_GENERIC_MALE_FIRE_23 = 3035, - SFX_GENERIC_MALE_FIRE_24 = 3036, - SFX_GENERIC_MALE_FIRE_25 = 3037, - SFX_GENERIC_MALE_FIRE_26 = 3038, - SFX_GENERIC_MALE_FIRE_27 = 3039, - SFX_GENERIC_MALE_FIRE_28 = 3040, - SFX_GENERIC_MALE_FIRE_29 = 3041, - SFX_GENERIC_MALE_FIRE_30 = 3042, - SFX_GENERIC_MALE_FIRE_31 = 3043, - SFX_GENERIC_MALE_FIRE_32 = 3044, - SFX_GENERIC_MALE_DEATH_1 = 3045, - SFX_GENERIC_MALE_DEATH_2 = 3046, - SFX_GENERIC_MALE_DEATH_3 = 3047, - SFX_GENERIC_MALE_DEATH_4 = 3048, - SFX_GENERIC_MALE_DEATH_5 = 3049, - SFX_GENERIC_MALE_DEATH_6 = 3050, - SFX_GENERIC_MALE_DEATH_7 = 3051, - SFX_GENERIC_MALE_DEATH_8 = 3052, - SFX_GENERIC_MALE_DEATH_9 = 3053, - SFX_GENERIC_MALE_DEATH_10 = 3054, - SFX_GENERIC_MALE_DEATH_11 = 3055, - SFX_GENERIC_MALE_DEATH_12 = 3056, - SFX_GENERIC_MALE_DEATH_13 = 3057, - SFX_GENERIC_MALE_DEATH_14 = 3058, - SFX_GENERIC_MALE_DEATH_15 = 3059, - SFX_GENERIC_MALE_DEATH_16 = 3060, - SFX_GENERIC_MALE_DEATH_17 = 3061, - SFX_GENERIC_MALE_DEATH_18 = 3062, - SFX_GENERIC_MALE_DEATH_19 = 3063, - SFX_GENERIC_MALE_DEATH_20 = 3064, - SFX_GENERIC_MALE_DEATH_21 = 3065, - SFX_GENERIC_MALE_DEATH_22 = 3066, - SFX_GENERIC_MALE_DEATH_23 = 3067, - SFX_GENERIC_MALE_DEATH_24 = 3068, - SFX_GENERIC_MALE_DEATH_25 = 3069, - SFX_GENERIC_MALE_DEATH_26 = 3070, - SFX_GENERIC_MALE_DEATH_27 = 3071, - SFX_GENERIC_MALE_DEATH_28 = 3072, - SFX_GENERIC_MALE_DEATH_29 = 3073, - SFX_GENERIC_MALE_DEATH_30 = 3074, - SFX_GENERIC_MALE_DEATH_31 = 3075, - SFX_GENERIC_MALE_DEATH_32 = 3076, - SFX_GENERIC_MALE_DEATH_33 = 3077, - SFX_GENERIC_MALE_DEATH_34 = 3078, - SFX_GENERIC_MALE_DEATH_35 = 3079, - SFX_GENERIC_MALE_DEATH_36 = 3080, - SFX_GENERIC_MALE_DEATH_37 = 3081, - SFX_GENERIC_MALE_DEATH_38 = 3082, - SFX_GENERIC_MALE_DEATH_39 = 3083, - SFX_GENERIC_MALE_DEATH_40 = 3084, - SFX_GENERIC_MALE_DEATH_41 = 3085, - SFX_GENERIC_MALE_GRUNT_1 = 3086, - SFX_GENERIC_MALE_GRUNT_2 = 3087, - SFX_GENERIC_MALE_GRUNT_3 = 3088, - SFX_GENERIC_MALE_GRUNT_4 = 3089, - SFX_GENERIC_MALE_GRUNT_5 = 3090, - SFX_GENERIC_MALE_GRUNT_6 = 3091, - SFX_GENERIC_MALE_GRUNT_7 = 3092, - SFX_GENERIC_MALE_GRUNT_8 = 3093, - SFX_GENERIC_MALE_GRUNT_9 = 3094, - SFX_GENERIC_MALE_GRUNT_10 = 3095, - SFX_GENERIC_MALE_GRUNT_11 = 3096, - SFX_GENERIC_MALE_GRUNT_12 = 3097, - SFX_GENERIC_MALE_GRUNT_13 = 3098, - SFX_GENERIC_MALE_GRUNT_14 = 3099, - SFX_GENERIC_MALE_GRUNT_15 = 3100, - SFX_GENERIC_MALE_GRUNT_16 = 3101, - SFX_GENERIC_MALE_GRUNT_17 = 3102, - SFX_GENERIC_MALE_GRUNT_18 = 3103, - SFX_GENERIC_MALE_GRUNT_19 = 3104, - SFX_GENERIC_MALE_GRUNT_20 = 3105, - SFX_GENERIC_MALE_GRUNT_21 = 3106, - SFX_GENERIC_MALE_GRUNT_22 = 3107, - SFX_GENERIC_MALE_GRUNT_23 = 3108, - SFX_GENERIC_MALE_GRUNT_24 = 3109, - SFX_GENERIC_MALE_GRUNT_25 = 3110, - SFX_GENERIC_MALE_GRUNT_26 = 3111, - SFX_GENERIC_MALE_GRUNT_27 = 3112, - SFX_GENERIC_MALE_GRUNT_28 = 3113, - SFX_GENERIC_MALE_GRUNT_29 = 3114, - SFX_GENERIC_MALE_GRUNT_30 = 3115, - SFX_GENERIC_MALE_GRUNT_31 = 3116, - SFX_GENERIC_MALE_GRUNT_32 = 3117, - SFX_GENERIC_MALE_GRUNT_33 = 3118, - SFX_GENERIC_MALE_GRUNT_34 = 3119, - SFX_GENERIC_MALE_GRUNT_35 = 3120, - SFX_GENERIC_MALE_GRUNT_36 = 3121, - SFX_GENERIC_MALE_GRUNT_37 = 3122, - SFX_GENERIC_MALE_GRUNT_38 = 3123, - SFX_GENERIC_MALE_GRUNT_39 = 3124, - SFX_GENERIC_MALE_GRUNT_40 = 3125, - SFX_GENERIC_MALE_GRUNT_41 = 3126, - SFX_GENERIC_MALE_PANIC_1 = 3127, - SFX_GENERIC_MALE_PANIC_2 = 3128, - SFX_GENERIC_MALE_PANIC_3 = 3129, - SFX_GENERIC_MALE_PANIC_4 = 3130, - SFX_GENERIC_MALE_PANIC_5 = 3131, - SFX_GENERIC_MALE_PANIC_6 = 3132, - SFX_GENERIC_MALE_PANIC_7 = 3133, - SFX_GENERIC_MALE_PANIC_8 = 3134, - SFX_GENERIC_MALE_PANIC_9 = 3135, - SFX_GENERIC_MALE_PANIC_10 = 3136, - SFX_GENERIC_MALE_PANIC_11 = 3137, - SFX_GENERIC_MALE_PANIC_12 = 3138, - SFX_GENERIC_MALE_PANIC_13 = 3139, - SFX_GENERIC_MALE_PANIC_14 = 3140, - SFX_GENERIC_MALE_PANIC_15 = 3141, - SFX_GENERIC_MALE_PANIC_16 = 3142, - SFX_GENERIC_MALE_PANIC_17 = 3143, - SFX_GENERIC_MALE_PANIC_18 = 3144, - SFX_GENERIC_MALE_PANIC_19 = 3145, - SFX_GENERIC_MALE_PANIC_20 = 3146, - SFX_GENERIC_MALE_PANIC_21 = 3147, - SFX_GENERIC_MALE_PANIC_22 = 3148, - SFX_GENERIC_MALE_PANIC_23 = 3149, - SFX_GENERIC_MALE_PANIC_24 = 3150, - SFX_GENERIC_MALE_PANIC_25 = 3151, - SFX_GENERIC_MALE_PANIC_26 = 3152, - SFX_GENERIC_MALE_PANIC_27 = 3153, - SFX_GENERIC_MALE_PANIC_28 = 3154, - SFX_GENERIC_MALE_PANIC_29 = 3155, - SFX_GENERIC_MALE_PANIC_30 = 3156, - SFX_GENERIC_MALE_PANIC_31 = 3157, - SFX_GENERIC_MALE_PANIC_32 = 3158, - SFX_GENERIC_MALE_PANIC_33 = 3159, - SFX_GENERIC_MALE_PANIC_34 = 3160, - SFX_GENERIC_MALE_PANIC_35 = 3161, - - TOTAL_AUDIO_SAMPLES = 9941, + SFX_JFOTO_BLOCKED_1, + SFX_JFOTO_BLOCKED_2, + SFX_JFOTO_BLOCKED_3, + SFX_JFOTO_BLOCKED_4, + SFX_JFOTO_BLOCKED_5, + SFX_JFOTO_BLOCKED_6, + SFX_JFOTO_BLOCKED_7, + SFX_JFOTO_BLOCKED_8, + + SFX_JFOTO_BUMP_1, + SFX_JFOTO_BUMP_2, + SFX_JFOTO_BUMP_3, + SFX_JFOTO_BUMP_4, + SFX_JFOTO_BUMP_5, + SFX_JFOTO_BUMP_6, + SFX_JFOTO_BUMP_7, + SFX_JFOTO_BUMP_8, + SFX_JFOTO_BUMP_9, + SFX_JFOTO_BUMP_10, + + SFX_JFOTO_CAR_CRASH_1, + SFX_JFOTO_CAR_CRASH_2, + SFX_JFOTO_CAR_CRASH_3, + SFX_JFOTO_CAR_CRASH_4, + SFX_JFOTO_CAR_CRASH_5, + SFX_JFOTO_CAR_CRASH_6, + SFX_JFOTO_CAR_CRASH_7, + SFX_JFOTO_CAR_CRASH_8, + + SFX_JFOTO_CHAT_1, + SFX_JFOTO_CHAT_2, + SFX_JFOTO_CHAT_3, + SFX_JFOTO_CHAT_4, + SFX_JFOTO_CHAT_5, + SFX_JFOTO_CHAT_6, + SFX_JFOTO_CHAT_7, + SFX_JFOTO_CHAT_8, + SFX_JFOTO_CHAT_9, + SFX_JFOTO_CHAT_10, + SFX_JFOTO_CHAT_11, + SFX_JFOTO_CHAT_12, + SFX_JFOTO_CHAT_13, + + SFX_JFOTO_DODGE_1, + SFX_JFOTO_DODGE_2, + SFX_JFOTO_DODGE_3, + SFX_JFOTO_DODGE_4, + SFX_JFOTO_DODGE_5, + SFX_JFOTO_DODGE_6, + SFX_JFOTO_DODGE_7, + SFX_JFOTO_DODGE_8, + SFX_JFOTO_DODGE_9, + + SFX_JFOTO_GENERIC_CRASH_1, + SFX_JFOTO_GENERIC_CRASH_2, + SFX_JFOTO_GENERIC_CRASH_3, + SFX_JFOTO_GENERIC_CRASH_4, + SFX_JFOTO_GENERIC_CRASH_5, + SFX_JFOTO_GENERIC_CRASH_6, + SFX_JFOTO_GUN_PANIC_1, + SFX_JFOTO_GUN_PANIC_2, + SFX_JFOTO_GUN_PANIC_3, + SFX_JFOTO_GUN_PANIC_4, + SFX_JFOTO_JACKED_1, + SFX_JFOTO_JACKED_2, + SFX_JFOTO_JACKED_3, + SFX_JFOTO_JACKED_4, + SFX_JFOTO_JACKED_5, + SFX_JFOTO_LOST_1, + SFX_JFOTO_MUGGED_1, + SFX_JFOTO_MUGGED_2, + SFX_JFOTO_RUN_1, + SFX_JFOTO_RUN_2, + SFX_JFOTO_RUN_3, + SFX_JFOTO_RUN_4, + SFX_JFOTO_RUN_5, + SFX_JFOTO_SAVED_1, + SFX_JFOTO_SAVED_2, + SFX_JFOTO_SHOCKED_1, + SFX_JFOTO_TAXI_1, + SFX_JFOTO_TAXI_2, + + SFX_JMOTO_BLOCKED_1, + SFX_JMOTO_BLOCKED_2, + SFX_JMOTO_BLOCKED_3, + SFX_JMOTO_BLOCKED_4, + SFX_JMOTO_BLOCKED_5, + SFX_JMOTO_BLOCKED_6, + SFX_JMOTO_BLOCKED_7, + SFX_JMOTO_BLOCKED_8, + SFX_JMOTO_BUMP_1, + SFX_JMOTO_BUMP_2, + SFX_JMOTO_BUMP_3, + SFX_JMOTO_BUMP_4, + SFX_JMOTO_BUMP_5, + SFX_JMOTO_BUMP_6, + SFX_JMOTO_BUMP_7, + SFX_JMOTO_BUMP_8, + SFX_JMOTO_CAR_CRASH_1, + SFX_JMOTO_CAR_CRASH_2, + SFX_JMOTO_CAR_CRASH_3, + SFX_JMOTO_CAR_CRASH_4, + SFX_JMOTO_CAR_CRASH_5, + SFX_JMOTO_CAR_CRASH_6, + SFX_JMOTO_CHAT_1, + SFX_JMOTO_CHAT_2, + SFX_JMOTO_CHAT_3, + SFX_JMOTO_CHAT_4, + SFX_JMOTO_CHAT_5, + SFX_JMOTO_CHAT_6, + SFX_JMOTO_CHAT_7, + SFX_JMOTO_DODGE_1, + SFX_JMOTO_DODGE_2, + SFX_JMOTO_DODGE_3, + SFX_JMOTO_DODGE_4, + SFX_JMOTO_DODGE_5, + SFX_JMOTO_DODGE_6, + SFX_JMOTO_GENERIC_CRASH_1, + SFX_JMOTO_GENERIC_CRASH_2, + SFX_JMOTO_GENERIC_CRASH_3, + SFX_JMOTO_GENERIC_CRASH_4, + SFX_JMOTO_GENERIC_CRASH_5, + SFX_JMOTO_GENERIC_CRASH_6, + SFX_JMOTO_GUN_PANIC_1, + SFX_JMOTO_GUN_PANIC_2, + SFX_JMOTO_GUN_PANIC_3, + SFX_JMOTO_GUN_PANIC_4, + SFX_JMOTO_JACKED_1, + SFX_JMOTO_JACKED_2, + SFX_JMOTO_JACKED_3, + SFX_JMOTO_JACKED_4, + SFX_JMOTO_LOST_1, + SFX_JMOTO_MUGGED_1, + SFX_JMOTO_MUGGED_2, + SFX_JMOTO_RUN_1, + SFX_JMOTO_RUN_2, + SFX_JMOTO_RUN_3, + SFX_JMOTO_RUN_4, + SFX_JMOTO_SAVED_1, + SFX_JMOTO_SHOCKED_1, + SFX_JMOTO_TAXI_1, + + SFX_BMYBE_BLOCKED_1, + SFX_BMYBE_BLOCKED_2, + SFX_BMYBE_BLOCKED_3, + SFX_BMYBE_BLOCKED_4, + SFX_BMYBE_BLOCKED_5, + SFX_BMYBE_BLOCKED_6, + SFX_BMYBE_BLOCKED_7, + SFX_BMYBE_BLOCKED_8, + SFX_BMYBE_BUMP_1, + SFX_BMYBE_BUMP_2, + SFX_BMYBE_BUMP_3, + SFX_BMYBE_BUMP_4, + SFX_BMYBE_BUMP_5, + SFX_BMYBE_BUMP_6, + SFX_BMYBE_BUMP_7, + SFX_BMYBE_BUMP_8, + SFX_BMYBE_BUMP_9, + SFX_BMYBE_BUMP_10, + SFX_BMYBE_CAR_CRASH_1, + SFX_BMYBE_CAR_CRASH_2, + SFX_BMYBE_CAR_CRASH_3, + SFX_BMYBE_CAR_CRASH_4, + SFX_BMYBE_CAR_CRASH_5, + SFX_BMYBE_CAR_CRASH_6, + SFX_BMYBE_CAR_CRASH_7, + SFX_BMYBE_CAR_CRASH_8, + SFX_BMYBE_CHAT_1, + SFX_BMYBE_CHAT_2, + SFX_BMYBE_CHAT_3, + SFX_BMYBE_CHAT_4, + SFX_BMYBE_CHAT_5, + SFX_BMYBE_CHAT_6, + SFX_BMYBE_CHAT_7, + SFX_BMYBE_CHAT_8, + SFX_BMYBE_CHAT_9, + SFX_BMYBE_CHAT_10, + SFX_BMYBE_DODGE_1, + SFX_BMYBE_DODGE_2, + SFX_BMYBE_DODGE_3, + SFX_BMYBE_DODGE_4, + SFX_BMYBE_DODGE_5, + SFX_BMYBE_DODGE_6, + SFX_BMYBE_DODGE_7, + SFX_BMYBE_DODGE_8, + SFX_BMYBE_DODGE_9, + SFX_BMYBE_DODGE_10, + SFX_BMYBE_EYEING_1, + SFX_BMYBE_EYEING_2, + SFX_BMYBE_FIGHT_1, + SFX_BMYBE_FIGHT_2, + SFX_BMYBE_FIGHT_3, + SFX_BMYBE_FIGHT_4, + SFX_BMYBE_FIGHT_5, + SFX_BMYBE_FIGHT_6, + SFX_BMYBE_FIGHT_7, + SFX_BMYBE_FIGHT_8, + SFX_BMYBE_GENERIC_CRASH_1, + SFX_BMYBE_GENERIC_CRASH_2, + SFX_BMYBE_GENERIC_CRASH_3, + SFX_BMYBE_GENERIC_CRASH_4, + SFX_BMYBE_GENERIC_CRASH_5, + SFX_BMYBE_GENERIC_CRASH_6, + SFX_BMYBE_GENERIC_CRASH_7, + SFX_BMYBE_GENERIC_CRASH_8, + SFX_BMYBE_GUN_COOL_1, + SFX_BMYBE_GUN_COOL_2, + SFX_BMYBE_GUN_COOL_3, + SFX_BMYBE_GUN_COOL_4, + SFX_BMYBE_JACKED_1, + SFX_BMYBE_JACKED_2, + SFX_BMYBE_JACKED_3, + SFX_BMYBE_JACKED_4, + SFX_BMYBE_JACKED_5, + SFX_BMYBE_JACKED_6, + SFX_BMYBE_JACKING_1, + SFX_BMYBE_JACKING_2, + SFX_BMYBE_JACKING_3, + SFX_BMYBE_LOST_1, + SFX_BMYBE_MUGGED_1, + SFX_BMYBE_SAVED_1, + SFX_BMYBE_TAXI_1, + + SFX_HFOBE_BLOCKED_1, + SFX_HFOBE_BLOCKED_2, + SFX_HFOBE_BLOCKED_3, + SFX_HFOBE_BLOCKED_4, + SFX_HFOBE_BLOCKED_5, + SFX_HFOBE_BLOCKED_6, + SFX_HFOBE_BUMP_1, + SFX_HFOBE_BUMP_2, + SFX_HFOBE_BUMP_3, + SFX_HFOBE_BUMP_4, + SFX_HFOBE_BUMP_5, + SFX_HFOBE_BUMP_6, + SFX_HFOBE_BUMP_7, + SFX_HFOBE_BUMP_8, + SFX_HFOBE_BUMP_9, + SFX_HFOBE_BUMP_10, + SFX_HFOBE_BUMP_11, + SFX_HFOBE_CAR_CRASH_1, + SFX_HFOBE_CAR_CRASH_2, + SFX_HFOBE_CAR_CRASH_3, + SFX_HFOBE_CAR_CRASH_4, + SFX_HFOBE_CAR_CRASH_5, + SFX_HFOBE_CAR_CRASH_6, + SFX_HFOBE_CHAT_1, + SFX_HFOBE_CHAT_2, + SFX_HFOBE_CHAT_3, + SFX_HFOBE_CHAT_4, + SFX_HFOBE_CHAT_5, + SFX_HFOBE_CHAT_6, + SFX_HFOBE_CHAT_7, + SFX_HFOBE_CHAT_8, + SFX_HFOBE_CHAT_9, + SFX_HFOBE_CHAT_10, + SFX_HFOBE_DODGE_1, + SFX_HFOBE_DODGE_2, + SFX_HFOBE_DODGE_3, + SFX_HFOBE_DODGE_4, + SFX_HFOBE_DODGE_5, + SFX_HFOBE_DODGE_6, + SFX_HFOBE_DODGE_7, + SFX_HFOBE_GENERIC_CRASH_1, + SFX_HFOBE_GENERIC_CRASH_2, + SFX_HFOBE_GENERIC_CRASH_3, + SFX_HFOBE_GENERIC_CRASH_4, + SFX_HFOBE_GENERIC_CRASH_5, + SFX_HFOBE_GUN_PANIC_1, + SFX_HFOBE_GUN_PANIC_2, + SFX_HFOBE_GUN_PANIC_3, + SFX_HFOBE_GUN_PANIC_4, + SFX_HFOBE_GUN_PANIC_5, + SFX_HFOBE_JACKED_1, + SFX_HFOBE_JACKED_2, + SFX_HFOBE_JACKED_3, + SFX_HFOBE_JACKED_4, + SFX_HFOBE_JACKED_5, + SFX_HFOBE_JACKED_6, + SFX_HFOBE_LOST_1, + SFX_HFOBE_LOST_2, + SFX_HFOBE_RUN_1, + SFX_HFOBE_RUN_2, + SFX_HFOBE_RUN_3, + SFX_HFOBE_RUN_4, + SFX_HFOBE_SAVED_1, + SFX_HFOBE_SHOCKED_1, + SFX_HFOBE_SHOCKED_2, + SFX_HFOBE_TAXI_1, + SFX_HFOBE_TAXI_2, + + SFX_STREET_GANG_1_BLOCKED_1, + SFX_STREET_GANG_1_BLOCKED_2, + SFX_STREET_GANG_1_BLOCKED_3, + SFX_STREET_GANG_1_BLOCKED_4, + SFX_STREET_GANG_1_BLOCKED_5, + SFX_STREET_GANG_1_BLOCKED_6, + SFX_STREET_GANG_1_BLOCKED_7, + SFX_STREET_GANG_1_BLOCKED_8, + SFX_STREET_GANG_1_BUMP_1, + SFX_STREET_GANG_1_BUMP_2, + SFX_STREET_GANG_1_BUMP_3, + SFX_STREET_GANG_1_BUMP_4, + SFX_STREET_GANG_1_BUMP_5, + SFX_STREET_GANG_1_BUMP_6, + SFX_STREET_GANG_1_BUMP_7, + SFX_STREET_GANG_1_BUMP_8, + SFX_STREET_GANG_1_BUMP_9, + SFX_STREET_GANG_1_BUMP_10, + SFX_STREET_GANG_1_CAR_CRASH_1, + SFX_STREET_GANG_1_CAR_CRASH_2, + SFX_STREET_GANG_1_CAR_CRASH_3, + SFX_STREET_GANG_1_CAR_CRASH_4, + SFX_STREET_GANG_1_CAR_CRASH_5, + SFX_STREET_GANG_1_CAR_CRASH_6, + SFX_STREET_GANG_1_CHAT_1, + SFX_STREET_GANG_1_CHAT_2, + SFX_STREET_GANG_1_CHAT_3, + SFX_STREET_GANG_1_CHAT_4, + SFX_STREET_GANG_1_CHAT_5, + SFX_STREET_GANG_1_CHAT_6, + SFX_STREET_GANG_1_CHAT_7, + SFX_STREET_GANG_1_CHAT_8, + SFX_STREET_GANG_1_CHAT_9, + SFX_STREET_GANG_1_CHAT_10, + SFX_STREET_GANG_1_CHAT_11, + SFX_STREET_GANG_1_CHAT_12, + SFX_STREET_GANG_1_DODGE_1, + SFX_STREET_GANG_1_DODGE_2, + SFX_STREET_GANG_1_DODGE_3, + SFX_STREET_GANG_1_DODGE_4, + SFX_STREET_GANG_1_DODGE_5, + SFX_STREET_GANG_1_DODGE_6, + SFX_STREET_GANG_1_DODGE_7, + SFX_STREET_GANG_1_DODGE_8, + SFX_STREET_GANG_1_DODGE_9, + SFX_STREET_GANG_1_EYEING_1, + SFX_STREET_GANG_1_EYEING_2, + SFX_STREET_GANG_1_EYEING_3, + SFX_STREET_GANG_1_FIGHT_1, + SFX_STREET_GANG_1_FIGHT_2, + SFX_STREET_GANG_1_FIGHT_3, + SFX_STREET_GANG_1_FIGHT_4, + SFX_STREET_GANG_1_FIGHT_5, + SFX_STREET_GANG_1_FIGHT_6, + SFX_STREET_GANG_1_FIGHT_7, + SFX_STREET_GANG_1_FIGHT_8, + SFX_STREET_GANG_1_FIGHT_9, + SFX_STREET_GANG_1_FIGHT_10, + SFX_STREET_GANG_1_GENERIC_CRASH_1, + SFX_STREET_GANG_1_GENERIC_CRASH_2, + SFX_STREET_GANG_1_GENERIC_CRASH_3, + SFX_STREET_GANG_1_GENERIC_CRASH_4, + SFX_STREET_GANG_1_GENERIC_CRASH_5, + SFX_STREET_GANG_1_GENERIC_CRASH_6, + SFX_STREET_GANG_1_GUN_COOL_1, + SFX_STREET_GANG_1_GUN_COOL_2, + SFX_STREET_GANG_1_GUN_COOL_3, + SFX_STREET_GANG_1_GUN_COOL_4, + SFX_STREET_GANG_1_GUN_COOL_5, + SFX_STREET_GANG_1_JACKED_1, + SFX_STREET_GANG_1_JACKED_2, + SFX_STREET_GANG_1_JACKED_3, + SFX_STREET_GANG_1_JACKED_4, + SFX_STREET_GANG_1_JACKED_5, + SFX_STREET_GANG_1_JACKING_1, + SFX_STREET_GANG_1_JACKING_2, + SFX_STREET_GANG_1_JACKING_3, + SFX_STREET_GANG_1_JACKING_4, + SFX_STREET_GANG_1_JACKING_5, + SFX_STREET_GANG_1_LOST_1, + SFX_STREET_GANG_1_LOST_2, + SFX_STREET_GANG_1_MUGGED_1, + SFX_STREET_GANG_1_MUGGED_2, + SFX_STREET_GANG_1_MUGGED_3, + SFX_STREET_GANG_1_MUGGING_1, + SFX_STREET_GANG_1_MUGGING_2, + SFX_STREET_GANG_1_MUGGING_3, + SFX_STREET_GANG_1_MUGGING_4, + SFX_STREET_GANG_1_MUGGING_5, + SFX_STREET_GANG_1_SAVED_1, + SFX_STREET_GANG_1_SHOCKED_1, + SFX_STREET_GANG_1_SHOCKED_2, + SFX_STREET_GANG_1_TAXI_1, + + SFX_STREET_GANG_2_BLOCKED_1, + SFX_STREET_GANG_2_BLOCKED_2, + SFX_STREET_GANG_2_BLOCKED_3, + SFX_STREET_GANG_2_BLOCKED_4, + SFX_STREET_GANG_2_BLOCKED_5, + SFX_STREET_GANG_2_BLOCKED_6, + SFX_STREET_GANG_2_BLOCKED_7, + SFX_STREET_GANG_2_BLOCKED_8, + SFX_STREET_GANG_2_BUMP_1, + SFX_STREET_GANG_2_BUMP_2, + SFX_STREET_GANG_2_BUMP_3, + SFX_STREET_GANG_2_BUMP_4, + SFX_STREET_GANG_2_BUMP_5, + SFX_STREET_GANG_2_BUMP_6, + SFX_STREET_GANG_2_BUMP_7, + SFX_STREET_GANG_2_BUMP_8, + SFX_STREET_GANG_2_BUMP_9, + SFX_STREET_GANG_2_BUMP_10, + SFX_STREET_GANG_2_CAR_CRASH_1, + SFX_STREET_GANG_2_CAR_CRASH_2, + SFX_STREET_GANG_2_CAR_CRASH_3, + SFX_STREET_GANG_2_CAR_CRASH_4, + SFX_STREET_GANG_2_CAR_CRASH_5, + SFX_STREET_GANG_2_CAR_CRASH_6, + SFX_STREET_GANG_2_CHAT_1, + SFX_STREET_GANG_2_CHAT_2, + SFX_STREET_GANG_2_CHAT_3, + SFX_STREET_GANG_2_CHAT_4, + SFX_STREET_GANG_2_CHAT_5, + SFX_STREET_GANG_2_CHAT_6, + SFX_STREET_GANG_2_CHAT_7, + SFX_STREET_GANG_2_CHAT_8, + SFX_STREET_GANG_2_CHAT_9, + SFX_STREET_GANG_2_CHAT_10, + SFX_STREET_GANG_2_CHAT_11, + SFX_STREET_GANG_2_CHAT_12, + SFX_STREET_GANG_2_DODGE_1, + SFX_STREET_GANG_2_DODGE_2, + SFX_STREET_GANG_2_DODGE_3, + SFX_STREET_GANG_2_DODGE_4, + SFX_STREET_GANG_2_DODGE_5, + SFX_STREET_GANG_2_DODGE_6, + SFX_STREET_GANG_2_DODGE_7, + SFX_STREET_GANG_2_DODGE_8, + SFX_STREET_GANG_2_DODGE_9, + SFX_STREET_GANG_2_EYEING_1, + SFX_STREET_GANG_2_EYEING_2, + SFX_STREET_GANG_2_EYEING_3, + SFX_STREET_GANG_2_FIGHT_1, + SFX_STREET_GANG_2_FIGHT_2, + SFX_STREET_GANG_2_FIGHT_3, + SFX_STREET_GANG_2_FIGHT_4, + SFX_STREET_GANG_2_FIGHT_5, + SFX_STREET_GANG_2_FIGHT_6, + SFX_STREET_GANG_2_FIGHT_7, + SFX_STREET_GANG_2_FIGHT_8, + SFX_STREET_GANG_2_FIGHT_9, + SFX_STREET_GANG_2_FIGHT_10, + SFX_STREET_GANG_2_GENERIC_CRASH_1, + SFX_STREET_GANG_2_GENERIC_CRASH_2, + SFX_STREET_GANG_2_GENERIC_CRASH_3, + SFX_STREET_GANG_2_GENERIC_CRASH_4, + SFX_STREET_GANG_2_GENERIC_CRASH_5, + SFX_STREET_GANG_2_GENERIC_CRASH_6, + SFX_STREET_GANG_2_GUN_COOL_1, + SFX_STREET_GANG_2_GUN_COOL_2, + SFX_STREET_GANG_2_GUN_COOL_3, + SFX_STREET_GANG_2_GUN_COOL_4, + SFX_STREET_GANG_2_GUN_COOL_5, + SFX_STREET_GANG_2_JACKED_1, + SFX_STREET_GANG_2_JACKED_2, + SFX_STREET_GANG_2_JACKED_3, + SFX_STREET_GANG_2_JACKED_4, + SFX_STREET_GANG_2_JACKED_5, + SFX_STREET_GANG_2_JACKING_1, + SFX_STREET_GANG_2_JACKING_2, + SFX_STREET_GANG_2_JACKING_3, + SFX_STREET_GANG_2_JACKING_4, + SFX_STREET_GANG_2_JACKING_5, + SFX_STREET_GANG_2_LOST_1, + SFX_STREET_GANG_2_LOST_2, + SFX_STREET_GANG_2_MUGGED_1, + SFX_STREET_GANG_2_MUGGED_2, + SFX_STREET_GANG_2_MUGGED_3, + SFX_STREET_GANG_2_MUGGING_1, + SFX_STREET_GANG_2_MUGGING_2, + SFX_STREET_GANG_2_MUGGING_3, + SFX_STREET_GANG_2_MUGGING_4, + SFX_STREET_GANG_2_MUGGING_5, + SFX_STREET_GANG_2_SAVED_1, + SFX_STREET_GANG_2_SHOCKED_1, + SFX_STREET_GANG_2_SHOCKED_2, + SFX_STREET_GANG_2_TAXI_1, + + SFX_CUBAN_LORD_GANG_1_BLOCKED_1, + SFX_CUBAN_LORD_GANG_1_BLOCKED_2, + SFX_CUBAN_LORD_GANG_1_BLOCKED_3, + SFX_CUBAN_LORD_GANG_1_BLOCKED_4, + SFX_CUBAN_LORD_GANG_1_BLOCKED_5, + SFX_CUBAN_LORD_GANG_1_BLOCKED_6, + SFX_CUBAN_LORD_GANG_1_BLOCKED_7, + SFX_CUBAN_LORD_GANG_1_BLOCKED_8, + SFX_CUBAN_LORD_GANG_1_BLOCKED_9, + SFX_CUBAN_LORD_GANG_1_BLOCKED_10, + SFX_CUBAN_LORD_GANG_1_BUMP_1, + SFX_CUBAN_LORD_GANG_1_BUMP_2, + SFX_CUBAN_LORD_GANG_1_BUMP_3, + SFX_CUBAN_LORD_GANG_1_BUMP_4, + SFX_CUBAN_LORD_GANG_1_BUMP_5, + SFX_CUBAN_LORD_GANG_1_BUMP_6, + SFX_CUBAN_LORD_GANG_1_BUMP_7, + SFX_CUBAN_LORD_GANG_1_BUMP_8, + SFX_CUBAN_LORD_GANG_1_BUMP_9, + SFX_CUBAN_LORD_GANG_1_BUMP_10, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_1, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_2, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_3, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_4, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_5, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_6, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_7, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_8, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_9, + SFX_CUBAN_LORD_GANG_1_CAR_CRASH_10, + SFX_CUBAN_LORD_GANG_1_CHAT_1, + SFX_CUBAN_LORD_GANG_1_CHAT_2, + SFX_CUBAN_LORD_GANG_1_CHAT_3, + SFX_CUBAN_LORD_GANG_1_CHAT_4, + SFX_CUBAN_LORD_GANG_1_CHAT_5, + SFX_CUBAN_LORD_GANG_1_CHAT_6, + SFX_CUBAN_LORD_GANG_1_CHAT_7, + SFX_CUBAN_LORD_GANG_1_CHAT_8, + SFX_CUBAN_LORD_GANG_1_CHAT_9, + SFX_CUBAN_LORD_GANG_1_CHAT_10, + SFX_CUBAN_LORD_GANG_1_DODGE_1, + SFX_CUBAN_LORD_GANG_1_DODGE_2, + SFX_CUBAN_LORD_GANG_1_DODGE_3, + SFX_CUBAN_LORD_GANG_1_DODGE_4, + SFX_CUBAN_LORD_GANG_1_DODGE_5, + SFX_CUBAN_LORD_GANG_1_DODGE_6, + SFX_CUBAN_LORD_GANG_1_DODGE_7, + SFX_CUBAN_LORD_GANG_1_DODGE_8, + SFX_CUBAN_LORD_GANG_1_DODGE_9, + SFX_CUBAN_LORD_GANG_1_DODGE_10, + SFX_CUBAN_LORD_GANG_1_DODGE_11, + SFX_CUBAN_LORD_GANG_1_DODGE_12, + SFX_CUBAN_LORD_GANG_1_DODGE_13, + SFX_CUBAN_LORD_GANG_1_EYEING_1, + SFX_CUBAN_LORD_GANG_1_EYEING_2, + SFX_CUBAN_LORD_GANG_1_FIGHT_1, + SFX_CUBAN_LORD_GANG_1_FIGHT_2, + SFX_CUBAN_LORD_GANG_1_FIGHT_3, + SFX_CUBAN_LORD_GANG_1_FIGHT_4, + SFX_CUBAN_LORD_GANG_1_FIGHT_5, + SFX_CUBAN_LORD_GANG_1_FIGHT_6, + SFX_CUBAN_LORD_GANG_1_FIGHT_7, + SFX_CUBAN_LORD_GANG_1_FIGHT_8, + SFX_CUBAN_LORD_GANG_1_FIGHT_9, + SFX_CUBAN_LORD_GANG_1_FIGHT_10, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_1, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_2, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_3, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_4, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_5, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_6, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_7, + SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_8, + SFX_CUBAN_LORD_GANG_1_GUN_COOL_1, + SFX_CUBAN_LORD_GANG_1_GUN_COOL_2, + SFX_CUBAN_LORD_GANG_1_GUN_COOL_3, + SFX_CUBAN_LORD_GANG_1_GUN_COOL_4, + SFX_CUBAN_LORD_GANG_1_GUN_COOL_5, + SFX_CUBAN_LORD_GANG_1_JACKED_1, + SFX_CUBAN_LORD_GANG_1_JACKED_2, + SFX_CUBAN_LORD_GANG_1_JACKED_3, + SFX_CUBAN_LORD_GANG_1_JACKED_4, + SFX_CUBAN_LORD_GANG_1_JACKED_5, + SFX_CUBAN_LORD_GANG_1_JACKED_6, + SFX_CUBAN_LORD_GANG_1_JACKING_1, + SFX_CUBAN_LORD_GANG_1_JACKING_2, + SFX_CUBAN_LORD_GANG_1_JACKING_3, + SFX_CUBAN_LORD_GANG_1_JACKING_4, + SFX_CUBAN_LORD_GANG_1_JACKING_5, + SFX_CUBAN_LORD_GANG_1_LOST_1, + SFX_CUBAN_LORD_GANG_1_LOST_2, + SFX_CUBAN_LORD_GANG_1_MUGGED_1, + SFX_CUBAN_LORD_GANG_1_MUGGED_2, + SFX_CUBAN_LORD_GANG_1_SAVED_1, + SFX_CUBAN_LORD_GANG_1_TAXI_1, + SFX_CUBAN_LORD_GANG_1_TAXI_2, + SFX_CUBAN_LORD_GANG_2_BLOCKED_1, + SFX_CUBAN_LORD_GANG_2_BLOCKED_2, + SFX_CUBAN_LORD_GANG_2_BLOCKED_3, + SFX_CUBAN_LORD_GANG_2_BLOCKED_4, + SFX_CUBAN_LORD_GANG_2_BLOCKED_5, + SFX_CUBAN_LORD_GANG_2_BLOCKED_6, + SFX_CUBAN_LORD_GANG_2_BLOCKED_7, + SFX_CUBAN_LORD_GANG_2_BLOCKED_8, + SFX_CUBAN_LORD_GANG_2_BLOCKED_9, + SFX_CUBAN_LORD_GANG_2_BLOCKED_10, + SFX_CUBAN_LORD_GANG_2_BUMP_1, + SFX_CUBAN_LORD_GANG_2_BUMP_2, + SFX_CUBAN_LORD_GANG_2_BUMP_3, + SFX_CUBAN_LORD_GANG_2_BUMP_4, + SFX_CUBAN_LORD_GANG_2_BUMP_5, + SFX_CUBAN_LORD_GANG_2_BUMP_6, + SFX_CUBAN_LORD_GANG_2_BUMP_7, + SFX_CUBAN_LORD_GANG_2_BUMP_8, + SFX_CUBAN_LORD_GANG_2_BUMP_9, + SFX_CUBAN_LORD_GANG_2_BUMP_10, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_1, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_2, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_3, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_4, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_5, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_6, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_7, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_8, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_9, + SFX_CUBAN_LORD_GANG_2_CAR_CRASH_10, + SFX_CUBAN_LORD_GANG_2_CHAT_1, + SFX_CUBAN_LORD_GANG_2_CHAT_2, + SFX_CUBAN_LORD_GANG_2_CHAT_3, + SFX_CUBAN_LORD_GANG_2_CHAT_4, + SFX_CUBAN_LORD_GANG_2_CHAT_5, + SFX_CUBAN_LORD_GANG_2_CHAT_6, + SFX_CUBAN_LORD_GANG_2_CHAT_7, + SFX_CUBAN_LORD_GANG_2_CHAT_8, + SFX_CUBAN_LORD_GANG_2_CHAT_9, + SFX_CUBAN_LORD_GANG_2_CHAT_10, + SFX_CUBAN_LORD_GANG_2_DODGE_1, + SFX_CUBAN_LORD_GANG_2_DODGE_2, + SFX_CUBAN_LORD_GANG_2_DODGE_3, + SFX_CUBAN_LORD_GANG_2_DODGE_4, + SFX_CUBAN_LORD_GANG_2_DODGE_5, + SFX_CUBAN_LORD_GANG_2_DODGE_6, + SFX_CUBAN_LORD_GANG_2_DODGE_7, + SFX_CUBAN_LORD_GANG_2_DODGE_8, + SFX_CUBAN_LORD_GANG_2_DODGE_9, + SFX_CUBAN_LORD_GANG_2_DODGE_10, + SFX_CUBAN_LORD_GANG_2_DODGE_11, + SFX_CUBAN_LORD_GANG_2_DODGE_12, + SFX_CUBAN_LORD_GANG_2_DODGE_13, + SFX_CUBAN_LORD_GANG_2_EYEING_1, + SFX_CUBAN_LORD_GANG_2_EYEING_2, + SFX_CUBAN_LORD_GANG_2_FIGHT_1, + SFX_CUBAN_LORD_GANG_2_FIGHT_2, + SFX_CUBAN_LORD_GANG_2_FIGHT_3, + SFX_CUBAN_LORD_GANG_2_FIGHT_4, + SFX_CUBAN_LORD_GANG_2_FIGHT_5, + SFX_CUBAN_LORD_GANG_2_FIGHT_6, + SFX_CUBAN_LORD_GANG_2_FIGHT_7, + SFX_CUBAN_LORD_GANG_2_FIGHT_8, + SFX_CUBAN_LORD_GANG_2_FIGHT_9, + SFX_CUBAN_LORD_GANG_2_FIGHT_10, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_1, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_2, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_3, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_4, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_5, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_6, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_7, + SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_8, + SFX_CUBAN_LORD_GANG_2_GUN_COOL_1, + SFX_CUBAN_LORD_GANG_2_GUN_COOL_2, + SFX_CUBAN_LORD_GANG_2_GUN_COOL_3, + SFX_CUBAN_LORD_GANG_2_GUN_COOL_4, + SFX_CUBAN_LORD_GANG_2_GUN_COOL_5, + SFX_CUBAN_LORD_GANG_2_JACKED_1, + SFX_CUBAN_LORD_GANG_2_JACKED_2, + SFX_CUBAN_LORD_GANG_2_JACKED_3, + SFX_CUBAN_LORD_GANG_2_JACKED_4, + SFX_CUBAN_LORD_GANG_2_JACKED_5, + SFX_CUBAN_LORD_GANG_2_JACKED_6, + SFX_CUBAN_LORD_GANG_2_JACKING_1, + SFX_CUBAN_LORD_GANG_2_JACKING_2, + SFX_CUBAN_LORD_GANG_2_JACKING_3, + SFX_CUBAN_LORD_GANG_2_JACKING_4, + SFX_CUBAN_LORD_GANG_2_JACKING_5, + SFX_CUBAN_LORD_GANG_2_LOST_1, + SFX_CUBAN_LORD_GANG_2_LOST_2, + SFX_CUBAN_LORD_GANG_2_MUGGED_1, + SFX_CUBAN_LORD_GANG_2_MUGGED_2, + SFX_CUBAN_LORD_GANG_2_SAVED_1, + SFX_CUBAN_LORD_GANG_2_TAXI_1, + SFX_CUBAN_LORD_GANG_2_TAXI_2, + SFX_CUBAN_LORD_GANG_3_BLOCKED_1, + SFX_CUBAN_LORD_GANG_3_BLOCKED_2, + SFX_CUBAN_LORD_GANG_3_BLOCKED_3, + SFX_CUBAN_LORD_GANG_3_BLOCKED_4, + SFX_CUBAN_LORD_GANG_3_BLOCKED_5, + SFX_CUBAN_LORD_GANG_3_BLOCKED_6, + SFX_CUBAN_LORD_GANG_3_BLOCKED_7, + SFX_CUBAN_LORD_GANG_3_BLOCKED_8, + SFX_CUBAN_LORD_GANG_3_BLOCKED_9, + SFX_CUBAN_LORD_GANG_3_BLOCKED_10, + SFX_CUBAN_LORD_GANG_3_BUMP_1, + SFX_CUBAN_LORD_GANG_3_BUMP_2, + SFX_CUBAN_LORD_GANG_3_BUMP_3, + SFX_CUBAN_LORD_GANG_3_BUMP_4, + SFX_CUBAN_LORD_GANG_3_BUMP_5, + SFX_CUBAN_LORD_GANG_3_BUMP_6, + SFX_CUBAN_LORD_GANG_3_BUMP_7, + SFX_CUBAN_LORD_GANG_3_BUMP_8, + SFX_CUBAN_LORD_GANG_3_BUMP_9, + SFX_CUBAN_LORD_GANG_3_BUMP_10, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_1, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_2, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_3, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_4, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_5, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_6, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_7, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_8, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_9, + SFX_CUBAN_LORD_GANG_3_CAR_CRASH_10, + SFX_CUBAN_LORD_GANG_3_CHAT_1, + SFX_CUBAN_LORD_GANG_3_CHAT_2, + SFX_CUBAN_LORD_GANG_3_CHAT_3, + SFX_CUBAN_LORD_GANG_3_CHAT_4, + SFX_CUBAN_LORD_GANG_3_CHAT_5, + SFX_CUBAN_LORD_GANG_3_CHAT_6, + SFX_CUBAN_LORD_GANG_3_CHAT_7, + SFX_CUBAN_LORD_GANG_3_CHAT_8, + SFX_CUBAN_LORD_GANG_3_CHAT_9, + SFX_CUBAN_LORD_GANG_3_CHAT_10, + SFX_CUBAN_LORD_GANG_3_DODGE_1, + SFX_CUBAN_LORD_GANG_3_DODGE_2, + SFX_CUBAN_LORD_GANG_3_DODGE_3, + SFX_CUBAN_LORD_GANG_3_DODGE_4, + SFX_CUBAN_LORD_GANG_3_DODGE_5, + SFX_CUBAN_LORD_GANG_3_DODGE_6, + SFX_CUBAN_LORD_GANG_3_DODGE_7, + SFX_CUBAN_LORD_GANG_3_DODGE_8, + SFX_CUBAN_LORD_GANG_3_DODGE_9, + SFX_CUBAN_LORD_GANG_3_DODGE_10, + SFX_CUBAN_LORD_GANG_3_DODGE_11, + SFX_CUBAN_LORD_GANG_3_DODGE_12, + SFX_CUBAN_LORD_GANG_3_DODGE_13, + SFX_CUBAN_LORD_GANG_3_EYEING_1, + SFX_CUBAN_LORD_GANG_3_EYEING_2, + SFX_CUBAN_LORD_GANG_3_FIGHT_1, + SFX_CUBAN_LORD_GANG_3_FIGHT_2, + SFX_CUBAN_LORD_GANG_3_FIGHT_3, + SFX_CUBAN_LORD_GANG_3_FIGHT_4, + SFX_CUBAN_LORD_GANG_3_FIGHT_5, + SFX_CUBAN_LORD_GANG_3_FIGHT_6, + SFX_CUBAN_LORD_GANG_3_FIGHT_7, + SFX_CUBAN_LORD_GANG_3_FIGHT_8, + SFX_CUBAN_LORD_GANG_3_FIGHT_9, + SFX_CUBAN_LORD_GANG_3_FIGHT_10, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_1, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_2, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_3, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_4, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_5, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_6, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_7, + SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_8, + SFX_CUBAN_LORD_GANG_3_GUN_COOL_1, + SFX_CUBAN_LORD_GANG_3_GUN_COOL_2, + SFX_CUBAN_LORD_GANG_3_GUN_COOL_3, + SFX_CUBAN_LORD_GANG_3_GUN_COOL_4, + SFX_CUBAN_LORD_GANG_3_GUN_COOL_5, + SFX_CUBAN_LORD_GANG_3_JACKED_1, + SFX_CUBAN_LORD_GANG_3_JACKED_2, + SFX_CUBAN_LORD_GANG_3_JACKED_3, + SFX_CUBAN_LORD_GANG_3_JACKED_4, + SFX_CUBAN_LORD_GANG_3_JACKED_5, + SFX_CUBAN_LORD_GANG_3_JACKED_6, + SFX_CUBAN_LORD_GANG_3_JACKING_1, + SFX_CUBAN_LORD_GANG_3_JACKING_2, + SFX_CUBAN_LORD_GANG_3_JACKING_3, + SFX_CUBAN_LORD_GANG_3_JACKING_4, + SFX_CUBAN_LORD_GANG_3_JACKING_5, + SFX_CUBAN_LORD_GANG_3_LOST_1, + SFX_CUBAN_LORD_GANG_3_LOST_2, + SFX_CUBAN_LORD_GANG_3_MUGGED_1, + SFX_CUBAN_LORD_GANG_3_MUGGED_2, + SFX_CUBAN_LORD_GANG_3_SAVED_1, + SFX_CUBAN_LORD_GANG_3_TAXI_1, + SFX_CUBAN_LORD_GANG_3_TAXI_2, + + SFX_PLAYER_GANG_1_BLOCKED_1, + SFX_PLAYER_GANG_1_BLOCKED_2, + SFX_PLAYER_GANG_1_BLOCKED_3, + SFX_PLAYER_GANG_1_BLOCKED_4, + SFX_PLAYER_GANG_1_BLOCKED_5, + SFX_PLAYER_GANG_1_BLOCKED_6, + SFX_PLAYER_GANG_1_BLOCKED_7, + SFX_PLAYER_GANG_1_BLOCKED_8, + SFX_PLAYER_GANG_1_BLOCKED_9, + SFX_PLAYER_GANG_1_BLOCKED_10, + SFX_PLAYER_GANG_1_BUMP_1, + SFX_PLAYER_GANG_1_BUMP_2, + SFX_PLAYER_GANG_1_BUMP_3, + SFX_PLAYER_GANG_1_BUMP_4, + SFX_PLAYER_GANG_1_BUMP_5, + SFX_PLAYER_GANG_1_CAR_CRASH_1, + SFX_PLAYER_GANG_1_CAR_CRASH_2, + SFX_PLAYER_GANG_1_CAR_CRASH_3, + SFX_PLAYER_GANG_1_CAR_CRASH_4, + SFX_PLAYER_GANG_1_CAR_CRASH_5, + SFX_PLAYER_GANG_1_CHAT_1, + SFX_PLAYER_GANG_1_CHAT_2, + SFX_PLAYER_GANG_1_CHAT_3, + SFX_PLAYER_GANG_1_CHAT_4, + SFX_PLAYER_GANG_1_CHAT_5, + SFX_PLAYER_GANG_1_CHAT_6, + SFX_PLAYER_GANG_1_CHAT_7, + SFX_PLAYER_GANG_1_CHAT_8, + SFX_PLAYER_GANG_1_DODGE_1, + SFX_PLAYER_GANG_1_DODGE_2, + SFX_PLAYER_GANG_1_DODGE_3, + SFX_PLAYER_GANG_1_DODGE_4, + SFX_PLAYER_GANG_1_DODGE_5, + SFX_PLAYER_GANG_1_DODGE_6, + SFX_PLAYER_GANG_1_DODGE_7, + SFX_PLAYER_GANG_1_EYEING_1, + SFX_PLAYER_GANG_1_EYEING_2, + SFX_PLAYER_GANG_1_FIGHT_1, + SFX_PLAYER_GANG_1_FIGHT_2, + SFX_PLAYER_GANG_1_FIGHT_3, + SFX_PLAYER_GANG_1_FIGHT_4, + SFX_PLAYER_GANG_1_FIGHT_5, + SFX_PLAYER_GANG_1_GENERIC_CRASH_1, + SFX_PLAYER_GANG_1_GENERIC_CRASH_2, + SFX_PLAYER_GANG_1_GENERIC_CRASH_3, + SFX_PLAYER_GANG_1_GENERIC_CRASH_4, + SFX_PLAYER_GANG_1_GENERIC_CRASH_5, + SFX_PLAYER_GANG_1_GUN_COOL_1, + SFX_PLAYER_GANG_1_GUN_COOL_2, + SFX_PLAYER_GANG_1_GUN_COOL_3, + SFX_PLAYER_GANG_1_GUN_COOL_4, + SFX_PLAYER_GANG_1_JACKED_1, + SFX_PLAYER_GANG_1_JACKED_2, + SFX_PLAYER_GANG_1_JACKED_3, + SFX_PLAYER_GANG_1_JACKED_4, + SFX_PLAYER_GANG_1_JACKED_5, + SFX_PLAYER_GANG_1_JACKING_1, + SFX_PLAYER_GANG_1_JACKING_2, + SFX_PLAYER_GANG_1_JACKING_3, + SFX_PLAYER_GANG_1_JACKING_4, + SFX_PLAYER_GANG_1_JACKING_5, + SFX_PLAYER_GANG_1_LOST_1, + SFX_PLAYER_GANG_1_LOST_2, + SFX_PLAYER_GANG_1_MUGGED_1, + SFX_PLAYER_GANG_1_MUGGED_2, + SFX_PLAYER_GANG_1_SAVED_1, + SFX_PLAYER_GANG_1_SHOCKED_1, + SFX_PLAYER_GANG_1_SHOCKED_2, + SFX_PLAYER_GANG_1_TAXI_1, + SFX_PLAYER_GANG_1_TAXI_2, + SFX_PLAYER_GANG_2_BLOCKED_1, + SFX_PLAYER_GANG_2_BLOCKED_2, + SFX_PLAYER_GANG_2_BLOCKED_3, + SFX_PLAYER_GANG_2_BLOCKED_4, + SFX_PLAYER_GANG_2_BLOCKED_5, + SFX_PLAYER_GANG_2_BLOCKED_6, + SFX_PLAYER_GANG_2_BLOCKED_7, + SFX_PLAYER_GANG_2_BLOCKED_8, + SFX_PLAYER_GANG_2_BLOCKED_9, + SFX_PLAYER_GANG_2_BLOCKED_10, + SFX_PLAYER_GANG_2_BUMP_1, + SFX_PLAYER_GANG_2_BUMP_2, + SFX_PLAYER_GANG_2_BUMP_3, + SFX_PLAYER_GANG_2_BUMP_4, + SFX_PLAYER_GANG_2_BUMP_5, + SFX_PLAYER_GANG_2_CAR_CRASH_1, + SFX_PLAYER_GANG_2_CAR_CRASH_2, + SFX_PLAYER_GANG_2_CAR_CRASH_3, + SFX_PLAYER_GANG_2_CAR_CRASH_4, + SFX_PLAYER_GANG_2_CAR_CRASH_5, + SFX_PLAYER_GANG_2_CHAT_1, + SFX_PLAYER_GANG_2_CHAT_2, + SFX_PLAYER_GANG_2_CHAT_3, + SFX_PLAYER_GANG_2_CHAT_4, + SFX_PLAYER_GANG_2_CHAT_5, + SFX_PLAYER_GANG_2_CHAT_6, + SFX_PLAYER_GANG_2_CHAT_7, + SFX_PLAYER_GANG_2_CHAT_8, + SFX_PLAYER_GANG_2_DODGE_1, + SFX_PLAYER_GANG_2_DODGE_2, + SFX_PLAYER_GANG_2_DODGE_3, + SFX_PLAYER_GANG_2_DODGE_4, + SFX_PLAYER_GANG_2_DODGE_5, + SFX_PLAYER_GANG_2_DODGE_6, + SFX_PLAYER_GANG_2_DODGE_7, + SFX_PLAYER_GANG_2_EYEING_1, + SFX_PLAYER_GANG_2_EYEING_2, + SFX_PLAYER_GANG_2_FIGHT_1, + SFX_PLAYER_GANG_2_FIGHT_2, + SFX_PLAYER_GANG_2_FIGHT_3, + SFX_PLAYER_GANG_2_FIGHT_4, + SFX_PLAYER_GANG_2_FIGHT_5, + SFX_PLAYER_GANG_2_GENERIC_CRASH_1, + SFX_PLAYER_GANG_2_GENERIC_CRASH_2, + SFX_PLAYER_GANG_2_GENERIC_CRASH_3, + SFX_PLAYER_GANG_2_GENERIC_CRASH_4, + SFX_PLAYER_GANG_2_GENERIC_CRASH_5, + SFX_PLAYER_GANG_2_GUN_COOL_1, + SFX_PLAYER_GANG_2_GUN_COOL_2, + SFX_PLAYER_GANG_2_GUN_COOL_3, + SFX_PLAYER_GANG_2_GUN_COOL_4, + SFX_PLAYER_GANG_2_JACKED_1, + SFX_PLAYER_GANG_2_JACKED_2, + SFX_PLAYER_GANG_2_JACKED_3, + SFX_PLAYER_GANG_2_JACKED_4, + SFX_PLAYER_GANG_2_JACKED_5, + SFX_PLAYER_GANG_2_JACKING_1, + SFX_PLAYER_GANG_2_JACKING_2, + SFX_PLAYER_GANG_2_JACKING_3, + SFX_PLAYER_GANG_2_JACKING_4, + SFX_PLAYER_GANG_2_JACKING_5, + SFX_PLAYER_GANG_2_LOST_1, + SFX_PLAYER_GANG_2_LOST_2, + SFX_PLAYER_GANG_2_MUGGED_1, + SFX_PLAYER_GANG_2_MUGGED_2, + SFX_PLAYER_GANG_2_SAVED_1, + SFX_PLAYER_GANG_2_SHOCKED_1, + SFX_PLAYER_GANG_2_SHOCKED_2, + SFX_PLAYER_GANG_2_TAXI_1, + SFX_PLAYER_GANG_2_TAXI_2, + SFX_PLAYER_GANG_3_BLOCKED_1, + SFX_PLAYER_GANG_3_BLOCKED_2, + SFX_PLAYER_GANG_3_BLOCKED_3, + SFX_PLAYER_GANG_3_BLOCKED_4, + SFX_PLAYER_GANG_3_BLOCKED_5, + SFX_PLAYER_GANG_3_BLOCKED_6, + SFX_PLAYER_GANG_3_BLOCKED_7, + SFX_PLAYER_GANG_3_BLOCKED_8, + SFX_PLAYER_GANG_3_BLOCKED_9, + SFX_PLAYER_GANG_3_BLOCKED_10, + SFX_PLAYER_GANG_3_BUMP_1, + SFX_PLAYER_GANG_3_BUMP_2, + SFX_PLAYER_GANG_3_BUMP_3, + SFX_PLAYER_GANG_3_BUMP_4, + SFX_PLAYER_GANG_3_BUMP_5, + SFX_PLAYER_GANG_3_CAR_CRASH_1, + SFX_PLAYER_GANG_3_CAR_CRASH_2, + SFX_PLAYER_GANG_3_CAR_CRASH_3, + SFX_PLAYER_GANG_3_CAR_CRASH_4, + SFX_PLAYER_GANG_3_CAR_CRASH_5, + SFX_PLAYER_GANG_3_CHAT_1, + SFX_PLAYER_GANG_3_CHAT_2, + SFX_PLAYER_GANG_3_CHAT_3, + SFX_PLAYER_GANG_3_CHAT_4, + SFX_PLAYER_GANG_3_CHAT_5, + SFX_PLAYER_GANG_3_CHAT_6, + SFX_PLAYER_GANG_3_CHAT_7, + SFX_PLAYER_GANG_3_CHAT_8, + SFX_PLAYER_GANG_3_DODGE_1, + SFX_PLAYER_GANG_3_DODGE_2, + SFX_PLAYER_GANG_3_DODGE_3, + SFX_PLAYER_GANG_3_DODGE_4, + SFX_PLAYER_GANG_3_DODGE_5, + SFX_PLAYER_GANG_3_DODGE_6, + SFX_PLAYER_GANG_3_DODGE_7, + SFX_PLAYER_GANG_3_EYEING_1, + SFX_PLAYER_GANG_3_EYEING_2, + SFX_PLAYER_GANG_3_FIGHT_1, + SFX_PLAYER_GANG_3_FIGHT_2, + SFX_PLAYER_GANG_3_FIGHT_3, + SFX_PLAYER_GANG_3_FIGHT_4, + SFX_PLAYER_GANG_3_FIGHT_5, + SFX_PLAYER_GANG_3_GENERIC_CRASH_1, + SFX_PLAYER_GANG_3_GENERIC_CRASH_2, + SFX_PLAYER_GANG_3_GENERIC_CRASH_3, + SFX_PLAYER_GANG_3_GENERIC_CRASH_4, + SFX_PLAYER_GANG_3_GENERIC_CRASH_5, + SFX_PLAYER_GANG_3_GUN_COOL_1, + SFX_PLAYER_GANG_3_GUN_COOL_2, + SFX_PLAYER_GANG_3_GUN_COOL_3, + SFX_PLAYER_GANG_3_GUN_COOL_4, + SFX_PLAYER_GANG_3_JACKED_1, + SFX_PLAYER_GANG_3_JACKED_2, + SFX_PLAYER_GANG_3_JACKED_3, + SFX_PLAYER_GANG_3_JACKED_4, + SFX_PLAYER_GANG_3_JACKED_5, + SFX_PLAYER_GANG_3_JACKING_1, + SFX_PLAYER_GANG_3_JACKING_2, + SFX_PLAYER_GANG_3_JACKING_3, + SFX_PLAYER_GANG_3_JACKING_4, + SFX_PLAYER_GANG_3_JACKING_5, + SFX_PLAYER_GANG_3_LOST_1, + SFX_PLAYER_GANG_3_LOST_2, + SFX_PLAYER_GANG_3_MUGGED_1, + SFX_PLAYER_GANG_3_MUGGED_2, + SFX_PLAYER_GANG_3_SAVED_1, + SFX_PLAYER_GANG_3_SHOCKED_1, + SFX_PLAYER_GANG_3_SHOCKED_2, + SFX_PLAYER_GANG_3_TAXI_1, + SFX_PLAYER_GANG_3_TAXI_2, + + SFX_GUARD_DUTY_1_BUMP_1, + SFX_GUARD_DUTY_1_BUMP_2, + SFX_GUARD_DUTY_1_BUMP_3, + SFX_GUARD_DUTY_1_BUMP_4, + SFX_GUARD_DUTY_1_BUMP_5, + SFX_GUARD_DUTY_1_BUMP_6, + SFX_GUARD_DUTY_1_BUMP_7, + SFX_GUARD_DUTY_1_BUMP_8, + SFX_GUARD_DUTY_1_BUMP_9, + SFX_GUARD_DUTY_1_BUMP_10, + SFX_GUARD_DUTY_1_CHAT_1, + SFX_GUARD_DUTY_1_CHAT_2, + SFX_GUARD_DUTY_1_CHAT_3, + SFX_GUARD_DUTY_1_CHAT_4, + SFX_GUARD_DUTY_1_CHAT_5, + SFX_GUARD_DUTY_1_CHAT_6, + SFX_GUARD_DUTY_1_CHAT_7, + SFX_GUARD_DUTY_1_CHAT_8, + SFX_GUARD_DUTY_1_CHAT_9, + SFX_GUARD_DUTY_1_CHAT_10, + SFX_GUARD_DUTY_1_DODGE_1, + SFX_GUARD_DUTY_1_DODGE_2, + SFX_GUARD_DUTY_1_DODGE_3, + SFX_GUARD_DUTY_1_DODGE_4, + SFX_GUARD_DUTY_1_DODGE_5, + SFX_GUARD_DUTY_1_DODGE_6, + SFX_GUARD_DUTY_1_DODGE_7, + SFX_GUARD_DUTY_1_DODGE_8, + SFX_GUARD_DUTY_1_DODGE_9, + SFX_GUARD_DUTY_1_EYEING_1, + SFX_GUARD_DUTY_1_EYEING_2, + SFX_GUARD_DUTY_1_FIGHT_1, + SFX_GUARD_DUTY_1_FIGHT_2, + SFX_GUARD_DUTY_1_FIGHT_3, + SFX_GUARD_DUTY_1_FIGHT_4, + SFX_GUARD_DUTY_1_FIGHT_5, + SFX_GUARD_DUTY_1_FIGHT_6, + SFX_GUARD_DUTY_1_FIGHT_7, + SFX_GUARD_DUTY_1_GUN_COOL_1, + SFX_GUARD_DUTY_1_GUN_COOL_2, + SFX_GUARD_DUTY_1_GUN_COOL_3, + SFX_GUARD_DUTY_1_GUN_COOL_4, + SFX_GUARD_DUTY_1_GUN_COOL_5, + SFX_GUARD_DUTY_1_GUN_COOL_6, + SFX_GUARD_DUTY_1_LOST_1, + SFX_GUARD_DUTY_1_LOST_2, + SFX_GUARD_DUTY_1_SAVED_1, + SFX_GUARD_DUTY_1_SAVED_2, + SFX_GUARD_DUTY_1_SHOCKED_1, + SFX_GUARD_DUTY_1_SHOCKED_2, + + SFX_GUARD_DUTY_2_BUMP_1, + SFX_GUARD_DUTY_2_BUMP_2, + SFX_GUARD_DUTY_2_BUMP_3, + SFX_GUARD_DUTY_2_BUMP_4, + SFX_GUARD_DUTY_2_BUMP_5, + SFX_GUARD_DUTY_2_BUMP_6, + SFX_GUARD_DUTY_2_BUMP_7, + SFX_GUARD_DUTY_2_BUMP_8, + SFX_GUARD_DUTY_2_BUMP_9, + SFX_GUARD_DUTY_2_BUMP_10, + SFX_GUARD_DUTY_2_CHAT_1, + SFX_GUARD_DUTY_2_CHAT_2, + SFX_GUARD_DUTY_2_CHAT_3, + SFX_GUARD_DUTY_2_CHAT_4, + SFX_GUARD_DUTY_2_CHAT_5, + SFX_GUARD_DUTY_2_CHAT_6, + SFX_GUARD_DUTY_2_CHAT_7, + SFX_GUARD_DUTY_2_CHAT_8, + SFX_GUARD_DUTY_2_CHAT_9, + SFX_GUARD_DUTY_2_CHAT_10, + SFX_GUARD_DUTY_2_DODGE_1, + SFX_GUARD_DUTY_2_DODGE_2, + SFX_GUARD_DUTY_2_DODGE_3, + SFX_GUARD_DUTY_2_DODGE_4, + SFX_GUARD_DUTY_2_DODGE_5, + SFX_GUARD_DUTY_2_DODGE_6, + SFX_GUARD_DUTY_2_DODGE_7, + SFX_GUARD_DUTY_2_DODGE_8, + SFX_GUARD_DUTY_2_DODGE_9, + SFX_GUARD_DUTY_2_EYEING_1, + SFX_GUARD_DUTY_2_EYEING_2, + SFX_GUARD_DUTY_2_FIGHT_1, + SFX_GUARD_DUTY_2_FIGHT_2, + SFX_GUARD_DUTY_2_FIGHT_3, + SFX_GUARD_DUTY_2_FIGHT_4, + SFX_GUARD_DUTY_2_FIGHT_5, + SFX_GUARD_DUTY_2_FIGHT_6, + SFX_GUARD_DUTY_2_FIGHT_7, + SFX_GUARD_DUTY_2_GUN_COOL_1, + SFX_GUARD_DUTY_2_GUN_COOL_2, + SFX_GUARD_DUTY_2_GUN_COOL_3, + SFX_GUARD_DUTY_2_GUN_COOL_4, + SFX_GUARD_DUTY_2_GUN_COOL_5, + SFX_GUARD_DUTY_2_GUN_COOL_6, + SFX_GUARD_DUTY_2_LOST_1, + SFX_GUARD_DUTY_2_LOST_2, + SFX_GUARD_DUTY_2_SAVED_1, + SFX_GUARD_DUTY_2_SAVED_2, + SFX_GUARD_DUTY_2_SHOCKED_1, + SFX_GUARD_DUTY_2_SHOCKED_2, + + SFX_GUARD_DUTY_3_BUMP_1, + SFX_GUARD_DUTY_3_BUMP_2, + SFX_GUARD_DUTY_3_BUMP_3, + SFX_GUARD_DUTY_3_BUMP_4, + SFX_GUARD_DUTY_3_BUMP_5, + SFX_GUARD_DUTY_3_BUMP_6, + SFX_GUARD_DUTY_3_BUMP_7, + SFX_GUARD_DUTY_3_BUMP_8, + SFX_GUARD_DUTY_3_BUMP_9, + SFX_GUARD_DUTY_3_BUMP_10, + SFX_GUARD_DUTY_3_CHAT_1, + SFX_GUARD_DUTY_3_CHAT_2, + SFX_GUARD_DUTY_3_CHAT_3, + SFX_GUARD_DUTY_3_CHAT_4, + SFX_GUARD_DUTY_3_CHAT_5, + SFX_GUARD_DUTY_3_CHAT_6, + SFX_GUARD_DUTY_3_CHAT_7, + SFX_GUARD_DUTY_3_CHAT_8, + SFX_GUARD_DUTY_3_CHAT_9, + SFX_GUARD_DUTY_3_CHAT_10, + SFX_GUARD_DUTY_3_DODGE_1, + SFX_GUARD_DUTY_3_DODGE_2, + SFX_GUARD_DUTY_3_DODGE_3, + SFX_GUARD_DUTY_3_DODGE_4, + SFX_GUARD_DUTY_3_DODGE_5, + SFX_GUARD_DUTY_3_DODGE_6, + SFX_GUARD_DUTY_3_DODGE_7, + SFX_GUARD_DUTY_3_DODGE_8, + SFX_GUARD_DUTY_3_DODGE_9, + SFX_GUARD_DUTY_3_EYEING_1, + SFX_GUARD_DUTY_3_EYEING_2, + SFX_GUARD_DUTY_3_FIGHT_1, + SFX_GUARD_DUTY_3_FIGHT_2, + SFX_GUARD_DUTY_3_FIGHT_3, + SFX_GUARD_DUTY_3_FIGHT_4, + SFX_GUARD_DUTY_3_FIGHT_5, + SFX_GUARD_DUTY_3_FIGHT_6, + SFX_GUARD_DUTY_3_FIGHT_7, + SFX_GUARD_DUTY_3_GUN_COOL_1, + SFX_GUARD_DUTY_3_GUN_COOL_2, + SFX_GUARD_DUTY_3_GUN_COOL_3, + SFX_GUARD_DUTY_3_GUN_COOL_4, + SFX_GUARD_DUTY_3_GUN_COOL_5, + SFX_GUARD_DUTY_3_GUN_COOL_6, + SFX_GUARD_DUTY_3_LOST_1, + SFX_GUARD_DUTY_3_LOST_2, + SFX_GUARD_DUTY_3_SAVED_1, + SFX_GUARD_DUTY_3_SAVED_2, + SFX_GUARD_DUTY_3_SHOCKED_1, + SFX_GUARD_DUTY_3_SHOCKED_2, + + SFX_VICE_VOICE_1_ARREST_1, + SFX_VICE_VOICE_1_ARREST_2, + SFX_VICE_VOICE_1_ARREST_3, + SFX_VICE_VOICE_1_MIAMIVICE_EXITING_CAR_1, + + SFX_VICE_VOICE_2_ARREST_1, + SFX_VICE_VOICE_2_ARREST_2, + SFX_VICE_VOICE_2_ARREST_3, + SFX_VICE_VOICE_2_MIAMIVICE_EXITING_CAR_1, + + SFX_VICE_VOICE_3_ARREST_1, + SFX_VICE_VOICE_3_ARREST_2, + SFX_VICE_VOICE_3_ARREST_3, + SFX_VICE_VOICE_3_MIAMIVICE_EXITING_CAR_1, + + SFX_VICE_VOICE_4_ARREST_1, + SFX_VICE_VOICE_4_ARREST_2, + SFX_VICE_VOICE_4_ARREST_3, + SFX_VICE_VOICE_4_MIAMIVICE_EXITING_CAR_1, + + SFX_VICE_VOICE_5_ARREST_1, + SFX_VICE_VOICE_5_ARREST_2, + SFX_VICE_VOICE_5_ARREST_3, + SFX_VICE_VOICE_5_MIAMIVICE_EXITING_CAR_1, + + SFX_VICE_VOICE_6_ARREST_1, + SFX_VICE_VOICE_6_ARREST_2, + SFX_VICE_VOICE_6_ARREST_3, + SFX_VICE_VOICE_6_MIAMIVICE_EXITING_CAR_1, + + SFX_DEFAULT_VOICE_BLOCKED_1, + SFX_DEFAULT_VOICE_BLOCKED_2, + SFX_DEFAULT_VOICE_BLOCKED_3, + SFX_DEFAULT_VOICE_BLOCKED_4, + SFX_DEFAULT_VOICE_BLOCKED_5, + SFX_DEFAULT_VOICE_BLOCKED_6, + SFX_DEFAULT_VOICE_BLOCKED_7, + SFX_DEFAULT_VOICE_BLOCKED_8, + SFX_DEFAULT_VOICE_BLOCKED_9, + SFX_DEFAULT_VOICE_BLOCKED_10, + SFX_DEFAULT_VOICE_BLOCKED_11, + SFX_DEFAULT_VOICE_BLOCKED_12, + SFX_DEFAULT_VOICE_BLOCKED_13, + SFX_DEFAULT_VOICE_BLOCKED_14, + SFX_DEFAULT_VOICE_BLOCKED_15, + SFX_DEFAULT_VOICE_BLOCKED_16, + SFX_DEFAULT_VOICE_BUMP_1, + SFX_DEFAULT_VOICE_BUMP_2, + SFX_DEFAULT_VOICE_BUMP_3, + SFX_DEFAULT_VOICE_BUMP_4, + SFX_DEFAULT_VOICE_BUMP_5, + SFX_DEFAULT_VOICE_BUMP_6, + SFX_DEFAULT_VOICE_BUMP_7, + SFX_DEFAULT_VOICE_BUMP_8, + SFX_DEFAULT_VOICE_BUMP_9, + SFX_DEFAULT_VOICE_BUMP_10, + SFX_DEFAULT_VOICE_BUMP_11, + SFX_DEFAULT_VOICE_BUMP_12, + SFX_DEFAULT_VOICE_BUMP_13, + SFX_DEFAULT_VOICE_BUMP_14, + SFX_DEFAULT_VOICE_BUMP_15, + SFX_DEFAULT_VOICE_BUMP_16, + SFX_DEFAULT_VOICE_BUMP_17, + SFX_DEFAULT_VOICE_BUMP_18, + SFX_DEFAULT_VOICE_BUMP_19, + SFX_DEFAULT_VOICE_BUMP_20, + SFX_DEFAULT_VOICE_BUMP_21, + SFX_DEFAULT_VOICE_BUMP_22, + SFX_DEFAULT_VOICE_BUMP_23, + SFX_DEFAULT_VOICE_BUMP_24, + SFX_DEFAULT_VOICE_BUMP_25, + SFX_DEFAULT_VOICE_CAR_CRASH_1, + SFX_DEFAULT_VOICE_CAR_CRASH_2, + SFX_DEFAULT_VOICE_CAR_CRASH_3, + SFX_DEFAULT_VOICE_CAR_CRASH_4, + SFX_DEFAULT_VOICE_CAR_CRASH_5, + SFX_DEFAULT_VOICE_CAR_CRASH_6, + SFX_DEFAULT_VOICE_CAR_CRASH_7, + SFX_DEFAULT_VOICE_CAR_CRASH_8, + SFX_DEFAULT_VOICE_CAR_CRASH_9, + SFX_DEFAULT_VOICE_CAR_CRASH_10, + SFX_DEFAULT_VOICE_CAR_CRASH_11, + SFX_DEFAULT_VOICE_CAR_CRASH_12, + SFX_DEFAULT_VOICE_CAR_CRASH_13, + SFX_DEFAULT_VOICE_CAR_CRASH_14, + SFX_DEFAULT_VOICE_CAR_CRASH_15, + SFX_DEFAULT_VOICE_CHAT_1, + SFX_DEFAULT_VOICE_CHAT_2, + SFX_DEFAULT_VOICE_CHAT_3, + SFX_DEFAULT_VOICE_CHAT_4, + SFX_DEFAULT_VOICE_CHAT_5, + SFX_DEFAULT_VOICE_CHAT_6, + SFX_DEFAULT_VOICE_CHAT_7, + SFX_DEFAULT_VOICE_CHAT_8, + SFX_DEFAULT_VOICE_CHAT_9, + SFX_DEFAULT_VOICE_CHAT_10, + SFX_DEFAULT_VOICE_CHAT_11, + SFX_DEFAULT_VOICE_CHAT_12, + SFX_DEFAULT_VOICE_CHAT_13, + SFX_DEFAULT_VOICE_CHAT_14, + SFX_DEFAULT_VOICE_CHAT_15, + SFX_DEFAULT_VOICE_CHAT_16, + SFX_DEFAULT_VOICE_CHAT_17, + SFX_DEFAULT_VOICE_CHAT_18, + SFX_DEFAULT_VOICE_CHAT_19, + SFX_DEFAULT_VOICE_CHAT_20, + SFX_DEFAULT_VOICE_CHAT_21, + SFX_DEFAULT_VOICE_CHAT_22, + SFX_DEFAULT_VOICE_CHAT_23, + SFX_DEFAULT_VOICE_CHAT_24, + SFX_DEFAULT_VOICE_CHAT_25, + SFX_DEFAULT_VOICE_DODGE_1, + SFX_DEFAULT_VOICE_DODGE_2, + SFX_DEFAULT_VOICE_DODGE_3, + SFX_DEFAULT_VOICE_DODGE_4, + SFX_DEFAULT_VOICE_DODGE_5, + SFX_DEFAULT_VOICE_DODGE_6, + SFX_DEFAULT_VOICE_DODGE_7, + SFX_DEFAULT_VOICE_DODGE_8, + SFX_DEFAULT_VOICE_DODGE_9, + SFX_DEFAULT_VOICE_DODGE_10, + SFX_DEFAULT_VOICE_DODGE_11, + SFX_DEFAULT_VOICE_DODGE_12, + SFX_DEFAULT_VOICE_DODGE_13, + SFX_DEFAULT_VOICE_DODGE_14, + SFX_DEFAULT_VOICE_DODGE_15, + SFX_DEFAULT_VOICE_DODGE_16, + SFX_DEFAULT_VOICE_DODGE_17, + SFX_DEFAULT_VOICE_DODGE_18, + SFX_DEFAULT_VOICE_DODGE_19, + SFX_DEFAULT_VOICE_EYEING_1, + SFX_DEFAULT_VOICE_EYEING_2, + SFX_DEFAULT_VOICE_EYEING_3, + SFX_DEFAULT_VOICE_EYEING_4, + SFX_DEFAULT_VOICE_EYEING_5, + SFX_DEFAULT_VOICE_EYEING_6, + SFX_DEFAULT_VOICE_FIGHT_1, + SFX_DEFAULT_VOICE_FIGHT_2, + SFX_DEFAULT_VOICE_FIGHT_3, + SFX_DEFAULT_VOICE_FIGHT_4, + SFX_DEFAULT_VOICE_FIGHT_5, + SFX_DEFAULT_VOICE_FIGHT_6, + SFX_DEFAULT_VOICE_FIGHT_7, + SFX_DEFAULT_VOICE_FIGHT_8, + SFX_DEFAULT_VOICE_FIGHT_9, + SFX_DEFAULT_VOICE_FIGHT_10, + SFX_DEFAULT_VOICE_FIGHT_11, + SFX_DEFAULT_VOICE_FIGHT_12, + SFX_DEFAULT_VOICE_FIGHT_13, + SFX_DEFAULT_VOICE_FIGHT_14, + SFX_DEFAULT_VOICE_FIGHT_15, + SFX_DEFAULT_VOICE_FIGHT_16, + SFX_DEFAULT_VOICE_GENERIC_CRASH_1, + SFX_DEFAULT_VOICE_GENERIC_CRASH_2, + SFX_DEFAULT_VOICE_GENERIC_CRASH_3, + SFX_DEFAULT_VOICE_GENERIC_CRASH_4, + SFX_DEFAULT_VOICE_GENERIC_CRASH_5, + SFX_DEFAULT_VOICE_GENERIC_CRASH_6, + SFX_DEFAULT_VOICE_GENERIC_CRASH_7, + SFX_DEFAULT_VOICE_GENERIC_CRASH_8, + SFX_DEFAULT_VOICE_GENERIC_CRASH_9, + SFX_DEFAULT_VOICE_GENERIC_CRASH_10, + SFX_DEFAULT_VOICE_GENERIC_CRASH_11, + SFX_DEFAULT_VOICE_GENERIC_CRASH_12, + SFX_DEFAULT_VOICE_GENERIC_CRASH_13, + SFX_DEFAULT_VOICE_GUN_PANIC_1, + SFX_DEFAULT_VOICE_GUN_PANIC_2, + SFX_DEFAULT_VOICE_GUN_PANIC_3, + SFX_DEFAULT_VOICE_GUN_PANIC_4, + SFX_DEFAULT_VOICE_GUN_PANIC_5, + SFX_DEFAULT_VOICE_GUN_PANIC_6, + SFX_DEFAULT_VOICE_GUN_PANIC_7, + SFX_DEFAULT_VOICE_GUN_PANIC_8, + SFX_DEFAULT_VOICE_GUN_PANIC_9, + SFX_DEFAULT_VOICE_GUN_PANIC_10, + SFX_DEFAULT_VOICE_GUN_PANIC_11, + SFX_DEFAULT_VOICE_GUN_PANIC_12, + SFX_DEFAULT_VOICE_JACKED_1, + SFX_DEFAULT_VOICE_JACKED_2, + SFX_DEFAULT_VOICE_JACKED_3, + SFX_DEFAULT_VOICE_JACKED_4, + SFX_DEFAULT_VOICE_JACKED_5, + SFX_DEFAULT_VOICE_JACKED_6, + SFX_DEFAULT_VOICE_JACKED_7, + SFX_DEFAULT_VOICE_JACKED_8, + SFX_DEFAULT_VOICE_JACKED_9, + SFX_DEFAULT_VOICE_JACKED_10, + SFX_DEFAULT_VOICE_JACKED_11, + SFX_DEFAULT_VOICE_JACKED_12, + SFX_DEFAULT_VOICE_JACKING_1, + SFX_DEFAULT_VOICE_JACKING_2, + SFX_DEFAULT_VOICE_JACKING_3, + SFX_DEFAULT_VOICE_JACKING_4, + SFX_DEFAULT_VOICE_JACKING_5, + SFX_DEFAULT_VOICE_JACKING_6, + SFX_DEFAULT_VOICE_JACKING_7, + SFX_DEFAULT_VOICE_JACKING_8, + SFX_DEFAULT_VOICE_JACKING_9, + SFX_DEFAULT_VOICE_JACKING_10, + SFX_DEFAULT_VOICE_JACKING_11, + SFX_DEFAULT_VOICE_JACKING_12, + SFX_DEFAULT_VOICE_JACKING_13, + SFX_DEFAULT_VOICE_LOST_1, + SFX_DEFAULT_VOICE_LOST_2, + SFX_DEFAULT_VOICE_LOST_3, + SFX_DEFAULT_VOICE_LOST_4, + SFX_DEFAULT_VOICE_LOST_5, + SFX_DEFAULT_VOICE_MUGGED_1, + SFX_DEFAULT_VOICE_MUGGED_2, + SFX_DEFAULT_VOICE_MUGGED_3, + SFX_DEFAULT_VOICE_MUGGED_4, + SFX_DEFAULT_VOICE_RUN_1, + SFX_DEFAULT_VOICE_RUN_2, + SFX_DEFAULT_VOICE_RUN_3, + SFX_DEFAULT_VOICE_RUN_4, + SFX_DEFAULT_VOICE_RUN_5, + SFX_DEFAULT_VOICE_RUN_6, + SFX_DEFAULT_VOICE_RUN_7, + SFX_DEFAULT_VOICE_RUN_8, + SFX_DEFAULT_VOICE_RUN_9, + SFX_DEFAULT_VOICE_RUN_10, + SFX_DEFAULT_VOICE_RUN_11, + SFX_DEFAULT_VOICE_RUN_12, + SFX_DEFAULT_VOICE_RUN_13, + SFX_DEFAULT_VOICE_RUN_14, + SFX_DEFAULT_VOICE_RUN_15, + SFX_DEFAULT_VOICE_RUN_16, + SFX_DEFAULT_VOICE_RUN_17, + SFX_DEFAULT_VOICE_RUN_18, + SFX_DEFAULT_VOICE_RUN_19, + SFX_DEFAULT_VOICE_SAVED_1, + SFX_DEFAULT_VOICE_SAVED_2, + SFX_DEFAULT_VOICE_SAVED_3, + SFX_DEFAULT_VOICE_SAVED_4, + SFX_DEFAULT_VOICE_SHOCKED_1, + SFX_DEFAULT_VOICE_SHOCKED_2, + SFX_DEFAULT_VOICE_SHOCKED_3, + SFX_DEFAULT_VOICE_SHOCKED_4, + SFX_DEFAULT_VOICE_SHOCKED_5, + SFX_DEFAULT_VOICE_SHOCKED_6, + SFX_DEFAULT_VOICE_TAXI_1, + SFX_DEFAULT_VOICE_TAXI_2, + SFX_DEFAULT_VOICE_TAXI_3, + SFX_DEFAULT_VOICE_TAXI_4, + SFX_DEFAULT_VOICE_TAXI_5, + + SFX_CUBAN_GANG_1_BLOCKED_1, + SFX_CUBAN_GANG_1_BLOCKED_2, + SFX_CUBAN_GANG_1_BLOCKED_3, + SFX_CUBAN_GANG_1_BLOCKED_4, + SFX_CUBAN_GANG_1_BLOCKED_5, + SFX_CUBAN_GANG_1_BLOCKED_6, + SFX_CUBAN_GANG_1_BLOCKED_7, + SFX_CUBAN_GANG_1_BLOCKED_8, + SFX_CUBAN_GANG_1_BUMP_1, + SFX_CUBAN_GANG_1_BUMP_2, + SFX_CUBAN_GANG_1_BUMP_3, + SFX_CUBAN_GANG_1_BUMP_4, + SFX_CUBAN_GANG_1_BUMP_5, + SFX_CUBAN_GANG_1_BUMP_6, + SFX_CUBAN_GANG_1_BUMP_7, + SFX_CUBAN_GANG_1_BUMP_8, + SFX_CUBAN_GANG_1_BUMP_9, + SFX_CUBAN_GANG_1_BUMP_10, + SFX_CUBAN_GANG_1_BUMP_11, + SFX_CUBAN_GANG_1_CAR_CRASH_1, + SFX_CUBAN_GANG_1_CAR_CRASH_2, + SFX_CUBAN_GANG_1_CAR_CRASH_3, + SFX_CUBAN_GANG_1_CAR_CRASH_4, + SFX_CUBAN_GANG_1_CAR_CRASH_5, + SFX_CUBAN_GANG_1_CAR_CRASH_6, + SFX_CUBAN_GANG_1_CAR_CRASH_7, + SFX_CUBAN_GANG_1_CAR_CRASH_8, + SFX_CUBAN_GANG_1_CHAT_1, + SFX_CUBAN_GANG_1_CHAT_2, + SFX_CUBAN_GANG_1_CHAT_3, + SFX_CUBAN_GANG_1_CHAT_4, + SFX_CUBAN_GANG_1_CHAT_5, + SFX_CUBAN_GANG_1_CHAT_6, + SFX_CUBAN_GANG_1_CHAT_7, + SFX_CUBAN_GANG_1_CHAT_8, + SFX_CUBAN_GANG_1_CHAT_9, + SFX_CUBAN_GANG_1_CHAT_10, + SFX_CUBAN_GANG_1_DODGE_1, + SFX_CUBAN_GANG_1_DODGE_2, + SFX_CUBAN_GANG_1_DODGE_3, + SFX_CUBAN_GANG_1_DODGE_4, + SFX_CUBAN_GANG_1_DODGE_5, + SFX_CUBAN_GANG_1_DODGE_6, + SFX_CUBAN_GANG_1_DODGE_7, + SFX_CUBAN_GANG_1_DODGE_8, + SFX_CUBAN_GANG_1_DODGE_9, + SFX_CUBAN_GANG_1_EYEING_1, + SFX_CUBAN_GANG_1_EYEING_2, + SFX_CUBAN_GANG_1_FIGHT_1, + SFX_CUBAN_GANG_1_FIGHT_2, + SFX_CUBAN_GANG_1_FIGHT_3, + SFX_CUBAN_GANG_1_FIGHT_4, + SFX_CUBAN_GANG_1_FIGHT_5, + SFX_CUBAN_GANG_1_FIGHT_6, + SFX_CUBAN_GANG_1_FIGHT_7, + SFX_CUBAN_GANG_1_FIGHT_8, + SFX_CUBAN_GANG_1_FIGHT_9, + SFX_CUBAN_GANG_1_GENERIC_CRASH_1, + SFX_CUBAN_GANG_1_GENERIC_CRASH_2, + SFX_CUBAN_GANG_1_GENERIC_CRASH_3, + SFX_CUBAN_GANG_1_GENERIC_CRASH_4, + SFX_CUBAN_GANG_1_GENERIC_CRASH_5, + SFX_CUBAN_GANG_1_GENERIC_CRASH_6, + SFX_CUBAN_GANG_1_GENERIC_CRASH_7, + SFX_CUBAN_GANG_1_GENERIC_CRASH_8, + SFX_CUBAN_GANG_1_GUN_COOL_1, + SFX_CUBAN_GANG_1_GUN_COOL_2, + SFX_CUBAN_GANG_1_GUN_COOL_3, + SFX_CUBAN_GANG_1_GUN_COOL_4, + SFX_CUBAN_GANG_1_GUN_COOL_5, + SFX_CUBAN_GANG_1_JACKED_1, + SFX_CUBAN_GANG_1_JACKED_2, + SFX_CUBAN_GANG_1_JACKED_3, + SFX_CUBAN_GANG_1_JACKED_4, + SFX_CUBAN_GANG_1_JACKING_1, + SFX_CUBAN_GANG_1_JACKING_2, + SFX_CUBAN_GANG_1_JACKING_3, + SFX_CUBAN_GANG_1_JACKING_4, + SFX_CUBAN_GANG_1_JACKING_5, + SFX_CUBAN_GANG_1_LOST_1, + SFX_CUBAN_GANG_1_LOST_2, + SFX_CUBAN_GANG_1_MUGGED_1, + SFX_CUBAN_GANG_1_MUGGED_2, + SFX_CUBAN_GANG_1_SAVED_1, + SFX_CUBAN_GANG_1_TAXI_1, + SFX_CUBAN_GANG_1_TAXI_2, + SFX_CUBAN_GANG_2_BLOCKED_1, + SFX_CUBAN_GANG_2_BLOCKED_2, + SFX_CUBAN_GANG_2_BLOCKED_3, + SFX_CUBAN_GANG_2_BLOCKED_4, + SFX_CUBAN_GANG_2_BLOCKED_5, + SFX_CUBAN_GANG_2_BLOCKED_6, + SFX_CUBAN_GANG_2_BLOCKED_7, + SFX_CUBAN_GANG_2_BLOCKED_8, + SFX_CUBAN_GANG_2_BUMP_1, + SFX_CUBAN_GANG_2_BUMP_2, + SFX_CUBAN_GANG_2_BUMP_3, + SFX_CUBAN_GANG_2_BUMP_4, + SFX_CUBAN_GANG_2_BUMP_5, + SFX_CUBAN_GANG_2_BUMP_6, + SFX_CUBAN_GANG_2_BUMP_7, + SFX_CUBAN_GANG_2_BUMP_8, + SFX_CUBAN_GANG_2_BUMP_9, + SFX_CUBAN_GANG_2_BUMP_10, + SFX_CUBAN_GANG_2_BUMP_11, + SFX_CUBAN_GANG_2_CAR_CRASH_1, + SFX_CUBAN_GANG_2_CAR_CRASH_2, + SFX_CUBAN_GANG_2_CAR_CRASH_3, + SFX_CUBAN_GANG_2_CAR_CRASH_4, + SFX_CUBAN_GANG_2_CAR_CRASH_5, + SFX_CUBAN_GANG_2_CAR_CRASH_6, + SFX_CUBAN_GANG_2_CAR_CRASH_7, + SFX_CUBAN_GANG_2_CAR_CRASH_8, + SFX_CUBAN_GANG_2_CHAT_1, + SFX_CUBAN_GANG_2_CHAT_2, + SFX_CUBAN_GANG_2_CHAT_3, + SFX_CUBAN_GANG_2_CHAT_4, + SFX_CUBAN_GANG_2_CHAT_5, + SFX_CUBAN_GANG_2_CHAT_6, + SFX_CUBAN_GANG_2_CHAT_7, + SFX_CUBAN_GANG_2_CHAT_8, + SFX_CUBAN_GANG_2_CHAT_9, + SFX_CUBAN_GANG_2_CHAT_10, + SFX_CUBAN_GANG_2_DODGE_1, + SFX_CUBAN_GANG_2_DODGE_2, + SFX_CUBAN_GANG_2_DODGE_3, + SFX_CUBAN_GANG_2_DODGE_4, + SFX_CUBAN_GANG_2_DODGE_5, + SFX_CUBAN_GANG_2_DODGE_6, + SFX_CUBAN_GANG_2_DODGE_7, + SFX_CUBAN_GANG_2_DODGE_8, + SFX_CUBAN_GANG_2_DODGE_9, + SFX_CUBAN_GANG_2_EYEING_1, + SFX_CUBAN_GANG_2_EYEING_2, + SFX_CUBAN_GANG_2_FIGHT_1, + SFX_CUBAN_GANG_2_FIGHT_2, + SFX_CUBAN_GANG_2_FIGHT_3, + SFX_CUBAN_GANG_2_FIGHT_4, + SFX_CUBAN_GANG_2_FIGHT_5, + SFX_CUBAN_GANG_2_FIGHT_6, + SFX_CUBAN_GANG_2_FIGHT_7, + SFX_CUBAN_GANG_2_FIGHT_8, + SFX_CUBAN_GANG_2_FIGHT_9, + SFX_CUBAN_GANG_2_GENERIC_CRASH_1, + SFX_CUBAN_GANG_2_GENERIC_CRASH_2, + SFX_CUBAN_GANG_2_GENERIC_CRASH_3, + SFX_CUBAN_GANG_2_GENERIC_CRASH_4, + SFX_CUBAN_GANG_2_GENERIC_CRASH_5, + SFX_CUBAN_GANG_2_GENERIC_CRASH_6, + SFX_CUBAN_GANG_2_GENERIC_CRASH_7, + SFX_CUBAN_GANG_2_GENERIC_CRASH_8, + SFX_CUBAN_GANG_2_GUN_COOL_1, + SFX_CUBAN_GANG_2_GUN_COOL_2, + SFX_CUBAN_GANG_2_GUN_COOL_3, + SFX_CUBAN_GANG_2_GUN_COOL_4, + SFX_CUBAN_GANG_2_GUN_COOL_5, + SFX_CUBAN_GANG_2_JACKED_1, + SFX_CUBAN_GANG_2_JACKED_2, + SFX_CUBAN_GANG_2_JACKED_3, + SFX_CUBAN_GANG_2_JACKED_4, + SFX_CUBAN_GANG_2_JACKING_1, + SFX_CUBAN_GANG_2_JACKING_2, + SFX_CUBAN_GANG_2_JACKING_3, + SFX_CUBAN_GANG_2_JACKING_4, + SFX_CUBAN_GANG_2_JACKING_5, + SFX_CUBAN_GANG_2_LOST_1, + SFX_CUBAN_GANG_2_LOST_2, + SFX_CUBAN_GANG_2_MUGGED_1, + SFX_CUBAN_GANG_2_MUGGED_2, + SFX_CUBAN_GANG_2_SAVED_1, + SFX_CUBAN_GANG_2_TAXI_1, + SFX_CUBAN_GANG_2_TAXI_2, + SFX_CUBAN_GANG_3_BLOCKED_1, + SFX_CUBAN_GANG_3_BLOCKED_2, + SFX_CUBAN_GANG_3_BLOCKED_3, + SFX_CUBAN_GANG_3_BLOCKED_4, + SFX_CUBAN_GANG_3_BLOCKED_5, + SFX_CUBAN_GANG_3_BLOCKED_6, + SFX_CUBAN_GANG_3_BLOCKED_7, + SFX_CUBAN_GANG_3_BLOCKED_8, + SFX_CUBAN_GANG_3_BUMP_1, + SFX_CUBAN_GANG_3_BUMP_2, + SFX_CUBAN_GANG_3_BUMP_3, + SFX_CUBAN_GANG_3_BUMP_4, + SFX_CUBAN_GANG_3_BUMP_5, + SFX_CUBAN_GANG_3_BUMP_6, + SFX_CUBAN_GANG_3_BUMP_7, + SFX_CUBAN_GANG_3_BUMP_8, + SFX_CUBAN_GANG_3_BUMP_9, + SFX_CUBAN_GANG_3_BUMP_10, + SFX_CUBAN_GANG_3_BUMP_11, + SFX_CUBAN_GANG_3_CAR_CRASH_1, + SFX_CUBAN_GANG_3_CAR_CRASH_2, + SFX_CUBAN_GANG_3_CAR_CRASH_3, + SFX_CUBAN_GANG_3_CAR_CRASH_4, + SFX_CUBAN_GANG_3_CAR_CRASH_5, + SFX_CUBAN_GANG_3_CAR_CRASH_6, + SFX_CUBAN_GANG_3_CAR_CRASH_7, + SFX_CUBAN_GANG_3_CAR_CRASH_8, + SFX_CUBAN_GANG_3_CHAT_1, + SFX_CUBAN_GANG_3_CHAT_2, + SFX_CUBAN_GANG_3_CHAT_3, + SFX_CUBAN_GANG_3_CHAT_4, + SFX_CUBAN_GANG_3_CHAT_5, + SFX_CUBAN_GANG_3_CHAT_6, + SFX_CUBAN_GANG_3_CHAT_7, + SFX_CUBAN_GANG_3_CHAT_8, + SFX_CUBAN_GANG_3_CHAT_9, + SFX_CUBAN_GANG_3_CHAT_10, + SFX_CUBAN_GANG_3_DODGE_1, + SFX_CUBAN_GANG_3_DODGE_2, + SFX_CUBAN_GANG_3_DODGE_3, + SFX_CUBAN_GANG_3_DODGE_4, + SFX_CUBAN_GANG_3_DODGE_5, + SFX_CUBAN_GANG_3_DODGE_6, + SFX_CUBAN_GANG_3_DODGE_7, + SFX_CUBAN_GANG_3_DODGE_8, + SFX_CUBAN_GANG_3_DODGE_9, + SFX_CUBAN_GANG_3_EYEING_1, + SFX_CUBAN_GANG_3_EYEING_2, + SFX_CUBAN_GANG_3_FIGHT_1, + SFX_CUBAN_GANG_3_FIGHT_2, + SFX_CUBAN_GANG_3_FIGHT_3, + SFX_CUBAN_GANG_3_FIGHT_4, + SFX_CUBAN_GANG_3_FIGHT_5, + SFX_CUBAN_GANG_3_FIGHT_6, + SFX_CUBAN_GANG_3_FIGHT_7, + SFX_CUBAN_GANG_3_FIGHT_8, + SFX_CUBAN_GANG_3_FIGHT_9, + SFX_CUBAN_GANG_3_GENERIC_CRASH_1, + SFX_CUBAN_GANG_3_GENERIC_CRASH_2, + SFX_CUBAN_GANG_3_GENERIC_CRASH_3, + SFX_CUBAN_GANG_3_GENERIC_CRASH_4, + SFX_CUBAN_GANG_3_GENERIC_CRASH_5, + SFX_CUBAN_GANG_3_GENERIC_CRASH_6, + SFX_CUBAN_GANG_3_GENERIC_CRASH_7, + SFX_CUBAN_GANG_3_GENERIC_CRASH_8, + SFX_CUBAN_GANG_3_GUN_COOL_1, + SFX_CUBAN_GANG_3_GUN_COOL_2, + SFX_CUBAN_GANG_3_GUN_COOL_3, + SFX_CUBAN_GANG_3_GUN_COOL_4, + SFX_CUBAN_GANG_3_GUN_COOL_5, + SFX_CUBAN_GANG_3_JACKED_1, + SFX_CUBAN_GANG_3_JACKED_2, + SFX_CUBAN_GANG_3_JACKED_3, + SFX_CUBAN_GANG_3_JACKED_4, + SFX_CUBAN_GANG_3_JACKING_1, + SFX_CUBAN_GANG_3_JACKING_2, + SFX_CUBAN_GANG_3_JACKING_3, + SFX_CUBAN_GANG_3_JACKING_4, + SFX_CUBAN_GANG_3_JACKING_5, + SFX_CUBAN_GANG_3_LOST_1, + SFX_CUBAN_GANG_3_LOST_2, + SFX_CUBAN_GANG_3_MUGGED_1, + SFX_CUBAN_GANG_3_MUGGED_2, + SFX_CUBAN_GANG_3_SAVED_1, + SFX_CUBAN_GANG_3_TAXI_1, + SFX_CUBAN_GANG_3_TAXI_2, + + SFX_BIKER_GANG_1_BLOCKED_1, + SFX_BIKER_GANG_1_BLOCKED_2, + SFX_BIKER_GANG_1_BLOCKED_3, + SFX_BIKER_GANG_1_BLOCKED_4, + SFX_BIKER_GANG_1_BLOCKED_5, + SFX_BIKER_GANG_1_BLOCKED_6, + SFX_BIKER_GANG_1_BLOCKED_7, + SFX_BIKER_GANG_1_BLOCKED_8, + SFX_BIKER_GANG_1_BLOCKED_9, + SFX_BIKER_GANG_1_BLOCKED_10, + SFX_BIKER_GANG_1_BUMP_1, + SFX_BIKER_GANG_1_BUMP_2, + SFX_BIKER_GANG_1_BUMP_3, + SFX_BIKER_GANG_1_BUMP_4, + SFX_BIKER_GANG_1_BUMP_5, + SFX_BIKER_GANG_1_BUMP_6, + SFX_BIKER_GANG_1_BUMP_7, + SFX_BIKER_GANG_1_BUMP_8, + SFX_BIKER_GANG_1_BUMP_9, + SFX_BIKER_GANG_1_BUMP_10, + SFX_BIKER_GANG_1_CHAT_1, + SFX_BIKER_GANG_1_CHAT_2, + SFX_BIKER_GANG_1_CHAT_3, + SFX_BIKER_GANG_1_CHAT_4, + SFX_BIKER_GANG_1_CHAT_5, + SFX_BIKER_GANG_1_CHAT_6, + SFX_BIKER_GANG_1_CHAT_7, + SFX_BIKER_GANG_1_CHAT_8, + SFX_BIKER_GANG_1_CHAT_9, + SFX_BIKER_GANG_1_CHAT_10, + SFX_BIKER_GANG_1_CHAT_11, + SFX_BIKER_GANG_1_CHAT_12, + SFX_BIKER_GANG_1_DODGE_1, + SFX_BIKER_GANG_1_DODGE_2, + SFX_BIKER_GANG_1_DODGE_3, + SFX_BIKER_GANG_1_DODGE_4, + SFX_BIKER_GANG_1_DODGE_5, + SFX_BIKER_GANG_1_DODGE_6, + SFX_BIKER_GANG_1_DODGE_7, + SFX_BIKER_GANG_1_DODGE_8, + SFX_BIKER_GANG_1_DODGE_9, + SFX_BIKER_GANG_1_FIGHT_1, + SFX_BIKER_GANG_1_FIGHT_2, + SFX_BIKER_GANG_1_FIGHT_3, + SFX_BIKER_GANG_1_FIGHT_4, + SFX_BIKER_GANG_1_FIGHT_5, + SFX_BIKER_GANG_1_FIGHT_6, + SFX_BIKER_GANG_1_FIGHT_7, + SFX_BIKER_GANG_1_FIGHT_8, + SFX_BIKER_GANG_1_FIGHT_9, + SFX_BIKER_GANG_1_GENERIC_CRASH_1, + SFX_BIKER_GANG_1_GENERIC_CRASH_2, + SFX_BIKER_GANG_1_GENERIC_CRASH_3, + SFX_BIKER_GANG_1_GENERIC_CRASH_4, + SFX_BIKER_GANG_1_GENERIC_CRASH_5, + SFX_BIKER_GANG_1_GENERIC_CRASH_6, + SFX_BIKER_GANG_1_GENERIC_CRASH_7, + SFX_BIKER_GANG_1_GENERIC_CRASH_8, + SFX_BIKER_GANG_1_GUN_COOL_1, + SFX_BIKER_GANG_1_GUN_COOL_2, + SFX_BIKER_GANG_1_GUN_COOL_3, + SFX_BIKER_GANG_1_GUN_COOL_4, + SFX_BIKER_GANG_1_GUN_COOL_5, + SFX_BIKER_GANG_1_JACKED_1, + SFX_BIKER_GANG_1_JACKED_2, + SFX_BIKER_GANG_1_JACKED_3, + SFX_BIKER_GANG_1_JACKED_4, + SFX_BIKER_GANG_1_JACKED_5, + SFX_BIKER_GANG_1_JACKED_6, + SFX_BIKER_GANG_1_JACKED_7, + SFX_BIKER_GANG_1_JACKED_8, + SFX_BIKER_GANG_1_JACKING_1, + SFX_BIKER_GANG_1_JACKING_2, + SFX_BIKER_GANG_1_JACKING_3, + SFX_BIKER_GANG_1_JACKING_4, + SFX_BIKER_GANG_1_LOST_1, + SFX_BIKER_GANG_1_LOST_2, + SFX_BIKER_GANG_1_MUGGED_1, + SFX_BIKER_GANG_1_MUGGED_2, + SFX_BIKER_GANG_1_SAVED_1, + SFX_BIKER_GANG_1_TAXI_1, + SFX_BIKER_GANG_1_TAXI_2, + + SFX_BIKER_GANG_2_BLOCKED_1, + SFX_BIKER_GANG_2_BLOCKED_2, + SFX_BIKER_GANG_2_BLOCKED_3, + SFX_BIKER_GANG_2_BLOCKED_4, + SFX_BIKER_GANG_2_BLOCKED_5, + SFX_BIKER_GANG_2_BLOCKED_6, + SFX_BIKER_GANG_2_BLOCKED_7, + SFX_BIKER_GANG_2_BLOCKED_8, + SFX_BIKER_GANG_2_BLOCKED_9, + SFX_BIKER_GANG_2_BLOCKED_10, + SFX_BIKER_GANG_2_BUMP_1, + SFX_BIKER_GANG_2_BUMP_2, + SFX_BIKER_GANG_2_BUMP_3, + SFX_BIKER_GANG_2_BUMP_4, + SFX_BIKER_GANG_2_BUMP_5, + SFX_BIKER_GANG_2_BUMP_6, + SFX_BIKER_GANG_2_BUMP_7, + SFX_BIKER_GANG_2_BUMP_8, + SFX_BIKER_GANG_2_BUMP_9, + SFX_BIKER_GANG_2_BUMP_10, + SFX_BIKER_GANG_2_CHAT_1, + SFX_BIKER_GANG_2_CHAT_2, + SFX_BIKER_GANG_2_CHAT_3, + SFX_BIKER_GANG_2_CHAT_4, + SFX_BIKER_GANG_2_CHAT_5, + SFX_BIKER_GANG_2_CHAT_6, + SFX_BIKER_GANG_2_CHAT_7, + SFX_BIKER_GANG_2_CHAT_8, + SFX_BIKER_GANG_2_CHAT_9, + SFX_BIKER_GANG_2_CHAT_10, + SFX_BIKER_GANG_2_CHAT_11, + SFX_BIKER_GANG_2_CHAT_12, + SFX_BIKER_GANG_2_DODGE_1, + SFX_BIKER_GANG_2_DODGE_2, + SFX_BIKER_GANG_2_DODGE_3, + SFX_BIKER_GANG_2_DODGE_4, + SFX_BIKER_GANG_2_DODGE_5, + SFX_BIKER_GANG_2_DODGE_6, + SFX_BIKER_GANG_2_DODGE_7, + SFX_BIKER_GANG_2_DODGE_8, + SFX_BIKER_GANG_2_DODGE_9, + SFX_BIKER_GANG_2_FIGHT_1, + SFX_BIKER_GANG_2_FIGHT_2, + SFX_BIKER_GANG_2_FIGHT_3, + SFX_BIKER_GANG_2_FIGHT_4, + SFX_BIKER_GANG_2_FIGHT_5, + SFX_BIKER_GANG_2_FIGHT_6, + SFX_BIKER_GANG_2_FIGHT_7, + SFX_BIKER_GANG_2_FIGHT_8, + SFX_BIKER_GANG_2_FIGHT_9, + SFX_BIKER_GANG_2_GENERIC_CRASH_1, + SFX_BIKER_GANG_2_GENERIC_CRASH_2, + SFX_BIKER_GANG_2_GENERIC_CRASH_3, + SFX_BIKER_GANG_2_GENERIC_CRASH_4, + SFX_BIKER_GANG_2_GENERIC_CRASH_5, + SFX_BIKER_GANG_2_GENERIC_CRASH_6, + SFX_BIKER_GANG_2_GENERIC_CRASH_7, + SFX_BIKER_GANG_2_GENERIC_CRASH_8, + SFX_BIKER_GANG_2_GUN_COOL_1, + SFX_BIKER_GANG_2_GUN_COOL_2, + SFX_BIKER_GANG_2_GUN_COOL_3, + SFX_BIKER_GANG_2_GUN_COOL_4, + SFX_BIKER_GANG_2_GUN_COOL_5, + SFX_BIKER_GANG_2_JACKED_1, + SFX_BIKER_GANG_2_JACKED_2, + SFX_BIKER_GANG_2_JACKED_3, + SFX_BIKER_GANG_2_JACKED_4, + SFX_BIKER_GANG_2_JACKED_5, + SFX_BIKER_GANG_2_JACKED_6, + SFX_BIKER_GANG_2_JACKED_7, + SFX_BIKER_GANG_2_JACKED_8, + SFX_BIKER_GANG_2_JACKING_1, + SFX_BIKER_GANG_2_JACKING_2, + SFX_BIKER_GANG_2_JACKING_3, + SFX_BIKER_GANG_2_JACKING_4, + SFX_BIKER_GANG_2_LOST_1, + SFX_BIKER_GANG_2_LOST_2, + SFX_BIKER_GANG_2_MUGGED_1, + SFX_BIKER_GANG_2_MUGGED_2, + SFX_BIKER_GANG_2_SAVED_1, + SFX_BIKER_GANG_2_TAXI_1, + SFX_BIKER_GANG_2_TAXI_2, + + SFX_BIKER_GANG_3_BLOCKED_1, + SFX_BIKER_GANG_3_BLOCKED_2, + SFX_BIKER_GANG_3_BLOCKED_3, + SFX_BIKER_GANG_3_BLOCKED_4, + SFX_BIKER_GANG_3_BLOCKED_5, + SFX_BIKER_GANG_3_BLOCKED_6, + SFX_BIKER_GANG_3_BLOCKED_7, + SFX_BIKER_GANG_3_BLOCKED_8, + SFX_BIKER_GANG_3_BLOCKED_9, + SFX_BIKER_GANG_3_BLOCKED_10, + SFX_BIKER_GANG_3_BUMP_1, + SFX_BIKER_GANG_3_BUMP_2, + SFX_BIKER_GANG_3_BUMP_3, + SFX_BIKER_GANG_3_BUMP_4, + SFX_BIKER_GANG_3_BUMP_5, + SFX_BIKER_GANG_3_BUMP_6, + SFX_BIKER_GANG_3_BUMP_7, + SFX_BIKER_GANG_3_BUMP_8, + SFX_BIKER_GANG_3_BUMP_9, + SFX_BIKER_GANG_3_BUMP_10, + SFX_BIKER_GANG_3_CHAT_1, + SFX_BIKER_GANG_3_CHAT_2, + SFX_BIKER_GANG_3_CHAT_3, + SFX_BIKER_GANG_3_CHAT_4, + SFX_BIKER_GANG_3_CHAT_5, + SFX_BIKER_GANG_3_CHAT_6, + SFX_BIKER_GANG_3_CHAT_7, + SFX_BIKER_GANG_3_CHAT_8, + SFX_BIKER_GANG_3_CHAT_9, + SFX_BIKER_GANG_3_CHAT_10, + SFX_BIKER_GANG_3_CHAT_11, + SFX_BIKER_GANG_3_CHAT_12, + SFX_BIKER_GANG_3_DODGE_1, + SFX_BIKER_GANG_3_DODGE_2, + SFX_BIKER_GANG_3_DODGE_3, + SFX_BIKER_GANG_3_DODGE_4, + SFX_BIKER_GANG_3_DODGE_5, + SFX_BIKER_GANG_3_DODGE_6, + SFX_BIKER_GANG_3_DODGE_7, + SFX_BIKER_GANG_3_DODGE_8, + SFX_BIKER_GANG_3_DODGE_9, + SFX_BIKER_GANG_3_FIGHT_1, + SFX_BIKER_GANG_3_FIGHT_2, + SFX_BIKER_GANG_3_FIGHT_3, + SFX_BIKER_GANG_3_FIGHT_4, + SFX_BIKER_GANG_3_FIGHT_5, + SFX_BIKER_GANG_3_FIGHT_6, + SFX_BIKER_GANG_3_FIGHT_7, + SFX_BIKER_GANG_3_FIGHT_8, + SFX_BIKER_GANG_3_FIGHT_9, + SFX_BIKER_GANG_3_GENERIC_CRASH_1, + SFX_BIKER_GANG_3_GENERIC_CRASH_2, + SFX_BIKER_GANG_3_GENERIC_CRASH_3, + SFX_BIKER_GANG_3_GENERIC_CRASH_4, + SFX_BIKER_GANG_3_GENERIC_CRASH_5, + SFX_BIKER_GANG_3_GENERIC_CRASH_6, + SFX_BIKER_GANG_3_GENERIC_CRASH_7, + SFX_BIKER_GANG_3_GENERIC_CRASH_8, + SFX_BIKER_GANG_3_GUN_COOL_1, + SFX_BIKER_GANG_3_GUN_COOL_2, + SFX_BIKER_GANG_3_GUN_COOL_3, + SFX_BIKER_GANG_3_GUN_COOL_4, + SFX_BIKER_GANG_3_GUN_COOL_5, + SFX_BIKER_GANG_3_JACKED_1, + SFX_BIKER_GANG_3_JACKED_2, + SFX_BIKER_GANG_3_JACKED_3, + SFX_BIKER_GANG_3_JACKED_4, + SFX_BIKER_GANG_3_JACKED_5, + SFX_BIKER_GANG_3_JACKED_6, + SFX_BIKER_GANG_3_JACKED_7, + SFX_BIKER_GANG_3_JACKED_8, + SFX_BIKER_GANG_3_JACKING_1, + SFX_BIKER_GANG_3_JACKING_2, + SFX_BIKER_GANG_3_JACKING_3, + SFX_BIKER_GANG_3_JACKING_4, + SFX_BIKER_GANG_3_LOST_1, + SFX_BIKER_GANG_3_LOST_2, + SFX_BIKER_GANG_3_MUGGED_1, + SFX_BIKER_GANG_3_MUGGED_2, + SFX_BIKER_GANG_3_SAVED_1, + SFX_BIKER_GANG_3_TAXI_1, + SFX_BIKER_GANG_3_TAXI_2, + + SFX_HAITIAN_GANG_1_BLOCKED_1, + SFX_HAITIAN_GANG_1_BLOCKED_2, + SFX_HAITIAN_GANG_1_BLOCKED_3, + SFX_HAITIAN_GANG_1_BLOCKED_4, + SFX_HAITIAN_GANG_1_BLOCKED_5, + SFX_HAITIAN_GANG_1_BLOCKED_6, + SFX_HAITIAN_GANG_1_BLOCKED_7, + SFX_HAITIAN_GANG_1_BLOCKED_8, + SFX_HAITIAN_GANG_1_BLOCKED_9, + SFX_HAITIAN_GANG_1_BUMP_1, + SFX_HAITIAN_GANG_1_BUMP_2, + SFX_HAITIAN_GANG_1_BUMP_3, + SFX_HAITIAN_GANG_1_BUMP_4, + SFX_HAITIAN_GANG_1_BUMP_5, + SFX_HAITIAN_GANG_1_BUMP_6, + SFX_HAITIAN_GANG_1_BUMP_7, + SFX_HAITIAN_GANG_1_BUMP_8, + SFX_HAITIAN_GANG_1_BUMP_9, + SFX_HAITIAN_GANG_1_BUMP_10, + SFX_HAITIAN_GANG_1_BUMP_11, + SFX_HAITIAN_GANG_1_BUMP_12, + SFX_HAITIAN_GANG_1_CAR_CRASH_1, + SFX_HAITIAN_GANG_1_CAR_CRASH_2, + SFX_HAITIAN_GANG_1_CAR_CRASH_3, + SFX_HAITIAN_GANG_1_CAR_CRASH_4, + SFX_HAITIAN_GANG_1_CAR_CRASH_5, + SFX_HAITIAN_GANG_1_CAR_CRASH_6, + SFX_HAITIAN_GANG_1_CAR_CRASH_7, + SFX_HAITIAN_GANG_1_CAR_CRASH_8, + SFX_HAITIAN_GANG_1_CAR_CRASH_9, + SFX_HAITIAN_GANG_1_CHAT_1, + SFX_HAITIAN_GANG_1_CHAT_2, + SFX_HAITIAN_GANG_1_CHAT_3, + SFX_HAITIAN_GANG_1_CHAT_4, + SFX_HAITIAN_GANG_1_CHAT_5, + SFX_HAITIAN_GANG_1_CHAT_6, + SFX_HAITIAN_GANG_1_CHAT_7, + SFX_HAITIAN_GANG_1_CHAT_8, + SFX_HAITIAN_GANG_1_CHAT_9, + SFX_HAITIAN_GANG_1_CHAT_10, + SFX_HAITIAN_GANG_1_CHAT_11, + SFX_HAITIAN_GANG_1_CHAT_12, + SFX_HAITIAN_GANG_1_CHAT_13, + SFX_HAITIAN_GANG_1_CHAT_14, + SFX_HAITIAN_GANG_1_DODGE_1, + SFX_HAITIAN_GANG_1_DODGE_2, + SFX_HAITIAN_GANG_1_DODGE_3, + SFX_HAITIAN_GANG_1_DODGE_4, + SFX_HAITIAN_GANG_1_DODGE_5, + SFX_HAITIAN_GANG_1_DODGE_6, + SFX_HAITIAN_GANG_1_DODGE_7, + SFX_HAITIAN_GANG_1_DODGE_8, + SFX_HAITIAN_GANG_1_DODGE_9, + SFX_HAITIAN_GANG_1_DODGE_10, + SFX_HAITIAN_GANG_1_EYEING_1, + SFX_HAITIAN_GANG_1_EYEING_2, + SFX_HAITIAN_GANG_1_FIGHT_1, + SFX_HAITIAN_GANG_1_FIGHT_2, + SFX_HAITIAN_GANG_1_FIGHT_3, + SFX_HAITIAN_GANG_1_FIGHT_4, + SFX_HAITIAN_GANG_1_FIGHT_5, + SFX_HAITIAN_GANG_1_FIGHT_6, + SFX_HAITIAN_GANG_1_FIGHT_7, + SFX_HAITIAN_GANG_1_FIGHT_8, + SFX_HAITIAN_GANG_1_FIGHT_9, + SFX_HAITIAN_GANG_1_FIGHT_10, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_1, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_2, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_3, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_4, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_5, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_6, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_7, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_8, + SFX_HAITIAN_GANG_1_GENERIC_CRASH_9, + SFX_HAITIAN_GANG_1_GUN_COOL_1, + SFX_HAITIAN_GANG_1_GUN_COOL_2, + SFX_HAITIAN_GANG_1_GUN_COOL_3, + SFX_HAITIAN_GANG_1_GUN_COOL_4, + SFX_HAITIAN_GANG_1_GUN_COOL_5, + SFX_HAITIAN_GANG_1_JACKED_1, + SFX_HAITIAN_GANG_1_JACKED_2, + SFX_HAITIAN_GANG_1_JACKED_3, + SFX_HAITIAN_GANG_1_JACKED_4, + SFX_HAITIAN_GANG_1_JACKED_5, + SFX_HAITIAN_GANG_1_JACKED_6, + SFX_HAITIAN_GANG_1_JACKING_1, + SFX_HAITIAN_GANG_1_JACKING_2, + SFX_HAITIAN_GANG_1_JACKING_3, + SFX_HAITIAN_GANG_1_JACKING_4, + SFX_HAITIAN_GANG_1_LOST_1, + SFX_HAITIAN_GANG_1_LOST_2, + SFX_HAITIAN_GANG_1_LOST_3, + SFX_HAITIAN_GANG_1_LOST_4, + SFX_HAITIAN_GANG_1_MUGGED_1, + SFX_HAITIAN_GANG_1_MUGGED_2, + SFX_HAITIAN_GANG_1_MUGGED_3, + SFX_HAITIAN_GANG_1_SAVED_1, + SFX_HAITIAN_GANG_1_TAXI_1, + + + SFX_HAITIAN_GANG_2_BLOCKED_1, + SFX_HAITIAN_GANG_2_BLOCKED_2, + SFX_HAITIAN_GANG_2_BLOCKED_3, + SFX_HAITIAN_GANG_2_BLOCKED_4, + SFX_HAITIAN_GANG_2_BLOCKED_5, + SFX_HAITIAN_GANG_2_BLOCKED_6, + SFX_HAITIAN_GANG_2_BLOCKED_7, + SFX_HAITIAN_GANG_2_BLOCKED_8, + SFX_HAITIAN_GANG_2_BLOCKED_9, + SFX_HAITIAN_GANG_2_BUMP_1, + SFX_HAITIAN_GANG_2_BUMP_2, + SFX_HAITIAN_GANG_2_BUMP_3, + SFX_HAITIAN_GANG_2_BUMP_4, + SFX_HAITIAN_GANG_2_BUMP_5, + SFX_HAITIAN_GANG_2_BUMP_6, + SFX_HAITIAN_GANG_2_BUMP_7, + SFX_HAITIAN_GANG_2_BUMP_8, + SFX_HAITIAN_GANG_2_BUMP_9, + SFX_HAITIAN_GANG_2_BUMP_10, + SFX_HAITIAN_GANG_2_BUMP_11, + SFX_HAITIAN_GANG_2_BUMP_12, + SFX_HAITIAN_GANG_2_CAR_CRASH_1, + SFX_HAITIAN_GANG_2_CAR_CRASH_2, + SFX_HAITIAN_GANG_2_CAR_CRASH_3, + SFX_HAITIAN_GANG_2_CAR_CRASH_4, + SFX_HAITIAN_GANG_2_CAR_CRASH_5, + SFX_HAITIAN_GANG_2_CAR_CRASH_6, + SFX_HAITIAN_GANG_2_CAR_CRASH_7, + SFX_HAITIAN_GANG_2_CAR_CRASH_8, + SFX_HAITIAN_GANG_2_CAR_CRASH_9, + SFX_HAITIAN_GANG_2_CHAT_1, + SFX_HAITIAN_GANG_2_CHAT_2, + SFX_HAITIAN_GANG_2_CHAT_3, + SFX_HAITIAN_GANG_2_CHAT_4, + SFX_HAITIAN_GANG_2_CHAT_5, + SFX_HAITIAN_GANG_2_CHAT_6, + SFX_HAITIAN_GANG_2_CHAT_7, + SFX_HAITIAN_GANG_2_CHAT_8, + SFX_HAITIAN_GANG_2_CHAT_9, + SFX_HAITIAN_GANG_2_CHAT_10, + SFX_HAITIAN_GANG_2_CHAT_11, + SFX_HAITIAN_GANG_2_CHAT_12, + SFX_HAITIAN_GANG_2_CHAT_13, + SFX_HAITIAN_GANG_2_CHAT_14, + SFX_HAITIAN_GANG_2_DODGE_1, + SFX_HAITIAN_GANG_2_DODGE_2, + SFX_HAITIAN_GANG_2_DODGE_3, + SFX_HAITIAN_GANG_2_DODGE_4, + SFX_HAITIAN_GANG_2_DODGE_5, + SFX_HAITIAN_GANG_2_DODGE_6, + SFX_HAITIAN_GANG_2_DODGE_7, + SFX_HAITIAN_GANG_2_DODGE_8, + SFX_HAITIAN_GANG_2_DODGE_9, + SFX_HAITIAN_GANG_2_DODGE_10, + SFX_HAITIAN_GANG_2_EYEING_1, + SFX_HAITIAN_GANG_2_EYEING_2, + SFX_HAITIAN_GANG_2_FIGHT_1, + SFX_HAITIAN_GANG_2_FIGHT_2, + SFX_HAITIAN_GANG_2_FIGHT_3, + SFX_HAITIAN_GANG_2_FIGHT_4, + SFX_HAITIAN_GANG_2_FIGHT_5, + SFX_HAITIAN_GANG_2_FIGHT_6, + SFX_HAITIAN_GANG_2_FIGHT_7, + SFX_HAITIAN_GANG_2_FIGHT_8, + SFX_HAITIAN_GANG_2_FIGHT_9, + SFX_HAITIAN_GANG_2_FIGHT_10, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_1, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_2, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_3, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_4, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_5, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_6, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_7, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_8, + SFX_HAITIAN_GANG_2_GENERIC_CRASH_9, + SFX_HAITIAN_GANG_2_GUN_COOL_1, + SFX_HAITIAN_GANG_2_GUN_COOL_2, + SFX_HAITIAN_GANG_2_GUN_COOL_3, + SFX_HAITIAN_GANG_2_GUN_COOL_4, + SFX_HAITIAN_GANG_2_GUN_COOL_5, + SFX_HAITIAN_GANG_2_JACKED_1, + SFX_HAITIAN_GANG_2_JACKED_2, + SFX_HAITIAN_GANG_2_JACKED_3, + SFX_HAITIAN_GANG_2_JACKED_4, + SFX_HAITIAN_GANG_2_JACKED_5, + SFX_HAITIAN_GANG_2_JACKED_6, + SFX_HAITIAN_GANG_2_JACKING_1, + SFX_HAITIAN_GANG_2_JACKING_2, + SFX_HAITIAN_GANG_2_JACKING_3, + SFX_HAITIAN_GANG_2_JACKING_4, + SFX_HAITIAN_GANG_2_LOST_1, + SFX_HAITIAN_GANG_2_LOST_2, + SFX_HAITIAN_GANG_2_LOST_3, + SFX_HAITIAN_GANG_2_LOST_4, + SFX_HAITIAN_GANG_2_MUGGED_1, + SFX_HAITIAN_GANG_2_MUGGED_2, + SFX_HAITIAN_GANG_2_MUGGED_3, + SFX_HAITIAN_GANG_2_SAVED_1, + SFX_HAITIAN_GANG_2_TAXI_1, + + SFX_HAITIAN_GANG_3_BLOCKED_1, + SFX_HAITIAN_GANG_3_BLOCKED_2, + SFX_HAITIAN_GANG_3_BLOCKED_3, + SFX_HAITIAN_GANG_3_BLOCKED_4, + SFX_HAITIAN_GANG_3_BLOCKED_5, + SFX_HAITIAN_GANG_3_BLOCKED_6, + SFX_HAITIAN_GANG_3_BLOCKED_7, + SFX_HAITIAN_GANG_3_BLOCKED_8, + SFX_HAITIAN_GANG_3_BLOCKED_9, + SFX_HAITIAN_GANG_3_BUMP_1, + SFX_HAITIAN_GANG_3_BUMP_2, + SFX_HAITIAN_GANG_3_BUMP_3, + SFX_HAITIAN_GANG_3_BUMP_4, + SFX_HAITIAN_GANG_3_BUMP_5, + SFX_HAITIAN_GANG_3_BUMP_6, + SFX_HAITIAN_GANG_3_BUMP_7, + SFX_HAITIAN_GANG_3_BUMP_8, + SFX_HAITIAN_GANG_3_BUMP_9, + SFX_HAITIAN_GANG_3_BUMP_10, + SFX_HAITIAN_GANG_3_BUMP_11, + SFX_HAITIAN_GANG_3_BUMP_12, + SFX_HAITIAN_GANG_3_CAR_CRASH_1, + SFX_HAITIAN_GANG_3_CAR_CRASH_2, + SFX_HAITIAN_GANG_3_CAR_CRASH_3, + SFX_HAITIAN_GANG_3_CAR_CRASH_4, + SFX_HAITIAN_GANG_3_CAR_CRASH_5, + SFX_HAITIAN_GANG_3_CAR_CRASH_6, + SFX_HAITIAN_GANG_3_CAR_CRASH_7, + SFX_HAITIAN_GANG_3_CAR_CRASH_8, + SFX_HAITIAN_GANG_3_CAR_CRASH_9, + SFX_HAITIAN_GANG_3_CHAT_1, + SFX_HAITIAN_GANG_3_CHAT_2, + SFX_HAITIAN_GANG_3_CHAT_3, + SFX_HAITIAN_GANG_3_CHAT_4, + SFX_HAITIAN_GANG_3_CHAT_5, + SFX_HAITIAN_GANG_3_CHAT_6, + SFX_HAITIAN_GANG_3_CHAT_7, + SFX_HAITIAN_GANG_3_CHAT_8, + SFX_HAITIAN_GANG_3_CHAT_9, + SFX_HAITIAN_GANG_3_CHAT_10, + SFX_HAITIAN_GANG_3_CHAT_11, + SFX_HAITIAN_GANG_3_CHAT_12, + SFX_HAITIAN_GANG_3_CHAT_13, + SFX_HAITIAN_GANG_3_CHAT_14, + SFX_HAITIAN_GANG_3_DODGE_1, + SFX_HAITIAN_GANG_3_DODGE_2, + SFX_HAITIAN_GANG_3_DODGE_3, + SFX_HAITIAN_GANG_3_DODGE_4, + SFX_HAITIAN_GANG_3_DODGE_5, + SFX_HAITIAN_GANG_3_DODGE_6, + SFX_HAITIAN_GANG_3_DODGE_7, + SFX_HAITIAN_GANG_3_DODGE_8, + SFX_HAITIAN_GANG_3_DODGE_9, + SFX_HAITIAN_GANG_3_DODGE_10, + SFX_HAITIAN_GANG_3_EYEING_1, + SFX_HAITIAN_GANG_3_EYEING_2, + SFX_HAITIAN_GANG_3_FIGHT_1, + SFX_HAITIAN_GANG_3_FIGHT_2, + SFX_HAITIAN_GANG_3_FIGHT_3, + SFX_HAITIAN_GANG_3_FIGHT_4, + SFX_HAITIAN_GANG_3_FIGHT_5, + SFX_HAITIAN_GANG_3_FIGHT_6, + SFX_HAITIAN_GANG_3_FIGHT_7, + SFX_HAITIAN_GANG_3_FIGHT_8, + SFX_HAITIAN_GANG_3_FIGHT_9, + SFX_HAITIAN_GANG_3_FIGHT_10, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_1, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_2, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_3, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_4, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_5, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_6, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_7, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_8, + SFX_HAITIAN_GANG_3_GENERIC_CRASH_9, + SFX_HAITIAN_GANG_3_GUN_COOL_1, + SFX_HAITIAN_GANG_3_GUN_COOL_2, + SFX_HAITIAN_GANG_3_GUN_COOL_3, + SFX_HAITIAN_GANG_3_GUN_COOL_4, + SFX_HAITIAN_GANG_3_GUN_COOL_5, + SFX_HAITIAN_GANG_3_JACKED_1, + SFX_HAITIAN_GANG_3_JACKED_2, + SFX_HAITIAN_GANG_3_JACKED_3, + SFX_HAITIAN_GANG_3_JACKED_4, + SFX_HAITIAN_GANG_3_JACKED_5, + SFX_HAITIAN_GANG_3_JACKED_6, + SFX_HAITIAN_GANG_3_JACKING_1, + SFX_HAITIAN_GANG_3_JACKING_2, + SFX_HAITIAN_GANG_3_JACKING_3, + SFX_HAITIAN_GANG_3_JACKING_4, + SFX_HAITIAN_GANG_3_LOST_1, + SFX_HAITIAN_GANG_3_LOST_2, + SFX_HAITIAN_GANG_3_LOST_3, + SFX_HAITIAN_GANG_3_LOST_4, + SFX_HAITIAN_GANG_3_MUGGED_1, + SFX_HAITIAN_GANG_3_MUGGED_2, + SFX_HAITIAN_GANG_3_MUGGED_3, + SFX_HAITIAN_GANG_3_SAVED_1, + SFX_HAITIAN_GANG_3_TAXI_1, + + SFX_GENERIC_FEMALE_FIRE_1, + SFX_GENERIC_FEMALE_FIRE_2, + SFX_GENERIC_FEMALE_FIRE_3, + SFX_GENERIC_FEMALE_FIRE_4, + SFX_GENERIC_FEMALE_FIRE_5, + SFX_GENERIC_FEMALE_FIRE_6, + SFX_GENERIC_FEMALE_FIRE_7, + SFX_GENERIC_FEMALE_FIRE_8, + SFX_GENERIC_FEMALE_FIRE_9, + SFX_GENERIC_FEMALE_FIRE_10, + SFX_GENERIC_FEMALE_FIRE_11, + SFX_GENERIC_FEMALE_FIRE_12, + SFX_GENERIC_FEMALE_FIRE_13, + SFX_GENERIC_FEMALE_FIRE_14, + SFX_GENERIC_FEMALE_FIRE_15, + SFX_GENERIC_FEMALE_FIRE_16, + SFX_GENERIC_FEMALE_FIRE_17, + SFX_GENERIC_FEMALE_DEATH_1, + SFX_GENERIC_FEMALE_DEATH_2, + SFX_GENERIC_FEMALE_DEATH_3, + SFX_GENERIC_FEMALE_DEATH_4, + SFX_GENERIC_FEMALE_DEATH_5, + SFX_GENERIC_FEMALE_DEATH_6, + SFX_GENERIC_FEMALE_DEATH_7, + SFX_GENERIC_FEMALE_DEATH_8, + SFX_GENERIC_FEMALE_DEATH_9, + SFX_GENERIC_FEMALE_DEATH_10, + SFX_GENERIC_FEMALE_DEATH_11, + SFX_GENERIC_FEMALE_DEATH_12, + SFX_GENERIC_FEMALE_DEATH_13, + SFX_GENERIC_FEMALE_DEATH_14, + SFX_GENERIC_FEMALE_DEATH_15, + SFX_GENERIC_FEMALE_DEATH_16, + SFX_GENERIC_FEMALE_DEATH_17, + SFX_GENERIC_FEMALE_DEATH_18, + SFX_GENERIC_FEMALE_DEATH_19, + SFX_GENERIC_FEMALE_DEATH_20, + SFX_GENERIC_FEMALE_DEATH_21, + SFX_GENERIC_FEMALE_DEATH_22, + SFX_GENERIC_FEMALE_GRUNT_1, + SFX_GENERIC_FEMALE_GRUNT_2, + SFX_GENERIC_FEMALE_GRUNT_3, + SFX_GENERIC_FEMALE_GRUNT_4, + SFX_GENERIC_FEMALE_GRUNT_5, + SFX_GENERIC_FEMALE_GRUNT_6, + SFX_GENERIC_FEMALE_GRUNT_7, + SFX_GENERIC_FEMALE_GRUNT_8, + SFX_GENERIC_FEMALE_GRUNT_9, + SFX_GENERIC_FEMALE_GRUNT_10, + SFX_GENERIC_FEMALE_GRUNT_11, + SFX_GENERIC_FEMALE_GRUNT_12, + SFX_GENERIC_FEMALE_GRUNT_13, + SFX_GENERIC_FEMALE_GRUNT_14, + SFX_GENERIC_FEMALE_GRUNT_15, + SFX_GENERIC_FEMALE_GRUNT_16, + SFX_GENERIC_FEMALE_GRUNT_17, + SFX_GENERIC_FEMALE_GRUNT_18, + SFX_GENERIC_FEMALE_GRUNT_19, + SFX_GENERIC_FEMALE_GRUNT_20, + SFX_GENERIC_FEMALE_GRUNT_21, + SFX_GENERIC_FEMALE_GRUNT_22, + SFX_GENERIC_FEMALE_GRUNT_23, + SFX_GENERIC_FEMALE_GRUNT_24, + SFX_GENERIC_FEMALE_GRUNT_25, + SFX_GENERIC_FEMALE_GRUNT_26, + SFX_GENERIC_FEMALE_GRUNT_27, + SFX_GENERIC_FEMALE_GRUNT_28, + SFX_GENERIC_FEMALE_GRUNT_29, + SFX_GENERIC_FEMALE_GRUNT_30, + SFX_GENERIC_FEMALE_GRUNT_31, + SFX_GENERIC_FEMALE_GRUNT_32, + SFX_GENERIC_FEMALE_GRUNT_33, + SFX_GENERIC_FEMALE_PANIC_1, + SFX_GENERIC_FEMALE_PANIC_2, + SFX_GENERIC_FEMALE_PANIC_3, + SFX_GENERIC_FEMALE_PANIC_4, + SFX_GENERIC_FEMALE_PANIC_5, + SFX_GENERIC_FEMALE_PANIC_6, + SFX_GENERIC_FEMALE_PANIC_7, + SFX_GENERIC_FEMALE_PANIC_8, + SFX_GENERIC_FEMALE_PANIC_9, + SFX_GENERIC_FEMALE_PANIC_10, + SFX_GENERIC_FEMALE_PANIC_11, + SFX_GENERIC_FEMALE_PANIC_12, + SFX_GENERIC_FEMALE_PANIC_13, + SFX_GENERIC_FEMALE_PANIC_14, + SFX_GENERIC_FEMALE_PANIC_15, + SFX_GENERIC_FEMALE_PANIC_16, + SFX_GENERIC_FEMALE_PANIC_17, + SFX_GENERIC_FEMALE_PANIC_18, + SFX_GENERIC_FEMALE_PANIC_19, + SFX_GENERIC_FEMALE_PANIC_20, + SFX_GENERIC_FEMALE_PANIC_21, + SFX_GENERIC_FEMALE_PANIC_22, + SFX_GENERIC_FEMALE_PANIC_23, + SFX_GENERIC_FEMALE_PANIC_24, + SFX_GENERIC_FEMALE_PANIC_25, + SFX_GENERIC_FEMALE_PANIC_26, + SFX_GENERIC_FEMALE_PANIC_27, + + SFX_GENERIC_MALE_FIRE_1, + SFX_GENERIC_MALE_FIRE_2, + SFX_GENERIC_MALE_FIRE_3, + SFX_GENERIC_MALE_FIRE_4, + SFX_GENERIC_MALE_FIRE_5, + SFX_GENERIC_MALE_FIRE_6, + SFX_GENERIC_MALE_FIRE_7, + SFX_GENERIC_MALE_FIRE_8, + SFX_GENERIC_MALE_FIRE_9, + SFX_GENERIC_MALE_FIRE_10, + SFX_GENERIC_MALE_FIRE_11, + SFX_GENERIC_MALE_FIRE_12, + SFX_GENERIC_MALE_FIRE_13, + SFX_GENERIC_MALE_FIRE_14, + SFX_GENERIC_MALE_FIRE_15, + SFX_GENERIC_MALE_FIRE_16, + SFX_GENERIC_MALE_FIRE_17, + SFX_GENERIC_MALE_FIRE_18, + SFX_GENERIC_MALE_FIRE_19, + SFX_GENERIC_MALE_FIRE_20, + SFX_GENERIC_MALE_FIRE_21, + SFX_GENERIC_MALE_FIRE_22, + SFX_GENERIC_MALE_FIRE_23, + SFX_GENERIC_MALE_FIRE_24, + SFX_GENERIC_MALE_FIRE_25, + SFX_GENERIC_MALE_FIRE_26, + SFX_GENERIC_MALE_FIRE_27, + SFX_GENERIC_MALE_FIRE_28, + SFX_GENERIC_MALE_FIRE_29, + SFX_GENERIC_MALE_FIRE_30, + SFX_GENERIC_MALE_FIRE_31, + SFX_GENERIC_MALE_FIRE_32, + SFX_GENERIC_MALE_DEATH_1, + SFX_GENERIC_MALE_DEATH_2, + SFX_GENERIC_MALE_DEATH_3, + SFX_GENERIC_MALE_DEATH_4, + SFX_GENERIC_MALE_DEATH_5, + SFX_GENERIC_MALE_DEATH_6, + SFX_GENERIC_MALE_DEATH_7, + SFX_GENERIC_MALE_DEATH_8, + SFX_GENERIC_MALE_DEATH_9, + SFX_GENERIC_MALE_DEATH_10, + SFX_GENERIC_MALE_DEATH_11, + SFX_GENERIC_MALE_DEATH_12, + SFX_GENERIC_MALE_DEATH_13, + SFX_GENERIC_MALE_DEATH_14, + SFX_GENERIC_MALE_DEATH_15, + SFX_GENERIC_MALE_DEATH_16, + SFX_GENERIC_MALE_DEATH_17, + SFX_GENERIC_MALE_DEATH_18, + SFX_GENERIC_MALE_DEATH_19, + SFX_GENERIC_MALE_DEATH_20, + SFX_GENERIC_MALE_DEATH_21, + SFX_GENERIC_MALE_DEATH_22, + SFX_GENERIC_MALE_DEATH_23, + SFX_GENERIC_MALE_DEATH_24, + SFX_GENERIC_MALE_DEATH_25, + SFX_GENERIC_MALE_DEATH_26, + SFX_GENERIC_MALE_DEATH_27, + SFX_GENERIC_MALE_DEATH_28, + SFX_GENERIC_MALE_DEATH_29, + SFX_GENERIC_MALE_DEATH_30, + SFX_GENERIC_MALE_DEATH_31, + SFX_GENERIC_MALE_DEATH_32, + SFX_GENERIC_MALE_DEATH_33, + SFX_GENERIC_MALE_DEATH_34, + SFX_GENERIC_MALE_DEATH_35, + SFX_GENERIC_MALE_DEATH_36, + SFX_GENERIC_MALE_DEATH_37, + SFX_GENERIC_MALE_DEATH_38, + SFX_GENERIC_MALE_DEATH_39, + SFX_GENERIC_MALE_DEATH_40, + SFX_GENERIC_MALE_DEATH_41, + SFX_GENERIC_MALE_GRUNT_1, + SFX_GENERIC_MALE_GRUNT_2, + SFX_GENERIC_MALE_GRUNT_3, + SFX_GENERIC_MALE_GRUNT_4, + SFX_GENERIC_MALE_GRUNT_5, + SFX_GENERIC_MALE_GRUNT_6, + SFX_GENERIC_MALE_GRUNT_7, + SFX_GENERIC_MALE_GRUNT_8, + SFX_GENERIC_MALE_GRUNT_9, + SFX_GENERIC_MALE_GRUNT_10, + SFX_GENERIC_MALE_GRUNT_11, + SFX_GENERIC_MALE_GRUNT_12, + SFX_GENERIC_MALE_GRUNT_13, + SFX_GENERIC_MALE_GRUNT_14, + SFX_GENERIC_MALE_GRUNT_15, + SFX_GENERIC_MALE_GRUNT_16, + SFX_GENERIC_MALE_GRUNT_17, + SFX_GENERIC_MALE_GRUNT_18, + SFX_GENERIC_MALE_GRUNT_19, + SFX_GENERIC_MALE_GRUNT_20, + SFX_GENERIC_MALE_GRUNT_21, + SFX_GENERIC_MALE_GRUNT_22, + SFX_GENERIC_MALE_GRUNT_23, + SFX_GENERIC_MALE_GRUNT_24, + SFX_GENERIC_MALE_GRUNT_25, + SFX_GENERIC_MALE_GRUNT_26, + SFX_GENERIC_MALE_GRUNT_27, + SFX_GENERIC_MALE_GRUNT_28, + SFX_GENERIC_MALE_GRUNT_29, + SFX_GENERIC_MALE_GRUNT_30, + SFX_GENERIC_MALE_GRUNT_31, + SFX_GENERIC_MALE_GRUNT_32, + SFX_GENERIC_MALE_GRUNT_33, + SFX_GENERIC_MALE_GRUNT_34, + SFX_GENERIC_MALE_GRUNT_35, + SFX_GENERIC_MALE_GRUNT_36, + SFX_GENERIC_MALE_GRUNT_37, + SFX_GENERIC_MALE_GRUNT_38, + SFX_GENERIC_MALE_GRUNT_39, + SFX_GENERIC_MALE_GRUNT_40, + SFX_GENERIC_MALE_GRUNT_41, + SFX_GENERIC_MALE_PANIC_1, + SFX_GENERIC_MALE_PANIC_2, + SFX_GENERIC_MALE_PANIC_3, + SFX_GENERIC_MALE_PANIC_4, + SFX_GENERIC_MALE_PANIC_5, + SFX_GENERIC_MALE_PANIC_6, + SFX_GENERIC_MALE_PANIC_7, + SFX_GENERIC_MALE_PANIC_8, + SFX_GENERIC_MALE_PANIC_9, + SFX_GENERIC_MALE_PANIC_10, + SFX_GENERIC_MALE_PANIC_11, + SFX_GENERIC_MALE_PANIC_12, + SFX_GENERIC_MALE_PANIC_13, + SFX_GENERIC_MALE_PANIC_14, + SFX_GENERIC_MALE_PANIC_15, + SFX_GENERIC_MALE_PANIC_16, + SFX_GENERIC_MALE_PANIC_17, + SFX_GENERIC_MALE_PANIC_18, + SFX_GENERIC_MALE_PANIC_19, + SFX_GENERIC_MALE_PANIC_20, + SFX_GENERIC_MALE_PANIC_21, + SFX_GENERIC_MALE_PANIC_22, + SFX_GENERIC_MALE_PANIC_23, + SFX_GENERIC_MALE_PANIC_24, + SFX_GENERIC_MALE_PANIC_25, + SFX_GENERIC_MALE_PANIC_26, + SFX_GENERIC_MALE_PANIC_27, + SFX_GENERIC_MALE_PANIC_28, + SFX_GENERIC_MALE_PANIC_29, + SFX_GENERIC_MALE_PANIC_30, + SFX_GENERIC_MALE_PANIC_31, + SFX_GENERIC_MALE_PANIC_32, + SFX_GENERIC_MALE_PANIC_33, + SFX_GENERIC_MALE_PANIC_34, + SFX_GENERIC_MALE_PANIC_35, + + SFX_MEDIC_VOICE_1_FIGHT_1, + SFX_MEDIC_VOICE_1_FIGHT_2, + SFX_MEDIC_VOICE_1_FIGHT_3, + SFX_MEDIC_VOICE_1_FIGHT_4, + SFX_MEDIC_VOICE_1_FIGHT_5, + SFX_MEDIC_VOICE_1_FIGHT_6, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_1, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_2, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_3, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_4, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_5, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_6, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_7, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_8, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_9, + SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_10, + SFX_MEDIC_VOICE_1_AT_VICTIM_1, + SFX_MEDIC_VOICE_1_AT_VICTIM_2, + SFX_MEDIC_VOICE_1_AT_VICTIM_3, + SFX_MEDIC_VOICE_1_AT_VICTIM_4, + SFX_MEDIC_VOICE_1_AT_VICTIM_5, + SFX_MEDIC_VOICE_1_AT_VICTIM_6, + SFX_MEDIC_VOICE_1_AT_VICTIM_7, + SFX_MEDIC_VOICE_1_AT_VICTIM_8, + SFX_MEDIC_VOICE_1_AT_VICTIM_9, + SFX_MEDIC_VOICE_1_AT_VICTIM_10, + SFX_MEDIC_VOICE_1_AT_VICTIM_11, + SFX_MEDIC_VOICE_1_AT_VICTIM_12, + SFX_MEDIC_VOICE_1_AT_VICTIM_13, + SFX_MEDIC_VOICE_1_AT_VICTIM_14, + SFX_MEDIC_VOICE_1_AT_VICTIM_15, + SFX_MEDIC_VOICE_1_AT_VICTIM_16, + SFX_MEDIC_VOICE_1_AT_VICTIM_17, + + SFX_MEDIC_VOICE_2_FIGHT_1, + SFX_MEDIC_VOICE_2_FIGHT_2, + SFX_MEDIC_VOICE_2_FIGHT_3, + SFX_MEDIC_VOICE_2_FIGHT_4, + SFX_MEDIC_VOICE_2_FIGHT_5, + SFX_MEDIC_VOICE_2_FIGHT_6, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_1, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_2, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_3, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_4, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_5, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_6, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_7, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_8, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_9, + SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_10, + SFX_MEDIC_VOICE_2_AT_VICTIM_1, + SFX_MEDIC_VOICE_2_AT_VICTIM_2, + SFX_MEDIC_VOICE_2_AT_VICTIM_3, + SFX_MEDIC_VOICE_2_AT_VICTIM_4, + SFX_MEDIC_VOICE_2_AT_VICTIM_5, + SFX_MEDIC_VOICE_2_AT_VICTIM_6, + SFX_MEDIC_VOICE_2_AT_VICTIM_7, + SFX_MEDIC_VOICE_2_AT_VICTIM_8, + SFX_MEDIC_VOICE_2_AT_VICTIM_9, + SFX_MEDIC_VOICE_2_AT_VICTIM_10, + SFX_MEDIC_VOICE_2_AT_VICTIM_11, + SFX_MEDIC_VOICE_2_AT_VICTIM_12, + SFX_MEDIC_VOICE_2_AT_VICTIM_13, + SFX_MEDIC_VOICE_2_AT_VICTIM_14, + SFX_MEDIC_VOICE_2_AT_VICTIM_15, + SFX_MEDIC_VOICE_2_AT_VICTIM_16, + SFX_MEDIC_VOICE_2_AT_VICTIM_17, + + SFX_FBI_VOICE_1_GUNAIMEDAT3_1, + SFX_FBI_VOICE_1_GUNAIMEDAT3_2, + SFX_FBI_VOICE_1_GUNAIMEDAT3_3, + SFX_FBI_VOICE_1_GUNAIMEDAT3_4, + SFX_FBI_VOICE_1_CAR_CRASH_1, + SFX_FBI_VOICE_1_CAR_CRASH_2, + SFX_FBI_VOICE_1_CAR_CRASH_3, + SFX_FBI_VOICE_1_CAR_CRASH_4, + SFX_FBI_VOICE_1_GUNAIMEDAT2_1, + SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_1, + SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_2, + SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_3, + SFX_FBI_VOICE_1_COP_TARGETING_1, + SFX_FBI_VOICE_1_COP_TARGETING_2, + SFX_FBI_VOICE_1_COP_TARGETING_3, + SFX_FBI_VOICE_1_COP_TARGETING_4, + SFX_FBI_VOICE_1_COP_TARGETING_5, + SFX_FBI_VOICE_1_COP_TARGETING_6, + + SFX_FBI_VOICE_2_GUNAIMEDAT3_1, + SFX_FBI_VOICE_2_GUNAIMEDAT3_2, + SFX_FBI_VOICE_2_GUNAIMEDAT3_3, + SFX_FBI_VOICE_2_GUNAIMEDAT3_4, + SFX_FBI_VOICE_2_CAR_CRASH_1, + SFX_FBI_VOICE_2_CAR_CRASH_2, + SFX_FBI_VOICE_2_CAR_CRASH_3, + SFX_FBI_VOICE_2_CAR_CRASH_4, + SFX_FBI_VOICE_2_GUNAIMEDAT2_1, + SFX_FBI_VOICE_2_COP_MANYCOPSAROUND_1, + SFX_FBI_VOICE_2_COP_MANYCOPSAROUND_2, + SFX_FBI_VOICE_2_COP_MANYCOPSAROUND_3, + SFX_FBI_VOICE_2_COP_TARGETING_1, + SFX_FBI_VOICE_2_COP_TARGETING_2, + SFX_FBI_VOICE_2_COP_TARGETING_3, + SFX_FBI_VOICE_2_COP_TARGETING_4, + SFX_FBI_VOICE_2_COP_TARGETING_5, + SFX_FBI_VOICE_2_COP_TARGETING_6, + + SFX_FBI_VOICE_3_GUNAIMEDAT3_1, + SFX_FBI_VOICE_3_GUNAIMEDAT3_2, + SFX_FBI_VOICE_3_GUNAIMEDAT3_3, + SFX_FBI_VOICE_3_GUNAIMEDAT3_4, + SFX_FBI_VOICE_3_CAR_CRASH_1, + SFX_FBI_VOICE_3_CAR_CRASH_2, + SFX_FBI_VOICE_3_CAR_CRASH_3, + SFX_FBI_VOICE_3_CAR_CRASH_4, + SFX_FBI_VOICE_3_GUNAIMEDAT2_1, + SFX_FBI_VOICE_3_COP_MANYCOPSAROUND_1, + SFX_FBI_VOICE_3_COP_MANYCOPSAROUND_2, + SFX_FBI_VOICE_3_COP_MANYCOPSAROUND_3, + SFX_FBI_VOICE_3_COP_TARGETING_1, + SFX_FBI_VOICE_3_COP_TARGETING_2, + SFX_FBI_VOICE_3_COP_TARGETING_3, + SFX_FBI_VOICE_3_COP_TARGETING_4, + SFX_FBI_VOICE_3_COP_TARGETING_5, + SFX_FBI_VOICE_3_COP_TARGETING_6, + + SFX_SWAT_VOICE_1_DODGE_1, + SFX_SWAT_VOICE_1_DODGE_2, + SFX_SWAT_VOICE_1_DODGE_3, + SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_1, + SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_2, + SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_3, + SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_4, + SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_5, + SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_6, + SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_7, + SFX_SWAT_VOICE_1_COP_TARGETING_1, + SFX_SWAT_VOICE_1_COP_TARGETING_2, + SFX_SWAT_VOICE_1_COP_TARGETING_3, + SFX_SWAT_VOICE_1_COP_TARGETING_4, + + SFX_SWAT_VOICE_2_DODGE_1, + SFX_SWAT_VOICE_2_DODGE_2, + SFX_SWAT_VOICE_2_DODGE_3, + SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_1, + SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_2, + SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_3, + SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_4, + SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_5, + SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_6, + SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_7, + SFX_SWAT_VOICE_2_COP_TARGETING_1, + SFX_SWAT_VOICE_2_COP_TARGETING_2, + SFX_SWAT_VOICE_2_COP_TARGETING_3, + SFX_SWAT_VOICE_2_COP_TARGETING_4, + + SFX_SWAT_VOICE_3_DODGE_1, + SFX_SWAT_VOICE_3_DODGE_2, + SFX_SWAT_VOICE_3_DODGE_3, + SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_1, + SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_2, + SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_3, + SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_4, + SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_5, + SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_6, + SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_7, + SFX_SWAT_VOICE_3_COP_TARGETING_1, + SFX_SWAT_VOICE_3_COP_TARGETING_2, + SFX_SWAT_VOICE_3_COP_TARGETING_3, + SFX_SWAT_VOICE_3_COP_TARGETING_4, + + + SFX_WFYG1_BLOCKED_1, + SFX_WFYG1_BLOCKED_2, + SFX_WFYG1_BLOCKED_3, + SFX_WFYG1_BLOCKED_4, + SFX_WFYG1_BLOCKED_5, + SFX_WFYG1_BLOCKED_6, + SFX_WFYG1_BLOCKED_7, + SFX_WFYG1_BUMP_1, + SFX_WFYG1_BUMP_2, + SFX_WFYG1_BUMP_3, + SFX_WFYG1_BUMP_4, + SFX_WFYG1_BUMP_5, + SFX_WFYG1_BUMP_6, + SFX_WFYG1_BUMP_7, + SFX_WFYG1_BUMP_8, + SFX_WFYG1_BUMP_9, + SFX_WFYG1_BUMP_10, + SFX_WFYG1_BUMP_11, + SFX_WFYG1_CAR_CRASH_1, + SFX_WFYG1_CAR_CRASH_2, + SFX_WFYG1_CAR_CRASH_3, + SFX_WFYG1_CAR_CRASH_4, + SFX_WFYG1_CAR_CRASH_5, + SFX_WFYG1_CAR_CRASH_6, + SFX_WFYG1_CAR_CRASH_7, + SFX_WFYG1_CAR_CRASH_8, + SFX_WFYG1_CAR_CRASH_9, + SFX_WFYG1_CHAT_1, + SFX_WFYG1_CHAT_2, + SFX_WFYG1_CHAT_3, + SFX_WFYG1_CHAT_4, + SFX_WFYG1_CHAT_5, + SFX_WFYG1_CHAT_6, + SFX_WFYG1_CHAT_7, + SFX_WFYG1_CHAT_8, + SFX_WFYG1_CHAT_9, + SFX_WFYG1_CHAT_10, + SFX_WFYG1_DODGE_1, + SFX_WFYG1_DODGE_2, + SFX_WFYG1_DODGE_3, + SFX_WFYG1_DODGE_4, + SFX_WFYG1_DODGE_5, + SFX_WFYG1_DODGE_6, + SFX_WFYG1_DODGE_7, + SFX_WFYG1_DODGE_8, + SFX_WFYG1_DODGE_9, + SFX_WFYG1_EYEING_1, + SFX_WFYG1_EYEING_2, + SFX_WFYG1_FIGHT_1, + SFX_WFYG1_FIGHT_2, + SFX_WFYG1_FIGHT_3, + SFX_WFYG1_FIGHT_4, + SFX_WFYG1_GENERIC_CRASH_1, + SFX_WFYG1_GENERIC_CRASH_2, + SFX_WFYG1_GENERIC_CRASH_3, + SFX_WFYG1_GENERIC_CRASH_4, + SFX_WFYG1_GENERIC_CRASH_5, + SFX_WFYG1_GENERIC_CRASH_6, + SFX_WFYG1_GENERIC_CRASH_7, + SFX_WFYG1_GUN_COOL_1, + SFX_WFYG1_GUN_COOL_2, + SFX_WFYG1_GUN_COOL_3, + SFX_WFYG1_GUN_COOL_4, + SFX_WFYG1_GUN_COOL_5, + SFX_WFYG1_GUN_COOL_6, + SFX_WFYG1_JACKED_1, + SFX_WFYG1_JACKED_2, + SFX_WFYG1_JACKED_3, + SFX_WFYG1_JACKED_4, + SFX_WFYG1_JACKED_5, + SFX_WFYG1_LOST_1, + SFX_WFYG1_LOST_2, + SFX_WFYG1_LOST_3, + SFX_WFYG1_MUGGED_1, + SFX_WFYG1_MUGGED_2, + SFX_WFYG1_MUGGING_1, + SFX_WFYG1_MUGGING_2, + SFX_WFYG1_RUN_1, + SFX_WFYG1_RUN_2, + SFX_WFYG1_SAVED_1, + SFX_WFYG1_SHOCKED_1, + SFX_WFYG1_TAXI_1, + + SFX_WFYG2_BLOCKED_1, + SFX_WFYG2_BLOCKED_2, + SFX_WFYG2_BLOCKED_3, + SFX_WFYG2_BLOCKED_4, + SFX_WFYG2_BLOCKED_5, + SFX_WFYG2_BUMP_1, + SFX_WFYG2_BUMP_2, + SFX_WFYG2_BUMP_3, + SFX_WFYG2_BUMP_4, + SFX_WFYG2_BUMP_5, + SFX_WFYG2_BUMP_6, + SFX_WFYG2_BUMP_7, + SFX_WFYG2_BUMP_8, + SFX_WFYG2_BUMP_9, + SFX_WFYG2_BUMP_10, + SFX_WFYG2_BUMP_11, + SFX_WFYG2_CAR_CRASH_1, + SFX_WFYG2_CAR_CRASH_2, + SFX_WFYG2_CAR_CRASH_3, + SFX_WFYG2_CAR_CRASH_4, + SFX_WFYG2_CAR_CRASH_5, + SFX_WFYG2_CAR_CRASH_6, + SFX_WFYG2_CAR_CRASH_7, + SFX_WFYG2_CAR_CRASH_8, + SFX_WFYG2_CAR_CRASH_9, + SFX_WFYG2_CHAT_1, + SFX_WFYG2_CHAT_2, + SFX_WFYG2_CHAT_3, + SFX_WFYG2_CHAT_4, + SFX_WFYG2_CHAT_5, + SFX_WFYG2_CHAT_6, + SFX_WFYG2_CHAT_7, + SFX_WFYG2_CHAT_8, + SFX_WFYG2_CHAT_9, + SFX_WFYG2_DODGE_1, + SFX_WFYG2_DODGE_2, + SFX_WFYG2_DODGE_3, + SFX_WFYG2_DODGE_4, + SFX_WFYG2_DODGE_5, + SFX_WFYG2_DODGE_6, + SFX_WFYG2_DODGE_7, + SFX_WFYG2_DODGE_8, + SFX_WFYG2_EYEING_1, + SFX_WFYG2_EYEING_2, + SFX_WFYG2_EYEING_3, + SFX_WFYG2_EYEING_4, + SFX_WFYG2_FIGHT_1, + SFX_WFYG2_FIGHT_2, + SFX_WFYG2_FIGHT_3, + SFX_WFYG2_FIGHT_4, + SFX_WFYG2_FIGHT_5, + SFX_WFYG2_GENERIC_CRASH_1, + SFX_WFYG2_GENERIC_CRASH_2, + SFX_WFYG2_GENERIC_CRASH_3, + SFX_WFYG2_GENERIC_CRASH_4, + SFX_WFYG2_GENERIC_CRASH_5, + SFX_WFYG2_GENERIC_CRASH_6, + SFX_WFYG2_GENERIC_CRASH_7, + SFX_WFYG2_GUN_COOL_1, + SFX_WFYG2_GUN_COOL_2, + SFX_WFYG2_GUN_COOL_3, + SFX_WFYG2_JACKED_1, + SFX_WFYG2_JACKED_2, + SFX_WFYG2_JACKED_3, + SFX_WFYG2_JACKED_4, + SFX_WFYG2_JACKED_5, + SFX_WFYG2_LOST_1, + SFX_WFYG2_MUGGED_1, + SFX_WFYG2_MUGGED_2, + SFX_WFYG2_SHOCKED_1, + SFX_WFYG2_TAXI_1, + SFX_WFYG2_TAXI_2, // unused + + SFX_HMOCA_BLOCKED_1, + SFX_HMOCA_BLOCKED_2, + SFX_HMOCA_BLOCKED_3, + SFX_HMOCA_BLOCKED_4, + SFX_HMOCA_BLOCKED_5, + SFX_HMOCA_BLOCKED_6, + SFX_HMOCA_BLOCKED_7, + SFX_HMOCA_BLOCKED_8, + SFX_HMOCA_CAR_CRASH_1, + SFX_HMOCA_CAR_CRASH_2, + SFX_HMOCA_CAR_CRASH_3, + SFX_HMOCA_CAR_CRASH_4, + SFX_HMOCA_CAR_CRASH_5, + SFX_HMOCA_CAR_CRASH_6, + SFX_HMOCA_CAR_CRASH_7, + SFX_HMOCA_CAR_CRASH_8, + SFX_HMOCA_CHAT_1, + SFX_HMOCA_CHAT_2, + SFX_HMOCA_CHAT_3, + SFX_HMOCA_CHAT_4, + SFX_HMOCA_CHAT_5, + SFX_HMOCA_CHAT_6, + SFX_HMOCA_CHAT_7, + SFX_HMOCA_CHAT_8, + SFX_HMOCA_CHAT_9, + SFX_HMOCA_CHAT_10, + SFX_HMOCA_EYEING_1, + SFX_HMOCA_EYEING_2, + SFX_HMOCA_GUN_PANIC_1, + SFX_HMOCA_GUN_PANIC_2, + SFX_HMOCA_GUN_PANIC_3, + SFX_HMOCA_GUN_PANIC_4, + SFX_HMOCA_GUN_PANIC_5, + SFX_HMOCA_JACKED_1, + SFX_HMOCA_JACKED_2, + SFX_HMOCA_JACKED_3, + SFX_HMOCA_JACKED_4, + SFX_HMOCA_JACKED_5, + SFX_HMOCA_JACKED_6, + SFX_HMOCA_JACKED_7, + SFX_HMOCA_JACKED_8, + SFX_HMOCA_JACKED_9, + SFX_HMOCA_JACKED_10, + SFX_HMOCA_JACKING_1, + SFX_HMOCA_JACKING_2, + SFX_HMOCA_JACKING_3, + SFX_HMOCA_JACKING_4, + SFX_HMOCA_JACKING_5, + SFX_HMOCA_JACKING_6, + SFX_HMOCA_JACKING_7, + SFX_HMOCA_JACKING_8, + SFX_HMOCA_JACKING_9, + SFX_HMOCA_JACKING_10, + SFX_HMOCA_JACKING_11, + SFX_HMOCA_MUGGED_1, + SFX_HMOCA_MUGGED_2, + SFX_HMOCA_MUGGED_3, + SFX_HMOCA_MUGGED_4, + SFX_HMOCA_MUGGED_5, + SFX_HMOCA_MUGGED_6, + SFX_HMOCA_MUGGED_7, + SFX_HMOCA_RUN_1, + SFX_HMOCA_RUN_2, + SFX_HMOCA_TAXI_1, + + SFX_WFOSH_BUMP_1, + SFX_WFOSH_BUMP_2, + SFX_WFOSH_BUMP_3, + SFX_WFOSH_BUMP_4, + SFX_WFOSH_BUMP_5, + SFX_WFOSH_BUMP_6, + SFX_WFOSH_BUMP_7, + SFX_WFOSH_BUMP_8, + SFX_WFOSH_BUMP_9, + SFX_WFOSH_BUMP_10, + SFX_WFOSH_CHAT_1, + SFX_WFOSH_CHAT_2, + SFX_WFOSH_CHAT_3, + SFX_WFOSH_CHAT_4, + SFX_WFOSH_CHAT_5, + SFX_WFOSH_CHAT_6, + SFX_WFOSH_CHAT_7, + SFX_WFOSH_CHAT_8, + SFX_WFOSH_CHAT_9, + SFX_WFOSH_DODGE_1, + SFX_WFOSH_DODGE_2, + SFX_WFOSH_DODGE_3, + SFX_WFOSH_DODGE_4, + SFX_WFOSH_DODGE_5, + SFX_WFOSH_DODGE_6, + SFX_WFOSH_DODGE_7, + SFX_WFOSH_DODGE_8, + SFX_WFOSH_DODGE_9, + SFX_WFOSH_DODGE_10, + SFX_WFOSH_GUN_COOL_1, + SFX_WFOSH_GUN_COOL_2, + SFX_WFOSH_GUN_COOL_3, + SFX_WFOSH_GUN_COOL_4, + SFX_WFOSH_GUN_COOL_5, + SFX_WFOSH_GUN_COOL_6, + SFX_WFOSH_GUN_COOL_7, + SFX_WFOSH_GUN_COOL_8, + SFX_WFOSH_GUN_COOL_9, + SFX_WFOSH_GUN_COOL_10, + SFX_WFOSH_LOST_1, + SFX_WFOSH_LOST_2, + SFX_WFOSH_MUGGED_1, + SFX_WFOSH_MUGGED_2, + SFX_WFOSH_RUN_1, + SFX_WFOSH_RUN_2, + SFX_WFOSH_RUN_3, + SFX_WFOSH_RUN_4, + SFX_WFOSH_RUN_5, + SFX_WFOSH_RUN_6, + SFX_WFOSH_RUN_7, + SFX_WFOSH_RUN_8, + SFX_WFOSH_RUN_9, + SFX_WFOSH_SAVED_1, + SFX_WFOSH_SAVED_2, + SFX_WFOSH_SAVED_3, + SFX_WFOSH_SHOCKED_1, + SFX_WFOSH_SHOCKED_2, + SFX_WFOSH_SHOCKED_3, + SFX_WFOSH_SHOCKED_4, + SFX_WFOSH_SHOCKED_5, + SFX_WFOSH_TAXI_1, + SFX_WFYSK_BLOCKED_1, + SFX_WFYSK_BLOCKED_2, + SFX_WFYSK_BLOCKED_3, + SFX_WFYSK_BLOCKED_4, + SFX_WFYSK_BLOCKED_5, + SFX_WFYSK_BLOCKED_6, + SFX_WFYSK_BLOCKED_7, + SFX_WFYSK_BLOCKED_8, + SFX_WFYSK_BLOCKED_9, + SFX_WFYSK_BLOCKED_10, + SFX_WFYSK_BLOCKED_11, + SFX_WFYSK_BUMP_1, + SFX_WFYSK_BUMP_2, + SFX_WFYSK_BUMP_3, + SFX_WFYSK_BUMP_4, + SFX_WFYSK_BUMP_5, + SFX_WFYSK_BUMP_6, + SFX_WFYSK_BUMP_7, + SFX_WFYSK_BUMP_8, + SFX_WFYSK_BUMP_9, + SFX_WFYSK_BUMP_10, + SFX_WFYSK_BUMP_11, + SFX_WFYSK_BUMP_12, + SFX_WFYSK_BUMP_13, + SFX_WFYSK_BUMP_14, + SFX_WFYSK_BUMP_15, + SFX_WFYSK_BUMP_16, + SFX_WFYSK_BUMP_17, + SFX_WFYSK_BUMP_18, + SFX_WFYSK_DODGE_1, + SFX_WFYSK_DODGE_2, + SFX_WFYSK_DODGE_3, + SFX_WFYSK_DODGE_4, + SFX_WFYSK_DODGE_5, + SFX_WFYSK_DODGE_6, + SFX_WFYSK_DODGE_7, + SFX_WFYSK_DODGE_8, + SFX_WFYSK_DODGE_9, + SFX_WFYSK_FIGHT_1, + SFX_WFYSK_FIGHT_2, + SFX_WFYSK_FIGHT_3, + SFX_WFYSK_FIGHT_4, + SFX_WFYSK_FIGHT_5, + SFX_WFYSK_FIGHT_6, + SFX_WFYSK_FIGHT_7, + SFX_WFYSK_FIGHT_8, + SFX_WFYSK_FIGHT_9, + SFX_WFYSK_FIGHT_10, + SFX_WFYSK_FIGHT_11, + SFX_WFYSK_GUN_PANIC_1, + SFX_WFYSK_GUN_PANIC_2, + SFX_WFYSK_GUN_PANIC_3, + SFX_WFYSK_GUN_PANIC_4, + SFX_WFYSK_GUN_PANIC_5, + SFX_WFYSK_MUGGED_1, + SFX_WFYSK_MUGGED_2, + SFX_WFYSK_SAVED_1, + SFX_WFYSK_SAVED_2, + SFX_WFYSK_TAXI_1, + SFX_WMYLG_BUMP_1, + SFX_WMYLG_BUMP_2, + SFX_WMYLG_BUMP_3, + SFX_WMYLG_BUMP_4, + SFX_WMYLG_BUMP_5, + SFX_WMYLG_BUMP_6, + SFX_WMYLG_BUMP_7, + SFX_WMYLG_BUMP_8, + SFX_WMYLG_BUMP_9, + SFX_WMYLG_BUMP_10, + SFX_WMYLG_CHAT_1, + SFX_WMYLG_CHAT_2, + SFX_WMYLG_CHAT_3, + SFX_WMYLG_CHAT_4, + SFX_WMYLG_CHAT_5, + SFX_WMYLG_CHAT_6, + SFX_WMYLG_CHAT_7, + SFX_WMYLG_CHAT_8, + SFX_WMYLG_CHAT_9, + SFX_WMYLG_CHAT_10, + SFX_WMYLG_DODGE_1, + SFX_WMYLG_DODGE_2, + SFX_WMYLG_DODGE_3, + SFX_WMYLG_DODGE_4, + SFX_WMYLG_DODGE_5, + SFX_WMYLG_DODGE_6, + SFX_WMYLG_DODGE_7, + SFX_WMYLG_DODGE_8, + SFX_WMYLG_DODGE_9, + SFX_WMYLG_FIGHT_1, + SFX_WMYLG_FIGHT_2, + SFX_WMYLG_FIGHT_3, + SFX_WMYLG_FIGHT_4, + SFX_WMYLG_FIGHT_5, + SFX_WMYLG_FIGHT_6, + SFX_WMYLG_FIGHT_7, + SFX_WMYLG_GUN_COOL_1, + SFX_WMYLG_GUN_COOL_2, + SFX_WMYLG_GUN_COOL_3, + SFX_WMYLG_GUN_COOL_4, + SFX_WMYLG_GUN_COOL_5, + SFX_WMYLG_GUN_COOL_6, + SFX_WMYLG_SAVED_1, + SFX_WMYLG_TAXI_1, + + SFX_WMOBE_BLOCKED_1, + SFX_WMOBE_BLOCKED_2, + SFX_WMOBE_BLOCKED_3, + SFX_WMOBE_BLOCKED_4, + SFX_WMOBE_BLOCKED_5, + SFX_WMOBE_BLOCKED_6, + SFX_WMOBE_BUMP_1, + SFX_WMOBE_BUMP_2, + SFX_WMOBE_BUMP_3, + SFX_WMOBE_BUMP_4, + SFX_WMOBE_BUMP_5, + SFX_WMOBE_BUMP_6, + SFX_WMOBE_BUMP_7, + SFX_WMOBE_BUMP_8, + SFX_WMOBE_BUMP_9, + SFX_WMOBE_BUMP_10, + SFX_WMOBE_BUMP_11, + SFX_WMOBE_BUMP_12, + SFX_WMOBE_CAR_CRASH_1, + SFX_WMOBE_CAR_CRASH_2, + SFX_WMOBE_CAR_CRASH_3, + SFX_WMOBE_CAR_CRASH_4, + SFX_WMOBE_CAR_CRASH_5, + SFX_WMOBE_CAR_CRASH_6, + SFX_WMOBE_CAR_CRASH_7, + SFX_WMOBE_CAR_CRASH_8, + SFX_WMOBE_CHAT_1, + SFX_WMOBE_CHAT_2, + SFX_WMOBE_CHAT_3, + SFX_WMOBE_CHAT_4, + SFX_WMOBE_CHAT_5, + SFX_WMOBE_CHAT_6, + SFX_WMOBE_CHAT_7, + SFX_WMOBE_CHAT_8, + SFX_WMOBE_CHAT_9, + SFX_WMOBE_CHAT_10, + SFX_WMOBE_DODGE_1, + SFX_WMOBE_DODGE_2, + SFX_WMOBE_DODGE_3, + SFX_WMOBE_DODGE_4, + SFX_WMOBE_DODGE_5, + SFX_WMOBE_DODGE_6, + SFX_WMOBE_DODGE_7, + SFX_WMOBE_DODGE_8, + SFX_WMOBE_EYEING_1, + SFX_WMOBE_EYEING_2, + SFX_WMOBE_GENERIC_CRASH_1, + SFX_WMOBE_GENERIC_CRASH_2, + SFX_WMOBE_GENERIC_CRASH_3, + SFX_WMOBE_GENERIC_CRASH_4, + SFX_WMOBE_GENERIC_CRASH_5, + SFX_WMOBE_GENERIC_CRASH_6, + SFX_WMOBE_GENERIC_CRASH_7, + SFX_WMOBE_GUN_PANIC_1, + SFX_WMOBE_GUN_PANIC_2, + SFX_WMOBE_GUN_PANIC_3, + SFX_WMOBE_GUN_PANIC_4, + SFX_WMOBE_GUN_PANIC_5, + SFX_WMOBE_JACKED_1, + SFX_WMOBE_JACKED_2, + SFX_WMOBE_JACKED_3, + SFX_WMOBE_JACKED_4, + SFX_WMOBE_JACKED_5, + SFX_WMOBE_JACKED_6, + SFX_WMOBE_JACKED_7, + SFX_WMOBE_JACKED_8, + SFX_WMOBE_JACKING_1, + SFX_WMOBE_JACKING_2, + SFX_WMOBE_JACKING_3, + SFX_WMOBE_JACKING_4, + SFX_WMOBE_JEER_1, + SFX_WMOBE_JEER_2, + SFX_WMOBE_JEER_3, + SFX_WMOBE_JEER_4, + SFX_WMOBE_JEER_5, + SFX_WMOBE_JEER_6, + SFX_WMOBE_JEER_7, + SFX_WMOBE_JEER_8, + SFX_WMOBE_JEER_9, + SFX_WMOBE_JEER_10, + SFX_WMOBE_JEER_11, + SFX_WMOBE_JEER_12, + SFX_WMOBE_JEER_13, + SFX_WMOBE_JEER_14, + SFX_WMOBE_JEER_15, + SFX_WMOBE_JEER_16, + SFX_WMOBE_MUGGING_1, + SFX_WMOBE_MUGGING_2, + SFX_WMOBE_MUGGING_3, + SFX_WMOBE_MUGGING_4, + SFX_WMOBE_MUGGING_5, + SFX_WMOBE_MUGGING_6, + SFX_WMOBE_RUN_1, + SFX_WMOBE_RUN_2, + SFX_WMOBE_RUN_3, + SFX_WMOBE_RUN_4, + SFX_WMOBE_SAVED_1, + SFX_WMOBE_SAVED_2, + SFX_WMOBE_SHOCKED_1, + SFX_WMOBE_SHOCKED_2, + + + + SFX_WMYBU_BLOCKED_1, + SFX_WMYBU_BLOCKED_2, + SFX_WMYBU_BLOCKED_3, + SFX_WMYBU_BLOCKED_4, + SFX_WMYBU_BLOCKED_5, + SFX_WMYBU_BLOCKED_6, + SFX_WMYBU_BLOCKED_7, + SFX_WMYBU_BLOCKED_8, + SFX_WMYBU_BLOCKED_9, + SFX_WMYBU_BUMP_1, + SFX_WMYBU_BUMP_2, + SFX_WMYBU_BUMP_3, + SFX_WMYBU_BUMP_4, + SFX_WMYBU_BUMP_5, + SFX_WMYBU_BUMP_6, + SFX_WMYBU_BUMP_7, + SFX_WMYBU_BUMP_8, + SFX_WMYBU_BUMP_9, + SFX_WMYBU_BUMP_10, + SFX_WMYBU_BUMP_11, + SFX_WMYBU_CAR_CRASH_1, + SFX_WMYBU_CAR_CRASH_2, + SFX_WMYBU_CAR_CRASH_3, + SFX_WMYBU_CAR_CRASH_4, + SFX_WMYBU_CAR_CRASH_5, + SFX_WMYBU_CAR_CRASH_6, + SFX_WMYBU_CAR_CRASH_7, + SFX_WMYBU_CAR_CRASH_8, + SFX_WMYBU_CAR_CRASH_9, + SFX_WMYBU_CHAT_1, + SFX_WMYBU_CHAT_2, + SFX_WMYBU_CHAT_3, + SFX_WMYBU_CHAT_4, + SFX_WMYBU_CHAT_5, + SFX_WMYBU_CHAT_6, + SFX_WMYBU_CHAT_7, + SFX_WMYBU_CHAT_8, + SFX_WMYBU_CHAT_9, + SFX_WMYBU_CHAT_10, + SFX_WMYBU_DODGE_1, + SFX_WMYBU_DODGE_2, + SFX_WMYBU_DODGE_3, + SFX_WMYBU_DODGE_4, + SFX_WMYBU_DODGE_5, + SFX_WMYBU_DODGE_6, + SFX_WMYBU_DODGE_7, + SFX_WMYBU_DODGE_8, + SFX_WMYBU_DODGE_9, + SFX_WMYBU_DODGE_10, + SFX_WMYBU_EYEING_1, + SFX_WMYBU_EYEING_2, + SFX_WMYBU_GENERIC_CRASH_1, + SFX_WMYBU_GENERIC_CRASH_2, + SFX_WMYBU_GENERIC_CRASH_3, + SFX_WMYBU_GENERIC_CRASH_4, + SFX_WMYBU_GENERIC_CRASH_5, + SFX_WMYBU_GUN_PANIC_1, + SFX_WMYBU_GUN_PANIC_2, + SFX_WMYBU_GUN_PANIC_3, + SFX_WMYBU_GUN_PANIC_4, + SFX_WMYBU_GUN_PANIC_5, + SFX_WMYBU_GUN_PANIC_6, + SFX_WMYBU_INNOCENT_1, + SFX_WMYBU_INNOCENT_2, + SFX_WMYBU_JACKED_1, + SFX_WMYBU_JACKED_2, + SFX_WMYBU_JACKED_3, + SFX_WMYBU_JACKED_4, + SFX_WMYBU_JACKED_5, + SFX_WMYBU_LOST_1, + SFX_WMYBU_LOST_2, + SFX_WMYBU_LOST_3, + SFX_WMYBU_LOST_4, + SFX_WMYBU_LOST_5, + SFX_WMYBU_MUGGED_1, + SFX_WMYBU_RUN_1, + SFX_WMYBU_RUN_2, + SFX_WMYBU_RUN_3, + SFX_WMYBU_SAVED_1, + SFX_WMYBU_SAVED_2, + SFX_WMYBU_SHOCKED_1, + SFX_WMYBU_SHOCKED_2, + SFX_WMYBU_SHOCKED_3, + SFX_WMYBU_SHOCKED_4, + SFX_WMYBU_SHOCKED_5, + SFX_WMYBU_TAXI_1, + SFX_WMYBU_TAXI_2, + + SFX_WMYST_BLOCKED_1, + SFX_WMYST_BLOCKED_2, + SFX_WMYST_BLOCKED_3, + SFX_WMYST_BLOCKED_4, + SFX_WMYST_BLOCKED_5, + SFX_WMYST_BLOCKED_6, + SFX_WMYST_BLOCKED_7, + SFX_WMYST_BLOCKED_8, + SFX_WMYST_BUMP_1, + SFX_WMYST_BUMP_2, + SFX_WMYST_BUMP_3, + SFX_WMYST_BUMP_4, + SFX_WMYST_BUMP_5, + SFX_WMYST_BUMP_6, + SFX_WMYST_BUMP_7, + SFX_WMYST_BUMP_8, + SFX_WMYST_BUMP_9, + SFX_WMYST_BUMP_10, + SFX_WMYST_BUMP_11, + SFX_WMYST_CAR_CRASH_1, + SFX_WMYST_CAR_CRASH_2, + SFX_WMYST_CAR_CRASH_3, + SFX_WMYST_CAR_CRASH_4, + SFX_WMYST_CAR_CRASH_5, + SFX_WMYST_CAR_CRASH_6, + SFX_WMYST_CAR_CRASH_7, + SFX_WMYST_CAR_CRASH_8, + SFX_WMYST_CHAT_1, + SFX_WMYST_CHAT_2, + SFX_WMYST_CHAT_3, + SFX_WMYST_CHAT_4, + SFX_WMYST_CHAT_5, + SFX_WMYST_CHAT_6, + SFX_WMYST_CHAT_7, + SFX_WMYST_CHAT_8, + SFX_WMYST_CHAT_9, + SFX_WMYST_CHAT_10, + SFX_WMYST_DODGE_1, + SFX_WMYST_DODGE_2, + SFX_WMYST_DODGE_3, + SFX_WMYST_DODGE_4, + SFX_WMYST_DODGE_5, + SFX_WMYST_DODGE_6, + SFX_WMYST_DODGE_7, + SFX_WMYST_DODGE_8, + SFX_WMYST_DODGE_9, + SFX_WMYST_DODGE_10, + SFX_WMYST_EYEING_1, + SFX_WMYST_EYEING_2, + SFX_WMYST_GENERIC_CRASH_1, + SFX_WMYST_GENERIC_CRASH_2, + SFX_WMYST_GENERIC_CRASH_3, + SFX_WMYST_GENERIC_CRASH_4, + SFX_WMYST_GENERIC_CRASH_5, + SFX_WMYST_GUN_PANIC_1, + SFX_WMYST_GUN_PANIC_2, + SFX_WMYST_GUN_PANIC_3, + SFX_WMYST_GUN_PANIC_4, + SFX_WMYST_GUN_PANIC_5, + SFX_WMYST_INNOCENT_1, + SFX_WMYST_INNOCENT_2, + SFX_WMYST_INNOCENT_3, + SFX_WMYST_JACKED_1, + SFX_WMYST_JACKED_2, + SFX_WMYST_JACKED_3, + SFX_WMYST_JACKED_4, + SFX_WMYST_JACKED_5, + SFX_WMYST_LOST_1, + SFX_WMYST_LOST_2, + SFX_WMYST_MUGGED_1, + SFX_WMYST_MUGGING_1, + SFX_WMYST_MUGGING_2, + SFX_WMYST_MUGGING_3, + SFX_WMYST_MUGGING_4, + SFX_WMYST_MUGGING_5, + SFX_WMYST_RUN_1, + SFX_WMYST_RUN_2, + SFX_WMYST_RUN_3, + SFX_WMYST_RUN_4, + SFX_WMYST_RUN_5, + SFX_WMYST_RUN_6, + SFX_WMYST_RUN_7, + SFX_WMYST_SAVED_1, + SFX_WMYST_TAXI_1, + SFX_WMYST_TAXI_2, + + SFX_BMYPI_BLOCKED_1, + SFX_BMYPI_BLOCKED_2, + SFX_BMYPI_BLOCKED_3, + SFX_BMYPI_BLOCKED_4, + SFX_BMYPI_BLOCKED_5, + SFX_BMYPI_BLOCKED_6, + SFX_BMYPI_BUMP_1, + SFX_BMYPI_BUMP_2, + SFX_BMYPI_BUMP_3, + SFX_BMYPI_BUMP_4, + SFX_BMYPI_BUMP_5, + SFX_BMYPI_BUMP_6, + SFX_BMYPI_BUMP_7, + SFX_BMYPI_BUMP_8, + SFX_BMYPI_BUMP_9, + SFX_BMYPI_CAR_CRASH_1, + SFX_BMYPI_CAR_CRASH_2, + SFX_BMYPI_CAR_CRASH_3, + SFX_BMYPI_CAR_CRASH_4, + SFX_BMYPI_CAR_CRASH_5, + SFX_BMYPI_DODGE_1, + SFX_BMYPI_DODGE_2, + SFX_BMYPI_DODGE_3, + SFX_BMYPI_DODGE_4, + SFX_BMYPI_DODGE_5, + SFX_BMYPI_DODGE_6, + SFX_BMYPI_DODGE_7, + SFX_BMYPI_DODGE_8, + SFX_BMYPI_DODGE_9, + SFX_BMYPI_DODGE_10, + SFX_BMYPI_EYEING_1, + SFX_BMYPI_EYEING_2, + SFX_BMYPI_EYEING_3, + SFX_BMYPI_EYEING_4, + SFX_BMYPI_FIGHT_1, + SFX_BMYPI_FIGHT_2, + SFX_BMYPI_FIGHT_3, + SFX_BMYPI_FIGHT_4, + SFX_BMYPI_FIGHT_5, + SFX_BMYPI_FIGHT_6, + SFX_BMYPI_FIGHT_7, + SFX_BMYPI_FIGHT_8, + SFX_BMYPI_GENERIC_CRASH_1, + SFX_BMYPI_GENERIC_CRASH_2, + SFX_BMYPI_GENERIC_CRASH_3, + SFX_BMYPI_GENERIC_CRASH_4, + SFX_BMYPI_GENERIC_CRASH_5, + SFX_BMYPI_GENERIC_CRASH_6, + SFX_BMYPI_GENERIC_CRASH_7, + SFX_BMYPI_GENERIC_CRASH_8, + SFX_BMYPI_GENERIC_CRASH_9, + SFX_BMYPI_GENERIC_CRASH_10, + SFX_BMYPI_GENERIC_CRASH_11, + SFX_BMYPI_GENERIC_CRASH_12, + SFX_BMYPI_GENERIC_CRASH_13, + SFX_BMYPI_GUN_COOL_1, + SFX_BMYPI_GUN_COOL_2, + SFX_BMYPI_GUN_COOL_3, + SFX_BMYPI_GUN_COOL_4, + SFX_BMYPI_GUN_COOL_5, + SFX_BMYPI_JACKED_1, + SFX_BMYPI_JACKED_2, + SFX_BMYPI_JACKED_3, + SFX_BMYPI_JACKED_4, + SFX_BMYPI_JACKED_5, + SFX_BMYPI_JACKED_6, + SFX_BMYPI_JACKING_1, + SFX_BMYPI_JACKING_2, + SFX_BMYPI_JACKING_3, + SFX_BMYPI_JACKING_4, + SFX_BMYPI_MUGGED_1, + SFX_BMYPI_SAVED_1, + SFX_BMYPI_TAXI_1, + SFX_BMYPI_TAXI_2, + + SFX_WFYPR_BUMP_1, + SFX_WFYPR_BUMP_2, + SFX_WFYPR_BUMP_3, + SFX_WFYPR_BUMP_4, + SFX_WFYPR_BUMP_5, + SFX_WFYPR_BUMP_6, + SFX_WFYPR_BUMP_7, + SFX_WFYPR_BUMP_8, + SFX_WFYPR_BUMP_9, + SFX_WFYPR_BUMP_10, + SFX_WFYPR_BUMP_11, + SFX_WFYPR_CHAT_1, + SFX_WFYPR_CHAT_2, + SFX_WFYPR_CHAT_3, + SFX_WFYPR_CHAT_4, + SFX_WFYPR_CHAT_5, + SFX_WFYPR_CHAT_6, + SFX_WFYPR_CHAT_7, + SFX_WFYPR_CHAT_8, + SFX_WFYPR_CHAT_9, + SFX_WFYPR_CHAT_10, + SFX_WFYPR_CHAT_11, + SFX_WFYPR_CHAT_12, + SFX_WFYPR_CHAT_13, + SFX_WFYPR_CHAT_14, + SFX_WFYPR_DODGE_1, + SFX_WFYPR_DODGE_2, + SFX_WFYPR_DODGE_3, + SFX_WFYPR_DODGE_4, + SFX_WFYPR_DODGE_5, + SFX_WFYPR_DODGE_6, + SFX_WFYPR_DODGE_7, + SFX_WFYPR_DODGE_8, + SFX_WFYPR_DODGE_9, + SFX_WFYPR_DODGE_10, + SFX_WFYPR_FIGHT_1, + SFX_WFYPR_FIGHT_2, + SFX_WFYPR_FIGHT_3, + SFX_WFYPR_FIGHT_4, + SFX_WFYPR_FIGHT_5, + SFX_WFYPR_FIGHT_6, + SFX_WFYPR_FIGHT_7, + SFX_WFYPR_FIGHT_8, + SFX_WFYPR_FIGHT_9, + SFX_WFYPR_FUCKING_1, + SFX_WFYPR_FUCKING_2, + SFX_WFYPR_FUCKING_3, + SFX_WFYPR_FUCKING_4, + SFX_WFYPR_FUCKING_5, + SFX_WFYPR_GUN_COOL_1, + SFX_WFYPR_GUN_COOL_2, + SFX_WFYPR_GUN_COOL_3, + SFX_WFYPR_GUN_COOL_4, + SFX_WFYPR_GUN_COOL_5, + SFX_WFYPR_GUN_COOL_6, + SFX_WFYPR_MUGGED_1, + SFX_WFYPR_MUGGED_2, + SFX_WFYPR_SAVED_1, + SFX_WFYPR_SOLICIT_1, + SFX_WFYPR_SOLICIT_2, + SFX_WFYPR_SOLICIT_3, + SFX_WFYPR_SOLICIT_4, + SFX_WFYPR_SOLICIT_5, + SFX_WFYPR_SOLICIT_6, + SFX_WFYPR_SOLICIT_7, + SFX_WFYPR_SOLICIT_8, + SFX_WFYPR_SOLICIT_9, + SFX_WFYPR_SOLICIT_10, + SFX_WFYPR_SOLICIT_11, + SFX_WFYPR_SOLICIT_12, + SFX_WFYPR_SOLICIT_13, + SFX_WFYPR_SOLICIT_14, + SFX_WFYPR_SOLICIT_15, + SFX_WFYPR_TAXI_1, + + SFX_WMYRI_BLOCKED_1, + SFX_WMYRI_BLOCKED_2, + SFX_WMYRI_BLOCKED_3, + SFX_WMYRI_BLOCKED_4, + SFX_WMYRI_BLOCKED_5, + SFX_WMYRI_BLOCKED_6, + SFX_WMYRI_BLOCKED_7, + SFX_WMYRI_BLOCKED_8, + SFX_WMYRI_BLOCKED_9, + SFX_WMYRI_BLOCKED_10, + SFX_WMYRI_BUMP_1, + SFX_WMYRI_BUMP_2, + SFX_WMYRI_BUMP_3, + SFX_WMYRI_BUMP_4, + SFX_WMYRI_BUMP_5, + SFX_WMYRI_BUMP_6, + SFX_WMYRI_BUMP_7, + SFX_WMYRI_BUMP_8, + SFX_WMYRI_CAR_CRASH_1, + SFX_WMYRI_CAR_CRASH_2, + SFX_WMYRI_CAR_CRASH_3, + SFX_WMYRI_CAR_CRASH_4, + SFX_WMYRI_CAR_CRASH_5, + SFX_WMYRI_CAR_CRASH_6, + SFX_WMYRI_CAR_CRASH_7, + SFX_WMYRI_CAR_CRASH_8, + SFX_WMYRI_CAR_CRASH_9, + SFX_WMYRI_CHAT_1, + SFX_WMYRI_CHAT_2, + SFX_WMYRI_CHAT_3, + SFX_WMYRI_CHAT_4, + SFX_WMYRI_CHAT_5, + SFX_WMYRI_CHAT_6, + SFX_WMYRI_CHAT_7, + SFX_WMYRI_CHAT_8, + SFX_WMYRI_CHAT_9, + SFX_WMYRI_CHAT_10, + SFX_WMYRI_DODGE_1, + SFX_WMYRI_DODGE_2, + SFX_WMYRI_DODGE_3, + SFX_WMYRI_DODGE_4, + SFX_WMYRI_DODGE_5, + SFX_WMYRI_DODGE_6, + SFX_WMYRI_DODGE_7, + SFX_WMYRI_DODGE_8, + SFX_WMYRI_DODGE_9, + SFX_WMYRI_EYEING_1, + SFX_WMYRI_EYEING_2, + SFX_WMYRI_EYEING_3, + SFX_WMYRI_GENERIC_CRASH_1, + SFX_WMYRI_GENERIC_CRASH_2, + SFX_WMYRI_GENERIC_CRASH_3, + SFX_WMYRI_GENERIC_CRASH_4, + SFX_WMYRI_GENERIC_CRASH_5, + SFX_WMYRI_GENERIC_CRASH_6, + SFX_WMYRI_GENERIC_CRASH_7, + SFX_WMYRI_GENERIC_CRASH_8, + SFX_WMYRI_GENERIC_CRASH_9, + SFX_WMYRI_GENERIC_CRASH_10, + SFX_WMYRI_GENERIC_CRASH_11, + SFX_WMYRI_GUN_PANIC_1, + SFX_WMYRI_GUN_PANIC_2, + SFX_WMYRI_GUN_PANIC_3, + SFX_WMYRI_GUN_PANIC_4, + SFX_WMYRI_GUN_PANIC_5, + SFX_WMYRI_GUN_PANIC_6, + SFX_WMYRI_GUN_PANIC_7, + SFX_WMYRI_GUN_PANIC_8, + SFX_WMYRI_JACKED_1, + SFX_WMYRI_JACKED_2, + SFX_WMYRI_JACKED_3, + SFX_WMYRI_JACKED_4, + SFX_WMYRI_JACKED_5, + SFX_WMYRI_JACKED_6, + SFX_WMYRI_JACKED_7, + SFX_WMYRI_JACKED_8, + SFX_WMYRI_LOST_1, + SFX_WMYRI_RUN_1, + SFX_WMYRI_RUN_2, + SFX_WMYRI_RUN_3, + SFX_WMYRI_RUN_4, + SFX_WMYRI_RUN_5, + SFX_WMYRI_SAVED_1, + SFX_WMYRI_SHOCKED_1, + SFX_WMYRI_SHOCKED_2, + SFX_WMYRI_SHOCKED_3, + SFX_WMYRI_SHOCKED_4, + SFX_WMYRI_TAXI_1, + SFX_WMYRI_TAXI_2, + + SFX_BMOST_BUMP_1, + SFX_BMOST_BUMP_2, + SFX_BMOST_BUMP_3, + SFX_BMOST_BUMP_4, + SFX_BMOST_BUMP_5, + SFX_BMOST_BUMP_6, + SFX_BMOST_BUMP_7, + SFX_BMOST_BUMP_8, + SFX_BMOST_BUMP_9, + SFX_BMOST_BUMP_10, + SFX_BMOST_BUMP_11, + SFX_BMOST_BUMP_12, + SFX_BMOST_BUMP_13, + SFX_BMOST_BUMP_14, + SFX_BMOST_BUMP_15, + SFX_BMOST_BUMP_16, + SFX_BMOST_BUMP_17, + SFX_BMOST_CAR_CRASH_1, + SFX_BMOST_CAR_CRASH_2, + SFX_BMOST_CAR_CRASH_3, + SFX_BMOST_CAR_CRASH_4, + SFX_BMOST_CAR_CRASH_5, + SFX_BMOST_CAR_CRASH_6, + SFX_BMOST_CAR_CRASH_7, + SFX_BMOST_CAR_CRASH_8, + SFX_BMOST_CHAT_1, + SFX_BMOST_CHAT_2, + SFX_BMOST_CHAT_3, + SFX_BMOST_CHAT_4, + SFX_BMOST_CHAT_5, + SFX_BMOST_CHAT_6, + SFX_BMOST_CHAT_7, + SFX_BMOST_CHAT_8, + SFX_BMOST_CHAT_9, + SFX_BMOST_CHAT_10, + SFX_BMOST_CHAT_11, + SFX_BMOST_CHAT_12, + SFX_BMOST_CHAT_13, + SFX_BMOST_CHAT_14, + SFX_BMOST_CHAT_15, + SFX_BMOST_CHAT_16, + SFX_BMOST_CHAT_17, + SFX_BMOST_CHAT_18, + SFX_BMOST_DODGE_1, + SFX_BMOST_DODGE_2, + SFX_BMOST_DODGE_3, + SFX_BMOST_DODGE_4, + SFX_BMOST_DODGE_5, + SFX_BMOST_DODGE_6, + SFX_BMOST_DODGE_7, + SFX_BMOST_DODGE_8, + SFX_BMOST_EYEING_1, + SFX_BMOST_EYEING_2, + SFX_BMOST_EYEING_3, + SFX_BMOST_EYEING_4, + SFX_BMOST_EYEING_5, + SFX_BMOST_EYEING_6, + SFX_BMOST_FIGHT_1, + SFX_BMOST_FIGHT_2, + SFX_BMOST_FIGHT_3, + SFX_BMOST_FIGHT_4, + SFX_BMOST_FIGHT_5, + SFX_BMOST_FIGHT_6, + SFX_BMOST_FIGHT_7, + SFX_BMOST_GENERIC_CRASH_1, + SFX_BMOST_GENERIC_CRASH_2, + SFX_BMOST_GENERIC_CRASH_3, + SFX_BMOST_GENERIC_CRASH_4, + SFX_BMOST_GENERIC_CRASH_5, + SFX_BMOST_GENERIC_CRASH_6, + SFX_BMOST_GENERIC_CRASH_7, + SFX_BMOST_GENERIC_CRASH_8, + SFX_BMOST_GENERIC_CRASH_9, + SFX_BMOST_GENERIC_CRASH_10, + SFX_BMOST_GENERIC_CRASH_11, + SFX_BMOST_GENERIC_CRASH_12, + SFX_BMOST_GENERIC_CRASH_13, + SFX_BMOST_GUN_PANIC_1, + SFX_BMOST_GUN_PANIC_2, + SFX_BMOST_GUN_PANIC_3, + SFX_BMOST_GUN_PANIC_4, + SFX_BMOST_GUN_PANIC_5, + SFX_BMOST_GUN_PANIC_6, + SFX_BMOST_GUN_PANIC_7, + SFX_BMOST_GUN_PANIC_8, + SFX_BMOST_GUN_PANIC_9, + SFX_BMOST_LOST_1, + SFX_BMOST_LOST_2, + SFX_BMOST_LOST_3, + SFX_BMOST_LOST_4, + SFX_BMOST_LOST_5, + SFX_BMOST_LOST_6, + SFX_BMOST_MUGGED_1, + SFX_BMOST_MUGGED_2, + SFX_BMOST_MUGGED_3, + SFX_BMOST_MUGGED_4, + SFX_BMOST_SAVED_1, + SFX_BMOST_TAXI_1, + + SFX_HFOST_BLOCKED_1, + SFX_HFOST_BLOCKED_2, + SFX_HFOST_BLOCKED_3, + SFX_HFOST_BLOCKED_4, + SFX_HFOST_BLOCKED_5, + SFX_HFOST_BLOCKED_6, + SFX_HFOST_BLOCKED_7, + SFX_HFOST_BLOCKED_8, + SFX_HFOST_BLOCKED_9, + SFX_HFOST_BUMP_1, + SFX_HFOST_BUMP_2, + SFX_HFOST_BUMP_3, + SFX_HFOST_BUMP_4, + SFX_HFOST_BUMP_5, + SFX_HFOST_BUMP_6, + SFX_HFOST_BUMP_7, + SFX_HFOST_BUMP_8, + SFX_HFOST_BUMP_9, + SFX_HFOST_BUMP_10, + SFX_HFOST_BUMP_11, + SFX_HFOST_BUMP_12, + SFX_HFOST_CAR_CRASH_1, + SFX_HFOST_CAR_CRASH_2, + SFX_HFOST_CAR_CRASH_3, + SFX_HFOST_CAR_CRASH_4, + SFX_HFOST_CAR_CRASH_5, + SFX_HFOST_CAR_CRASH_6, + SFX_HFOST_CAR_CRASH_7, + SFX_HFOST_CAR_CRASH_8, + SFX_HFOST_CHAT_1, + SFX_HFOST_CHAT_2, + SFX_HFOST_CHAT_3, + SFX_HFOST_CHAT_4, + SFX_HFOST_CHAT_5, + SFX_HFOST_CHAT_6, + SFX_HFOST_CHAT_7, + SFX_HFOST_CHAT_8, + SFX_HFOST_CHAT_9, + SFX_HFOST_CHAT_10, + SFX_HFOST_CHAT_11, + SFX_HFOST_DODGE_1, + SFX_HFOST_DODGE_2, + SFX_HFOST_DODGE_3, + SFX_HFOST_DODGE_4, + SFX_HFOST_DODGE_5, + SFX_HFOST_DODGE_6, + SFX_HFOST_DODGE_7, + SFX_HFOST_DODGE_8, + SFX_HFOST_DODGE_9, + SFX_HFOST_DODGE_10, + SFX_HFOST_FIGHT_1, + SFX_HFOST_FIGHT_2, + SFX_HFOST_FIGHT_3, + SFX_HFOST_FIGHT_4, + SFX_HFOST_FIGHT_5, + SFX_HFOST_FIGHT_6, + SFX_HFOST_FIGHT_7, + SFX_HFOST_FIGHT_8, + SFX_HFOST_GENERIC_CRASH_1, + SFX_HFOST_GENERIC_CRASH_2, + SFX_HFOST_GENERIC_CRASH_3, + SFX_HFOST_GENERIC_CRASH_4, + SFX_HFOST_GENERIC_CRASH_5, + SFX_HFOST_GENERIC_CRASH_6, + SFX_HFOST_GENERIC_CRASH_7, + SFX_HFOST_GENERIC_CRASH_8, + SFX_HFOST_GENERIC_CRASH_9, + SFX_HFOST_GENERIC_CRASH_10, + SFX_HFOST_GENERIC_CRASH_11, + SFX_HFOST_GUN_COOL_1, + SFX_HFOST_GUN_COOL_2, + SFX_HFOST_GUN_COOL_3, + SFX_HFOST_GUN_COOL_4, + SFX_HFOST_GUN_COOL_5, + SFX_HFOST_GUN_COOL_6, + SFX_HFOST_JACKED_1, + SFX_HFOST_JACKED_2, + SFX_HFOST_JACKED_3, + SFX_HFOST_JACKED_4, + SFX_HFOST_JACKED_5, + SFX_HFOST_JACKED_6, + SFX_HFOST_JACKED_7, + SFX_HFOST_JACKED_8, + SFX_HFOST_LOST_1, + SFX_HFOST_LOST_2, + SFX_HFOST_MUGGED_1, + SFX_HFOST_MUGGED_2, + SFX_HFOST_MUGGED_3, + SFX_HFOST_TAXI_1, + SFX_HFOST_TAXI_2, + + SFX_HMORI_BLOCKED_1, + SFX_HMORI_BLOCKED_2, + SFX_HMORI_BLOCKED_3, + SFX_HMORI_BLOCKED_4, + SFX_HMORI_BLOCKED_5, + SFX_HMORI_BLOCKED_6, + SFX_HMORI_BLOCKED_7, + SFX_HMORI_BLOCKED_8, + SFX_HMORI_BUMP_1, + SFX_HMORI_BUMP_2, + SFX_HMORI_BUMP_3, + SFX_HMORI_BUMP_4, + SFX_HMORI_BUMP_5, + SFX_HMORI_BUMP_6, + SFX_HMORI_BUMP_7, + SFX_HMORI_BUMP_8, + SFX_HMORI_BUMP_9, + SFX_HMORI_BUMP_10, + SFX_HMORI_BUMP_11, + SFX_HMORI_CAR_CRASH_1, + SFX_HMORI_CAR_CRASH_2, + SFX_HMORI_CAR_CRASH_3, + SFX_HMORI_CAR_CRASH_4, + SFX_HMORI_CAR_CRASH_5, + SFX_HMORI_CAR_CRASH_6, + SFX_HMORI_CHAT_1, + SFX_HMORI_CHAT_2, + SFX_HMORI_CHAT_3, + SFX_HMORI_CHAT_4, + SFX_HMORI_CHAT_5, + SFX_HMORI_CHAT_6, + SFX_HMORI_CHAT_7, + SFX_HMORI_CHAT_8, + SFX_HMORI_DODGE_1, + SFX_HMORI_DODGE_2, + SFX_HMORI_DODGE_3, + SFX_HMORI_DODGE_4, + SFX_HMORI_DODGE_5, + SFX_HMORI_DODGE_6, + SFX_HMORI_DODGE_7, + SFX_HMORI_GENERIC_CRASH_1, + SFX_HMORI_GENERIC_CRASH_2, + SFX_HMORI_GENERIC_CRASH_3, + SFX_HMORI_GENERIC_CRASH_4, + SFX_HMORI_GENERIC_CRASH_5, + SFX_HMORI_GENERIC_CRASH_6, + SFX_HMORI_GENERIC_CRASH_7, + SFX_HMORI_GENERIC_CRASH_8, + SFX_HMORI_GENERIC_CRASH_9, + SFX_HMORI_GENERIC_CRASH_10, + SFX_HMORI_GENERIC_CRASH_11, + SFX_HMORI_GUN_PANIC_1, + SFX_HMORI_GUN_PANIC_2, + SFX_HMORI_GUN_PANIC_3, + SFX_HMORI_GUN_PANIC_4, + SFX_HMORI_GUN_PANIC_5, + SFX_HMORI_JACKED_1, + SFX_HMORI_JACKED_2, + SFX_HMORI_JACKED_3, + SFX_HMORI_JACKED_4, + SFX_HMORI_JACKED_5, + SFX_HMORI_JACKED_6, + SFX_HMORI_JACKED_7, + SFX_HMORI_JACKED_8, + SFX_HMORI_LOST_1, + SFX_HMORI_LOST_2, + SFX_HMORI_MUGGED_1, + SFX_HMORI_MUGGED_2, + SFX_HMORI_MUGGED_3, + SFX_HMORI_RUN_1, + SFX_HMORI_RUN_2, + SFX_HMORI_RUN_3, + SFX_HMORI_RUN_4, + SFX_HMORI_RUN_5, + SFX_HMORI_RUN_6, + SFX_HMORI_TAXI_1, + SFX_HMORI_TAXI_2, + + SFX_HMOTR_BUMP_1, + SFX_HMOTR_BUMP_2, + SFX_HMOTR_BUMP_3, + SFX_HMOTR_BUMP_4, + SFX_HMOTR_BUMP_5, + SFX_HMOTR_BUMP_6, + SFX_HMOTR_BUMP_7, + SFX_HMOTR_BUMP_8, + SFX_HMOTR_CHAT_1, + SFX_HMOTR_CHAT_2, + SFX_HMOTR_CHAT_3, + SFX_HMOTR_CHAT_4, + SFX_HMOTR_CHAT_5, + SFX_HMOTR_CHAT_6, + SFX_HMOTR_CHAT_7, + SFX_HMOTR_CHAT_8, + SFX_HMOTR_CHAT_9, + SFX_HMOTR_DODGE_1, + SFX_HMOTR_DODGE_2, + SFX_HMOTR_DODGE_3, + SFX_HMOTR_DODGE_4, + SFX_HMOTR_DODGE_5, + SFX_HMOTR_DODGE_6, + SFX_HMOTR_DODGE_7, + SFX_HMOTR_DODGE_8, + SFX_HMOTR_DODGE_9, + SFX_HMOTR_DODGE_10, + SFX_HMOTR_DODGE_11, + SFX_HMOTR_FIGHT_1, + SFX_HMOTR_FIGHT_2, + SFX_HMOTR_FIGHT_3, + SFX_HMOTR_FIGHT_4, + SFX_HMOTR_FIGHT_5, + SFX_HMOTR_FIGHT_6, + SFX_HMOTR_FIGHT_7, + SFX_HMOTR_GUN_COOL_1, + SFX_HMOTR_GUN_COOL_2, + SFX_HMOTR_GUN_COOL_3, + SFX_HMOTR_GUN_COOL_4, + SFX_HMOTR_GUN_COOL_5, + SFX_HMOTR_GUN_COOL_6, + SFX_HMOTR_SAVED_1, + SFX_HMOTR_SAVED_2, + SFX_HMOTR_SHOCKED_1, + SFX_HMOTR_SHOCKED_2, + SFX_HMOTR_SHOCKED_3, + SFX_HMOTR_SOLICIT_1, + SFX_HMOTR_SOLICIT_2, + SFX_HMOTR_SOLICIT_3, + SFX_HMOTR_SOLICIT_4, + SFX_HMOTR_SOLICIT_5, + SFX_HMOTR_SOLICIT_6, + SFX_HMOTR_SOLICIT_7, + SFX_HMOTR_SOLICIT_8, + SFX_HMOTR_TAXI_1, + + SFX_HMYAP_BLOCKED_1, + SFX_HMYAP_BLOCKED_2, + SFX_HMYAP_BLOCKED_3, + SFX_HMYAP_BLOCKED_4, + SFX_HMYAP_BLOCKED_5, + SFX_HMYAP_BLOCKED_6, + SFX_HMYAP_BLOCKED_7, + SFX_HMYAP_BLOCKED_8, + SFX_HMYAP_BLOCKED_9, + SFX_HMYAP_BUMP_1, + SFX_HMYAP_BUMP_2, + SFX_HMYAP_BUMP_3, + SFX_HMYAP_BUMP_4, + SFX_HMYAP_BUMP_5, + SFX_HMYAP_BUMP_6, + SFX_HMYAP_BUMP_7, + SFX_HMYAP_BUMP_8, + SFX_HMYAP_BUMP_9, + SFX_HMYAP_BUMP_10, + SFX_HMYAP_BUMP_11, + SFX_HMYAP_CAR_CRASH_1, + SFX_HMYAP_CAR_CRASH_2, + SFX_HMYAP_CAR_CRASH_3, + SFX_HMYAP_CAR_CRASH_4, + SFX_HMYAP_CAR_CRASH_5, + SFX_HMYAP_CAR_CRASH_6, + SFX_HMYAP_CAR_CRASH_7, + SFX_HMYAP_CAR_CRASH_8, + SFX_HMYAP_CAR_CRASH_9, + SFX_HMYAP_CHAT_1, + SFX_HMYAP_CHAT_2, + SFX_HMYAP_CHAT_3, + SFX_HMYAP_CHAT_4, + SFX_HMYAP_CHAT_5, + SFX_HMYAP_CHAT_6, + SFX_HMYAP_CHAT_7, + SFX_HMYAP_CHAT_8, + SFX_HMYAP_CHAT_9, + SFX_HMYAP_DODGE_1, + SFX_HMYAP_DODGE_2, + SFX_HMYAP_DODGE_3, + SFX_HMYAP_DODGE_4, + SFX_HMYAP_DODGE_5, + SFX_HMYAP_DODGE_6, + SFX_HMYAP_DODGE_7, + SFX_HMYAP_DODGE_8, + SFX_HMYAP_DODGE_9, + SFX_HMYAP_EYEING_1, + SFX_HMYAP_EYEING_2, + SFX_HMYAP_EYEING_3, + SFX_HMYAP_GENERIC_CRASH_1, + SFX_HMYAP_GENERIC_CRASH_2, + SFX_HMYAP_GENERIC_CRASH_3, + SFX_HMYAP_GENERIC_CRASH_4, + SFX_HMYAP_GENERIC_CRASH_5, + SFX_HMYAP_GENERIC_CRASH_6, + SFX_HMYAP_GUN_PANIC_1, + SFX_HMYAP_GUN_PANIC_2, + SFX_HMYAP_GUN_PANIC_3, + SFX_HMYAP_GUN_PANIC_4, + SFX_HMYAP_GUN_PANIC_5, + SFX_HMYAP_GUN_PANIC_6, + SFX_HMYAP_GUN_PANIC_7, + SFX_HMYAP_JACKED_1, + SFX_HMYAP_JACKED_2, + SFX_HMYAP_JACKED_3, + SFX_HMYAP_JACKED_4, + SFX_HMYAP_JACKED_5, + SFX_HMYAP_JACKED_6, + SFX_HMYAP_JACKED_7, + SFX_HMYAP_JACKING_1, + SFX_HMYAP_JACKING_2, + SFX_HMYAP_JACKING_3, + SFX_HMYAP_JACKING_4, + SFX_HMYAP_LOST_1, + SFX_HMYAP_LOST_2, + SFX_HMYAP_MUGGED_1, + SFX_HMYAP_MUGGED_2, + SFX_HMYAP_RUN_1, + SFX_HMYAP_RUN_2, + SFX_HMYAP_RUN_3, + SFX_HMYAP_RUN_4, + SFX_HMYAP_RUN_5, + SFX_HMYAP_RUN_6, + SFX_HMYAP_SAVED_1, + SFX_HMYAP_SAVED_2, + SFX_HMYAP_TAXI_1, + SFX_HMYAP_TAXI_2, + + SFX_HFOTR_BUMP_1, + SFX_HFOTR_BUMP_2, + SFX_HFOTR_BUMP_3, + SFX_HFOTR_BUMP_4, + SFX_HFOTR_BUMP_5, + SFX_HFOTR_BUMP_6, + SFX_HFOTR_BUMP_7, + SFX_HFOTR_BUMP_8, + SFX_HFOTR_BUMP_9, + SFX_HFOTR_BUMP_10, + SFX_HFOTR_BUMP_11, + SFX_HFOTR_CHAT_1, + SFX_HFOTR_CHAT_2, + SFX_HFOTR_CHAT_3, + SFX_HFOTR_CHAT_4, + SFX_HFOTR_CHAT_5, + SFX_HFOTR_CHAT_6, + SFX_HFOTR_CHAT_7, + SFX_HFOTR_CHAT_8, + SFX_HFOTR_CHAT_9, + SFX_HFOTR_CHAT_10, + SFX_HFOTR_CHAT_11, + SFX_HFOTR_CHAT_12, + SFX_HFOTR_DODGE_1, + SFX_HFOTR_DODGE_2, + SFX_HFOTR_DODGE_3, + SFX_HFOTR_DODGE_4, + SFX_HFOTR_DODGE_5, + SFX_HFOTR_DODGE_6, + SFX_HFOTR_DODGE_7, + SFX_HFOTR_DODGE_8, + SFX_HFOTR_FIGHT_1, + SFX_HFOTR_FIGHT_2, + SFX_HFOTR_FIGHT_3, + SFX_HFOTR_FIGHT_4, + SFX_HFOTR_FIGHT_5, + SFX_HFOTR_FIGHT_6, + SFX_HFOTR_GUN_COOL_1, + SFX_HFOTR_GUN_COOL_2, + SFX_HFOTR_GUN_COOL_3, + SFX_HFOTR_GUN_COOL_4, + SFX_HFOTR_GUN_COOL_5, + SFX_HFOTR_MUGGED_1, + SFX_HFOTR_MUGGED_2, + SFX_HFOTR_SAVED_1, + SFX_HFOTR_SHOCKED_1, + SFX_HFOTR_SHOCKED_2, + SFX_HFOTR_TAXI_1, + SFX_HFOTR_TAXI_2, + + SFX_HMOBE_BLOCKED_1, + SFX_HMOBE_BLOCKED_2, + SFX_HMOBE_BLOCKED_3, + SFX_HMOBE_BLOCKED_4, + SFX_HMOBE_BLOCKED_5, + SFX_HMOBE_BLOCKED_6, + SFX_HMOBE_BLOCKED_7, + SFX_HMOBE_BLOCKED_8, + SFX_HMOBE_BLOCKED_9, + SFX_HMOBE_BLOCKED_10, + SFX_HMOBE_BUMP_1, + SFX_HMOBE_BUMP_2, + SFX_HMOBE_BUMP_3, + SFX_HMOBE_BUMP_4, + SFX_HMOBE_BUMP_5, + SFX_HMOBE_BUMP_6, + SFX_HMOBE_BUMP_7, + SFX_HMOBE_BUMP_8, + SFX_HMOBE_DODGE_1, + SFX_HMOBE_DODGE_2, + SFX_HMOBE_DODGE_3, + SFX_HMOBE_DODGE_4, + SFX_HMOBE_DODGE_5, + SFX_HMOBE_DODGE_6, + SFX_HMOBE_DODGE_7, + SFX_HMOBE_DODGE_8, + SFX_HMOBE_DODGE_9, + SFX_HMOBE_EYEING_1, + SFX_HMOBE_EYEING_2, + SFX_HMOBE_EYEING_3, + SFX_HMOBE_EYEING_4, + SFX_HMOBE_GUN_PANIC_1, + SFX_HMOBE_GUN_PANIC_2, + SFX_HMOBE_GUN_PANIC_3, + SFX_HMOBE_INNOCENT_1, + SFX_HMOBE_INNOCENT_2, + SFX_HMOBE_INNOCENT_3, + SFX_HMOBE_JACKED_1, + SFX_HMOBE_JACKED_2, + SFX_HMOBE_JACKED_3, + SFX_HMOBE_JACKED_4, + SFX_HMOBE_JACKED_5, + SFX_HMOBE_JACKED_6, + + SFX_HFYBU_BLOCKED_1, + SFX_HFYBU_BLOCKED_2, + SFX_HFYBU_BLOCKED_3, + SFX_HFYBU_BLOCKED_4, + SFX_HFYBU_BLOCKED_5, + SFX_HFYBU_BLOCKED_6, + SFX_HFYBU_BLOCKED_7, + SFX_HFYBU_BLOCKED_8, + SFX_HFYBU_BUMP_1, + SFX_HFYBU_BUMP_2, + SFX_HFYBU_BUMP_3, + SFX_HFYBU_BUMP_4, + SFX_HFYBU_BUMP_5, + SFX_HFYBU_BUMP_6, + SFX_HFYBU_BUMP_7, + SFX_HFYBU_BUMP_8, + SFX_HFYBU_BUMP_9, + SFX_HFYBU_BUMP_10, + SFX_HFYBU_BUMP_11, + SFX_HFYBU_CAR_CRASH_1, + SFX_HFYBU_CAR_CRASH_2, + SFX_HFYBU_CAR_CRASH_3, + SFX_HFYBU_CAR_CRASH_4, + SFX_HFYBU_CAR_CRASH_5, + SFX_HFYBU_CAR_CRASH_6, + SFX_HFYBU_CAR_CRASH_7, + SFX_HFYBU_CAR_CRASH_8, + SFX_HFYBU_DODGE_1, + SFX_HFYBU_DODGE_2, + SFX_HFYBU_DODGE_3, + SFX_HFYBU_DODGE_4, + SFX_HFYBU_DODGE_5, + SFX_HFYBU_DODGE_6, + SFX_HFYBU_DODGE_7, + SFX_HFYBU_DODGE_8, + SFX_HFYBU_DODGE_9, + SFX_HFYBU_DODGE_10, + SFX_HFYBU_FIGHT_1, + SFX_HFYBU_FIGHT_2, + SFX_HFYBU_FIGHT_3, + SFX_HFYBU_FIGHT_4, + SFX_HFYBU_FIGHT_5, + SFX_HFYBU_FIGHT_6, + SFX_HFYBU_FIGHT_7, + SFX_HFYBU_GENERIC_CRASH_1, + SFX_HFYBU_GENERIC_CRASH_2, + SFX_HFYBU_GENERIC_CRASH_3, + SFX_HFYBU_GENERIC_CRASH_4, + SFX_HFYBU_GENERIC_CRASH_5, + SFX_HFYBU_GENERIC_CRASH_6, + SFX_HFYBU_GENERIC_CRASH_7, + SFX_HFYBU_GENERIC_CRASH_8, + SFX_HFYBU_GENERIC_CRASH_9, + SFX_HFYBU_GENERIC_CRASH_10, + SFX_HFYBU_GENERIC_CRASH_11, + SFX_HFYBU_GENERIC_CRASH_12, + SFX_HFYBU_GUN_PANIC_1, + SFX_HFYBU_GUN_PANIC_2, + SFX_HFYBU_GUN_PANIC_3, + SFX_HFYBU_GUN_PANIC_4, + SFX_HFYBU_GUN_PANIC_5, + SFX_HFYBU_JACKED_1, + SFX_HFYBU_JACKED_2, + SFX_HFYBU_JACKED_3, + SFX_HFYBU_JACKED_4, + SFX_HFYBU_JACKED_5, + SFX_HFYBU_JACKED_6, + SFX_HFYBU_JACKING_1, + SFX_HFYBU_JACKING_2, + SFX_HFYBU_JACKING_3, + SFX_HFYBU_LOST_1, + SFX_HFYBU_LOST_2, + SFX_HFYBU_MUGGED_1, + SFX_HFYBU_MUGGED_2, + SFX_HFYBU_SAVED_1, + SFX_HFYBU_TAXI_1, + + SFX_HFYCG_BUMP_1, + SFX_HFYCG_BUMP_2, + SFX_HFYCG_BUMP_3, + SFX_HFYCG_BUMP_4, + SFX_HFYCG_BUMP_5, + SFX_HFYCG_BUMP_6, + SFX_HFYCG_BUMP_7, + SFX_HFYCG_BUMP_8, + SFX_HFYCG_BUMP_9, + SFX_HFYCG_DODGE_1, + SFX_HFYCG_DODGE_2, + SFX_HFYCG_DODGE_3, + SFX_HFYCG_DODGE_4, + SFX_HFYCG_DODGE_5, + SFX_HFYCG_DODGE_6, + SFX_HFYCG_DODGE_7, + SFX_HFYCG_DODGE_8, + SFX_HFYCG_GUN_PANIC_1, + SFX_HFYCG_GUN_PANIC_2, + SFX_HFYCG_GUN_PANIC_3, + SFX_HFYCG_GUN_PANIC_4, + SFX_HFYCG_GUN_PANIC_5, + SFX_HFYCG_MUGGED_1, + SFX_HFYCG_MUGGED_2, + SFX_HFYCG_RUN_1, + SFX_HFYCG_RUN_2, + SFX_HFYCG_RUN_3, + SFX_HFYCG_RUN_4, + SFX_HFYCG_SAVED_1, + SFX_HFYCG_SOLICIT_1, + SFX_HFYCG_SOLICIT_2, + SFX_HFYCG_SOLICIT_3, + SFX_HFYCG_SOLICIT_4, + SFX_HFYCG_SOLICIT_5, + SFX_HFYCG_SOLICIT_6, + SFX_HFYCG_SOLICIT_7, + SFX_HFYCG_SOLICIT_8, + SFX_HFYCG_SOLICIT_9, + SFX_HFYCG_SOLICIT_10, + SFX_HFYCG_SOLICIT_11, + SFX_HFYCG_SOLICIT_12, + SFX_HFYCG_SOLICIT_13, + SFX_HFYCG_SOLICIT_14, + SFX_HFYCG_TAXI_1, + + SFX_HMYBE_BUMP_1, + SFX_HMYBE_BUMP_2, + SFX_HMYBE_BUMP_3, + SFX_HMYBE_BUMP_4, + SFX_HMYBE_BUMP_5, + SFX_HMYBE_BUMP_6, + SFX_HMYBE_BUMP_7, + SFX_HMYBE_BUMP_8, + SFX_HMYBE_BUMP_9, + SFX_HMYBE_BUMP_10, + SFX_HMYBE_CAR_CRASH_1, + SFX_HMYBE_CAR_CRASH_2, + SFX_HMYBE_CAR_CRASH_3, + SFX_HMYBE_CAR_CRASH_4, + SFX_HMYBE_CAR_CRASH_5, + SFX_HMYBE_CAR_CRASH_6, + SFX_HMYBE_CAR_CRASH_7, + SFX_HMYBE_CHAT_1, + SFX_HMYBE_CHAT_2, + SFX_HMYBE_CHAT_3, + SFX_HMYBE_CHAT_4, + SFX_HMYBE_CHAT_5, + SFX_HMYBE_CHAT_6, + SFX_HMYBE_CHAT_7, + SFX_HMYBE_CHAT_8, + SFX_HMYBE_CHAT_9, + SFX_HMYBE_CHAT_10, + SFX_HMYBE_DODGE_1, + SFX_HMYBE_DODGE_2, + SFX_HMYBE_DODGE_3, + SFX_HMYBE_DODGE_4, + SFX_HMYBE_DODGE_5, + SFX_HMYBE_DODGE_6, + SFX_HMYBE_DODGE_7, + SFX_HMYBE_EYEING_1, + SFX_HMYBE_EYEING_2, + SFX_HMYBE_EYEING_3, + SFX_HMYBE_EYEING_4, + SFX_HMYBE_EYEING_5, + SFX_HMYBE_FIGHT_1, + SFX_HMYBE_FIGHT_2, + SFX_HMYBE_FIGHT_3, + SFX_HMYBE_FIGHT_4, + SFX_HMYBE_FIGHT_5, + SFX_HMYBE_FIGHT_6, + SFX_HMYBE_FIGHT_7, + SFX_HMYBE_FIGHT_8, + SFX_HMYBE_GENERIC_CRASH_1, + SFX_HMYBE_GENERIC_CRASH_2, + SFX_HMYBE_GENERIC_CRASH_3, + SFX_HMYBE_GENERIC_CRASH_4, + SFX_HMYBE_GENERIC_CRASH_5, + SFX_HMYBE_GENERIC_CRASH_6, + SFX_HMYBE_GENERIC_CRASH_7, + SFX_HMYBE_GENERIC_CRASH_8, + SFX_HMYBE_GENERIC_CRASH_9, + SFX_HMYBE_GENERIC_CRASH_10, + SFX_HMYBE_GUN_PANIC_1, + SFX_HMYBE_GUN_PANIC_2, + SFX_HMYBE_GUN_PANIC_3, + SFX_HMYBE_GUN_PANIC_4, + SFX_HMYBE_GUN_PANIC_5, + SFX_HMYBE_GUN_PANIC_6, + SFX_HMYBE_INNOCENT_1, + SFX_HMYBE_INNOCENT_2, + SFX_HMYBE_INNOCENT_3, + SFX_HMYBE_INNOCENT_4, + SFX_HMYBE_JACKED_1, + SFX_HMYBE_JACKED_2, + SFX_HMYBE_JACKED_3, + SFX_HMYBE_JACKED_4, + SFX_HMYBE_JACKED_5, + SFX_HMYBE_JACKED_6, + SFX_HMYBE_JACKED_7, + SFX_HMYBE_JACKED_8, + SFX_HMYBE_JACKED_9, + SFX_HMYBE_JACKED_10, + SFX_HMYBE_JACKED_11, + SFX_HMYBE_JACKED_12, + SFX_HMYBE_LOST_1, + SFX_HMYBE_LOST_2, + SFX_HMYBE_LOST_3, + SFX_HMYBE_SAVED_1, + SFX_HMYBE_SHOCKED_1, + SFX_HMYBE_SHOCKED_2, + SFX_HMYBE_TAXI_1, + + SFX_WMOGO_BUMP_1, + SFX_WMOGO_BUMP_2, + SFX_WMOGO_BUMP_3, + SFX_WMOGO_BUMP_4, + SFX_WMOGO_BUMP_5, + SFX_WMOGO_BUMP_6, + SFX_WMOGO_BUMP_7, + SFX_WMOGO_BUMP_8, + SFX_WMOGO_CAR_CRASH_1, + SFX_WMOGO_CAR_CRASH_2, + SFX_WMOGO_CAR_CRASH_3, + SFX_WMOGO_CAR_CRASH_4, + SFX_WMOGO_CAR_CRASH_5, + SFX_WMOGO_CAR_CRASH_6, + SFX_WMOGO_CAR_CRASH_7, + SFX_WMOGO_CAR_CRASH_8, + SFX_WMOGO_CAR_CRASH_9, + SFX_WMOGO_CHAT_1, + SFX_WMOGO_CHAT_2, + SFX_WMOGO_CHAT_3, + SFX_WMOGO_CHAT_4, + SFX_WMOGO_CHAT_5, + SFX_WMOGO_CHAT_6, + SFX_WMOGO_CHAT_7, + SFX_WMOGO_CHAT_8, + SFX_WMOGO_CHAT_9, + SFX_WMOGO_DODGE_1, + SFX_WMOGO_DODGE_2, + SFX_WMOGO_DODGE_3, + SFX_WMOGO_DODGE_4, + SFX_WMOGO_DODGE_5, + SFX_WMOGO_DODGE_6, + SFX_WMOGO_DODGE_7, + SFX_WMOGO_DODGE_8, + SFX_WMOGO_DODGE_9, + SFX_WMOGO_DODGE_10, + SFX_WMOGO_DODGE_11, + SFX_WMOGO_DODGE_12, + SFX_WMOGO_EYEING_1, + SFX_WMOGO_EYEING_2, + SFX_WMOGO_FIGHT_1, + SFX_WMOGO_FIGHT_2, + SFX_WMOGO_FIGHT_3, + SFX_WMOGO_FIGHT_4, + SFX_WMOGO_FIGHT_5, + SFX_WMOGO_FIGHT_6, + SFX_WMOGO_FIGHT_7, + SFX_WMOGO_FIGHT_8, + SFX_WMOGO_FIGHT_9, + SFX_WMOGO_FIGHT_10, + SFX_WMOGO_FIGHT_11, + SFX_WMOGO_FIGHT_12, + SFX_WMOGO_FIGHT_13, + SFX_WMOGO_GENERIC_CRASH_1, + SFX_WMOGO_GENERIC_CRASH_2, + SFX_WMOGO_GENERIC_CRASH_3, + SFX_WMOGO_GENERIC_CRASH_4, + SFX_WMOGO_GENERIC_CRASH_5, + SFX_WMOGO_GENERIC_CRASH_6, + SFX_WMOGO_GENERIC_CRASH_7, + SFX_WMOGO_GENERIC_CRASH_8, + SFX_WMOGO_GUN_PANIC_1, + SFX_WMOGO_GUN_PANIC_2, + SFX_WMOGO_GUN_PANIC_3, + SFX_WMOGO_GUN_PANIC_4, + SFX_WMOGO_GUN_PANIC_5, + SFX_WMOGO_JACKED_1, + SFX_WMOGO_JACKED_2, + SFX_WMOGO_JACKED_3, + SFX_WMOGO_JACKED_4, + SFX_WMOGO_JACKED_5, + SFX_WMOGO_JACKED_6, + SFX_WMOGO_RUN_1, + SFX_WMOGO_RUN_2, + SFX_WMOGO_RUN_3, + SFX_WMOGO_RUN_4, + SFX_WMOGO_RUN_5, + SFX_WMOGO_SAVED_1, + SFX_WMOGO_SHOCKED_1, + SFX_WMOGO_SHOCKED_2, + SFX_WMOGO_SHOCKED_3, + SFX_WMOGO_TAXI_1, + + SFX_WMYCR_BUMP_1, + SFX_WMYCR_BUMP_2, + SFX_WMYCR_BUMP_3, + SFX_WMYCR_BUMP_4, + SFX_WMYCR_BUMP_5, + SFX_WMYCR_BUMP_6, + SFX_WMYCR_BUMP_7, + SFX_WMYCR_BUMP_8, + SFX_WMYCR_BUMP_9, + SFX_WMYCR_BUMP_10, + SFX_WMYCR_BUMP_11, + SFX_WMYCR_BUMP_12, + SFX_WMYCR_BUMP_13, + SFX_WMYCR_BUMP_14, + SFX_WMYCR_BUMP_15, + SFX_WMYCR_BUMP_16, + SFX_WMYCR_BUMP_17, + SFX_WMYCR_BUMP_18, + SFX_WMYCR_CAR_CRASH_1, + SFX_WMYCR_CAR_CRASH_2, + SFX_WMYCR_CAR_CRASH_3, + SFX_WMYCR_CAR_CRASH_4, + SFX_WMYCR_CAR_CRASH_5, + SFX_WMYCR_CAR_CRASH_6, + SFX_WMYCR_CAR_CRASH_7, + SFX_WMYCR_CAR_CRASH_8, + SFX_WMYCR_CAR_CRASH_9, + SFX_WMYCR_DODGE_1, + SFX_WMYCR_DODGE_2, + SFX_WMYCR_DODGE_3, + SFX_WMYCR_DODGE_4, + SFX_WMYCR_DODGE_5, + SFX_WMYCR_DODGE_6, + SFX_WMYCR_DODGE_7, + SFX_WMYCR_DODGE_8, + SFX_WMYCR_DODGE_9, + SFX_WMYCR_DODGE_10, + SFX_WMYCR_FIGHT_1, + SFX_WMYCR_FIGHT_2, + SFX_WMYCR_FIGHT_3, + SFX_WMYCR_FIGHT_4, + SFX_WMYCR_FIGHT_5, + SFX_WMYCR_FIGHT_6, + SFX_WMYCR_FIGHT_7, + SFX_WMYCR_GENERIC_CRASH_1, + SFX_WMYCR_GENERIC_CRASH_2, + SFX_WMYCR_GENERIC_CRASH_3, + SFX_WMYCR_GENERIC_CRASH_4, + SFX_WMYCR_GENERIC_CRASH_5, + SFX_WMYCR_GENERIC_CRASH_6, + SFX_WMYCR_GENERIC_CRASH_7, + SFX_WMYCR_GENERIC_CRASH_8, + SFX_WMYCR_GENERIC_CRASH_9, + SFX_WMYCR_GUN_COOL_1, + SFX_WMYCR_GUN_COOL_2, + SFX_WMYCR_GUN_COOL_3, + SFX_WMYCR_GUN_COOL_4, + SFX_WMYCR_GUN_COOL_5, + SFX_WMYCR_JACKING_1, + SFX_WMYCR_JACKING_2, + SFX_WMYCR_JACKING_3, + SFX_WMYCR_JACKING_4, + SFX_WMYCR_JACKING_5, + SFX_WMYCR_JACKING_6, + SFX_WMYCR_MUGGED_1, + SFX_WMYCR_MUGGED_2, + SFX_WMYCR_MUGGED_3, + SFX_WMYCR_MUGGING_1, + SFX_WMYCR_MUGGING_2, + SFX_WMYCR_MUGGING_3, + SFX_WMYCR_MUGGING_4, + SFX_WMYCR_MUGGING_5, + SFX_WMYCR_TAXI_1, + + SFX_WMYJG_BLOCKED_1, + SFX_WMYJG_BLOCKED_2, + SFX_WMYJG_BLOCKED_3, + SFX_WMYJG_BLOCKED_4, + SFX_WMYJG_BLOCKED_5, + SFX_WMYJG_BLOCKED_6, + SFX_WMYJG_BLOCKED_7, + SFX_WMYJG_BLOCKED_8, + SFX_WMYJG_BLOCKED_9, + SFX_WMYJG_BLOCKED_10, + SFX_WMYJG_BUMP_1, + SFX_WMYJG_BUMP_2, + SFX_WMYJG_BUMP_3, + SFX_WMYJG_BUMP_4, + SFX_WMYJG_BUMP_5, + SFX_WMYJG_BUMP_6, + SFX_WMYJG_BUMP_7, + SFX_WMYJG_BUMP_8, + SFX_WMYJG_BUMP_9, + SFX_WMYJG_BUMP_10, + SFX_WMYJG_EYEING_1, + SFX_WMYJG_EYEING_2, + SFX_WMYJG_GUN_PANIC_1, + SFX_WMYJG_GUN_PANIC_2, + SFX_WMYJG_GUN_PANIC_3, + SFX_WMYJG_GUN_PANIC_4, + SFX_WMYJG_MUGGED_1, + SFX_WMYJG_MUGGED_2, + SFX_WMYJG_RUN_1, + SFX_WMYJG_RUN_2, + SFX_WMYJG_RUN_3, + SFX_WMYJG_RUN_4, + SFX_WMYJG_RUN_5, + SFX_WMYJG_SAVED_1, + SFX_WMYJG_TAXI_1, + + SFX_WMOST_BLOCKED_1, + SFX_WMOST_BLOCKED_2, + SFX_WMOST_BLOCKED_3, + SFX_WMOST_BLOCKED_4, + SFX_WMOST_BLOCKED_5, + SFX_WMOST_BLOCKED_6, + SFX_WMOST_BLOCKED_7, + SFX_WMOST_BLOCKED_8, + SFX_WMOST_BUMP_1, + SFX_WMOST_BUMP_2, + SFX_WMOST_BUMP_3, + SFX_WMOST_BUMP_4, + SFX_WMOST_BUMP_5, + SFX_WMOST_BUMP_6, + SFX_WMOST_BUMP_7, + SFX_WMOST_BUMP_8, + SFX_WMOST_BUMP_9, + SFX_WMOST_BUMP_10, + SFX_WMOST_CAR_CRASH_1, + SFX_WMOST_CAR_CRASH_2, + SFX_WMOST_CAR_CRASH_3, + SFX_WMOST_CAR_CRASH_4, + SFX_WMOST_CAR_CRASH_5, + SFX_WMOST_CAR_CRASH_6, + SFX_WMOST_CAR_CRASH_7, + SFX_WMOST_CHAT_1, + SFX_WMOST_CHAT_2, + SFX_WMOST_CHAT_3, + SFX_WMOST_CHAT_4, + SFX_WMOST_CHAT_5, + SFX_WMOST_CHAT_6, + SFX_WMOST_CHAT_7, + SFX_WMOST_CHAT_8, + SFX_WMOST_CHAT_9, + SFX_WMOST_DODGE_1, + SFX_WMOST_DODGE_2, + SFX_WMOST_DODGE_3, + SFX_WMOST_DODGE_4, + SFX_WMOST_DODGE_5, + SFX_WMOST_DODGE_6, + SFX_WMOST_DODGE_7, + SFX_WMOST_DODGE_8, + SFX_WMOST_EYEING_1, + SFX_WMOST_EYEING_2, + SFX_WMOST_FIGHT_1, + SFX_WMOST_FIGHT_2, + SFX_WMOST_FIGHT_3, + SFX_WMOST_FIGHT_4, + SFX_WMOST_FIGHT_5, + SFX_WMOST_FIGHT_6, + SFX_WMOST_FIGHT_7, + SFX_WMOST_FIGHT_8, + SFX_WMOST_GENERIC_CRASH_1, + SFX_WMOST_GENERIC_CRASH_2, + SFX_WMOST_GENERIC_CRASH_3, + SFX_WMOST_GENERIC_CRASH_4, + SFX_WMOST_GENERIC_CRASH_5, + SFX_WMOST_GENERIC_CRASH_6, + SFX_WMOST_GENERIC_CRASH_7, + SFX_WMOST_GUN_COOL_1, + SFX_WMOST_GUN_COOL_2, + SFX_WMOST_GUN_COOL_3, + SFX_WMOST_GUN_COOL_4, + SFX_WMOST_GUN_COOL_5, + SFX_WMOST_INNOCENT_1, + SFX_WMOST_INNOCENT_2, + SFX_WMOST_INNOCENT_3, + SFX_WMOST_JACKED_1, + SFX_WMOST_JACKED_2, + SFX_WMOST_JACKED_3, + SFX_WMOST_JACKED_4, + SFX_WMOST_JEER_1, + SFX_WMOST_JEER_2, + SFX_WMOST_JEER_3, + SFX_WMOST_JEER_4, + SFX_WMOST_LOST_1, + SFX_WMOST_LOST_2, + SFX_WMOST_MUGGED_1, + SFX_WMOST_MUGGED_2, + SFX_WMOST_SAVED_1, + SFX_WMOST_TAXI_1, + + SFX_BFOTR_BUMP_1, + SFX_BFOTR_BUMP_2, + SFX_BFOTR_BUMP_3, + SFX_BFOTR_BUMP_4, + SFX_BFOTR_BUMP_5, + SFX_BFOTR_BUMP_6, + SFX_BFOTR_BUMP_7, + SFX_BFOTR_BUMP_8, + SFX_BFOTR_BUMP_9, + SFX_BFOTR_BUMP_10, + SFX_BFOTR_CHAT_1, + SFX_BFOTR_CHAT_2, + SFX_BFOTR_CHAT_3, + SFX_BFOTR_CHAT_4, + SFX_BFOTR_CHAT_5, + SFX_BFOTR_CHAT_6, + SFX_BFOTR_CHAT_7, + SFX_BFOTR_CHAT_8, + SFX_BFOTR_CHAT_9, + SFX_BFOTR_CHAT_10, + SFX_BFOTR_CHAT_11, + SFX_BFOTR_CHAT_12, + SFX_BFOTR_CHAT_13, + SFX_BFOTR_CHAT_14, + SFX_BFOTR_CHAT_15, + SFX_BFOTR_DODGE_1, + SFX_BFOTR_DODGE_2, + SFX_BFOTR_DODGE_3, + SFX_BFOTR_DODGE_4, + SFX_BFOTR_DODGE_5, + SFX_BFOTR_DODGE_6, + SFX_BFOTR_DODGE_7, + SFX_BFOTR_DODGE_8, + SFX_BFOTR_DODGE_9, + SFX_BFOTR_FIGHT_1, + SFX_BFOTR_FIGHT_2, + SFX_BFOTR_FIGHT_3, + SFX_BFOTR_FIGHT_4, + SFX_BFOTR_FIGHT_5, + SFX_BFOTR_FIGHT_6, + SFX_BFOTR_GUN_COOL_1, + SFX_BFOTR_GUN_COOL_2, + SFX_BFOTR_GUN_COOL_3, + SFX_BFOTR_GUN_COOL_4, + SFX_BFOTR_GUN_COOL_5, + SFX_BFOTR_GUN_COOL_6, + SFX_BFOTR_MUGGED_1, + SFX_BFOTR_MUGGED_2, + SFX_BFOTR_MUGGING_1, + SFX_BFOTR_MUGGING_2, + SFX_BFOTR_MUGGING_3, + SFX_BFOTR_SAVED_1, + SFX_BFOTR_SHOCKED_1, + SFX_BFOTR_SHOCKED_2, + SFX_BFOTR_SHOCKED_3, + SFX_BFOTR_SOLICIT_1, + SFX_BFOTR_SOLICIT_2, + SFX_BFOTR_SOLICIT_3, + SFX_BFOTR_SOLICIT_4, + SFX_BFOTR_SOLICIT_5, + SFX_BFOTR_TAXI_1, + + SFX_WFYRI_BLOCKED_1, + SFX_WFYRI_BLOCKED_2, + SFX_WFYRI_BLOCKED_3, + SFX_WFYRI_BLOCKED_4, + SFX_WFYRI_BLOCKED_5, + SFX_WFYRI_BLOCKED_6, + SFX_WFYRI_BLOCKED_7, + SFX_WFYRI_BLOCKED_8, + SFX_WFYRI_BUMP_1, + SFX_WFYRI_BUMP_2, + SFX_WFYRI_BUMP_3, + SFX_WFYRI_BUMP_4, + SFX_WFYRI_BUMP_5, + SFX_WFYRI_BUMP_6, + SFX_WFYRI_BUMP_7, + SFX_WFYRI_BUMP_8, + SFX_WFYRI_BUMP_9, + SFX_WFYRI_BUMP_10, + SFX_WFYRI_CAR_CRASH_1, + SFX_WFYRI_CAR_CRASH_2, + SFX_WFYRI_CAR_CRASH_3, + SFX_WFYRI_CAR_CRASH_4, + SFX_WFYRI_CAR_CRASH_5, + SFX_WFYRI_CAR_CRASH_6, + SFX_WFYRI_CAR_CRASH_7, + SFX_WFYRI_CAR_CRASH_8, + SFX_WFYRI_CAR_CRASH_9, + SFX_WFYRI_DODGE_1, + SFX_WFYRI_DODGE_2, + SFX_WFYRI_DODGE_3, + SFX_WFYRI_DODGE_4, + SFX_WFYRI_DODGE_5, + SFX_WFYRI_DODGE_6, + SFX_WFYRI_DODGE_7, + SFX_WFYRI_DODGE_8, + SFX_WFYRI_DODGE_9, + SFX_WFYRI_EYEING_1, + SFX_WFYRI_EYEING_2, + SFX_WFYRI_GENERIC_CRASH_1, + SFX_WFYRI_GENERIC_CRASH_2, + SFX_WFYRI_GENERIC_CRASH_3, + SFX_WFYRI_GENERIC_CRASH_4, + SFX_WFYRI_GENERIC_CRASH_5, + SFX_WFYRI_GENERIC_CRASH_6, + SFX_WFYRI_GENERIC_CRASH_7, + SFX_WFYRI_GENERIC_CRASH_8, + SFX_WFYRI_GUN_PANIC_1, + SFX_WFYRI_GUN_PANIC_2, + SFX_WFYRI_GUN_PANIC_3, + SFX_WFYRI_GUN_PANIC_4, + SFX_WFYRI_GUN_PANIC_5, + SFX_WFYRI_JACKED_1, + SFX_WFYRI_JACKED_2, + SFX_WFYRI_JACKED_3, + SFX_WFYRI_JACKED_4, + SFX_WFYRI_JACKED_5, + SFX_WFYRI_JACKED_6, + SFX_WFYRI_JACKED_7, + SFX_WFYRI_LOST_1, + SFX_WFYRI_LOST_2, + SFX_WFYRI_MUGGED_1, + SFX_WFYRI_MUGGED_2, + SFX_WFYRI_RUN_1, + SFX_WFYRI_RUN_2, + SFX_WFYRI_RUN_3, + SFX_WFYRI_RUN_4, + SFX_WFYRI_RUN_5, + SFX_WFYRI_SAVED_1, + SFX_WFYRI_SHOCKED_1, + SFX_WFYRI_SHOCKED_2, + SFX_WFYRI_TAXI_1, + SFX_BFYPR_BUMP_1, + SFX_BFYPR_BUMP_2, + SFX_BFYPR_BUMP_3, + SFX_BFYPR_BUMP_4, + SFX_BFYPR_BUMP_5, + SFX_BFYPR_BUMP_6, + SFX_BFYPR_BUMP_7, + SFX_BFYPR_BUMP_8, + SFX_BFYPR_BUMP_9, + SFX_BFYPR_BUMP_10, + SFX_BFYPR_BUMP_11, + SFX_BFYPR_CHAT_1, + SFX_BFYPR_CHAT_2, + SFX_BFYPR_CHAT_3, + SFX_BFYPR_CHAT_4, + SFX_BFYPR_CHAT_5, + SFX_BFYPR_CHAT_6, + SFX_BFYPR_CHAT_7, + SFX_BFYPR_CHAT_8, + SFX_BFYPR_CHAT_9, + SFX_BFYPR_CHAT_10, + SFX_BFYPR_CHAT_11, + SFX_BFYPR_CHAT_12, + SFX_BFYPR_CHAT_13, + SFX_BFYPR_DODGE_1, + SFX_BFYPR_DODGE_2, + SFX_BFYPR_DODGE_3, + SFX_BFYPR_DODGE_4, + SFX_BFYPR_DODGE_5, + SFX_BFYPR_DODGE_6, + SFX_BFYPR_DODGE_7, + SFX_BFYPR_FIGHT_1, + SFX_BFYPR_FIGHT_2, + SFX_BFYPR_FIGHT_3, + SFX_BFYPR_FIGHT_4, + SFX_BFYPR_FIGHT_5, + SFX_BFYPR_FIGHT_6, + SFX_BFYPR_FIGHT_7, + SFX_BFYPR_FUCKING_1, + SFX_BFYPR_FUCKING_2, + SFX_BFYPR_FUCKING_3, + SFX_BFYPR_FUCKING_4, + SFX_BFYPR_FUCKING_5, + SFX_BFYPR_FUCKING_6, + SFX_BFYPR_FUCKING_7, + SFX_BFYPR_GUN_COOL_1, + SFX_BFYPR_GUN_COOL_2, + SFX_BFYPR_GUN_COOL_3, + SFX_BFYPR_GUN_COOL_4, + SFX_BFYPR_GUN_COOL_5, + SFX_BFYPR_MUGGED_1, + SFX_BFYPR_MUGGED_2, + SFX_BFYPR_SAVED_1, + SFX_BFYPR_SHOCKED_1, + SFX_BFYPR_SHOCKED_2, + SFX_BFYPR_SOLICIT_1, + SFX_BFYPR_SOLICIT_2, + SFX_BFYPR_SOLICIT_3, + SFX_BFYPR_SOLICIT_4, + SFX_BFYPR_SOLICIT_5, + SFX_BFYPR_SOLICIT_6, + SFX_BFYPR_SOLICIT_7, + SFX_BFYPR_SOLICIT_8, + SFX_BFYPR_SOLICIT_9, + SFX_BFYPR_SOLICIT_10, + SFX_BFYPR_SOLICIT_11, + SFX_BFYPR_SOLICIT_12, + SFX_BFYPR_SOLICIT_13, + SFX_BFYPR_TAXI_1, + SFX_BFYPR_TAXI_2, + + SFX_BMYRI_BLOCKED_1, + SFX_BMYRI_BLOCKED_2, + SFX_BMYRI_BLOCKED_3, + SFX_BMYRI_BLOCKED_4, + SFX_BMYRI_BLOCKED_5, + SFX_BMYRI_BLOCKED_6, + SFX_BMYRI_BUMP_1, + SFX_BMYRI_BUMP_2, + SFX_BMYRI_BUMP_3, + SFX_BMYRI_BUMP_4, + SFX_BMYRI_BUMP_5, + SFX_BMYRI_BUMP_6, + SFX_BMYRI_BUMP_7, + SFX_BMYRI_CAR_CRASH_1, + SFX_BMYRI_CAR_CRASH_2, + SFX_BMYRI_CAR_CRASH_3, + SFX_BMYRI_CAR_CRASH_4, + SFX_BMYRI_CAR_CRASH_5, + SFX_BMYRI_CAR_CRASH_6, + SFX_BMYRI_CAR_CRASH_7, + SFX_BMYRI_DODGE_1, + SFX_BMYRI_DODGE_2, + SFX_BMYRI_DODGE_3, + SFX_BMYRI_DODGE_4, + SFX_BMYRI_DODGE_5, + SFX_BMYRI_DODGE_6, + SFX_BMYRI_DODGE_7, + SFX_BMYRI_DODGE_8, + SFX_BMYRI_EYEING_1, + SFX_BMYRI_GENERIC_CRASH_1, + SFX_BMYRI_GENERIC_CRASH_2, + SFX_BMYRI_GENERIC_CRASH_3, + SFX_BMYRI_GENERIC_CRASH_4, + SFX_BMYRI_GENERIC_CRASH_5, + SFX_BMYRI_GENERIC_CRASH_6, + SFX_BMYRI_GENERIC_CRASH_7, + SFX_BMYRI_GUN_PANIC_1, + SFX_BMYRI_GUN_PANIC_2, + SFX_BMYRI_GUN_PANIC_3, + SFX_BMYRI_GUN_PANIC_4, + SFX_BMYRI_GUN_PANIC_5, + SFX_BMYRI_GUN_PANIC_6, + SFX_BMYRI_GUN_PANIC_7, + SFX_BMYRI_JACKED_1, + SFX_BMYRI_JACKED_2, + SFX_BMYRI_JACKED_3, + SFX_BMYRI_JACKED_4, + SFX_BMYRI_LOST_1, + SFX_BMYRI_LOST_2, + SFX_BMYRI_MUGGED_1, + SFX_BMYRI_MUGGED_2, + SFX_BMYRI_RUN_1, + SFX_BMYRI_RUN_2, + SFX_BMYRI_RUN_3, + SFX_BMYRI_RUN_4, + SFX_BMYRI_SAVED_1, + SFX_BMYRI_SHOCKED_1, + SFX_BMYRI_SHOCKED_2, + SFX_BMYRI_SHOCKED_3, + SFX_BMYRI_TAXI_1, + SFX_BMYBU_BLOCKED_1, + SFX_BMYBU_BLOCKED_2, + SFX_BMYBU_BLOCKED_3, + SFX_BMYBU_BLOCKED_4, + SFX_BMYBU_BLOCKED_5, + SFX_BMYBU_BLOCKED_6, + SFX_BMYBU_BLOCKED_7, + SFX_BMYBU_BLOCKED_8, + SFX_BMYBU_BUMP_1, + SFX_BMYBU_BUMP_2, + SFX_BMYBU_BUMP_3, + SFX_BMYBU_BUMP_4, + SFX_BMYBU_BUMP_5, + SFX_BMYBU_BUMP_6, + SFX_BMYBU_BUMP_7, + SFX_BMYBU_CAR_CRASH_1, + SFX_BMYBU_CAR_CRASH_2, + SFX_BMYBU_CAR_CRASH_3, + SFX_BMYBU_CAR_CRASH_4, + SFX_BMYBU_CAR_CRASH_5, + SFX_BMYBU_CAR_CRASH_6, + SFX_BMYBU_CAR_CRASH_7, + SFX_BMYBU_DODGE_1, + SFX_BMYBU_DODGE_2, + SFX_BMYBU_DODGE_3, + SFX_BMYBU_DODGE_4, + SFX_BMYBU_DODGE_5, + SFX_BMYBU_DODGE_6, + SFX_BMYBU_DODGE_7, + SFX_BMYBU_DODGE_8, + SFX_BMYBU_DODGE_9, + SFX_BMYBU_DODGE_10, + SFX_BMYBU_EYEING_1, + SFX_BMYBU_EYEING_2, + SFX_BMYBU_FIGHT_1, + SFX_BMYBU_FIGHT_2, + SFX_BMYBU_FIGHT_3, + SFX_BMYBU_FIGHT_4, + SFX_BMYBU_FIGHT_5, + SFX_BMYBU_GENERIC_CRASH_1, + SFX_BMYBU_GENERIC_CRASH_2, + SFX_BMYBU_GENERIC_CRASH_3, + SFX_BMYBU_GENERIC_CRASH_4, + SFX_BMYBU_GENERIC_CRASH_5, + SFX_BMYBU_GENERIC_CRASH_6, + SFX_BMYBU_GENERIC_CRASH_7, + SFX_BMYBU_GUN_PANIC_1, + SFX_BMYBU_GUN_PANIC_2, + SFX_BMYBU_GUN_PANIC_3, + SFX_BMYBU_GUN_PANIC_4, + SFX_BMYBU_GUN_PANIC_5, + SFX_BMYBU_INNOCENT_1, + SFX_BMYBU_INNOCENT_2, + SFX_BMYBU_JACKED_1, + SFX_BMYBU_JACKED_2, + SFX_BMYBU_JACKED_3, + SFX_BMYBU_JACKED_4, + SFX_BMYBU_JACKED_5, + SFX_BMYBU_JACKED_6, + SFX_BMYBU_MUGGED_1, + SFX_BMYBU_MUGGED_2, + SFX_BMYBU_SAVED_1, + SFX_BMYBU_SHOCKED_1, + SFX_BMYBU_SHOCKED_2, + SFX_BMYBU_TAXI_1, + + SFX_WMYSK_BUMP_1, + SFX_WMYSK_BUMP_2, + SFX_WMYSK_BUMP_3, + SFX_WMYSK_BUMP_4, + SFX_WMYSK_BUMP_5, + SFX_WMYSK_BUMP_6, + SFX_WMYSK_BUMP_7, + SFX_WMYSK_BUMP_8, + SFX_WMYSK_BUMP_9, + SFX_WMYSK_BUMP_10, + SFX_WMYSK_BUMP_11, + SFX_WMYSK_BUMP_12, + SFX_WMYSK_BUMP_13, + SFX_WMYSK_BUMP_14, + SFX_WMYSK_CHAT_1, + SFX_WMYSK_CHAT_2, + SFX_WMYSK_CHAT_3, + SFX_WMYSK_CHAT_4, + SFX_WMYSK_CHAT_5, + SFX_WMYSK_CHAT_6, + SFX_WMYSK_CHAT_7, + SFX_WMYSK_CHAT_8, + SFX_WMYSK_CHAT_9, + SFX_WMYSK_CHAT_10, + SFX_WMYSK_CHAT_11, + SFX_WMYSK_CHAT_12, + SFX_WMYSK_CHAT_13, + SFX_WMYSK_DODGE_1, + SFX_WMYSK_DODGE_2, + SFX_WMYSK_DODGE_3, + SFX_WMYSK_DODGE_4, + SFX_WMYSK_DODGE_5, + SFX_WMYSK_DODGE_6, + SFX_WMYSK_DODGE_7, + SFX_WMYSK_DODGE_8, + SFX_WMYSK_DODGE_9, + SFX_WMYSK_DODGE_10, + SFX_WMYSK_EYEING_1, + SFX_WMYSK_EYEING_2, + SFX_WMYSK_FIGHT_1, + SFX_WMYSK_FIGHT_2, + SFX_WMYSK_FIGHT_3, + SFX_WMYSK_FIGHT_4, + SFX_WMYSK_FIGHT_5, + SFX_WMYSK_GUN_PANIC_1, + SFX_WMYSK_GUN_PANIC_2, + SFX_WMYSK_GUN_PANIC_3, + SFX_WMYSK_GUN_PANIC_4, + SFX_WMYSK_GUN_PANIC_5, + SFX_WMYSK_INNOCENT_1, + SFX_WMYSK_INNOCENT_2, + SFX_WMYSK_INNOCENT_3, + SFX_WMYSK_LOST_1, + SFX_WMYSK_LOST_2, + SFX_WMYSK_MUGGED_1, + SFX_WMYSK_MUGGED_2, + SFX_WMYSK_SAVED_1, + SFX_WMYSK_SAVED_2, + SFX_WMYSK_SHOCKED_1, + SFX_WMYSK_SHOCKED_2, + SFX_WMYSK_TAXI_1, + + SFX_WMYCW_BLOCKED_1, + SFX_WMYCW_BLOCKED_2, + SFX_WMYCW_BLOCKED_3, + SFX_WMYCW_BLOCKED_4, + SFX_WMYCW_BLOCKED_5, + SFX_WMYCW_BLOCKED_6, + SFX_WMYCW_BLOCKED_7, + SFX_WMYCW_BLOCKED_8, + SFX_WMYCW_BLOCKED_9, + SFX_WMYCW_BUMP_1, + SFX_WMYCW_BUMP_2, + SFX_WMYCW_BUMP_3, + SFX_WMYCW_BUMP_4, + SFX_WMYCW_BUMP_5, + SFX_WMYCW_BUMP_6, + SFX_WMYCW_BUMP_7, + SFX_WMYCW_BUMP_8, + SFX_WMYCW_BUMP_9, + SFX_WMYCW_CAR_CRASH_1, + SFX_WMYCW_CAR_CRASH_2, + SFX_WMYCW_CAR_CRASH_3, + SFX_WMYCW_CAR_CRASH_4, + SFX_WMYCW_CAR_CRASH_5, + SFX_WMYCW_CAR_CRASH_6, + SFX_WMYCW_CAR_CRASH_7, + SFX_WMYCW_CAR_CRASH_8, + SFX_WMYCW_CAR_CRASH_9, + SFX_WMYCW_CHAT_1, + SFX_WMYCW_CHAT_2, + SFX_WMYCW_CHAT_3, + SFX_WMYCW_CHAT_4, + SFX_WMYCW_CHAT_5, + SFX_WMYCW_CHAT_6, + SFX_WMYCW_CHAT_7, + SFX_WMYCW_CHAT_8, + SFX_WMYCW_CHAT_9, + SFX_WMYCW_CHAT_10, + SFX_WMYCW_CHAT_11, + SFX_WMYCW_CHAT_12, + SFX_WMYCW_CHAT_13, + SFX_WMYCW_CHAT_14, + SFX_WMYCW_CHAT_15, + SFX_WMYCW_DODGE_1, + SFX_WMYCW_DODGE_2, + SFX_WMYCW_DODGE_3, + SFX_WMYCW_DODGE_4, + SFX_WMYCW_DODGE_5, + SFX_WMYCW_DODGE_6, + SFX_WMYCW_DODGE_7, + SFX_WMYCW_DODGE_8, + SFX_WMYCW_DODGE_9, + SFX_WMYCW_DODGE_10, + SFX_WMYCW_EYEING_1, + SFX_WMYCW_EYEING_2, + SFX_WMYCW_EYEING_3, + SFX_WMYCW_FIGHT_1, + SFX_WMYCW_FIGHT_2, + SFX_WMYCW_FIGHT_3, + SFX_WMYCW_FIGHT_4, + SFX_WMYCW_FIGHT_5, + SFX_WMYCW_FIGHT_6, + SFX_WMYCW_FIGHT_7, + SFX_WMYCW_FIGHT_8, + SFX_WMYCW_GENERIC_CRASH_1, + SFX_WMYCW_GENERIC_CRASH_2, + SFX_WMYCW_GENERIC_CRASH_3, + SFX_WMYCW_GENERIC_CRASH_4, + SFX_WMYCW_GENERIC_CRASH_5, + SFX_WMYCW_GENERIC_CRASH_6, + SFX_WMYCW_GENERIC_CRASH_7, + SFX_WMYCW_GUN_PANIC_1, + SFX_WMYCW_GUN_PANIC_2, + SFX_WMYCW_GUN_PANIC_3, + SFX_WMYCW_GUN_PANIC_4, + SFX_WMYCW_GUN_PANIC_5, + SFX_WMYCW_GUN_PANIC_6, + SFX_WMYCW_INNOCENT_1, + SFX_WMYCW_INNOCENT_2, + SFX_WMYCW_INNOCENT_3, + SFX_WMYCW_JACKED_1, + SFX_WMYCW_JACKED_2, + SFX_WMYCW_JACKED_3, + SFX_WMYCW_JACKED_4, + SFX_WMYCW_JACKED_5, + SFX_WMYCW_JACKED_6, + SFX_WMYCW_JEER_1, + SFX_WMYCW_JEER_2, + SFX_WMYCW_JEER_3, + SFX_WMYCW_JEER_4, + SFX_WMYCW_JEER_5, + SFX_WMYCW_JACKING_1, + SFX_WMYCW_JACKING_2, + SFX_WMYCW_JACKING_3, + SFX_WMYCW_JACKING_4, + SFX_WMYCW_LOST_1, + SFX_WMYCW_LOST_2, + SFX_WMYCW_MUGGED_1, + SFX_WMYCW_TAXI_1, + + SFX_HFYST_BLOCKED_1, + SFX_HFYST_BLOCKED_2, + SFX_HFYST_BLOCKED_3, + SFX_HFYST_BLOCKED_4, + SFX_HFYST_BLOCKED_5, + SFX_HFYST_BLOCKED_6, + SFX_HFYST_BLOCKED_7, + SFX_HFYST_BUMP_1, + SFX_HFYST_BUMP_2, + SFX_HFYST_BUMP_3, + SFX_HFYST_BUMP_4, + SFX_HFYST_BUMP_5, + SFX_HFYST_BUMP_6, + SFX_HFYST_BUMP_7, + SFX_HFYST_BUMP_8, + SFX_HFYST_BUMP_9, + SFX_HFYST_BUMP_10, + SFX_HFYST_CAR_CRASH_1, + SFX_HFYST_CAR_CRASH_2, + SFX_HFYST_CAR_CRASH_3, + SFX_HFYST_CAR_CRASH_4, + SFX_HFYST_CAR_CRASH_5, + SFX_HFYST_CAR_CRASH_6, + SFX_HFYST_CAR_CRASH_7, + SFX_HFYST_CAR_CRASH_8, + SFX_HFYST_CHAT_1, + SFX_HFYST_CHAT_2, + SFX_HFYST_CHAT_3, + SFX_HFYST_CHAT_4, + SFX_HFYST_CHAT_5, + SFX_HFYST_CHAT_6, + SFX_HFYST_CHAT_7, + SFX_HFYST_CHAT_8, + SFX_HFYST_CHAT_9, + SFX_HFYST_DODGE_1, + SFX_HFYST_DODGE_2, + SFX_HFYST_DODGE_3, + SFX_HFYST_DODGE_4, + SFX_HFYST_DODGE_5, + SFX_HFYST_DODGE_6, + SFX_HFYST_DODGE_7, + SFX_HFYST_DODGE_8, + SFX_HFYST_DODGE_9, + SFX_HFYST_DODGE_10, + SFX_HFYST_FIGHT_1, + SFX_HFYST_FIGHT_2, + SFX_HFYST_FIGHT_3, + SFX_HFYST_FIGHT_4, + SFX_HFYST_FIGHT_5, + SFX_HFYST_FIGHT_6, + SFX_HFYST_FIGHT_7, + SFX_HFYST_GENERIC_CRASH_1, + SFX_HFYST_GENERIC_CRASH_2, + SFX_HFYST_GENERIC_CRASH_3, + SFX_HFYST_GENERIC_CRASH_4, + SFX_HFYST_GENERIC_CRASH_5, + SFX_HFYST_GENERIC_CRASH_6, + SFX_HFYST_GENERIC_CRASH_7, + SFX_HFYST_GUN_COOL_1, + SFX_HFYST_GUN_COOL_2, + SFX_HFYST_GUN_COOL_3, + SFX_HFYST_GUN_COOL_4, + SFX_HFYST_GUN_COOL_5, + SFX_HFYST_JACKED_1, + SFX_HFYST_JACKED_2, + SFX_HFYST_JACKED_3, + SFX_HFYST_JACKED_4, + SFX_HFYST_JACKED_5, + SFX_HFYST_JACKED_6, + SFX_HFYST_JACKING_1, + SFX_HFYST_JACKING_2, + SFX_HFYST_JACKING_3, + SFX_HFYST_JACKING_4, + SFX_HFYST_LOST_1, + SFX_HFYST_LOST_2, + SFX_HFYST_MUGGED_1, + SFX_HFYST_MUGGED_2, + SFX_HFYST_MUGGING_1, + SFX_HFYST_MUGGING_2, + SFX_HFYST_MUGGING_3, + SFX_HFYST_MUGGING_4, + SFX_HFYST_TAXI_1, + + SFX_HMOST_BLOCKED_1, + SFX_HMOST_BLOCKED_2, + SFX_HMOST_BLOCKED_3, + SFX_HMOST_BLOCKED_4, + SFX_HMOST_BLOCKED_5, + SFX_HMOST_BLOCKED_6, + SFX_HMOST_BLOCKED_7, + SFX_HMOST_BUMP_1, + SFX_HMOST_BUMP_2, + SFX_HMOST_BUMP_3, + SFX_HMOST_BUMP_4, + SFX_HMOST_BUMP_5, + SFX_HMOST_BUMP_6, + SFX_HMOST_BUMP_7, + SFX_HMOST_BUMP_8, + SFX_HMOST_BUMP_9, + SFX_HMOST_BUMP_10, + SFX_HMOST_CAR_CRASH_1, + SFX_HMOST_CAR_CRASH_2, + SFX_HMOST_CAR_CRASH_3, + SFX_HMOST_CAR_CRASH_4, + SFX_HMOST_CAR_CRASH_5, + SFX_HMOST_CAR_CRASH_6, + SFX_HMOST_CAR_CRASH_7, + SFX_HMOST_CHAT_1, + SFX_HMOST_CHAT_2, + SFX_HMOST_CHAT_3, + SFX_HMOST_CHAT_4, + SFX_HMOST_CHAT_5, + SFX_HMOST_CHAT_6, + SFX_HMOST_CHAT_7, + SFX_HMOST_CHAT_8, + SFX_HMOST_CHAT_9, + SFX_HMOST_CHAT_10, + SFX_HMOST_CHAT_11, + SFX_HMOST_DODGE_1, + SFX_HMOST_DODGE_2, + SFX_HMOST_DODGE_3, + SFX_HMOST_DODGE_4, + SFX_HMOST_DODGE_5, + SFX_HMOST_DODGE_6, + SFX_HMOST_DODGE_7, + SFX_HMOST_DODGE_8, + SFX_HMOST_DODGE_9, + SFX_HMOST_EYEING_1, + SFX_HMOST_FIGHT_1, + SFX_HMOST_FIGHT_2, + SFX_HMOST_FIGHT_3, + SFX_HMOST_FIGHT_4, + SFX_HMOST_FIGHT_5, + SFX_HMOST_FIGHT_6, + SFX_HMOST_FIGHT_7, + SFX_HMOST_FIGHT_8, + SFX_HMOST_GENERIC_CRASH_1, + SFX_HMOST_GENERIC_CRASH_2, + SFX_HMOST_GENERIC_CRASH_3, + SFX_HMOST_GENERIC_CRASH_4, + SFX_HMOST_GENERIC_CRASH_5, + SFX_HMOST_GENERIC_CRASH_6, + SFX_HMOST_GENERIC_CRASH_7, + SFX_HMOST_GUN_COOL_1, + SFX_HMOST_GUN_COOL_2, + SFX_HMOST_GUN_COOL_3, + SFX_HMOST_GUN_COOL_4, + SFX_HMOST_GUN_COOL_5, + SFX_HMOST_JACKED_1, + SFX_HMOST_JACKED_2, + SFX_HMOST_JACKED_3, + SFX_HMOST_JACKED_4, + SFX_HMOST_JACKED_5, + SFX_HMOST_JACKED_6, + SFX_HMOST_JACKING_1, + SFX_HMOST_JACKING_2, + SFX_HMOST_JACKING_3, + SFX_HMOST_LOST_1, + SFX_HMOST_LOST_2, + SFX_HMOST_MUGGED_1, + SFX_HMOST_MUGGED_2, + SFX_HMOST_TAXI_1, + + SFX_HMYRI_BLOCKED_1, + SFX_HMYRI_BLOCKED_2, + SFX_HMYRI_BLOCKED_3, + SFX_HMYRI_BLOCKED_4, + SFX_HMYRI_BLOCKED_5, + SFX_HMYRI_BLOCKED_6, + SFX_HMYRI_BLOCKED_7, + SFX_HMYRI_BUMP_1, + SFX_HMYRI_BUMP_2, + SFX_HMYRI_BUMP_3, + SFX_HMYRI_BUMP_4, + SFX_HMYRI_BUMP_5, + SFX_HMYRI_BUMP_6, + SFX_HMYRI_BUMP_7, + SFX_HMYRI_BUMP_8, + SFX_HMYRI_BUMP_9, + SFX_HMYRI_BUMP_10, + SFX_HMYRI_CAR_CRASH_1, + SFX_HMYRI_CAR_CRASH_2, + SFX_HMYRI_CAR_CRASH_3, + SFX_HMYRI_CAR_CRASH_4, + SFX_HMYRI_CAR_CRASH_5, + SFX_HMYRI_CAR_CRASH_6, + SFX_HMYRI_CAR_CRASH_7, + SFX_HMYRI_CAR_CRASH_8, + SFX_HMYRI_DODGE_1, + SFX_HMYRI_DODGE_2, + SFX_HMYRI_DODGE_3, + SFX_HMYRI_DODGE_4, + SFX_HMYRI_DODGE_5, + SFX_HMYRI_DODGE_6, + SFX_HMYRI_DODGE_7, + SFX_HMYRI_DODGE_8, + SFX_HMYRI_DODGE_9, + SFX_HMYRI_FIGHT_1, + SFX_HMYRI_FIGHT_2, + SFX_HMYRI_FIGHT_3, + SFX_HMYRI_FIGHT_4, + SFX_HMYRI_FIGHT_5, + SFX_HMYRI_GENERIC_CRASH_1, + SFX_HMYRI_GENERIC_CRASH_2, + SFX_HMYRI_GENERIC_CRASH_3, + SFX_HMYRI_GENERIC_CRASH_4, + SFX_HMYRI_GENERIC_CRASH_5, + SFX_HMYRI_GENERIC_CRASH_6, + SFX_HMYRI_GENERIC_CRASH_7, + SFX_HMYRI_GENERIC_CRASH_8, + SFX_HMYRI_GENERIC_CRASH_9, + SFX_HMYRI_GENERIC_CRASH_10, + SFX_HMYRI_GENERIC_CRASH_11, + SFX_HMYRI_GENERIC_CRASH_12, + SFX_HMYRI_GUN_PANIC_1, + SFX_HMYRI_GUN_PANIC_2, + SFX_HMYRI_GUN_PANIC_3, + SFX_HMYRI_GUN_PANIC_4, + SFX_HMYRI_GUN_PANIC_5, + SFX_HMYRI_GUN_PANIC_6, + SFX_HMYRI_GUN_PANIC_7, + SFX_HMYRI_JACKED_1, + SFX_HMYRI_JACKED_2, + SFX_HMYRI_JACKED_3, + SFX_HMYRI_JACKED_4, + SFX_HMYRI_JACKED_5, + SFX_HMYRI_JACKED_6, + SFX_HMYRI_JACKED_7, + SFX_HMYRI_JACKED_8, + SFX_HMYRI_JACKING_1, + SFX_HMYRI_JACKING_2, + SFX_HMYRI_JACKING_3, + SFX_HMYRI_MUGGED_1, + SFX_HMYRI_SHOCKED_1, + SFX_HMYRI_SHOCKED_2, + SFX_HMYRI_SHOCKED_3, + + SFX_HFYPR_BUMP_1, + SFX_HFYPR_BUMP_2, + SFX_HFYPR_BUMP_3, + SFX_HFYPR_BUMP_4, + SFX_HFYPR_BUMP_5, + SFX_HFYPR_BUMP_6, + SFX_HFYPR_BUMP_7, + SFX_HFYPR_BUMP_8, + SFX_HFYPR_BUMP_9, + SFX_HFYPR_BUMP_10, + SFX_HFYPR_CHAT_1, + SFX_HFYPR_CHAT_2, + SFX_HFYPR_CHAT_3, + SFX_HFYPR_CHAT_4, + SFX_HFYPR_CHAT_5, + SFX_HFYPR_CHAT_6, + SFX_HFYPR_CHAT_7, + SFX_HFYPR_CHAT_8, + SFX_HFYPR_CHAT_9, + SFX_HFYPR_CHAT_10, + SFX_HFYPR_CHAT_11, + SFX_HFYPR_CHAT_12, + SFX_HFYPR_DODGE_1, + SFX_HFYPR_DODGE_2, + SFX_HFYPR_DODGE_3, + SFX_HFYPR_DODGE_4, + SFX_HFYPR_DODGE_5, + SFX_HFYPR_DODGE_6, + SFX_HFYPR_DODGE_7, + SFX_HFYPR_DODGE_8, + SFX_HFYPR_DODGE_9, + SFX_HFYPR_EYEING_1, + SFX_HFYPR_EYEING_2, + SFX_HFYPR_EYEING_3, + SFX_HFYPR_FIGHT_1, + SFX_HFYPR_FIGHT_2, + SFX_HFYPR_FIGHT_3, + SFX_HFYPR_FIGHT_4, + SFX_HFYPR_FIGHT_5, + SFX_HFYPR_FIGHT_6, + SFX_HFYPR_FIGHT_7, + SFX_HFYPR_FIGHT_8, + SFX_HFYPR_FIGHT_9, + SFX_HFYPR_FIGHT_10, + SFX_HFYPR_FUCKING_1, + SFX_HFYPR_FUCKING_2, + SFX_HFYPR_FUCKING_3, + SFX_HFYPR_FUCKING_4, + SFX_HFYPR_FUCKING_5, + SFX_HFYPR_FUCKING_6, + SFX_HFYPR_FUCKING_7, + SFX_HFYPR_FUCKING_8, + SFX_HFYPR_GUN_COOL_1, + SFX_HFYPR_GUN_COOL_2, + SFX_HFYPR_GUN_COOL_3, + SFX_HFYPR_GUN_COOL_4, + SFX_HFYPR_GUN_COOL_5, + SFX_HFYPR_GUN_COOL_6, + SFX_HFYPR_MUGGED_1, + SFX_HFYPR_MUGGED_2, + SFX_HFYPR_SAVED_1, + SFX_HFYPR_SOLICIT_1, + SFX_HFYPR_SOLICIT_2, + SFX_HFYPR_SOLICIT_3, + SFX_HFYPR_SOLICIT_4, + SFX_HFYPR_SOLICIT_5, + SFX_HFYPR_SOLICIT_6, + SFX_HFYPR_SOLICIT_7, + SFX_HFYPR_SOLICIT_8, + SFX_HFYPR_SOLICIT_9, + SFX_HFYPR_SOLICIT_10, + SFX_HFYPR_SOLICIT_11, + SFX_HFYPR_SOLICIT_12, + SFX_HFYPR_SOLICIT_13, + SFX_HFYPR_SOLICIT_14, + SFX_HFYPR_TAXI_1, + + SFX_HFYMD_BUMP_1, + SFX_HFYMD_BUMP_2, + SFX_HFYMD_BUMP_3, + SFX_HFYMD_BUMP_4, + SFX_HFYMD_BUMP_5, + SFX_HFYMD_BUMP_6, + SFX_HFYMD_BUMP_7, + SFX_HFYMD_BUMP_8, + SFX_HFYMD_BUMP_9, + SFX_HFYMD_DODGE_1, + SFX_HFYMD_DODGE_2, + SFX_HFYMD_DODGE_3, + SFX_HFYMD_DODGE_4, + SFX_HFYMD_DODGE_5, + SFX_HFYMD_DODGE_6, + SFX_HFYMD_DODGE_7, + SFX_HFYMD_DODGE_8, + SFX_HFYMD_FIGHT_1, + SFX_HFYMD_FIGHT_2, + SFX_HFYMD_FIGHT_3, + SFX_HFYMD_FIGHT_4, + SFX_HFYMD_FIGHT_5, + SFX_HFYMD_FIGHT_6, + SFX_HFYMD_FIGHT_7, + SFX_HFYMD_FIGHT_8, + SFX_HFYMD_FIGHT_9, + SFX_HFYMD_GUN_PANIC_1, + SFX_HFYMD_GUN_PANIC_2, + SFX_HFYMD_GUN_PANIC_3, + SFX_HFYMD_GUN_PANIC_4, + SFX_HFYMD_GUN_PANIC_5, + SFX_HFYMD_MUGGED_1, + SFX_HFYMD_MUGGED_2, + SFX_HFYMD_SAVED_1, + SFX_HFYMD_SAVED_2, + SFX_HFYMD_SAVED_3, + SFX_HFYMD_SOLICIT_1, + SFX_HFYMD_SOLICIT_2, + SFX_HFYMD_SOLICIT_3, + SFX_HFYMD_SOLICIT_4, + SFX_HFYMD_SOLICIT_5, + SFX_HFYMD_SOLICIT_6, + SFX_HFYMD_SOLICIT_7, + SFX_HFYMD_SOLICIT_8, + SFX_HFYMD_SOLICIT_9, + SFX_HFYMD_SOLICIT_10, + SFX_HFYMD_SOLICIT_11, + SFX_HFYMD_SOLICIT_12, + SFX_HFYMD_SOLICIT_13, + SFX_HFYMD_SOLICIT_14, + SFX_HFYMD_SOLICIT_15, + SFX_HFYMD_TAXI_1, + + SFX_WFOBE_BLOCKED_1, + SFX_WFOBE_BLOCKED_2, + SFX_WFOBE_BLOCKED_3, + SFX_WFOBE_BLOCKED_4, + SFX_WFOBE_BLOCKED_5, + SFX_WFOBE_BLOCKED_6, + SFX_WFOBE_BLOCKED_7, + SFX_WFOBE_BLOCKED_8, + SFX_WFOBE_BUMP_1, + SFX_WFOBE_BUMP_2, + SFX_WFOBE_BUMP_3, + SFX_WFOBE_BUMP_4, + SFX_WFOBE_BUMP_5, + SFX_WFOBE_BUMP_6, + SFX_WFOBE_BUMP_7, + SFX_WFOBE_BUMP_8, + SFX_WFOBE_BUMP_9, + SFX_WFOBE_BUMP_10, + SFX_WFOBE_CAR_CRASH_1, + SFX_WFOBE_CAR_CRASH_2, + SFX_WFOBE_CAR_CRASH_3, + SFX_WFOBE_CAR_CRASH_4, + SFX_WFOBE_CAR_CRASH_5, + SFX_WFOBE_CAR_CRASH_6, + SFX_WFOBE_CAR_CRASH_7, + SFX_WFOBE_CHAT_1, + SFX_WFOBE_CHAT_2, + SFX_WFOBE_CHAT_3, + SFX_WFOBE_CHAT_4, + SFX_WFOBE_CHAT_5, + SFX_WFOBE_CHAT_6, + SFX_WFOBE_CHAT_7, + SFX_WFOBE_CHAT_8, + SFX_WFOBE_CHAT_9, + SFX_WFOBE_CHAT_10, + SFX_WFOBE_DODGE_1, + SFX_WFOBE_DODGE_2, + SFX_WFOBE_DODGE_3, + SFX_WFOBE_DODGE_4, + SFX_WFOBE_DODGE_5, + SFX_WFOBE_DODGE_6, + SFX_WFOBE_DODGE_7, + SFX_WFOBE_DODGE_8, + SFX_WFOBE_GENERIC_CRASH_1, + SFX_WFOBE_GENERIC_CRASH_2, + SFX_WFOBE_GENERIC_CRASH_3, + SFX_WFOBE_GENERIC_CRASH_4, + SFX_WFOBE_GENERIC_CRASH_5, + SFX_WFOBE_GENERIC_CRASH_6, + SFX_WFOBE_GENERIC_CRASH_7, + SFX_WFOBE_GENERIC_CRASH_8, + SFX_WFOBE_GENERIC_CRASH_9, + SFX_WFOBE_GENERIC_CRASH_10, + SFX_WFOBE_GUN_PANIC_1, + SFX_WFOBE_GUN_PANIC_2, + SFX_WFOBE_GUN_PANIC_3, + SFX_WFOBE_GUN_PANIC_4, + SFX_WFOBE_GUN_PANIC_5, + SFX_WFOBE_JACKED_1, + SFX_WFOBE_JACKED_2, + SFX_WFOBE_JACKED_3, + SFX_WFOBE_JACKED_4, + SFX_WFOBE_RUN_1, + SFX_WFOBE_RUN_2, + SFX_WFOBE_RUN_3, + SFX_WFOBE_RUN_4, + SFX_WFOBE_RUN_5, + SFX_WFOBE_RUN_6, + SFX_WFOBE_RUN_7, + SFX_WFOBE_SAVED_1, + SFX_WFOBE_SAVED_2, + SFX_WFOBE_SAVED_3, + SFX_WFOBE_SHOCKED_1, + SFX_WFOBE_SHOCKED_2, + SFX_WFOBE_SHOCKED_3, + SFX_WFOBE_TAXI_1, + SFX_WFOBE_TAXI_2, + + SFX_BFYRI_BLOCKED_1, + SFX_BFYRI_BLOCKED_2, + SFX_BFYRI_BLOCKED_3, + SFX_BFYRI_BLOCKED_4, + SFX_BFYRI_BLOCKED_5, + SFX_BFYRI_BLOCKED_6, + SFX_BFYRI_BLOCKED_7, + SFX_BFYRI_BLOCKED_8, + SFX_BFYRI_BLOCKED_9, + SFX_BFYRI_BUMP_1, + SFX_BFYRI_BUMP_2, + SFX_BFYRI_BUMP_3, + SFX_BFYRI_BUMP_4, + SFX_BFYRI_BUMP_5, + SFX_BFYRI_BUMP_6, + SFX_BFYRI_BUMP_7, + SFX_BFYRI_BUMP_8, + SFX_BFYRI_BUMP_9, + SFX_BFYRI_CAR_CRASH_1, + SFX_BFYRI_CAR_CRASH_2, + SFX_BFYRI_CAR_CRASH_3, + SFX_BFYRI_CAR_CRASH_4, + SFX_BFYRI_CAR_CRASH_5, + SFX_BFYRI_CAR_CRASH_6, + SFX_BFYRI_CAR_CRASH_7, + SFX_BFYRI_CAR_CRASH_8, + SFX_BFYRI_DODGE_1, + SFX_BFYRI_DODGE_2, + SFX_BFYRI_DODGE_3, + SFX_BFYRI_DODGE_4, + SFX_BFYRI_DODGE_5, + SFX_BFYRI_DODGE_6, + SFX_BFYRI_DODGE_7, + SFX_BFYRI_DODGE_8, + SFX_BFYRI_EYEING_1, + SFX_BFYRI_EYEING_2, + SFX_BFYRI_EYEING_3, + SFX_BFYRI_GENERIC_CRASH_1, + SFX_BFYRI_GENERIC_CRASH_2, + SFX_BFYRI_GENERIC_CRASH_3, + SFX_BFYRI_GENERIC_CRASH_4, + SFX_BFYRI_GENERIC_CRASH_5, + SFX_BFYRI_GENERIC_CRASH_6, + SFX_BFYRI_GENERIC_CRASH_7, + SFX_BFYRI_GUN_PANIC_1, + SFX_BFYRI_GUN_PANIC_2, + SFX_BFYRI_GUN_PANIC_3, + SFX_BFYRI_GUN_PANIC_4, + SFX_BFYRI_JACKED_1, + SFX_BFYRI_JACKED_2, + SFX_BFYRI_JACKED_3, + SFX_BFYRI_JACKED_4, + SFX_BFYRI_JACKED_5, + SFX_BFYRI_JACKED_6, + SFX_BFYRI_JACKED_7, + SFX_BFYRI_JACKED_8, + SFX_BFYRI_JACKING_1, + SFX_BFYRI_JACKING_2, + SFX_BFYRI_JACKING_3, + SFX_BFYRI_JACKING_4, + SFX_BFYRI_LOST_1, + SFX_BFYRI_LOST_2, + SFX_BFYRI_MUGGED_1, + SFX_BFYRI_MUGGED_2, + SFX_BFYRI_MUGGED_3, + SFX_BFYRI_RUN_1, + SFX_BFYRI_RUN_2, + SFX_BFYRI_RUN_3, + SFX_BFYRI_RUN_4, + SFX_BFYRI_RUN_5, + SFX_BFYRI_RUN_6, + SFX_BFYRI_SAVED_1, + SFX_BFYRI_SAVED_2, + SFX_BFYRI_SHOCKED_1, + SFX_BFYRI_SHOCKED_2, + SFX_BFYRI_SHOCKED_3, + SFX_BFYRI_SHOCKED_4, + SFX_BFYRI_TAXI_1, + + SFX_BFYBE_BLOCKED_1, + SFX_BFYBE_BLOCKED_2, + SFX_BFYBE_BLOCKED_3, + SFX_BFYBE_BLOCKED_4, + SFX_BFYBE_BLOCKED_5, + SFX_BFYBE_BLOCKED_6, + SFX_BFYBE_BLOCKED_7, + SFX_BFYBE_BLOCKED_8, + SFX_BFYBE_BLOCKED_9, + SFX_BFYBE_BLOCKED_10, + SFX_BFYBE_BLOCKED_11, + SFX_BFYBE_BLOCKED_12, + SFX_BFYBE_CAR_CRASH_1, + SFX_BFYBE_CAR_CRASH_2, + SFX_BFYBE_CAR_CRASH_3, + SFX_BFYBE_CAR_CRASH_4, + SFX_BFYBE_CAR_CRASH_5, + SFX_BFYBE_CAR_CRASH_6, + SFX_BFYBE_CAR_CRASH_7, + SFX_BFYBE_CAR_CRASH_8, + SFX_BFYBE_CAR_CRASH_9, + SFX_BFYBE_CAR_CRASH_10, + SFX_BFYBE_CHAT_1, + SFX_BFYBE_CHAT_2, + SFX_BFYBE_CHAT_3, + SFX_BFYBE_CHAT_4, + SFX_BFYBE_CHAT_5, + SFX_BFYBE_CHAT_6, + SFX_BFYBE_CHAT_7, + SFX_BFYBE_CHAT_8, + SFX_BFYBE_CHAT_9, + SFX_BFYBE_CHAT_10, + SFX_BFYBE_CHAT_11, + SFX_BFYBE_CHAT_12, + SFX_BFYBE_CHAT_13, + SFX_BFYBE_CHAT_14, + SFX_BFYBE_CHAT_15, + SFX_BFYBE_CHAT_16, + SFX_BFYBE_DODGE_1, + SFX_BFYBE_DODGE_2, + SFX_BFYBE_DODGE_3, + SFX_BFYBE_DODGE_4, + SFX_BFYBE_DODGE_5, + SFX_BFYBE_DODGE_6, + SFX_BFYBE_DODGE_7, + SFX_BFYBE_DODGE_8, + SFX_BFYBE_DODGE_9, + SFX_BFYBE_DODGE_10, + SFX_BFYBE_EYEING_1, + SFX_BFYBE_EYEING_2, + SFX_BFYBE_EYEING_3, + SFX_BFYBE_EYEING_4, + SFX_BFYBE_GENERIC_CRASH_1, + SFX_BFYBE_GENERIC_CRASH_2, + SFX_BFYBE_GENERIC_CRASH_3, + SFX_BFYBE_GENERIC_CRASH_4, + SFX_BFYBE_GENERIC_CRASH_5, + SFX_BFYBE_GENERIC_CRASH_6, + SFX_BFYBE_GENERIC_CRASH_7, + SFX_BFYBE_GENERIC_CRASH_8, + SFX_BFYBE_GUN_COOL_1, + SFX_BFYBE_GUN_COOL_2, + SFX_BFYBE_GUN_COOL_3, + SFX_BFYBE_GUN_COOL_4, + SFX_BFYBE_GUN_COOL_5, + SFX_BFYBE_GUN_COOL_6, + SFX_BFYBE_JACKED_1, + SFX_BFYBE_JACKED_2, + SFX_BFYBE_JACKED_3, + SFX_BFYBE_JACKED_4, + SFX_BFYBE_JACKED_5, + SFX_BFYBE_JACKED_6, + SFX_BFYBE_JACKED_7, + SFX_BFYBE_JACKED_8, + SFX_BFYBE_LOST_1, + SFX_BFYBE_LOST_2, + SFX_BFYBE_LOST_3, + SFX_BFYBE_LOST_4, + SFX_BFYBE_MUGGED_1, + SFX_BFYBE_MUGGED_2, + SFX_BFYBE_MUGGED_3, + SFX_BFYBE_MUGGED_4, + SFX_BFYBE_MUGGED_5, + SFX_BFYBE_RUN_1, + SFX_BFYBE_RUN_2, + SFX_BFYBE_RUN_3, + SFX_BFYBE_RUN_4, + SFX_BFYBE_RUN_5, + SFX_BFYBE_RUN_6, + SFX_BFYBE_SAVED_1, + SFX_BFYBE_SAVED_2, + SFX_BFYBE_SHOCKED_1, + SFX_BFYBE_SHOCKED_2, + SFX_BFYBE_SHOCKED_3, + SFX_BFYBE_SHOCKED_4, + SFX_BFYBE_TAXI_1, + SFX_BFYBE_TAXI_2, + SFX_BFYBE_TAXI_3, + + SFX_BMOTR_BUMP_1, + SFX_BMOTR_BUMP_2, + SFX_BMOTR_BUMP_3, + SFX_BMOTR_BUMP_4, + SFX_BMOTR_BUMP_5, + SFX_BMOTR_BUMP_6, + SFX_BMOTR_BUMP_7, + SFX_BMOTR_BUMP_8, + SFX_BMOTR_BUMP_9, + SFX_BMOTR_BUMP_10, + SFX_BMOTR_CHAT_1, + SFX_BMOTR_CHAT_2, + SFX_BMOTR_CHAT_3, + SFX_BMOTR_CHAT_4, + SFX_BMOTR_CHAT_5, + SFX_BMOTR_CHAT_6, + SFX_BMOTR_CHAT_7, + SFX_BMOTR_CHAT_8, + SFX_BMOTR_CHAT_9, + SFX_BMOTR_CHAT_10, + SFX_BMOTR_DODGE_1, + SFX_BMOTR_DODGE_2, + SFX_BMOTR_DODGE_3, + SFX_BMOTR_DODGE_4, + SFX_BMOTR_DODGE_5, + SFX_BMOTR_DODGE_6, + SFX_BMOTR_DODGE_7, + SFX_BMOTR_DODGE_8, + SFX_BMOTR_DODGE_9, + SFX_BMOTR_DODGE_10, + SFX_BMOTR_DODGE_11, + SFX_BMOTR_EYEING_1, + SFX_BMOTR_EYEING_2, + SFX_BMOTR_EYEING_3, + SFX_BMOTR_GUN_COOL_1, + SFX_BMOTR_GUN_COOL_2, + SFX_BMOTR_GUN_COOL_3, + SFX_BMOTR_GUN_COOL_4, + SFX_BMOTR_GUN_COOL_5, + SFX_BMOTR_INNOCENT_1, + SFX_BMOTR_INNOCENT_2, + SFX_BMOTR_INNOCENT_3, + SFX_BMOTR_INNOCENT_4, + SFX_BMOTR_RUN_1, + SFX_BMOTR_RUN_2, + SFX_BMOTR_RUN_3, + SFX_BMOTR_RUN_4, + SFX_BMOTR_RUN_5, + SFX_BMOTR_RUN_6, + SFX_BMOTR_RUN_7, + SFX_BMOTR_SAVED_1, + SFX_BMOTR_SOLICIT_1, + SFX_BMOTR_SOLICIT_2, + SFX_BMOTR_SOLICIT_3, + SFX_BMOTR_SOLICIT_4, + SFX_BMOTR_SOLICIT_5, + SFX_BMOTR_SOLICIT_6, + SFX_BMOTR_SOLICIT_7, + SFX_BMOTR_TAXI_1, + + SFX_BMYST_BLOCKED_1, + SFX_BMYST_BLOCKED_2, + SFX_BMYST_BLOCKED_3, + SFX_BMYST_BLOCKED_4, + SFX_BMYST_BLOCKED_5, + SFX_BMYST_BLOCKED_6, + SFX_BMYST_BLOCKED_7, + SFX_BMYST_BLOCKED_8, + SFX_BMYST_BUMP_1, + SFX_BMYST_BUMP_2, + SFX_BMYST_BUMP_3, + SFX_BMYST_BUMP_4, + SFX_BMYST_BUMP_5, + SFX_BMYST_BUMP_6, + SFX_BMYST_BUMP_7, + SFX_BMYST_BUMP_8, + SFX_BMYST_BUMP_9, + SFX_BMYST_BUMP_10, + SFX_BMYST_BUMP_11, + SFX_BMYST_CAR_CRASH_1, + SFX_BMYST_CAR_CRASH_2, + SFX_BMYST_CAR_CRASH_3, + SFX_BMYST_CAR_CRASH_4, + SFX_BMYST_CAR_CRASH_5, + SFX_BMYST_CAR_CRASH_6, + SFX_BMYST_CAR_CRASH_7, + SFX_BMYST_CAR_CRASH_8, + SFX_BMYST_CAR_CRASH_9, + SFX_BMYST_CHAT_1, + SFX_BMYST_CHAT_2, + SFX_BMYST_CHAT_3, + SFX_BMYST_CHAT_4, + SFX_BMYST_CHAT_5, + SFX_BMYST_CHAT_6, + SFX_BMYST_CHAT_7, + SFX_BMYST_CHAT_8, + SFX_BMYST_CHAT_9, + SFX_BMYST_CHAT_10, + SFX_BMYST_CHAT_11, + SFX_BMYST_CHAT_12, + SFX_BMYST_DODGE_1, + SFX_BMYST_DODGE_2, + SFX_BMYST_DODGE_3, + SFX_BMYST_DODGE_4, + SFX_BMYST_DODGE_5, + SFX_BMYST_DODGE_6, + SFX_BMYST_DODGE_7, + SFX_BMYST_DODGE_8, + SFX_BMYST_FIGHT_1, + SFX_BMYST_FIGHT_2, + SFX_BMYST_FIGHT_3, + SFX_BMYST_FIGHT_4, + SFX_BMYST_FIGHT_5, + SFX_BMYST_FIGHT_6, + SFX_BMYST_GENERIC_CRASH_1, + SFX_BMYST_GENERIC_CRASH_2, + SFX_BMYST_GENERIC_CRASH_3, + SFX_BMYST_GENERIC_CRASH_4, + SFX_BMYST_GENERIC_CRASH_5, + SFX_BMYST_GENERIC_CRASH_6, + SFX_BMYST_GENERIC_CRASH_7, + SFX_BMYST_GUN_COOL_1, + SFX_BMYST_GUN_COOL_2, + SFX_BMYST_GUN_COOL_3, + SFX_BMYST_GUN_COOL_4, + SFX_BMYST_GUN_COOL_5, + SFX_BMYST_GUN_COOL_6, + SFX_BMYST_JACKED_1, + SFX_BMYST_JACKED_2, + SFX_BMYST_JACKED_3, + SFX_BMYST_JACKED_4, + SFX_BMYST_JACKED_5, + SFX_BMYST_JACKED_6, + SFX_BMYST_JACKED_7, + SFX_BMYST_JACKED_8, + SFX_BMYST_JACKING_1, + SFX_BMYST_JACKING_2, + SFX_BMYST_JACKING_3, + SFX_BMYST_JACKING_4, + SFX_BMYST_MUGGED_1, + SFX_BMYST_MUGGED_2, + SFX_BMYST_MUGGING_1, + SFX_BMYST_MUGGING_2, + SFX_BMYST_MUGGING_3, + SFX_BMYST_MUGGING_4, + SFX_BMYST_TAXI_1, + SFX_BMYST_TAXI_2, + + SFX_WMYPI_BLOCKED_1, + SFX_WMYPI_BLOCKED_2, + SFX_WMYPI_BLOCKED_3, + SFX_WMYPI_BLOCKED_4, + SFX_WMYPI_BLOCKED_5, + SFX_WMYPI_BLOCKED_6, + SFX_WMYPI_BLOCKED_7, + SFX_WMYPI_BLOCKED_8, + SFX_WMYPI_BUMP_1, + SFX_WMYPI_BUMP_2, + SFX_WMYPI_BUMP_3, + SFX_WMYPI_BUMP_4, + SFX_WMYPI_BUMP_5, + SFX_WMYPI_BUMP_6, + SFX_WMYPI_BUMP_7, + SFX_WMYPI_BUMP_8, + SFX_WMYPI_BUMP_9, + SFX_WMYPI_BUMP_10, + SFX_WMYPI_CAR_CRASH_1, + SFX_WMYPI_CAR_CRASH_2, + SFX_WMYPI_CAR_CRASH_3, + SFX_WMYPI_CAR_CRASH_4, + SFX_WMYPI_CAR_CRASH_5, + SFX_WMYPI_CAR_CRASH_6, + SFX_WMYPI_CAR_CRASH_7, + SFX_WMYPI_CAR_CRASH_8, + SFX_WMYPI_DODGE_1, + SFX_WMYPI_DODGE_2, + SFX_WMYPI_DODGE_3, + SFX_WMYPI_DODGE_4, + SFX_WMYPI_DODGE_5, + SFX_WMYPI_DODGE_6, + SFX_WMYPI_DODGE_7, + SFX_WMYPI_DODGE_8, + SFX_WMYPI_EYEING_1, + SFX_WMYPI_EYEING_2, + SFX_WMYPI_EYEING_3, + SFX_WMYPI_EYEING_4, + SFX_WMYPI_EYEING_5, + SFX_WMYPI_EYEING_6, + SFX_WMYPI_FIGHT_1, + SFX_WMYPI_FIGHT_2, + SFX_WMYPI_FIGHT_3, + SFX_WMYPI_FIGHT_4, + SFX_WMYPI_FIGHT_5, + SFX_WMYPI_FIGHT_6, + SFX_WMYPI_FIGHT_7, + SFX_WMYPI_FIGHT_8, + SFX_WMYPI_FIGHT_9, + SFX_WMYPI_GENERIC_CRASH_1, + SFX_WMYPI_GENERIC_CRASH_2, + SFX_WMYPI_GENERIC_CRASH_3, + SFX_WMYPI_GENERIC_CRASH_4, + SFX_WMYPI_GENERIC_CRASH_5, + SFX_WMYPI_GENERIC_CRASH_6, + SFX_WMYPI_GENERIC_CRASH_7, + SFX_WMYPI_GENERIC_CRASH_8, + SFX_WMYPI_GUN_COOL_1, + SFX_WMYPI_GUN_COOL_2, + SFX_WMYPI_GUN_COOL_3, + SFX_WMYPI_GUN_COOL_4, + SFX_WMYPI_GUN_COOL_5, + SFX_WMYPI_INNOCENT_1, + SFX_WMYPI_INNOCENT_2, + SFX_WMYPI_JACKED_1, + SFX_WMYPI_JACKED_2, + SFX_WMYPI_JACKED_3, + SFX_WMYPI_JACKED_4, + SFX_WMYPI_JACKED_5, + SFX_WMYPI_JACKED_6, + SFX_WMYPI_JACKING_1, + SFX_WMYPI_JACKING_2, + SFX_WMYPI_JACKING_3, + SFX_WMYPI_JACKING_4, + SFX_WMYPI_MUGGED_1, + SFX_WMYPI_MUGGED_2, + SFX_WMYPI_SAVED_1, + SFX_WMYPI_SAVED_2, + SFX_WMYPI_TAXI_1, + SFX_WMYPI_TAXI_2, + SFX_WMYPI_TAXI_3, + SFX_WMYPI_TAXI_4, + + SFX_BMYCR_BLOCKED_1, + SFX_BMYCR_BLOCKED_2, + SFX_BMYCR_BLOCKED_3, + SFX_BMYCR_BLOCKED_4, + SFX_BMYCR_BLOCKED_5, + SFX_BMYCR_BLOCKED_6, + SFX_BMYCR_BLOCKED_7, + SFX_BMYCR_BLOCKED_8, + SFX_BMYCR_BLOCKED_9, + SFX_BMYCR_BLOCKED_10, + SFX_BMYCR_BLOCKED_11, + SFX_BMYCR_BLOCKED_12, + SFX_BMYCR_BUMP_1, + SFX_BMYCR_BUMP_2, + SFX_BMYCR_BUMP_3, + SFX_BMYCR_BUMP_4, + SFX_BMYCR_BUMP_5, + SFX_BMYCR_BUMP_6, + SFX_BMYCR_BUMP_7, + SFX_BMYCR_BUMP_8, + SFX_BMYCR_BUMP_9, + SFX_BMYCR_BUMP_10, + SFX_BMYCR_BUMP_11, + SFX_BMYCR_CAR_CRASH_1, + SFX_BMYCR_CAR_CRASH_2, + SFX_BMYCR_CAR_CRASH_3, + SFX_BMYCR_CAR_CRASH_4, + SFX_BMYCR_CAR_CRASH_5, + SFX_BMYCR_CAR_CRASH_6, + SFX_BMYCR_CAR_CRASH_7, + SFX_BMYCR_CAR_CRASH_8, + SFX_BMYCR_CAR_CRASH_9, + SFX_BMYCR_DODGE_1, + SFX_BMYCR_DODGE_2, + SFX_BMYCR_DODGE_3, + SFX_BMYCR_DODGE_4, + SFX_BMYCR_DODGE_5, + SFX_BMYCR_DODGE_6, + SFX_BMYCR_DODGE_7, + SFX_BMYCR_DODGE_8, + SFX_BMYCR_EYEING_1, + SFX_BMYCR_EYEING_2, + SFX_BMYCR_FIGHT_1, + SFX_BMYCR_FIGHT_2, + SFX_BMYCR_FIGHT_3, + SFX_BMYCR_FIGHT_4, + SFX_BMYCR_FIGHT_5, + SFX_BMYCR_FIGHT_6, + SFX_BMYCR_FIGHT_7, + SFX_BMYCR_FIGHT_8, + SFX_BMYCR_GENERIC_CRASH_1, + SFX_BMYCR_GENERIC_CRASH_2, + SFX_BMYCR_GENERIC_CRASH_3, + SFX_BMYCR_GENERIC_CRASH_4, + SFX_BMYCR_GENERIC_CRASH_5, + SFX_BMYCR_GENERIC_CRASH_6, + SFX_BMYCR_GENERIC_CRASH_7, + SFX_BMYCR_GUN_COOL_1, + SFX_BMYCR_GUN_COOL_2, + SFX_BMYCR_GUN_COOL_3, + SFX_BMYCR_GUN_COOL_4, + SFX_BMYCR_GUN_COOL_5, + SFX_BMYCR_GUN_COOL_6, + SFX_BMYCR_INNOCENT_1, + SFX_BMYCR_INNOCENT_2, + SFX_BMYCR_INNOCENT_3, + SFX_BMYCR_INNOCENT_4, + SFX_BMYCR_JACKED_1, + SFX_BMYCR_JACKED_2, + SFX_BMYCR_JACKED_3, + SFX_BMYCR_JACKED_4, + SFX_BMYCR_JACKED_5, + SFX_BMYCR_JACKED_6, + SFX_BMYCR_JACKING_1, + SFX_BMYCR_JACKING_2, + SFX_BMYCR_JACKING_3, + SFX_BMYCR_JACKING_4, + SFX_BMYCR_JACKING_5, + SFX_BMYCR_JACKING_6, + SFX_BMYCR_JACKING_7, + SFX_BMYCR_JACKING_8, + SFX_BMYCR_JACKING_9, + SFX_BMYCR_JACKING_10, + SFX_BMYCR_JACKING_11, + SFX_BMYCR_JACKING_12, + SFX_BMYCR_MUGGED_1, + SFX_BMYCR_MUGGED_2, + SFX_BMYCR_MUGGED_3, + SFX_BMYCR_MUGGING_1, + SFX_BMYCR_MUGGING_2, + SFX_BMYCR_MUGGING_3, + SFX_BMYCR_MUGGING_4, + SFX_BMYCR_MUGGING_5, + SFX_BMYCR_MUGGING_6, + SFX_BMYCR_SAVED_1, + SFX_BMYCR_SAVED_2, + + SFX_WMORI_BLOCKED_1, + SFX_WMORI_BLOCKED_2, + SFX_WMORI_BLOCKED_3, + SFX_WMORI_BLOCKED_4, + SFX_WMORI_BLOCKED_5, + SFX_WMORI_BLOCKED_6, + SFX_WMORI_BLOCKED_7, + SFX_WMORI_BLOCKED_8, + SFX_WMORI_BLOCKED_9, + SFX_WMORI_BLOCKED_10, + SFX_WMORI_BUMP_1, + SFX_WMORI_BUMP_2, + SFX_WMORI_BUMP_3, + SFX_WMORI_BUMP_4, + SFX_WMORI_BUMP_5, + SFX_WMORI_BUMP_6, + SFX_WMORI_BUMP_7, + SFX_WMORI_BUMP_8, + SFX_WMORI_BUMP_9, + SFX_WMORI_BUMP_10, + SFX_WMORI_BUMP_11, + SFX_WMORI_BUMP_12, + SFX_WMORI_BUMP_13, + SFX_WMORI_BUMP_14, + SFX_WMORI_CAR_CRASH_1, + SFX_WMORI_CAR_CRASH_2, + SFX_WMORI_CAR_CRASH_3, + SFX_WMORI_CAR_CRASH_4, + SFX_WMORI_CAR_CRASH_5, + SFX_WMORI_CAR_CRASH_6, + SFX_WMORI_DODGE_1, + SFX_WMORI_DODGE_2, + SFX_WMORI_DODGE_3, + SFX_WMORI_DODGE_4, + SFX_WMORI_DODGE_5, + SFX_WMORI_DODGE_6, + SFX_WMORI_DODGE_7, + SFX_WMORI_DODGE_8, + SFX_WMORI_DODGE_9, + SFX_WMORI_DODGE_10, + SFX_WMORI_EYEING_1, + SFX_WMORI_EYEING_2, + SFX_WMORI_EYEING_3, + SFX_WMORI_GENERIC_CRASH_1, + SFX_WMORI_GENERIC_CRASH_2, + SFX_WMORI_GENERIC_CRASH_3, + SFX_WMORI_GENERIC_CRASH_4, + SFX_WMORI_GENERIC_CRASH_5, + SFX_WMORI_GENERIC_CRASH_6, + SFX_WMORI_GENERIC_CRASH_7, + SFX_WMORI_GENERIC_CRASH_8, + SFX_WMORI_GUN_PANIC_1, + SFX_WMORI_GUN_PANIC_2, + SFX_WMORI_GUN_PANIC_3, + SFX_WMORI_GUN_PANIC_4, + SFX_WMORI_GUN_PANIC_5, + SFX_WMORI_GUN_PANIC_6, + SFX_WMORI_GUN_PANIC_7, + SFX_WMORI_GUN_PANIC_8, + SFX_WMORI_GUN_PANIC_9, + SFX_WMORI_JACKED_1, + SFX_WMORI_JACKED_2, + SFX_WMORI_JACKED_3, + SFX_WMORI_JACKED_4, + SFX_WMORI_JACKED_5, + SFX_WMORI_JACKED_6, + SFX_WMORI_LOST_1, + SFX_WMORI_LOST_2, + SFX_WMORI_MUGGED_1, + SFX_WMORI_MUGGED_2, + SFX_WMORI_MUGGED_3, + SFX_WMORI_MUGGED_4, + SFX_WMORI_RUN_1, + SFX_WMORI_RUN_2, + SFX_WMORI_RUN_3, + SFX_WMORI_RUN_4, + SFX_WMORI_RUN_5, + SFX_WMORI_RUN_6, + SFX_WMORI_RUN_7, + SFX_WMORI_RUN_8, + SFX_WMORI_RUN_9, + SFX_WMORI_RUN_10, + SFX_WMORI_RUN_11, + SFX_WMORI_RUN_12, + SFX_WMORI_SAVED_1, + SFX_WMORI_SAVED_2, + SFX_WMORI_SHOCKED_1, + SFX_WMORI_SHOCKED_2, + SFX_WMORI_SHOCKED_3, + SFX_WMORI_SHOCKED_4, + SFX_WMORI_TAXI_1, + SFX_WMORI_TAXI_2, + + SFX_WMOBU_BLOCKED_1, + SFX_WMOBU_BLOCKED_2, + SFX_WMOBU_BLOCKED_3, + SFX_WMOBU_BLOCKED_4, + SFX_WMOBU_BLOCKED_5, + SFX_WMOBU_BLOCKED_6, + SFX_WMOBU_BLOCKED_7, + SFX_WMOBU_BUMP_1, + SFX_WMOBU_BUMP_2, + SFX_WMOBU_BUMP_3, + SFX_WMOBU_BUMP_4, + SFX_WMOBU_BUMP_5, + SFX_WMOBU_BUMP_6, + SFX_WMOBU_BUMP_7, + SFX_WMOBU_BUMP_8, + SFX_WMOBU_BUMP_9, + SFX_WMOBU_BUMP_10, + SFX_WMOBU_CAR_CRASH_1, + SFX_WMOBU_CAR_CRASH_2, + SFX_WMOBU_CAR_CRASH_3, + SFX_WMOBU_CAR_CRASH_4, + SFX_WMOBU_CAR_CRASH_5, + SFX_WMOBU_CAR_CRASH_6, + SFX_WMOBU_CAR_CRASH_7, + SFX_WMOBU_DODGE_1, + SFX_WMOBU_DODGE_2, + SFX_WMOBU_DODGE_3, + SFX_WMOBU_DODGE_4, + SFX_WMOBU_DODGE_5, + SFX_WMOBU_DODGE_6, + SFX_WMOBU_DODGE_7, + SFX_WMOBU_DODGE_8, + SFX_WMOBU_EYEING_1, + SFX_WMOBU_EYEING_2, + SFX_WMOBU_FIGHT_1, + SFX_WMOBU_FIGHT_2, + SFX_WMOBU_FIGHT_3, + SFX_WMOBU_GENERIC_CRASH_1, + SFX_WMOBU_GENERIC_CRASH_2, + SFX_WMOBU_GENERIC_CRASH_3, + SFX_WMOBU_GENERIC_CRASH_4, + SFX_WMOBU_GENERIC_CRASH_5, + SFX_WMOBU_GENERIC_CRASH_6, + SFX_WMOBU_GENERIC_CRASH_7, + SFX_WMOBU_GUN_PANIC_1, + SFX_WMOBU_GUN_PANIC_2, + SFX_WMOBU_GUN_PANIC_3, + SFX_WMOBU_GUN_PANIC_4, + SFX_WMOBU_GUN_PANIC_5, + SFX_WMOBU_GUN_PANIC_6, + SFX_WMOBU_JACKED_1, + SFX_WMOBU_JACKED_2, + SFX_WMOBU_JACKED_3, + SFX_WMOBU_JACKED_4, + SFX_WMOBU_JACKED_5, + SFX_WMOBU_JACKED_6, + SFX_WMOBU_JACKED_7, + SFX_WMOBU_LOST_1, + SFX_WMOBU_LOST_2, + SFX_WMOBU_LOST_3, + SFX_WMOBU_MUGGED_1, + SFX_WMOBU_MUGGED_2, + SFX_WMOBU_SAVED_1, + SFX_WMOBU_SAVED_2, + SFX_WMOBU_SAVED_3, + SFX_WMOBU_TAXI_1, + SFX_WMOBU_TAXI_2, + + SFX_BMODK_BLOCKED_1, + SFX_BMODK_BLOCKED_2, + SFX_BMODK_BLOCKED_3, + SFX_BMODK_BLOCKED_4, + SFX_BMODK_BLOCKED_5, + SFX_BMODK_BLOCKED_6, + SFX_BMODK_BLOCKED_7, + SFX_BMODK_BLOCKED_8, + SFX_BMODK_BUMP_1, + SFX_BMODK_BUMP_2, + SFX_BMODK_BUMP_3, + SFX_BMODK_BUMP_4, + SFX_BMODK_BUMP_5, + SFX_BMODK_BUMP_6, + SFX_BMODK_BUMP_7, + SFX_BMODK_BUMP_8, + SFX_BMODK_BUMP_9, + SFX_BMODK_BUMP_10, + SFX_BMODK_CAR_CRASH_1, + SFX_BMODK_CAR_CRASH_2, + SFX_BMODK_CAR_CRASH_3, + SFX_BMODK_CAR_CRASH_4, + SFX_BMODK_CAR_CRASH_5, + SFX_BMODK_CAR_CRASH_6, + SFX_BMODK_CAR_CRASH_7, + SFX_BMODK_CAR_CRASH_8, + SFX_BMODK_CAR_CRASH_9, + SFX_BMODK_CAR_CRASH_10, + SFX_BMODK_UNK, // UNUSED + SFX_BMODK_UNK_147_1, + SFX_BMODK_UNK_147_2, + SFX_BMODK_UNK_147_3, + SFX_BMODK_UNK_147_4, + SFX_BMODK_UNK_147_5, + SFX_BMODK_UNK_147_6, + SFX_BMODK_UNK_147_7, + SFX_BMODK_UNK_147_8, + SFX_BMODK_UNK_147_9, + SFX_BMODK_UNK_147_10, + SFX_BMODK_UNK_147_11, + SFX_BMODK_UNK_147_12, + SFX_BMODK_DODGE_1, + SFX_BMODK_DODGE_2, + SFX_BMODK_DODGE_3, + SFX_BMODK_DODGE_4, + SFX_BMODK_DODGE_5, + SFX_BMODK_DODGE_6, + SFX_BMODK_DODGE_7, + SFX_BMODK_GENERIC_CRASH_1, + SFX_BMODK_GENERIC_CRASH_2, + SFX_BMODK_GENERIC_CRASH_3, + SFX_BMODK_GENERIC_CRASH_4, + SFX_BMODK_GENERIC_CRASH_5, + SFX_BMODK_GENERIC_CRASH_6, + SFX_BMODK_GENERIC_CRASH_7, + SFX_BMODK_GUN_PANIC_1, + SFX_BMODK_GUN_PANIC_2, + SFX_BMODK_GUN_PANIC_3, + SFX_BMODK_GUN_PANIC_4, + SFX_BMODK_INNOCENT_1, + SFX_BMODK_INNOCENT_2, + SFX_BMODK_INNOCENT_3, + SFX_BMODK_JACKED_1, + SFX_BMODK_JACKED_2, + SFX_BMODK_JACKED_3, + SFX_BMODK_JACKED_4, + SFX_BMODK_JACKED_5, + SFX_BMODK_JACKED_6, + SFX_BMODK_JACKED_7, + SFX_BMODK_JACKED_8, + SFX_BMODK_JACKED_9, + SFX_BMODK_MUGGED_1, + SFX_BMODK_MUGGED_2, + SFX_BMODK_RUN_1, + SFX_BMODK_RUN_2, + SFX_BMODK_RUN_3, + SFX_BMODK_RUN_4, + SFX_BMODK_TAXI_1, + + SFX_HFYBE_BUMP_1, + SFX_HFYBE_BUMP_2, + SFX_HFYBE_BUMP_3, + SFX_HFYBE_BUMP_4, + SFX_HFYBE_BUMP_5, + SFX_HFYBE_BUMP_6, + SFX_HFYBE_BUMP_7, + SFX_HFYBE_BUMP_8, + SFX_HFYBE_CAR_CRASH_1, + SFX_HFYBE_CAR_CRASH_2, + SFX_HFYBE_CAR_CRASH_3, + SFX_HFYBE_CAR_CRASH_4, + SFX_HFYBE_CAR_CRASH_5, + SFX_HFYBE_CAR_CRASH_6, + SFX_HFYBE_CHAT_1, + SFX_HFYBE_CHAT_2, + SFX_HFYBE_CHAT_3, + SFX_HFYBE_CHAT_4, + SFX_HFYBE_CHAT_5, + SFX_HFYBE_CHAT_6, + SFX_HFYBE_CHAT_7, + SFX_HFYBE_CHAT_8, + SFX_HFYBE_CHAT_9, + SFX_HFYBE_CHAT_10, + SFX_HFYBE_DODGE_1, + SFX_HFYBE_DODGE_2, + SFX_HFYBE_DODGE_3, + SFX_HFYBE_DODGE_4, + SFX_HFYBE_DODGE_5, + SFX_HFYBE_DODGE_6, + SFX_HFYBE_DODGE_7, + SFX_HFYBE_DODGE_8, + SFX_HFYBE_DODGE_9, + SFX_HFYBE_DODGE_10, + SFX_HFYBE_DODGE_11, + SFX_HFYBE_GENERIC_CRASH_1, + SFX_HFYBE_GENERIC_CRASH_2, + SFX_HFYBE_GENERIC_CRASH_3, + SFX_HFYBE_GENERIC_CRASH_4, + SFX_HFYBE_GENERIC_CRASH_5, + SFX_HFYBE_GENERIC_CRASH_6, + SFX_HFYBE_GENERIC_CRASH_7, + SFX_HFYBE_GENERIC_CRASH_8, + SFX_HFYBE_GUN_PANIC_1, + SFX_HFYBE_GUN_PANIC_2, + SFX_HFYBE_GUN_PANIC_3, + SFX_HFYBE_GUN_PANIC_4, + SFX_HFYBE_GUN_PANIC_5, + SFX_HFYBE_GUN_PANIC_6, + SFX_HFYBE_GUN_PANIC_7, + SFX_HFYBE_JACKED_1, + SFX_HFYBE_JACKED_2, + SFX_HFYBE_JACKED_3, + SFX_HFYBE_JACKED_4, + SFX_HFYBE_JACKED_5, + SFX_HFYBE_JACKED_6, + SFX_HFYBE_JACKED_7, + SFX_HFYBE_LOST_1, + SFX_HFYBE_LOST_2, + + // this is a guess, idk what she's saying + SFX_HFYBE_RUN_1, + SFX_HFYBE_RUN_2, + SFX_HFYBE_RUN_3, + SFX_HFYBE_RUN_4, + SFX_HFYBE_RUN_5, + SFX_HFYBE_RUN_6, + SFX_HFYBE_RUN_7, + + SFX_HFYBE_SHOCKED_1, + SFX_HFYBE_SHOCKED_2, + SFX_HFYBE_TAXI_1, + + SFX_HFYRI_BLOCKED_1, + SFX_HFYRI_BLOCKED_2, + SFX_HFYRI_BLOCKED_3, + SFX_HFYRI_BLOCKED_4, + SFX_HFYRI_BLOCKED_5, + SFX_HFYRI_BLOCKED_6, + SFX_HFYRI_BLOCKED_7, + SFX_HFYRI_BLOCKED_8, + SFX_HFYRI_BUMP_1, + SFX_HFYRI_BUMP_2, + SFX_HFYRI_BUMP_3, + SFX_HFYRI_BUMP_4, + SFX_HFYRI_BUMP_5, + SFX_HFYRI_BUMP_6, + SFX_HFYRI_BUMP_7, + SFX_HFYRI_BUMP_8, + SFX_HFYRI_BUMP_9, + SFX_HFYRI_CAR_CRASH_1, + SFX_HFYRI_CAR_CRASH_2, + SFX_HFYRI_CAR_CRASH_3, + SFX_HFYRI_CAR_CRASH_4, + SFX_HFYRI_CAR_CRASH_5, + SFX_HFYRI_CAR_CRASH_6, + SFX_HFYRI_CAR_CRASH_7, + SFX_HFYRI_CAR_CRASH_8, + SFX_HFYRI_DODGE_1, + SFX_HFYRI_DODGE_2, + SFX_HFYRI_DODGE_3, + SFX_HFYRI_DODGE_4, + SFX_HFYRI_DODGE_5, + SFX_HFYRI_DODGE_6, + SFX_HFYRI_DODGE_7, + SFX_HFYRI_DODGE_8, + SFX_HFYRI_DODGE_9, + SFX_HFYRI_DODGE_10, + SFX_HFYRI_GENERIC_CRASH_1, + SFX_HFYRI_GENERIC_CRASH_2, + SFX_HFYRI_GENERIC_CRASH_3, + SFX_HFYRI_GENERIC_CRASH_4, + SFX_HFYRI_GENERIC_CRASH_5, + SFX_HFYRI_GENERIC_CRASH_6, + SFX_HFYRI_GENERIC_CRASH_7, + SFX_HFYRI_GUN_PANIC_1, + SFX_HFYRI_GUN_PANIC_2, + SFX_HFYRI_GUN_PANIC_3, + SFX_HFYRI_GUN_PANIC_4, + SFX_HFYRI_GUN_PANIC_5, + SFX_HFYRI_JACKED_1, + SFX_HFYRI_JACKED_2, + SFX_HFYRI_JACKED_3, + SFX_HFYRI_JACKED_4, + SFX_HFYRI_JACKED_5, + SFX_HFYRI_JACKED_6, + SFX_HFYRI_LOST_1, + SFX_HFYRI_LOST_2, + SFX_HFYRI_MUGGED_1, + SFX_HFYRI_MUGGED_2, + SFX_HFYRI_MUGGED_3, + SFX_HFYRI_MUGGED_4, + SFX_HFYRI_RUN_1, + SFX_HFYRI_RUN_2, + SFX_HFYRI_RUN_3, + SFX_HFYRI_RUN_4, + SFX_HFYRI_SAVED_1, + SFX_HFYRI_SAVED_2, + SFX_HFYRI_SHOCKED_1, + SFX_HFYRI_SHOCKED_2, + SFX_HFYRI_SHOCKED_3, + SFX_HFYRI_TAXI_1, + SFX_BFOST_BLOCKED_1, + SFX_BFOST_BLOCKED_2, + SFX_BFOST_BLOCKED_3, + SFX_BFOST_BLOCKED_4, + SFX_BFOST_BLOCKED_5, + SFX_BFOST_BLOCKED_6, + SFX_BFOST_BLOCKED_7, + SFX_BFOST_BUMP_1, + SFX_BFOST_BUMP_2, + SFX_BFOST_BUMP_3, + SFX_BFOST_BUMP_4, + SFX_BFOST_BUMP_5, + SFX_BFOST_BUMP_6, + SFX_BFOST_BUMP_7, + SFX_BFOST_BUMP_8, + SFX_BFOST_BUMP_9, + SFX_BFOST_BUMP_10, + SFX_BFOST_CAR_CRASH_1, + SFX_BFOST_CAR_CRASH_2, + SFX_BFOST_CAR_CRASH_3, + SFX_BFOST_CAR_CRASH_4, + SFX_BFOST_CAR_CRASH_5, + SFX_BFOST_CAR_CRASH_6, + SFX_BFOST_CAR_CRASH_7, + SFX_BFOST_CAR_CRASH_8, + SFX_BFOST_CHAT_1, + SFX_BFOST_CHAT_2, + SFX_BFOST_CHAT_3, + SFX_BFOST_CHAT_4, + SFX_BFOST_CHAT_5, + SFX_BFOST_CHAT_6, + SFX_BFOST_CHAT_7, + SFX_BFOST_CHAT_8, + SFX_BFOST_CHAT_9, + SFX_BFOST_CHAT_10, + SFX_BFOST_DODGE_1, + SFX_BFOST_DODGE_2, + SFX_BFOST_DODGE_3, + SFX_BFOST_DODGE_4, + SFX_BFOST_DODGE_5, + SFX_BFOST_DODGE_6, + SFX_BFOST_DODGE_7, + SFX_BFOST_DODGE_8, + SFX_BFOST_DODGE_9, + SFX_BFOST_DODGE_10, + SFX_BFOST_DODGE_11, + SFX_BFOST_GENERIC_CRASH_1, + SFX_BFOST_GENERIC_CRASH_2, + SFX_BFOST_GENERIC_CRASH_3, + SFX_BFOST_GENERIC_CRASH_4, + SFX_BFOST_GENERIC_CRASH_5, + SFX_BFOST_GENERIC_CRASH_6, + SFX_BFOST_GENERIC_CRASH_7, + SFX_BFOST_GENERIC_CRASH_8, + SFX_BFOST_GUN_PANIC_1, + SFX_BFOST_GUN_PANIC_2, + SFX_BFOST_GUN_PANIC_3, + SFX_BFOST_GUN_PANIC_4, + SFX_BFOST_GUN_PANIC_5, + SFX_BFOST_JACKED_1, + SFX_BFOST_JACKED_2, + SFX_BFOST_JACKED_3, + SFX_BFOST_JACKED_4, + SFX_BFOST_JACKED_5, + SFX_BFOST_JACKED_6, + SFX_BFOST_JACKED_7, + SFX_BFOST_JACKED_8, + SFX_BFOST_LOST_1, + SFX_BFOST_LOST_2, + SFX_BFOST_MUGGED_1, + SFX_BFOST_MUGGED_2, + SFX_BFOST_RUN_1, + SFX_BFOST_RUN_2, + SFX_BFOST_RUN_3, + SFX_BFOST_RUN_4, + SFX_BFOST_SAVED_1, + SFX_BFOST_SAVED_2, + SFX_BFOST_TAXI_1, + SFX_BFORI_BLOCKED_1, + SFX_BFORI_BLOCKED_2, + SFX_BFORI_BLOCKED_3, + SFX_BFORI_BLOCKED_4, + SFX_BFORI_BLOCKED_5, + SFX_BFORI_BLOCKED_6, + SFX_BFORI_BLOCKED_7, + SFX_BFORI_BLOCKED_8, + SFX_BFORI_BUMP_1, + SFX_BFORI_BUMP_2, + SFX_BFORI_BUMP_3, + SFX_BFORI_BUMP_4, + SFX_BFORI_BUMP_5, + SFX_BFORI_BUMP_6, + SFX_BFORI_BUMP_7, + SFX_BFORI_BUMP_8, + SFX_BFORI_BUMP_9, + SFX_BFORI_CAR_CRASH_1, + SFX_BFORI_CAR_CRASH_2, + SFX_BFORI_CAR_CRASH_3, + SFX_BFORI_CAR_CRASH_4, + SFX_BFORI_CAR_CRASH_5, + SFX_BFORI_CAR_CRASH_6, + SFX_BFORI_CAR_CRASH_7, + SFX_BFORI_DODGE_1, + SFX_BFORI_DODGE_2, + SFX_BFORI_DODGE_3, + SFX_BFORI_DODGE_4, + SFX_BFORI_DODGE_5, + SFX_BFORI_DODGE_6, + SFX_BFORI_DODGE_7, + SFX_BFORI_DODGE_8, + SFX_BFORI_DODGE_9, + SFX_BFORI_GENERIC_CRASH_1, + SFX_BFORI_GENERIC_CRASH_2, + SFX_BFORI_GENERIC_CRASH_3, + SFX_BFORI_GENERIC_CRASH_4, + SFX_BFORI_GENERIC_CRASH_5, + SFX_BFORI_GENERIC_CRASH_6, + SFX_BFORI_GENERIC_CRASH_7, + SFX_BFORI_GUN_PANIC_1, + SFX_BFORI_GUN_PANIC_2, + SFX_BFORI_GUN_PANIC_3, + SFX_BFORI_GUN_PANIC_4, + SFX_BFORI_GUN_PANIC_5, + SFX_BFORI_JACKED_1, + SFX_BFORI_JACKED_2, + SFX_BFORI_JACKED_3, + SFX_BFORI_JACKED_4, + SFX_BFORI_LOST_1, + SFX_BFORI_LOST_2, + SFX_BFORI_MUGGED_1, + SFX_BFORI_MUGGED_2, + SFX_BFORI_RUN_1, + SFX_BFORI_RUN_2, + SFX_BFORI_RUN_3, + SFX_BFORI_RUN_4, + SFX_BFORI_SAVED_1, + SFX_BFORI_SHOCKED_1, + SFX_BFORI_SHOCKED_2, + SFX_BFORI_TAXI_1, + SFX_BFORI_TAXI_2, + + SFX_BFYST_BLOCKED_1, + SFX_BFYST_BLOCKED_2, + SFX_BFYST_BLOCKED_3, + SFX_BFYST_BLOCKED_4, + SFX_BFYST_BLOCKED_5, + SFX_BFYST_BLOCKED_6, + SFX_BFYST_BLOCKED_7, + SFX_BFYST_BLOCKED_8, + SFX_BFYST_BUMP_1, + SFX_BFYST_BUMP_2, + SFX_BFYST_BUMP_3, + SFX_BFYST_BUMP_4, + SFX_BFYST_BUMP_5, + SFX_BFYST_BUMP_6, + SFX_BFYST_BUMP_7, + SFX_BFYST_BUMP_8, + SFX_BFYST_BUMP_9, + SFX_BFYST_CAR_CRASH_1, + SFX_BFYST_CAR_CRASH_2, + SFX_BFYST_CAR_CRASH_3, + SFX_BFYST_CAR_CRASH_4, + SFX_BFYST_CAR_CRASH_5, + SFX_BFYST_CAR_CRASH_6, + SFX_BFYST_CAR_CRASH_7, + SFX_BFYST_CAR_CRASH_8, + SFX_BFYST_CAR_CRASH_9, + SFX_BFYST_CHAT_1, + SFX_BFYST_CHAT_2, + SFX_BFYST_CHAT_3, + SFX_BFYST_CHAT_4, + SFX_BFYST_CHAT_5, + SFX_BFYST_CHAT_6, + SFX_BFYST_CHAT_7, + SFX_BFYST_CHAT_8, + SFX_BFYST_CHAT_9, + SFX_BFYST_DODGE_1, + SFX_BFYST_DODGE_2, + SFX_BFYST_DODGE_3, + SFX_BFYST_DODGE_4, + SFX_BFYST_DODGE_5, + SFX_BFYST_DODGE_6, + SFX_BFYST_DODGE_7, + SFX_BFYST_DODGE_8, + SFX_BFYST_DODGE_9, + SFX_BFYST_GENERIC_CRASH_1, + SFX_BFYST_GENERIC_CRASH_2, + SFX_BFYST_GENERIC_CRASH_3, + SFX_BFYST_GENERIC_CRASH_4, + SFX_BFYST_GENERIC_CRASH_5, + SFX_BFYST_GENERIC_CRASH_6, + SFX_BFYST_GENERIC_CRASH_7, + SFX_BFYST_GENERIC_CRASH_8, + SFX_BFYST_GUN_PANIC_1, + SFX_BFYST_GUN_PANIC_2, + SFX_BFYST_GUN_PANIC_3, + SFX_BFYST_GUN_PANIC_4, + SFX_BFYST_JACKED_1, + SFX_BFYST_JACKED_2, + SFX_BFYST_JACKED_3, + SFX_BFYST_JACKED_4, + SFX_BFYST_JACKED_5, + SFX_BFYST_LOST_1, + SFX_BFYST_LOST_2, + SFX_BFYST_MUGGED_1, + SFX_BFYST_MUGGED_2, + SFX_BFYST_RUN_1, + SFX_BFYST_RUN_2, + SFX_BFYST_RUN_3, + SFX_BFYST_RUN_4, + SFX_BFYST_RUN_5, + SFX_BFYST_RUN_6, + SFX_BFYST_SAVED_1, + SFX_BFYST_SAVED_2, + SFX_BFYST_TAXI_1, + + SFX_HFORI_BLOCKED_1, + SFX_HFORI_BLOCKED_2, + SFX_HFORI_BLOCKED_3, + SFX_HFORI_BLOCKED_4, + SFX_HFORI_BLOCKED_5, + SFX_HFORI_BLOCKED_6, + SFX_HFORI_BUMP_1, + SFX_HFORI_BUMP_2, + SFX_HFORI_BUMP_3, + SFX_HFORI_BUMP_4, + SFX_HFORI_BUMP_5, + SFX_HFORI_BUMP_6, + SFX_HFORI_BUMP_7, + SFX_HFORI_BUMP_8, + SFX_HFORI_BUMP_9, + SFX_HFORI_BUMP_10, + SFX_HFORI_CAR_CRASH_1, + SFX_HFORI_CAR_CRASH_2, + SFX_HFORI_CAR_CRASH_3, + SFX_HFORI_CAR_CRASH_4, + SFX_HFORI_CAR_CRASH_5, + SFX_HFORI_CAR_CRASH_6, + SFX_HFORI_CAR_CRASH_7, + SFX_HFORI_DODGE_1, + SFX_HFORI_DODGE_2, + SFX_HFORI_DODGE_3, + SFX_HFORI_DODGE_4, + SFX_HFORI_DODGE_5, + SFX_HFORI_DODGE_6, + SFX_HFORI_EYEING_1, + SFX_HFORI_EYEING_2, + SFX_HFORI_GENERIC_CRASH_1, + SFX_HFORI_GENERIC_CRASH_2, + SFX_HFORI_GENERIC_CRASH_3, + SFX_HFORI_GENERIC_CRASH_4, + SFX_HFORI_GENERIC_CRASH_5, + SFX_HFORI_GENERIC_CRASH_6, + SFX_HFORI_GENERIC_CRASH_7, + SFX_HFORI_GUN_PANIC_1, + SFX_HFORI_GUN_PANIC_2, + SFX_HFORI_GUN_PANIC_3, + SFX_HFORI_GUN_PANIC_4, + SFX_HFORI_GUN_PANIC_5, + SFX_HFORI_GUN_PANIC_6, + SFX_HFORI_JACKED_1, + SFX_HFORI_JACKED_2, + SFX_HFORI_JACKED_3, + SFX_HFORI_JACKED_4, + SFX_HFORI_JACKED_5, + SFX_HFORI_JACKED_6, + SFX_HFORI_JACKED_7, + SFX_HFORI_JACKED_8, + SFX_HFORI_JACKED_9, + SFX_HFORI_LOST_1, + SFX_HFORI_LOST_2, + SFX_HFORI_MUGGED_1, + SFX_HFORI_MUGGED_2, + SFX_HFORI_RUN_1, + SFX_HFORI_RUN_2, + SFX_HFORI_RUN_3, + SFX_HFORI_RUN_4, + SFX_HFORI_SAVED_1, + SFX_HFORI_SHOCKED_1, + SFX_HFORI_SHOCKED_2, + SFX_HFORI_TAXI_1, + + SFX_WFYBU_BUMP_1, + SFX_WFYBU_BUMP_2, + SFX_WFYBU_BUMP_3, + SFX_WFYBU_BUMP_4, + SFX_WFYBU_BUMP_5, + SFX_WFYBU_BUMP_6, + SFX_WFYBU_BUMP_7, + SFX_WFYBU_BUMP_8, + SFX_WFYBU_BUMP_9, + SFX_WFYBU_BUMP_10, + SFX_WFYBU_BUMP_11, + SFX_WFYBU_BUMP_12, + SFX_WFYBU_BUMP_13, + SFX_WFYBU_BUMP_14, + SFX_WFYBU_BUMP_15, + SFX_WFYBU_BUMP_16, + SFX_WFYBU_BUMP_17, + SFX_WFYBU_BUMP_18, + SFX_WFYBU_BUMP_19, + SFX_WFYBU_BUMP_20, + SFX_WFYBU_BUMP_21, + SFX_WFYBU_CAR_CRASH_1, + SFX_WFYBU_CAR_CRASH_2, + SFX_WFYBU_CAR_CRASH_3, + SFX_WFYBU_CAR_CRASH_4, + SFX_WFYBU_CAR_CRASH_5, + SFX_WFYBU_CAR_CRASH_6, + SFX_WFYBU_CAR_CRASH_7, + SFX_WFYBU_CAR_CRASH_8, + SFX_WFYBU_CAR_CRASH_9, + SFX_WFYBU_GENERIC_CRASH_1, + SFX_WFYBU_GENERIC_CRASH_2, + SFX_WFYBU_GENERIC_CRASH_3, + SFX_WFYBU_GENERIC_CRASH_4, + SFX_WFYBU_GENERIC_CRASH_5, + SFX_WFYBU_GENERIC_CRASH_6, + SFX_WFYBU_GENERIC_CRASH_7, + SFX_WFYBU_GENERIC_CRASH_8, + SFX_WFYBU_GUN_PANIC_1, + SFX_WFYBU_GUN_PANIC_2, + SFX_WFYBU_GUN_PANIC_3, + SFX_WFYBU_GUN_PANIC_4, + SFX_WFYBU_GUN_PANIC_5, + SFX_WFYBU_GUN_PANIC_6, + SFX_WFYBU_GUN_PANIC_7, + SFX_WFYBU_GUN_PANIC_8, + SFX_WFYBU_JACKED_1, + SFX_WFYBU_JACKED_2, + SFX_WFYBU_JACKED_3, + SFX_WFYBU_JACKED_4, + SFX_WFYBU_JACKED_5, + SFX_WFYBU_JACKED_6, + SFX_WFYBU_JACKED_7, + SFX_WFYBU_JACKED_8, + SFX_WFYBU_MUGGED_1, + SFX_WFYBU_MUGGED_2, + SFX_WFYBU_MUGGED_3, + SFX_WFYBU_MUGGED_4, + SFX_WFYBU_RUN_1, + SFX_WFYBU_RUN_2, + SFX_WFYBU_RUN_3, + SFX_WFYBU_RUN_4, + SFX_WFYBU_RUN_5, + SFX_WFYBU_RUN_6, + SFX_WFYBU_RUN_7, + SFX_WFYBU_RUN_8, + SFX_WFYBU_SHOCKED_1, + SFX_WFYBU_SHOCKED_2, + SFX_WFYBU_SHOCKED_3, + SFX_WFYBU_TAXI_1, + SFX_WFYBU_TAXI_2, + + SFX_WFOTR_BUMP_1, + SFX_WFOTR_BUMP_2, + SFX_WFOTR_BUMP_3, + SFX_WFOTR_BUMP_4, + SFX_WFOTR_BUMP_5, + SFX_WFOTR_BUMP_6, + SFX_WFOTR_BUMP_7, + SFX_WFOTR_BUMP_8, + SFX_WFOTR_BUMP_9, + SFX_WFOTR_BUMP_10, + SFX_WFOTR_BUMP_11, + SFX_WFOTR_CHAT_1, + SFX_WFOTR_CHAT_2, + SFX_WFOTR_CHAT_3, + SFX_WFOTR_CHAT_4, + SFX_WFOTR_CHAT_5, + SFX_WFOTR_CHAT_6, + SFX_WFOTR_CHAT_7, + SFX_WFOTR_CHAT_8, + SFX_WFOTR_CHAT_9, + SFX_WFOTR_DODGE_1, + SFX_WFOTR_DODGE_2, + SFX_WFOTR_DODGE_3, + SFX_WFOTR_DODGE_4, + SFX_WFOTR_DODGE_5, + SFX_WFOTR_DODGE_6, + SFX_WFOTR_DODGE_7, + SFX_WFOTR_DODGE_8, + SFX_WFOTR_DODGE_9, + SFX_WFOTR_GUN_COOL_1, + SFX_WFOTR_GUN_COOL_2, + SFX_WFOTR_GUN_COOL_3, + SFX_WFOTR_GUN_COOL_4, + SFX_WFOTR_GUN_COOL_5, + SFX_WFOTR_GUN_COOL_6, + SFX_WFOTR_RUN_1, + SFX_WFOTR_RUN_2, + SFX_WFOTR_RUN_3, + SFX_WFOTR_RUN_4, + SFX_WFOTR_RUN_5, + SFX_WFOTR_RUN_6, + SFX_WFOTR_SAVED_1, + SFX_WFOTR_SOLICIT_1, + SFX_WFOTR_SOLICIT_2, + SFX_WFOTR_SOLICIT_3, + SFX_WFOTR_SOLICIT_4, + SFX_WFOTR_SOLICIT_5, + SFX_WFOTR_SOLICIT_6, + SFX_WFOTR_SOLICIT_7, + SFX_WFOTR_SOLICIT_8, + SFX_WFOTR_SOLICIT_9, + SFX_WFOTR_TAXI_1, + + SFX_WFYJG_BUMP_1, + SFX_WFYJG_BUMP_2, + SFX_WFYJG_BUMP_3, + SFX_WFYJG_BUMP_4, + SFX_WFYJG_BUMP_5, + SFX_WFYJG_BUMP_6, + SFX_WFYJG_BUMP_7, + SFX_WFYJG_BUMP_8, + SFX_WFYJG_BUMP_9, + SFX_WFYJG_BUMP_10, + SFX_WFYJG_BUMP_11, + SFX_WFYJG_BUMP_12, + SFX_WFYJG_DODGE_1, + SFX_WFYJG_DODGE_2, + SFX_WFYJG_DODGE_3, + SFX_WFYJG_DODGE_4, + SFX_WFYJG_DODGE_5, + SFX_WFYJG_DODGE_6, + SFX_WFYJG_DODGE_7, + SFX_WFYJG_DODGE_8, + SFX_WFYJG_GUN_PANIC_1, + SFX_WFYJG_GUN_PANIC_2, + SFX_WFYJG_GUN_PANIC_3, + SFX_WFYJG_GUN_PANIC_4, + SFX_WFYJG_RUN_1, + SFX_WFYJG_RUN_2, + SFX_WFYJG_RUN_3, + SFX_WFYJG_RUN_4, + SFX_WFYJG_RUN_5, + SFX_WFYJG_RUN_6, + SFX_WFYJG_SAVED_1, + SFX_WFYJG_TAXI_1, + + SFX_WFYSH_BUMP_1, + SFX_WFYSH_BUMP_2, + SFX_WFYSH_BUMP_3, + SFX_WFYSH_BUMP_4, + SFX_WFYSH_BUMP_5, + SFX_WFYSH_BUMP_6, + SFX_WFYSH_BUMP_7, + SFX_WFYSH_BUMP_8, + SFX_WFYSH_BUMP_9, + SFX_WFYSH_BUMP_10, + SFX_WFYSH_BUMP_11, + SFX_WFYSH_BUMP_12, + SFX_WFYSH_CHAT_1, + SFX_WFYSH_CHAT_2, + SFX_WFYSH_CHAT_3, + SFX_WFYSH_CHAT_4, + SFX_WFYSH_CHAT_5, + SFX_WFYSH_CHAT_6, + SFX_WFYSH_CHAT_7, + SFX_WFYSH_CHAT_8, + SFX_WFYSH_CHAT_9, + SFX_WFYSH_CHAT_10, + SFX_WFYSH_DODGE_1, + SFX_WFYSH_DODGE_2, + SFX_WFYSH_DODGE_3, + SFX_WFYSH_DODGE_4, + SFX_WFYSH_DODGE_5, + SFX_WFYSH_DODGE_6, + SFX_WFYSH_DODGE_7, + SFX_WFYSH_DODGE_8, + SFX_WFYSH_DODGE_9, + SFX_WFYSH_DODGE_10, + SFX_WFYSH_DODGE_11, + SFX_WFYSH_GUN_COOL_1, + SFX_WFYSH_GUN_COOL_2, + SFX_WFYSH_GUN_COOL_3, + SFX_WFYSH_GUN_COOL_4, + SFX_WFYSH_GUN_COOL_5, + SFX_WFYSH_GUN_COOL_6, + SFX_WFYSH_GUN_COOL_7, + SFX_WFYSH_GUN_COOL_8, + SFX_WFYSH_GUN_COOL_9, + SFX_WFYSH_LOST_1, + SFX_WFYSH_LOST_2, + SFX_WFYSH_MUGGED_1, + SFX_WFYSH_MUGGED_2, + SFX_WFYSH_RUN_1, + SFX_WFYSH_RUN_2, + SFX_WFYSH_RUN_3, + SFX_WFYSH_RUN_4, + SFX_WFYSH_RUN_5, + SFX_WFYSH_RUN_6, + SFX_WFYSH_RUN_7, + SFX_WFYSH_RUN_8, + SFX_WFYSH_RUN_9, + SFX_WFYSH_RUN_10, + SFX_WFYSH_RUN_11, + SFX_WFYSH_SAVED_1, + SFX_WFYSH_SAVED_2, + SFX_WFYSH_SAVED_3, + SFX_WFYSH_SAVED_4, + SFX_WFYSH_SHOCKED_1, + SFX_WFYSH_SHOCKED_2, + SFX_WFYSH_SHOCKED_3, + SFX_WFYSH_SHOCKED_4, + SFX_WFYSH_SHOCKED_5, + SFX_WFYSH_TAXI_1, + SFX_WFYSH_TAXI_2, + + SFX_WMOTR_BUMP_1, + SFX_WMOTR_BUMP_2, + SFX_WMOTR_BUMP_3, + SFX_WMOTR_BUMP_4, + SFX_WMOTR_BUMP_5, + SFX_WMOTR_BUMP_6, + SFX_WMOTR_BUMP_7, + SFX_WMOTR_BUMP_8, + SFX_WMOTR_BUMP_9, + SFX_WMOTR_BUMP_10, + SFX_WMOTR_CHAT_1, + SFX_WMOTR_CHAT_2, + SFX_WMOTR_CHAT_3, + SFX_WMOTR_CHAT_4, + SFX_WMOTR_CHAT_5, + SFX_WMOTR_CHAT_6, + SFX_WMOTR_CHAT_7, + SFX_WMOTR_CHAT_8, + SFX_WMOTR_CHAT_9, + SFX_WMOTR_CHAT_10, + SFX_WMOTR_CHAT_11, + SFX_WMOTR_CHAT_12, + SFX_WMOTR_CHAT_13, + SFX_WMOTR_DODGE_1, + SFX_WMOTR_DODGE_2, + SFX_WMOTR_DODGE_3, + SFX_WMOTR_DODGE_4, + SFX_WMOTR_DODGE_5, + SFX_WMOTR_DODGE_6, + SFX_WMOTR_DODGE_7, + SFX_WMOTR_DODGE_8, + SFX_WMOTR_DODGE_9, + SFX_WMOTR_DODGE_10, + SFX_WMOTR_DODGE_11, + SFX_WMOTR_DODGE_12, + SFX_WMOTR_DODGE_13, + SFX_WMOTR_DODGE_14, + SFX_WMOTR_DODGE_15, + SFX_WMOTR_DODGE_16, + SFX_WMOTR_DODGE_17, + SFX_WMOTR_EYEING_1, + SFX_WMOTR_EYEING_2, + SFX_WMOTR_FIGHT_1, + SFX_WMOTR_FIGHT_2, + SFX_WMOTR_FIGHT_3, + SFX_WMOTR_FIGHT_4, + SFX_WMOTR_FIGHT_5, + SFX_WMOTR_FIGHT_6, + SFX_WMOTR_GUN_COOL_1, + SFX_WMOTR_GUN_COOL_2, + SFX_WMOTR_GUN_COOL_3, + SFX_WMOTR_GUN_COOL_4, + SFX_WMOTR_GUN_COOL_5, + SFX_WMOTR_SAVED_1, + SFX_WMOTR_SHOCKED_1, + SFX_WMOTR_SHOCKED_2, + SFX_WMOTR_SHOCKED_3, + SFX_WMOTR_SOLICIT_1, + SFX_WMOTR_SOLICIT_2, + SFX_WMOTR_SOLICIT_3, + SFX_WMOTR_SOLICIT_4, + SFX_WMOTR_SOLICIT_5, + SFX_WMOTR_SOLICIT_6, + SFX_WMOTR_SOLICIT_7, + SFX_WMOTR_TAXI_1, + + SFX_BMOBE_BUMP_1, + SFX_BMOBE_BUMP_2, + SFX_BMOBE_BUMP_3, + SFX_BMOBE_BUMP_4, + SFX_BMOBE_BUMP_5, + SFX_BMOBE_CAR_CRASH_1, + SFX_BMOBE_CAR_CRASH_2, + SFX_BMOBE_CAR_CRASH_3, + SFX_BMOBE_CAR_CRASH_4, + SFX_BMOBE_CAR_CRASH_5, + SFX_BMOBE_CAR_CRASH_6, + SFX_BMOBE_CAR_CRASH_7, + SFX_BMOBE_CAR_CRASH_8, + SFX_BMOBE_CAR_CRASH_9, + SFX_BMOBE_CHAT_1, + SFX_BMOBE_CHAT_2, + SFX_BMOBE_CHAT_3, + SFX_BMOBE_CHAT_4, + SFX_BMOBE_CHAT_5, + SFX_BMOBE_CHAT_6, + SFX_BMOBE_CHAT_7, + SFX_BMOBE_CHAT_8, + SFX_BMOBE_CHAT_9, + SFX_BMOBE_CHAT_10, + SFX_BMOBE_DODGE_1, + SFX_BMOBE_DODGE_2, + SFX_BMOBE_DODGE_3, + SFX_BMOBE_DODGE_4, + SFX_BMOBE_DODGE_5, + SFX_BMOBE_DODGE_6, + SFX_BMOBE_DODGE_7, + SFX_BMOBE_DODGE_8, + SFX_BMOBE_DODGE_9, + SFX_BMOBE_DODGE_10, + SFX_BMOBE_DODGE_11, + SFX_BMOBE_FIGHT_1, + SFX_BMOBE_FIGHT_2, + SFX_BMOBE_FIGHT_3, + SFX_BMOBE_FIGHT_4, + SFX_BMOBE_FIGHT_5, + SFX_BMOBE_FIGHT_6, + SFX_BMOBE_FIGHT_7, + SFX_BMOBE_FIGHT_8, + SFX_BMOBE_FIGHT_9, + SFX_BMOBE_FIGHT_10, + SFX_BMOBE_GENERIC_CRASH_1, + SFX_BMOBE_GENERIC_CRASH_2, + SFX_BMOBE_GENERIC_CRASH_3, + SFX_BMOBE_GENERIC_CRASH_4, + SFX_BMOBE_GENERIC_CRASH_5, + SFX_BMOBE_GENERIC_CRASH_6, + SFX_BMOBE_GENERIC_CRASH_7, + SFX_BMOBE_GUN_PANIC_1, + SFX_BMOBE_GUN_PANIC_2, + SFX_BMOBE_GUN_PANIC_3, + SFX_BMOBE_GUN_PANIC_4, + SFX_BMOBE_GUN_PANIC_5, + SFX_BMOBE_JACKED_1, + SFX_BMOBE_JACKED_2, + SFX_BMOBE_JACKED_3, + SFX_BMOBE_JACKED_4, + SFX_BMOBE_JACKED_5, + SFX_BMOBE_JACKED_6, + SFX_BMOBE_MUGGED_1, + SFX_BMOBE_MUGGED_2, + SFX_BMOBE_MUGGED_3, + SFX_BMOBE_MUGGED_4, + SFX_BMOBE_SAVED_1, + SFX_BMOBE_SAVED_2, + SFX_BMOBE_SAVED_3, + SFX_BMOBE_SHOCKED_1, + SFX_BMOBE_SHOCKED_2, + SFX_BMOBE_SHOCKED_3, + SFX_BMOBE_TAXI_1, + + SFX_WMYGO_BUMP_1, + SFX_WMYGO_BUMP_2, + SFX_WMYGO_BUMP_3, + SFX_WMYGO_BUMP_4, + SFX_WMYGO_BUMP_5, + SFX_WMYGO_BUMP_6, + SFX_WMYGO_BUMP_7, + SFX_WMYGO_BUMP_8, + SFX_WMYGO_BUMP_9, + SFX_WMYGO_CAR_CRASH_1, + SFX_WMYGO_CAR_CRASH_2, + SFX_WMYGO_CAR_CRASH_3, + SFX_WMYGO_CAR_CRASH_4, + SFX_WMYGO_CAR_CRASH_5, + SFX_WMYGO_CAR_CRASH_6, + SFX_WMYGO_CAR_CRASH_7, + SFX_WMYGO_CHAT_1, + SFX_WMYGO_CHAT_2, + SFX_WMYGO_CHAT_3, + SFX_WMYGO_CHAT_4, + SFX_WMYGO_CHAT_5, + SFX_WMYGO_CHAT_6, + SFX_WMYGO_CHAT_7, + SFX_WMYGO_CHAT_8, + SFX_WMYGO_CHAT_9, + SFX_WMYGO_CHAT_10, + SFX_WMYGO_DODGE_1, + SFX_WMYGO_DODGE_2, + SFX_WMYGO_DODGE_3, + SFX_WMYGO_DODGE_4, + SFX_WMYGO_DODGE_5, + SFX_WMYGO_DODGE_6, + SFX_WMYGO_DODGE_7, + SFX_WMYGO_DODGE_8, + SFX_WMYGO_DODGE_9, + SFX_WMYGO_DODGE_10, + SFX_WMYGO_DODGE_11, + SFX_WMYGO_EYEING_1, + SFX_WMYGO_EYEING_2, + SFX_WMYGO_GENERIC_CRASH_1, + SFX_WMYGO_GENERIC_CRASH_2, + SFX_WMYGO_GENERIC_CRASH_3, + SFX_WMYGO_GENERIC_CRASH_4, + SFX_WMYGO_GENERIC_CRASH_5, + SFX_WMYGO_GENERIC_CRASH_6, + SFX_WMYGO_GENERIC_CRASH_7, + SFX_WMYGO_GUN_PANIC_1, + SFX_WMYGO_GUN_PANIC_2, + SFX_WMYGO_GUN_PANIC_3, + SFX_WMYGO_GUN_PANIC_4, + SFX_WMYGO_GUN_PANIC_5, + SFX_WMYGO_JACKED_1, + SFX_WMYGO_JACKED_2, + SFX_WMYGO_JACKED_3, + SFX_WMYGO_JACKED_4, + SFX_WMYGO_JACKED_5, + SFX_WMYGO_JACKED_6, + SFX_WMYGO_MUGGED_1, + SFX_WMYGO_MUGGED_2, + SFX_WMYGO_RUN_1, + SFX_WMYGO_RUN_2, + SFX_WMYGO_RUN_3, + SFX_WMYGO_RUN_4, + SFX_WMYGO_RUN_5, + SFX_WMYGO_RUN_6, + SFX_WMYGO_SAVED_1, + SFX_WMYGO_SHOCKED_1, + SFX_WMYGO_SHOCKED_2, + SFX_WMYGO_TAXI_1, + SFX_WMYGO_TAXI_2, + SFX_WMYGO_TAXI_3, + + SFX_WFYBE_BLOCKED_1, + SFX_WFYBE_BLOCKED_2, + SFX_WFYBE_BLOCKED_3, + SFX_WFYBE_BLOCKED_4, + SFX_WFYBE_BLOCKED_5, + SFX_WFYBE_BLOCKED_6, + SFX_WFYBE_BLOCKED_7, + SFX_WFYBE_BUMP_1, + SFX_WFYBE_BUMP_2, + SFX_WFYBE_BUMP_3, + SFX_WFYBE_BUMP_4, + SFX_WFYBE_BUMP_5, + SFX_WFYBE_BUMP_6, + SFX_WFYBE_BUMP_7, + SFX_WFYBE_BUMP_8, + SFX_WFYBE_BUMP_9, + SFX_WFYBE_BUMP_10, + SFX_WFYBE_BUMP_11, + SFX_WFYBE_CAR_CRASH_1, + SFX_WFYBE_CAR_CRASH_2, + SFX_WFYBE_CAR_CRASH_3, + SFX_WFYBE_CAR_CRASH_4, + SFX_WFYBE_CAR_CRASH_5, + SFX_WFYBE_CAR_CRASH_6, + SFX_WFYBE_CHAT_1, + SFX_WFYBE_CHAT_2, + SFX_WFYBE_CHAT_3, + SFX_WFYBE_CHAT_4, + SFX_WFYBE_CHAT_5, + SFX_WFYBE_CHAT_6, + SFX_WFYBE_CHAT_7, + SFX_WFYBE_CHAT_8, + SFX_WFYBE_CHAT_9, + SFX_WFYBE_CHAT_10, + SFX_WFYBE_DODGE_1, + SFX_WFYBE_DODGE_2, + SFX_WFYBE_DODGE_3, + SFX_WFYBE_DODGE_4, + SFX_WFYBE_DODGE_5, + SFX_WFYBE_DODGE_6, + SFX_WFYBE_DODGE_7, + SFX_WFYBE_DODGE_8, + SFX_WFYBE_GENERIC_CRASH_1, + SFX_WFYBE_GENERIC_CRASH_2, + SFX_WFYBE_GENERIC_CRASH_3, + SFX_WFYBE_GENERIC_CRASH_4, + SFX_WFYBE_GENERIC_CRASH_5, + SFX_WFYBE_GENERIC_CRASH_6, + SFX_WFYBE_GUN_PANIC_1, + SFX_WFYBE_GUN_PANIC_2, + SFX_WFYBE_GUN_PANIC_3, + SFX_WFYBE_GUN_PANIC_4, + SFX_WFYBE_GUN_PANIC_5, + SFX_WFYBE_JACKED_1, + SFX_WFYBE_JACKED_2, + SFX_WFYBE_JACKED_3, + SFX_WFYBE_JACKED_4, + SFX_WFYBE_RUN_1, + SFX_WFYBE_RUN_2, + SFX_WFYBE_RUN_3, + SFX_WFYBE_RUN_4, + SFX_WFYBE_RUN_5, + SFX_WFYBE_SAVED_1, + SFX_WFYBE_SHOCKED_1, + SFX_WFYBE_SHOCKED_2, + SFX_WFYBE_SHOCKED_3, + SFX_WFYBE_TAXI_1, + + SFX_WFORI_BLOCKED_1, + SFX_WFORI_BLOCKED_2, + SFX_WFORI_BLOCKED_3, + SFX_WFORI_BLOCKED_4, + SFX_WFORI_BLOCKED_5, + SFX_WFORI_BLOCKED_6, + SFX_WFORI_BLOCKED_7, + SFX_WFORI_BUMP_1, + SFX_WFORI_BUMP_2, + SFX_WFORI_BUMP_3, + SFX_WFORI_BUMP_4, + SFX_WFORI_BUMP_5, + SFX_WFORI_BUMP_6, + SFX_WFORI_BUMP_7, + SFX_WFORI_BUMP_8, + SFX_WFORI_BUMP_9, + SFX_WFORI_BUMP_10, + SFX_WFORI_BUMP_11, + SFX_WFORI_CAR_CRASH_1, + SFX_WFORI_CAR_CRASH_2, + SFX_WFORI_CAR_CRASH_3, + SFX_WFORI_CAR_CRASH_4, + SFX_WFORI_CAR_CRASH_5, + SFX_WFORI_CAR_CRASH_6, + SFX_WFORI_CAR_CRASH_7, + SFX_WFORI_CAR_CRASH_8, + SFX_WFORI_CAR_CRASH_9, + SFX_WFORI_CAR_CRASH_10, + SFX_WFORI_DODGE_1, + SFX_WFORI_DODGE_2, + SFX_WFORI_DODGE_3, + SFX_WFORI_DODGE_4, + SFX_WFORI_DODGE_5, + SFX_WFORI_DODGE_6, + SFX_WFORI_DODGE_7, + SFX_WFORI_DODGE_8, + SFX_WFORI_DODGE_9, + SFX_WFORI_DODGE_10, + SFX_WFORI_DODGE_11, + SFX_WFORI_FIGHT_1, + SFX_WFORI_FIGHT_2, + SFX_WFORI_FIGHT_3, + SFX_WFORI_FIGHT_4, + SFX_WFORI_FIGHT_5, + SFX_WFORI_FIGHT_6, + SFX_WFORI_FIGHT_7, + SFX_WFORI_GENERIC_CRASH_1, + SFX_WFORI_GENERIC_CRASH_2, + SFX_WFORI_GENERIC_CRASH_3, + SFX_WFORI_GENERIC_CRASH_4, + SFX_WFORI_GENERIC_CRASH_5, + SFX_WFORI_GENERIC_CRASH_6, + SFX_WFORI_GENERIC_CRASH_7, + SFX_WFORI_GENERIC_CRASH_8, + SFX_WFORI_GUN_PANIC_1, + SFX_WFORI_GUN_PANIC_2, + SFX_WFORI_GUN_PANIC_3, + SFX_WFORI_GUN_PANIC_4, + SFX_WFORI_GUN_PANIC_5, + SFX_WFORI_GUN_PANIC_6, + SFX_WFORI_JACKED_1, + SFX_WFORI_JACKED_2, + SFX_WFORI_JACKED_3, + SFX_WFORI_JACKED_4, + SFX_WFORI_JACKED_5, + SFX_WFORI_JACKED_6, + SFX_WFORI_LOST_1, + SFX_WFORI_LOST_2, + SFX_WFORI_MUGGED_1, + SFX_WFORI_MUGGED_2, + SFX_WFORI_MUGGED_3, + SFX_WFORI_SAVED_1, + SFX_WFORI_SHOCKED_1, + SFX_WFORI_SHOCKED_2, + SFX_WFORI_SHOCKED_3, + SFX_WFORI_TAXI_1, + + SFX_WFOGO_BUMP_1, + SFX_WFOGO_BUMP_2, + SFX_WFOGO_BUMP_3, + SFX_WFOGO_BUMP_4, + SFX_WFOGO_BUMP_5, + SFX_WFOGO_BUMP_6, + SFX_WFOGO_BUMP_7, + SFX_WFOGO_BUMP_8, + SFX_WFOGO_CAR_CRASH_1, + SFX_WFOGO_CAR_CRASH_2, + SFX_WFOGO_CAR_CRASH_3, + SFX_WFOGO_CAR_CRASH_4, + SFX_WFOGO_CAR_CRASH_5, + SFX_WFOGO_CAR_CRASH_6, + SFX_WFOGO_CAR_CRASH_7, + SFX_WFOGO_CAR_CRASH_8, + SFX_WFOGO_CHAT_1, + SFX_WFOGO_CHAT_2, + SFX_WFOGO_CHAT_3, + SFX_WFOGO_CHAT_4, + SFX_WFOGO_CHAT_5, + SFX_WFOGO_CHAT_6, + SFX_WFOGO_CHAT_7, + SFX_WFOGO_CHAT_8, + SFX_WFOGO_CHAT_9, + SFX_WFOGO_CHAT_10, + SFX_WFOGO_CHAT_11, + SFX_WFOGO_DODGE_1, + SFX_WFOGO_DODGE_2, + SFX_WFOGO_DODGE_3, + SFX_WFOGO_DODGE_4, + SFX_WFOGO_DODGE_5, + SFX_WFOGO_DODGE_6, + SFX_WFOGO_DODGE_7, + SFX_WFOGO_DODGE_8, + SFX_WFOGO_DODGE_9, + SFX_WFOGO_FIGHT_1, + SFX_WFOGO_FIGHT_2, + SFX_WFOGO_FIGHT_3, + SFX_WFOGO_FIGHT_4, + SFX_WFOGO_FIGHT_5, + SFX_WFOGO_FIGHT_6, + SFX_WFOGO_FIGHT_7, + SFX_WFOGO_FIGHT_8, + SFX_WFOGO_FIGHT_9, + SFX_WFOGO_FIGHT_10, + SFX_WFOGO_FIGHT_11, + SFX_WFOGO_FIGHT_12, + SFX_WFOGO_FIGHT_13, + SFX_WFOGO_FIGHT_14, + SFX_WFOGO_GENERIC_CRASH_1, + SFX_WFOGO_GENERIC_CRASH_2, + SFX_WFOGO_GENERIC_CRASH_3, + SFX_WFOGO_GENERIC_CRASH_4, + SFX_WFOGO_GENERIC_CRASH_5, + SFX_WFOGO_GENERIC_CRASH_6, + SFX_WFOGO_GENERIC_CRASH_7, + SFX_WFOGO_GUN_PANIC_1, + SFX_WFOGO_GUN_PANIC_2, + SFX_WFOGO_GUN_PANIC_3, + SFX_WFOGO_GUN_PANIC_4, + SFX_WFOGO_GUN_PANIC_5, + SFX_WFOGO_JACKED_1, + SFX_WFOGO_JACKED_2, + SFX_WFOGO_JACKED_3, + SFX_WFOGO_JACKED_4, + SFX_WFOGO_JACKED_5, + SFX_WFOGO_JACKED_6, + SFX_WFOGO_MUGGED_1, + SFX_WFOGO_MUGGED_2, + SFX_WFOGO_RUN_1, + SFX_WFOGO_RUN_2, + SFX_WFOGO_SAVED_1, + SFX_WFOGO_SHOCKED_1, + SFX_WFOGO_SHOCKED_2, + + SFX_HMYST_BUMP_1, + SFX_HMYST_BUMP_2, + SFX_HMYST_BUMP_3, + SFX_HMYST_BUMP_4, + SFX_HMYST_BUMP_5, + SFX_HMYST_BUMP_6, + SFX_HMYST_BUMP_7, + SFX_HMYST_BUMP_8, + SFX_HMYST_BUMP_9, + SFX_HMYST_BUMP_10, + SFX_HMYST_BUMP_11, + SFX_HMYST_BUMP_12, + SFX_HMYST_BUMP_13, + SFX_HMYST_CHAT_1, + SFX_HMYST_CHAT_2, + SFX_HMYST_CHAT_3, + SFX_HMYST_CHAT_4, + SFX_HMYST_CHAT_5, + SFX_HMYST_CHAT_6, + SFX_HMYST_CHAT_7, + SFX_HMYST_CHAT_8, + SFX_HMYST_CHAT_9, + SFX_HMYST_CHAT_10, + SFX_HMYST_CHAT_11, + SFX_HMYST_DODGE_1, + SFX_HMYST_DODGE_2, + SFX_HMYST_DODGE_3, + SFX_HMYST_DODGE_4, + SFX_HMYST_DODGE_5, + SFX_HMYST_DODGE_6, + SFX_HMYST_EYEING_1, + SFX_HMYST_EYEING_2, + SFX_HMYST_GENERIC_CRASH_1, + SFX_HMYST_GENERIC_CRASH_2, + SFX_HMYST_GENERIC_CRASH_3, + SFX_HMYST_GENERIC_CRASH_4, + SFX_HMYST_GENERIC_CRASH_5, + SFX_HMYST_GENERIC_CRASH_6, + SFX_HMYST_GENERIC_CRASH_7, + SFX_HMYST_GUN_PANIC_1, + SFX_HMYST_GUN_PANIC_2, + SFX_HMYST_GUN_PANIC_3, + SFX_HMYST_GUN_PANIC_4, + SFX_HMYST_GUN_PANIC_5, + SFX_HMYST_GUN_PANIC_6, + SFX_HMYST_RUN_1, + SFX_HMYST_RUN_2, + SFX_HMYST_RUN_3, + SFX_HMYST_RUN_4, + SFX_HMYST_SAVED_1, + SFX_HMYST_SHOCKED_1, + SFX_HMYST_SHOCKED_2, + SFX_HMYST_TAXI_1, + + SFX_WMOCA_BLOCKED_1, + SFX_WMOCA_BLOCKED_2, + SFX_WMOCA_BLOCKED_3, + SFX_WMOCA_BLOCKED_4, + SFX_WMOCA_BLOCKED_5, + SFX_WMOCA_BLOCKED_6, + SFX_WMOCA_BLOCKED_7, + SFX_WMOCA_BLOCKED_8, + SFX_WMOCA_BLOCKED_9, + SFX_WMOCA_BLOCKED_10, + SFX_WMOCA_BLOCKED_11, + SFX_WMOCA_BLOCKED_12, + SFX_WMOCA_BUMP_1, + SFX_WMOCA_BUMP_2, + SFX_WMOCA_BUMP_3, + SFX_WMOCA_BUMP_4, + SFX_WMOCA_BUMP_5, + SFX_WMOCA_BUMP_6, + SFX_WMOCA_CAR_CRASH_1, + SFX_WMOCA_CAR_CRASH_2, + SFX_WMOCA_CAR_CRASH_3, + SFX_WMOCA_CAR_CRASH_4, + SFX_WMOCA_CAR_CRASH_5, + SFX_WMOCA_CAR_CRASH_6, + SFX_WMOCA_CAR_CRASH_7, + SFX_WMOCA_CAR_CRASH_8, + SFX_WMOCA_CAR_CRASH_9, + SFX_WMOCA_CAR_CRASH_10, + SFX_WMOCA_DODGE_1, + SFX_WMOCA_DODGE_2, + SFX_WMOCA_DODGE_3, + SFX_WMOCA_DODGE_4, + SFX_WMOCA_DODGE_5, + SFX_WMOCA_DODGE_6, + SFX_WMOCA_DODGE_7, + SFX_WMOCA_DODGE_8, + SFX_WMOCA_DODGE_9, + SFX_WMOCA_DODGE_10, + SFX_WMOCA_EYEING_1, + SFX_WMOCA_EYEING_2, + SFX_WMOCA_FIGHT_1, + SFX_WMOCA_FIGHT_2, + SFX_WMOCA_FIGHT_3, + SFX_WMOCA_FIGHT_4, + SFX_WMOCA_FIGHT_5, + SFX_WMOCA_FIGHT_6, + SFX_WMOCA_FIGHT_7, + SFX_WMOCA_FIGHT_8, + SFX_WMOCA_GENERIC_CRASH_1, + SFX_WMOCA_GENERIC_CRASH_2, + SFX_WMOCA_GENERIC_CRASH_3, + SFX_WMOCA_GENERIC_CRASH_4, + SFX_WMOCA_GENERIC_CRASH_5, + SFX_WMOCA_GENERIC_CRASH_6, + SFX_WMOCA_GENERIC_CRASH_7, + SFX_WMOCA_GENERIC_CRASH_8, + SFX_WMOCA_GENERIC_CRASH_9, + SFX_WMOCA_GUN_PANIC_1, + SFX_WMOCA_GUN_PANIC_2, + SFX_WMOCA_GUN_PANIC_3, + SFX_WMOCA_GUN_PANIC_4, + SFX_WMOCA_GUN_PANIC_5, + SFX_WMOCA_GUN_PANIC_6, + SFX_WMOCA_JACKED_1, + SFX_WMOCA_JACKED_2, + SFX_WMOCA_JACKED_3, + SFX_WMOCA_JACKED_4, + SFX_WMOCA_JACKED_5, + SFX_WMOCA_JACKED_6, + SFX_WMOCA_JACKED_7, + SFX_WMOCA_JACKED_8, + SFX_WMOCA_JACKED_9, + SFX_WMOCA_JACKED_10, + SFX_WMOCA_JACKING_1, + SFX_WMOCA_JACKING_2, + SFX_WMOCA_JACKING_3, + SFX_WMOCA_JACKING_4, + SFX_WMOCA_JACKING_5, + SFX_WMOCA_JACKING_6, + SFX_WMOCA_JACKING_7, + SFX_WMOCA_JACKING_8, + SFX_WMOCA_JACKING_9, + SFX_WMOCA_JACKING_10, + SFX_WMOCA_JACKING_11, + SFX_WMOCA_MUGGED_1, + SFX_WMOCA_MUGGED_2, + SFX_WMOCA_SAVED_1, + SFX_WMOCA_TAXI_1, + + SFX_WMYBE_BLOCKED_1, + SFX_WMYBE_BLOCKED_2, + SFX_WMYBE_BLOCKED_3, + SFX_WMYBE_BLOCKED_4, + SFX_WMYBE_BLOCKED_5, + SFX_WMYBE_BLOCKED_6, + SFX_WMYBE_BLOCKED_7, + SFX_WMYBE_BLOCKED_8, + SFX_WMYBE_BLOCKED_9, + SFX_WMYBE_BUMP_1, + SFX_WMYBE_BUMP_2, + SFX_WMYBE_BUMP_3, + SFX_WMYBE_BUMP_4, + SFX_WMYBE_BUMP_5, + SFX_WMYBE_BUMP_6, + SFX_WMYBE_BUMP_7, + SFX_WMYBE_BUMP_8, + SFX_WMYBE_BUMP_9, + SFX_WMYBE_BUMP_10, + SFX_WMYBE_BUMP_11, + SFX_WMYBE_BUMP_12, + SFX_WMYBE_BUMP_13, + SFX_WMYBE_BUMP_14, + SFX_WMYBE_CAR_CRASH_1, + SFX_WMYBE_CAR_CRASH_2, + SFX_WMYBE_CAR_CRASH_3, + SFX_WMYBE_CAR_CRASH_4, + SFX_WMYBE_CAR_CRASH_5, + SFX_WMYBE_CAR_CRASH_6, + SFX_WMYBE_CAR_CRASH_7, + SFX_WMYBE_CAR_CRASH_8, + SFX_WMYBE_CHAT_1, + SFX_WMYBE_CHAT_2, + SFX_WMYBE_CHAT_3, + SFX_WMYBE_CHAT_4, + SFX_WMYBE_CHAT_5, + SFX_WMYBE_CHAT_6, + SFX_WMYBE_CHAT_7, + SFX_WMYBE_CHAT_8, + SFX_WMYBE_CHAT_9, + SFX_WMYBE_CHAT_10, + SFX_WMYBE_CHAT_11, + SFX_WMYBE_DODGE_1, + SFX_WMYBE_DODGE_2, + SFX_WMYBE_DODGE_3, + SFX_WMYBE_DODGE_4, + SFX_WMYBE_DODGE_5, + SFX_WMYBE_DODGE_6, + SFX_WMYBE_DODGE_7, + SFX_WMYBE_DODGE_8, + SFX_WMYBE_DODGE_9, + SFX_WMYBE_DODGE_10, + SFX_WMYBE_DODGE_11, + SFX_WMYBE_DODGE_12, + SFX_WMYBE_EYEING_1, + SFX_WMYBE_EYEING_2, + SFX_WMYBE_GENERIC_CRASH_1, + SFX_WMYBE_GENERIC_CRASH_2, + SFX_WMYBE_GENERIC_CRASH_3, + SFX_WMYBE_GENERIC_CRASH_4, + SFX_WMYBE_GENERIC_CRASH_5, + SFX_WMYBE_GENERIC_CRASH_6, + SFX_WMYBE_GENERIC_CRASH_7, + SFX_WMYBE_GENERIC_CRASH_8, + SFX_WMYBE_GUN_PANIC_1, + SFX_WMYBE_GUN_PANIC_2, + SFX_WMYBE_GUN_PANIC_3, + SFX_WMYBE_GUN_PANIC_4, + SFX_WMYBE_GUN_PANIC_5, + SFX_WMYBE_GUN_PANIC_6, + SFX_WMYBE_GUN_PANIC_7, + SFX_WMYBE_GUN_PANIC_8, + SFX_WMYBE_JACKED_1, + SFX_WMYBE_JACKED_2, + SFX_WMYBE_JACKED_3, + SFX_WMYBE_JACKED_4, + SFX_WMYBE_JACKED_5, + SFX_WMYBE_JACKED_6, + SFX_WMYBE_JACKED_7, + SFX_WMYBE_JACKING_1, + SFX_WMYBE_JACKING_2, + SFX_WMYBE_JACKING_3, + SFX_WMYBE_JEER_1, + SFX_WMYBE_JEER_2, + SFX_WMYBE_JEER_3, + SFX_WMYBE_JEER_4, + SFX_WMYBE_JEER_5, + SFX_WMYBE_JEER_6, + SFX_WMYBE_JEER_7, + SFX_WMYBE_LOST_1, + SFX_WMYBE_LOST_2, + SFX_WMYBE_LOST_3, + SFX_WMYBE_RUN_1, + SFX_WMYBE_RUN_2, + SFX_WMYBE_RUN_3, + SFX_WMYBE_RUN_4, + SFX_WMYBE_RUN_5, + SFX_WMYBE_SHOCKED_1, + SFX_WMYBE_SHOCKED_2, + SFX_WMYBE_SHOCKED_3, + SFX_WMYBE_SHOCKED_4, + SFX_WMYBE_SHOCKED_5, + SFX_WMYBE_SHOCKED_6, + + SFX_BFOBE_BLOCKED_1, + SFX_BFOBE_BLOCKED_2, + SFX_BFOBE_BLOCKED_3, + SFX_BFOBE_BLOCKED_4, + SFX_BFOBE_BLOCKED_5, + SFX_BFOBE_BLOCKED_6, + SFX_BFOBE_BLOCKED_7, + SFX_BFOBE_BLOCKED_8, + SFX_BFOBE_BUMP_1, + SFX_BFOBE_BUMP_2, + SFX_BFOBE_BUMP_3, + SFX_BFOBE_BUMP_4, + SFX_BFOBE_BUMP_5, + SFX_BFOBE_BUMP_6, + SFX_BFOBE_BUMP_7, + SFX_BFOBE_BUMP_8, + SFX_BFOBE_CAR_CRASH_1, + SFX_BFOBE_CAR_CRASH_2, + SFX_BFOBE_CAR_CRASH_3, + SFX_BFOBE_CAR_CRASH_4, + SFX_BFOBE_CAR_CRASH_5, + SFX_BFOBE_CAR_CRASH_6, + SFX_BFOBE_CAR_CRASH_7, + SFX_BFOBE_CHAT_1, + SFX_BFOBE_CHAT_2, + SFX_BFOBE_CHAT_3, + SFX_BFOBE_CHAT_4, + SFX_BFOBE_CHAT_5, + SFX_BFOBE_CHAT_6, + SFX_BFOBE_CHAT_7, + SFX_BFOBE_CHAT_8, + SFX_BFOBE_DODGE_1, + SFX_BFOBE_DODGE_2, + SFX_BFOBE_DODGE_3, + SFX_BFOBE_DODGE_4, + SFX_BFOBE_DODGE_5, + SFX_BFOBE_DODGE_6, + SFX_BFOBE_DODGE_7, + SFX_BFOBE_DODGE_8, + SFX_BFOBE_DODGE_9, + SFX_BFOBE_GENERIC_CRASH_1, + SFX_BFOBE_GENERIC_CRASH_2, + SFX_BFOBE_GENERIC_CRASH_3, + SFX_BFOBE_GENERIC_CRASH_4, + SFX_BFOBE_GENERIC_CRASH_5, + SFX_BFOBE_GENERIC_CRASH_6, + SFX_BFOBE_GENERIC_CRASH_7, + SFX_BFOBE_GUN_PANIC_1, + SFX_BFOBE_GUN_PANIC_2, + SFX_BFOBE_GUN_PANIC_3, + SFX_BFOBE_GUN_PANIC_4, + SFX_BFOBE_GUN_PANIC_5, + SFX_BFOBE_JACKED_1, + SFX_BFOBE_JACKED_2, + SFX_BFOBE_JACKED_3, + SFX_BFOBE_JACKED_4, + SFX_BFOBE_JACKED_5, + SFX_BFOBE_JACKING_1, + SFX_BFOBE_JACKING_2, + SFX_BFOBE_JACKING_3, + SFX_BFOBE_JACKING_4, + SFX_BFOBE_MUGGED_1, + SFX_BFOBE_MUGGED_2, + SFX_BFOBE_SHOCKED_1, + SFX_BFOBE_SHOCKED_2, + SFX_BFOBE_TAXI_1, + + SFX_WFYLG_BUMP_1, + SFX_WFYLG_BUMP_2, + SFX_WFYLG_BUMP_3, + SFX_WFYLG_BUMP_4, + SFX_WFYLG_BUMP_5, + SFX_WFYLG_BUMP_6, + SFX_WFYLG_BUMP_7, + SFX_WFYLG_BUMP_8, + SFX_WFYLG_BUMP_9, + SFX_WFYLG_BUMP_10, + SFX_WFYLG_CHAT_1, + SFX_WFYLG_CHAT_2, + SFX_WFYLG_CHAT_3, + SFX_WFYLG_CHAT_4, + SFX_WFYLG_CHAT_5, + SFX_WFYLG_CHAT_6, + SFX_WFYLG_CHAT_7, + SFX_WFYLG_CHAT_8, + SFX_WFYLG_CHAT_9, + SFX_WFYLG_CHAT_10, + SFX_WFYLG_DODGE_1, + SFX_WFYLG_DODGE_2, + SFX_WFYLG_DODGE_3, + SFX_WFYLG_DODGE_4, + SFX_WFYLG_DODGE_5, + SFX_WFYLG_DODGE_6, + SFX_WFYLG_DODGE_7, + SFX_WFYLG_DODGE_8, + SFX_WFYLG_FIGHT_1, + SFX_WFYLG_FIGHT_2, + SFX_WFYLG_FIGHT_3, + SFX_WFYLG_FIGHT_4, + SFX_WFYLG_FIGHT_5, + SFX_WFYLG_FIGHT_6, + SFX_WFYLG_FIGHT_7, + SFX_WFYLG_GUN_COOL_1, + SFX_WFYLG_GUN_COOL_2, + SFX_WFYLG_GUN_COOL_3, + SFX_WFYLG_GUN_COOL_4, + SFX_WFYLG_GUN_COOL_5, + SFX_WFYLG_SAVED_1, + SFX_WFYLG_TAXI_1, + + SFX_WFOST_BLOCKED_1, + SFX_WFOST_BLOCKED_2, + SFX_WFOST_BLOCKED_3, + SFX_WFOST_BLOCKED_4, + SFX_WFOST_BLOCKED_5, + SFX_WFOST_BLOCKED_6, + SFX_WFOST_BLOCKED_7, + SFX_WFOST_BLOCKED_8, + SFX_WFOST_BLOCKED_9, + SFX_WFOST_BLOCKED_10, + SFX_WFOST_BLOCKED_11, + SFX_WFOST_BLOCKED_12, + SFX_WFOST_BUMP_1, + SFX_WFOST_BUMP_2, + SFX_WFOST_BUMP_3, + SFX_WFOST_BUMP_4, + SFX_WFOST_BUMP_5, + SFX_WFOST_BUMP_6, + SFX_WFOST_BUMP_7, + SFX_WFOST_BUMP_8, + SFX_WFOST_BUMP_9, + SFX_WFOST_BUMP_10, + SFX_WFOST_BUMP_11, + SFX_WFOST_BUMP_12, + SFX_WFOST_BUMP_13, + SFX_WFOST_BUMP_14, + SFX_WFOST_BUMP_15, + SFX_WFOST_BUMP_16, + SFX_WFOST_BUMP_17, + SFX_WFOST_BUMP_18, + SFX_WFOST_BUMP_19, + SFX_WFOST_CAR_CRASH_1, + SFX_WFOST_CAR_CRASH_2, + SFX_WFOST_CAR_CRASH_3, + SFX_WFOST_CAR_CRASH_4, + SFX_WFOST_CAR_CRASH_5, + SFX_WFOST_CAR_CRASH_6, + SFX_WFOST_CAR_CRASH_7, + SFX_WFOST_CAR_CRASH_8, + SFX_WFOST_CAR_CRASH_9, + SFX_WFOST_CAR_CRASH_10, + SFX_WFOST_CAR_CRASH_11, + SFX_WFOST_CHAT_1, + SFX_WFOST_CHAT_2, + SFX_WFOST_CHAT_3, + SFX_WFOST_CHAT_4, + SFX_WFOST_CHAT_5, + SFX_WFOST_CHAT_6, + SFX_WFOST_CHAT_7, + SFX_WFOST_CHAT_8, + SFX_WFOST_CHAT_9, + SFX_WFOST_CHAT_10, + SFX_WFOST_CHAT_11, + SFX_WFOST_CHAT_12, + SFX_WFOST_CHAT_13, + SFX_WFOST_CHAT_14, + SFX_WFOST_CHAT_15, + SFX_WFOST_CHAT_16, + SFX_WFOST_DODGE_1, + SFX_WFOST_DODGE_2, + SFX_WFOST_DODGE_3, + SFX_WFOST_DODGE_4, + SFX_WFOST_DODGE_5, + SFX_WFOST_DODGE_6, + SFX_WFOST_DODGE_7, + SFX_WFOST_DODGE_8, + SFX_WFOST_DODGE_9, + SFX_WFOST_DODGE_10, + SFX_WFOST_DODGE_11, + SFX_WFOST_DODGE_12, + SFX_WFOST_GENERIC_CRASH_1, + SFX_WFOST_GENERIC_CRASH_2, + SFX_WFOST_GENERIC_CRASH_3, + SFX_WFOST_GENERIC_CRASH_4, + SFX_WFOST_GENERIC_CRASH_5, + SFX_WFOST_GENERIC_CRASH_6, + SFX_WFOST_GENERIC_CRASH_7, + SFX_WFOST_GENERIC_CRASH_8, + SFX_WFOST_GENERIC_CRASH_9, + SFX_WFOST_GENERIC_CRASH_10, + SFX_WFOST_GUN_PANIC_1, + SFX_WFOST_GUN_PANIC_2, + SFX_WFOST_GUN_PANIC_3, + SFX_WFOST_GUN_PANIC_4, + SFX_WFOST_JACKED_1, + SFX_WFOST_JACKED_2, + SFX_WFOST_JACKED_3, + SFX_WFOST_JACKED_4, + SFX_WFOST_JACKED_5, + SFX_WFOST_JACKED_6, + SFX_WFOST_JACKED_7, + SFX_WFOST_JACKED_8, + SFX_WFOST_LOST_1, + SFX_WFOST_LOST_2, + SFX_WFOST_LOST_3, + SFX_WFOST_MUGGED_1, + SFX_WFOST_MUGGED_2, + SFX_WFOST_MUGGED_3, + SFX_WFOST_MUGGED_4, + SFX_WFOST_MUGGED_5, + SFX_WFOST_RUN_1, + SFX_WFOST_RUN_2, + SFX_WFOST_RUN_3, + SFX_WFOST_RUN_4, + SFX_WFOST_RUN_5, + SFX_WFOST_RUN_6, + SFX_WFOST_RUN_7, + SFX_WFOST_SAVED_1, + SFX_WFOST_SAVED_2, + SFX_WFOST_SAVED_3, + SFX_WFOST_SAVED_4, + SFX_WFOST_TAXI_1, + + SFX_WFYST_BLOCKED_1, + SFX_WFYST_BLOCKED_2, + SFX_WFYST_BLOCKED_3, + SFX_WFYST_BLOCKED_4, + SFX_WFYST_BLOCKED_5, + SFX_WFYST_BLOCKED_6, + SFX_WFYST_BUMP_1, + SFX_WFYST_BUMP_2, + SFX_WFYST_BUMP_3, + SFX_WFYST_BUMP_4, + SFX_WFYST_BUMP_5, + SFX_WFYST_BUMP_6, + SFX_WFYST_BUMP_7, + SFX_WFYST_BUMP_8, + SFX_WFYST_BUMP_9, + SFX_WFYST_BUMP_10, + SFX_WFYST_CAR_CRASH_1, + SFX_WFYST_CAR_CRASH_2, + SFX_WFYST_CAR_CRASH_3, + SFX_WFYST_CAR_CRASH_4, + SFX_WFYST_CAR_CRASH_5, + SFX_WFYST_CAR_CRASH_6, + SFX_WFYST_CAR_CRASH_7, + SFX_WFYST_CAR_CRASH_8, + SFX_WFYST_CHAT_1, + SFX_WFYST_CHAT_2, + SFX_WFYST_CHAT_3, + SFX_WFYST_CHAT_4, + SFX_WFYST_CHAT_5, + SFX_WFYST_CHAT_6, + SFX_WFYST_CHAT_7, + SFX_WFYST_CHAT_8, + SFX_WFYST_CHAT_9, + SFX_WFYST_CHAT_10, + SFX_WFYST_DODGE_1, + SFX_WFYST_DODGE_2, + SFX_WFYST_DODGE_3, + SFX_WFYST_DODGE_4, + SFX_WFYST_DODGE_5, + SFX_WFYST_DODGE_6, + SFX_WFYST_DODGE_7, + SFX_WFYST_DODGE_8, + SFX_WFYST_DODGE_9, + SFX_WFYST_DODGE_10, + SFX_WFYST_FIGHT_1, + SFX_WFYST_FIGHT_2, + SFX_WFYST_FIGHT_3, + SFX_WFYST_FIGHT_4, + SFX_WFYST_FIGHT_5, + SFX_WFYST_FIGHT_6, + SFX_WFYST_FIGHT_7, + SFX_WFYST_GENERIC_CRASH_1, + SFX_WFYST_GENERIC_CRASH_2, + SFX_WFYST_GENERIC_CRASH_3, + SFX_WFYST_GENERIC_CRASH_4, + SFX_WFYST_GENERIC_CRASH_5, + SFX_WFYST_GENERIC_CRASH_6, + SFX_WFYST_GENERIC_CRASH_7, + SFX_WFYST_GENERIC_CRASH_8, + SFX_WFYST_GUN_COOL_1, + SFX_WFYST_GUN_COOL_2, + SFX_WFYST_GUN_COOL_3, + SFX_WFYST_GUN_COOL_4, + SFX_WFYST_GUN_COOL_5, + SFX_WFYST_JACKED_1, + SFX_WFYST_JACKED_2, + SFX_WFYST_JACKED_3, + SFX_WFYST_JACKED_4, + SFX_WFYST_JACKED_5, + SFX_WFYST_JACKED_6, + SFX_WFYST_JACKING_1, + SFX_WFYST_JACKING_2, + SFX_WFYST_JACKING_3, + SFX_WFYST_JACKING_4, + SFX_WFYST_LOST_1, + SFX_WFYST_MUGGED_1, + SFX_WFYST_MUGGED_2, + SFX_WFYST_MUGGING_1, + SFX_WFYST_MUGGING_2, + SFX_WFYST_MUGGING_3, + SFX_WFYST_MUGGING_4, + SFX_WFYST_SAVED_1, + SFX_WFYST_TAXI_1, + + SFX_COP_VOICE_1_ARREST_1, + SFX_COP_VOICE_1_ARREST_2, + SFX_COP_VOICE_1_ARREST_3, + SFX_COP_VOICE_1_ARREST_4, + SFX_COP_VOICE_1_PULLOUTWEAPON_1, + SFX_COP_VOICE_1_PULLOUTWEAPON_2, + SFX_COP_VOICE_1_PULLOUTWEAPON_3, + SFX_COP_VOICE_1_BUMP_1, + SFX_COP_VOICE_1_BUMP_2, + SFX_COP_VOICE_1_BUMP_3, + SFX_COP_VOICE_1_BUMP_4, + SFX_COP_VOICE_1_BUMP_5, + SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_1, + SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_2, + SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_3, + SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_4, + SFX_COP_VOICE_1_GUNAIMEDAT3_1, + SFX_COP_VOICE_1_GUNAIMEDAT3_2, + SFX_COP_VOICE_1_CAR_CRASH_1, + SFX_COP_VOICE_1_CAR_CRASH_2, + SFX_COP_VOICE_1_CAR_CRASH_3, + SFX_COP_VOICE_1_CAR_CRASH_4, + SFX_COP_VOICE_1_DODGE_1, + SFX_COP_VOICE_1_DODGE_2, + SFX_COP_VOICE_1_DODGE_3, + SFX_COP_VOICE_1_FIGHT_1, + SFX_COP_VOICE_1_FIGHT_2, + SFX_COP_VOICE_1_FIGHT_3, + SFX_COP_VOICE_1_FIGHT_4, + SFX_COP_VOICE_1_GUNAIMEDAT2_1, + SFX_COP_VOICE_1_GUNAIMEDAT2_2, + SFX_COP_VOICE_1_SAVED_1, + SFX_COP_VOICE_1_SAVED_2, + SFX_COP_VOICE_1_COP_ASK_FOR_ID_1, + SFX_COP_VOICE_1_COP_ASK_FOR_ID_2, + SFX_COP_VOICE_1_COP_ALONE_1, + SFX_COP_VOICE_1_COP_ALONE_2, + SFX_COP_VOICE_1_COP_ALONE_3, + SFX_COP_VOICE_1_COP_ALONE_4, + SFX_COP_VOICE_1_COP_MANYCOPSAROUND_1, + SFX_COP_VOICE_1_COP_MANYCOPSAROUND_2, + SFX_COP_VOICE_1_COP_TARGETING_1, + SFX_COP_VOICE_1_COP_TARGETING_2, + SFX_COP_VOICE_1_COP_TARGETING_3, + SFX_COP_VOICE_1_COP_TARGETING_4, + + SFX_COP_VOICE_2_ARREST_1, + SFX_COP_VOICE_2_ARREST_2, + SFX_COP_VOICE_2_ARREST_3, + SFX_COP_VOICE_2_ARREST_4, + SFX_COP_VOICE_2_PULLOUTWEAPON_1, + SFX_COP_VOICE_2_PULLOUTWEAPON_2, + SFX_COP_VOICE_2_PULLOUTWEAPON_3, + SFX_COP_VOICE_2_BUMP_1, + SFX_COP_VOICE_2_BUMP_2, + SFX_COP_VOICE_2_BUMP_3, + SFX_COP_VOICE_2_BUMP_4, + SFX_COP_VOICE_2_BUMP_5, + SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_1, + SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_2, + SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_3, + SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_4, + SFX_COP_VOICE_2_GUNAIMEDAT3_1, + SFX_COP_VOICE_2_GUNAIMEDAT3_2, + SFX_COP_VOICE_2_CAR_CRASH_1, + SFX_COP_VOICE_2_CAR_CRASH_2, + SFX_COP_VOICE_2_CAR_CRASH_3, + SFX_COP_VOICE_2_CAR_CRASH_4, + SFX_COP_VOICE_2_DODGE_1, + SFX_COP_VOICE_2_DODGE_2, + SFX_COP_VOICE_2_DODGE_3, + SFX_COP_VOICE_2_FIGHT_1, + SFX_COP_VOICE_2_FIGHT_2, + SFX_COP_VOICE_2_FIGHT_3, + SFX_COP_VOICE_2_FIGHT_4, + SFX_COP_VOICE_2_GUNAIMEDAT2_1, + SFX_COP_VOICE_2_GUNAIMEDAT2_2, + SFX_COP_VOICE_2_SAVED_1, + SFX_COP_VOICE_2_SAVED_2, + SFX_COP_VOICE_2_COP_ASK_FOR_ID_1, + SFX_COP_VOICE_2_COP_ASK_FOR_ID_2, + SFX_COP_VOICE_2_COP_ALONE_1, + SFX_COP_VOICE_2_COP_ALONE_2, + SFX_COP_VOICE_2_COP_ALONE_3, + SFX_COP_VOICE_2_COP_ALONE_4, + SFX_COP_VOICE_2_COP_MANYCOPSAROUND_1, + SFX_COP_VOICE_2_COP_MANYCOPSAROUND_2, + SFX_COP_VOICE_2_COP_TARGETING_1, + SFX_COP_VOICE_2_COP_TARGETING_2, + SFX_COP_VOICE_2_COP_TARGETING_3, + SFX_COP_VOICE_2_COP_TARGETING_4, + + SFX_COP_VOICE_3_ARREST_1, + SFX_COP_VOICE_3_ARREST_2, + SFX_COP_VOICE_3_ARREST_3, + SFX_COP_VOICE_3_ARREST_4, + SFX_COP_VOICE_3_PULLOUTWEAPON_1, + SFX_COP_VOICE_3_PULLOUTWEAPON_2, + SFX_COP_VOICE_3_PULLOUTWEAPON_3, + SFX_COP_VOICE_3_BUMP_1, + SFX_COP_VOICE_3_BUMP_2, + SFX_COP_VOICE_3_BUMP_3, + SFX_COP_VOICE_3_BUMP_4, + SFX_COP_VOICE_3_BUMP_5, + SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_1, + SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_2, + SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_3, + SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_4, + SFX_COP_VOICE_3_GUNAIMEDAT3_1, + SFX_COP_VOICE_3_GUNAIMEDAT3_2, + SFX_COP_VOICE_3_CAR_CRASH_1, + SFX_COP_VOICE_3_CAR_CRASH_2, + SFX_COP_VOICE_3_CAR_CRASH_3, + SFX_COP_VOICE_3_CAR_CRASH_4, + SFX_COP_VOICE_3_DODGE_1, + SFX_COP_VOICE_3_DODGE_2, + SFX_COP_VOICE_3_DODGE_3, + SFX_COP_VOICE_3_FIGHT_1, + SFX_COP_VOICE_3_FIGHT_2, + SFX_COP_VOICE_3_FIGHT_3, + SFX_COP_VOICE_3_FIGHT_4, + SFX_COP_VOICE_3_GUNAIMEDAT2_1, + SFX_COP_VOICE_3_GUNAIMEDAT2_2, + SFX_COP_VOICE_3_SAVED_1, + SFX_COP_VOICE_3_SAVED_2, + SFX_COP_VOICE_3_COP_ASK_FOR_ID_1, + SFX_COP_VOICE_3_COP_ASK_FOR_ID_2, + SFX_COP_VOICE_3_COP_ALONE_1, + SFX_COP_VOICE_3_COP_ALONE_2, + SFX_COP_VOICE_3_COP_ALONE_3, + SFX_COP_VOICE_3_COP_ALONE_4, + SFX_COP_VOICE_3_COP_MANYCOPSAROUND_1, + SFX_COP_VOICE_3_COP_MANYCOPSAROUND_2, + SFX_COP_VOICE_3_COP_TARGETING_1, + SFX_COP_VOICE_3_COP_TARGETING_2, + SFX_COP_VOICE_3_COP_TARGETING_3, + SFX_COP_VOICE_3_COP_TARGETING_4, + + SFX_COP_VOICE_4_ARREST_1, + SFX_COP_VOICE_4_ARREST_2, + SFX_COP_VOICE_4_ARREST_3, + SFX_COP_VOICE_4_ARREST_4, + SFX_COP_VOICE_4_PULLOUTWEAPON_1, + SFX_COP_VOICE_4_PULLOUTWEAPON_2, + SFX_COP_VOICE_4_PULLOUTWEAPON_3, + SFX_COP_VOICE_4_BUMP_1, + SFX_COP_VOICE_4_BUMP_2, + SFX_COP_VOICE_4_BUMP_3, + SFX_COP_VOICE_4_BUMP_4, + SFX_COP_VOICE_4_BUMP_5, + SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_1, + SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_2, + SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_3, + SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_4, + SFX_COP_VOICE_4_GUNAIMEDAT3_1, + SFX_COP_VOICE_4_GUNAIMEDAT3_2, + SFX_COP_VOICE_4_CAR_CRASH_1, + SFX_COP_VOICE_4_CAR_CRASH_2, + SFX_COP_VOICE_4_CAR_CRASH_3, + SFX_COP_VOICE_4_CAR_CRASH_4, + SFX_COP_VOICE_4_DODGE_1, + SFX_COP_VOICE_4_DODGE_2, + SFX_COP_VOICE_4_DODGE_3, + SFX_COP_VOICE_4_FIGHT_1, + SFX_COP_VOICE_4_FIGHT_2, + SFX_COP_VOICE_4_FIGHT_3, + SFX_COP_VOICE_4_FIGHT_4, + SFX_COP_VOICE_4_GUNAIMEDAT2_1, + SFX_COP_VOICE_4_GUNAIMEDAT2_2, + SFX_COP_VOICE_4_SAVED_1, + SFX_COP_VOICE_4_SAVED_2, + SFX_COP_VOICE_4_COP_ASK_FOR_ID_1, + SFX_COP_VOICE_4_COP_ASK_FOR_ID_2, + SFX_COP_VOICE_4_COP_ALONE_1, + SFX_COP_VOICE_4_COP_ALONE_2, + SFX_COP_VOICE_4_COP_ALONE_3, + SFX_COP_VOICE_4_COP_ALONE_4, + SFX_COP_VOICE_4_COP_MANYCOPSAROUND_1, + SFX_COP_VOICE_4_COP_MANYCOPSAROUND_2, + SFX_COP_VOICE_4_COP_TARGETING_1, + SFX_COP_VOICE_4_COP_TARGETING_2, + SFX_COP_VOICE_4_COP_TARGETING_3, + SFX_COP_VOICE_4_COP_TARGETING_4, + + SFX_COP_VOICE_5_ARREST_1, + SFX_COP_VOICE_5_ARREST_2, + SFX_COP_VOICE_5_ARREST_3, + SFX_COP_VOICE_5_ARREST_4, + SFX_COP_VOICE_5_PULLOUTWEAPON_1, + SFX_COP_VOICE_5_PULLOUTWEAPON_2, + SFX_COP_VOICE_5_PULLOUTWEAPON_3, + SFX_COP_VOICE_5_BUMP_1, + SFX_COP_VOICE_5_BUMP_2, + SFX_COP_VOICE_5_BUMP_3, + SFX_COP_VOICE_5_BUMP_4, + SFX_COP_VOICE_5_BUMP_5, + SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_1, + SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_2, + SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_3, + SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_4, + SFX_COP_VOICE_5_GUNAIMEDAT3_1, + SFX_COP_VOICE_5_GUNAIMEDAT3_2, + SFX_COP_VOICE_5_CAR_CRASH_1, + SFX_COP_VOICE_5_CAR_CRASH_2, + SFX_COP_VOICE_5_CAR_CRASH_3, + SFX_COP_VOICE_5_CAR_CRASH_4, + SFX_COP_VOICE_5_DODGE_1, + SFX_COP_VOICE_5_DODGE_2, + SFX_COP_VOICE_5_DODGE_3, + SFX_COP_VOICE_5_FIGHT_1, + SFX_COP_VOICE_5_FIGHT_2, + SFX_COP_VOICE_5_FIGHT_3, + SFX_COP_VOICE_5_FIGHT_4, + SFX_COP_VOICE_5_GUNAIMEDAT2_1, + SFX_COP_VOICE_5_GUNAIMEDAT2_2, + SFX_COP_VOICE_5_SAVED_1, + SFX_COP_VOICE_5_SAVED_2, + SFX_COP_VOICE_5_COP_ASK_FOR_ID_1, + SFX_COP_VOICE_5_COP_ASK_FOR_ID_2, + SFX_COP_VOICE_5_COP_ALONE_1, + SFX_COP_VOICE_5_COP_ALONE_2, + SFX_COP_VOICE_5_COP_ALONE_3, + SFX_COP_VOICE_5_COP_ALONE_4, + SFX_COP_VOICE_5_COP_MANYCOPSAROUND_1, + SFX_COP_VOICE_5_COP_MANYCOPSAROUND_2, + SFX_COP_VOICE_5_COP_TARGETING_1, + SFX_COP_VOICE_5_COP_TARGETING_2, + SFX_COP_VOICE_5_COP_TARGETING_3, + SFX_COP_VOICE_5_COP_TARGETING_4, + + SFX_PLAYER_ANGRY_BUSTED_1, + SFX_PLAYER_ANGRY_BUSTED_2, + SFX_PLAYER_ANGRY_BUSTED_3, + SFX_PLAYER_ANGRY_BUSTED_4, + SFX_PLAYER_ANGRY_BUSTED_5, + SFX_PLAYER_ANGRY_BUSTED_6, + SFX_PLAYER_ANGRY_BUSTED_7, + SFX_PLAYER_ANGRY_BUSTED_8, + SFX_PLAYER_ANGRY_BUSTED_9, + SFX_PLAYER_ANGRY_BUSTED_10, + SFX_PLAYER_ANGRY_BUSTED_11, + SFX_PLAYER_ANGRY_BUSTED_12, + SFX_PLAYER_ANGRY_BUSTED_13, + SFX_PLAYER_ANGRY_BUSTED_14, + SFX_PLAYER_ANGRY_BUSTED_15, + SFX_PLAYER_ANGRY_BUSTED_16, + SFX_PLAYER_ANGRY_BUSTED_17, + SFX_PLAYER_ANGRY_BUSTED_18, + SFX_PLAYER_ANGRY_BUSTED_19, + SFX_PLAYER_ANGRY_BUSTED_20, + SFX_PLAYER_ANGRY_BUSTED_21, + SFX_PLAYER_ANGRY_BUSTED_22, + SFX_PLAYER_ANGRY_BUSTED_23, + SFX_PLAYER_ANGRY_BUSTED_24, + SFX_PLAYER_ANGRY_BUSTED_25, + SFX_PLAYER_ANGRY_BUSTED_26, + SFX_PLAYER_ANGRY_BUSTED_27, + SFX_PLAYER_ANGRY_BUSTED_28, + SFX_PLAYER_ANGRY_BUSTED_29, + SFX_PLAYER_ANGRY_BUSTED_30, + SFX_PLAYER_ANGRY_BUSTED_31, + SFX_PLAYER_ANGRY_BUSTED_32, + SFX_PLAYER_ANGRY_BUSTED_33, + SFX_PLAYER_ANGRY_BUSTED_34, + SFX_PLAYER_ANGRY_BUSTED_35, + SFX_PLAYER_ANGRY_BUSTED_36, + SFX_PLAYER_ANGRY_BUSTED_37, + SFX_PLAYER_ANGRY_BUSTED_38, + SFX_PLAYER_ANGRY_CHASED_1, + SFX_PLAYER_ANGRY_CHASED_2, + SFX_PLAYER_ANGRY_CHASED_3, + SFX_PLAYER_ANGRY_CHASED_4, + SFX_PLAYER_ANGRY_CHASED_5, + SFX_PLAYER_ANGRY_CHASED_6, + SFX_PLAYER_ANGRY_CHASED_7, + SFX_PLAYER_ANGRY_CHASED_8, + SFX_PLAYER_ANGRY_CHASED_9, + SFX_PLAYER_ANGRY_CRASH_1, + SFX_PLAYER_ANGRY_CRASH_2, + SFX_PLAYER_ANGRY_CRASH_3, + SFX_PLAYER_ANGRY_CRASH_4, + SFX_PLAYER_ANGRY_CRASH_5, + SFX_PLAYER_ANGRY_CRASH_6, + SFX_PLAYER_ANGRY_CRASH_7, + SFX_PLAYER_ANGRY_CRASH_8, + SFX_PLAYER_ANGRY_CRASH_9, + SFX_PLAYER_ANGRY_CRASH_10, + SFX_PLAYER_ANGRY_CRASH_11, + SFX_PLAYER_ANGRY_CRASH_12, + SFX_PLAYER_ANGRY_CRASH_13, + SFX_PLAYER_ANGRY_CRASH_14, + SFX_PLAYER_ANGRY_CRASH_15, + SFX_PLAYER_ANGRY_CRASH_16, + SFX_PLAYER_ANGRY_CRASH_17, + SFX_PLAYER_ANGRY_CRASH_18, + SFX_PLAYER_ANGRY_CRASH_19, + SFX_PLAYER_ANGRY_CRASH_20, + SFX_PLAYER_ANGRY_CRASH_21, + SFX_PLAYER_ANGRY_CRASH_22, + SFX_PLAYER_ANGRY_CRASH_23, + SFX_PLAYER_ANGRY_CRASH_24, + SFX_PLAYER_ANGRY_CRASH_25, + SFX_PLAYER_ANGRY_CRASH_26, + SFX_PLAYER_ANGRY_CRASH_27, + SFX_PLAYER_ANGRY_CRASH_28, + SFX_PLAYER_ANGRY_CRASH_29, + SFX_PLAYER_ANGRY_CRASH_30, + SFX_PLAYER_ANGRY_CRASH_31, + SFX_PLAYER_ANGRY_CRASH_32, + SFX_PLAYER_ANGRY_CRASH_33, + SFX_PLAYER_ANGRY_CRASH_34, + SFX_PLAYER_ANGRY_CRASH_35, + SFX_PLAYER_ANGRY_CRASH_36, + SFX_PLAYER_ANGRY_CRASH_37, + SFX_PLAYER_ANGRY_CRASH_38, + SFX_PLAYER_ANGRY_CRASH_39, + SFX_PLAYER_ANGRY_CRASH_40, + SFX_PLAYER_ANGRY_CRASH_41, + SFX_PLAYER_ANGRY_FIGHT_1, + SFX_PLAYER_ANGRY_FIGHT_2, + SFX_PLAYER_ANGRY_FIGHT_3, + SFX_PLAYER_ANGRY_FIGHT_4, + SFX_PLAYER_ANGRY_FIGHT_5, + SFX_PLAYER_ANGRY_FIGHT_6, + SFX_PLAYER_ANGRY_FIGHT_7, + SFX_PLAYER_ANGRY_FIGHT_8, + SFX_PLAYER_ANGRY_FIGHT_9, + SFX_PLAYER_ANGRY_FIGHT_10, + SFX_PLAYER_ANGRY_FIGHT_11, + SFX_PLAYER_ANGRY_FIGHT_12, + SFX_PLAYER_ANGRY_FIGHT_13, + SFX_PLAYER_ANGRY_FIGHT_14, + SFX_PLAYER_ANGRY_FIGHT_15, + SFX_PLAYER_ANGRY_FIGHT_16, + SFX_PLAYER_ANGRY_FIGHT_17, + SFX_PLAYER_ANGRY_FIGHT_18, + SFX_PLAYER_ANGRY_FIGHT_19, + SFX_PLAYER_ANGRY_FIGHT_20, + SFX_PLAYER_ANGRY_FIGHT_21, + SFX_PLAYER_ANGRY_FIGHT_22, + SFX_PLAYER_ANGRY_FIGHT_23, + SFX_PLAYER_ANGRY_FIGHT_24, + SFX_PLAYER_ANGRY_FIGHT_25, + SFX_PLAYER_ANGRY_FIGHT_26, + SFX_PLAYER_ANGRY_FIGHT_27, + SFX_PLAYER_ANGRY_FIGHT_28, + SFX_PLAYER_ANGRY_FIGHT_29, + SFX_PLAYER_ANGRY_FIGHT_30, + SFX_PLAYER_ANGRY_FIGHT_31, + SFX_PLAYER_ANGRY_FIGHT_32, + SFX_PLAYER_ANGRY_FIGHT_33, + SFX_PLAYER_ANGRY_FIGHT_34, + SFX_PLAYER_ANGRY_FIGHT_35, + SFX_PLAYER_ANGRY_FIGHT_36, + SFX_PLAYER_ANGRY_FIGHT_37, + SFX_PLAYER_ANGRY_FIGHT_38, + SFX_PLAYER_ANGRY_FIGHT_39, + SFX_PLAYER_ANGRY_FIGHT_40, + SFX_PLAYER_ANGRY_FIGHT_41, + SFX_PLAYER_ANGRY_FIGHT_42, + SFX_PLAYER_ANGRY_FIGHT_43, + SFX_PLAYER_ANGRY_FIGHT_44, + SFX_PLAYER_ANGRY_FIGHT_45, + SFX_PLAYER_ANGRY_FIGHT_46, + SFX_PLAYER_ANGRY_FIGHT_47, + SFX_PLAYER_ANGRY_FIGHT_48, + SFX_PLAYER_ANGRY_FIGHT_49, + SFX_PLAYER_ANGRY_FIGHT_50, + SFX_PLAYER_ANGRY_FIGHT_51, + SFX_PLAYER_ANGRY_FIGHT_52, + SFX_PLAYER_ANGRY_FIGHT_53, + SFX_PLAYER_ANGRY_FIGHT_54, + SFX_PLAYER_ANGRY_FIGHT_55, + SFX_PLAYER_ANGRY_FIGHT_56, + SFX_PLAYER_ANGRY_FIGHT_57, + SFX_PLAYER_ANGRY_FIGHT_58, + SFX_PLAYER_ANGRY_FIGHT_59, + SFX_PLAYER_ANGRY_FIGHT_60, + SFX_PLAYER_ANGRY_FIGHT_61, + SFX_PLAYER_ANGRY_JACKED_1, + SFX_PLAYER_ANGRY_JACKED_2, + SFX_PLAYER_ANGRY_JACKED_3, + SFX_PLAYER_ANGRY_JACKED_4, + SFX_PLAYER_ANGRY_JACKED_5, + SFX_PLAYER_ANGRY_JACKED_6, + SFX_PLAYER_ANGRY_JACKED_7, + SFX_PLAYER_ANGRY_JACKED_8, + SFX_PLAYER_ANGRY_JACKED_9, + SFX_PLAYER_ANGRY_JACKED_10, + SFX_PLAYER_ANGRY_JACKED_11, + SFX_PLAYER_ANGRY_JACKED_12, + SFX_PLAYER_ANGRY_JACKED_13, + SFX_PLAYER_ANGRY_JACKED_14, + SFX_PLAYER_ANGRY_JACKED_15, + SFX_PLAYER_ANGRY_JACKED_16, + SFX_PLAYER_ANGRY_JACKED_17, + SFX_PLAYER_ANGRY_JACKED_18, + SFX_PLAYER_ANGRY_JACKED_19, + SFX_PLAYER_ANGRY_JACKED_20, + SFX_PLAYER_ANGRY_JACKED_21, + SFX_PLAYER_ANGRY_JACKED_22, + SFX_PLAYER_ANGRY_JACKED_23, + SFX_PLAYER_ANGRY_JACKED_24, + SFX_PLAYER_ANGRY_JACKED_25, + SFX_PLAYER_ANGRY_JACKED_26, + SFX_PLAYER_ANGRY_JACKED_27, + SFX_PLAYER_ANGRY_JACKED_28, + SFX_PLAYER_ANGRY_JACKED_29, + SFX_PLAYER_ANGRY_JACKED_30, + SFX_PLAYER_ANGRY_JACKED_31, + SFX_PLAYER_ANGRY_JACKED_32, + SFX_PLAYER_ANGRY_JACKED_33, + SFX_PLAYER_ANGRY_JACKING_1, + SFX_PLAYER_ANGRY_JACKING_2, + SFX_PLAYER_ANGRY_JACKING_3, + SFX_PLAYER_ANGRY_JACKING_4, + SFX_PLAYER_ANGRY_JACKING_5, + SFX_PLAYER_ANGRY_JACKING_6, + SFX_PLAYER_ANGRY_JACKING_7, + SFX_PLAYER_ANGRY_JACKING_8, + SFX_PLAYER_ANGRY_JACKING_9, + SFX_PLAYER_ANGRY_JACKING_10, + SFX_PLAYER_ANGRY_JACKING_11, + SFX_PLAYER_ANGRY_JACKING_12, + SFX_PLAYER_ANGRY_JACKING_13, + SFX_PLAYER_ANGRY_JACKING_14, + SFX_PLAYER_ANGRY_JACKING_15, + SFX_PLAYER_ANGRY_JACKING_16, + SFX_PLAYER_ANGRY_JACKING_17, + SFX_PLAYER_ANGRY_JACKING_18, + SFX_PLAYER_ANGRY_JACKING_19, + SFX_PLAYER_ANGRY_JACKING_20, + SFX_PLAYER_ANGRY_JACKING_21, + SFX_PLAYER_ANGRY_JACKING_22, + SFX_PLAYER_ANGRY_JACKING_23, + SFX_PLAYER_ANGRY_JACKING_24, + SFX_PLAYER_ANGRY_JACKING_25, + SFX_PLAYER_ANGRY_JACKING_26, + SFX_PLAYER_ANGRY_JACKING_27, + SFX_PLAYER_ANGRY_JACKING_28, + SFX_PLAYER_ANGRY_JACKING_29, + SFX_PLAYER_ANGRY_JACKING_30, + SFX_PLAYER_ANGRY_JACKING_31, + SFX_PLAYER_ANGRY_JACKING_32, + SFX_PLAYER_ANGRY_JACKING_33, + SFX_PLAYER_ANGRY_JACKING_34, + SFX_PLAYER_ANGRY_JACKING_35, + SFX_PLAYER_ANGRY_JACKING_36, + SFX_PLAYER_ANGRY_JACKING_37, + SFX_PLAYER_ANGRY_JACKING_38, + SFX_PLAYER_ANGRY_JACKING_39, + SFX_PLAYER_ANGRY_JACKING_40, + SFX_PLAYER_ANGRY_JACKING_41, + SFX_PLAYER_ANGRY_JACKING_42, + SFX_PLAYER_ANGRY_JACKING_43, + SFX_PLAYER_ANGRY_PICK_UP_CASH_1, + SFX_PLAYER_ANGRY_PICK_UP_CASH_2, + SFX_PLAYER_ANGRY_PICK_UP_CASH_3, + SFX_PLAYER_ANGRY_PICK_UP_CASH_4, + SFX_PLAYER_ANGRY_PICK_UP_CASH_5, + SFX_PLAYER_ANGRY_PICK_UP_CASH_6, + SFX_PLAYER_ANGRY_PICK_UP_CASH_7, + SFX_PLAYER_ANGRY_PICK_UP_CASH_8, + SFX_PLAYER_ANGRY_PICK_UP_CASH_9, + SFX_PLAYER_ANGRY_PICK_UP_CASH_10, + SFX_PLAYER_ANGRY_PICK_UP_CASH_11, + SFX_PLAYER_ANGRY_PICK_UP_CASH_12, + SFX_PLAYER_ANGRY_PICK_UP_HOOKER_1, + SFX_PLAYER_ANGRY_PICK_UP_HOOKER_2, + SFX_PLAYER_ANGRY_PICK_UP_HOOKER_3, + SFX_PLAYER_ANGRY_PICK_UP_HOOKER_4, + SFX_PLAYER_ANGRY_PICK_UP_HOOKER_5, + SFX_PLAYER_ANGRY_PICK_UP_HOOKER_6, + SFX_PLAYER_ANGRY_PULL_GUN_1, + SFX_PLAYER_ANGRY_PULL_GUN_2, + SFX_PLAYER_ANGRY_PULL_GUN_3, + SFX_PLAYER_ANGRY_PULL_GUN_4, + SFX_PLAYER_ANGRY_PULL_GUN_5, + SFX_PLAYER_ANGRY_PULL_GUN_6, + SFX_PLAYER_ANGRY_PULL_GUN_7, + SFX_PLAYER_ANGRY_PULL_GUN_8, + SFX_PLAYER_ANGRY_PULL_GUN_9, + SFX_PLAYER_ANGRY_PULL_GUN_10, + SFX_PLAYER_ANGRY_PULL_GUN_11, + SFX_PLAYER_ANGRY_PULL_GUN_12, + SFX_PLAYER_ANGRY_PULL_GUN_13, + SFX_PLAYER_ANGRY_PULL_GUN_14, + SFX_PLAYER_ANGRY_PULL_GUN_15, + SFX_PLAYER_ANGRY_PULL_GUN_16, + SFX_PLAYER_ANGRY_PULL_GUN_17, + SFX_PLAYER_ANGRY_PULL_GUN_18, + SFX_PLAYER_ANGRY_PULL_GUN_19, + SFX_PLAYER_ANGRY_PULL_GUN_20, + SFX_PLAYER_ANGRY_PULL_GUN_21, + SFX_PLAYER_ANGRY_PULL_GUN_22, + SFX_PLAYER_ANGRY_PULL_GUN_23, + SFX_PLAYER_ANGRY_PULL_GUN_24, + SFX_PLAYER_ANGRY_PULL_GUN_25, + SFX_PLAYER_ANGRY_PULL_GUN_26, + SFX_PLAYER_ANGRY_PULL_GUN_27, + SFX_PLAYER_ANGRY_PULL_GUN_28, + SFX_PLAYER_ANGRY_PULL_GUN_29, + SFX_PLAYER_ANGRY_PULL_GUN_30, + SFX_PLAYER_ANGRY_PULL_GUN_31, + SFX_PLAYER_ANGRY_PULL_GUN_32, + SFX_PLAYER_ANGRY_PULL_GUN_33, + SFX_PLAYER_ANGRY_PULL_GUN_34, + SFX_PLAYER_ANGRY_PULL_GUN_35, + SFX_PLAYER_ANGRY_PULL_GUN_36, + SFX_PLAYER_ANGRY_PULL_GUN_37, + SFX_PLAYER_ANGRY_PULL_GUN_38, + SFX_PLAYER_ANGRY_PULL_GUN_39, + SFX_PLAYER_ANGRY_PULL_GUN_40, + SFX_PLAYER_ANGRY_PULL_GUN_41, + SFX_PLAYER_ANGRY_PULL_GUN_42, + SFX_PLAYER_ANGRY_PULL_GUN_43, + SFX_PLAYER_ANGRY_PULL_GUN_44, + SFX_PLAYER_ANGRY_PULL_GUN_45, + SFX_PLAYER_ANGRY_PULL_GUN_46, + SFX_PLAYER_ANGRY_PULL_GUN_47, + SFX_PLAYER_ANGRY_PULL_GUN_48, + SFX_PLAYER_ANGRY_PULL_GUN_49, + SFX_PLAYER_ANGRY_PULL_GUN_50, + SFX_PLAYER_ANGRY_PULL_GUN_51, + SFX_PLAYER_ANGRY_PULL_GUN_52, + SFX_PLAYER_ANGRY_SEX_1, + SFX_PLAYER_ANGRY_SEX_2, + SFX_PLAYER_ANGRY_SEX_3, + SFX_PLAYER_ANGRY_SEX_4, + SFX_PLAYER_ANGRY_SEX_5, + SFX_PLAYER_ANGRY_SEX_6, + SFX_PLAYER_ANGRY_SEX_7, + SFX_PLAYER_ANGRY_SEX_8, + SFX_PLAYER_ANGRY_SEX_9, + SFX_PLAYER_ANGRY_SEX_10, + SFX_PLAYER_ANGRY_SEX_11, + SFX_PLAYER_ANGRY_SEX_12, + SFX_PLAYER_ANGRY_SEX_13, + SFX_PLAYER_ANGRY_SEX_14, + SFX_PLAYER_ANGRY_SEX_15, + SFX_PLAYER_ANGRY_SEX_16, + SFX_PLAYER_ANGRY_SEX_17, + SFX_PLAYER_ANGRY_SEX_18, + SFX_PLAYER_ANGRY_SHOOT_1, + SFX_PLAYER_ANGRY_SHOOT_2, + SFX_PLAYER_ANGRY_SHOOT_3, + SFX_PLAYER_ANGRY_SHOOT_4, + SFX_PLAYER_ANGRY_SHOOT_5, + SFX_PLAYER_ANGRY_SHOOT_6, + SFX_PLAYER_ANGRY_SHOOT_7, + SFX_PLAYER_ANGRY_SHOOT_8, + SFX_PLAYER_ANGRY_SHOOT_9, + SFX_PLAYER_ANGRY_SHOOT_10, + SFX_PLAYER_ANGRY_SHOOT_11, + SFX_PLAYER_ANGRY_SHOOT_12, + SFX_PLAYER_ANGRY_SHOOT_13, + SFX_PLAYER_ANGRY_SHOOT_14, + SFX_PLAYER_ANGRY_SHOOT_15, + SFX_PLAYER_ANGRY_SHOOT_16, + SFX_PLAYER_ANGRY_SHOOT_17, + SFX_PLAYER_ANGRY_SHOOT_18, + SFX_PLAYER_ANGRY_SHOOT_19, + SFX_PLAYER_ANGRY_SHOOT_20, + SFX_PLAYER_ANGRY_SHOOT_21, + SFX_PLAYER_ANGRY_SHOOT_22, + SFX_PLAYER_ANGRY_SHOOT_23, + SFX_PLAYER_ANGRY_SHOOT_24, + SFX_PLAYER_ANGRY_SHOOT_25, + SFX_PLAYER_ANGRY_SHOOT_26, + SFX_PLAYER_ANGRY_SHOOT_27, + SFX_PLAYER_ANGRY_SHOOT_28, + SFX_PLAYER_ANGRY_SHOOT_29, + SFX_PLAYER_ANGRY_SHOOT_30, + SFX_PLAYER_ANGRY_SHOOT_31, + SFX_PLAYER_ANGRY_SHOOT_32, + SFX_PLAYER_ANGRY_SHOOT_33, + SFX_PLAYER_ANGRY_SHOOT_34, + SFX_PLAYER_ANGRY_SHOOT_35, + SFX_PLAYER_ANGRY_SHOOT_36, + SFX_PLAYER_ANGRY_SHOOT_37, + SFX_PLAYER_ANGRY_SHOOT_38, + SFX_PLAYER_ANGRY_SHOOT_39, + + SFX_PLAYER_CALM_BUSTED_1, + SFX_PLAYER_CALM_BUSTED_2, + SFX_PLAYER_CALM_BUSTED_3, + SFX_PLAYER_CALM_BUSTED_4, + SFX_PLAYER_CALM_BUSTED_5, + SFX_PLAYER_CALM_BUSTED_6, + SFX_PLAYER_CALM_BUSTED_7, + SFX_PLAYER_CALM_BUSTED_8, + SFX_PLAYER_CALM_BUSTED_9, + SFX_PLAYER_CALM_BUSTED_10, + SFX_PLAYER_CALM_BUSTED_11, + SFX_PLAYER_CALM_BUSTED_12, + SFX_PLAYER_CALM_BUSTED_13, + SFX_PLAYER_CALM_BUSTED_14, + SFX_PLAYER_CALM_BUSTED_15, + SFX_PLAYER_CALM_BUSTED_16, + SFX_PLAYER_CALM_BUSTED_17, + SFX_PLAYER_CALM_BUSTED_18, + SFX_PLAYER_CALM_BUSTED_19, + SFX_PLAYER_CALM_BUSTED_20, + SFX_PLAYER_CALM_BUSTED_21, + SFX_PLAYER_CALM_BUSTED_22, + SFX_PLAYER_CALM_CHASED_1, + SFX_PLAYER_CALM_CHASED_2, + SFX_PLAYER_CALM_CHASED_3, + SFX_PLAYER_CALM_CHASED_4, + SFX_PLAYER_CALM_CHASED_5, + SFX_PLAYER_CALM_CHASED_6, + SFX_PLAYER_CALM_CHASED_7, + SFX_PLAYER_CALM_CHASED_8, + SFX_PLAYER_CALM_CHASED_9, + SFX_PLAYER_CALM_CHASED_10, + SFX_PLAYER_CALM_CHASED_11, + SFX_PLAYER_CALM_CHASED_12, + SFX_PLAYER_CALM_CHASED_13, + SFX_PLAYER_CALM_CHASED_14, + SFX_PLAYER_CALM_CHASED_15, + SFX_PLAYER_CALM_CHASED_16, + SFX_PLAYER_CALM_CHASED_17, + SFX_PLAYER_CALM_CHASED_18, + SFX_PLAYER_CALM_CHASED_19, + SFX_PLAYER_CALM_CHASED_20, + SFX_PLAYER_CALM_CRASH_1, + SFX_PLAYER_CALM_CRASH_2, + SFX_PLAYER_CALM_CRASH_3, + SFX_PLAYER_CALM_CRASH_4, + SFX_PLAYER_CALM_CRASH_5, + SFX_PLAYER_CALM_CRASH_6, + SFX_PLAYER_CALM_CRASH_7, + SFX_PLAYER_CALM_CRASH_8, + SFX_PLAYER_CALM_CRASH_9, + SFX_PLAYER_CALM_CRASH_10, + SFX_PLAYER_CALM_CRASH_11, + SFX_PLAYER_CALM_CRASH_12, + SFX_PLAYER_CALM_CRASH_13, + SFX_PLAYER_CALM_CRASH_14, + SFX_PLAYER_CALM_CRASH_15, + SFX_PLAYER_CALM_CRASH_16, + SFX_PLAYER_CALM_CRASH_17, + SFX_PLAYER_CALM_CRASH_18, + SFX_PLAYER_CALM_CRASH_19, + SFX_PLAYER_CALM_CRASH_20, + SFX_PLAYER_CALM_CRASH_21, + SFX_PLAYER_CALM_CRASH_22, + SFX_PLAYER_CALM_CRASH_23, + SFX_PLAYER_CALM_CRASH_24, + SFX_PLAYER_CALM_CRASH_25, + SFX_PLAYER_CALM_CRASH_26, + SFX_PLAYER_CALM_CRASH_27, + SFX_PLAYER_CALM_CRASH_28, + SFX_PLAYER_CALM_CRASH_29, + SFX_PLAYER_CALM_CRASH_30, + SFX_PLAYER_CALM_CRASH_31, + SFX_PLAYER_CALM_CRASH_32, + SFX_PLAYER_CALM_CRASH_33, + SFX_PLAYER_CALM_CRASH_34, + SFX_PLAYER_CALM_CRASH_35, + SFX_PLAYER_CALM_CRASH_36, + SFX_PLAYER_CALM_CRASH_37, + SFX_PLAYER_CALM_CRASH_38, + SFX_PLAYER_CALM_CRASH_39, + SFX_PLAYER_CALM_CRASH_40, + SFX_PLAYER_CALM_CRASH_41, + SFX_PLAYER_CALM_CRASH_42, + SFX_PLAYER_CALM_CRASH_43, + SFX_PLAYER_CALM_FIGHT_1, + SFX_PLAYER_CALM_FIGHT_2, + SFX_PLAYER_CALM_FIGHT_3, + SFX_PLAYER_CALM_FIGHT_4, + SFX_PLAYER_CALM_FIGHT_5, + SFX_PLAYER_CALM_FIGHT_6, + SFX_PLAYER_CALM_FIGHT_7, + SFX_PLAYER_CALM_FIGHT_8, + SFX_PLAYER_CALM_FIGHT_9, + SFX_PLAYER_CALM_FIGHT_10, + SFX_PLAYER_CALM_FIGHT_11, + SFX_PLAYER_CALM_FIGHT_12, + SFX_PLAYER_CALM_FIGHT_13, + SFX_PLAYER_CALM_FIGHT_14, + SFX_PLAYER_CALM_FIGHT_15, + SFX_PLAYER_CALM_FIGHT_16, + SFX_PLAYER_CALM_FIGHT_17, + SFX_PLAYER_CALM_FIGHT_18, + SFX_PLAYER_CALM_FIGHT_19, + SFX_PLAYER_CALM_FIGHT_20, + SFX_PLAYER_CALM_FIGHT_21, + SFX_PLAYER_CALM_FIGHT_22, + SFX_PLAYER_CALM_FIGHT_23, + SFX_PLAYER_CALM_FIGHT_24, + SFX_PLAYER_CALM_FIGHT_25, + SFX_PLAYER_CALM_FIGHT_26, + SFX_PLAYER_CALM_FIGHT_27, + SFX_PLAYER_CALM_FIGHT_28, + SFX_PLAYER_CALM_FIGHT_29, + SFX_PLAYER_CALM_FIGHT_30, + SFX_PLAYER_CALM_FIGHT_31, + SFX_PLAYER_CALM_FIGHT_32, + SFX_PLAYER_CALM_FIGHT_33, + SFX_PLAYER_CALM_FIGHT_34, + SFX_PLAYER_CALM_FIGHT_35, + SFX_PLAYER_CALM_FIGHT_36, + SFX_PLAYER_CALM_FIGHT_37, + SFX_PLAYER_CALM_FIGHT_38, + SFX_PLAYER_CALM_FIGHT_39, + SFX_PLAYER_CALM_FIGHT_40, + SFX_PLAYER_CALM_FIGHT_41, + SFX_PLAYER_CALM_FIGHT_42, + SFX_PLAYER_CALM_FIGHT_43, + SFX_PLAYER_CALM_FIGHT_44, + SFX_PLAYER_CALM_FIGHT_45, + SFX_PLAYER_CALM_FIGHT_46, + SFX_PLAYER_CALM_FIGHT_47, + SFX_PLAYER_CALM_JACKED_1, + SFX_PLAYER_CALM_JACKED_2, + SFX_PLAYER_CALM_JACKED_3, + SFX_PLAYER_CALM_JACKED_4, + SFX_PLAYER_CALM_JACKED_5, + SFX_PLAYER_CALM_JACKED_6, + SFX_PLAYER_CALM_JACKED_7, + SFX_PLAYER_CALM_JACKED_8, + SFX_PLAYER_CALM_JACKED_9, + SFX_PLAYER_CALM_JACKED_10, + SFX_PLAYER_CALM_JACKED_11, + SFX_PLAYER_CALM_JACKED_12, + SFX_PLAYER_CALM_JACKED_13, + SFX_PLAYER_CALM_JACKED_14, + SFX_PLAYER_CALM_JACKED_15, + SFX_PLAYER_CALM_JACKED_16, + SFX_PLAYER_CALM_JACKED_17, + SFX_PLAYER_CALM_JACKED_18, + SFX_PLAYER_CALM_JACKED_19, + SFX_PLAYER_CALM_JACKED_20, + SFX_PLAYER_CALM_JACKED_21, + SFX_PLAYER_CALM_JACKED_22, + SFX_PLAYER_CALM_JACKED_23, + SFX_PLAYER_CALM_JACKED_24, + SFX_PLAYER_CALM_JACKING_1, + SFX_PLAYER_CALM_JACKING_2, + SFX_PLAYER_CALM_JACKING_3, + SFX_PLAYER_CALM_JACKING_4, + SFX_PLAYER_CALM_JACKING_5, + SFX_PLAYER_CALM_JACKING_6, + SFX_PLAYER_CALM_JACKING_7, + SFX_PLAYER_CALM_JACKING_8, + SFX_PLAYER_CALM_JACKING_9, + SFX_PLAYER_CALM_JACKING_10, + SFX_PLAYER_CALM_JACKING_11, + SFX_PLAYER_CALM_JACKING_12, + SFX_PLAYER_CALM_JACKING_13, + SFX_PLAYER_CALM_JACKING_14, + SFX_PLAYER_CALM_JACKING_15, + SFX_PLAYER_CALM_JACKING_16, + SFX_PLAYER_CALM_JACKING_17, + SFX_PLAYER_CALM_JACKING_18, + SFX_PLAYER_CALM_JACKING_19, + SFX_PLAYER_CALM_JACKING_20, + SFX_PLAYER_CALM_JACKING_21, + SFX_PLAYER_CALM_JACKING_22, + SFX_PLAYER_CALM_JACKING_23, + SFX_PLAYER_CALM_JACKING_24, + SFX_PLAYER_CALM_JACKING_25, + SFX_PLAYER_CALM_JACKING_26, + SFX_PLAYER_CALM_JACKING_27, + SFX_PLAYER_CALM_JACKING_28, + SFX_PLAYER_CALM_JACKING_29, + SFX_PLAYER_CALM_JACKING_30, + SFX_PLAYER_CALM_JACKING_31, + SFX_PLAYER_CALM_JACKING_32, + SFX_PLAYER_CALM_JACKING_33, + SFX_PLAYER_CALM_JACKING_34, + SFX_PLAYER_CALM_JACKING_35, + SFX_PLAYER_CALM_JACKING_36, + SFX_PLAYER_CALM_JACKING_37, + SFX_PLAYER_CALM_JACKING_38, + SFX_PLAYER_CALM_JACKING_39, + SFX_PLAYER_CALM_JACKING_40, + SFX_PLAYER_CALM_PICK_UP_CASH_1, + SFX_PLAYER_CALM_PICK_UP_CASH_2, + SFX_PLAYER_CALM_PICK_UP_CASH_3, + SFX_PLAYER_CALM_PICK_UP_CASH_4, + SFX_PLAYER_CALM_PICK_UP_CASH_5, + SFX_PLAYER_CALM_PICK_UP_CASH_6, + SFX_PLAYER_CALM_PICK_UP_CASH_7, + SFX_PLAYER_CALM_PICK_UP_CASH_8, + SFX_PLAYER_CALM_PICK_UP_CASH_9, + SFX_PLAYER_CALM_PICK_UP_CASH_10, + SFX_PLAYER_CALM_PICK_UP_CASH_11, + SFX_PLAYER_CALM_PICK_UP_HOOKER_1, + SFX_PLAYER_CALM_PICK_UP_HOOKER_2, + SFX_PLAYER_CALM_PICK_UP_HOOKER_3, + SFX_PLAYER_CALM_PICK_UP_HOOKER_4, + SFX_PLAYER_CALM_PICK_UP_HOOKER_5, + SFX_PLAYER_CALM_PICK_UP_HOOKER_6, + SFX_PLAYER_CALM_PICK_UP_HOOKER_7, + SFX_PLAYER_CALM_PICK_UP_HOOKER_8, + SFX_PLAYER_CALM_PICK_UP_HOOKER_9, + SFX_PLAYER_CALM_PICK_UP_HOOKER_10, + SFX_PLAYER_CALM_PICK_UP_HOOKER_11, + SFX_PLAYER_CALM_PICK_UP_HOOKER_12, + SFX_PLAYER_CALM_PICK_UP_HOOKER_13, + SFX_PLAYER_CALM_PICK_UP_HOOKER_14, + SFX_PLAYER_CALM_PICK_UP_HOOKER_15, + SFX_PLAYER_CALM_PICK_UP_HOOKER_16, + SFX_PLAYER_CALM_PICK_UP_HOOKER_17, + SFX_PLAYER_CALM_PICK_UP_HOOKER_18, + SFX_PLAYER_CALM_PICK_UP_HOOKER_19, + SFX_PLAYER_CALM_PICK_UP_HOOKER_20, + SFX_PLAYER_CALM_PICK_UP_HOOKER_21, + SFX_PLAYER_CALM_PICK_UP_HOOKER_22, + SFX_PLAYER_CALM_PULL_GUN_1, + SFX_PLAYER_CALM_PULL_GUN_2, + SFX_PLAYER_CALM_PULL_GUN_3, + SFX_PLAYER_CALM_PULL_GUN_4, + SFX_PLAYER_CALM_PULL_GUN_5, + SFX_PLAYER_CALM_PULL_GUN_6, + SFX_PLAYER_CALM_PULL_GUN_7, + SFX_PLAYER_CALM_PULL_GUN_8, + SFX_PLAYER_CALM_PULL_GUN_9, + SFX_PLAYER_CALM_PULL_GUN_10, + SFX_PLAYER_CALM_PULL_GUN_11, + SFX_PLAYER_CALM_PULL_GUN_12, + SFX_PLAYER_CALM_PULL_GUN_13, + SFX_PLAYER_CALM_PULL_GUN_14, + SFX_PLAYER_CALM_PULL_GUN_15, + SFX_PLAYER_CALM_PULL_GUN_16, + SFX_PLAYER_CALM_PULL_GUN_17, + SFX_PLAYER_CALM_PULL_GUN_18, + SFX_PLAYER_CALM_PULL_GUN_19, + SFX_PLAYER_CALM_PULL_GUN_20, + SFX_PLAYER_CALM_PULL_GUN_21, + SFX_PLAYER_CALM_PULL_GUN_22, + SFX_PLAYER_CALM_PULL_GUN_23, + SFX_PLAYER_CALM_PULL_GUN_24, + SFX_PLAYER_CALM_PULL_GUN_25, + SFX_PLAYER_CALM_PULL_GUN_26, + SFX_PLAYER_CALM_PULL_GUN_27, + SFX_PLAYER_CALM_PULL_GUN_28, + SFX_PLAYER_CALM_PULL_GUN_29, + SFX_PLAYER_CALM_PULL_GUN_30, + SFX_PLAYER_CALM_PULL_GUN_31, + SFX_PLAYER_CALM_PULL_GUN_32, + SFX_PLAYER_CALM_PULL_GUN_33, + SFX_PLAYER_CALM_PULL_GUN_34, + SFX_PLAYER_CALM_PULL_GUN_35, + SFX_PLAYER_CALM_PULL_GUN_36, + SFX_PLAYER_CALM_PULL_GUN_37, + SFX_PLAYER_CALM_PULL_GUN_38, + SFX_PLAYER_CALM_PULL_GUN_39, + SFX_PLAYER_CALM_SEX_1, + SFX_PLAYER_CALM_SEX_2, + SFX_PLAYER_CALM_SEX_3, + SFX_PLAYER_CALM_SEX_4, + SFX_PLAYER_CALM_SEX_5, + SFX_PLAYER_CALM_SEX_6, + SFX_PLAYER_CALM_SEX_7, + SFX_PLAYER_CALM_SEX_8, + SFX_PLAYER_CALM_SHOOT_1, + SFX_PLAYER_CALM_SHOOT_2, + SFX_PLAYER_CALM_SHOOT_3, + SFX_PLAYER_CALM_SHOOT_4, + SFX_PLAYER_CALM_SHOOT_5, + SFX_PLAYER_CALM_SHOOT_6, + SFX_PLAYER_CALM_SHOOT_7, + SFX_PLAYER_CALM_SHOOT_8, + SFX_PLAYER_CALM_SHOOT_9, + SFX_PLAYER_CALM_SHOOT_10, + SFX_PLAYER_CALM_SHOOT_11, + SFX_PLAYER_CALM_SHOOT_12, + SFX_PLAYER_CALM_SHOOT_13, + SFX_PLAYER_CALM_SHOOT_14, + SFX_PLAYER_CALM_SHOOT_15, + SFX_PLAYER_CALM_SHOOT_16, + SFX_PLAYER_CALM_SHOOT_17, + SFX_PLAYER_CALM_SHOOT_18, + SFX_PLAYER_CALM_SHOOT_19, + SFX_PLAYER_CALM_SHOOT_20, + SFX_PLAYER_CALM_SHOOT_21, + SFX_PLAYER_CALM_SHOOT_22, + SFX_PLAYER_CALM_SHOOT_23, + SFX_PLAYER_CALM_SHOOT_24, + SFX_PLAYER_CALM_SHOOT_25, + SFX_PLAYER_CALM_SHOOT_26, + SFX_PLAYER_CALM_SHOOT_27, + SFX_PLAYER_CALM_SHOOT_28, + SFX_PLAYER_CALM_SHOOT_29, + SFX_PLAYER_CALM_SHOOT_30, + SFX_PLAYER_CALM_SHOOT_31, + SFX_PLAYER_CALM_SHOOT_32, + SFX_PLAYER_CALM_SHOOT_33, + SFX_PLAYER_CALM_SHOOT_34, + SFX_PLAYER_CALM_SHOOT_35, + + SFX_PLAYER_PISSED_OFF_CRASH_1, + SFX_PLAYER_PISSED_OFF_CRASH_2, + SFX_PLAYER_PISSED_OFF_CRASH_3, + SFX_PLAYER_PISSED_OFF_CRASH_4, + SFX_PLAYER_PISSED_OFF_CRASH_5, + SFX_PLAYER_PISSED_OFF_CRASH_6, + SFX_PLAYER_PISSED_OFF_CRASH_7, + SFX_PLAYER_PISSED_OFF_CRASH_8, + SFX_PLAYER_PISSED_OFF_CRASH_9, + SFX_PLAYER_PISSED_OFF_CRASH_10, + SFX_PLAYER_PISSED_OFF_CRASH_11, + SFX_PLAYER_PISSED_OFF_CRASH_12, + SFX_PLAYER_PISSED_OFF_CRASH_13, + SFX_PLAYER_PISSED_OFF_CRASH_14, + SFX_PLAYER_PISSED_OFF_CRASH_15, + SFX_PLAYER_PISSED_OFF_CRASH_16, + SFX_PLAYER_PISSED_OFF_CRASH_17, + SFX_PLAYER_PISSED_OFF_CRASH_18, + SFX_PLAYER_PISSED_OFF_CRASH_19, + SFX_PLAYER_PISSED_OFF_CRASH_20, + SFX_PLAYER_PISSED_OFF_CRASH_21, + SFX_PLAYER_PISSED_OFF_CRASH_22, + SFX_PLAYER_PISSED_OFF_CRASH_23, + SFX_PLAYER_PISSED_OFF_CRASH_24, + SFX_PLAYER_PISSED_OFF_CRASH_25, + SFX_PLAYER_PISSED_OFF_CRASH_26, + SFX_PLAYER_PISSED_OFF_CRASH_27, + SFX_PLAYER_PISSED_OFF_CRASH_28, + SFX_PLAYER_PISSED_OFF_CRASH_29, + SFX_PLAYER_PISSED_OFF_CRASH_30, + SFX_PLAYER_PISSED_OFF_CRASH_31, + SFX_PLAYER_PISSED_OFF_CRASH_32, + SFX_PLAYER_PISSED_OFF_CRASH_33, + SFX_PLAYER_PISSED_OFF_CRASH_34, + SFX_PLAYER_PISSED_OFF_CRASH_35, + SFX_PLAYER_PISSED_OFF_CRASH_36, + SFX_PLAYER_PISSED_OFF_CRASH_37, + SFX_PLAYER_PISSED_OFF_CRASH_38, + SFX_PLAYER_PISSED_OFF_CRASH_39, + SFX_PLAYER_PISSED_OFF_CRASH_40, + SFX_PLAYER_PISSED_OFF_CRASH_41, + SFX_PLAYER_PISSED_OFF_CRASH_42, + SFX_PLAYER_PISSED_OFF_CRASH_43, + SFX_PLAYER_PISSED_OFF_CRASH_44, + SFX_PLAYER_PISSED_OFF_FIGHT_1, + SFX_PLAYER_PISSED_OFF_FIGHT_2, + SFX_PLAYER_PISSED_OFF_FIGHT_3, + SFX_PLAYER_PISSED_OFF_FIGHT_4, + SFX_PLAYER_PISSED_OFF_FIGHT_5, + SFX_PLAYER_PISSED_OFF_FIGHT_6, + SFX_PLAYER_PISSED_OFF_FIGHT_7, + SFX_PLAYER_PISSED_OFF_FIGHT_8, + SFX_PLAYER_PISSED_OFF_FIGHT_9, + SFX_PLAYER_PISSED_OFF_FIGHT_10, + SFX_PLAYER_PISSED_OFF_FIGHT_11, + SFX_PLAYER_PISSED_OFF_FIGHT_12, + SFX_PLAYER_PISSED_OFF_FIGHT_13, + SFX_PLAYER_PISSED_OFF_FIGHT_14, + SFX_PLAYER_PISSED_OFF_FIGHT_15, + SFX_PLAYER_PISSED_OFF_FIGHT_16, + SFX_PLAYER_PISSED_OFF_FIGHT_17, + SFX_PLAYER_PISSED_OFF_FIGHT_18, + SFX_PLAYER_PISSED_OFF_FIGHT_19, + SFX_PLAYER_PISSED_OFF_FIGHT_20, + SFX_PLAYER_PISSED_OFF_FIGHT_21, + SFX_PLAYER_PISSED_OFF_FIGHT_22, + SFX_PLAYER_PISSED_OFF_FIGHT_23, + SFX_PLAYER_PISSED_OFF_FIGHT_24, + SFX_PLAYER_PISSED_OFF_FIGHT_25, + SFX_PLAYER_PISSED_OFF_FIGHT_26, + SFX_PLAYER_PISSED_OFF_FIGHT_27, + SFX_PLAYER_PISSED_OFF_FIGHT_28, + SFX_PLAYER_PISSED_OFF_FIGHT_29, + SFX_PLAYER_PISSED_OFF_FIGHT_30, + SFX_PLAYER_PISSED_OFF_FIGHT_31, + SFX_PLAYER_PISSED_OFF_FIGHT_32, + SFX_PLAYER_PISSED_OFF_FIGHT_33, + SFX_PLAYER_PISSED_OFF_FIGHT_34, + SFX_PLAYER_PISSED_OFF_FIGHT_35, + SFX_PLAYER_PISSED_OFF_FIGHT_36, + SFX_PLAYER_PISSED_OFF_FIGHT_37, + SFX_PLAYER_PISSED_OFF_FIGHT_38, + SFX_PLAYER_PISSED_OFF_FIGHT_39, + SFX_PLAYER_PISSED_OFF_FIGHT_40, + SFX_PLAYER_PISSED_OFF_FIGHT_41, + SFX_PLAYER_PISSED_OFF_FIGHT_42, + SFX_PLAYER_PISSED_OFF_FIGHT_43, + SFX_PLAYER_PISSED_OFF_FIGHT_44, + SFX_PLAYER_PISSED_OFF_FIGHT_45, + SFX_PLAYER_PISSED_OFF_FIGHT_46, + SFX_PLAYER_PISSED_OFF_FIGHT_47, + SFX_PLAYER_PISSED_OFF_FIGHT_48, + SFX_PLAYER_PISSED_OFF_FIGHT_49, + SFX_PLAYER_PISSED_OFF_FIGHT_50, + SFX_PLAYER_PISSED_OFF_FIGHT_51, + SFX_PLAYER_PISSED_OFF_FIGHT_52, + SFX_PLAYER_PISSED_OFF_FIGHT_53, + SFX_PLAYER_PISSED_OFF_FIGHT_54, + SFX_PLAYER_PISSED_OFF_FIGHT_55, + SFX_PLAYER_PISSED_OFF_FIGHT_56, + SFX_PLAYER_PISSED_OFF_FIGHT_57, + SFX_PLAYER_PISSED_OFF_FIGHT_58, + SFX_PLAYER_PISSED_OFF_FIGHT_59, + SFX_PLAYER_PISSED_OFF_FIGHT_60, + SFX_PLAYER_PISSED_OFF_FIGHT_61, + SFX_PLAYER_PISSED_OFF_JACKED_1, + SFX_PLAYER_PISSED_OFF_JACKED_2, + SFX_PLAYER_PISSED_OFF_JACKED_3, + SFX_PLAYER_PISSED_OFF_JACKED_4, + SFX_PLAYER_PISSED_OFF_JACKED_5, + SFX_PLAYER_PISSED_OFF_JACKED_6, + SFX_PLAYER_PISSED_OFF_JACKED_7, + SFX_PLAYER_PISSED_OFF_JACKED_8, + SFX_PLAYER_PISSED_OFF_JACKED_9, + SFX_PLAYER_PISSED_OFF_JACKED_10, + SFX_PLAYER_PISSED_OFF_JACKED_11, + SFX_PLAYER_PISSED_OFF_JACKED_12, + SFX_PLAYER_PISSED_OFF_JACKED_13, + SFX_PLAYER_PISSED_OFF_JACKED_14, + SFX_PLAYER_PISSED_OFF_JACKED_15, + SFX_PLAYER_PISSED_OFF_JACKED_16, + SFX_PLAYER_PISSED_OFF_JACKED_17, + SFX_PLAYER_PISSED_OFF_JACKED_18, + SFX_PLAYER_PISSED_OFF_JACKED_19, + SFX_PLAYER_PISSED_OFF_JACKED_20, + SFX_PLAYER_PISSED_OFF_JACKED_21, + SFX_PLAYER_PISSED_OFF_JACKING_1, + SFX_PLAYER_PISSED_OFF_JACKING_2, + SFX_PLAYER_PISSED_OFF_JACKING_3, + SFX_PLAYER_PISSED_OFF_JACKING_4, + SFX_PLAYER_PISSED_OFF_JACKING_5, + SFX_PLAYER_PISSED_OFF_JACKING_6, + SFX_PLAYER_PISSED_OFF_JACKING_7, + SFX_PLAYER_PISSED_OFF_JACKING_8, + SFX_PLAYER_PISSED_OFF_JACKING_9, + SFX_PLAYER_PISSED_OFF_JACKING_10, + SFX_PLAYER_PISSED_OFF_JACKING_11, + SFX_PLAYER_PISSED_OFF_JACKING_12, + SFX_PLAYER_PISSED_OFF_JACKING_13, + SFX_PLAYER_PISSED_OFF_JACKING_14, + SFX_PLAYER_PISSED_OFF_JACKING_15, + SFX_PLAYER_PISSED_OFF_JACKING_16, + SFX_PLAYER_PISSED_OFF_JACKING_17, + SFX_PLAYER_PISSED_OFF_JACKING_18, + SFX_PLAYER_PISSED_OFF_JACKING_19, + SFX_PLAYER_PISSED_OFF_JACKING_20, + SFX_PLAYER_PISSED_OFF_JACKING_21, + SFX_PLAYER_PISSED_OFF_JACKING_22, + SFX_PLAYER_PISSED_OFF_JACKING_23, + SFX_PLAYER_PISSED_OFF_JACKING_24, + SFX_PLAYER_PISSED_OFF_JACKING_25, + SFX_PLAYER_PISSED_OFF_JACKING_26, + SFX_PLAYER_PISSED_OFF_JACKING_27, + SFX_PLAYER_PISSED_OFF_JACKING_28, + SFX_PLAYER_PISSED_OFF_JACKING_29, + SFX_PLAYER_PISSED_OFF_JACKING_30, + SFX_PLAYER_PISSED_OFF_JACKING_31, + SFX_PLAYER_PISSED_OFF_JACKING_32, + SFX_PLAYER_PISSED_OFF_JACKING_33, + SFX_PLAYER_PISSED_OFF_JACKING_34, + SFX_PLAYER_PISSED_OFF_JACKING_35, + SFX_PLAYER_PISSED_OFF_JACKING_36, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_1, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_2, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_3, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_4, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_5, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_6, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_7, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_8, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_9, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_10, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_11, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_12, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_13, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_14, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_15, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_16, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_17, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_18, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_19, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_20, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_21, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_22, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_23, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_24, + SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_25, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_1, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_2, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_3, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_4, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_5, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_6, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_7, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_8, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_9, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_10, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_11, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_12, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_13, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_14, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_15, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_16, + SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_17, + SFX_PLAYER_PISSED_OFF_PULL_GUN_1, + SFX_PLAYER_PISSED_OFF_PULL_GUN_2, + SFX_PLAYER_PISSED_OFF_PULL_GUN_3, + SFX_PLAYER_PISSED_OFF_PULL_GUN_4, + SFX_PLAYER_PISSED_OFF_PULL_GUN_5, + SFX_PLAYER_PISSED_OFF_PULL_GUN_6, + SFX_PLAYER_PISSED_OFF_PULL_GUN_7, + SFX_PLAYER_PISSED_OFF_PULL_GUN_8, + SFX_PLAYER_PISSED_OFF_PULL_GUN_9, + SFX_PLAYER_PISSED_OFF_PULL_GUN_10, + SFX_PLAYER_PISSED_OFF_PULL_GUN_11, + SFX_PLAYER_PISSED_OFF_PULL_GUN_12, + SFX_PLAYER_PISSED_OFF_PULL_GUN_13, + SFX_PLAYER_PISSED_OFF_PULL_GUN_14, + SFX_PLAYER_PISSED_OFF_PULL_GUN_15, + SFX_PLAYER_PISSED_OFF_PULL_GUN_16, + SFX_PLAYER_PISSED_OFF_PULL_GUN_17, + SFX_PLAYER_PISSED_OFF_PULL_GUN_18, + SFX_PLAYER_PISSED_OFF_PULL_GUN_19, + SFX_PLAYER_PISSED_OFF_PULL_GUN_20, + SFX_PLAYER_PISSED_OFF_PULL_GUN_21, + SFX_PLAYER_PISSED_OFF_PULL_GUN_22, + SFX_PLAYER_PISSED_OFF_PULL_GUN_23, + SFX_PLAYER_PISSED_OFF_PULL_GUN_24, + SFX_PLAYER_PISSED_OFF_PULL_GUN_25, + SFX_PLAYER_PISSED_OFF_SHOOT_1, + SFX_PLAYER_PISSED_OFF_SHOOT_2, + SFX_PLAYER_PISSED_OFF_SHOOT_3, + SFX_PLAYER_PISSED_OFF_SHOOT_4, + SFX_PLAYER_PISSED_OFF_SHOOT_5, + SFX_PLAYER_PISSED_OFF_SHOOT_6, + SFX_PLAYER_PISSED_OFF_SHOOT_7, + SFX_PLAYER_PISSED_OFF_SHOOT_8, + SFX_PLAYER_PISSED_OFF_SHOOT_9, + SFX_PLAYER_PISSED_OFF_SHOOT_10, + SFX_PLAYER_PISSED_OFF_SHOOT_11, + SFX_PLAYER_PISSED_OFF_SHOOT_12, + SFX_PLAYER_PISSED_OFF_SHOOT_13, + SFX_PLAYER_PISSED_OFF_SHOOT_14, + SFX_PLAYER_PISSED_OFF_SHOOT_15, + SFX_PLAYER_PISSED_OFF_SHOOT_16, + SFX_PLAYER_PISSED_OFF_SHOOT_17, + SFX_PLAYER_PISSED_OFF_SHOOT_18, + SFX_PLAYER_PISSED_OFF_SHOOT_19, + SFX_PLAYER_PISSED_OFF_SHOOT_20, + SFX_PLAYER_PISSED_OFF_SHOOT_21, + SFX_PLAYER_PISSED_OFF_SHOOT_22, + SFX_PLAYER_PISSED_OFF_SHOOT_23, + SFX_PLAYER_PISSED_OFF_SHOOT_24, + SFX_PLAYER_PISSED_OFF_SHOOT_25, + SFX_PLAYER_PISSED_OFF_SHOOT_26, + SFX_PLAYER_PISSED_OFF_SHOOT_27, + SFX_PLAYER_PISSED_OFF_SHOOT_28, + SFX_PLAYER_PISSED_OFF_SHOOT_29, + + SFX_PLAYER_WISECRACKING_BUSTED_1, + SFX_PLAYER_WISECRACKING_BUSTED_2, + SFX_PLAYER_WISECRACKING_BUSTED_3, + SFX_PLAYER_WISECRACKING_BUSTED_4, + SFX_PLAYER_WISECRACKING_BUSTED_5, + SFX_PLAYER_WISECRACKING_BUSTED_6, + SFX_PLAYER_WISECRACKING_BUSTED_7, + SFX_PLAYER_WISECRACKING_BUSTED_8, + SFX_PLAYER_WISECRACKING_BUSTED_9, + SFX_PLAYER_WISECRACKING_BUSTED_10, + SFX_PLAYER_WISECRACKING_BUSTED_11, + SFX_PLAYER_WISECRACKING_BUSTED_12, + SFX_PLAYER_WISECRACKING_BUSTED_13, + SFX_PLAYER_WISECRACKING_BUSTED_14, + SFX_PLAYER_WISECRACKING_BUSTED_15, + SFX_PLAYER_WISECRACKING_BUSTED_16, + SFX_PLAYER_WISECRACKING_BUSTED_17, + SFX_PLAYER_WISECRACKING_BUSTED_18, + SFX_PLAYER_WISECRACKING_BUSTED_19, + SFX_PLAYER_WISECRACKING_BUSTED_20, + SFX_PLAYER_WISECRACKING_CHASED_1, + SFX_PLAYER_WISECRACKING_CHASED_2, + SFX_PLAYER_WISECRACKING_CHASED_3, + SFX_PLAYER_WISECRACKING_CHASED_4, + SFX_PLAYER_WISECRACKING_CHASED_5, + SFX_PLAYER_WISECRACKING_CHASED_6, + SFX_PLAYER_WISECRACKING_CHASED_7, + SFX_PLAYER_WISECRACKING_CRASH_1, + SFX_PLAYER_WISECRACKING_CRASH_2, + SFX_PLAYER_WISECRACKING_CRASH_3, + SFX_PLAYER_WISECRACKING_CRASH_4, + SFX_PLAYER_WISECRACKING_CRASH_5, + SFX_PLAYER_WISECRACKING_CRASH_6, + SFX_PLAYER_WISECRACKING_CRASH_7, + SFX_PLAYER_WISECRACKING_CRASH_8, + SFX_PLAYER_WISECRACKING_CRASH_9, + SFX_PLAYER_WISECRACKING_CRASH_10, + SFX_PLAYER_WISECRACKING_CRASH_11, + SFX_PLAYER_WISECRACKING_CRASH_12, + SFX_PLAYER_WISECRACKING_CRASH_13, + SFX_PLAYER_WISECRACKING_CRASH_14, + SFX_PLAYER_WISECRACKING_CRASH_15, + SFX_PLAYER_WISECRACKING_CRASH_16, + SFX_PLAYER_WISECRACKING_CRASH_17, + SFX_PLAYER_WISECRACKING_CRASH_18, + SFX_PLAYER_WISECRACKING_CRASH_19, + SFX_PLAYER_WISECRACKING_FIGHT_1, + SFX_PLAYER_WISECRACKING_FIGHT_2, + SFX_PLAYER_WISECRACKING_FIGHT_3, + SFX_PLAYER_WISECRACKING_FIGHT_4, + SFX_PLAYER_WISECRACKING_FIGHT_5, + SFX_PLAYER_WISECRACKING_FIGHT_6, + SFX_PLAYER_WISECRACKING_FIGHT_7, + SFX_PLAYER_WISECRACKING_FIGHT_8, + SFX_PLAYER_WISECRACKING_FIGHT_9, + SFX_PLAYER_WISECRACKING_FIGHT_10, + SFX_PLAYER_WISECRACKING_FIGHT_11, + SFX_PLAYER_WISECRACKING_FIGHT_12, + SFX_PLAYER_WISECRACKING_FIGHT_13, + SFX_PLAYER_WISECRACKING_FIGHT_14, + SFX_PLAYER_WISECRACKING_FIGHT_15, + SFX_PLAYER_WISECRACKING_FIGHT_16, + SFX_PLAYER_WISECRACKING_FIGHT_17, + SFX_PLAYER_WISECRACKING_FIGHT_18, + SFX_PLAYER_WISECRACKING_FIGHT_19, + SFX_PLAYER_WISECRACKING_FIGHT_20, + SFX_PLAYER_WISECRACKING_FIGHT_21, + SFX_PLAYER_WISECRACKING_FIGHT_22, + SFX_PLAYER_WISECRACKING_FIGHT_23, + SFX_PLAYER_WISECRACKING_FIGHT_24, + SFX_PLAYER_WISECRACKING_FIGHT_25, + SFX_PLAYER_WISECRACKING_FIGHT_26, + SFX_PLAYER_WISECRACKING_FIGHT_27, + SFX_PLAYER_WISECRACKING_JACKED_1, + SFX_PLAYER_WISECRACKING_JACKED_2, + SFX_PLAYER_WISECRACKING_JACKED_3, + SFX_PLAYER_WISECRACKING_JACKED_4, + SFX_PLAYER_WISECRACKING_JACKED_5, + SFX_PLAYER_WISECRACKING_JACKED_6, + SFX_PLAYER_WISECRACKING_JACKED_7, + SFX_PLAYER_WISECRACKING_JACKED_8, + SFX_PLAYER_WISECRACKING_JACKED_9, + SFX_PLAYER_WISECRACKING_JACKED_10, + SFX_PLAYER_WISECRACKING_JACKED_11, + SFX_PLAYER_WISECRACKING_JACKED_12, + SFX_PLAYER_WISECRACKING_JACKED_13, + SFX_PLAYER_WISECRACKING_JACKED_14, + SFX_PLAYER_WISECRACKING_JACKED_15, + SFX_PLAYER_WISECRACKING_JACKED_16, + SFX_PLAYER_WISECRACKING_JACKED_17, + SFX_PLAYER_WISECRACKING_JACKED_18, + SFX_PLAYER_WISECRACKING_JACKING_1, + SFX_PLAYER_WISECRACKING_JACKING_2, + SFX_PLAYER_WISECRACKING_JACKING_3, + SFX_PLAYER_WISECRACKING_JACKING_4, + SFX_PLAYER_WISECRACKING_JACKING_5, + SFX_PLAYER_WISECRACKING_JACKING_6, + SFX_PLAYER_WISECRACKING_JACKING_7, + SFX_PLAYER_WISECRACKING_JACKING_8, + SFX_PLAYER_WISECRACKING_JACKING_9, + SFX_PLAYER_WISECRACKING_JACKING_10, + SFX_PLAYER_WISECRACKING_JACKING_11, + SFX_PLAYER_WISECRACKING_JACKING_12, + SFX_PLAYER_WISECRACKING_JACKING_13, + SFX_PLAYER_WISECRACKING_JACKING_14, + SFX_PLAYER_WISECRACKING_JACKING_15, + SFX_PLAYER_WISECRACKING_JACKING_16, + SFX_PLAYER_WISECRACKING_JACKING_17, + SFX_PLAYER_WISECRACKING_JACKING_18, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_1, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_2, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_3, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_4, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_5, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_6, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_7, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_8, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_9, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_10, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_11, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_12, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_13, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_14, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_15, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_16, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_17, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_18, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_19, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_20, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_21, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_22, + SFX_PLAYER_WISECRACKING_PICK_UP_CASH_23, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_1, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_2, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_3, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_4, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_5, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_6, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_7, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_8, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_9, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_10, + SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_11, + SFX_PLAYER_WISECRACKING_PULL_GUN_1, + SFX_PLAYER_WISECRACKING_PULL_GUN_2, + SFX_PLAYER_WISECRACKING_PULL_GUN_3, + SFX_PLAYER_WISECRACKING_PULL_GUN_4, + SFX_PLAYER_WISECRACKING_PULL_GUN_5, + SFX_PLAYER_WISECRACKING_PULL_GUN_6, + SFX_PLAYER_WISECRACKING_PULL_GUN_7, + SFX_PLAYER_WISECRACKING_PULL_GUN_8, + SFX_PLAYER_WISECRACKING_PULL_GUN_9, + SFX_PLAYER_WISECRACKING_PULL_GUN_10, + SFX_PLAYER_WISECRACKING_PULL_GUN_11, + SFX_PLAYER_WISECRACKING_PULL_GUN_12, + SFX_PLAYER_WISECRACKING_PULL_GUN_13, + SFX_PLAYER_WISECRACKING_PULL_GUN_14, + SFX_PLAYER_WISECRACKING_PULL_GUN_15, + SFX_PLAYER_WISECRACKING_PULL_GUN_16, + SFX_PLAYER_WISECRACKING_PULL_GUN_17, + SFX_PLAYER_WISECRACKING_PULL_GUN_18, + SFX_PLAYER_WISECRACKING_PULL_GUN_19, + SFX_PLAYER_WISECRACKING_SEX_1, + SFX_PLAYER_WISECRACKING_SEX_2, + SFX_PLAYER_WISECRACKING_SEX_3, + SFX_PLAYER_WISECRACKING_SEX_4, + SFX_PLAYER_WISECRACKING_SEX_5, + SFX_PLAYER_WISECRACKING_SEX_6, + SFX_PLAYER_WISECRACKING_SEX_7, + SFX_PLAYER_WISECRACKING_SEX_8, + SFX_PLAYER_WISECRACKING_SEX_9, + SFX_PLAYER_WISECRACKING_SEX_10, + SFX_PLAYER_WISECRACKING_SHOOT_1, + SFX_PLAYER_WISECRACKING_SHOOT_2, + SFX_PLAYER_WISECRACKING_SHOOT_3, + SFX_PLAYER_WISECRACKING_SHOOT_4, + SFX_PLAYER_WISECRACKING_SHOOT_5, + SFX_PLAYER_WISECRACKING_SHOOT_6, + SFX_PLAYER_WISECRACKING_SHOOT_7, + SFX_PLAYER_WISECRACKING_SHOOT_8, + SFX_PLAYER_WISECRACKING_SHOOT_9, + SFX_PLAYER_DEATH, + SFX_PLAYER_AFTERSEX_1, + SFX_PLAYER_AFTERSEX_2, + SFX_PLAYER_AFTERSEX_3, + SFX_PLAYER_AFTERSEX_4, + SFX_PLAYER_AFTERSEX_5, + SFX_PLAYER_AFTERSEX_6, + SFX_PLAYER_AFTERSEX_7, + SFX_PLAYER_AFTERSEX_8, + SFX_PLAYER_AFTERSEX_9, + SFX_PLAYER_AFTERSEX_10, + SFX_PLAYER_AFTERSEX_11, + SFX_PLAYER_AFTERSEX_12, + SFX_PLAYER_AFTERSEX_13, + SFX_PLAYER_AFTERSEX_14, + SFX_PLAYER_AFTERSEX_15, + SFX_PLAYER_AFTERSEX_16, + SFX_PLAYER_AFTERSEX_17, + SFX_PLAYER_AFTERSEX_18, + SFX_PLAYER_HIT_BULLET_1, + SFX_PLAYER_HIT_BULLET_2, + SFX_PLAYER_HIT_BULLET_3, + SFX_PLAYER_HIT_BULLET_4, + SFX_PLAYER_HIT_BULLET_5, + SFX_PLAYER_HIT_BULLET_6, + SFX_PLAYER_HIT_BULLET_7, + SFX_PLAYER_HIT_BULLET_8, + SFX_PLAYER_HIT_BULLET_9, + SFX_PLAYER_HIT_BULLET_10, + SFX_PLAYER_HIT_BULLET_11, + SFX_PLAYER_HIT_BULLET_12, + SFX_PLAYER_HIT_BULLET_13, + SFX_PLAYER_HIT_BULLET_14, + SFX_PLAYER_HIT_BULLET_15, + SFX_PLAYER_HIT_BULLET_16, + SFX_PLAYER_HIT_BULLET_17, + SFX_PLAYER_HIT_BULLET_18, + SFX_PLAYER_HIT_BULLET_19, + SFX_PLAYER_HIT_BULLET_20, + SFX_PLAYER_HIT_BULLET_21, + SFX_PLAYER_HIT_BULLET_22, + SFX_PLAYER_HIT_BULLET_23, + SFX_PLAYER_HIT_BULLET_24, + SFX_PLAYER_HIT_BULLET_25, + SFX_PLAYER_HIT_BULLET_26, + SFX_PLAYER_HIT_BULLET_27, + SFX_PLAYER_HIT_BULLET_28, + SFX_PLAYER_HIT_BULLET_29, + SFX_PLAYER_HIT_BULLET_30, + SFX_PLAYER_HIT_BULLET_31, + SFX_PLAYER_HIT_BULLET_32, + SFX_PLAYER_HIT_BULLET_33, + SFX_PLAYER_HIT_GROUND_1, + SFX_PLAYER_HIT_GROUND_2, + SFX_PLAYER_HIT_GROUND_3, + SFX_PLAYER_HIT_GROUND_4, + SFX_PLAYER_HIT_GROUND_5, + SFX_PLAYER_HIT_GROUND_6, + SFX_PLAYER_HIT_GROUND_7, + SFX_PLAYER_HIT_GROUND_8, + SFX_PLAYER_HIT_GROUND_9, + SFX_PLAYER_HIT_GROUND_10, + SFX_PLAYER_HIT_GROUND_11, + SFX_PLAYER_HIT_GROUND_12, + SFX_PLAYER_HIT_GROUND_13, + SFX_PLAYER_HIT_GROUND_14, + SFX_PLAYER_HIT_GROUND_15, + SFX_PLAYER_HIT_GROUND_16, + SFX_PLAYER_HIT_GROUND_17, + SFX_PLAYER_HIT_GROUND_18, + SFX_PLAYER_HIT_GROUND_19, + SFX_PLAYER_HIT_GROUND_20, + SFX_PLAYER_HIT_GROUND_21, + SFX_PLAYER_HIT_GROUND_22, + SFX_PLAYER_HIT_GROUND_23, + SFX_PLAYER_HIT_GROUND_24, + SFX_PLAYER_HIT_GROUND_25, + SFX_PLAYER_HIT_GROUND_26, + SFX_PLAYER_HIT_GROUND_27, + SFX_PLAYER_HIT_GROUND_28, + SFX_PLAYER_HIT_GROUND_29, + SFX_PLAYER_HIT_GROUND_30, + SFX_PLAYER_HIT_GROUND_31, + SFX_PLAYER_HIT_GROUND_32, + SFX_PLAYER_HIT_GROUND_33, + SFX_PLAYER_HIT_GROUND_34, + SFX_PLAYER_HIT_GROUND_35, + SFX_PLAYER_HIT_FIST_1, + SFX_PLAYER_HIT_FIST_2, + SFX_PLAYER_HIT_FIST_3, + SFX_PLAYER_HIT_FIST_4, + SFX_PLAYER_HIT_FIST_5, + SFX_PLAYER_HIT_FIST_6, + SFX_PLAYER_HIT_FIST_7, + SFX_PLAYER_HIT_FIST_8, + SFX_PLAYER_HIT_FIST_9, + SFX_PLAYER_HIT_FIST_10, + SFX_PLAYER_HIT_FIST_11, + SFX_PLAYER_HIT_FIST_12, + SFX_PLAYER_HIT_FIST_13, + SFX_PLAYER_HIT_FIST_14, + SFX_PLAYER_HIT_FIST_15, + SFX_PLAYER_HIT_FIST_16, + SFX_PLAYER_HIT_FIST_17, + SFX_PLAYER_HIT_FIST_18, + SFX_PLAYER_HIT_FIST_19, + SFX_PLAYER_HIT_FIST_20, + SFX_PLAYER_HIT_FIST_21, + SFX_PLAYER_HIT_FIST_22, + SFX_PLAYER_HIT_FIST_23, + SFX_PLAYER_HIT_FIST_24, + SFX_PLAYER_HIT_FIST_25, + SFX_PLAYER_HIT_FIST_26, + SFX_PLAYER_HIT_FIST_27, + SFX_PLAYER_HIT_FIST_28, + SFX_PLAYER_HIT_FIST_29, + SFX_PLAYER_HIT_FIST_30, + SFX_PLAYER_HIT_FIST_31, + SFX_PLAYER_HIT_FIST_32, + SFX_PLAYER_HIT_FIST_33, + SFX_PLAYER_HIT_FIST_34, + SFX_PLAYER_HIT_FIST_35, + SFX_PLAYER_HIT_FIST_36, + SFX_PLAYER_HIT_FIST_37, + SFX_PLAYER_HIT_FIST_38, + SFX_PLAYER_HIT_FIST_39, + SFX_PLAYER_HIT_FIST_40, + SFX_PLAYER_HIT_FIST_41, + SFX_PLAYER_HIT_FIST_42, + SFX_PLAYER_ON_FIRE_1, + SFX_PLAYER_ON_FIRE_2, + SFX_PLAYER_ON_FIRE_3, + SFX_PLAYER_ON_FIRE_4, + SFX_PLAYER_ON_FIRE_5, + SFX_PLAYER_ON_FIRE_6, + SFX_PLAYER_ON_FIRE_7, + SFX_PLAYER_ON_FIRE_8, + SFX_PLAYER_ON_FIRE_9, + SFX_PLAYER_ON_FIRE_10, + SFX_PLAYER_ON_FIRE_11, + SFX_PLAYER_ON_FIRE_12, + SFX_PLAYER_ON_FIRE_13, + SFX_PLAYER_ON_FIRE_14, + SFX_PLAYER_ON_FIRE_15, + SFX_PLAYER_ON_FIRE_16, + TOTAL_AUDIO_SAMPLES, NO_SAMPLE, // shorthands diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp index ac30f757..ac4bebcb 100644 --- a/src/audio/AudioScriptObject.cpp +++ b/src/audio/AudioScriptObject.cpp @@ -3,6 +3,7 @@ #include "AudioScriptObject.h" #include "Pools.h" #include "DMAudio.h" +#include "SaveBuf.h" cAudioScriptObject::cAudioScriptObject() { @@ -23,25 +24,25 @@ cAudioScriptObject::Reset() } void * -cAudioScriptObject::operator new(size_t sz) +cAudioScriptObject::operator new(size_t sz) throw() { return CPools::GetAudioScriptObjectPool()->New(); } void * -cAudioScriptObject::operator new(size_t sz, int handle) +cAudioScriptObject::operator new(size_t sz, int handle) throw() { return CPools::GetAudioScriptObjectPool()->New(handle); } void -cAudioScriptObject::operator delete(void *p, size_t sz) +cAudioScriptObject::operator delete(void *p, size_t sz) throw() { CPools::GetAudioScriptObjectPool()->Delete((cAudioScriptObject *)p); } void -cAudioScriptObject::operator delete(void *p, int handle) +cAudioScriptObject::operator delete(void *p, int handle) throw() { CPools::GetAudioScriptObjectPool()->Delete((cAudioScriptObject *)p); } @@ -53,12 +54,14 @@ cAudioScriptObject::LoadAllAudioScriptObjects(uint8 *buf, uint32 size) CheckSaveHeader(buf, 'A', 'U', 'D', '\0', size - SAVE_HEADER_SIZE); - int32 pool_size = ReadSaveBuf<int32>(buf); + int32 pool_size; + ReadSaveBuf(&pool_size, buf); for (int32 i = 0; i < pool_size; i++) { - int handle = ReadSaveBuf<int32>(buf); + int32 handle; + ReadSaveBuf(&handle, buf); cAudioScriptObject *p = new(handle) cAudioScriptObject; assert(p != nil); - *p = ReadSaveBuf<cAudioScriptObject>(buf); + ReadSaveBuf(p, buf); p->AudioEntity = DMAudio.CreateLoopingScriptObject(p); } @@ -90,6 +93,8 @@ cAudioScriptObject::SaveAllAudioScriptObjects(uint8 *buf, uint32 *size) void PlayOneShotScriptObject(uint8 id, CVector const &pos) { + if (!DMAudio.IsAudioInitialised()) return; + cAudioScriptObject *audioScriptObject = new cAudioScriptObject(); audioScriptObject->Posn = pos; audioScriptObject->AudioId = id; diff --git a/src/audio/AudioScriptObject.h b/src/audio/AudioScriptObject.h index 8110b2bb..b9a7e61b 100644 --- a/src/audio/AudioScriptObject.h +++ b/src/audio/AudioScriptObject.h @@ -12,10 +12,10 @@ public: void Reset(); /// ok - static void* operator new(size_t); - static void* operator new(size_t, int); - static void operator delete(void*, size_t); - static void operator delete(void*, int); + static void* operator new(size_t) throw(); + static void* operator new(size_t, int) throw(); + static void operator delete(void*, size_t) throw(); + static void operator delete(void*, int) throw(); static void LoadAllAudioScriptObjects(uint8 *buf, uint32 size); static void SaveAllAudioScriptObjects(uint8 *buf, uint32 *size); diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp index 7c99e89f..bc77361f 100644 --- a/src/audio/DMAudio.cpp +++ b/src/audio/DMAudio.cpp @@ -39,7 +39,7 @@ cDMAudio::DestroyEntity(int32 audioEntity) } void -cDMAudio::SetEntityStatus(int32 audioEntity, uint8 status) +cDMAudio::SetEntityStatus(int32 audioEntity, bool8 status) { AudioManager.SetEntityStatus(audioEntity, status); } @@ -57,7 +57,7 @@ cDMAudio::DestroyAllGameCreatedEntities(void) } void -cDMAudio::SetMonoMode(uint8 mono) +cDMAudio::SetMonoMode(bool8 mono) { AudioManager.SetMonoMode(mono); } @@ -142,7 +142,7 @@ cDMAudio::SetSpeakerConfig(int32 config) AudioManager.SetSpeakerConfig(config); } -bool +bool8 cDMAudio::IsMP3RadioChannelAvailable(void) { return AudioManager.IsMP3RadioChannelAvailable(); @@ -161,12 +161,12 @@ cDMAudio::ReacquireDigitalHandle(void) } void -cDMAudio::SetDynamicAcousticModelingStatus(uint8 status) +cDMAudio::SetDynamicAcousticModelingStatus(bool8 status) { AudioManager.SetDynamicAcousticModelingStatus(status); } -bool +bool8 cDMAudio::CheckForAnAudioFileOnCD(void) { return AudioManager.CheckForAnAudioFileOnCD(); @@ -178,7 +178,7 @@ cDMAudio::GetCDAudioDriveLetter(void) return AudioManager.GetCDAudioDriveLetter(); } -bool +bool8 cDMAudio::IsAudioInitialised(void) { return AudioManager.IsAudioInitialised(); @@ -196,7 +196,7 @@ cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject) int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject); if ( AEHANDLE_IS_OK(audioEntity) ) - AudioManager.SetEntityStatus(audioEntity, true); + AudioManager.SetEntityStatus(audioEntity, TRUE); return audioEntity; } @@ -214,7 +214,7 @@ cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject) if ( AEHANDLE_IS_OK(audioEntity) ) { - AudioManager.SetEntityStatus(audioEntity, true); + AudioManager.SetEntityStatus(audioEntity, TRUE); AudioManager.PlayOneShot(audioEntity, scriptObject->AudioId, 0.0f); } } @@ -244,7 +244,7 @@ cDMAudio::PlayRadioAnnouncement(uint32 announcement) } void -cDMAudio::PlayFrontEndTrack(uint32 track, uint8 frontendFlag) +cDMAudio::PlayFrontEndTrack(uint32 track, bool8 frontendFlag) { MusicManager.PlayFrontEndTrack(track, frontendFlag); } @@ -309,7 +309,7 @@ cDMAudio::PlayLoadedMissionAudio(uint8 slot) AudioManager.PlayLoadedMissionAudio(slot); } -bool +bool8 cDMAudio::IsMissionAudioSampleFinished(uint8 slot) { return AudioManager.IsMissionAudioSampleFinished(slot); @@ -340,7 +340,7 @@ cDMAudio::SetRadioChannel(uint32 radio, int32 pos) } void -cDMAudio::SetStartingTrackPositions(uint8 isStartGame) +cDMAudio::SetStartingTrackPositions(bool8 isStartGame) { MusicManager.SetStartingTrackPositions(isStartGame); } @@ -364,7 +364,7 @@ cDMAudio::GetRadioPosition(uint32 station) } void -cDMAudio::SetPedTalkingStatus(CPed *ped, uint8 status) +cDMAudio::SetPedTalkingStatus(CPed *ped, bool8 status) { return AudioManager.SetPedTalkingStatus(ped, status); } @@ -376,7 +376,7 @@ cDMAudio::SetPlayersMood(uint8 mood, uint32 time) } void -cDMAudio::ShutUpPlayerTalking(uint8 state) +cDMAudio::ShutUpPlayerTalking(bool8 state) { AudioManager.m_bIsPlayerShutUp = state; }
\ No newline at end of file diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h index 2c10043f..5b684fd3 100644 --- a/src/audio/DMAudio.h +++ b/src/audio/DMAudio.h @@ -25,11 +25,11 @@ public: int32 CreateEntity(eAudioType type, void *UID); void DestroyEntity(int32 audioEntity); - void SetEntityStatus(int32 audioEntity, uint8 status); + void SetEntityStatus(int32 audioEntity, bool8 status); void PlayOneShot(int32 audioEntity, uint16 oneShot, float volume); void DestroyAllGameCreatedEntities(void); - void SetMonoMode(uint8 mono); + void SetMonoMode(bool8 mono); void SetMP3BoostVolume(uint8 volume); void SetEffectsMasterVolume(uint8 volume); void SetMusicMasterVolume(uint8 volume); @@ -46,17 +46,17 @@ public: void SetSpeakerConfig(int32 config); - bool IsMP3RadioChannelAvailable(void); + bool8 IsMP3RadioChannelAvailable(void); void ReleaseDigitalHandle(void); void ReacquireDigitalHandle(void); - void SetDynamicAcousticModelingStatus(uint8 status); + void SetDynamicAcousticModelingStatus(bool8 status); - bool CheckForAnAudioFileOnCD(void); + bool8 CheckForAnAudioFileOnCD(void); char GetCDAudioDriveLetter(void); - bool IsAudioInitialised(void); + bool8 IsAudioInitialised(void); void ReportCrime(eCrimeType crime, CVector const &pos); @@ -70,7 +70,7 @@ public: void PlayFrontEndSound(uint16 frontend, uint32 volume); void PlayRadioAnnouncement(uint32 announcement); - void PlayFrontEndTrack(uint32 track, uint8 frontendFlag); + void PlayFrontEndTrack(uint32 track, bool8 frontendFlag); void StopFrontEndTrack(void); void ResetTimers(uint32 time); @@ -85,19 +85,19 @@ public: uint8 GetMissionAudioLoadingStatus(uint8 slot); void SetMissionAudioLocation(uint8 slot, float x, float y, float z); void PlayLoadedMissionAudio(uint8 slot); - bool IsMissionAudioSampleFinished(uint8 slot); + bool8 IsMissionAudioSampleFinished(uint8 slot); void ClearMissionAudio(uint8 slot); uint8 GetRadioInCar(void); void SetRadioInCar(uint32 radio); void SetRadioChannel(uint32 radio, int32 pos); - void SetStartingTrackPositions(uint8 isStartGame); + void SetStartingTrackPositions(bool8 isStartGame); float *GetListenTimeArray(); uint32 GetFavouriteRadioStation(); int32 GetRadioPosition(uint32 station); - void SetPedTalkingStatus(class CPed *ped, uint8 status); + void SetPedTalkingStatus(class CPed *ped, bool8 status); void SetPlayersMood(uint8 mood, uint32 time); - void ShutUpPlayerTalking(uint8 state); + void ShutUpPlayerTalking(bool8 state); }; extern cDMAudio DMAudio; diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp index 9c6f61f6..e569f8c7 100644 --- a/src/audio/MusicManager.cpp +++ b/src/audio/MusicManager.cpp @@ -28,7 +28,7 @@ static_assert(false, "R*'s radio implementation is quite buggy, RADIO_SCROLL_TO_ cMusicManager MusicManager; int32 gNumRetunePresses; int32 gRetuneCounter; -bool g_bAnnouncementReadPosAlready; +bool8 g_bAnnouncementReadPosAlready; uint8 RadioStaticCounter = 5; uint32 RadioStaticTimer; @@ -50,13 +50,13 @@ uint32 NewGameRadioTimers[10] = cMusicManager::cMusicManager() { - m_bIsInitialised = false; - m_bDisabled = false; + m_bIsInitialised = FALSE; + m_bDisabled = FALSE; m_nFrontendTrack = NO_TRACK; m_nPlayingTrack = NO_TRACK; m_nUpcomingMusicMode = MUSICMODE_DISABLED; m_nMusicMode = MUSICMODE_DISABLED; - m_bSetNextStation = false; + m_bSetNextStation = FALSE; for (int i = 0; i < NUM_RADIOS; i++) aListenTimeArray[i] = 0.0f; @@ -66,7 +66,7 @@ cMusicManager::cMusicManager() m_nCurrentVolume = 0; m_nMaxVolume = 0; m_nAnnouncement = NO_TRACK; - m_bAnnouncementInProgress = false; + m_bAnnouncementInProgress = FALSE; } void @@ -74,38 +74,38 @@ cMusicManager::ResetMusicAfterReload() { float afRadioTime[NUM_RADIOS]; - m_bRadioSetByScript = false; + m_bRadioSetByScript = FALSE; m_nRadioStationScript = WILDSTYLE; m_nRadioPosition = -1; m_nAnnouncement = NO_TRACK; - m_bAnnouncementInProgress = false; - m_bSetNextStation = false; + m_bAnnouncementInProgress = FALSE; + m_bSetNextStation = FALSE; RadioStaticTimer = 0; gNumRetunePresses = 0; gRetuneCounter = 0; m_nFrontendTrack = NO_TRACK; m_nPlayingTrack = NO_TRACK; - m_FrontendLoopFlag = false; - m_bTrackChangeStarted = false; + m_FrontendLoopFlag = FALSE; + m_bTrackChangeStarted = FALSE; m_nNextTrack = NO_TRACK; - m_nNextLoopFlag = false; - m_bVerifyNextTrackStartedToPlay = false; - m_bGameplayAllowsRadio = false; - m_bRadioStreamReady = false; + m_nNextLoopFlag = FALSE; + m_bVerifyNextTrackStartedToPlay = FALSE; + m_bGameplayAllowsRadio = FALSE; + m_bRadioStreamReady = FALSE; nFramesSinceCutsceneEnded = -1; - m_bUserResumedGame = false; - m_bMusicModeChangeStarted = false; - m_bEarlyFrontendTrack = false; + m_bUserResumedGame = FALSE; + m_bMusicModeChangeStarted = FALSE; + m_bEarlyFrontendTrack = FALSE; m_nVolumeLatency = 0; m_nCurrentVolume = 0; m_nMaxVolume = 0; - bool bRadioWasEverListened = false; + bool8 bRadioWasEverListened = FALSE; for (int i = 0; i < NUM_RADIOS; i++) { afRadioTime[i] = CStats::GetFavoriteRadioStationList(i); if (!bRadioWasEverListened && afRadioTime[i] != 0.0f) - bRadioWasEverListened = true; + bRadioWasEverListened = TRUE; } if (!bRadioWasEverListened) return; @@ -125,7 +125,7 @@ cMusicManager::ResetMusicAfterReload() } void -cMusicManager::SetStartingTrackPositions(uint8 isNewGameTimer) +cMusicManager::SetStartingTrackPositions(bool8 isNewGameTimer) { int pos; @@ -174,15 +174,15 @@ cMusicManager::SetStartingTrackPositions(uint8 isNewGameTimer) } } -bool +bool8 cMusicManager::Initialise() { if (!IsInitialised()) { - m_bIsInitialised = true; - SetStartingTrackPositions(false); - m_bResetTimers = false; + m_bIsInitialised = TRUE; + SetStartingTrackPositions(FALSE); + m_bResetTimers = FALSE; m_nResetTime = 0; - m_bRadioSetByScript = false; + m_bRadioSetByScript = FALSE; m_nRadioStationScript = WILDSTYLE; m_nRadioPosition = -1; m_nRadioInCar = NO_TRACK; @@ -192,18 +192,18 @@ cMusicManager::Initialise() m_nPlayingTrack = NO_TRACK; m_nUpcomingMusicMode = MUSICMODE_DISABLED; m_nMusicMode = MUSICMODE_DISABLED; - m_FrontendLoopFlag = false; - m_bTrackChangeStarted = false; + m_FrontendLoopFlag = FALSE; + m_bTrackChangeStarted = FALSE; m_nNextTrack = NO_TRACK; - m_nNextLoopFlag = false; - m_bVerifyNextTrackStartedToPlay = false; - m_bGameplayAllowsRadio = false; - m_bRadioStreamReady = false; + m_nNextLoopFlag = FALSE; + m_bVerifyNextTrackStartedToPlay = FALSE; + m_bGameplayAllowsRadio = FALSE; + m_bRadioStreamReady = FALSE; nFramesSinceCutsceneEnded = -1; - m_bUserResumedGame = false; - m_bMusicModeChangeStarted = false; + m_bUserResumedGame = FALSE; + m_bMusicModeChangeStarted = FALSE; m_nMusicModeToBeSet = MUSICMODE_DISABLED; - m_bEarlyFrontendTrack = false; + m_bEarlyFrontendTrack = FALSE; m_nVolumeLatency = 0; m_nCurrentVolume = 0; m_nMaxVolume = 0; @@ -216,11 +216,11 @@ cMusicManager::Terminate() { if (!IsInitialised()) return; - if (SampleManager.IsStreamPlaying(0)) { - SampleManager.StopStreamedFile(0); + if (SampleManager.IsStreamPlaying()) { + SampleManager.StopStreamedFile(); m_nPlayingTrack = NO_TRACK; } - m_bIsInitialised = false; + m_bIsInitialised = FALSE; } void @@ -230,29 +230,29 @@ cMusicManager::SetRadioChannelByScript(uint32 station, int32 pos) if (station == STREAMED_SOUND_RADIO_MP3_PLAYER) station = STREAMED_SOUND_CITY_AMBIENT; if (station <= STREAMED_SOUND_RADIO_POLICE) { - m_bRadioSetByScript = true; + m_bRadioSetByScript = TRUE; m_nRadioStationScript = station; m_nRadioPosition = pos == -1 ? -1 : pos % m_aTracks[station].m_nLength; } } } -bool +bool8 cMusicManager::PlayerInCar() { CVehicle *vehicle = AudioManager.FindVehicleOfPlayer(); if(!vehicle) - return false; + return FALSE; int32 State = FindPlayerPed()->m_nPedState; if(State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED) - return false; + return FALSE; if (vehicle->GetStatus() == STATUS_WRECKED) - return false; + return FALSE; - return true; + return TRUE; } uint32 @@ -310,31 +310,42 @@ cMusicManager::ChangeMusicMode(uint8 mode) switch (mode) { - case MUSICMODE_FRONTEND: m_nUpcomingMusicMode = MUSICMODE_FRONTEND; break; + case MUSICMODE_FRONTEND: + m_nUpcomingMusicMode = MUSICMODE_FRONTEND; + +#ifdef PAUSE_RADIO_IN_FRONTEND + // rewind those streams we weren't listening right now + for( uint32 i = STREAMED_SOUND_RADIO_WILD; i < STREAMED_SOUND_CUTSCENE_ASS_1; i++ ) { + m_aTracks[i].m_nPosition = GetTrackStartPos(i); + m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); + } +#endif + + break; case MUSICMODE_GAME: m_nUpcomingMusicMode = MUSICMODE_GAME; break; case MUSICMODE_CUTSCENE: m_nUpcomingMusicMode = MUSICMODE_CUTSCENE; - if (SampleManager.IsStreamPlaying(0)) { + if (SampleManager.IsStreamPlaying()) { if (m_nPlayingTrack != NO_TRACK) { RecordRadioStats(); - m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0); + m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(); m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); } } - SampleManager.StopStreamedFile(0); - while (SampleManager.IsStreamPlaying(0)) - SampleManager.StopStreamedFile(0); + SampleManager.StopStreamedFile(); + while (SampleManager.IsStreamPlaying()) + SampleManager.StopStreamedFile(); m_nMusicMode = m_nUpcomingMusicMode; - m_bMusicModeChangeStarted = false; - m_bTrackChangeStarted = false; + m_bMusicModeChangeStarted = FALSE; + m_bTrackChangeStarted = FALSE; m_nNextTrack = NO_TRACK; - m_nNextLoopFlag = false; - m_bVerifyNextTrackStartedToPlay = false; + m_nNextLoopFlag = FALSE; + m_bVerifyNextTrackStartedToPlay = FALSE; m_nPlayingTrack = NO_TRACK; m_nFrontendTrack = NO_TRACK; - m_bAnnouncementInProgress = false; + m_bAnnouncementInProgress = FALSE; m_nAnnouncement = NO_TRACK; - g_bAnnouncementReadPosAlready = false; + g_bAnnouncementReadPosAlready = FALSE; break; case MUSICMODE_DISABLE: m_nUpcomingMusicMode = MUSICMODE_DISABLED; break; default: return; @@ -344,7 +355,7 @@ cMusicManager::ChangeMusicMode(uint8 mode) void cMusicManager::ResetTimers(int32 time) { - m_bResetTimers = true; + m_bResetTimers = TRUE; m_nResetTime = time; } @@ -352,11 +363,11 @@ void cMusicManager::Service() { if (m_bResetTimers) { - m_bResetTimers = false; + m_bResetTimers = FALSE; m_nLastTrackServiceTime = m_nResetTime; } - static bool bRadioStatsRecorded = false; + static bool8 bRadioStatsRecorded = FALSE; if (!m_bIsInitialised || m_bDisabled) return; @@ -369,39 +380,39 @@ cMusicManager::Service() { case MUSICMODE_FRONTEND: ServiceFrontEndMode(); break; case MUSICMODE_GAME: ServiceGameMode(); break; - case MUSICMODE_CUTSCENE: SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 0); break; + case MUSICMODE_CUTSCENE: SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE); break; } } else m_nMusicMode = MUSICMODE_DISABLED; } else { - m_bMusicModeChangeStarted = true; + m_bMusicModeChangeStarted = TRUE; if (!m_bUserResumedGame && !AudioManager.m_nUserPause && AudioManager.m_nPreviousUserPause) - m_bUserResumedGame = true; + m_bUserResumedGame = TRUE; if (AudioManager.m_FrameCounter % 4 == 0) { gNumRetunePresses = 0; gRetuneCounter = 0; - m_bSetNextStation = false; - if (SampleManager.IsStreamPlaying(0)) { + m_bSetNextStation = FALSE; + if (SampleManager.IsStreamPlaying()) { if (m_nPlayingTrack != NO_TRACK && !bRadioStatsRecorded) { RecordRadioStats(); - m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0); + m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(); m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); - bRadioStatsRecorded = true; + bRadioStatsRecorded = TRUE; } - SampleManager.StopStreamedFile(0); + SampleManager.StopStreamedFile(); } else { - bRadioStatsRecorded = false; + bRadioStatsRecorded = FALSE; m_nMusicMode = m_nMusicModeToBeSet; - m_bMusicModeChangeStarted = false; - m_bTrackChangeStarted = false; + m_bMusicModeChangeStarted = FALSE; + m_bTrackChangeStarted = FALSE; m_nNextTrack = NO_TRACK; - m_nNextLoopFlag = false; - m_bVerifyNextTrackStartedToPlay = false; + m_nNextLoopFlag = FALSE; + m_bVerifyNextTrackStartedToPlay = FALSE; m_nPlayingTrack = NO_TRACK; if (m_bEarlyFrontendTrack) - m_bEarlyFrontendTrack = false; + m_bEarlyFrontendTrack = FALSE; else m_nFrontendTrack = NO_TRACK; } @@ -412,15 +423,21 @@ cMusicManager::Service() void cMusicManager::ServiceFrontEndMode() { - static bool bRadioStatsRecorded = false; + static bool8 bRadioStatsRecorded = FALSE; + +#ifdef PAUSE_RADIO_IN_FRONTEND + // pause radio + for (uint32 i = STREAMED_SOUND_RADIO_WILD; i < STREAMED_SOUND_CUTSCENE_ASS_1; i++) + m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); +#endif if (m_bAnnouncementInProgress) { - SampleManager.StopStreamedFile(0); - if (SampleManager.IsStreamPlaying(0)) + SampleManager.StopStreamedFile(); + if (SampleManager.IsStreamPlaying()) return; - g_bAnnouncementReadPosAlready = false; + g_bAnnouncementReadPosAlready = FALSE; m_nAnnouncement = NO_TRACK; - m_bAnnouncementInProgress = false; + m_bAnnouncementInProgress = FALSE; m_nNextTrack = NO_TRACK; m_nFrontendTrack = NO_TRACK; m_nPlayingTrack = NO_TRACK; @@ -434,50 +451,50 @@ cMusicManager::ServiceFrontEndMode() } if (m_nNextTrack == m_nPlayingTrack) { - if (SampleManager.IsStreamPlaying(0)) { + if (SampleManager.IsStreamPlaying()) { if (m_nVolumeLatency > 0) m_nVolumeLatency--; else { if (m_nCurrentVolume < m_nMaxVolume) m_nCurrentVolume = Min(m_nMaxVolume, m_nCurrentVolume + 6); - SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE); } } else { if (m_nPlayingTrack == STREAMED_SOUND_RADIO_MP3_PLAYER) - SampleManager.StartStreamedFile(STREAMED_SOUND_RADIO_MP3_PLAYER, 0, 0); + SampleManager.StartStreamedFile(STREAMED_SOUND_RADIO_MP3_PLAYER, 0); else if (m_nPlayingTrack == STREAMED_SOUND_MISSION_COMPLETED && AudioManager.m_nUserPause == 0) ChangeMusicMode(MUSICMODE_GAME); } } else { - m_bTrackChangeStarted = true; - if (m_bVerifyNextTrackStartedToPlay || !SampleManager.IsStreamPlaying(0)) { - bRadioStatsRecorded = false; - if (SampleManager.IsStreamPlaying(0) || m_nNextTrack == NO_TRACK) { + m_bTrackChangeStarted = TRUE; + if (m_bVerifyNextTrackStartedToPlay || !SampleManager.IsStreamPlaying()) { + bRadioStatsRecorded = FALSE; + if (SampleManager.IsStreamPlaying() || m_nNextTrack == NO_TRACK) { m_nPlayingTrack = m_nNextTrack; - m_bVerifyNextTrackStartedToPlay = false; - m_bTrackChangeStarted = false; + m_bVerifyNextTrackStartedToPlay = FALSE; + m_bTrackChangeStarted = FALSE; } else { uint32 trackStartPos = (m_nNextTrack > STREAMED_SOUND_RADIO_POLICE) ? 0 : GetTrackStartPos(m_nNextTrack); if (m_nNextTrack != NO_TRACK) { - SampleManager.SetStreamedFileLoopFlag(m_nNextLoopFlag, 0); - SampleManager.StartStreamedFile(m_nNextTrack, trackStartPos, 0); + SampleManager.SetStreamedFileLoopFlag(m_nNextLoopFlag); + SampleManager.StartStreamedFile(m_nNextTrack, trackStartPos); m_nVolumeLatency = 3; m_nCurrentVolume = 0; m_nMaxVolume = 100; - SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE); if (m_nNextTrack < STREAMED_SOUND_CITY_AMBIENT) m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode(); - m_bVerifyNextTrackStartedToPlay = true; + m_bVerifyNextTrackStartedToPlay = TRUE; } } } else { if (m_nPlayingTrack != NO_TRACK && !bRadioStatsRecorded) { - m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0); + m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(); m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); RecordRadioStats(); - bRadioStatsRecorded = true; + bRadioStatsRecorded = TRUE; } - SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0); - SampleManager.StopStreamedFile(0); + SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE); + SampleManager.StopStreamedFile(); } } } @@ -488,7 +505,7 @@ cMusicManager::ServiceGameMode() CPed *ped = FindPlayerPed(); CVehicle *vehicle = AudioManager.FindVehicleOfPlayer(); m_bRadioStreamReady = m_bGameplayAllowsRadio; - m_bGameplayAllowsRadio = false; + m_bGameplayAllowsRadio = FALSE; switch (CGame::currArea) { @@ -499,14 +516,14 @@ cMusicManager::ServiceGameMode() case AREA_BLOOD: case AREA_OVALRING: case AREA_MALIBU_CLUB: - m_bGameplayAllowsRadio = false; + m_bGameplayAllowsRadio = FALSE; break; default: if (SampleManager.GetMusicVolume()) { if (PlayerInCar()) - m_bGameplayAllowsRadio = true; + m_bGameplayAllowsRadio = TRUE; } else - m_bGameplayAllowsRadio = false; + m_bGameplayAllowsRadio = FALSE; break; } @@ -514,7 +531,7 @@ cMusicManager::ServiceGameMode() nFramesSinceCutsceneEnded = -1; gNumRetunePresses = 0; gRetuneCounter = 0; - m_bSetNextStation = false; + m_bSetNextStation = FALSE; } else if (ped) { if(!ped->DyingOrDead() && vehicle) { #ifdef GTA_PC @@ -567,11 +584,11 @@ cMusicManager::ServiceGameMode() if (m_bUserResumedGame) { - m_bRadioStreamReady = false; - m_bUserResumedGame = false; + m_bRadioStreamReady = FALSE; + m_bUserResumedGame = FALSE; } if (m_nPlayingTrack == NO_TRACK && m_nFrontendTrack == NO_TRACK) - m_bRadioStreamReady = false; + m_bRadioStreamReady = FALSE; if (m_bGameplayAllowsRadio) { @@ -594,7 +611,7 @@ cMusicManager::ServiceGameMode() m_aTracks[m_nFrontendTrack].m_nPosition = m_nRadioPosition; m_aTracks[m_nFrontendTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); } - m_bRadioSetByScript = false; + m_bRadioSetByScript = FALSE; return; } @@ -605,7 +622,7 @@ cMusicManager::ServiceGameMode() if (m_nAnnouncement < NO_TRACK) { if ((m_bAnnouncementInProgress || m_nFrontendTrack == m_nPlayingTrack) && ServiceAnnouncement()) { if (m_bAnnouncementInProgress) { - m_bSetNextStation = false; + m_bSetNextStation = FALSE; gNumRetunePresses = 0; gRetuneCounter = 0; return; @@ -613,7 +630,7 @@ cMusicManager::ServiceGameMode() if(m_nAnnouncement == NO_TRACK) { m_nNextTrack = NO_TRACK; m_nFrontendTrack = GetCarTuning(); - m_bSetNextStation = false; + m_bSetNextStation = FALSE; gRetuneCounter = 0; gNumRetunePresses = 0; } @@ -622,9 +639,9 @@ cMusicManager::ServiceGameMode() if (!m_bAnnouncementInProgress && m_nAnnouncement == NO_TRACK && m_nPlayingTrack == STREAMED_SOUND_RADIO_MP3_PLAYER - && !SampleManager.IsStreamPlaying(0)) + && !SampleManager.IsStreamPlaying()) { - SampleManager.StartStreamedFile(STREAMED_SOUND_RADIO_MP3_PLAYER, 0, 0); + SampleManager.StartStreamedFile(STREAMED_SOUND_RADIO_MP3_PLAYER, 0); } if (!m_bRadioSetByScript) @@ -635,7 +652,7 @@ cMusicManager::ServiceGameMode() if(gRetuneCounter > 1) gRetuneCounter--; else if(gRetuneCounter == 1) { - m_bSetNextStation = true; + m_bSetNextStation = TRUE; gRetuneCounter = 0; } } @@ -644,7 +661,7 @@ cMusicManager::ServiceGameMode() { if (--gRetuneCounter == 0) { - m_bSetNextStation = true; + m_bSetNextStation = TRUE; gRetuneCounter = 0; } } @@ -694,7 +711,7 @@ cMusicManager::ServiceGameMode() SetUpCorrectAmbienceTrack(); ServiceTrack(vehicle, ped); if (m_bSetNextStation) - m_bSetNextStation = false; + m_bSetNextStation = FALSE; return; } if (UsesPoliceRadio(vehicle)) @@ -713,24 +730,24 @@ cMusicManager::ServiceGameMode() gRetuneCounter = 0; gNumRetunePresses = 0; - m_bSetNextStation = false; - m_bRadioSetByScript = false; + m_bSetNextStation = FALSE; + m_bRadioSetByScript = FALSE; if (m_nFrontendTrack >= STREAMED_SOUND_CITY_AMBIENT && m_nFrontendTrack <= STREAMED_SOUND_AMBSIL_AMBIENT) SetUpCorrectAmbienceTrack(); ServiceTrack(vehicle, ped); if (m_bSetNextStation) - m_bSetNextStation = false; + m_bSetNextStation = FALSE; return; } if (m_bAnnouncementInProgress) { - SampleManager.StopStreamedFile(0); - if (SampleManager.IsStreamPlaying(0)) + SampleManager.StopStreamedFile(); + if (SampleManager.IsStreamPlaying()) return; - g_bAnnouncementReadPosAlready = false; + g_bAnnouncementReadPosAlready = FALSE; m_nAnnouncement = NO_TRACK; - m_bAnnouncementInProgress = false; + m_bAnnouncementInProgress = FALSE; m_nNextTrack = NO_TRACK; m_nFrontendTrack = NO_TRACK; m_nPlayingTrack = NO_TRACK; @@ -808,7 +825,7 @@ GetHeightScale() } void -cMusicManager::ComputeAmbienceVol(uint8 reset, uint8& outVolume) +cMusicManager::ComputeAmbienceVol(bool8 reset, uint8& outVolume) { static float fVol = 0.0f; @@ -868,77 +885,77 @@ cMusicManager::ComputeAmbienceVol(uint8 reset, uint8& outVolume) outVolume = (90.0f - fHeightScale) / 50.0f * fVol; } -bool +bool8 cMusicManager::ServiceAnnouncement() { if (m_bAnnouncementInProgress) { - if (SampleManager.IsStreamPlaying(0)) + if (SampleManager.IsStreamPlaying()) m_nPlayingTrack = m_nNextTrack; else if (m_nPlayingTrack != NO_TRACK) { m_nAnnouncement = NO_TRACK; - m_bAnnouncementInProgress = false; + m_bAnnouncementInProgress = FALSE; m_nPlayingTrack = NO_TRACK; } - return true; - } else if (SampleManager.IsStreamPlaying(0)) { + return TRUE; + } else if (SampleManager.IsStreamPlaying()) { if (m_nPlayingTrack != NO_TRACK && !g_bAnnouncementReadPosAlready) { RecordRadioStats(); - m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0); - g_bAnnouncementReadPosAlready = true; + m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(); + g_bAnnouncementReadPosAlready = TRUE; m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); } - SampleManager.StopStreamedFile(0); + SampleManager.StopStreamedFile(); } else { - g_bAnnouncementReadPosAlready = false; + g_bAnnouncementReadPosAlready = FALSE; m_nPlayingTrack = NO_TRACK; m_nNextTrack = m_nAnnouncement; - SampleManager.SetStreamedFileLoopFlag(0, 0); - SampleManager.StartStreamedFile(m_nNextTrack, 0, 0); - SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 0, 0); - m_bAnnouncementInProgress = true; + SampleManager.SetStreamedFileLoopFlag(FALSE); + SampleManager.StartStreamedFile(m_nNextTrack, 0); + SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, FALSE); + m_bAnnouncementInProgress = TRUE; } - return true; + return TRUE; } void cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) { - static bool bRadioStatsRecorded = false; - static bool bRadioStatsRecorded2 = false; + static bool8 bRadioStatsRecorded = FALSE; + static bool8 bRadioStatsRecorded2 = FALSE; uint8 volume; if (!m_bTrackChangeStarted) m_nNextTrack = m_nFrontendTrack; if (gRetuneCounter != 0 || m_bSetNextStation) { - if (SampleManager.IsStreamPlaying(0)) { + if (SampleManager.IsStreamPlaying()) { if (m_nPlayingTrack != NO_TRACK && !bRadioStatsRecorded) { - m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0); + m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(); m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); RecordRadioStats(); - bRadioStatsRecorded = true; + bRadioStatsRecorded = TRUE; } - SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0); - SampleManager.StopStreamedFile(0); + SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE); + SampleManager.StopStreamedFile(); } return; } if (bRadioStatsRecorded) { - bRadioStatsRecorded = false; + bRadioStatsRecorded = FALSE; m_nPlayingTrack = NO_TRACK; } if (m_nNextTrack != m_nPlayingTrack) { - m_bTrackChangeStarted = true; - SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0); + m_bTrackChangeStarted = TRUE; + SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE); if (!(AudioManager.m_FrameCounter & 1)) { - if (m_bVerifyNextTrackStartedToPlay || !SampleManager.IsStreamPlaying(0)) { - bRadioStatsRecorded2 = false; - if (SampleManager.IsStreamPlaying(0)) { + if (m_bVerifyNextTrackStartedToPlay || !SampleManager.IsStreamPlaying()) { + bRadioStatsRecorded2 = FALSE; + if (SampleManager.IsStreamPlaying()) { m_nPlayingTrack = m_nNextTrack; - m_bVerifyNextTrackStartedToPlay = false; - m_bTrackChangeStarted = false; + m_bVerifyNextTrackStartedToPlay = FALSE; + m_bTrackChangeStarted = FALSE; if (veh) { #ifdef FIX_BUGS if (m_nPlayingTrack >= STREAMED_SOUND_CITY_AMBIENT && m_nPlayingTrack <= STREAMED_SOUND_AMBSIL_AMBIENT) @@ -955,23 +972,23 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) } else { uint32 pos = GetTrackStartPos(m_nNextTrack); if (m_nNextTrack != NO_TRACK) { - SampleManager.SetStreamedFileLoopFlag(1, 0); - SampleManager.StartStreamedFile(m_nNextTrack, pos, 0); + SampleManager.SetStreamedFileLoopFlag(TRUE); + SampleManager.StartStreamedFile(m_nNextTrack, pos); if (m_nFrontendTrack < STREAMED_SOUND_CITY_AMBIENT || m_nFrontendTrack > STREAMED_SOUND_AMBSIL_AMBIENT) { m_nVolumeLatency = 10; m_nCurrentVolume = 0; m_nMaxVolume = 100; - SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE); } else { - ComputeAmbienceVol(true, volume); - SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0); + ComputeAmbienceVol(TRUE, volume); + SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE); } if (m_nNextTrack < STREAMED_SOUND_CITY_AMBIENT) m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode(); - m_bVerifyNextTrackStartedToPlay = true; + m_bVerifyNextTrackStartedToPlay = TRUE; } } } else { @@ -979,9 +996,9 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) debug("m_nPlayingTrack == NO_TRACK, yet track playing - tidying up\n"); else if (!bRadioStatsRecorded2) { - m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0); + m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(); m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); - bRadioStatsRecorded2 = true; + bRadioStatsRecorded2 = TRUE; RecordRadioStats(); if (m_nPlayingTrack >= STREAMED_SOUND_HAVANA_CITY_AMBIENT && m_nPlayingTrack <= STREAMED_SOUND_HAVANA_BEACH_AMBIENT) { @@ -989,8 +1006,8 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_HURRICANE, 0.0); } } - SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0); - SampleManager.StopStreamedFile(0); + SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE); + SampleManager.StopStreamedFile(); } } return; @@ -998,8 +1015,8 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) if (m_nPlayingTrack >= STREAMED_SOUND_CITY_AMBIENT && m_nPlayingTrack <= STREAMED_SOUND_AMBSIL_AMBIENT) { - ComputeAmbienceVol(false, volume); - SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0); + ComputeAmbienceVol(FALSE, volume); + SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE); return; } if (CTimer::GetIsSlowMotionActive()) @@ -1009,7 +1026,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) float DistToTargetSq = (TheCamera.pTargetEntity->GetPosition() - TheCamera.GetPosition()).MagnitudeSqr(); if (DistToTargetSq >= SQR(55.0f)) { - SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE); } else if (DistToTargetSq >= SQR(10.0f)) { @@ -1026,17 +1043,17 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) } if (gRetuneCounter != 0) volume = 0; - SampleManager.SetStreamedVolumeAndPan(volume, pan, 0, 0); + SampleManager.SetStreamedVolumeAndPan(volume, pan, FALSE); } else if (AudioManager.ShouldDuckMissionAudio(0) || AudioManager.ShouldDuckMissionAudio(1)) - SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE); else if (gRetuneCounter != 0) - SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE); else - SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE); } } else if (AudioManager.ShouldDuckMissionAudio(0) || AudioManager.ShouldDuckMissionAudio(1)) { - SampleManager.SetStreamedVolumeAndPan(Min(m_nCurrentVolume, 25), 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(Min(m_nCurrentVolume, 25), 63, FALSE); nFramesSinceCutsceneEnded = 0; } else { if (nFramesSinceCutsceneEnded == -1) @@ -1058,7 +1075,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped) } if (gRetuneCounter != 0) volume = 0; - SampleManager.SetStreamedVolumeAndPan(volume, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan(volume, 63, FALSE); } if (m_nVolumeLatency > 0) m_nVolumeLatency--; @@ -1071,10 +1088,10 @@ cMusicManager::PreloadCutSceneMusic(uint32 track) { if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS && m_nMusicMode == MUSICMODE_CUTSCENE) { AudioManager.ResetPoliceRadio(); - while (SampleManager.IsStreamPlaying(0)) - SampleManager.StopStreamedFile(0); - SampleManager.PreloadStreamedFile(track, 0); - SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 0); + while (SampleManager.IsStreamPlaying()) + SampleManager.StopStreamedFile(); + SampleManager.PreloadStreamedFile(track); + SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE); m_nPlayingTrack = track; } } @@ -1083,27 +1100,27 @@ void cMusicManager::PlayPreloadedCutSceneMusic(void) { if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_CUTSCENE) - SampleManager.StartPreloadedStreamedFile(0); + SampleManager.StartPreloadedStreamedFile(); } void cMusicManager::StopCutSceneMusic(void) { if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_CUTSCENE) { - SampleManager.StopStreamedFile(0); + SampleManager.StopStreamedFile(); m_nPlayingTrack = NO_TRACK; } } void -cMusicManager::PlayFrontEndTrack(uint32 track, uint8 loopFlag) +cMusicManager::PlayFrontEndTrack(uint32 track, bool8 loopFlag) { if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS && (m_nUpcomingMusicMode == MUSICMODE_FRONTEND || m_nMusicMode == MUSICMODE_FRONTEND)) { m_nFrontendTrack = track; m_FrontendLoopFlag = loopFlag; if (m_nMusicMode != MUSICMODE_FRONTEND) - m_bEarlyFrontendTrack = true; + m_bEarlyFrontendTrack = TRUE; } } @@ -1201,7 +1218,7 @@ cMusicManager::GetFavouriteRadioStation() return favstation; } -bool +bool8 cMusicManager::CheckForMusicInterruptions() { return (m_nPlayingTrack == STREAMED_SOUND_MISSION_COMPLETED) || (m_nPlayingTrack == STREAMED_SOUND_CUTSCENE_FINALE); @@ -1265,7 +1282,8 @@ cMusicManager::DisplayRadioStationName() if (vehicle) { -#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS // Because m_nFrontendTrack can have NO_TRACK + // Prev scroll needs it to be signed, and m_nFrontendTrack can be NO_TRACK thus FIX_BUGS +#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS int track; #else uint8 track; @@ -1281,13 +1299,16 @@ cMusicManager::DisplayRadioStationName() #endif while (track >= NUM_RADIOS + 1) track -= NUM_RADIOS + 1; - // We already handle this condition while scrolling back, on key press. No need to change this. + // On scrolling back we handle this condition on key press. No need to change this. if (!DMAudio.IsMP3RadioChannelAvailable() && track == USERTRACK) gNumRetunePresses++; } else +#ifdef RADIO_OFF_TEXT + track = GetCarTuning(); // gStreamedSound or veh->m_nRadioStation would also work, but these don't cover police/taxi radios +#else track = m_nFrontendTrack; - +#endif wchar* string = nil; switch (track) { case WILDSTYLE: string = TheText.Get("FEA_FM0"); break; @@ -1304,10 +1325,11 @@ cMusicManager::DisplayRadioStationName() return; string = TheText.Get("FEA_MP3"); break; #ifdef RADIO_OFF_TEXT - case STREAMED_SOUND_RADIO_POLICE: - case STREAMED_SOUND_RADIO_TAXI: - return; - default: { + case RADIO_OFF: { + // Otherwise RADIO OFF will be seen after pausing-resuming game and Mission Complete text + if (!m_bRadioStreamReady || !m_bGameplayAllowsRadio) + return; + extern wchar WideErrorString[]; string = TheText.Get("FEA_NON"); @@ -1317,9 +1339,8 @@ cMusicManager::DisplayRadioStationName() } break; } -#else - default: return; #endif + default: return; }; if (pCurrentStation != string) { @@ -1328,7 +1349,11 @@ cMusicManager::DisplayRadioStationName() } else { if (cDisplay == 0) return; +#ifdef FIX_BUGS + cDisplay -= CTimer::GetLogicalFramesPassed(); +#else cDisplay--; +#endif } CFont::SetJustifyOff(); @@ -1357,7 +1382,7 @@ cMusicManager::DisplayRadioStationName() #endif } -bool +bool8 cMusicManager::UsesPoliceRadio(CVehicle *veh) { switch (veh->GetModelIndex()) @@ -1367,18 +1392,18 @@ cMusicManager::UsesPoliceRadio(CVehicle *veh) case MI_COASTG: case MI_RHINO: case MI_BARRACKS: - return true; + return TRUE; case MI_MRWHOOP: case MI_HUNTER: - return false; + return FALSE; } return veh->UsesSiren(); } -bool +bool8 cMusicManager::UsesTaxiRadio(CVehicle *veh) { - if (veh->GetModelIndex() != MI_KAUFMAN) return false; + if (veh->GetModelIndex() != MI_KAUFMAN) return FALSE; return CTheScripts::bPlayerHasMetDebbieHarry; } @@ -1387,10 +1412,10 @@ cMusicManager::ServiceAmbience() { } -bool +bool8 cMusicManager::ChangeRadioChannel() { - return true; + return TRUE; } // these two are empty diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h index 27456d79..3d2b7cee 100644 --- a/src/audio/MusicManager.h +++ b/src/audio/MusicManager.h @@ -16,18 +16,18 @@ class CPed; class cMusicManager { public: - bool m_bIsInitialised; - bool m_bDisabled; - bool m_bSetNextStation; + bool8 m_bIsInitialised; + bool8 m_bDisabled; + bool8 m_bSetNextStation; uint8 m_nVolumeLatency; uint8 m_nCurrentVolume; uint8 m_nMaxVolume; uint32 m_nAnnouncement; - bool m_bAnnouncementInProgress; + bool8 m_bAnnouncementInProgress; tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS]; - bool m_bResetTimers; + bool8 m_bResetTimers; uint32 m_nResetTime; - bool m_bRadioSetByScript; + bool8 m_bRadioSetByScript; uint8 m_nRadioStationScript; int32 m_nRadioPosition; uint32 m_nRadioInCar; @@ -35,40 +35,40 @@ public: uint32 m_nPlayingTrack; uint8 m_nUpcomingMusicMode; uint8 m_nMusicMode; - bool m_FrontendLoopFlag; - bool m_bTrackChangeStarted; + bool8 m_FrontendLoopFlag; + bool8 m_bTrackChangeStarted; uint32 m_nNextTrack; - bool m_nNextLoopFlag; - bool m_bVerifyNextTrackStartedToPlay; - bool m_bGameplayAllowsRadio; - bool m_bRadioStreamReady; + bool8 m_nNextLoopFlag; + bool8 m_bVerifyNextTrackStartedToPlay; + bool8 m_bGameplayAllowsRadio; + bool8 m_bRadioStreamReady; int8 nFramesSinceCutsceneEnded; - bool m_bUserResumedGame; - bool m_bMusicModeChangeStarted; + bool8 m_bUserResumedGame; + bool8 m_bMusicModeChangeStarted; uint8 m_nMusicModeToBeSet; - bool m_bEarlyFrontendTrack; + bool8 m_bEarlyFrontendTrack; float aListenTimeArray[NUM_RADIOS]; float m_nLastTrackServiceTime; public: cMusicManager(); - bool IsInitialised() { return m_bIsInitialised; } + bool8 IsInitialised() { return m_bIsInitialised; } uint8 GetMusicMode() { return m_nMusicMode; } uint32 GetCurrentTrack() { return m_nPlayingTrack; } void ResetMusicAfterReload(); - void SetStartingTrackPositions(uint8 isNewGameTimer); - bool Initialise(); + void SetStartingTrackPositions(bool8 isNewGameTimer); + bool8 Initialise(); void Terminate(); void ChangeMusicMode(uint8 mode); void StopFrontEndTrack(); - bool PlayerInCar(); + bool8 PlayerInCar(); void DisplayRadioStationName(); void PlayAnnouncement(uint32); - void PlayFrontEndTrack(uint32, uint8); + void PlayFrontEndTrack(uint32, bool8); void PreloadCutSceneMusic(uint32); void PlayPreloadedCutSceneMusic(void); void StopCutSceneMusic(void); @@ -83,16 +83,16 @@ public: void ServiceAmbience(); void ServiceTrack(CVehicle *veh, CPed *ped); - bool UsesPoliceRadio(CVehicle *veh); - bool UsesTaxiRadio(CVehicle *veh); + bool8 UsesPoliceRadio(CVehicle *veh); + bool8 UsesTaxiRadio(CVehicle *veh); uint32 GetTrackStartPos(uint32 track); - void ComputeAmbienceVol(uint8 reset, uint8& outVolume); - bool ServiceAnnouncement(); + void ComputeAmbienceVol(bool8 reset, uint8& outVolume); + bool8 ServiceAnnouncement(); uint32 GetCarTuning(); uint32 GetNextCarTuning(); - bool ChangeRadioChannel(); + bool8 ChangeRadioChannel(); void RecordRadioStats(); void SetUpCorrectAmbienceTrack(); float *GetListenTimeArray(); @@ -100,7 +100,7 @@ public: uint32 GetFavouriteRadioStation(); void SetMalibuClubTrackPos(uint8 pos); void SetStripClubTrackPos(uint8 pos); - bool CheckForMusicInterruptions(); + bool8 CheckForMusicInterruptions(); void Enable(); void Disable(); @@ -109,5 +109,5 @@ public: VALIDATE_SIZE(cMusicManager, 0x95C); extern cMusicManager MusicManager; -extern bool g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h +extern bool8 g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h float GetHeightScale(); diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PolRadio.cpp index 227d27d0..ce0e9a6d 100644 --- a/src/audio/PoliceRadio.cpp +++ b/src/audio/PolRadio.cpp @@ -7,7 +7,7 @@ #include "AudioSamples.h" #include "MusicManager.h" #include "PlayerPed.h" -#include "PoliceRadio.h" +#include "PolRadio.h" #include "Replay.h" #include "Vehicle.h" #include "World.h" @@ -15,9 +15,6 @@ #include "sampman.h" #include "Wanted.h" -const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples); -const int policeChannel = channels + 1; - struct tPoliceRadioZone { char m_aName[8]; uint32 m_nSampleIndex; @@ -48,8 +45,8 @@ cAudioManager::InitialisePoliceRadioZones() 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_STRAFISH_ISLAND); - SETZONESFX(8, "DOCKS", SFX_POLICE_RADIO_VICE_PORT); + 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); @@ -68,8 +65,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(CHANNEL_POLICE_RADIO, FALSE); + gSpecialSuspectLastSeenReport = FALSE; for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++) gMinTimeToNextReport[i] = m_FrameCounter; } @@ -78,7 +75,7 @@ void cAudioManager::ResetPoliceRadio() { if (!m_bIsInitialised) return; - if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel); + if (SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) SampleManager.StopChannel(CHANNEL_POLICE_RADIO); InitialisePoliceRadio(); } @@ -105,19 +102,18 @@ 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; m_sQueueSample.m_nLoopCount = 0; 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; + SET_LOOP_OFFSETS(SFX_POLICE_RADIO_CRACKLE) + 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(); } @@ -130,7 +126,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; @@ -141,7 +137,11 @@ cAudioManager::ServicePoliceRadio() if (!crimeReport) { if (wantedLevel != 0) { if (nLastSeen != 0) +#ifdef FIX_BUGS + nLastSeen -= CTimer::GetLogicalFramesPassed(); +#else --nLastSeen; +#endif else { nLastSeen = m_anRandomTable[1] % 1000 + 2000; SetupSuspectLastSeenReport(); @@ -156,31 +156,35 @@ 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 = 22050; if (!m_bIsInitialised) return; if (m_nUserPause != 0) { - if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel); + if (SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) SampleManager.StopChannel(CHANNEL_POLICE_RADIO); if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == 1 && SampleManager.IsStreamPlaying(1)) { - SampleManager.PauseStream(1, 1); + SampleManager.PauseStream(TRUE, 1); } } else { if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE && 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) { +#ifdef FIX_BUGS + cWait -= CTimer::GetLogicalFramesPassed(); +#else --cWait; +#endif return; } if (g_nMissionAudioSfx != NO_SAMPLE && !bChannelOpen) { @@ -200,9 +204,9 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) } return; } - } else if (!SampleManager.GetChannelUsedFlag(policeChannel)) { + } else if (!SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) { 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; @@ -211,7 +215,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) } if (bChannelOpen) DoPoliceRadioCrackle(); if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != 1) && - !SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) { + !SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO) && m_sPoliceRadioQueue.policeChannelTimer) { if (m_sPoliceRadioQueue.policeChannelTimer) { sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds]; m_sPoliceRadioQueue.policeChannelTimer--; @@ -223,35 +227,35 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) if (gSpecialSuspectLastSeenReport) { gSpecialSuspectLastSeenReport = 0; } else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) { - bChannelOpen = false; - processed = true; + bChannelOpen = FALSE; + processed = TRUE; } } if (sample == NO_SAMPLE) { if (!processed) cWait = 30; } else { - SampleManager.InitialiseChannel(policeChannel, sample, 0); + SampleManager.InitialiseChannel(CHANNEL_POLICE_RADIO, sample, SFX_BANK_0); switch (sample) { case SFX_POLICE_RADIO_MESSAGE_NOISE_1: freq = m_anRandomTable[4] % 2000 + 10025; - bChannelOpen = bChannelOpen == false; + bChannelOpen = bChannelOpen == FALSE; break; default: freq = SampleManager.GetSampleBaseFrequency(sample); break; } PoliceChannelFreq = freq; - SampleManager.SetChannelFrequency(policeChannel, freq); - SampleManager.SetChannelVolume(policeChannel, 100); - SampleManager.SetChannelPan(policeChannel, 63); - SampleManager.SetChannelLoopCount(policeChannel, 1); - SampleManager.SetChannelLoopPoints(policeChannel, 0, -1); - SampleManager.StartChannel(policeChannel); + SampleManager.SetChannelFrequency(CHANNEL_POLICE_RADIO, freq); + SampleManager.SetChannelVolume(CHANNEL_POLICE_RADIO, 100); + SampleManager.SetChannelPan(CHANNEL_POLICE_RADIO, 63); + SampleManager.SetChannelLoopCount(CHANNEL_POLICE_RADIO, 1); + SampleManager.SetChannelLoopPoints(CHANNEL_POLICE_RADIO, 0, -1); + SampleManager.StartChannel(CHANNEL_POLICE_RADIO); } if (processed) ResetPoliceRadio(); } } } -bool +bool8 cAudioManager::SetupCrimeReport() { int16 audioZoneId; @@ -264,13 +268,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++) { @@ -278,7 +282,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); @@ -317,10 +321,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) @@ -339,7 +343,7 @@ cAudioManager::SetupCrimeReport() } m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE; AgeCrimes(); - return true; + return TRUE; } void @@ -479,7 +483,7 @@ cAudioManager::SetupSuspectLastSeenReport() case MI_SABRETUR: case MI_VIRGO: case MI_BLISTAC: - sample = SFX_POLICE_RADIO_2_DOOR; + sample = SFX_POLICE_RADIO_TUDOOR; break; case MI_STINGER: case MI_INFERNUS: @@ -688,7 +692,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; @@ -713,10 +717,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) @@ -728,7 +732,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z) m_sPoliceRadioQueue.Add(sample); m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1); m_sPoliceRadioQueue.Add(NO_SAMPLE); - gSpecialSuspectLastSeenReport = true; + gSpecialSuspectLastSeenReport = TRUE; break; } } diff --git a/src/audio/PoliceRadio.h b/src/audio/PolRadio.h index d7c928e2..d7c928e2 100644 --- a/src/audio/PoliceRadio.h +++ b/src/audio/PolRadio.h diff --git a/src/audio/audio_enums.h b/src/audio/audio_enums.h index 990b2d73..5a14d312 100644 --- a/src/audio/audio_enums.h +++ b/src/audio/audio_enums.h @@ -1295,3 +1295,26 @@ enum eAudioType AUDIOTYPE_POLICERADIO, TOTAL_AUDIO_TYPES, }; + +#ifdef GTA_PS2 +enum +{ + NUM_CHANNELS_GENERIC = 42, + CHANNEL_POLICE_RADIO = NUM_CHANNELS_GENERIC, + CHANNEL_MISSION_AUDIO_1, + CHANNEL_MISSION_AUDIO_2, + CHANNEL_PLAYER_VEHICLE_ENGINE, + NUM_CHANNELS +}; +#else +enum +{ +#ifdef PS2_AUDIO_CHANNELS + NUM_CHANNELS_GENERIC = 42, +#else + NUM_CHANNELS_GENERIC = 27, +#endif + CHANNEL_POLICE_RADIO, + NUM_CHANNELS +}; +#endif diff --git a/src/audio/oal/aldlist.cpp b/src/audio/oal/aldlist.cpp index 881418c1..6024adf2 100644 --- a/src/audio/oal/aldlist.cpp +++ b/src/audio/oal/aldlist.cpp @@ -24,12 +24,6 @@ #include "aldlist.h" -#ifndef _WIN32 -#define _stricmp strcasecmp -#define _strnicmp strncasecmp -#define _strdup strdup -#endif - #ifdef AUDIO_OAL /* * Init call @@ -47,8 +41,8 @@ ALDeviceList::ALDeviceList() defaultDeviceIndex = 0; if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT")) { - devices = (char *)alcGetString(NULL, ALC_DEVICE_SPECIFIER); - defaultDeviceName = (char *)alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); + devices = (char *)alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER); + defaultDeviceName = (char *)alcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER); index = 0; // go through device list (each device terminated with a single NULL, list terminated with double NULL) @@ -62,17 +56,11 @@ ALDeviceList::ALDeviceList() if (context) { alcMakeContextCurrent(context); // if new actual device name isn't already in the list, then add it... - actualDeviceName = alcGetString(device, ALC_DEVICE_SPECIFIER); - bool bNewName = true; - for (unsigned int i = 0; i < GetNumDevices(); i++) { - if (strcmp(GetDeviceName(i), actualDeviceName) == 0) { - bNewName = false; - } - } - if ((bNewName) && (actualDeviceName != NULL) && (strlen(actualDeviceName) > 0)) { - ALDEVICEINFO ALDeviceInfo; + actualDeviceName = alcGetString(device, ALC_ALL_DEVICES_SPECIFIER); + if ((actualDeviceName != NULL) && (strlen(actualDeviceName) > 0)) { + ALDEVICEINFO &ALDeviceInfo = aDeviceInfo[nNumOfDevices++]; ALDeviceInfo.bSelected = true; - ALDeviceInfo.strDeviceName = _strdup(actualDeviceName); + ALDeviceInfo.SetName(actualDeviceName); alcGetIntegerv(device, ALC_MAJOR_VERSION, sizeof(int), &ALDeviceInfo.iMajorVersion); alcGetIntegerv(device, ALC_MINOR_VERSION, sizeof(int), &ALDeviceInfo.iMinorVersion); @@ -105,8 +93,6 @@ ALDeviceList::ALDeviceList() // Get Source Count ALDeviceInfo.uiSourceCount = GetMaxNumSources(); - - aDeviceInfo[nNumOfDevices++] = ALDeviceInfo; } alcMakeContextCurrent(NULL); alcDestroyContext(context); diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h index 417bd314..bebb6791 100644 --- a/src/audio/oal/aldlist.h +++ b/src/audio/oal/aldlist.h @@ -21,7 +21,7 @@ enum }; struct ALDEVICEINFO { - const char *strDeviceName; + char *strDeviceName; int iMajorVersion; int iMinorVersion; unsigned int uiSourceCount; @@ -33,6 +33,19 @@ struct ALDEVICEINFO { strDeviceName = NULL; Extensions = 0; } + + ~ALDEVICEINFO() + { + delete[] strDeviceName; + strDeviceName = NULL; + } + + void SetName(const char *name) + { + if(strDeviceName) delete[] strDeviceName; + strDeviceName = new char[strlen(name) + 1]; + strcpy(strDeviceName, name); + } }; typedef ALDEVICEINFO *LPALDEVICEINFO; diff --git a/src/audio/oal/channel.cpp b/src/audio/oal/channel.cpp index d1fd0aea..04e7e529 100644 --- a/src/audio/oal/channel.cpp +++ b/src/audio/oal/channel.cpp @@ -10,20 +10,22 @@ extern bool IsFXSupported(); -ALuint alSources[MAXCHANNELS+MAX2DCHANNELS]; -ALuint alFilters[MAXCHANNELS+MAX2DCHANNELS]; -ALuint alBuffers[MAXCHANNELS+MAX2DCHANNELS]; +ALuint alSources[NUM_CHANNELS]; +ALuint alFilters[NUM_CHANNELS]; +ALuint alBuffers[NUM_CHANNELS]; bool bChannelsCreated = false; int32 CChannel::channelsThatNeedService = 0; +uint8 tempStereoBuffer[PED_BLOCKSIZE * 2]; + void CChannel::InitChannels() { - alGenSources(MAXCHANNELS+MAX2DCHANNELS, alSources); - alGenBuffers(MAXCHANNELS+MAX2DCHANNELS, alBuffers); + alGenSources(NUM_CHANNELS, alSources); + alGenBuffers(NUM_CHANNELS, alBuffers); if (IsFXSupported()) - alGenFilters(MAXCHANNELS + MAX2DCHANNELS, alFilters); + alGenFilters(NUM_CHANNELS, alFilters); bChannelsCreated = true; } @@ -32,13 +34,13 @@ CChannel::DestroyChannels() { if (bChannelsCreated) { - alDeleteSources(MAXCHANNELS + MAX2DCHANNELS, alSources); + alDeleteSources(NUM_CHANNELS, alSources); memset(alSources, 0, sizeof(alSources)); - alDeleteBuffers(MAXCHANNELS + MAX2DCHANNELS, alBuffers); + alDeleteBuffers(NUM_CHANNELS, alBuffers); memset(alBuffers, 0, sizeof(alBuffers)); if (IsFXSupported()) { - alDeleteFilters(MAXCHANNELS + MAX2DCHANNELS, alFilters); + alDeleteFilters(NUM_CHANNELS, alFilters); memset(alFilters, 0, sizeof(alFilters)); } bChannelsCreated = false; @@ -50,6 +52,7 @@ CChannel::CChannel() { Data = nil; DataSize = 0; + bIs2D = false; SetDefault(); } @@ -90,6 +93,7 @@ void CChannel::Init(uint32 _id, bool Is2D) if ( Is2D ) { + bIs2D = true; alSource3f(alSources[id], AL_POSITION, 0.0f, 0.0f, 0.0f); alSourcef(alSources[id], AL_GAIN, 1.0f); } @@ -113,7 +117,20 @@ void CChannel::Start() if ( !HasSource() ) return; if ( !Data ) return; - alBufferData(alBuffers[id], AL_FORMAT_MONO16, Data, DataSize, Frequency); + if ( bIs2D ) + { + // convert mono data to stereo + int16 *monoData = (int16*)Data; + int16 *stereoData = (int16*)tempStereoBuffer; + for (size_t i = 0; i < DataSize / 2; i++) + { + *(stereoData++) = *monoData; + *(stereoData++) = *(monoData++); + } + alBufferData(alBuffers[id], AL_FORMAT_STEREO16, tempStereoBuffer, DataSize * 2, Frequency); + } + else + alBufferData(alBuffers[id], AL_FORMAT_MONO16, Data, DataSize, Frequency); if ( LoopPoints[0] != 0 && LoopPoints[0] != -1 ) alBufferiv(alBuffers[id], AL_LOOP_POINTS_SOFT, LoopPoints); alSourcei(alSources[id], AL_BUFFER, alBuffers[id]); diff --git a/src/audio/oal/channel.h b/src/audio/oal/channel.h index b081be25..872646c8 100644 --- a/src/audio/oal/channel.h +++ b/src/audio/oal/channel.h @@ -20,6 +20,7 @@ class CChannel int32 LoopCount; ALint LoopPoints[2]; ALint LastProcessedOffset; + bool bIs2D; public: static int32 channelsThatNeedService; diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index ed73e940..7fc36acd 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -1,8 +1,6 @@ #include "common.h" #ifdef AUDIO_OAL -#include "stream.h" -#include "sampman.h" #if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #ifdef AUDIO_OAL_USE_SNDFILE @@ -22,6 +20,29 @@ #include <opusfile.h> #endif +#include <queue> +#include <utility> + +#ifdef MULTITHREADED_AUDIO +#include <iostream> +#include <thread> +#include <mutex> +#include <condition_variable> +#include "MusicManager.h" +#include "stream.h" + +std::thread gAudioThread; +std::mutex gAudioThreadQueueMutex; +std::condition_variable gAudioThreadCv; +bool gAudioThreadTerm = false; +std::queue<CStream*> gStreamsToProcess; // values are not unique, we will handle that ourself +std::queue<std::pair<IDecoder*, void*>> gStreamsToClose; +#else +#include "stream.h" +#endif + +#include "sampman.h" + #ifndef _WIN32 #include "crossplatform.h" #endif @@ -39,6 +60,10 @@ class CSortStereoBuffer { uint16* PcmBuf; size_t BufSize; +//#ifdef MULTITHREADED_AUDIO +// std::mutex Mutex; +//#endif + public: CSortStereoBuffer() : PcmBuf(nil), BufSize(0) {} ~CSortStereoBuffer() @@ -65,6 +90,9 @@ public: void SortStereo(void* buf, size_t size) { +//#ifdef MULTITHREADED_AUDIO +// std::lock_guard<std::mutex> lock(Mutex); +//#endif uint16* InBuf = (uint16*)buf; uint16* OutBuf = GetBuffer(size); @@ -134,7 +162,7 @@ public: else StepIndex--; - StepIndex = clamp(StepIndex, 0, 88); + StepIndex = Clamp(StepIndex, 0, 88); int delta = step >> 3; if (adpcm & 1) delta += step >> 2; @@ -143,7 +171,7 @@ public: if (adpcm & 8) delta = -delta; int newSample = Sample + delta; - Sample = clamp(newSample, -32768, 32767); + Sample = Clamp(newSample, -32768, 32767); return Sample; } }; @@ -279,6 +307,10 @@ public: #undef CLOSE_ON_ERROR } + void FileOpen() + { + } + ~CWavFile() { Close(); @@ -289,6 +321,7 @@ public: return m_bIsOpen; } + uint32 GetSampleSize() { return sizeof(uint16); @@ -405,6 +438,10 @@ public: m_pfSound = sf_open(path, SFM_READ, &m_soundInfo); } + void FileOpen() + { + } + ~CSndFile() { if ( m_pfSound ) @@ -464,8 +501,6 @@ public: #endif #ifdef AUDIO_OAL_USE_MPG123 -// fuzzy seek eliminates stutter when playing ADF but spams errors a lot (and breaks radio sometimes) -//#define MP3_USE_FUZZY_SEEK class CMP3File : public IDecoder { @@ -474,45 +509,58 @@ protected: bool m_bOpened; uint32 m_nRate; uint32 m_nChannels; - + const char* m_pPath; + bool m_bFileNotOpenedYet; + CMP3File() : m_pMH(nil), m_bOpened(false), m_nRate(0), + m_bFileNotOpenedYet(false), m_nChannels(0) {} public: CMP3File(const char *path) : m_pMH(nil), m_bOpened(false), m_nRate(0), - m_nChannels(0) + m_nChannels(0), + m_pPath(path), + m_bFileNotOpenedYet(false) { m_pMH = mpg123_new(nil, nil); if ( m_pMH ) { -#ifdef MP3_USE_FUZZY_SEEK - mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0); -#else mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0); -#endif - long rate = 0; - int channels = 0; - int encoding = 0; - - m_bOpened = mpg123_open(m_pMH, path) == MPG123_OK - && mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK; - m_nRate = rate; - m_nChannels = channels; - - if ( IsOpened() ) - { - mpg123_format_none(m_pMH); - mpg123_format(m_pMH, rate, channels, encoding); - } + m_bOpened = true; + m_bFileNotOpenedYet = true; + // It's possible to move this to audioFileOpsThread(), but effect isn't noticable + probably not compatible with our current cutscene audio handling +#if 1 + FileOpen(); +#endif } } + void FileOpen() + { + if(!m_bFileNotOpenedYet) return; + + long rate = 0; + int channels = 0; + int encoding = 0; + m_bOpened = mpg123_open(m_pMH, m_pPath) == MPG123_OK + && mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK; + + m_nRate = rate; + m_nChannels = channels; + + if(IsOpened()) { + mpg123_format_none(m_pMH); + mpg123_format(m_pMH, rate, channels, encoding); + } + m_bFileNotOpenedYet = false; + } + ~CMP3File() { if ( m_pMH ) @@ -535,7 +583,7 @@ public: uint32 GetSampleCount() { - if ( !IsOpened() ) return 0; + if ( !IsOpened() || m_bFileNotOpenedYet ) return 0; return mpg123_length(m_pMH); } @@ -551,19 +599,19 @@ public: void Seek(uint32 milliseconds) { - if ( !IsOpened() ) return; + if ( !IsOpened() || m_bFileNotOpenedYet ) return; mpg123_seek(m_pMH, ms2samples(milliseconds), SEEK_SET); } uint32 Tell() { - if ( !IsOpened() ) return 0; + if ( !IsOpened() || m_bFileNotOpenedYet ) return 0; return samples2ms(mpg123_tell(m_pMH)); } uint32 Decode(void *buffer) { - if ( !IsOpened() ) return 0; + if ( !IsOpened() || m_bFileNotOpenedYet ) return 0; size_t size; int err = mpg123_read(m_pMH, (unsigned char *)buffer, GetBufferSize(), &size); @@ -602,28 +650,41 @@ public: m_pMH = mpg123_new(nil, nil); if (m_pMH) { -#ifdef MP3_USE_FUZZY_SEEK - mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0); -#else mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0); + + m_bOpened = true; + m_bFileNotOpenedYet = true; + m_pPath = path; + // It's possible to move this to audioFileOpsThread(), but effect isn't noticable + probably not compatible with our current cutscene audio handling +#if 1 + FileOpen(); #endif - long rate = 0; - int channels = 0; - int encoding = 0; - FILE* f = fopen(path, "rb"); + } + } + + void FileOpen() + { + if(!m_bFileNotOpenedYet) return; - m_bOpened = mpg123_replace_reader_handle(m_pMH, r_read, r_seek, r_close) == MPG123_OK - && mpg123_open_handle(m_pMH, f) == MPG123_OK && mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK; - m_nRate = rate; - m_nChannels = channels; + long rate = 0; + int channels = 0; + int encoding = 0; - if (IsOpened()) - { - mpg123_format_none(m_pMH); - mpg123_format(m_pMH, rate, channels, encoding); - } + FILE *f = fopen(m_pPath, "rb"); + + m_bOpened = f && mpg123_replace_reader_handle(m_pMH, r_read, r_seek, r_close) == MPG123_OK + && mpg123_open_handle(m_pMH, f) == MPG123_OK && mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK; + + m_nRate = rate; + m_nChannels = channels; + + if(IsOpened()) { + mpg123_format_none(m_pMH); + mpg123_format(m_pMH, rate, channels, encoding); } + + m_bFileNotOpenedYet = false; } }; @@ -655,7 +716,7 @@ public: static short quantize(double sample) { int a = int(sample + 0.5); - return short(clamp(a, -32768, 32767)); + return short(Clamp(a, -32768, 32767)); } void Decode(void* _inbuf, int16* _outbuf, size_t size) @@ -744,6 +805,10 @@ public: m_ppVagBuffers[i] = new uint8[VB_BLOCK_SIZE]; } + void FileOpen() + { + } + ~CVbFile() { if (m_pFile) @@ -896,6 +961,10 @@ public: m_bOpened = true; } } + + void FileOpen() + { + } ~COpusFile() { @@ -961,11 +1030,173 @@ public: }; #endif + +// For multi-thread: Someone always acquire stream's mutex before entering here +void +CStream::BuffersShouldBeFilled() +{ +#ifdef MULTITHREADED_AUDIO + if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) { + std::queue<std::pair<ALuint, ALuint>> tempQueue; + for(int i = 0; i < NUM_STREAMBUFFERS / 2; i++) { + tempQueue.push(std::pair<ALuint, ALuint>(m_alBuffers[i * 2], m_alBuffers[i * 2 + 1])); + } + m_fillBuffers.swap(tempQueue); + + FlagAsToBeProcessed(); + + m_bActive = true; // to allow Update() to queue the filled buffers & play + return; + } + std::queue<std::pair<ALuint, ALuint>>().swap(m_fillBuffers); +#endif + if ( FillBuffers() != 0 ) + { + SetPlay(true); + } +} + +// returns whether it's queued (not on multi-thread) +bool +CStream::BufferShouldBeFilledAndQueued(std::pair<ALuint, ALuint>* bufs) +{ +#ifdef MULTITHREADED_AUDIO + if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) + m_fillBuffers.push(*bufs); + else +#endif + { + ALuint alBuffers[2] = {(*bufs).first, (*bufs).second}; // left - right + if (FillBuffer(alBuffers)) { + alSourceQueueBuffers(m_pAlSources[0], 1, &alBuffers[0]); + alSourceQueueBuffers(m_pAlSources[1], 1, &alBuffers[1]); + return true; + } + } + return false; +} + +#ifdef MULTITHREADED_AUDIO +void +CStream::FlagAsToBeProcessed(bool close) +{ + if (!close && MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) + return; + + gAudioThreadQueueMutex.lock(); + if (close) + gStreamsToClose.push(std::pair<IDecoder*, void*>(m_pSoundFile ? m_pSoundFile : nil, m_pBuffer ? m_pBuffer : nil)); + else + gStreamsToProcess.push(this); + + gAudioThreadQueueMutex.unlock(); + + gAudioThreadCv.notify_one(); +} + +void audioFileOpsThread() +{ + do + { + CStream *stream; + { + // Just a semaphore + std::unique_lock<std::mutex> queueMutex(gAudioThreadQueueMutex); + gAudioThreadCv.wait(queueMutex, [] { return gStreamsToProcess.size() > 0 || gStreamsToClose.size() > 0 || gAudioThreadTerm; }); + if (gAudioThreadTerm) + return; + + if (!gStreamsToClose.empty()) { + auto streamToClose = gStreamsToClose.front(); + gStreamsToClose.pop(); + if (streamToClose.first) { // pSoundFile + delete streamToClose.first; + } + + if (streamToClose.second) { // pBuffer + free(streamToClose.second); + } + } + + if (!gStreamsToProcess.empty()) { + stream = gStreamsToProcess.front(); + gStreamsToProcess.pop(); + } else + continue; + } + + std::unique_lock<std::mutex> lock(stream->m_mutex); + + std::pair<ALuint, ALuint> buffers, *lastBufAddr; + bool insertBufsAfterCheck = false; + + do { + if (!stream->IsOpened()) { + break; + } + + if (stream->m_bReset) + break; + + // We gave up this idea for now + /* + stream->m_pSoundFile->FileOpen(); + + // Deffered allocation, do it now + if (stream->m_pBuffer == nil) { + stream->m_pBuffer = malloc(stream->m_pSoundFile->GetBufferSize()); + ASSERT(stream->m_pBuffer != nil); + } + */ + + if (stream->m_bDoSeek) { + stream->m_bDoSeek = false; + int pos = stream->m_SeekPos; + lock.unlock(); + stream->m_pSoundFile->Seek(pos); + lock.lock(); + + continue; // let's do the checks again, make sure we didn't miss anything while Seeking + } + + if (insertBufsAfterCheck) { + stream->m_queueBuffers.push(buffers); + insertBufsAfterCheck = false; + } + + if (!stream->m_fillBuffers.empty()) { + lastBufAddr = &stream->m_fillBuffers.front(); + buffers = *lastBufAddr; + lock.unlock(); + + ALuint alBuffers[2] = {buffers.first, buffers.second}; // left - right + bool filled = stream->FillBuffer(alBuffers); + + lock.lock(); + + // Make sure queue isn't touched after we released mutex + if (!stream->m_fillBuffers.empty() && lastBufAddr == &stream->m_fillBuffers.front()) { + stream->m_fillBuffers.pop(); + if (filled) + insertBufsAfterCheck = true; // Also make sure stream's properties aren't changed. So make one more pass, and push it to m_queueBuffers only if it pass checks again. + } + } else + break; + + } while (true); + + } while(true); +} +#endif + void CStream::Initialise() { #ifdef AUDIO_OAL_USE_MPG123 mpg123_init(); #endif +#ifdef MULTITHREADED_AUDIO + gAudioThread = std::thread(audioFileOpsThread); +#endif } void CStream::Terminate() @@ -973,14 +1204,27 @@ void CStream::Terminate() #ifdef AUDIO_OAL_USE_MPG123 mpg123_exit(); #endif +#ifdef MULTITHREADED_AUDIO + gAudioThreadQueueMutex.lock(); + gAudioThreadTerm = true; + gAudioThreadQueueMutex.unlock(); + + gAudioThreadCv.notify_one(); + gAudioThread.join(); +#endif } -CStream::CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS], uint32 overrideSampleRate) : +CStream::CStream(ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS]) : m_pAlSources(sources), m_alBuffers(buffers), m_pBuffer(nil), m_bPaused(false), m_bActive(false), +#ifdef MULTITHREADED_AUDIO + m_bIExist(false), + m_bDoSeek(false), + m_SeekPos(0), +#endif m_pSoundFile(nil), m_bReset(false), m_nVolume(0), @@ -989,6 +1233,27 @@ CStream::CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBU m_nLoopCount(1) { +} + +bool CStream::Open(const char* filename, uint32 overrideSampleRate) +{ + if (IsOpened()) return false; + +#ifdef MULTITHREADED_AUDIO + std::unique_lock<std::mutex> lock(m_mutex); + + m_bDoSeek = false; + m_SeekPos = 0; +#endif + + m_bPaused = false; + m_bActive = false; + m_bReset = false; + m_nVolume = 0; + m_nPan = 0; + m_nPosBeforeReset = 0; + m_nLoopCount = 1; + // Be case-insensitive on linux (from https://github.com/OneSadCookie/fcaseopen/) #if !defined(_WIN32) char *real = casepath(filename); @@ -1025,44 +1290,67 @@ CStream::CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBU else m_pSoundFile = nil; - if ( IsOpened() ) + if ( m_pSoundFile && m_pSoundFile->IsOpened() ) { - m_pBuffer = malloc(m_pSoundFile->GetBufferSize()); - ASSERT(m_pBuffer!=nil); - - DEV("AvgSamplesPerSec: %d\n", m_pSoundFile->GetAvgSamplesPerSec()); - DEV("SampleCount: %d\n", m_pSoundFile->GetSampleCount()); - DEV("SampleRate: %d\n", m_pSoundFile->GetSampleRate()); - DEV("Channels: %d\n", m_pSoundFile->GetChannels()); - DEV("Buffer Samples: %d\n", m_pSoundFile->GetBufferSamples()); - DEV("Buffer sec: %f\n", (float(m_pSoundFile->GetBufferSamples()) / float(m_pSoundFile->GetChannels())/ float(m_pSoundFile->GetSampleRate()))); - DEV("Length MS: %02d:%02d\n", (m_pSoundFile->GetLength() / 1000) / 60, (m_pSoundFile->GetLength() / 1000) % 60); - - return; + uint32 bufSize = m_pSoundFile->GetBufferSize(); + if(bufSize != 0) { // Otherwise it's deferred + m_pBuffer = malloc(bufSize); + ASSERT(m_pBuffer != nil); + + DEV("AvgSamplesPerSec: %d\n", m_pSoundFile->GetAvgSamplesPerSec()); + DEV("SampleCount: %d\n", m_pSoundFile->GetSampleCount()); + DEV("SampleRate: %d\n", m_pSoundFile->GetSampleRate()); + DEV("Channels: %d\n", m_pSoundFile->GetChannels()); + DEV("Buffer Samples: %d\n", m_pSoundFile->GetBufferSamples()); + DEV("Buffer sec: %f\n", (float(m_pSoundFile->GetBufferSamples()) / float(m_pSoundFile->GetChannels())/ float(m_pSoundFile->GetSampleRate()))); + DEV("Length MS: %02d:%02d\n", (m_pSoundFile->GetLength() / 1000) / 60, (m_pSoundFile->GetLength() / 1000) % 60); + } +#ifdef MULTITHREADED_AUDIO + m_bIExist = true; +#endif + return true; } + return false; } CStream::~CStream() { - Delete(); + assert(!IsOpened()); } -void CStream::Delete() +void CStream::Close() { + if(!IsOpened()) return; + +#ifdef MULTITHREADED_AUDIO + { + std::lock_guard<std::mutex> lock(m_mutex); + + Stop(); + ClearBuffers(); + m_bIExist = false; + std::queue<std::pair<ALuint, ALuint>>().swap(m_fillBuffers); + tsQueue<std::pair<ALuint, ALuint>>().swapNts(m_queueBuffers); // TSness not required, mutex is acquired + } + + FlagAsToBeProcessed(true); +#else + Stop(); ClearBuffers(); - + if ( m_pSoundFile ) { delete m_pSoundFile; m_pSoundFile = nil; } - + if ( m_pBuffer ) { free(m_pBuffer); m_pBuffer = nil; } +#endif } bool CStream::HasSource() @@ -1070,9 +1358,14 @@ bool CStream::HasSource() return (m_pAlSources[0] != AL_NONE) && (m_pAlSources[1] != AL_NONE); } +// m_bIExist only written in main thread, thus mutex is not needed on main thread bool CStream::IsOpened() { +#ifdef MULTITHREADED_AUDIO + return m_bIExist; +#else return m_pSoundFile && m_pSoundFile->IsOpened(); +#endif } bool CStream::IsPlaying() @@ -1086,6 +1379,14 @@ bool CStream::IsPlaying() alGetSourcei(m_pAlSources[1], AL_SOURCE_STATE, &sourceState[1]); if (sourceState[0] == AL_PLAYING || sourceState[1] == AL_PLAYING) return true; + +#ifdef MULTITHREADED_AUDIO + std::lock_guard<std::mutex> lock(m_mutex); + + // Streams are designed in such a way that m_fillBuffers and m_queueBuffers will be *always* filled if audio is playing, and mutex is acquired + if (!m_fillBuffers.empty() || !m_queueBuffers.emptyNts()) + return true; +#endif } return false; @@ -1147,10 +1448,10 @@ void CStream::SetVolume(uint32 nVol) void CStream::SetPan(uint8 nPan) { - m_nPan = clamp((int8)nPan - 63, 0, 63); + m_nPan = Clamp((int8)nPan - 63, 0, 63); SetPosition(0, (m_nPan - 63) / 64.0f, 0.0f, Sqrt(1.0f - SQR((m_nPan - 63) / 64.0f))); - m_nPan = clamp((int8)nPan + 64, 64, 127); + m_nPan = Clamp((int8)nPan + 64, 64, 127); SetPosition(1, (m_nPan - 63) / 64.0f, 0.0f, Sqrt(1.0f - SQR((m_nPan - 63) / 64.0f))); m_nPan = nPan; @@ -1160,8 +1461,24 @@ void CStream::SetPan(uint8 nPan) void CStream::SetPosMS(uint32 nPos) { if ( !IsOpened() ) return; - m_pSoundFile->Seek(nPos); + +#ifdef MULTITHREADED_AUDIO + std::lock_guard<std::mutex> lock(m_mutex); + + std::queue<std::pair<ALuint, ALuint>>().swap(m_fillBuffers); + tsQueue<std::pair<ALuint, ALuint>>().swapNts(m_queueBuffers); // TSness not required, second thread always access it when stream mutex acquired + + if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) { + m_bDoSeek = true; + m_SeekPos = nPos; + } else +#endif + { + m_pSoundFile->Seek(nPos); + } ClearBuffers(); + + // adding to gStreamsToProcess not needed, someone always calls Start() / BuffersShouldBeFilled() after SetPosMS } uint32 CStream::GetPosMS() @@ -1169,10 +1486,16 @@ uint32 CStream::GetPosMS() if ( !HasSource() ) return 0; if ( !IsOpened() ) return 0; + // Deferred init causes division by zero + if (m_pSoundFile->GetChannels() == 0) + return 0; + ALint offset; //alGetSourcei(m_alSource, AL_SAMPLE_OFFSET, &offset); alGetSourcei(m_pAlSources[0], AL_BYTE_OFFSET, &offset); + //std::lock_guard<std::mutex> lock(m_mutex); + return m_pSoundFile->Tell() - m_pSoundFile->samples2ms(m_pSoundFile->GetBufferSamples() * (NUM_STREAMBUFFERS/2-1)) / m_pSoundFile->GetChannels() + m_pSoundFile->samples2ms(offset/m_pSoundFile->GetSampleSize()) / m_pSoundFile->GetChannels(); @@ -1186,6 +1509,7 @@ uint32 CStream::GetLengthMS() bool CStream::FillBuffer(ALuint *alBuffer) { +#ifndef MULTITHREADED_AUDIO if ( !HasSource() ) return false; if ( !IsOpened() ) @@ -1194,13 +1518,14 @@ bool CStream::FillBuffer(ALuint *alBuffer) return false; if ( !(alBuffer[1] != AL_NONE && alIsBuffer(alBuffer[1])) ) return false; - +#endif + uint32 size = m_pSoundFile->Decode(m_pBuffer); if( size == 0 ) return false; - - uint32 channelSize = size / m_pSoundFile->GetChannels(); + uint32 channelSize = size / m_pSoundFile->GetChannels(); + alBufferData(alBuffer[0], AL_FORMAT_MONO16, m_pBuffer, channelSize, m_pSoundFile->GetSampleRate()); // TODO: use just one buffer if we play mono if (m_pSoundFile->GetChannels() == 1) @@ -1210,6 +1535,26 @@ bool CStream::FillBuffer(ALuint *alBuffer) return true; } +#ifdef MULTITHREADED_AUDIO +bool CStream::QueueBuffers() +{ + bool buffersQueued = false; + std::pair<ALuint, ALuint> buffers; + while (m_queueBuffers.peekPop(&buffers)) // beware: m_queueBuffers is tsQueue + { + ALuint leftBuf = buffers.first; + ALuint rightBuf = buffers.second; + + alSourceQueueBuffers(m_pAlSources[0], 1, &leftBuf); + alSourceQueueBuffers(m_pAlSources[1], 1, &rightBuf); + + buffersQueued = true; + } + return buffersQueued; +} +#endif + +// Only used in single-threaded audio or cutscene audio int32 CStream::FillBuffers() { int32 i = 0; @@ -1239,17 +1584,33 @@ void CStream::ClearBuffers() alSourceUnqueueBuffers(m_pAlSources[1], 1, &value); } -bool CStream::Setup(bool imSureQueueIsEmpty) +bool CStream::Setup(bool imSureQueueIsEmpty, bool lock) { if ( IsOpened() ) { - alSourcei(m_pAlSources[0], AL_LOOPING, AL_FALSE); - alSourcei(m_pAlSources[1], AL_LOOPING, AL_FALSE); +#ifdef MULTITHREADED_AUDIO + if (lock) + m_mutex.lock(); +#endif + if (!imSureQueueIsEmpty) { - SetPlay(false); + Stop(); ClearBuffers(); } +#ifdef MULTITHREADED_AUDIO + if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) { + m_pSoundFile->Seek(0); + } else { + m_bDoSeek = true; + m_SeekPos = 0; + } + + if (lock) + m_mutex.unlock(); +#else m_pSoundFile->Seek(0); +#endif + //SetPosition(0.0f, 0.0f, 0.0f); SetPitch(1.0f); //SetPan(m_nPan); @@ -1302,8 +1663,12 @@ void CStream::SetPlay(bool state) void CStream::Start() { if ( !HasSource() ) return; - if ( FillBuffers() != 0 ) - SetPlay(true); + +#ifdef MULTITHREADED_AUDIO + std::lock_guard<std::mutex> lock(m_mutex); + tsQueue<std::pair<ALuint, ALuint>>().swapNts(m_queueBuffers); // TSness not required, second thread always access it when stream mutex acquired +#endif + BuffersShouldBeFilled(); } void CStream::Stop() @@ -1325,9 +1690,23 @@ void CStream::Update() if ( !m_bPaused ) { - ALint totalBuffers[2] = { 0, 0 }; - ALint buffersProcessed[2] = { 0, 0 }; + bool buffersQueuedAndStarted = false; + bool buffersQueuedButNotStarted = false; +#ifdef MULTITHREADED_AUDIO + // Put it in here because we need totalBuffers after queueing to decide when to loop audio + if (m_bActive) + { + buffersQueuedAndStarted = QueueBuffers(); + if(buffersQueuedAndStarted) { + SetPlay(true); + } + } +#endif + + ALint totalBuffers[2] = {0, 0}; + ALint buffersProcessed[2] = {0, 0}; + // Relying a lot on left buffer states in here do @@ -1339,44 +1718,66 @@ void CStream::Update() alGetSourcei(m_pAlSources[1], AL_BUFFERS_QUEUED, &totalBuffers[1]); alGetSourcei(m_pAlSources[1], AL_BUFFERS_PROCESSED, &buffersProcessed[1]); } while (buffersProcessed[0] != buffersProcessed[1]); - + assert(buffersProcessed[0] == buffersProcessed[1]); // Correcting OpenAL concepts here: // AL_BUFFERS_QUEUED = Number of *all* buffers in queue, including processed, processing and pending // AL_BUFFERS_PROCESSED = Index of the buffer being processing right now. Buffers coming after that(have greater index) are pending buffers. // which means: totalBuffers[0] - buffersProcessed[0] = pending buffers - - bool buffersRefilled = false; - + // We should wait queue to be cleared to loop track, because position calculation relies on queue. if (m_nLoopCount != 1 && m_bActive && totalBuffers[0] == 0) { - Setup(true); - buffersRefilled = FillBuffers() != 0; - if (m_nLoopCount != 0) - m_nLoopCount--; +#ifdef MULTITHREADED_AUDIO + std::lock_guard<std::mutex> lock(m_mutex); + + if (m_fillBuffers.empty() && m_queueBuffers.emptyNts()) // we already acquired stream mutex, which is enough for second thread. thus Nts variant +#endif + { + Setup(true, false); + BuffersShouldBeFilled(); // will also call SetPlay(true) + if (m_nLoopCount != 0) + m_nLoopCount--; + } } else { - while( buffersProcessed[0]-- ) + static std::queue<std::pair<ALuint, ALuint>> tempFillBuffer; + + while ( buffersProcessed[0]-- ) { ALuint buffer[2]; alSourceUnqueueBuffers(m_pAlSources[0], 1, &buffer[0]); alSourceUnqueueBuffers(m_pAlSources[1], 1, &buffer[1]); - - if (m_bActive && FillBuffer(buffer)) + + if (m_bActive) { - buffersRefilled = true; - alSourceQueueBuffers(m_pAlSources[0], 1, &buffer[0]); - alSourceQueueBuffers(m_pAlSources[1], 1, &buffer[1]); + tempFillBuffer.push(std::pair<ALuint, ALuint>(buffer[0], buffer[1])); } } + + if (m_bActive && buffersProcessed[1]) + { +#ifdef MULTITHREADED_AUDIO + m_mutex.lock(); +#endif + while (!tempFillBuffer.empty()) { + auto elem = tempFillBuffer.front(); + tempFillBuffer.pop(); + buffersQueuedButNotStarted = BufferShouldBeFilledAndQueued(&elem); + } +#ifdef MULTITHREADED_AUDIO + m_mutex.unlock(); + FlagAsToBeProcessed(); +#endif + + } } - // Two reasons: 1-Source may be starved to audio and stopped itself, 2- We're already waiting it to starve and die for looping track! - if (m_bActive && (buffersRefilled || (totalBuffers[1] - buffersProcessed[1] != 0))) + // Source may be starved to audio and stopped itself + if (m_bActive && !buffersQueuedAndStarted && (buffersQueuedButNotStarted || (totalBuffers[1] - buffersProcessed[1] != 0))) SetPlay(true); } } @@ -1385,28 +1786,45 @@ void CStream::ProviderInit() { if ( m_bReset ) { - if ( Setup(true) ) + if ( Setup(true, false) ) // lock not needed, thread can't process streams with m_bReset set { SetPan(m_nPan); SetVolume(m_nVolume); SetLoopCount(m_nLoopCount); SetPosMS(m_nPosBeforeReset); - if (m_bActive) - FillBuffers(); - SetPlay(m_bActive); - if ( m_bPaused ) +#ifdef MULTITHREADED_AUDIO + std::unique_lock<std::mutex> lock(m_mutex); +#endif + if(m_bActive) + BuffersShouldBeFilled(); + + if (m_bPaused) Pause(); + + m_bReset = false; + + } else { +#ifdef MULTITHREADED_AUDIO + std::unique_lock<std::mutex> lock(m_mutex); +#endif + m_bReset = false; } - - m_bReset = false; } } void CStream::ProviderTerm() { +#ifdef MULTITHREADED_AUDIO + std::lock_guard<std::mutex> lock(m_mutex); + + // unlike Close() we will reuse this stream, so clearing queues are important. + std::queue<std::pair<ALuint, ALuint>>().swap(m_fillBuffers); + tsQueue<std::pair<ALuint, ALuint>>().swapNts(m_queueBuffers); // stream mutex is already acquired, thus Nts variant +#endif m_bReset = true; m_nPosBeforeReset = GetPosMS(); - + + Stop(); ClearBuffers(); } diff --git a/src/audio/oal/stream.h b/src/audio/oal/stream.h index 9a2a2fbe..f0456925 100644 --- a/src/audio/oal/stream.h +++ b/src/audio/oal/stream.h @@ -11,6 +11,7 @@ public: virtual ~IDecoder() { } virtual bool IsOpened() = 0; + virtual void FileOpen() = 0; virtual uint32 GetSampleSize() = 0; virtual uint32 GetSampleCount() = 0; @@ -48,12 +49,70 @@ public: uint32 GetLength() { + FileOpen(); // abort deferred init, we need length now - game has to cache audio file sizes return float(GetSampleCount()) * 1000.0f / float(GetSampleRate()); } virtual uint32 Decode(void *buffer) = 0; }; +#ifdef MULTITHREADED_AUDIO +template <typename T> class tsQueue +{ +public: + tsQueue() : count(0) { } + + void push(const T &value) + { + std::lock_guard<std::mutex> lock(m_mutex); + m_queue.push(value); + count++; + } + + bool peekPop(T *retVal) + { + std::lock_guard<std::mutex> lock(m_mutex); + if (count == 0) + return false; + + *retVal = m_queue.front(); + m_queue.pop(); + count--; + return true; + } + + void swapNts(tsQueue<T> &replaceWith) + { + m_queue.swap(replaceWith.m_queue); + replaceWith.count = count; + } + + /* + void swapTs(tsQueue<T> &replaceWith) + { + std::lock_guard<std::mutex> lock(m_mutex); + std::lock_guard<std::mutex> lock2(replaceWith.m_mutex); + swapNts(replaceWith); + } + */ + + bool emptyNts() + { + return count == 0; + } + /* + bool emptyTs() + { + std::lock_guard<std::mutex> lock(m_mutex); + return emptyNts(); + } + */ + + std::queue<T> m_queue; + int count; + mutable std::mutex m_mutex; +}; +#endif class CStream { char m_aFilename[128]; @@ -63,6 +122,17 @@ class CStream bool m_bPaused; bool m_bActive; +public: +#ifdef MULTITHREADED_AUDIO + std::mutex m_mutex; + std::queue<std::pair<ALuint, ALuint>> m_fillBuffers; // left and right buffer + tsQueue<std::pair<ALuint, ALuint>> m_queueBuffers; +// std::condition_variable m_closeCv; + bool m_bDoSeek; + uint32 m_SeekPos; + bool m_bIExist; +#endif + void *m_pBuffer; bool m_bReset; @@ -72,7 +142,14 @@ class CStream int32 m_nLoopCount; IDecoder *m_pSoundFile; - + + void BuffersShouldBeFilled(); // all + bool BufferShouldBeFilledAndQueued(std::pair<ALuint, ALuint>*); // two (left-right) +#ifdef MULTITHREADED_AUDIO + void FlagAsToBeProcessed(bool close = false); + bool QueueBuffers(); +#endif + bool HasSource(); void SetPosition(int i, float x, float y, float z); void SetPitch(float pitch); @@ -81,15 +158,17 @@ class CStream void SetPlay(bool state); bool FillBuffer(ALuint *alBuffer); - int32 FillBuffers(); + int32 FillBuffers(); void ClearBuffers(); -public: +//public: static void Initialise(); static void Terminate(); - CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS], uint32 overrideSampleRate = 32000); + CStream(ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS]); ~CStream(); void Delete(); + bool Open(const char *filename, uint32 overrideSampleRate = 32000); + void Close(); bool IsOpened(); bool IsPlaying(); @@ -100,12 +179,11 @@ public: uint32 GetPosMS(); uint32 GetLengthMS(); - bool Setup(bool imSureQueueIsEmpty = false); + bool Setup(bool imSureQueueIsEmpty = false, bool lock = true); void Start(); void Stop(); void Update(void); void SetLoopCount(int32); - void ProviderInit(); void ProviderTerm(); diff --git a/src/audio/sampman.h b/src/audio/sampman.h index 5d7d39af..8243f342 100644 --- a/src/audio/sampman.h +++ b/src/audio/sampman.h @@ -1,5 +1,6 @@ #pragma once #include "AudioSamples.h" +#include "audio_enums.h" #define MAX_VOLUME 127 #define MAX_FREQ DIGITALRATE @@ -115,10 +116,9 @@ enum #define MAXPROVIDERS 64 -#define MAXCHANNELS 28 -#define MAXCHANNELS_SURROUND 24 +#define MAXCHANNELS (NUM_CHANNELS_GENERIC+1) +#define MAXCHANNELS_SURROUND (MAXCHANNELS-4) #define MAX2DCHANNELS 1 -#define CHANNEL2D MAXCHANNELS #define MAX_STREAMS 3 @@ -126,7 +126,13 @@ enum #define DIGITALBITS 16 #define DIGITALCHANNELS 2 -#define MAX_DIGITAL_MIXER_CHANNELS 32 +#ifdef FIX_BUGS +#define MAX_DIGITAL_MIXER_CHANNELS (MAXCHANNELS+MAX_STREAMS*2+MAX2DCHANNELS) +#else +#define MAX_DIGITAL_MIXER_CHANNELS (MAXCHANNELS+MAX_STREAMS*2) +#endif + +static_assert( NUM_CHANNELS == MAXCHANNELS + MAX2DCHANNELS, "The number of channels doesn't match with an enum" ); class cSampleManager { @@ -135,9 +141,9 @@ class cSampleManager uint8 m_nMP3BoostVolume; uint8 m_nEffectsFadeVolume; uint8 m_nMusicFadeVolume; - uint8 m_nMonoMode; + bool8 m_nMonoMode; char m_szCDRomRootPath[80]; - bool m_bInitialised; + bool8 m_bInitialised; uint8 m_nNumberOfProviders; char *m_aAudioProviders[MAXPROVIDERS]; tSample m_aSamples[TOTAL_AUDIO_SAMPLES]; @@ -167,16 +173,16 @@ public: int8 AutoDetect3DProviders(); - bool IsMP3RadioChannelAvailable(void); + bool8 IsMP3RadioChannelAvailable(void); void ReleaseDigitalHandle (void); void ReacquireDigitalHandle(void); - bool Initialise(void); - void Terminate (void); + bool8 Initialise(void); + void Terminate (void); - bool CheckForAnAudioFileOnCD(void); - char GetCDAudioDriveLetter (void); + bool8 CheckForAnAudioFileOnCD(void); + char GetCDAudioDriveLetter (void); void UpdateEffectsVolume(void); @@ -185,14 +191,14 @@ public: void SetMP3BoostVolume (uint8 nVolume); void SetEffectsFadeVolume (uint8 nVolume); void SetMusicFadeVolume (uint8 nVolume); - void SetMonoMode (uint8 nMode); + void SetMonoMode (bool8 nMode); - bool LoadSampleBank (uint8 nBank); - void UnloadSampleBank (uint8 nBank); - bool IsSampleBankLoaded(uint8 nBank); + bool8 LoadSampleBank (uint8 nBank); + void UnloadSampleBank (uint8 nBank); + bool8 IsSampleBankLoaded(uint8 nBank); - bool IsPedCommentLoaded(uint32 nComment); - bool LoadPedComment (uint32 nComment); + bool8 IsPedCommentLoaded(uint32 nComment); + bool8 LoadPedComment (uint32 nComment); int32 GetBankContainingSound(uint32 offset); int32 _GetPedCommentSlot(uint32 nComment); @@ -202,10 +208,10 @@ public: int32 GetSampleLoopEndOffset (uint32 nSample); uint32 GetSampleLength (uint32 nSample); - bool UpdateReverb(void); + bool8 UpdateReverb(void); - void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag); - bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank); + void SetChannelReverbFlag (uint32 nChannel, bool8 nReverbFlag); + bool8 InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank); void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume); void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ); void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin); @@ -214,26 +220,26 @@ public: void SetChannelFrequency (uint32 nChannel, uint32 nFreq); void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd); void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount); - bool GetChannelUsedFlag (uint32 nChannel); + bool8 GetChannelUsedFlag (uint32 nChannel); void StartChannel (uint32 nChannel); void StopChannel (uint32 nChannel); - void PreloadStreamedFile (uint32 nFile, uint8 nStream); - void PauseStream (uint8 nPauseFlag, uint8 nStream); - void StartPreloadedStreamedFile (uint8 nStream); - bool StartStreamedFile (uint32 nFile, uint32 nPos, uint8 nStream); - void StopStreamedFile (uint8 nStream); - int32 GetStreamedFilePosition (uint8 nStream); - void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream); - int32 GetStreamedFileLength (uint8 nStream); - bool IsStreamPlaying (uint8 nStream); + void PreloadStreamedFile (uint32 nFile, uint8 nStream = 0); + void PauseStream (bool8 nPauseFlag, uint8 nStream = 0); + void StartPreloadedStreamedFile (uint8 nStream = 0); + bool8 StartStreamedFile (uint32 nFile, uint32 nPos, uint8 nStream = 0); + void StopStreamedFile (uint8 nStream = 0); + int32 GetStreamedFilePosition (uint8 nStream = 0); + void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream = 0); + int32 GetStreamedFileLength (uint8 nStream = 0); + bool8 IsStreamPlaying (uint8 nStream = 0); + void SetStreamedFileLoopFlag (bool8 nLoopFlag, uint8 nStream = 0); #ifdef AUDIO_OAL void Service(void); #endif - bool InitialiseSampleBanks(void); + bool8 InitialiseSampleBanks(void); uint8 GetMusicVolume() const { return m_nMusicVolume; } - void SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nStream); }; extern cSampleManager SampleManager; diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 36f230b4..49f2f10f 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -1,3 +1,4 @@ +#define WITHWINDOWS #include "common.h" #ifdef AUDIO_MSS @@ -28,7 +29,7 @@ char SampleBankDataFilename[] = "AUDIO\\SFX.RAW"; FILE *fpSampleDescHandle; FILE *fpSampleDataHandle; -bool bSampleBankLoaded [MAX_SFX_BANKS]; +bool8 bSampleBankLoaded [MAX_SFX_BANKS]; int32 nSampleBankDiscStartOffset [MAX_SFX_BANKS]; int32 nSampleBankSize [MAX_SFX_BANKS]; int32 nSampleBankMemoryStartAddress[MAX_SFX_BANKS]; @@ -60,14 +61,14 @@ char _mp3DirectoryPath[MAX_PATH]; HSTREAM mp3Stream [MAX_STREAMS]; int8 nStreamPan [MAX_STREAMS]; int8 nStreamVolume[MAX_STREAMS]; -uint8 nStreamLoopedFlag[MAX_STREAMS]; +bool8 nStreamLoopedFlag[MAX_STREAMS]; uint32 _CurMP3Index; int32 _CurMP3Pos; -bool _bIsMp3Active; +bool8 _bIsMp3Active; /////////////////////////////////////////////////////////////// -bool _bSampmanInitialised = false; +bool8 _bSampmanInitialised = FALSE; // // Miscellaneous globals / defines @@ -94,7 +95,7 @@ S32 speaker_type=0; U32 _maxSamples; float _fPrevEaxRatioDestination; -bool _usingMilesFast2D; +bool8 _usingMilesFast2D; float _fEffectsLevel; @@ -166,17 +167,17 @@ release_existing() } _fPrevEaxRatioDestination = 0.0f; - _usingMilesFast2D = false; + _usingMilesFast2D = FALSE; _fEffectsLevel = 0.0f; } -static bool +static bool8 set_new_provider(S32 index) { DWORD result; if ( curprovider == index ) - return true; + return TRUE; //close the already opened provider curprovider = index; @@ -203,7 +204,7 @@ set_new_provider(S32 index) release_existing(); - return false; + return FALSE; } else { @@ -234,7 +235,7 @@ set_new_provider(S32 index) AIL_set_3D_room_type(opened_provider, ENVIRONMENT_CAVE); if ( !strcmp(providers[index].name, "Miles Fast 2D Positional Audio") ) - _usingMilesFast2D = true; + _usingMilesFast2D = TRUE; } AIL_3D_provider_attribute(opened_provider, "Maximum supported samples", &_maxSamples); @@ -252,11 +253,11 @@ set_new_provider(S32 index) AIL_set_3D_sample_effects_level(opened_samples[i], 0.0f); } - return true; + return TRUE; } } - return false; + return FALSE; } U32 RadioHandlers[9]; @@ -459,7 +460,7 @@ cSampleManager::AutoDetect3DProviders() return -1; } -static bool +static bool8 _ResolveLink(char const *path, char *out) { IShellLink* psl; @@ -495,7 +496,7 @@ _ResolveLink(char const *path, char *out) ppf->Release(); psl->Release(); #endif - return true; + return TRUE; } } } @@ -505,15 +506,15 @@ _ResolveLink(char const *path, char *out) psl->Release(); } - return false; + return FALSE; } static void _FindMP3s(void) { tMP3Entry *pList; - bool bShortcut; - bool bInitFirstEntry; + bool8 bShortcut; + bool8 bInitFirstEntry; HANDLE hFind; char path[MAX_PATH]; char filepath[MAX_PATH*2]; @@ -565,10 +566,10 @@ _FindMP3s(void) OutputDebugString(filepath); } - bShortcut = true; + bShortcut = TRUE; } else - bShortcut = false; + bShortcut = FALSE; } mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); @@ -608,7 +609,7 @@ _FindMP3s(void) { _pMP3List->pLinkPath = NULL; } - bInitFirstEntry = false; + bInitFirstEntry = FALSE; } else { @@ -616,10 +617,10 @@ _FindMP3s(void) OutputDebugString(filepath); - bInitFirstEntry = true; + bInitFirstEntry = TRUE; } - while ( true ) + while ( TRUE ) { if ( !FindNextFile(hFind, &fd) ) break; @@ -643,11 +644,11 @@ _FindMP3s(void) OutputDebugString(filepath); } - bShortcut = true; + bShortcut = TRUE; } else { - bShortcut = false; + bShortcut = FALSE; if ( filepathlen > MAX_PATH ) { @@ -690,7 +691,7 @@ _FindMP3s(void) pList = _pMP3List; - bInitFirstEntry = false; + bInitFirstEntry = FALSE; } else { @@ -718,11 +719,11 @@ _FindMP3s(void) OutputDebugString(filepath); } - bShortcut = true; + bShortcut = TRUE; } else { - bShortcut = false; + bShortcut = FALSE; } } @@ -834,7 +835,7 @@ _GetMP3EntryByIndex(uint32 idx) return NULL; } -static inline bool +static inline bool8 _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) { _CurMP3Index = 0; @@ -847,7 +848,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) *pPosition -= (*pEntry)->nTrackStreamPos; _CurMP3Pos = *pPosition; - return true; + return TRUE; } _CurMP3Index++; @@ -858,10 +859,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) _CurMP3Pos = 0; _CurMP3Index = 0; - return false; + return FALSE; } -bool +bool8 cSampleManager::IsMP3RadioChannelAvailable(void) { return nNumMP3s != 0; @@ -890,13 +891,13 @@ cSampleManager::ReacquireDigitalHandle(void) } } -bool +bool8 cSampleManager::Initialise(void) { TRACE("start"); if ( _bSampmanInitialised ) - return true; + return TRUE; { for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ ) @@ -922,7 +923,7 @@ cSampleManager::Initialise(void) curprovider = -1; prevprovider = -1; - _usingMilesFast2D = false; + _usingMilesFast2D = FALSE; usingEAX=0; usingEAX3=0; @@ -947,7 +948,7 @@ cSampleManager::Initialise(void) for ( int32 i = 0; i < MAX_SFX_BANKS; i++ ) { - bSampleBankLoaded[i] = false; + bSampleBankLoaded[i] = FALSE; nSampleBankDiscStartOffset[i] = 0; nSampleBankSize[i] = 0; nSampleBankMemoryStartAddress[i] = 0; @@ -988,24 +989,24 @@ cSampleManager::Initialise(void) #ifdef AUDIO_CACHE TRACE("cache"); FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb"); - bool CreateCache = false; + bool8 CreateCache = FALSE; if (cacheFile) { fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); fclose(cacheFile); }else - CreateCache = true; + CreateCache = TRUE; #endif char filepath[MAX_PATH]; - bool bFileNotFound; + bool8 bFileNotFound; S32 tatalms; TRACE("cdrom"); { - m_bInitialised = false; + m_bInitialised = FALSE; - while (true) + while (TRUE) { // Find path of WAVs (originally in HDD) @@ -1046,7 +1047,7 @@ cSampleManager::Initialise(void) { OutputDebugString(AIL_last_error()); Terminate(); - return false; + return FALSE; } add_providers(); @@ -1076,9 +1077,9 @@ cSampleManager::Initialise(void) } else { - m_bInitialised = false; + m_bInitialised = FALSE; Terminate(); - return false; + return FALSE; } } @@ -1113,7 +1114,7 @@ cSampleManager::Initialise(void) AIL_close_stream(mp3Stream[0]); mp3Stream[0] = NULL; - bFileNotFound = false; + bFileNotFound = FALSE; #ifdef AUDIO_CACHE if (!CreateCache) break; @@ -1124,7 +1125,7 @@ cSampleManager::Initialise(void) } else { - bFileNotFound = true; + bFileNotFound = TRUE; break; } } @@ -1159,11 +1160,11 @@ cSampleManager::Initialise(void) mp3Stream[0] = NULL; nStreamLength[i] = tatalms; - bFileNotFound = false; + bFileNotFound = FALSE; } else { - bFileNotFound = true; + bFileNotFound = TRUE; break; } } @@ -1178,11 +1179,11 @@ cSampleManager::Initialise(void) if ( FrontEndMenuManager.m_bQuitGameNoCD ) { Terminate(); - return false; + return FALSE; } continue; #else - m_bInitialised = true; + m_bInitialised = TRUE; #endif } @@ -1201,14 +1202,14 @@ cSampleManager::Initialise(void) if ( !InitialiseSampleBanks() ) { Terminate(); - return false; + return FALSE; } nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]); if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] ) { Terminate(); - return false; + return FALSE; } nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX); @@ -1237,7 +1238,7 @@ cSampleManager::Initialise(void) TRACE("providerset"); { - _bSampmanInitialised = true; + _bSampmanInitialised = TRUE; U32 n = 0; @@ -1254,7 +1255,7 @@ cSampleManager::Initialise(void) if ( n == m_nNumberOfProviders ) { Terminate(); - return false; + return FALSE; } } @@ -1279,13 +1280,13 @@ cSampleManager::Initialise(void) time_t t = time(NULL); tm *localtm; - bool bUseRandomTable; + bool8 bUseRandomTable; if ( t == -1 ) - bUseRandomTable = true; + bUseRandomTable = TRUE; else { - bUseRandomTable = false; + bUseRandomTable = FALSE; localtm = localtime(&t); } @@ -1317,12 +1318,12 @@ cSampleManager::Initialise(void) else _CurMP3Pos = 0; - _bIsMp3Active = false; + _bIsMp3Active = FALSE; } TRACE("end"); - return true; + return TRUE; } void @@ -1371,10 +1372,10 @@ cSampleManager::Terminate(void) AIL_shutdown(); - _bSampmanInitialised = false; + _bSampmanInitialised = FALSE; } -bool +bool8 cSampleManager::CheckForAnAudioFileOnCD(void) { #if !defined(NO_CDCHECK) // TODO: check steam, probably GTAVC_STEAM_PATCH needs to be added @@ -1392,17 +1393,17 @@ cSampleManager::CheckForAnAudioFileOnCD(void) DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume); DMAudio.Service(); - return true; + return TRUE; } DMAudio.SetMusicMasterVolume(0); DMAudio.SetEffectsMasterVolume(0); DMAudio.Service(); - return false; + return FALSE; #else - return true; + return TRUE; #endif // #if !defined(NO_CDCHECK) } @@ -1484,48 +1485,48 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume) } void -cSampleManager::SetMonoMode(uint8 nMode) +cSampleManager::SetMonoMode(bool8 nMode) { m_nMonoMode = nMode; } -bool +bool8 cSampleManager::LoadSampleBank(uint8 nBank) { if ( CTimer::GetIsCodePaused() ) - return false; + return FALSE; if ( MusicManager.IsInitialised() && MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE && nBank != SFX_BANK_0 ) { - return false; + return FALSE; } if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 ) - return false; + return FALSE; if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank],fpSampleDataHandle) != nSampleBankSize[nBank] ) - return false; + return FALSE; - bSampleBankLoaded[nBank] = true; + bSampleBankLoaded[nBank] = TRUE; - return true; + return TRUE; } void cSampleManager::UnloadSampleBank(uint8 nBank) { - bSampleBankLoaded[nBank] = false; + bSampleBankLoaded[nBank] = FALSE; } -bool +bool8 cSampleManager::IsSampleBankLoaded(uint8 nBank) { return bSampleBankLoaded[nBank]; } -bool +bool8 cSampleManager::IsPedCommentLoaded(uint32 nComment) { int8 slot; @@ -1538,10 +1539,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment) slot += ARRAY_SIZE(nPedSlotSfx); #endif if ( nComment == nPedSlotSfx[slot] ) - return true; + return TRUE; } - return false; + return FALSE; } int32 @@ -1563,11 +1564,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment) return -1; } -bool +bool8 cSampleManager::LoadPedComment(uint32 nComment) { if ( CTimer::GetIsCodePaused() ) - return false; + return FALSE; // no talking peds during cutsenes or the game end if ( MusicManager.IsInitialised() ) @@ -1576,7 +1577,7 @@ cSampleManager::LoadPedComment(uint32 nComment) { case MUSICMODE_CUTSCENE: { - return false; + return FALSE; break; } @@ -1584,10 +1585,10 @@ cSampleManager::LoadPedComment(uint32 nComment) } if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 ) - return false; + return FALSE; if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize ) - return false; + return FALSE; nPedSlotSfxAddr[nCurrentPedSlot] = nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot; nPedSlotSfx [nCurrentPedSlot] = nComment; @@ -1595,7 +1596,7 @@ cSampleManager::LoadPedComment(uint32 nComment) if ( ++nCurrentPedSlot >= MAX_PEDSFX ) nCurrentPedSlot = 0; - return true; + return TRUE; } int32 @@ -1634,14 +1635,14 @@ cSampleManager::GetSampleLength(uint32 nSample) return m_aSamples[nSample].nSize >> 1; } -bool +bool8 cSampleManager::UpdateReverb(void) { if ( !usingEAX ) - return false; + return FALSE; if ( AudioManager.GetFrameCounter() & 15 ) - return false; + return FALSE; float fRatio = 0.0f; @@ -1659,10 +1660,10 @@ cSampleManager::UpdateReverb(void) #undef CALCULATE_RATIO #undef MIN_DIST - fRatio = clamp(fRatio, 0.0f, 0.6f); + fRatio = Clamp(fRatio, 0.0f, 0.6f); if ( fRatio == _fPrevEaxRatioDestination ) - return false; + return FALSE; if ( usingEAX3 ) { @@ -1684,26 +1685,26 @@ cSampleManager::UpdateReverb(void) _fPrevEaxRatioDestination = fRatio; - return true; + return TRUE; } void -cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag) +cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } if ( usingEAX ) { - if ( nReverbFlag != 0 ) + if ( nReverbFlag != FALSE ) { if ( !b2d ) AIL_set_3D_sample_effects_level(opened_samples[nChannel], _fEffectsLevel); @@ -1716,16 +1717,16 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag) } } -bool +bool8 cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } @@ -1735,14 +1736,14 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) if ( nSfx < SAMPLEBANK_MAX ) { if ( !IsSampleBankLoaded(nBank) ) - return false; + return FALSE; addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset; } else { if ( !IsPedCommentLoaded(nSfx) ) - return false; + return FALSE; int32 slot = _GetPedCommentSlot(nSfx); @@ -1754,10 +1755,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) if ( opened_2dsamples[nChannel - MAXCHANNELS] ) { AIL_set_sample_address(opened_2dsamples[nChannel - MAXCHANNELS], (void *)addr, m_aSamples[nSfx].nSize); - return true; + return TRUE; } else - return false; + return FALSE; } else { @@ -1773,10 +1774,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) if ( AIL_set_3D_sample_info(opened_samples[nChannel], &info) == 0 ) { OutputDebugString(AIL_last_error()); - return false; + return FALSE; } - return true; + return TRUE; } } @@ -1823,7 +1824,7 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume) switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { nChannelVolume[nChannel] = vol; @@ -1850,7 +1851,7 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) { switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { #ifndef FIX_BUGS if ( opened_samples[nChannel - MAXCHANNELS] ) // BUG @@ -1867,13 +1868,13 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) void cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } @@ -1893,13 +1894,13 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq) void cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } @@ -1919,13 +1920,13 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n void cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } @@ -1942,16 +1943,16 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount) } } -bool +bool8 cSampleManager::GetChannelUsedFlag(uint32 nChannel) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } @@ -1961,14 +1962,14 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel) if ( opened_2dsamples[nChannel - MAXCHANNELS] ) return AIL_sample_status(opened_2dsamples[nChannel - MAXCHANNELS]) == SMP_PLAYING; else - return false; + return FALSE; } else { if ( opened_samples[nChannel] ) return AIL_3D_sample_status(opened_samples[nChannel]) == SMP_PLAYING; else - return false; + return FALSE; } } @@ -1976,13 +1977,13 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel) void cSampleManager::StartChannel(uint32 nChannel) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } @@ -2002,13 +2003,13 @@ cSampleManager::StartChannel(uint32 nChannel) void cSampleManager::StopChannel(uint32 nChannel) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { - case CHANNEL2D: + case CHANNEL_POLICE_RADIO: { - b2d = true; + b2d = TRUE; break; } } @@ -2060,12 +2061,12 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream) } void -cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream) +cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream) { if ( m_bInitialised ) { if ( mp3Stream[nStream] ) - AIL_pause_stream(mp3Stream[nStream], nPauseFlag != 0); + AIL_pause_stream(mp3Stream[nStream], nPauseFlag != FALSE); } } @@ -2079,146 +2080,140 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream) } } -bool +bool8 cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) { + int i = 0; uint32 position = nPos; char filename[MAX_PATH]; - if ( m_bInitialised && nFile < TOTAL_STREAMED_SOUNDS ) + if ( !m_bInitialised || nFile >= TOTAL_STREAMED_SOUNDS ) + return FALSE; + + if ( mp3Stream[nStream] ) { - if ( mp3Stream[nStream] ) - { - AIL_pause_stream(mp3Stream[nStream], 1); - AIL_close_stream(mp3Stream[nStream]); - } - - if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER ) + AIL_pause_stream(mp3Stream[nStream], 1); + AIL_close_stream(mp3Stream[nStream]); + } + if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER ) + { + do { - uint32 i = 0; - do { - if(i != 0 || _bIsMp3Active) { - if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0; - - _CurMP3Pos = 0; - - tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index); - - if(mp3) { - mp3 = _pMP3List; - if(mp3 == NULL) { - _bIsMp3Active = false; - nFile = 0; - strcpy(filename, m_MiscomPath); - strcat(filename, StreamedNameTable[nFile]); - - mp3Stream[nStream] = - AIL_open_stream(DIG, filename, 0); - if(mp3Stream[nStream]) { - AIL_set_stream_loop_count( - mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); - nStreamLoopedFlag[nStream] = true; - AIL_set_stream_ms_position( - mp3Stream[nStream], position); - AIL_pause_stream(mp3Stream[nStream], - 0); - return true; - } - - return false; - } + // Just switched to MP3 player + if ( !_bIsMp3Active && i == 0 ) + { + if ( nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER] ) + position = 0; + tMP3Entry *e = _pMP3List; + + // Try to continue from previous song, if already started + if(!_GetMP3PosFromStreamPos(&position, &e) && !e) { + nFile = 0; + strcpy(filename, m_MiscomPath); + strcat(filename, StreamedNameTable[nFile]); + mp3Stream[nStream] = + AIL_open_stream(DIG, filename, 0); + if(mp3Stream[nStream]) { + AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); + nStreamLoopedFlag[nStream] = TRUE; + AIL_set_stream_ms_position(mp3Stream[nStream], position); + AIL_pause_stream(mp3Stream[nStream], 0); + return TRUE; } + return FALSE; - if(mp3->pLinkPath != NULL) - mp3Stream[nStream] = - AIL_open_stream(DIG, mp3->pLinkPath, 0); + } else { + if ( e->pLinkPath != NULL ) + mp3Stream[nStream] = AIL_open_stream(DIG, e->pLinkPath, 0); else { strcpy(filename, _mp3DirectoryPath); - strcat(filename, mp3->aFilename); - - mp3Stream[nStream] = - AIL_open_stream(DIG, filename, 0); + strcat(filename, e->aFilename); + + mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); } - - if(mp3Stream[nStream]) { + + if ( mp3Stream[nStream] ) { AIL_set_stream_loop_count(mp3Stream[nStream], 1); - AIL_set_stream_ms_position(mp3Stream[nStream], 0); + AIL_set_stream_ms_position(mp3Stream[nStream], position); AIL_pause_stream(mp3Stream[nStream], 0); - return true; + + _bIsMp3Active = TRUE; + + return TRUE; } - - _bIsMp3Active = false; - continue; + // fall through, start playing from another song } - if ( nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER] ) - position = 0; - - tMP3Entry *e; - if ( !_GetMP3PosFromStreamPos(&position, &e) ) + } else { + if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0; + + _CurMP3Pos = 0; + + tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index); + if ( !mp3 ) { - if ( e == NULL ) + mp3 = _pMP3List; + if ( !_pMP3List ) { nFile = 0; + _bIsMp3Active = 0; strcpy(filename, m_MiscomPath); strcat(filename, StreamedNameTable[nFile]); + mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); if(mp3Stream[nStream]) { - AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); - nStreamLoopedFlag[nStream] = true; - AIL_set_stream_ms_position(mp3Stream[nStream], position); - AIL_pause_stream(mp3Stream[nStream], 0); - return true; + AIL_set_stream_loop_count( + mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); + nStreamLoopedFlag[nStream] = TRUE; + AIL_set_stream_ms_position( + mp3Stream[nStream], position); + AIL_pause_stream(mp3Stream[nStream], + 0); + return TRUE; } - - return false; + return FALSE; } } - - if ( e->pLinkPath != NULL ) - mp3Stream[nStream] = AIL_open_stream(DIG, e->pLinkPath, 0); - else - { + if(mp3->pLinkPath != NULL) + mp3Stream[nStream] = AIL_open_stream(DIG, mp3->pLinkPath, 0); + else { strcpy(filename, _mp3DirectoryPath); - strcat(filename, e->aFilename); - - mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); + strcat(filename, mp3->aFilename); + + mp3Stream[nStream] = + AIL_open_stream(DIG, filename, 0); } - - if ( mp3Stream[nStream] ) - { + + if(mp3Stream[nStream]) { AIL_set_stream_loop_count(mp3Stream[nStream], 1); - AIL_set_stream_ms_position(mp3Stream[nStream], position); + AIL_set_stream_ms_position(mp3Stream[nStream], 0); AIL_pause_stream(mp3Stream[nStream], 0); - - _bIsMp3Active = true; - - return true; +#ifdef FIX_BUGS + _bIsMp3Active = TRUE; +#endif + return TRUE; } - - _bIsMp3Active = false; - } while(++i < nNumMP3s); - - position = 0; - nFile = 0; - } - - strcpy(filename, m_MiscomPath); - strcat(filename, StreamedNameTable[nFile]); - - mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); - if ( mp3Stream[nStream] ) - { - AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); - nStreamLoopedFlag[nStream] = true; - AIL_set_stream_ms_position(mp3Stream[nStream], position); - AIL_pause_stream(mp3Stream[nStream], 0); - return true; + } + _bIsMp3Active = 0; } + while ( ++i < nNumMP3s ); + position = 0; + nFile = 0; } + strcpy(filename, m_MiscomPath); + strcat(filename, StreamedNameTable[nFile]); - return false; + mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); + if ( mp3Stream[nStream] ) + { + AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); + nStreamLoopedFlag[nStream] = TRUE; + AIL_set_stream_ms_position(mp3Stream[nStream], position); + AIL_pause_stream(mp3Stream[nStream], 0); + return TRUE; + } + return FALSE; } void @@ -2234,7 +2229,7 @@ cSampleManager::StopStreamedFile(uint8 nStream) mp3Stream[nStream] = NULL; if ( nStream == 0 ) - _bIsMp3Active = false; + _bIsMp3Active = FALSE; } } } @@ -2272,7 +2267,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream) } void -cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream) +cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream) { uint8 vol = nVolume; float boostMult = 0.0f; @@ -2313,7 +2308,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream) return 0; } -bool +bool8 cSampleManager::IsStreamPlaying(uint8 nStream) { if ( m_bInitialised ) @@ -2321,23 +2316,23 @@ cSampleManager::IsStreamPlaying(uint8 nStream) if ( mp3Stream[nStream] ) { if ( AIL_stream_status(mp3Stream[nStream]) == SMP_PLAYING ) - return true; + return TRUE; else - return false; + return FALSE; } } - return false; + return FALSE; } -bool +bool8 cSampleManager::InitialiseSampleBanks(void) { int32 nBank = SFX_BANK_0; fpSampleDescHandle = fopen(SampleBankDescFilename, "rb"); if ( fpSampleDescHandle == NULL ) - return false; + return FALSE; fpSampleDataHandle = fopen(SampleBankDataFilename, "rb"); if ( fpSampleDataHandle == NULL ) @@ -2345,7 +2340,7 @@ cSampleManager::InitialiseSampleBanks(void) fclose(fpSampleDescHandle); fpSampleDescHandle = NULL; - return false; + return FALSE; } fseek(fpSampleDataHandle, 0, SEEK_END); @@ -2372,12 +2367,12 @@ cSampleManager::InitialiseSampleBanks(void) nSampleBankSize[SFX_BANK_0] = nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS] - nSampleBankDiscStartOffset[SFX_BANK_0]; nSampleBankSize[SFX_BANK_PED_COMMENTS] = _nSampleDataEndOffset - nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS]; - return true; + return TRUE; } void -cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel) +cSampleManager::SetStreamedFileLoopFlag(bool8 nLoopFlag, uint8 nChannel) { if (m_bInitialised) nStreamLoopedFlag[nChannel] = nLoopFlag; diff --git a/src/audio/sampman_null.cpp b/src/audio/sampman_null.cpp index e9a9eaa1..af4c54ad 100644 --- a/src/audio/sampman_null.cpp +++ b/src/audio/sampman_null.cpp @@ -4,7 +4,7 @@ #include "AudioManager.h" cSampleManager SampleManager; -bool _bSampmanInitialised = false; +bool8 _bSampmanInitialised = FALSE; uint32 BankStartOffset[MAX_SFX_BANKS]; uint32 nNumMP3s; @@ -60,7 +60,7 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider) return 0; } -bool +bool8 cSampleManager::IsMP3RadioChannelAvailable(void) { return nNumMP3s != 0; @@ -75,10 +75,10 @@ void cSampleManager::ReacquireDigitalHandle(void) { } -bool +bool8 cSampleManager::Initialise(void) { - return true; + return TRUE; } void @@ -87,9 +87,9 @@ cSampleManager::Terminate(void) } -bool cSampleManager::CheckForAnAudioFileOnCD(void) +bool8 cSampleManager::CheckForAnAudioFileOnCD(void) { - return true; + return TRUE; } char cSampleManager::GetCDAudioDriveLetter(void) @@ -114,7 +114,7 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume) } void -cSampleManager::SetMusicMasterVolume(uint8 nVolume) +cSampleManager::SetMP3BoostVolume(uint8 nVolume) { } @@ -129,15 +129,15 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume) } void -cSampleManager::SetMonoMode(uint8 nMode) +cSampleManager::SetMonoMode(bool8 nMode) { } -bool +bool8 cSampleManager::LoadSampleBank(uint8 nBank) { ASSERT( nBank < MAX_SFX_BANKS ); - return false; + return FALSE; } void @@ -146,20 +146,20 @@ cSampleManager::UnloadSampleBank(uint8 nBank) ASSERT( nBank < MAX_SFX_BANKS ); } -bool +bool8 cSampleManager::IsSampleBankLoaded(uint8 nBank) { ASSERT( nBank < MAX_SFX_BANKS ); - return false; + return FALSE; } -bool +bool8 cSampleManager::IsPedCommentLoaded(uint32 nComment) { ASSERT( nComment < TOTAL_AUDIO_SAMPLES ); - return false; + return FALSE; } @@ -169,11 +169,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment) return -1; } -bool +bool8 cSampleManager::LoadPedComment(uint32 nComment) { ASSERT( nComment < TOTAL_AUDIO_SAMPLES ); - return false; + return FALSE; } int32 @@ -210,56 +210,56 @@ cSampleManager::GetSampleLength(uint32 nSample) return 0; } -bool cSampleManager::UpdateReverb(void) +bool8 cSampleManager::UpdateReverb(void) { - return false; + return FALSE; } void -cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag) +cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag) { ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } -bool +bool8 cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) { ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); - return false; + return FALSE; } void cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume) { - ASSERT( nChannel != CHANNEL2D ); + ASSERT( nChannel < MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannel3DPosition(uint32 nChannel, float fX, float fY, float fZ) { - ASSERT( nChannel != CHANNEL2D ); + ASSERT( nChannel < MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannel3DDistances(uint32 nChannel, float fMax, float fMin) { - ASSERT( nChannel != CHANNEL2D ); + ASSERT( nChannel < MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume) { - ASSERT( nChannel == CHANNEL2D ); + ASSERT( nChannel >= MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) { - ASSERT(nChannel == CHANNEL2D); + ASSERT( nChannel >= MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } @@ -281,12 +281,12 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount) ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } -bool +bool8 cSampleManager::GetChannelUsedFlag(uint32 nChannel) { ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); - return false; + return FALSE; } void @@ -308,7 +308,7 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream) } void -cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream) +cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream) { ASSERT( nStream < MAX_STREAMS ); } @@ -319,12 +319,12 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream) ASSERT( nStream < MAX_STREAMS ); } -bool +bool8 cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) { ASSERT( nStream < MAX_STREAMS ); - return false; + return FALSE; } void @@ -342,7 +342,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream) } void -cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream) +cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream) { ASSERT( nStream < MAX_STREAMS ); } @@ -355,23 +355,23 @@ cSampleManager::GetStreamedFileLength(uint8 nStream) return 1; } -bool +bool8 cSampleManager::IsStreamPlaying(uint8 nStream) { ASSERT( nStream < MAX_STREAMS ); - return false; + return FALSE; } -bool +bool8 cSampleManager::InitialiseSampleBanks(void) { - return true; + return TRUE; } void -cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel) +cSampleManager::SetStreamedFileLoopFlag(bool8 nLoopFlag, uint8 nChannel) { } diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index ae4b1cbb..6740f08f 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -34,6 +34,13 @@ #include "oal/oal_utils.h" #include "oal/aldlist.h" #include "oal/channel.h" + +#include <utility> +#ifdef MULTITHREADED_AUDIO +#include <mutex> +#include <queue> +#include <condition_variable> +#endif #include "oal/stream.h" #include "AudioManager.h" @@ -45,10 +52,9 @@ #endif //TODO: fix eax3 reverb -//TODO: max channels cSampleManager SampleManager; -bool _bSampmanInitialised = false; +bool8 _bSampmanInitialised = FALSE; uint32 BankStartOffset[MAX_SFX_BANKS]; @@ -60,16 +66,18 @@ int usingEAX3=0; ALCdevice *ALDevice = NULL; ALCcontext *ALContext = NULL; unsigned int _maxSamples; -float _fPrevEaxRatioDestination; +float _fPrevEaxRatioDestination; +bool _effectsSupported = false; bool _usingEFX; float _fEffectsLevel; ALuint ALEffect = AL_EFFECT_NULL; ALuint ALEffectSlot = AL_EFFECTSLOT_NULL; struct -{ - char id[256]; +{ + const char *id; char name[256]; int sources; + bool bSupportsFx; }providers[MAXPROVIDERS]; int defaultProvider; @@ -84,7 +92,7 @@ OggOpusFile *fpSampleDataHandle; #else FILE *fpSampleDataHandle; #endif -bool bSampleBankLoaded [MAX_SFX_BANKS]; +bool8 bSampleBankLoaded [MAX_SFX_BANKS]; int32 nSampleBankDiscStartOffset [MAX_SFX_BANKS]; int32 nSampleBankSize [MAX_SFX_BANKS]; uintptr nSampleBankMemoryStartAddress[MAX_SFX_BANKS]; @@ -94,8 +102,8 @@ int32 nPedSlotSfx [MAX_PEDSFX]; int32 nPedSlotSfxAddr[MAX_PEDSFX]; uint8 nCurrentPedSlot; -CChannel aChannel[MAXCHANNELS+MAX2DCHANNELS]; -uint8 nChannelVolume[MAXCHANNELS+MAX2DCHANNELS]; +CChannel aChannel[NUM_CHANNELS]; +uint8 nChannelVolume[NUM_CHANNELS]; uint32 nStreamLength[TOTAL_STREAMED_SOUNDS]; ALuint ALStreamSources[MAX_STREAMS][2]; @@ -118,10 +126,10 @@ char _mp3DirectoryPath[MAX_PATH]; CStream *aStream[MAX_STREAMS]; uint8 nStreamPan [MAX_STREAMS]; uint8 nStreamVolume[MAX_STREAMS]; -uint8 nStreamLoopedFlag[MAX_STREAMS]; +bool8 nStreamLoopedFlag[MAX_STREAMS]; uint32 _CurMP3Index; int32 _CurMP3Pos; -bool _bIsMp3Active; +bool8 _bIsMp3Active; /////////////////////////////////////////////////////////////// // Env Size Diffus Room RoomHF RoomLF DecTm DcHF DcLF Refl RefDel Ref Pan Revb RevDel Rev Pan EchTm EchDp ModTm ModDp AirAbs HFRef LFRef RRlOff FLAGS EAXLISTENERPROPERTIES StartEAX3 = @@ -135,7 +143,7 @@ EAXLISTENERPROPERTIES EAX3Params; bool IsFXSupported() { - return usingEAX || usingEAX3 || _usingEFX; + return _effectsSupported; // usingEAX || usingEAX3 || _usingEFX; } void EAX_SetAll(const EAXLISTENERPROPERTIES *allparameters) @@ -150,21 +158,22 @@ static void add_providers() { SampleManager.SetNum3DProvidersAvailable(0); - - ALDeviceList *pDeviceList = NULL; - pDeviceList = new ALDeviceList(); + + static ALDeviceList DeviceList; + ALDeviceList *pDeviceList = &DeviceList; if ((pDeviceList) && (pDeviceList->GetNumDevices())) { const int devNumber = Min(pDeviceList->GetNumDevices(), MAXPROVIDERS); int n = 0; - for (int i = 0; i < devNumber; i++) + //for (int i = 0; i < devNumber; i++) + int i = pDeviceList->GetDefaultDevice(); { if ( n < MAXPROVIDERS ) - { - strcpy(providers[n].id, pDeviceList->GetDeviceName(i)); - strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name)); + { + providers[n].id = pDeviceList->GetDeviceName(i); + strcpy(providers[n].name, "OPENAL SOFT"); providers[n].sources = pDeviceList->GetMaxNumSources(i); SampleManager.Set3DProviderName(n, providers[n].name); n++; @@ -175,23 +184,24 @@ add_providers() || pDeviceList->IsExtensionSupported(i, ADEXT_EAX3) || pDeviceList->IsExtensionSupported(i, ADEXT_EAX4) || pDeviceList->IsExtensionSupported(i, ADEXT_EAX5) ) - { + { + providers[n - 1].bSupportsFx = true; if ( n < MAXPROVIDERS ) - { - strcpy(providers[n].id, pDeviceList->GetDeviceName(i)); - strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name)); - strcat(providers[n].name, " EAX"); + { + providers[n].id = pDeviceList->GetDeviceName(i); + strcpy(providers[n].name, "OPENAL SOFT EAX"); providers[n].sources = pDeviceList->GetMaxNumSources(i); + providers[n].bSupportsFx = true; SampleManager.Set3DProviderName(n, providers[n].name); n++; } if ( n < MAXPROVIDERS ) - { - strcpy(providers[n].id, pDeviceList->GetDeviceName(i)); - strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name)); - strcat(providers[n].name, " EAX3"); + { + providers[n].id = pDeviceList->GetDeviceName(i); + strcpy(providers[n].name, "OPENAL SOFT EAX3"); providers[n].sources = pDeviceList->GetMaxNumSources(i); + providers[n].bSupportsFx = true; SampleManager.Set3DProviderName(n, providers[n].name); n++; } @@ -201,76 +211,38 @@ add_providers() for(int j=n;j<MAXPROVIDERS;j++) SampleManager.Set3DProviderName(j, NULL); - - defaultProvider = pDeviceList->GetDefaultDevice(); - if ( defaultProvider > MAXPROVIDERS ) - defaultProvider = 0; + + // devices are gone now + //defaultProvider = pDeviceList->GetDefaultDevice(); + //if ( defaultProvider > MAXPROVIDERS ) + defaultProvider = 0; } - - delete pDeviceList; } static void release_existing() { - for ( int32 i = 0; i < MAXCHANNELS; i++ ) - aChannel[i].Term(); - aChannel[CHANNEL2D].Term(); - if ( IsFXSupported() ) { if ( alIsEffect(ALEffect) ) { alEffecti(ALEffect, AL_EFFECT_TYPE, AL_EFFECT_NULL); - alDeleteEffects(1, &ALEffect); - ALEffect = AL_EFFECT_NULL; } if (alIsAuxiliaryEffectSlot(ALEffectSlot)) { alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL); - - alDeleteAuxiliaryEffectSlots(1, &ALEffectSlot); - ALEffectSlot = AL_EFFECTSLOT_NULL; } } - - for ( int32 i = 0; i < MAX_STREAMS; i++ ) - { - CStream *stream = aStream[i]; - if (stream) - stream->ProviderTerm(); - - alDeleteBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]); - } - alDeleteSources(MAX_STREAMS*2, ALStreamSources[0]); - - CChannel::DestroyChannels(); - - if ( ALContext ) - { - alcMakeContextCurrent(NULL); - alcSuspendContext(ALContext); - alcDestroyContext(ALContext); - } - if ( ALDevice ) - alcCloseDevice(ALDevice); - - ALDevice = NULL; - ALContext = NULL; - - _fPrevEaxRatioDestination = 0.0f; - _usingEFX = false; - _fEffectsLevel = 0.0f; - + DEV("release_existing()\n"); } -static bool +static bool8 set_new_provider(int index) { if ( curprovider == index ) - return true; + return TRUE; curprovider = index; @@ -280,61 +252,6 @@ set_new_provider(int index) { DEV("set_new_provider()\n"); - //TODO: - _maxSamples = MAXCHANNELS; - - ALCint attr[] = {ALC_FREQUENCY,MAX_FREQ, - ALC_MONO_SOURCES, MAX_STREAMS * 2 + MAXCHANNELS, - 0, - }; - - ALDevice = alcOpenDevice(providers[index].id); - ASSERT(ALDevice != NULL); - - ALContext = alcCreateContext(ALDevice, attr); - ASSERT(ALContext != NULL); - - alcMakeContextCurrent(ALContext); - - const char* ext=(const char*)alGetString(AL_EXTENSIONS); - ASSERT(strstr(ext,"AL_SOFT_loop_points")!=NULL); - if ( strstr(ext,"AL_SOFT_loop_points")==NULL ) - { - curprovider=-1; - release_existing(); - return false; - } - - alListenerf (AL_GAIN, 1.0f); - alListener3f(AL_POSITION, 0.0f, 0.0f, 0.0f); - alListener3f(AL_VELOCITY, 0.0f, 0.0f, 0.0f); - ALfloat orientation[6] = { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f }; - alListenerfv(AL_ORIENTATION, orientation); - - alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); - - if ( alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) ) - { - alGenAuxiliaryEffectSlots(1, &ALEffectSlot); - alGenEffects(1, &ALEffect); - } - - alGenSources(MAX_STREAMS*2, ALStreamSources[0]); - for ( int32 i = 0; i < MAX_STREAMS; i++ ) - { - alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]); - alSourcei(ALStreamSources[i][0], AL_SOURCE_RELATIVE, AL_TRUE); - alSource3f(ALStreamSources[i][0], AL_POSITION, 0.0f, 0.0f, 0.0f); - alSourcef(ALStreamSources[i][0], AL_GAIN, 1.0f); - alSourcei(ALStreamSources[i][1], AL_SOURCE_RELATIVE, AL_TRUE); - alSource3f(ALStreamSources[i][1], AL_POSITION, 0.0f, 0.0f, 0.0f); - alSourcef(ALStreamSources[i][1], AL_GAIN, 1.0f); - - CStream *stream = aStream[i]; - if (stream) - stream->ProviderInit(); - } - usingEAX = 0; usingEAX3 = 0; _usingEFX = false; @@ -342,16 +259,16 @@ set_new_provider(int index) if ( !strcmp(&providers[index].name[strlen(providers[index].name) - strlen(" EAX3")], " EAX3") && alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) ) { - EAX_SetAll(&FinishEAX3); usingEAX = 1; usingEAX3 = 1; + alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect); + EAX_SetAll(&FinishEAX3); DEV("EAX3\n"); } else if ( alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) ) { - EAX_SetAll(&EAX30_ORIGINAL_PRESETS[EAX_ENVIRONMENT_CAVE]); if ( !strcmp(&providers[index].name[strlen(providers[index].name) - strlen(" EAX")], " EAX")) { @@ -363,33 +280,25 @@ set_new_provider(int index) _usingEFX = true; DEV("EFX\n"); } + alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect); + EAX_SetAll(&EAX30_ORIGINAL_PRESETS[EAX_ENVIRONMENT_CAVE]); } //SampleManager.SetSpeakerConfig(speaker_type); - CChannel::InitChannels(); - - for ( int32 i = 0; i < MAXCHANNELS; i++ ) - aChannel[i].Init(i); - aChannel[CHANNEL2D].Init(CHANNEL2D, true); - if ( IsFXSupported() ) { - /**/ - alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect); - /**/ - for ( int32 i = 0; i < MAXCHANNELS; i++ ) aChannel[i].SetReverbMix(ALEffectSlot, 0.0f); } - return true; + return TRUE; } - return false; + return FALSE; } -static bool +static bool8 IsThisTrackAt16KHz(uint32 track) { return track == STREAMED_SOUND_RADIO_KCHAT || track == STREAMED_SOUND_RADIO_VCPR || track == STREAMED_SOUND_RADIO_POLICE; @@ -447,7 +356,7 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider) { int savedprovider = curprovider; - nProvider = clamp(nProvider, 0, m_nNumberOfProviders - 1); + nProvider = Clamp(nProvider, 0, m_nNumberOfProviders - 1); if ( set_new_provider(nProvider) ) return curprovider; @@ -482,13 +391,13 @@ cSampleManager::AutoDetect3DProviders() return -1; } -static bool +static bool8 _ResolveLink(char const *path, char *out) { #ifdef _WIN32 size_t len = strlen(path); if (len < 4 || strcmp(&path[len - 4], ".lnk") != 0) - return false; + return FALSE; IShellLink* psl; WIN32_FIND_DATA fd; @@ -523,7 +432,7 @@ _ResolveLink(char const *path, char *out) ppf->Release(); psl->Release(); #endif - return true; + return TRUE; } } } @@ -533,31 +442,31 @@ _ResolveLink(char const *path, char *out) psl->Release(); } - return false; + return FALSE; #else struct stat sb; if (lstat(path, &sb) == -1) { perror("lstat: "); - return false; + return FALSE; } if (S_ISLNK(sb.st_mode)) { char* linkname = (char*)alloca(sb.st_size + 1); if (linkname == NULL) { fprintf(stderr, "insufficient memory\n"); - return false; + return FALSE; } if (readlink(path, linkname, sb.st_size + 1) < 0) { perror("readlink: "); - return false; + return FALSE; } linkname[sb.st_size] = '\0'; strcpy(out, linkname); - return true; + return TRUE; } else { - return false; + return FALSE; } #endif } @@ -566,22 +475,36 @@ static void _FindMP3s(void) { tMP3Entry *pList; - bool bShortcut; - bool bInitFirstEntry; + bool8 bShortcut; + bool8 bInitFirstEntry; HANDLE hFind; char path[MAX_PATH]; - char filepath[MAX_PATH*2]; int total_ms; WIN32_FIND_DATA fd; + char filepath[MAX_PATH + sizeof(fd.cFileName)]; if (getcwd(_mp3DirectoryPath, MAX_PATH) == NULL) { perror("getcwd: "); return; } + + if (strlen(_mp3DirectoryPath) + 1 > MAX_PATH - 10) { + // This is not gonna end well + printf("MP3 folder path is too long, no place left for file names. MP3 finding aborted.\n"); + return; + } OutputDebugString("Finding MP3s..."); strcpy(path, _mp3DirectoryPath); strcat(path, "\\MP3\\"); + +#if !defined(_WIN32) + char *actualPath = casepath(path); + if (actualPath) { + strcpy(path, actualPath); + free(actualPath); + } +#endif strcpy(_mp3DirectoryPath, path); OutputDebugString(_mp3DirectoryPath); @@ -594,135 +517,69 @@ _FindMP3s(void) { return; } - - strcpy(filepath, _mp3DirectoryPath); - strcat(filepath, fd.cFileName); - - size_t filepathlen = strlen(filepath); - - if ( filepathlen <= 0) - { - FindClose(hFind); - return; - } - - if ( _ResolveLink(filepath, filepath) ) - { - OutputDebugString("Resolving Link"); - OutputDebugString(filepath); - bShortcut = true; - } else - bShortcut = false; - - aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]); - if (aStream[0] && aStream[0]->IsOpened()) - { - total_ms = aStream[0]->GetLengthMS(); - delete aStream[0]; - aStream[0] = NULL; + bShortcut = FALSE; + bInitFirstEntry = TRUE; - OutputDebugString(fd.cFileName); - - _pMP3List = new tMP3Entry; - - if ( _pMP3List == NULL ) - { - FindClose(hFind); - return; - } - - nNumMP3s = 1; - - strcpy(_pMP3List->aFilename, fd.cFileName); - - _pMP3List->nTrackLength = total_ms; - - _pMP3List->pNext = NULL; - - pList = _pMP3List; - - if ( bShortcut ) - { - _pMP3List->pLinkPath = new char[MAX_PATH*2]; - strcpy(_pMP3List->pLinkPath, filepath); - } - else - { - _pMP3List->pLinkPath = NULL; - } + do + { + strcpy(filepath, _mp3DirectoryPath); + strcat(filepath, fd.cFileName); + + if (!strcmp(fd.cFileName, ".") || !strcmp(fd.cFileName, "..")) + continue; - bInitFirstEntry = false; - } - else - { - strcat(filepath, " - NOT A VALID MP3"); - - OutputDebugString(filepath); + size_t filepathlen = strlen(filepath); - bInitFirstEntry = true; - } - - while ( true ) - { - if ( !FindNextFile(hFind, &fd) ) - break; - if ( bInitFirstEntry ) { - strcpy(filepath, _mp3DirectoryPath); - strcat(filepath, fd.cFileName); - - size_t filepathlen = strlen(filepath); - - if ( filepathlen > 0 ) + if (filepathlen > 0) { - if ( _ResolveLink(filepath, filepath) ) + if (_ResolveLink(filepath, filepath)) { OutputDebugString("Resolving Link"); OutputDebugString(filepath); - bShortcut = true; - } else { - bShortcut = false; + bShortcut = TRUE; + } + else + { + bShortcut = FALSE; if (filepathlen > MAX_PATH) { continue; } } - aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]); - - if (aStream[0] && aStream[0]->IsOpened()) + if (aStream[0] && aStream[0]->Open(filepath)) { total_ms = aStream[0]->GetLengthMS(); - delete aStream[0]; - aStream[0] = NULL; + aStream[0]->Close(); OutputDebugString(fd.cFileName); - + _pMP3List = new tMP3Entry; - - if ( _pMP3List == NULL) + + if (_pMP3List == NULL) break; - + nNumMP3s = 1; - + strcpy(_pMP3List->aFilename, fd.cFileName); - + _pMP3List->nTrackLength = total_ms; _pMP3List->pNext = NULL; - - if ( bShortcut ) + + if (bShortcut) { - _pMP3List->pLinkPath = new char [MAX_PATH*2]; + _pMP3List->pLinkPath = new char[MAX_PATH + sizeof(fd.cFileName)]; strcpy(_pMP3List->pLinkPath, filepath); } else { _pMP3List->pLinkPath = NULL; } - + pList = _pMP3List; - bInitFirstEntry = false; + bInitFirstEntry = FALSE; } else { @@ -730,31 +587,26 @@ _FindMP3s(void) OutputDebugString(filepath); } } + else + break; } else { - strcpy(filepath, _mp3DirectoryPath); - strcat(filepath, fd.cFileName); - - size_t filepathlen = strlen(filepath); - if ( filepathlen > 0 ) { if ( _ResolveLink(filepath, filepath) ) { OutputDebugString("Resolving Link"); OutputDebugString(filepath); - bShortcut = true; - } else - bShortcut = false; + bShortcut = TRUE; + } + else + bShortcut = FALSE; - aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]); - - if (aStream[0] && aStream[0]->IsOpened()) + if (aStream[0] && aStream[0]->Open(filepath)) { total_ms = aStream[0]->GetLengthMS(); - delete aStream[0]; - aStream[0] = NULL; + aStream[0]->Close(); OutputDebugString(fd.cFileName); @@ -773,7 +625,7 @@ _FindMP3s(void) if ( bShortcut ) { - e->pLinkPath = new char [MAX_PATH*2]; + e->pLinkPath = new char [MAX_PATH + sizeof(fd.cFileName)]; strcpy(e->pLinkPath, filepath); } else @@ -792,7 +644,7 @@ _FindMP3s(void) } } } - } + } while (FindNextFile(hFind, &fd)); FindClose(hFind); } @@ -858,7 +710,7 @@ _GetMP3EntryByIndex(uint32 idx) return NULL; } -static inline bool +static inline bool8 _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) { _CurMP3Index = 0; @@ -871,7 +723,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) *pPosition -= (*pEntry)->nTrackStreamPos; _CurMP3Pos = *pPosition; - return true; + return TRUE; } _CurMP3Index++; @@ -882,10 +734,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) _CurMP3Pos = 0; _CurMP3Index = 0; - return false; + return FALSE; } -bool +bool8 cSampleManager::IsMP3RadioChannelAvailable(void) { return nNumMP3s != 0; @@ -894,30 +746,25 @@ cSampleManager::IsMP3RadioChannelAvailable(void) void cSampleManager::ReleaseDigitalHandle(void) { - if ( ALDevice ) - { - prevprovider = curprovider; - release_existing(); - curprovider = -1; - } + // TODO? alcSuspendContext } void cSampleManager::ReacquireDigitalHandle(void) { - if ( ALDevice ) - { - if ( prevprovider != -1 ) - set_new_provider(prevprovider); - } + // TODO? alcProcessContext } -bool +bool8 cSampleManager::Initialise(void) { if ( _bSampmanInitialised ) - return true; + return TRUE; EFXInit(); + + for(int i = 0; i < MAX_STREAMS; i++) + aStream[i] = new CStream(ALStreamSources[i], ALStreamBuffers[i]); + CStream::Initialise(); { @@ -925,7 +772,7 @@ cSampleManager::Initialise(void) { m_aSamples[i].nOffset = 0; m_aSamples[i].nSize = 0; - m_aSamples[i].nFrequency = MAX_FREQ; + m_aSamples[i].nFrequency = 22050; m_aSamples[i].nLoopStart = 0; m_aSamples[i].nLoopEnd = -1; } @@ -960,7 +807,7 @@ cSampleManager::Initialise(void) for ( int32 i = 0; i < MAX_SFX_BANKS; i++ ) { - bSampleBankLoaded[i] = false; + bSampleBankLoaded[i] = FALSE; nSampleBankDiscStartOffset[i] = 0; nSampleBankSize[i] = 0; nSampleBankMemoryStartAddress[i] = 0; @@ -978,16 +825,87 @@ cSampleManager::Initialise(void) } { - for ( int32 i = 0; i < MAXCHANNELS+MAX2DCHANNELS; i++ ) + for ( int32 i = 0; i < NUM_CHANNELS; i++ ) nChannelVolume[i] = 0; } + + add_providers(); + + { + int index = 0; + _maxSamples = Min(MAXCHANNELS, providers[index].sources); + + ALCint attr[] = {ALC_FREQUENCY,MAX_FREQ, + ALC_MONO_SOURCES, MAX_DIGITAL_MIXER_CHANNELS - MAX2DCHANNELS, + ALC_STEREO_SOURCES, MAX2DCHANNELS, + 0, + }; + + ALDevice = alcOpenDevice(providers[index].id); + ASSERT(ALDevice != NULL); + + ALContext = alcCreateContext(ALDevice, attr); + ASSERT(ALContext != NULL); + + alcMakeContextCurrent(ALContext); + const char* ext=(const char*)alGetString(AL_EXTENSIONS); + ASSERT(strstr(ext,"AL_SOFT_loop_points")!=NULL); + if ( strstr(ext,"AL_SOFT_loop_points")==NULL ) + { + Terminate(); + return FALSE; + } + + alListenerf (AL_GAIN, 1.0f); + alListener3f(AL_POSITION, 0.0f, 0.0f, 0.0f); + alListener3f(AL_VELOCITY, 0.0f, 0.0f, 0.0f); + ALfloat orientation[6] = { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f }; + alListenerfv(AL_ORIENTATION, orientation); + + alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); + + if ( alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) ) + { + _effectsSupported = providers[index].bSupportsFx; + alGenAuxiliaryEffectSlots(1, &ALEffectSlot); + alGenEffects(1, &ALEffect); + } + + alGenSources(MAX_STREAMS*2, ALStreamSources[0]); + for ( int32 i = 0; i < MAX_STREAMS; i++ ) + { + alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]); + alSourcei(ALStreamSources[i][0], AL_SOURCE_RELATIVE, AL_TRUE); + alSource3f(ALStreamSources[i][0], AL_POSITION, 0.0f, 0.0f, 0.0f); + alSourcef(ALStreamSources[i][0], AL_GAIN, 1.0f); + alSourcei(ALStreamSources[i][1], AL_SOURCE_RELATIVE, AL_TRUE); + alSource3f(ALStreamSources[i][1], AL_POSITION, 0.0f, 0.0f, 0.0f); + alSourcef(ALStreamSources[i][1], AL_GAIN, 1.0f); + } + + CChannel::InitChannels(); + + for ( int32 i = 0; i < MAXCHANNELS; i++ ) + aChannel[i].Init(i); + for ( int32 i = 0; i < MAX2DCHANNELS; i++ ) + aChannel[MAXCHANNELS+i].Init(MAXCHANNELS+i, true); + + if ( IsFXSupported() ) + { + /**/ + alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect); + /**/ + + for ( int32 i = 0; i < MAXCHANNELS; i++ ) + aChannel[i].SetReverbMix(ALEffectSlot, 0.0f); + } + } + { for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ ) nStreamLength[i] = 0; } - - add_providers(); #ifdef AUDIO_CACHE FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb"); @@ -1002,13 +920,10 @@ cSampleManager::Initialise(void) for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ ) { - aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000); - - if ( aStream[0] && aStream[0]->IsOpened() ) + if ( aStream[0] && aStream[0]->Open(StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000) ) { uint32 tatalms = aStream[0]->GetLengthMS(); - delete aStream[0]; - aStream[0] = NULL; + aStream[0]->Close(); nStreamLength[i] = tatalms; } @@ -1031,7 +946,7 @@ cSampleManager::Initialise(void) if ( !InitialiseSampleBanks() ) { Terminate(); - return false; + return FALSE; } nSampleBankMemoryStartAddress[SFX_BANK_0] = (uintptr)malloc(nSampleBankSize[SFX_BANK_0]); @@ -1040,7 +955,7 @@ cSampleManager::Initialise(void) if ( nSampleBankMemoryStartAddress[SFX_BANK_0] == 0 ) { Terminate(); - return false; + return FALSE; } nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (uintptr)malloc(PED_BLOCKSIZE*MAX_PEDSFX); @@ -1052,14 +967,15 @@ cSampleManager::Initialise(void) { for ( int32 i = 0; i < MAX_STREAMS; i++ ) { - aStream[i] = NULL; + aStream[i]->Close(); + nStreamVolume[i] = 100; nStreamPan[i] = 63; } } - + { - _bSampmanInitialised = true; + _bSampmanInitialised = TRUE; if ( defaultProvider >= 0 && defaultProvider < m_nNumberOfProviders ) { @@ -1068,7 +984,7 @@ cSampleManager::Initialise(void) else { Terminate(); - return false; + return FALSE; } } @@ -1091,13 +1007,13 @@ cSampleManager::Initialise(void) time_t t = time(NULL); tm *localtm; - bool bUseRandomTable; + bool8 bUseRandomTable; if ( t == -1 ) - bUseRandomTable = true; + bUseRandomTable = TRUE; else { - bUseRandomTable = false; + bUseRandomTable = FALSE; localtm = localtime(&t); } @@ -1129,31 +1045,70 @@ cSampleManager::Initialise(void) else _CurMP3Pos = 0; - _bIsMp3Active = false; + _bIsMp3Active = FALSE; } - return true; + return TRUE; } void cSampleManager::Terminate(void) { for (int32 i = 0; i < MAX_STREAMS; i++) + aStream[i]->Close(); + + for ( int32 i = 0; i < NUM_CHANNELS; i++ ) + aChannel[i].Term(); + + if ( IsFXSupported() ) { - CStream *stream = aStream[i]; - if (stream) + if ( alIsEffect(ALEffect) ) { - delete stream; - aStream[i] = NULL; + alEffecti(ALEffect, AL_EFFECT_TYPE, AL_EFFECT_NULL); + alDeleteEffects(1, &ALEffect); + ALEffect = AL_EFFECT_NULL; + } + + if (alIsAuxiliaryEffectSlot(ALEffectSlot)) + { + alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL); + + alDeleteAuxiliaryEffectSlots(1, &ALEffectSlot); + ALEffectSlot = AL_EFFECTSLOT_NULL; } } - release_existing(); - + for ( int32 i = 0; i < MAX_STREAMS; i++ ) + { + alDeleteBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]); + } + alDeleteSources(MAX_STREAMS*2, ALStreamSources[0]); + + CChannel::DestroyChannels(); + + if ( ALContext ) + { + alcMakeContextCurrent(NULL); + alcSuspendContext(ALContext); + alcDestroyContext(ALContext); + } + if ( ALDevice ) + alcCloseDevice(ALDevice); + + ALDevice = NULL; + ALContext = NULL; + + _fPrevEaxRatioDestination = 0.0f; + _usingEFX = false; + _fEffectsLevel = 0.0f; + _DeleteMP3Entries(); CStream::Terminate(); + for(int32 i = 0; i < MAX_STREAMS; i++) + delete aStream[i]; + if ( nSampleBankMemoryStartAddress[SFX_BANK_0] != 0 ) { free((void *)nSampleBankMemoryStartAddress[SFX_BANK_0]); @@ -1166,12 +1121,12 @@ cSampleManager::Terminate(void) nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = 0; } - _bSampmanInitialised = false; + _bSampmanInitialised = FALSE; } -bool cSampleManager::CheckForAnAudioFileOnCD(void) +bool8 cSampleManager::CheckForAnAudioFileOnCD(void) { - return true; + return TRUE; } char cSampleManager::GetCDAudioDriveLetter(void) @@ -1184,7 +1139,7 @@ cSampleManager::UpdateEffectsVolume(void) { if ( _bSampmanInitialised ) { - for ( int32 i = 0; i < MAXCHANNELS+MAX2DCHANNELS; i++ ) + for ( int32 i = 0; i < NUM_CHANNELS; i++ ) { if ( GetChannelUsedFlag(i) ) { @@ -1228,24 +1183,24 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume) } void -cSampleManager::SetMonoMode(uint8 nMode) +cSampleManager::SetMonoMode(bool8 nMode) { m_nMonoMode = nMode; } -bool +bool8 cSampleManager::LoadSampleBank(uint8 nBank) { ASSERT( nBank < MAX_SFX_BANKS); if ( CTimer::GetIsCodePaused() ) - return false; + return FALSE; if ( MusicManager.IsInitialised() && MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE && nBank != SFX_BANK_0 ) { - return false; + return FALSE; } #ifdef OPUS_SFX @@ -1264,14 +1219,14 @@ cSampleManager::LoadSampleBank(uint8 nBank) } #else if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 ) - return false; + return FALSE; if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank], fpSampleDataHandle) != nSampleBankSize[nBank] ) - return false; + return FALSE; #endif - bSampleBankLoaded[nBank] = true; + bSampleBankLoaded[nBank] = TRUE; - return true; + return TRUE; } void @@ -1279,10 +1234,10 @@ cSampleManager::UnloadSampleBank(uint8 nBank) { ASSERT( nBank < MAX_SFX_BANKS); - bSampleBankLoaded[nBank] = false; + bSampleBankLoaded[nBank] = FALSE; } -bool +bool8 cSampleManager::IsSampleBankLoaded(uint8 nBank) { ASSERT( nBank < MAX_SFX_BANKS); @@ -1290,39 +1245,39 @@ cSampleManager::IsSampleBankLoaded(uint8 nBank) return bSampleBankLoaded[nBank]; } -bool +bool8 cSampleManager::IsPedCommentLoaded(uint32 nComment) { ASSERT( nComment < TOTAL_AUDIO_SAMPLES ); - int8 slot; - for ( int32 i = 0; i < _TODOCONST(3); i++ ) { - slot = nCurrentPedSlot - i - 1; #ifdef FIX_BUGS + int8 slot = (int8)nCurrentPedSlot - i - 1; if (slot < 0) slot += ARRAY_SIZE(nPedSlotSfx); +#else + uint8 slot = nCurrentPedSlot - i - 1; #endif if ( nComment == nPedSlotSfx[slot] ) - return true; + return TRUE; } - return false; + return FALSE; } int32 cSampleManager::_GetPedCommentSlot(uint32 nComment) { - int8 slot; - for (int32 i = 0; i < _TODOCONST(3); i++) { - slot = nCurrentPedSlot - i - 1; #ifdef FIX_BUGS + int8 slot = (int8)nCurrentPedSlot - i - 1; if (slot < 0) slot += ARRAY_SIZE(nPedSlotSfx); +#else + uint8 slot = nCurrentPedSlot - i - 1; #endif if (nComment == nPedSlotSfx[slot]) return slot; @@ -1331,13 +1286,13 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment) return -1; } -bool +bool8 cSampleManager::LoadPedComment(uint32 nComment) { ASSERT( nComment < TOTAL_AUDIO_SAMPLES ); if ( CTimer::GetIsCodePaused() ) - return false; + return FALSE; // no talking peds during cutsenes or the game end if ( MusicManager.IsInitialised() ) @@ -1346,7 +1301,7 @@ cSampleManager::LoadPedComment(uint32 nComment) { case MUSICMODE_CUTSCENE: { - return false; + return FALSE; break; } @@ -1361,17 +1316,17 @@ cSampleManager::LoadPedComment(uint32 nComment) int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead), samplesSize, NULL); if (size <= 0) { - return false; + return FALSE; } samplesRead += size * 2; samplesSize -= size; } #else if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 ) - return false; + return FALSE; if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize ) - return false; + return FALSE; #endif nPedSlotSfx[nCurrentPedSlot] = nComment; @@ -1379,7 +1334,7 @@ cSampleManager::LoadPedComment(uint32 nComment) if ( ++nCurrentPedSlot >= MAX_PEDSFX ) nCurrentPedSlot = 0; - return true; + return TRUE; } int32 @@ -1422,13 +1377,13 @@ cSampleManager::GetSampleLength(uint32 nSample) return m_aSamples[nSample].nSize / sizeof(uint16); } -bool cSampleManager::UpdateReverb(void) +bool8 cSampleManager::UpdateReverb(void) { if ( !usingEAX && !_usingEFX ) - return false; + return FALSE; if ( AudioManager.GetFrameCounter() & 15 ) - return false; + return FALSE; float fRatio = 0.0f; @@ -1446,10 +1401,10 @@ bool cSampleManager::UpdateReverb(void) #undef CALCULATE_RATIO #undef MIN_DIST - fRatio = clamp(fRatio, 0.0f, 0.6f); + fRatio = Clamp(fRatio, 0.0f, 0.6f); if ( fRatio == _fPrevEaxRatioDestination ) - return false; + return FALSE; #ifdef JUICY_OAL if ( usingEAX3 || _usingEFX ) @@ -1486,13 +1441,13 @@ bool cSampleManager::UpdateReverb(void) _fPrevEaxRatioDestination = fRatio; - return true; + return TRUE; } void -cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag) +cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); if ( usingEAX || _usingEFX ) { @@ -1500,7 +1455,7 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag) { alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect); - if ( nReverbFlag != 0 ) + if ( nReverbFlag != FALSE ) aChannel[nChannel].SetReverbMix(ALEffectSlot, _fEffectsLevel); else aChannel[nChannel].SetReverbMix(ALEffectSlot, 0.0f); @@ -1508,24 +1463,24 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag) } } -bool +bool8 cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); uintptr addr; if ( nSfx < SAMPLEBANK_MAX ) { if ( !IsSampleBankLoaded(nBank) ) - return false; + return FALSE; addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset; } else { if ( !IsPedCommentLoaded(nSfx) ) - return false; + return FALSE; int32 slot = _GetPedCommentSlot(nSfx); addr = (nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE * slot); @@ -1543,17 +1498,16 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) aChannel[nChannel].SetSampleData ((void*)addr, m_aSamples[nSfx].nSize, m_aSamples[nSfx].nFrequency); aChannel[nChannel].SetLoopPoints (0, -1); aChannel[nChannel].SetPitch (1.0f); - return true; + return TRUE; } - return false; + return FALSE; } void cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume) { - ASSERT( nChannel != CHANNEL2D ); - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < MAXCHANNELS ); uint32 vol = nVolume; if ( vol > MAX_VOLUME ) vol = MAX_VOLUME; @@ -1574,8 +1528,7 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume) void cSampleManager::SetChannel3DPosition(uint32 nChannel, float fX, float fY, float fZ) { - ASSERT( nChannel != CHANNEL2D ); - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < MAXCHANNELS ); aChannel[nChannel].SetPosition(-fX, fY, fZ); } @@ -1583,18 +1536,17 @@ cSampleManager::SetChannel3DPosition(uint32 nChannel, float fX, float fY, float void cSampleManager::SetChannel3DDistances(uint32 nChannel, float fMax, float fMin) { - ASSERT( nChannel != CHANNEL2D ); - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < MAXCHANNELS ); aChannel[nChannel].SetDistances(fMax, fMin); } void cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume) { - ASSERT( nChannel == CHANNEL2D ); - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel >= MAXCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); - if ( nChannel == CHANNEL2D ) + if ( nChannel == CHANNEL_POLICE_RADIO ) { uint32 vol = nVolume; if ( vol > MAX_VOLUME ) vol = MAX_VOLUME; @@ -1616,10 +1568,10 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume) void cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) { - ASSERT(nChannel == CHANNEL2D); - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel >= MAXCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); - if ( nChannel == CHANNEL2D ) + if ( nChannel == CHANNEL_POLICE_RADIO ) { aChannel[nChannel].SetPan(nPan); } @@ -1628,7 +1580,7 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) void cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); aChannel[nChannel].SetCurrentFreq(nFreq); } @@ -1636,7 +1588,7 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq) void cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); aChannel[nChannel].SetLoopPoints(nLoopStart / (DIGITALBITS / 8), nLoopEnd / (DIGITALBITS / 8)); } @@ -1644,15 +1596,15 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n void cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); aChannel[nChannel].SetLoopCount(nLoopCount); } -bool +bool8 cSampleManager::GetChannelUsedFlag(uint32 nChannel) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); return aChannel[nChannel].IsUsed(); } @@ -1660,7 +1612,7 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel) void cSampleManager::StartChannel(uint32 nChannel) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); aChannel[nChannel].Start(); } @@ -1668,7 +1620,7 @@ cSampleManager::StartChannel(uint32 nChannel) void cSampleManager::StopChannel(uint32 nChannel) { - ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); + ASSERT( nChannel < NUM_CHANNELS ); aChannel[nChannel].Stop(); } @@ -1682,36 +1634,30 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream) if ( nFile < TOTAL_STREAMED_SOUNDS ) { - if ( aStream[nStream] ) - { - delete aStream[nStream]; - aStream[nStream] = NULL; - } - + CStream *stream = aStream[nStream]; + + stream->Close(); + strcpy(filename, StreamedNameTable[nFile]); - CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); - ASSERT(stream != NULL); - - aStream[nStream] = stream; + stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); if ( !stream->Setup() ) { - delete stream; - aStream[nStream] = NULL; + stream->Close(); } } } void -cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream) +cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream) { ASSERT( nStream < MAX_STREAMS ); CStream *stream = aStream[nStream]; - if ( stream ) + if ( stream->IsOpened() ) { - stream->SetPause(nPauseFlag != 0); + stream->SetPause(nPauseFlag != FALSE); } } @@ -1722,179 +1668,159 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream) CStream *stream = aStream[nStream]; - if ( stream ) + if ( stream->IsOpened() ) { - if ( stream->IsOpened() ) - { - stream->Start(); - } + stream->Start(); } } -bool +bool8 cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) { + int i = 0; uint32 position = nPos; - char filename[256]; - - ASSERT( nStream < MAX_STREAMS ); + char filename[MAX_PATH]; - if ( nFile < TOTAL_STREAMED_SOUNDS ) - { - if ( aStream[nStream] ) - { - delete aStream[nStream]; - aStream[nStream] = NULL; - } - - if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER ) - { - uint32 i = 0; - do { - if(i != 0 || _bIsMp3Active) { - if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0; + if ( nFile >= TOTAL_STREAMED_SOUNDS ) + return FALSE; - _CurMP3Pos = 0; + aStream[nStream]->Close(); - tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index); - - if(mp3) { - mp3 = _pMP3List; - if(mp3 == NULL) { - _bIsMp3Active = false; - nFile = 0; - strcat(filename, StreamedNameTable[nFile]); - - CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); - ASSERT(stream != NULL); + if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER ) + { + do + { + // Just switched to MP3 player + if ( !_bIsMp3Active && i == 0 ) + { + if ( nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER] ) + position = 0; + tMP3Entry *e = _pMP3List; - aStream[nStream] = stream; + // Try to continue from previous song, if already started + if(!_GetMP3PosFromStreamPos(&position, &e) && !e) { + nFile = 0; - if (stream->Setup()) { - stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); - nStreamLoopedFlag[nStream] = true; - if (position != 0) - stream->SetPosMS(position); + strcpy(filename, StreamedNameTable[nFile]); - stream->Start(); + CStream *stream = aStream[nStream]; + stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + if ( stream->Setup() ) { + stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); + nStreamLoopedFlag[nStream] = TRUE; + if (position != 0) + stream->SetPosMS(position); - return true; - } else { - delete stream; - aStream[nStream] = NULL; - } + stream->Start(); - return false; - } + return TRUE; + } else { + stream->Close(); } + return FALSE; - if (mp3->pLinkPath != NULL) - aStream[nStream] = new CStream(mp3->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + } else { + + if (e->pLinkPath != NULL) + aStream[nStream]->Open(e->pLinkPath, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); else { strcpy(filename, _mp3DirectoryPath); - strcat(filename, mp3->aFilename); + strcat(filename, e->aFilename); - aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + aStream[nStream]->Open(filename); } if (aStream[nStream]->Setup()) { + if (position != 0) + aStream[nStream]->SetPosMS(position); + aStream[nStream]->Start(); - return true; + _bIsMp3Active = TRUE; + return TRUE; } else { - delete aStream[nStream]; - aStream[nStream] = NULL; + aStream[nStream]->Close(); } - - _bIsMp3Active = false; - continue; + // fall through, start playing from another song } - if ( nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER] ) - position = 0; - - tMP3Entry *e; - if ( !_GetMP3PosFromStreamPos(&position, &e) ) + } else { + if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0; + + _CurMP3Pos = 0; + + tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index); + if ( !mp3 ) { - if ( e == NULL ) + mp3 = _pMP3List; + if ( !_pMP3List ) { nFile = 0; - strcat(filename, StreamedNameTable[nFile]); - CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); - ASSERT(stream != NULL); + _bIsMp3Active = 0; + strcpy(filename, StreamedNameTable[nFile]); - aStream[nStream] = stream; + CStream* stream = aStream[nStream]; + stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); if (stream->Setup()) { stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); - nStreamLoopedFlag[nStream] = true; + nStreamLoopedFlag[nStream] = TRUE; if (position != 0) stream->SetPosMS(position); stream->Start(); - return true; + return TRUE; } else { - delete stream; - aStream[nStream] = NULL; + stream->Close(); } - - return false; + return FALSE; } } - - if (e->pLinkPath != NULL) - aStream[nStream] = new CStream(e->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + if (mp3->pLinkPath != NULL) + aStream[nStream]->Open(mp3->pLinkPath, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); else { strcpy(filename, _mp3DirectoryPath); - strcat(filename, e->aFilename); + strcat(filename, mp3->aFilename); - aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]); + aStream[nStream]->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); } if (aStream[nStream]->Setup()) { - if (position != 0) - aStream[nStream]->SetPosMS(position); - aStream[nStream]->Start(); - - _bIsMp3Active = true; - return true; +#ifdef FIX_BUGS + _bIsMp3Active = TRUE; +#endif + return TRUE; } else { - delete aStream[nStream]; - aStream[nStream] = NULL; + aStream[nStream]->Close(); } - - _bIsMp3Active = false; - } while(++i < nNumMP3s); - - position = 0; - nFile = 0; + } + _bIsMp3Active = 0; } + while ( ++i < nNumMP3s ); + position = 0; + nFile = 0; + } + strcpy(filename, StreamedNameTable[nFile]); + + CStream *stream = aStream[nStream]; - strcpy(filename, StreamedNameTable[nFile]); - - CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); - ASSERT(stream != NULL); + aStream[nStream]->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + + if ( stream->Setup() ) { + stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); + nStreamLoopedFlag[nStream] = TRUE; + if (position != 0) + stream->SetPosMS(position); - aStream[nStream] = stream; + stream->Start(); - if ( stream->Setup() ) { - stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); - nStreamLoopedFlag[nStream] = true; - if (position != 0) - stream->SetPosMS(position); - - stream->Start(); - - return true; - } else { - delete stream; - aStream[nStream] = NULL; - } + return TRUE; + } else { + stream->Close(); } - - return false; + return FALSE; } void @@ -1904,14 +1830,10 @@ cSampleManager::StopStreamedFile(uint8 nStream) CStream *stream = aStream[nStream]; - if ( stream ) - { - delete stream; - aStream[nStream] = NULL; + stream->Close(); - if ( nStream == 0 ) - _bIsMp3Active = false; - } + if ( nStream == 0 ) + _bIsMp3Active = FALSE; } int32 @@ -1921,7 +1843,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream) CStream *stream = aStream[nStream]; - if ( stream ) + if ( stream->IsOpened() ) { if ( _bIsMp3Active ) { @@ -1944,7 +1866,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream) } void -cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream) +cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream) { ASSERT( nStream < MAX_STREAMS ); @@ -1964,7 +1886,7 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect CStream *stream = aStream[nStream]; - if ( stream ) + if ( stream->IsOpened() ) { if ( nEffectFlag ) { if ( nStream == 1 || nStream == 2 ) @@ -1987,20 +1909,20 @@ cSampleManager::GetStreamedFileLength(uint8 nStream) return nStreamLength[nStream]; } -bool +bool8 cSampleManager::IsStreamPlaying(uint8 nStream) { ASSERT( nStream < MAX_STREAMS ); CStream *stream = aStream[nStream]; - if ( stream ) + if ( stream->IsOpened() ) { if ( stream->IsPlaying() ) - return true; + return TRUE; } - return false; + return FALSE; } void @@ -2010,25 +1932,25 @@ cSampleManager::Service(void) { CStream *stream = aStream[i]; - if ( stream ) + if ( stream->IsOpened() ) stream->Update(); } int refCount = CChannel::channelsThatNeedService; - for ( int32 i = 0; refCount && i < MAXCHANNELS+MAX2DCHANNELS; i++ ) + for ( int32 i = 0; refCount && i < NUM_CHANNELS; i++ ) { if ( aChannel[i].Update() ) refCount--; } } -bool +bool8 cSampleManager::InitialiseSampleBanks(void) { int32 nBank = SFX_BANK_0; fpSampleDescHandle = fcaseopen(SampleBankDescFilename, "rb"); if ( fpSampleDescHandle == NULL ) - return false; + return FALSE; #ifndef OPUS_SFX fpSampleDataHandle = fcaseopen(SampleBankDataFilename, "rb"); if ( fpSampleDataHandle == NULL ) @@ -2036,7 +1958,7 @@ cSampleManager::InitialiseSampleBanks(void) fclose(fpSampleDescHandle); fpSampleDescHandle = NULL; - return false; + return FALSE; } fseek(fpSampleDataHandle, 0, SEEK_END); @@ -2068,11 +1990,11 @@ cSampleManager::InitialiseSampleBanks(void) nSampleBankSize[SFX_BANK_0] = nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS] - nSampleBankDiscStartOffset[SFX_BANK_0]; nSampleBankSize[SFX_BANK_PED_COMMENTS] = _nSampleDataEndOffset - nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS]; - return true; + return TRUE; } void -cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel) +cSampleManager::SetStreamedFileLoopFlag(bool8 nLoopFlag, uint8 nChannel) { nStreamLoopedFlag[nChannel] = nLoopFlag; } diff --git a/src/audio/soundlist.h b/src/audio/soundlist.h index e86b13ee..c6dbb634 100644 --- a/src/audio/soundlist.h +++ b/src/audio/soundlist.h @@ -54,8 +54,8 @@ enum eSound SOUND_49, SOUND_WEAPON_BAT_ATTACK, SOUND_WEAPON_KNIFE_ATTACK, - SOUND_WEAPON_CHAINSAW_ATTACK, SOUND_WEAPON_CHAINSAW_IDLE, + SOUND_WEAPON_CHAINSAW_ATTACK, SOUND_WEAPON_CHAINSAW_MADECONTACT, SOUND_WEAPON_SHOT_FIRED, SOUND_WEAPON_RELOAD, @@ -116,8 +116,8 @@ enum eSound SOUND_PED_MIAMIVICE_EXITING_CAR, SOUND_PED_COP_HELIPILOTPHRASE, SOUND_PED_PULLOUTWEAPON, - SOUND_PED_HELI_PLAYER_FOUND = 114, - SOUND_PED_VCPA_PLAYER_FOUND = 115, + SOUND_PED_HELI_PLAYER_FOUND, + SOUND_PED_VCPA_PLAYER_FOUND, SOUND_PED_ON_FIRE, SOUND_PED_AIMING, SOUND_PED_HANDS_UP, @@ -128,15 +128,15 @@ enum eSound SOUND_PED_CAR_JACKED, SOUND_PED_ROBBED, SOUND_PED_ACCIDENTREACTION1, - SOUND_PED_UNK_126, + SOUND_PED_INNOCENT, SOUND_PED_PLAYER_AFTERSEX, SOUND_PED_PLAYER_BEFORESEX, - SOUND_PED_COP_UNK_129, // also used for medics + SOUND_PED_COP_TARGETING, // also used for medics SOUND_PED_COP_MANYCOPSAROUND, // also used for medics SOUND_PED_GUNAIMEDAT2, SOUND_PED_COP_ALONE, // also used for medics SOUND_PED_GUNAIMEDAT3, - SOUND_PED_COP_REACTION, + SOUND_PED_COP_ASK_FOR_ID, SOUND_PED_COP_LITTLECOPSAROUND, // also used for medics SOUND_PED_PLAYER_FARFROMCOPS, // also used for medics SOUND_PED_TAXI_WAIT, @@ -151,12 +151,12 @@ enum eSound SOUND_PED_ANNOYED_DRIVER, SOUND_PED_147, SOUND_PED_SOLICIT, - SOUND_PED_149, + SOUND_PED_JEER, SOUND_PED_150, SOUND_PED_EXTINGUISHING_FIRE, SOUND_PED_WAIT_DOUBLEBACK, - SOUND_153, - SOUND_PED_CHAT_SEXY, + SOUND_PED_CHAT_SEXY_FEMALE, + SOUND_PED_CHAT_SEXY_MALE, SOUND_PED_CHAT_EVENT, SOUND_PED_PED_COLLISION, SOUND_PED_CHAT, diff --git a/src/buildings/Building.cpp b/src/buildings/Building.cpp index 8035cf25..92c787e5 100644 --- a/src/buildings/Building.cpp +++ b/src/buildings/Building.cpp @@ -4,8 +4,8 @@ #include "Streaming.h" #include "Pools.h" -void *CBuilding::operator new(size_t sz) { return CPools::GetBuildingPool()->New(); } -void CBuilding::operator delete(void *p, size_t sz) { CPools::GetBuildingPool()->Delete((CBuilding*)p); } +void *CBuilding::operator new(size_t sz) throw() { return CPools::GetBuildingPool()->New(); } +void CBuilding::operator delete(void *p, size_t sz) throw() { CPools::GetBuildingPool()->Delete((CBuilding*)p); } void CBuilding::ReplaceWithNewModel(int32 id) diff --git a/src/buildings/Building.h b/src/buildings/Building.h index 2c2dfb1f..f8ddfa46 100644 --- a/src/buildings/Building.h +++ b/src/buildings/Building.h @@ -9,8 +9,8 @@ public: m_type = ENTITY_TYPE_BUILDING; bUsesCollision = true; } - static void *operator new(size_t); - static void operator delete(void*, size_t); + static void *operator new(size_t) throw(); + static void operator delete(void*, size_t) throw(); void ReplaceWithNewModel(int32 id); diff --git a/src/buildings/Treadable.cpp b/src/buildings/Treadable.cpp index 00abbe13..d84603a6 100644 --- a/src/buildings/Treadable.cpp +++ b/src/buildings/Treadable.cpp @@ -4,5 +4,5 @@ #include "Treadable.h" #include "Pools.h" -void *CTreadable::operator new(size_t sz) { return CPools::GetTreadablePool()->New(); } -void CTreadable::operator delete(void *p, size_t sz) { CPools::GetTreadablePool()->Delete((CTreadable*)p); } +void *CTreadable::operator new(size_t sz) throw() { return CPools::GetTreadablePool()->New(); } +void CTreadable::operator delete(void *p, size_t sz) throw() { CPools::GetTreadablePool()->Delete((CTreadable*)p); } diff --git a/src/buildings/Treadable.h b/src/buildings/Treadable.h index c3ab755e..6a183c63 100644 --- a/src/buildings/Treadable.h +++ b/src/buildings/Treadable.h @@ -5,8 +5,8 @@ class CTreadable : public CBuilding { public: - static void *operator new(size_t); - static void operator delete(void*, size_t); + static void *operator new(size_t) throw(); + static void operator delete(void*, size_t) throw(); bool GetIsATreadable(void) { return true; } }; diff --git a/src/collision/ColModel.cpp b/src/collision/ColModel.cpp index 49847dbd..2224a804 100644 --- a/src/collision/ColModel.cpp +++ b/src/collision/ColModel.cpp @@ -27,7 +27,7 @@ CColModel::~CColModel(void) } void* -CColModel::operator new(size_t) +CColModel::operator new(size_t) throw() { CColModel* node = CPools::GetColModelPool()->New(); assert(node); @@ -35,7 +35,7 @@ CColModel::operator new(size_t) } void -CColModel::operator delete(void *p, size_t) +CColModel::operator delete(void *p, size_t) throw() { CPools::GetColModelPool()->Delete((CColModel*)p); } diff --git a/src/collision/ColModel.h b/src/collision/ColModel.h index cd5ae651..64f05f76 100644 --- a/src/collision/ColModel.h +++ b/src/collision/ColModel.h @@ -33,7 +33,7 @@ struct CColModel void SetLinkPtr(CLink<CColModel*>*); void GetTrianglePoint(CVector &v, int i) const; - void *operator new(size_t); - void operator delete(void *p, size_t); + void *operator new(size_t) throw(); + void operator delete(void *p, size_t) throw(); CColModel& operator=(const CColModel& other); };
\ No newline at end of file diff --git a/src/collision/ColStore.cpp b/src/collision/ColStore.cpp index f1e695fe..c74bf5ba 100644 --- a/src/collision/ColStore.cpp +++ b/src/collision/ColStore.cpp @@ -186,7 +186,7 @@ CColStore::LoadCollision(const CVector2D &pos) }else{ for (int j = 0; j < MAX_CLEANUP; j++) { CPhysical* pEntity = nil; - cleanup_entity_struct* pCleanup = &CTheScripts::MissionCleanUp.m_sEntities[i]; + cleanup_entity_struct* pCleanup = &CTheScripts::MissionCleanUp.m_sEntities[j]; if (pCleanup->type == CLEANUP_CAR) { pEntity = CPools::GetVehiclePool()->GetAt(pCleanup->id); if (!pEntity || pEntity->GetStatus() == STATUS_WRECKED) diff --git a/src/collision/Collision.cpp b/src/collision/Collision.cpp index 50c22e32..0ffcd09a 100644 --- a/src/collision/Collision.cpp +++ b/src/collision/Collision.cpp @@ -144,11 +144,10 @@ CCollision::SortOutCollisionAfterLoad(void) void CCollision::LoadCollisionScreen(eLevelName level) { - static Const char *levelNames[4] = { + static Const char *levelNames[] = { "", "IND_ZON", "COM_ZON", - "SUB_ZON" }; // Why twice? diff --git a/src/control/AutoPilot.cpp b/src/control/AutoPilot.cpp index d3de6ac2..db72548f 100644 --- a/src/control/AutoPilot.cpp +++ b/src/control/AutoPilot.cpp @@ -5,6 +5,7 @@ #include "CarCtrl.h" #include "Curves.h" #include "PathFind.h" +#include "SaveBuf.h" void CAutoPilot::ModifySpeed(float speed) { @@ -92,43 +93,44 @@ void CAutoPilot::Save(uint8*& buf) void CAutoPilot::Load(uint8*& buf) { - m_nCurrentRouteNode = ReadSaveBuf<int32>(buf); - m_nNextRouteNode = ReadSaveBuf<int32>(buf); - m_nPrevRouteNode = ReadSaveBuf<int32>(buf); - m_nTimeEnteredCurve = ReadSaveBuf<int32>(buf); - m_nTimeToSpendOnCurrentCurve = ReadSaveBuf<int32>(buf); - m_nCurrentPathNodeInfo = ReadSaveBuf<uint32>(buf); - m_nNextPathNodeInfo = ReadSaveBuf<uint32>(buf); - m_nPreviousPathNodeInfo = ReadSaveBuf<uint32>(buf); - m_nAntiReverseTimer = ReadSaveBuf<uint32>(buf); - m_nTimeToStartMission = ReadSaveBuf<uint32>(buf); - m_nPreviousDirection = ReadSaveBuf<int8>(buf); - m_nCurrentDirection = ReadSaveBuf<int8>(buf); - m_nNextDirection = ReadSaveBuf<int8>(buf); - m_nCurrentLane = ReadSaveBuf<int8>(buf); - m_nNextLane = ReadSaveBuf<int8>(buf); - m_nDrivingStyle = ReadSaveBuf<uint8>(buf); - m_nCarMission = ReadSaveBuf<uint8>(buf); - m_nTempAction = ReadSaveBuf<uint8>(buf); - m_nTimeTempAction = ReadSaveBuf<uint32>(buf); - m_fMaxTrafficSpeed = ReadSaveBuf<float>(buf); - m_nCruiseSpeed = ReadSaveBuf<uint8>(buf); - m_nCruiseSpeedMultiplierType = ReadSaveBuf<uint8>(buf); + ReadSaveBuf(&m_nCurrentRouteNode, buf); + ReadSaveBuf(&m_nNextRouteNode, buf); + ReadSaveBuf(&m_nPrevRouteNode, buf); + ReadSaveBuf(&m_nTimeEnteredCurve, buf); + ReadSaveBuf(&m_nTimeToSpendOnCurrentCurve, buf); + ReadSaveBuf(&m_nCurrentPathNodeInfo, buf); + ReadSaveBuf(&m_nNextPathNodeInfo, buf); + ReadSaveBuf(&m_nPreviousPathNodeInfo, buf); + ReadSaveBuf(&m_nAntiReverseTimer, buf); + ReadSaveBuf(&m_nTimeToStartMission, buf); + ReadSaveBuf(&m_nPreviousDirection, buf); + ReadSaveBuf(&m_nCurrentDirection, buf); + ReadSaveBuf(&m_nNextDirection, buf); + ReadSaveBuf(&m_nCurrentLane, buf); + ReadSaveBuf(&m_nNextLane, buf); + ReadSaveBuf(&m_nDrivingStyle, buf); + ReadSaveBuf(&m_nCarMission, buf); + ReadSaveBuf(&m_nTempAction, buf); + ReadSaveBuf(&m_nTimeTempAction, buf); + ReadSaveBuf(&m_fMaxTrafficSpeed, buf); + ReadSaveBuf(&m_nCruiseSpeed, buf); + ReadSaveBuf(&m_nCruiseSpeedMultiplierType, buf); SkipSaveBuf(buf, 2); - m_fCruiseSpeedMultiplier = ReadSaveBuf<float>(buf); - uint8 flags = ReadSaveBuf<uint8>(buf); + ReadSaveBuf(&m_fCruiseSpeedMultiplier, buf); + uint8 flags; + ReadSaveBuf(&flags, buf); m_bSlowedDownBecauseOfCars = !!(flags & BIT(0)); m_bSlowedDownBecauseOfPeds = !!(flags & BIT(1)); m_bStayInCurrentLevel = !!(flags & BIT(2)); m_bStayInFastLane = !!(flags & BIT(3)); m_bIgnorePathfinding = !!(flags & BIT(4)); - m_nSwitchDistance = ReadSaveBuf<uint8>(buf); + ReadSaveBuf(&m_nSwitchDistance, buf); SkipSaveBuf(buf, 2); - m_vecDestinationCoors.x = ReadSaveBuf<float>(buf); - m_vecDestinationCoors.y = ReadSaveBuf<float>(buf); - m_vecDestinationCoors.z = ReadSaveBuf<float>(buf); + ReadSaveBuf(&m_vecDestinationCoors.x, buf); + ReadSaveBuf(&m_vecDestinationCoors.y, buf); + ReadSaveBuf(&m_vecDestinationCoors.z, buf); SkipSaveBuf(buf, 32); - m_nPathFindNodesCount = ReadSaveBuf<int16>(buf); + ReadSaveBuf(&m_nPathFindNodesCount, buf); SkipSaveBuf(buf, 6); } #endif
\ No newline at end of file diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index d05d9827..5e4e62ee 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -1581,8 +1581,8 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float forward.Normalise(); float forwardAngle = CGeneral::GetATanOfXY(forward.x, forward.y); float angleDiff = angleBetweenVehicles - forwardAngle; - float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * sin(angleDiff)); - float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * cos(angleDiff)); + float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * Sin(angleDiff)); + float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * Cos(angleDiff)); float lengthToEvade = (2 * (lenProjection + widthProjection) + WIDTH_COEF_TO_WEAVE_SAFELY * 2 * pVehicle->GetColModel()->boundingBox.max.x) / distance; float diffToLeftAngle = LimitRadianAngle(angleBetweenVehicles - *pAngleToWeaveLeft); diffToLeftAngle = ABS(diffToLeftAngle); @@ -2575,7 +2575,7 @@ void CCarCtrl::SteerAIBoatWithPhysicsHeadingForTarget(CVehicle* pVehicle, float float angleToTarget = CGeneral::GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y); float steerAngle = LimitRadianAngle(angleToTarget - angleForward); - steerAngle = clamp(steerAngle, -DEFAULT_MAX_STEER_ANGLE, DEFAULT_MAX_STEER_ANGLE); + steerAngle = Clamp(steerAngle, -DEFAULT_MAX_STEER_ANGLE, DEFAULT_MAX_STEER_ANGLE); #ifdef FIX_BUGS float speedTarget = pVehicle->AutoPilot.GetCruiseSpeed(); #else @@ -2735,7 +2735,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane) { CVector2D vecToTarget = pPlane->AutoPilot.m_vecDestinationCoors - pPlane->GetPosition(); float fForwardZ = (pPlane->AutoPilot.m_vecDestinationCoors.z - pPlane->GetPosition().z) / vecToTarget.Magnitude(); - fForwardZ = clamp(fForwardZ, -0.3f, 0.3f); + fForwardZ = Clamp(fForwardZ, -0.3f, 0.3f); float angle = CGeneral::GetATanOfXY(vecToTarget.x, vecToTarget.y); while (angle > TWOPI) angle -= TWOPI; @@ -3238,7 +3238,7 @@ bool CCarCtrl::GenerateOneEmergencyServicesCar(uint32 mi, CVector vecPos) attempts += 1; } if (attempts >= 5) - return nil; + return false; CAutomobile* pVehicle = new CAutomobile(mi, RANDOM_VEHICLE); pVehicle->AutoPilot.m_vecDestinationCoors = vecPos; pVehicle->SetPosition(spawnPos); diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp index 33c40c91..11df7b43 100644 --- a/src/control/GameLogic.cpp +++ b/src/control/GameLogic.cpp @@ -30,6 +30,7 @@ #include "Automobile.h" #include "MBlur.h" #include "screendroplets.h" +#include "SaveBuf.h" uint8 CGameLogic::ActivePlayers; uint8 CGameLogic::ShortCutState; @@ -157,7 +158,7 @@ CGameLogic::Update() #endif CMessages::ClearMessages(); CCarCtrl::ClearInterestingVehicleList(); - CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1); + CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, true); CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat); CRestart::OverrideHospitalLevel = LEVEL_GENERIC; CRestart::OverridePoliceStationLevel = LEVEL_GENERIC; @@ -190,7 +191,7 @@ CGameLogic::Update() } - if (!CTheScripts::IsPlayerOnAMission() && pPlayerInfo.m_nBustedAudioStatus == 0) { + if (!CTheScripts::IsPlayerOnAMission() && pPlayerInfo.m_nBustedAudioStatus == BUSTEDAUDIO_NONE) { if (CGeneral::GetRandomNumberInRange(0, 4) == 0) pPlayerInfo.m_nBustedAudioStatus = BUSTEDAUDIO_DONE; else { @@ -266,7 +267,7 @@ CGameLogic::Update() #endif CMessages::ClearMessages(); CCarCtrl::ClearInterestingVehicleList(); - CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1); + CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, true); CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat); CRestart::OverrideHospitalLevel = LEVEL_GENERIC; CRestart::OverridePoliceStationLevel = LEVEL_GENERIC; @@ -321,7 +322,7 @@ CGameLogic::Update() #endif CMessages::ClearMessages(); CCarCtrl::ClearInterestingVehicleList(); - CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1); + CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, true); CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat); CRestart::OverridePoliceStationLevel = LEVEL_GENERIC; CRestart::OverrideHospitalLevel = LEVEL_GENERIC; @@ -378,10 +379,10 @@ CGameLogic::RestorePlayerStuffDuringResurrection(CPlayerPed *pPlayerPed, CVector pPlayerPed->m_fRotationDest = pPlayerPed->m_fRotationCur; pPlayerPed->SetHeading(pPlayerPed->m_fRotationCur); CTheScripts::ClearSpaceForMissionEntity(pos, pPlayerPed); - CWorld::ClearExcitingStuffFromArea(pos, 4000.0, 1); + CWorld::ClearExcitingStuffFromArea(pos, 4000.0f, true); pPlayerPed->RestoreHeadingRate(); CGame::currArea = AREA_MAIN_MAP; - CStreaming::RemoveBuildingsNotInArea(0); + CStreaming::RemoveBuildingsNotInArea(AREA_MAIN_MAP); TheCamera.SetCameraDirectlyInFrontForFollowPed_CamOnAString(); TheCamera.Restore(); CReferences::RemoveReferencesToPlayer(); @@ -488,7 +489,7 @@ CGameLogic::UpdateShortCut() pShortCutTaxi->AutoPilot.m_nTempAction = TEMPACT_GOFORWARD; pShortCutTaxi->AutoPilot.m_nTimeTempAction = CTimer::GetTimeInMilliseconds() + 2500; TheCamera.SetFadeColour(0, 0, 0); - TheCamera.Fade(2.5f, 0); + TheCamera.Fade(2.5f, FADE_OUT); ShortCutState = SHORTCUT_TRANSITION; ShortCutTimer = CTimer::GetTimeInMilliseconds() + 3000; CMessages::AddBigMessage(TheText.Get("TAXI"), 4500, 1); @@ -508,7 +509,7 @@ CGameLogic::UpdateShortCut() pShortCutTaxi->SetMoveSpeed(pShortCutTaxi->GetForward() * 0.4f); ShortCutTimer = CTimer::GetTimeInMilliseconds() + 1500; TheCamera.SetFadeColour(0, 0, 0); - TheCamera.Fade(1.0f, 1); + TheCamera.Fade(1.0f, FADE_IN); ShortCutState = SHORTCUT_ARRIVING; CTimer::Resume(); } @@ -611,12 +612,12 @@ void CGameLogic::Load(uint8* buf, uint32 size) { INITSAVEBUF - NumAfterDeathStartPoints = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&NumAfterDeathStartPoints, buf); for (int i = 0; i < NUM_SHORTCUT_START_POINTS; i++) { - AfterDeathStartPoints[i].x = ReadSaveBuf<float>(buf); - AfterDeathStartPoints[i].y = ReadSaveBuf<float>(buf); - AfterDeathStartPoints[i].z = ReadSaveBuf<float>(buf); - AfterDeathStartPointOrientation[i] = ReadSaveBuf<float>(buf); + ReadSaveBuf(&AfterDeathStartPoints[i].x, buf); + ReadSaveBuf(&AfterDeathStartPoints[i].y, buf); + ReadSaveBuf(&AfterDeathStartPoints[i].z, buf); + ReadSaveBuf(&AfterDeathStartPointOrientation[i], buf); } VALIDATESAVEBUF(size) } diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index 7cf58d03..4c3ceb5c 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -24,6 +24,7 @@ #include "Wanted.h" #include "World.h" #include "VarConsole.h" +#include "SaveBuf.h" #define CRUSHER_GARAGE_X1 (1135.5f) #define CRUSHER_GARAGE_Y1 (57.0f) @@ -158,7 +159,7 @@ void CGarages::Init(void) } hGarages = DMAudio.CreateEntity(AUDIOTYPE_GARAGE, (void*)1); if (hGarages >= 0) - DMAudio.SetEntityStatus(hGarages, true); + DMAudio.SetEntityStatus(hGarages, TRUE); } void CGarages::Shutdown(void) @@ -2309,22 +2310,25 @@ void CGarages::Load(uint8* buf, uint32 size) assert(size = 7876); //assert(size == (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage))); CloseHideOutGaragesBeforeSave(); - NumGarages = ReadSaveBuf<uint32>(buf); - BombsAreFree = ReadSaveBuf<uint32>(buf); - RespraysAreFree = ReadSaveBuf<uint32>(buf); - CarsCollected = ReadSaveBuf<int32>(buf); - BankVansCollected = ReadSaveBuf<int32>(buf); - PoliceCarsCollected = ReadSaveBuf<int32>(buf); + ReadSaveBuf(&NumGarages, buf); + int32 tempInt; + ReadSaveBuf(&tempInt, buf); + BombsAreFree = tempInt ? true : false; + ReadSaveBuf(&tempInt, buf); + RespraysAreFree = tempInt ? true : false; + ReadSaveBuf(&CarsCollected, buf); + ReadSaveBuf(&BankVansCollected, buf); + ReadSaveBuf(&PoliceCarsCollected, buf); for (int i = 0; i < TOTAL_COLLECTCARS_GARAGES; i++) - CarTypesCollected[i] = ReadSaveBuf<uint32>(buf); - LastTimeHelpMessage = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&CarTypesCollected[i], buf); + ReadSaveBuf(&LastTimeHelpMessage, buf); for (int i = 0; i < NUM_GARAGE_STORED_CARS; i++) { for (int j = 0; j < TOTAL_HIDEOUT_GARAGES; j++) { - aCarsInSafeHouses[j][i] = ReadSaveBuf<CStoredCar>(buf); + ReadSaveBuf(&aCarsInSafeHouses[j][i], buf); } } for (int i = 0; i < NUM_GARAGES; i++) { - aGarages[i] = ReadSaveBuf<CGarage>(buf); + ReadSaveBuf(&aGarages[i], buf); aGarages[i].m_pDoor1 = nil; aGarages[i].m_pDoor2 = nil; aGarages[i].m_pTarget = nil; diff --git a/src/control/OnscreenTimer.cpp b/src/control/OnscreenTimer.cpp index 53ed14c7..5045c1e0 100644 --- a/src/control/OnscreenTimer.cpp +++ b/src/control/OnscreenTimer.cpp @@ -9,14 +9,15 @@ #include "OnscreenTimer.h" #include "Camera.h" -void COnscreenTimer::Init() { +void +COnscreenTimer::Init() +{ m_bDisabled = false; for(uint32 i = 0; i < NUMONSCREENCOUNTERS; i++) { m_sCounters[i].m_nCounterOffset = 0; - for(uint32 j = 0; j < ARRAY_SIZE(m_sCounters[0].m_aCounterText); j++) { - m_sCounters[i].m_aCounterText[j] = 0; - } + for(uint32 j = 0; j < ARRAY_SIZE(m_sCounters[0].m_aCounterText); j++) + m_sCounters[i].m_aCounterText[j] = '\0'; m_sCounters[i].m_nType = COUNTER_DISPLAY_NUMBER; m_sCounters[i].m_bCounterProcessed = false; @@ -24,24 +25,25 @@ void COnscreenTimer::Init() { for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) { m_sClocks[i].m_nClockOffset = 0; - for(uint32 j = 0; j < ARRAY_SIZE(m_sClocks[0].m_aClockText); j++) { - m_sClocks[i].m_aClockText[j] = 0; - } + for(uint32 j = 0; j < ARRAY_SIZE(m_sClocks[0].m_aClockText); j++) + m_sClocks[i].m_aClockText[j] = '\0'; m_sClocks[i].m_bClockProcessed = false; m_sClocks[i].m_bClockGoingDown = true; } } -void COnscreenTimer::Process() { - if(!CReplay::IsPlayingBack() && !m_bDisabled) { - for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) { +void +COnscreenTimer::Process() +{ + if(!CReplay::IsPlayingBack() && !m_bDisabled) + for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) m_sClocks[i].Process(); - } - } } -void COnscreenTimer::ProcessForDisplay() { +void +COnscreenTimer::ProcessForDisplay() +{ if(CHud::m_Wants_To_Draw_Hud) { m_bProcessed = false; for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) { @@ -63,67 +65,67 @@ void COnscreenTimer::ProcessForDisplay() { } } -void COnscreenTimer::ClearCounter(uint32 offset) { +void +COnscreenTimer::ClearCounter(uint32 offset) +{ for(uint32 i = 0; i < NUMONSCREENCOUNTERS; i++) { if(offset == m_sCounters[i].m_nCounterOffset) { m_sCounters[i].m_nCounterOffset = 0; - m_sCounters[i].m_aCounterText[0] = 0; + m_sCounters[i].m_aCounterText[0] = '\0'; m_sCounters[i].m_nType = COUNTER_DISPLAY_NUMBER; - m_sCounters[i].m_bCounterProcessed = 0; + m_sCounters[i].m_bCounterProcessed = false; } } } -void COnscreenTimer::ClearClock(uint32 offset) { - for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) { +void +COnscreenTimer::ClearClock(uint32 offset) +{ + for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) if(offset == m_sClocks[i].m_nClockOffset) { m_sClocks[i].m_nClockOffset = 0; - m_sClocks[i].m_aClockText[0] = 0; - m_sClocks[i].m_bClockProcessed = 0; + m_sClocks[i].m_aClockText[0] = '\0'; + m_sClocks[i].m_bClockProcessed = false; m_sClocks[i].m_bClockGoingDown = true; } - } } -void COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text, uint16 pos) { - +void +COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text, uint16 pos) +{ if (m_sCounters[pos].m_aCounterText[0] != '\0') return; m_sCounters[pos].m_nCounterOffset = offset; - if(text) { + if(text) strncpy(m_sCounters[pos].m_aCounterText, text, ARRAY_SIZE(m_sCounters[0].m_aCounterText)); - } else { - m_sCounters[pos].m_aCounterText[0] = 0; - } + else + m_sCounters[pos].m_aCounterText[0] = '\0'; m_sCounters[pos].m_nType = type; } -void COnscreenTimer::AddClock(uint32 offset, char* text, bool bGoingDown) { - - // dead code in here - uint32 i; - for(i = 0; i < NUMONSCREENCLOCKS; i++) { +void +COnscreenTimer::AddClock(uint32 offset, char* text, bool bGoingDown) +{ + for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) { if(m_sClocks[i].m_nClockOffset == 0) { + m_sClocks[i].m_nClockOffset = offset; + m_sClocks[i].m_bClockGoingDown = bGoingDown; + if(text) + strncpy(m_sClocks[i].m_aClockText, text, ARRAY_SIZE(m_sClocks[0].m_aClockText)); + else + m_sClocks[i].m_aClockText[0] = '\0'; break; } - return; - } - - m_sClocks[i].m_nClockOffset = offset; - m_sClocks[i].m_bClockGoingDown = bGoingDown; - if(text) { - strncpy(m_sClocks[i].m_aClockText, text, ARRAY_SIZE(m_sClocks[0].m_aClockText)); - } else { - m_sClocks[i].m_aClockText[0] = 0; } } -void COnscreenTimerEntry::Process() { - if(m_nClockOffset == 0) { +void +COnscreenTimerEntry::Process() +{ + if(m_nClockOffset == 0) return; - } int32* timerPtr = CTheScripts::GetPointerToScriptVariable(m_nClockOffset); int32 oldTime = *timerPtr; @@ -147,13 +149,17 @@ void COnscreenTimerEntry::Process() { *timerPtr = oldTime + int32(CTimer::GetTimeStepInMilliseconds()); } -void COnscreenTimerEntry::ProcessForDisplayClock() { +void +COnscreenTimerEntry::ProcessForDisplayClock() +{ uint32 time = *CTheScripts::GetPointerToScriptVariable(m_nClockOffset); sprintf(m_aClockBuffer, "%02d:%02d", time / 1000 / 60 % 100, time / 1000 % 60); } -void COnscreenCounterEntry::ProcessForDisplayCounter() { +void +COnscreenCounterEntry::ProcessForDisplayCounter() +{ uint32 counter = *CTheScripts::GetPointerToScriptVariable(m_nCounterOffset); sprintf(m_aCounterBuffer, "%d", counter); } diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp index bf72199d..80d40b45 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -200,8 +200,8 @@ CPedPath::AddBlockade(CEntity *pEntity, CPedPathNode(*pathNodes)[40], CVector *p const float fBoundMaxY = boundingBox.max.y + 0.3f; const float fBoundMinY = boundingBox.min.y - 0.3f; const float fBoundMaxX = boundingBox.max.x + 0.3f; - const float fDistanceX = pPosition->x - pEntity->m_matrix.GetPosition().x; - const float fDistanceY = pPosition->y - pEntity->m_matrix.GetPosition().y; + const float fDistanceX = pPosition->x - pEntity->GetMatrix().GetPosition().x; + const float fDistanceY = pPosition->y - pEntity->GetMatrix().GetPosition().y; const float fBoundRadius = pEntity->GetBoundRadius(); CVector vecBoundCentre; pEntity->GetBoundCentre(vecBoundCentre); @@ -215,8 +215,8 @@ CPedPath::AddBlockade(CEntity *pEntity, CPedPathNode(*pathNodes)[40], CVector *p if (!pathNodes[x][y].bBlockade) { const float pointY = y * 0.7f + fDistanceY; CVector2D point(pointX, pointY); - if (fBoundMaxX > Abs(DotProduct2D(point, pEntity->m_matrix.GetRight()))) { - float fDotProduct = DotProduct2D(point, pEntity->m_matrix.GetForward()); + if (fBoundMaxX > Abs(DotProduct2D(point, pEntity->GetMatrix().GetRight()))) { + float fDotProduct = DotProduct2D(point, pEntity->GetMatrix().GetForward()); if (fBoundMaxY > fDotProduct && fBoundMinY < fDotProduct) pathNodes[x][y].bBlockade = true; } diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp index 9b50a7ec..a962052f 100644 --- a/src/control/Phones.cpp +++ b/src/control/Phones.cpp @@ -13,6 +13,7 @@ #include "RpAnimBlend.h" #include "AnimBlendAssociation.h" #include "soundlist.h" +#include "SaveBuf.h" #ifdef FIX_BUGS #include "Replay.h" #endif @@ -197,10 +198,10 @@ void CPhoneInfo::Load(uint8 *buf, uint32 size) { INITSAVEBUF - m_nMax = ReadSaveBuf<int32>(buf); - m_nScriptPhonesMax = ReadSaveBuf<int32>(buf); + ReadSaveBuf(&m_nMax, buf); + ReadSaveBuf(&m_nScriptPhonesMax, buf); for (int i = 0; i < NUMPHONES; i++) { - m_aPhones[i] = ReadSaveBuf<CPhone>(buf); + ReadSaveBuf(&m_aPhones[i], buf); // It's saved as building pool index in save file, convert it to true entity if (m_aPhones[i].m_pEntity) { m_aPhones[i].m_pEntity = CPools::GetBuildingPool()->GetSlot((uintptr)m_aPhones[i].m_pEntity - 1); diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 7bc88321..fd7bfe0e 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -33,6 +33,7 @@ #include "Hud.h" #include "Messages.h" #include "Streaming.h" +#include "SaveBuf.h" CPickup CPickups::aPickUps[NUMPICKUPS]; int16 CPickups::NumMessages; @@ -1008,8 +1009,7 @@ CPickups::DoPickUpEffects(CEntity *entity) entity->bDoNotRender = CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame; if (!entity->bDoNotRender) { - float s = Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800)); - float modifiedSin = 0.3f * (s + 1.0f); + float modifiedSin = 0.3f * (Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800)) + 1.0f); #ifdef FIX_BUGS int16 colorId = 0; @@ -1149,7 +1149,20 @@ CPickups::DoPickUpEffects(CEntity *entity) if (model == MI_MINIGUN || model == MI_MINIGUN2) scale = 1.2f; - entity->GetMatrix().SetRotateZOnlyScaled((float)(CTimer::GetTimeInMilliseconds() & 0x7FF) * DEGTORAD(360.0f / 0x800), scale); + float angle = (float)(CTimer::GetTimeInMilliseconds() & 0x7FF) * DEGTORAD(360.0f / 0x800); + float c = Cos(angle) * scale; + float s = Sin(angle) * scale; + + // we know from SA they were setting each field manually like this + entity->GetMatrix().rx = c; + entity->GetMatrix().ry = s; + entity->GetMatrix().rz = 0.0f; + entity->GetMatrix().fx = -s; + entity->GetMatrix().fy = c; + entity->GetMatrix().fz = 0.0f; + entity->GetMatrix().ux = 0.0f; + entity->GetMatrix().uy = 0.0f; + entity->GetMatrix().uz = scale; if (entity->GetModelIndex() == MI_MINIGUN2) { CMatrix matrix1; @@ -1429,7 +1442,7 @@ CPickups::Load(uint8 *buf, uint32 size) INITSAVEBUF for (int32 i = 0; i < NUMPICKUPS; i++) { - aPickUps[i] = ReadSaveBuf<CPickup>(buf); + ReadSaveBuf(&aPickUps[i], buf); if (aPickUps[i].m_eType != PICKUP_NONE) { if (aPickUps[i].m_pObject != nil) @@ -1440,12 +1453,12 @@ INITSAVEBUF } - CollectedPickUpIndex = ReadSaveBuf<uint16>(buf); - ReadSaveBuf<uint16>(buf); + ReadSaveBuf(&CollectedPickUpIndex, buf); + SkipSaveBuf(buf, 2); NumMessages = 0; for (uint16 i = 0; i < NUMCOLLECTEDPICKUPS; i++) - aPickUpsCollected[i] = ReadSaveBuf<int32>(buf); + ReadSaveBuf(&aPickUpsCollected[i], buf); VALIDATESAVEBUF(size) } diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index cd612d5d..71b28f7a 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -425,9 +425,9 @@ void CReplay::RecordParticle(tParticleType type, const CVector& vecPos, const CV pp->pos_x = 4.0f * vecPos.x; pp->pos_y = 4.0f * vecPos.y; pp->pos_z = 4.0f * vecPos.z; - pp->dir_x = 120.0f * clamp(vecDir.x, -1.0f, 1.0f); - pp->dir_y = 120.0f * clamp(vecDir.y, -1.0f, 1.0f); - pp->dir_z = 120.0f * clamp(vecDir.z, -1.0f, 1.0f); + pp->dir_x = 120.0f * Clamp(vecDir.x, -1.0f, 1.0f); + pp->dir_y = 120.0f * Clamp(vecDir.y, -1.0f, 1.0f); + pp->dir_z = 120.0f * Clamp(vecDir.z, -1.0f, 1.0f); pp->size = fSize; pp->r = color.red; pp->g = color.green; @@ -463,8 +463,8 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state) CAnimBlendAssociation* main = RpAnimBlendClumpGetMainAssociation((RpClump*)ped->m_rwObject, &second, &blend_amount); if (main){ state->animId = main->animId; - state->time = 255.0f / 4.0f * clamp(main->currentTime, 0.0f, 4.0f); - state->speed = 255.0f / 3.0f * clamp(main->speed, 0.0f, 3.0f); + state->time = 255.0f / 4.0f * Clamp(main->currentTime, 0.0f, 4.0f); + state->speed = 255.0f / 3.0f * Clamp(main->speed, 0.0f, 3.0f); state->groupId = main->groupId; }else{ state->animId = 3; @@ -474,9 +474,9 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state) } if (second) { state->secAnimId = second->animId; - state->secTime = 255.0f / 4.0f * clamp(second->currentTime, 0.0f, 4.0f); - state->secSpeed = 255.0f / 3.0f * clamp(second->speed, 0.0f, 3.0f); - state->blendAmount = 255.0f / 2.0f * clamp(blend_amount, 0.0f, 2.0f); + state->secTime = 255.0f / 4.0f * Clamp(second->currentTime, 0.0f, 4.0f); + state->secSpeed = 255.0f / 3.0f * Clamp(second->speed, 0.0f, 3.0f); + state->blendAmount = 255.0f / 2.0f * Clamp(blend_amount, 0.0f, 2.0f); state->secGroupId = second->groupId; }else{ state->secAnimId = 0; @@ -488,9 +488,9 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state) CAnimBlendAssociation* partial = RpAnimBlendClumpGetMainPartialAssociation((RpClump*)ped->m_rwObject); if (partial) { state->partAnimId = partial->animId; - state->partAnimTime = 255.0f / 4.0f * clamp(partial->currentTime, 0.0f, 4.0f); - state->partAnimSpeed = 255.0f / 3.0f * clamp(partial->speed, 0.0f, 3.0f); - state->partBlendAmount = 255.0f / 2.0f * clamp(partial->blendAmount, 0.0f, 2.0f); + state->partAnimTime = 255.0f / 4.0f * Clamp(partial->currentTime, 0.0f, 4.0f); + state->partAnimSpeed = 255.0f / 3.0f * Clamp(partial->speed, 0.0f, 3.0f); + state->partBlendAmount = 255.0f / 2.0f * Clamp(partial->blendAmount, 0.0f, 2.0f); state->partGroupId = partial->groupId; }else{ state->partAnimId = 0; @@ -507,10 +507,10 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState CAnimBlendAssociation* assoc = RpAnimBlendClumpGetMainAssociation_N((RpClump*)ped->m_rwObject, i); if (assoc){ state->aAnimId[i] = assoc->animId; - state->aCurTime[i] = 255.0f / 4.0f * clamp(assoc->currentTime, 0.0f, 4.0f); - state->aSpeed[i] = 255.0f / 3.0f * clamp(assoc->speed, 0.0f, 3.0f); - state->aBlendAmount[i] = 255.0f / 2.0f * clamp(assoc->blendAmount, 0.0f, 2.0f); - state->aBlendDelta[i] = 127.0f / 32.0f * clamp(assoc->blendDelta, -16.0f, 16.0f); + state->aCurTime[i] = 255.0f / 4.0f * Clamp(assoc->currentTime, 0.0f, 4.0f); + state->aSpeed[i] = 255.0f / 3.0f * Clamp(assoc->speed, 0.0f, 3.0f); + state->aBlendAmount[i] = 255.0f / 2.0f * Clamp(assoc->blendAmount, 0.0f, 2.0f); + state->aBlendDelta[i] = 127.0f / 32.0f * Clamp(assoc->blendDelta, -16.0f, 16.0f); state->aFlags[i] = assoc->flags; state->aGroupId[i] = assoc->groupId; if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH || assoc->callbackType == CAnimBlendAssociation::CB_DELETE) { @@ -533,10 +533,10 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState CAnimBlendAssociation* assoc = RpAnimBlendClumpGetMainPartialAssociation_N((RpClump*)ped->m_rwObject, i); if (assoc) { state->aAnimId2[i] = assoc->animId; - state->aCurTime2[i] = 255.0f / 4.0f * clamp(assoc->currentTime, 0.0f, 4.0f); - state->aSpeed2[i] = 255.0f / 3.0f * clamp(assoc->speed, 0.0f, 3.0f); - state->aBlendAmount2[i] = 255.0f / 2.0f * clamp(assoc->blendAmount, 0.0f, 2.0f); - state->aBlendDelta2[i] = 127.0f / 16.0f * clamp(assoc->blendDelta, -16.0f, 16.0f); + state->aCurTime2[i] = 255.0f / 4.0f * Clamp(assoc->currentTime, 0.0f, 4.0f); + state->aSpeed2[i] = 255.0f / 3.0f * Clamp(assoc->speed, 0.0f, 3.0f); + state->aBlendAmount2[i] = 255.0f / 2.0f * Clamp(assoc->blendAmount, 0.0f, 2.0f); + state->aBlendDelta2[i] = 127.0f / 16.0f * Clamp(assoc->blendDelta, -16.0f, 16.0f); state->aFlags2[i] = assoc->flags; state->aGroupId2[i] = assoc->groupId; if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH || assoc->callbackType == CAnimBlendAssociation::CB_DELETE) { @@ -1463,7 +1463,7 @@ void CReplay::RestoreStuffFromMem(void) ped->SetModelIndex(mi); ped->m_pVehicleAnim = nil; ped->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, ped); - DMAudio.SetEntityStatus(ped->m_audioEntityId, true); + DMAudio.SetEntityStatus(ped->m_audioEntityId, TRUE); CPopulation::UpdatePedCount((ePedType)ped->m_nPedType, false); for (int j = 0; j < TOTAL_WEAPON_SLOTS; j++) { int mi1 = CWeaponInfo::GetWeaponInfo(ped->m_weapons[j].m_eWeaponType)->m_nModelId; @@ -1529,7 +1529,7 @@ void CReplay::RestoreStuffFromMem(void) car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true); } vehicle->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, vehicle); - DMAudio.SetEntityStatus(vehicle->m_audioEntityId, true); + DMAudio.SetEntityStatus(vehicle->m_audioEntityId, TRUE); CCarCtrl::UpdateCarCount(vehicle, false); if ((mi == MI_AIRTRAIN || mi == MI_DEADDODO) && vehicle->m_rwObject){ CVehicleModelInfo* info = (CVehicleModelInfo*)CModelInfo::GetModelInfo(mi); diff --git a/src/control/Restart.cpp b/src/control/Restart.cpp index e1950a29..39c9a234 100644 --- a/src/control/Restart.cpp +++ b/src/control/Restart.cpp @@ -3,6 +3,7 @@ #include "Restart.h" #include "Zones.h" #include "PathFind.h" +#include "SaveBuf.h" uint8 CRestart::OverrideHospitalLevel; uint8 CRestart::OverridePoliceStationLevel; @@ -173,29 +174,28 @@ INITSAVEBUF CheckSaveHeader(buf, 'R','S','T','\0', size - SAVE_HEADER_SIZE); for (int i = 0; i < NUM_RESTART_POINTS; i++) { - HospitalRestartPoints[i] = ReadSaveBuf<CVector>(buf); - HospitalRestartHeadings[i] = ReadSaveBuf<float>(buf); + ReadSaveBuf(&HospitalRestartPoints[i], buf); + ReadSaveBuf(&HospitalRestartHeadings[i], buf); } for (int i = 0; i < NUM_RESTART_POINTS; i++) { - PoliceRestartPoints[i] = ReadSaveBuf<CVector>(buf); - PoliceRestartHeadings[i] = ReadSaveBuf<float>(buf); + ReadSaveBuf(&PoliceRestartPoints[i], buf); + ReadSaveBuf(&PoliceRestartHeadings[i], buf); } - NumberOfHospitalRestarts = ReadSaveBuf<uint16>(buf); - NumberOfPoliceRestarts = ReadSaveBuf<uint16>(buf); - bOverrideRestart = ReadSaveBuf<bool>(buf); + ReadSaveBuf(&NumberOfHospitalRestarts, buf); + ReadSaveBuf(&NumberOfPoliceRestarts, buf); + ReadSaveBuf(&bOverrideRestart, buf); // skip something unused - ReadSaveBuf<uint8>(buf); - ReadSaveBuf<uint16>(buf); - - OverridePosition = ReadSaveBuf<CVector>(buf); - OverrideHeading = ReadSaveBuf<float>(buf); - bFadeInAfterNextDeath = ReadSaveBuf<bool>(buf); - bFadeInAfterNextArrest = ReadSaveBuf<bool>(buf); - OverrideHospitalLevel = ReadSaveBuf<uint8>(buf); - OverridePoliceStationLevel = ReadSaveBuf<uint8>(buf); + SkipSaveBuf(buf, 3); + + ReadSaveBuf(&OverridePosition, buf); + ReadSaveBuf(&OverrideHeading, buf); + ReadSaveBuf(&bFadeInAfterNextDeath, buf); + ReadSaveBuf(&bFadeInAfterNextArrest, buf); + ReadSaveBuf(&OverrideHospitalLevel, buf); + ReadSaveBuf(&OverridePoliceStationLevel, buf); VALIDATESAVEBUF(size); } diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp index 4f714e80..46eee71f 100644 --- a/src/control/RoadBlocks.cpp +++ b/src/control/RoadBlocks.cpp @@ -64,7 +64,7 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType float fRadius = pVehicle->GetBoundRadius() / pPoliceColModel->boundingSphere.radius; for (int32 i = 0; i < 2; i++) { const int32 roadBlockIndex = i + 2 * roadBlockType; - CVector posForZ = pVehicle->m_matrix * (fRadius * vecRoadBlockOffets[roadBlockIndex]); + CVector posForZ = pVehicle->GetMatrix() * (fRadius * vecRoadBlockOffets[roadBlockIndex]); int32 modelInfoId = MI_COP; eCopType copType = COP_STREET; switch (pVehicle->GetModelIndex()) @@ -239,10 +239,10 @@ CRoadBlocks::CreateRoadBlockBetween2Points(CVector point1, CVector point2) pVehicle->SetStatus(STATUS_ABANDONED); // pVehicle->GetHeightAboveRoad(); // called but return value is ignored? tmp.GetPosition().z += fModelRadius - 0.6f; - pVehicle->m_matrix = tmp; + pVehicle->SetMatrix(tmp); pVehicle->PlaceOnRoadProperly(); pVehicle->SetIsStatic(false); - pVehicle->m_matrix.UpdateRW(); + pVehicle->GetMatrix().UpdateRW(); pVehicle->m_nDoorLock = CARLOCK_UNLOCKED; CCarCtrl::JoinCarWithRoadSystem(pVehicle); pVehicle->bIsLocked = false; diff --git a/src/control/Script.cpp b/src/control/Script.cpp index cb208912..76ab9471 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1829,7 +1829,7 @@ void CMissionCleanup::Process() CWorld::Players[0].m_pPed->m_nDrunkCountdown = 0; CPad::GetPad(0)->SetDrunkInputDelay(0); CWorld::Players[0].m_bDriveByAllowed = true; - DMAudio.ShutUpPlayerTalking(0); + DMAudio.ShutUpPlayerTalking(FALSE); CVehicle::bDisableRemoteDetonation = false; CVehicle::bDisableRemoteDetonationOnContact = false; CGameLogic::ClearShortCut(); @@ -2208,20 +2208,16 @@ void CRunningScript::Init() int scriptToLoad = 0; const char *scriptfile = "main.scm"; -#ifdef _WIN32 -#include <Windows.h> -#endif int open_script() { - // glfwGetKey doesn't work because of CGame::Initialise is blocking -#ifdef _WIN32 - if (GetAsyncKeyState('G') & 0x8000) + // glfwGetKey doesn't work because of CGame::Initialise is blocking + CPad::UpdatePads(); + if (CPad::GetPad(0)->GetChar('G')) scriptToLoad = 0; - if (GetAsyncKeyState('R') & 0x8000) + if (CPad::GetPad(0)->GetChar('R')) scriptToLoad = 1; - if (GetAsyncKeyState('D') & 0x8000) + if (CPad::GetPad(0)->GetChar('D')) scriptToLoad = 2; -#endif switch (scriptToLoad) { case 0: scriptfile = "main.scm"; break; case 1: scriptfile = "freeroam_miami.scm"; break; diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp index 656973ca..4e7a1c3e 100644 --- a/src/control/Script2.cpp +++ b/src/control/Script2.cpp @@ -431,8 +431,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) float length = *(float*)&ScriptParams[5]; float x, y; if (angle != 0.0f){ - y = cos(angle) * length; - x = sin(angle) * length; + y = Cos(angle) * length; + x = Sin(angle) * length; }else{ y = length; x = 0.0f; diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp index 878278c5..ac632b15 100644 --- a/src/control/Script4.cpp +++ b/src/control/Script4.cpp @@ -749,7 +749,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CollectParameters(&m_nIp, 2); CPlayerPed* pPlayerPed = CWorld::Players[ScriptParams[0]].m_pPed; script_assert(pPlayerPed); - pPlayerPed->m_fArmour = clamp(pPlayerPed->m_fArmour + ScriptParams[1], 0.0f, CWorld::Players[ScriptParams[0]].m_nMaxArmour); + pPlayerPed->m_fArmour = Clamp(pPlayerPed->m_fArmour + ScriptParams[1], 0.0f, CWorld::Players[ScriptParams[0]].m_nMaxArmour); return 0; } case COMMAND_ADD_ARMOUR_TO_CHAR: @@ -757,7 +757,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CollectParameters(&m_nIp, 2); CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); script_assert(pPed); - pPed->m_fArmour = clamp(pPed->m_fArmour + ScriptParams[1], 0.0f, 100.0f); + pPed->m_fArmour = Clamp(pPed->m_fArmour + ScriptParams[1], 0.0f, 100.0f); return 0; } case COMMAND_OPEN_GARAGE: @@ -1398,7 +1398,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) { CollectParameters(&m_nIp, 1); DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND); - DMAudio.PlayFrontEndTrack(ScriptParams[0] + STREAMED_SOUND_MISSION_COMPLETED - 1, 0); + DMAudio.PlayFrontEndTrack(ScriptParams[0] + STREAMED_SOUND_MISSION_COMPLETED - 1, FALSE); return 0; } case COMMAND_CLEAR_AREA: diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index 1371f2e6..2806ee30 100644 --- a/src/control/Script5.cpp +++ b/src/control/Script5.cpp @@ -16,6 +16,7 @@ #include "SpecialFX.h" #include "World.h" #include "main.h" +#include "SaveBuf.h" void CRunningScript::UpdateCompareFlag(bool flag) { @@ -1006,10 +1007,10 @@ void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp) initAngle -= TWOPI; // it looks like the idea is to use a rectangle using the diagonal of the rectangle as // the side of new rectangle, with "length" being the length of second side - float rotatedSupX = supX + side2length * sin(initAngle); - float rotatedSupY = supY - side2length * cos(initAngle); - float rotatedInfX = infX + side2length * sin(initAngle); - float rotatedInfY = infY - side2length * cos(initAngle); + float rotatedSupX = supX + side2length * Sin(initAngle); + float rotatedSupY = supY - side2length * Cos(initAngle); + float rotatedInfX = infX + side2length * Sin(initAngle); + float rotatedInfY = infY - side2length * Cos(initAngle); float side1X = supX - infX; float side1Y = supY - infY; float side1Length = CVector2D(side1X, side1Y).Magnitude(); @@ -2184,15 +2185,19 @@ void CTheScripts::LoadAllScripts(uint8* buf, uint32 size) Init(); INITSAVEBUF CheckSaveHeader(buf, 'S', 'C', 'R', '\0', size - SAVE_HEADER_SIZE); - uint32 varSpace = ReadSaveBuf<uint32>(buf); + uint32 varSpace, type, handle; + uint32 tmp; + + ReadSaveBuf(&varSpace, buf); for (uint32 i = 0; i < varSpace; i++) - ScriptSpace[i] = ReadSaveBuf<uint8>(buf); - script_assert(ReadSaveBuf<uint32>(buf) == SCRIPT_DATA_SIZE); - OnAMissionFlag = ReadSaveBuf<uint32>(buf); - LastMissionPassedTime = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&ScriptSpace[i], buf); + ReadSaveBuf(&tmp, buf); + script_assert(tmp == SCRIPT_DATA_SIZE); + ReadSaveBuf(&OnAMissionFlag, buf); + ReadSaveBuf(&LastMissionPassedTime, buf); for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) { - uint32 type = ReadSaveBuf<uint32>(buf); - uint32 handle = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&type, buf); + ReadSaveBuf(&handle, buf); switch (type) { case 0: BuildingSwapArray[i].m_pBuilding = nil; @@ -2206,14 +2211,14 @@ INITSAVEBUF default: script_assert(false); } - BuildingSwapArray[i].m_nNewModel = ReadSaveBuf<uint32>(buf); - BuildingSwapArray[i].m_nOldModel = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&BuildingSwapArray[i].m_nNewModel, buf); + ReadSaveBuf(&BuildingSwapArray[i].m_nOldModel, buf); if (BuildingSwapArray[i].m_pBuilding) BuildingSwapArray[i].m_pBuilding->ReplaceWithNewModel(BuildingSwapArray[i].m_nNewModel); } for (uint32 i = 0; i < MAX_NUM_INVISIBILITY_SETTINGS; i++) { - uint32 type = ReadSaveBuf<uint32>(buf); - uint32 handle = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&type, buf); + ReadSaveBuf(&handle, buf); switch (type) { case 0: InvisibilitySettingArray[i] = nil; @@ -2236,14 +2241,22 @@ INITSAVEBUF if (InvisibilitySettingArray[i]) InvisibilitySettingArray[i]->bIsVisible = false; } - script_assert(ReadSaveBuf<bool>(buf) == bUsingAMultiScriptFile); - bPlayerHasMetDebbieHarry = ReadSaveBuf<uint8>(buf); - ReadSaveBuf<uint16>(buf); - script_assert(ReadSaveBuf<uint32>(buf) == MainScriptSize); - script_assert(ReadSaveBuf<uint32>(buf) == LargestMissionScriptSize); - script_assert(ReadSaveBuf<uint16>(buf) == NumberOfMissionScripts); - script_assert(ReadSaveBuf<uint16>(buf) == NumberOfExclusiveMissionScripts); - uint32 runningScripts = ReadSaveBuf<uint32>(buf); + bool tmpBool; + ReadSaveBuf(&tmpBool, buf); + script_assert(tmpBool == bUsingAMultiScriptFile); + ReadSaveBuf(&bPlayerHasMetDebbieHarry, buf); + SkipSaveBuf(buf, 2); + ReadSaveBuf(&tmp, buf); + script_assert(tmp == MainScriptSize); + ReadSaveBuf(&tmp, buf); + script_assert(tmp == LargestMissionScriptSize); + uint16 tmp16; + ReadSaveBuf(&tmp16, buf); + script_assert(tmp16 == NumberOfMissionScripts); + ReadSaveBuf(&tmp16, buf); + script_assert(tmp16 == NumberOfExclusiveMissionScripts); + uint32 runningScripts; + ReadSaveBuf(&runningScripts, buf); for (uint32 i = 0; i < runningScripts; i++) StartNewScript(0)->Load(buf); VALIDATESAVEBUF(size) @@ -2291,35 +2304,35 @@ void CRunningScript::Load(uint8*& buf) #ifdef COMPATIBLE_SAVES SkipSaveBuf(buf, 8); for (int i = 0; i < 8; i++) - m_abScriptName[i] = ReadSaveBuf<char>(buf); - m_nIp = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&m_abScriptName[i], buf); + ReadSaveBuf(&m_nIp, buf); #ifdef CHECK_STRUCT_SIZES static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6"); #endif for (int i = 0; i < MAX_STACK_DEPTH; i++) - m_anStack[i] = ReadSaveBuf<uint32>(buf); - m_nStackPointer = ReadSaveBuf<uint16>(buf); + ReadSaveBuf(&m_anStack[i], buf); + ReadSaveBuf(&m_nStackPointer, buf); SkipSaveBuf(buf, 2); #ifdef CHECK_STRUCT_SIZES static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18"); #endif for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++) - m_anLocalVariables[i] = ReadSaveBuf<int32>(buf); - m_bIsActive = ReadSaveBuf<bool>(buf); - m_bCondResult = ReadSaveBuf<bool>(buf); - m_bIsMissionScript = ReadSaveBuf<bool>(buf); - m_bSkipWakeTime = ReadSaveBuf<bool>(buf); - m_nWakeTime = ReadSaveBuf<uint32>(buf); - m_nAndOrState = ReadSaveBuf<uint16>(buf); - m_bNotFlag = ReadSaveBuf<bool>(buf); - m_bDeatharrestEnabled = ReadSaveBuf<bool>(buf); - m_bDeatharrestExecuted = ReadSaveBuf<bool>(buf); - m_bMissionFlag = ReadSaveBuf<bool>(buf); + ReadSaveBuf(&m_anLocalVariables[i], buf); + ReadSaveBuf(&m_bIsActive, buf); + ReadSaveBuf(&m_bCondResult, buf); + ReadSaveBuf(&m_bIsMissionScript, buf); + ReadSaveBuf(&m_bSkipWakeTime, buf); + ReadSaveBuf(&m_nWakeTime, buf); + ReadSaveBuf(&m_nAndOrState, buf); + ReadSaveBuf(&m_bNotFlag, buf); + ReadSaveBuf(&m_bDeatharrestEnabled, buf); + ReadSaveBuf(&m_bDeatharrestExecuted, buf); + ReadSaveBuf(&m_bMissionFlag, buf); SkipSaveBuf(buf, 2); #else CRunningScript* n = next; CRunningScript* p = prev; - *this = ReadSaveBuf<CRunningScript>(buf); + ReadSaveBuf(this, buf); next = n; prev = p; #endif diff --git a/src/control/SetPieces.cpp b/src/control/SetPieces.cpp index 0409a8bf..5edcd335 100644 --- a/src/control/SetPieces.cpp +++ b/src/control/SetPieces.cpp @@ -11,6 +11,7 @@ #include "Wanted.h" #include "World.h" #include "VarConsole.h" +#include "SaveBuf.h" #define TIME_BETWEEN_SETPIECE_SPAWNS 20000 @@ -67,9 +68,9 @@ VALIDATESAVEBUF(*size) void CSetPieces::Load(uint8* buf, uint32 size) { INITSAVEBUF - NumSetPieces = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&NumSetPieces, buf); for (int i = 0; i < NUM_SETPIECES; i++) - aSetPieces[i] = ReadSaveBuf<CSetPiece>(buf); + ReadSaveBuf(&aSetPieces[i], buf); VALIDATESAVEBUF(size) } diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index fdfe2275..cafbd340 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -1183,7 +1183,7 @@ CCam::Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, fl float ReqSpeed = DeltaBeta * SpeedMultiplier; // this is also added - ReqSpeed = clamp(ReqSpeed, -SpeedLimit, SpeedLimit); + ReqSpeed = Clamp(ReqSpeed, -SpeedLimit, SpeedLimit); // Add or subtract absolute depending on sign, genius! if(ReqSpeed - BetaSpeed > 0.0f) @@ -1678,7 +1678,7 @@ CCam::WorkOutCamHeight(const CVector &TargetCoors, float TargetOrientation, floa Test.z = TargetCoors.z + 0.2f + Length*Sin(CarAlpha+AlphaOffset) + m_fCloseInCarHeightOffset; if(CWorld::ProcessVerticalLine(Test, CamTargetEntity->GetPosition().z, point, entity, true, false, false, false, false, false, nil)){ float sin = (point.point.z - TargetCoors.z - 0.2f - m_fCloseInCarHeightOffset)/Length; - CarAlpha = Asin(clamp(sin, -1.0f, 1.0f)) - AlphaOffset; + CarAlpha = Asin(Clamp(sin, -1.0f, 1.0f)) - AlphaOffset; if(CarAlpha < 0.0f) AlphaOffset += CarAlpha; } @@ -1828,7 +1828,7 @@ CCam::Process_Cam_On_A_String(const CVector &CameraTarget, float TargetOrientati if(DeltaBeta > PI) DeltaBeta -= TWOPI; else if(DeltaBeta < -PI) DeltaBeta += TWOPI; float dist = (TargetCoors - Source).Magnitude(); - dist = FIRETRUCK_TRACKING_MULT*dist*clamp(DeltaBeta, -0.8f, 0.8f); + dist = FIRETRUCK_TRACKING_MULT*dist*Clamp(DeltaBeta, -0.8f, 0.8f); Source += dist*CrossProduct(Front, CVector(0.0f, 0.0f, 1.0f)); } @@ -2801,7 +2801,7 @@ CCam::Process_1rstPersonPedOnPC(const CVector&, float TargetOrientation, float, if(BetaOffset > PI) BetaOffset -= TWOPI; else if(BetaOffset < PI) BetaOffset += TWOPI; - BetaOffset = clamp(BetaOffset, -pedTarget->m_attachRotStep, pedTarget->m_attachRotStep); + BetaOffset = Clamp(BetaOffset, -pedTarget->m_attachRotStep, pedTarget->m_attachRotStep); Beta = NewBeta + BetaOffset; } @@ -3271,7 +3271,7 @@ CCam::Process_BehindBoat(const CVector &CameraTarget, float TargetOrientation, f // useless call //CWaterLevel::GetWaterLevelNoWaves(TargetCoors.x, TargetCoors.y, TargetCoors.z, &Water); Water = (WaterLevel + WATER_Z_ADDITION_MIN - WaterLevelBuffered - WATER_Z_ADDITION)/(BoatDimensions.z/2.0f + MaxHeightUp); - TargetAlpha = Asin(clamp(Water, -1.0f, 1.0f)); + TargetAlpha = Asin(Clamp(Water, -1.0f, 1.0f)); } if(ResetStatics){ @@ -3457,7 +3457,7 @@ FindSplinePathPositionFloat(float *out, float *spline, uint32 time, uint32 &mark } } float a = ((float)time - (float)MS(spline[marker-4])) / (float)MS(spline[marker] - spline[marker-4]); - a = clamp(a, 0.0f, 1.0f); + a = Clamp(a, 0.0f, 1.0f); float b = 1.0f - a; *out = b*b*b * spline[marker-3] + 3.0f*a*b*b * spline[marker-1] + @@ -3495,7 +3495,7 @@ FindSplinePathPositionVector(CVector *out, float *spline, uint32 time, uint32 &m } float a = ((float)time - (float)MS(spline[marker-10])) / (float)MS(spline[marker] - spline[marker-10]); - a = clamp(a, 0.0f, 1.0f); + a = Clamp(a, 0.0f, 1.0f); float b = 1.0f - a; out->x = b*b*b * spline[marker-9] + @@ -4921,7 +4921,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, // 0.98f: CAR_FOV_FADE_MULT FOV = Pow(0.98f, CTimer::GetTimeStep()) * (FOV - DefaultFOV) + DefaultFOV; - FOV = clamp(FOV, DefaultFOV, DefaultFOV + 30.0f); + FOV = Clamp(FOV, DefaultFOV, DefaultFOV + 30.0f); } // WORKAROUND: I still don't know how looking behind works (m_bCamDirectlyInFront is unused in III, they seem to use m_bUseTransitionBeta) @@ -4952,9 +4952,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, AlphaSpeed = 0.0; Distance = 1000.0; - Front.x = -(cos(Beta) * cos(Alpha)); - Front.y = -(sin(Beta) * cos(Alpha)); - Front.z = sin(Alpha); + Front.x = -(Cos(Beta) * Cos(Alpha)); + Front.y = -(Sin(Beta) * Cos(Alpha)); + Front.z = Sin(Alpha); m_aTargetHistoryPosOne = TargetCoors - nextDistance * Front; @@ -5040,7 +5040,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, } } - float targetAlpha = Asin(clamp(Front.z, -1.0f, 1.0f)) - zoomModeAlphaOffset; + float targetAlpha = Asin(Clamp(Front.z, -1.0f, 1.0f)) - zoomModeAlphaOffset; if (targetAlpha <= maxAlphaAllowed) { if (targetAlpha < -CARCAM_SET[camSetArrPos][14]) targetAlpha = -CARCAM_SET[camSetArrPos][14]; @@ -5228,9 +5228,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, lastBeta = Beta; - Front.x = -(cos(Beta) * cos(Alpha)); - Front.y = -(sin(Beta) * cos(Alpha)); - Front.z = sin(Alpha); + Front.x = -(Cos(Beta) * Cos(Alpha)); + Front.y = -(Sin(Beta) * Cos(Alpha)); + Front.z = Sin(Alpha); GetVectorsReadyForRW(); TheCamera.m_bCamDirectlyBehind = false; TheCamera.m_bCamDirectlyInFront = false; @@ -5240,9 +5240,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, m_cvecTargetCoorsForFudgeInter = TargetCoors; m_aTargetHistoryPosThree = m_aTargetHistoryPosOne; float nextAlpha = alphaWithSpeedAccounted + zoomModeAlphaOffset; - float nextFrontX = -(cos(Beta) * cos(nextAlpha)); - float nextFrontY = -(sin(Beta) * cos(nextAlpha)); - float nextFrontZ = sin(nextAlpha); + float nextFrontX = -(Cos(Beta) * Cos(nextAlpha)); + float nextFrontY = -(Sin(Beta) * Cos(nextAlpha)); + float nextFrontZ = Sin(nextAlpha); m_aTargetHistoryPosOne.x = TargetCoors.x - nextFrontX * nextDistance; m_aTargetHistoryPosOne.y = TargetCoors.y - nextFrontY * nextDistance; @@ -5395,7 +5395,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, float alphaToFace = Atan2(hi.z, hi.Magnitude2D()) + DEGTORAD(15.0f); float neededAlphaTurn = alphaToFace - carGunUD; - float alphaTurnPerFrame = CTimer::GetTimeStep() * 0.02f; + float alphaTurnPerFrame = CTimer::GetTimeStepInSeconds(); if (neededAlphaTurn > alphaTurnPerFrame) { neededTurn = alphaTurnPerFrame; diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 5b3f9aa5..e7cd65a0 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -213,7 +213,7 @@ CCamera::Init(void) m_iModeToGoTo = CCam::MODE_FOLLOWPED; m_bJust_Switched = false; m_bUseTransitionBeta = false; - m_matrix.SetScale(1.0f); + GetMatrix().SetScale(1.0f); m_bTargetJustBeenOnTrain = false; m_bInitialNoNodeStaticsSet = false; m_uiLongestTimeInMill = 5000; @@ -347,7 +347,7 @@ CCamera::Process(void) currentTime = m_uiTransitionDuration; float fractionInter = (float) currentTime / m_uiTransitionDuration; float fractionInterTarget = (float) currentTime / m_uiTransitionDurationTargetCoors; - fractionInterTarget = clamp(fractionInterTarget, 0.0f, 1.0f); + fractionInterTarget = Clamp(fractionInterTarget, 0.0f, 1.0f); // Interpolate target separately if(fractionInterTarget <= m_fFractionInterToStopMovingTarget){ @@ -551,7 +551,7 @@ CCamera::Process(void) // Process Shake float shakeStrength = m_fCamShakeForce - 0.28f*(CTimer::GetTimeInMilliseconds()-m_uiCamShakeStart)/1000.0f; - shakeStrength = clamp(shakeStrength, 0.0f, 2.0f); + shakeStrength = Clamp(shakeStrength, 0.0f, 2.0f); int shakeRand = CGeneral::GetRandomNumber(); float shakeOffset = shakeStrength*0.1f; GetMatrix().GetPosition().x += shakeOffset * ((shakeRand & 0xF) - 7); @@ -1913,7 +1913,7 @@ CCamera::CamShake(float strength, float x, float y, float z) float curForce = mult*(m_fCamShakeForce - (CTimer::GetTimeInMilliseconds() - m_uiCamShakeStart)/1000.0f); strength = mult*strength; - if(clamp(curForce, 0.0f, 2.0f) < strength){ + if(Clamp(curForce, 0.0f, 2.0f) < strength){ m_fCamShakeForce = strength; m_uiCamShakeStart = CTimer::GetTimeInMilliseconds(); } @@ -1924,7 +1924,7 @@ void CamShakeNoPos(CCamera *cam, float strength) { float curForce = cam->m_fCamShakeForce - (CTimer::GetTimeInMilliseconds() - cam->m_uiCamShakeStart)/1000.0f; - if(clamp(curForce, 0.0f, 2.0f) < strength){ + if(Clamp(curForce, 0.0f, 2.0f) < strength){ cam->m_fCamShakeForce = strength; cam->m_uiCamShakeStart = CTimer::GetTimeInMilliseconds(); } @@ -3985,7 +3985,7 @@ CCamera::Find3rdPersonCamTargetVector(float dist, CVector pos, CVector &source, float CCamera::Find3rdPersonQuickAimPitch(void) { - float clampedFrontZ = clamp(Cams[ActiveCam].Front.z, -1.0f, 1.0f); + float clampedFrontZ = Clamp(Cams[ActiveCam].Front.z, -1.0f, 1.0f); float rot = Asin(clampedFrontZ); @@ -4017,7 +4017,7 @@ CCamera::SetRwCamera(RwCamera *cam) void CCamera::CalculateDerivedValues(void) { - m_cameraMatrix = Invert(m_matrix); + m_cameraMatrix = Invert(GetMatrix()); float hfov = DEGTORAD(CDraw::GetScaledFOV()/2.0f); float c = Cos(hfov); @@ -4101,16 +4101,11 @@ CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat bool CCamera::IsSphereVisible(const CVector ¢er, float radius) { - CMatrix mat = m_cameraMatrix; - return IsSphereVisible(center, radius, &mat); + return IsSphereVisible(center, radius, &GetCameraMatrix()); } bool -#ifdef GTA_PS2 -CCamera::IsBoxVisible(CVuVector *box, const CMatrix *mat) -#else -CCamera::IsBoxVisible(CVector *box, const CMatrix *mat) -#endif +CCamera::IsBoxVisible(CVUVECTOR *box, const CMatrix *mat) { int i; int frustumTests[6] = { 0 }; diff --git a/src/core/Camera.h b/src/core/Camera.h index 538ff067..39ecb760 100644 --- a/src/core/Camera.h +++ b/src/core/Camera.h @@ -633,11 +633,7 @@ public: bool IsPointVisible(const CVector ¢er, const CMatrix *mat); bool IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat); bool IsSphereVisible(const CVector ¢er, float radius); -#ifdef GTA_PS2 - bool IsBoxVisible(CVuVector *box, const CMatrix *mat); -#else - bool IsBoxVisible(CVector *box, const CMatrix *mat); -#endif + bool IsBoxVisible(CVUVECTOR *box, const CMatrix *mat); }; VALIDATE_SIZE(CCamera, 0xE9D8); diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp index 30fe06a0..bc9129eb 100644 --- a/src/core/CdStreamPosix.cpp +++ b/src/core/CdStreamPosix.cpp @@ -13,6 +13,7 @@ #include <fcntl.h> #include <sys/resource.h> #include <stdarg.h> +#include <limits.h> #ifdef __linux__ #include <sys/syscall.h> diff --git a/src/core/Crime.h b/src/core/Crime.h index 3c3e2b26..4c7ea315 100644 --- a/src/core/Crime.h +++ b/src/core/Crime.h @@ -28,7 +28,7 @@ class CCrimeBeingQd { public: eCrimeType m_nType; - uint32 m_nId; + int32 m_nId; uint32 m_nTime; CVector m_vecPosn; bool m_bReported; diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index bf017256..dbf2cad9 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -1074,7 +1074,7 @@ CFileLoader::Load2dEffect(const char *line) &probability); effect->attractor.type = flags; #ifdef FIX_BUGS - effect->attractor.probability = clamp(probability, 0, 255); + effect->attractor.probability = Clamp(probability, 0, 255); #else effect->attractor.probability = probability; #endif @@ -1206,7 +1206,7 @@ CFileLoader::LoadObjectInstance(const char *line) if(!CStreaming::IsObjectInCdImage(id)) debug("Not in cdimage %s\n", mi->GetModelName()); - angle = -RADTODEG(2.0f * acosf(angle)); + angle = -RADTODEG(2.0f * Acos(angle)); xform = RwMatrixCreate(); RwMatrixRotate(xform, &axis, angle, rwCOMBINEREPLACE); RwMatrixTranslate(xform, &trans, rwCOMBINEPOSTCONCAT); diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index d6c2649f..632a69ab 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -181,7 +181,7 @@ const char* FrontendFilenames[][2] = { #ifdef XBOX_MESSAGE_SCREEN bool CMenuManager::m_bDialogOpen = false; uint32 CMenuManager::m_nDialogHideTimer = 0; -PauseModeTime CMenuManager::m_nDialogHideTimerPauseMode = 0; +uint32 CMenuManager::m_nDialogHideTimerPauseMode = 0; bool CMenuManager::m_bSaveWasSuccessful = false; wchar* CMenuManager::m_pDialogText = nil; #endif @@ -697,27 +697,27 @@ CMenuManager::CheckSliderMovement(int value) switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) { case MENUACTION_BRIGHTNESS: m_PrefsBrightness += value * 24.19f; - m_PrefsBrightness = clamp(m_PrefsBrightness, 0, 384); + m_PrefsBrightness = Clamp(m_PrefsBrightness, 0, 384); break; case MENUACTION_DRAWDIST: if(value > 0) m_PrefsLOD += ((1.8f - 0.925f) / 16.0f); else m_PrefsLOD -= ((1.8f - 0.925f) / 16.0f); - m_PrefsLOD = clamp(m_PrefsLOD, 0.925f, 1.8f); + m_PrefsLOD = Clamp(m_PrefsLOD, 0.925f, 1.8f); CRenderer::ms_lodDistScale = m_PrefsLOD; break; case MENUACTION_MUSICVOLUME: if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) { m_PrefsMusicVolume += value * (128 / 32); - m_PrefsMusicVolume = clamp(m_PrefsMusicVolume, 0, 65); + m_PrefsMusicVolume = Clamp(m_PrefsMusicVolume, 0, 65); DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume); } break; case MENUACTION_SFXVOLUME: if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) { m_PrefsSfxVolume += value * (128 / 32); - m_PrefsSfxVolume = clamp(m_PrefsSfxVolume, 0, 65); + m_PrefsSfxVolume = Clamp(m_PrefsSfxVolume, 0, 65); DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume); } break; @@ -725,14 +725,14 @@ CMenuManager::CheckSliderMovement(int value) if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) { if (DMAudio.IsMP3RadioChannelAvailable()) { m_PrefsMP3BoostVolume += value * (128 / 32); - m_PrefsMP3BoostVolume = clamp(m_PrefsMP3BoostVolume, 0, 65); + m_PrefsMP3BoostVolume = Clamp(m_PrefsMP3BoostVolume, 0, 65); DMAudio.SetMP3BoostVolume(m_PrefsMP3BoostVolume); } } break; case MENUACTION_MOUSESENS: TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // ??? - TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f); + TheCamera.m_fMouseAccelHorzntl = Clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f); #ifdef FIX_BUGS TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f; #endif @@ -750,7 +750,7 @@ CMenuManager::DisplayHelperText(char *text) return; // there was a unused static bool - static PauseModeTime LastFlash = 0; + static uint32 LastFlash = 0; int32 alpha = 255; CFont::SetRightJustifyOn(); @@ -1425,19 +1425,21 @@ CMenuManager::DrawStandardMenus(bool activeScreen) } } - static PauseModeTime lastBlendChange = 0; + static uint32 lastBlendChange = 0; if (m_nOptionHighlightTransitionBlend <= 255) { static uint32 blendChangeCounter = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastBlendChange > 20 -#ifndef FIX_HIGH_FPS_BUGS_ON_FRONTEND // Dirty dirty hack || blendChangeCounter > 20 -#endif ) { m_nOptionHighlightTransitionBlend += 50; lastBlendChange = CTimer::GetTimeInMillisecondsPauseMode(); blendChangeCounter = 0; } +#ifdef FIX_BUGS + blendChangeCounter += CTimer::GetLogicalFramesPassed(); +#else ++blendChangeCounter; +#endif } } @@ -1928,7 +1930,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 CFont::PrintString(nextX, nextY, seperator); nextX += CFont::GetStringWidth(seperator, true) + bindingMargin; } - static PauseModeTime lastWaitingTextFlash = 0; + static uint32 lastWaitingTextFlash = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastWaitingTextFlash > 150) { showWaitingText = !showWaitingText; lastWaitingTextFlash = CTimer::GetTimeInMillisecondsPauseMode(); @@ -1993,7 +1995,7 @@ CMenuManager::DrawControllerScreenExtraText(int yStart, int xStart, int lineHeig CFont::PrintString(nextX, MENU_Y(yStart), TheText.Get("FEC_IBT")); nextX = CFont::GetStringWidth(TheText.Get("FEC_IBT"), true) + spacing + nextX; } - static PauseModeTime lastStateChange = 0; + static uint32 lastStateChange = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastStateChange > 150) { waitingTextVisible = !waitingTextVisible; lastStateChange = CTimer::GetTimeInMillisecondsPauseMode(); @@ -2377,22 +2379,27 @@ CMenuManager::DrawBackground(bool transitionCall) m_nOptionHighlightTransitionBlend = 0; } - static PauseModeTime LastFade = 0; + static uint32 LastFade = 0; if (m_nMenuFadeAlpha < 255) { static uint8 forceFadeInCounter = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - LastFade > 30 -#ifndef FIX_HIGH_FPS_BUGS_ON_FRONTEND // Dirty dirty hack || forceFadeInCounter > 30 -#endif ) { m_nMenuFadeAlpha += 20; if (m_firstStartCounter < 255) { m_firstStartCounter = Min(m_firstStartCounter + 20, 255); } LastFade = CTimer::GetTimeInMillisecondsPauseMode(); +#ifdef FIX_BUGS + forceFadeInCounter = 0; +#endif } +#ifdef FIX_BUGS + forceFadeInCounter += CTimer::GetLogicalFramesPassed(); +#else forceFadeInCounter++; +#endif } else if (m_nMenuFadeAlpha > 255) m_nMenuFadeAlpha = 255; @@ -2448,7 +2455,7 @@ CMenuManager::DrawBackground(bool transitionCall) } if (m_ShowEmptyBindingError) { - static PauseModeTime lastBindingError = CTimer::GetTimeInMillisecondsPauseMode(); + static uint32 lastBindingError = CTimer::GetTimeInMillisecondsPauseMode(); static bool bindingErrorShown = false; if (bindingErrorShown) { lastBindingError = CTimer::GetTimeInMillisecondsPauseMode(); @@ -2895,9 +2902,15 @@ CMenuManager::InitialiseChangedLanguageSettings() { if (m_bFrontEnd_ReloadObrTxtGxt) { m_bFrontEnd_ReloadObrTxtGxt = false; +#ifdef FIX_BUGS + if (gGameState > GS_INIT_ONCE) +#endif CTimer::Stop(); TheText.Unload(); TheText.Load(); +#ifdef FIX_BUGS + if (gGameState > GS_INIT_ONCE) +#endif CTimer::Update(); CGame::frenchGame = false; CGame::germanGame = false; @@ -3332,7 +3345,7 @@ CMenuManager::PrintStats() else CFont::SetScale(MENU_X(0.37f), MENU_Y(0.75f)); - static PauseModeTime lastCheck = 0; + static uint32 lastCheck = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastCheck > 40) { @@ -3460,8 +3473,8 @@ CMenuManager::Process(void) break; \ \ m_fMapSize *= z2; \ - m_fMapCenterX = clamp(m_fMapCenterX, SCREEN_WIDTH/2 - (m_fMapSize - MENU_X(MAP_MIN_SIZE)), m_fMapSize - MENU_X(MAP_MIN_SIZE) + SCREEN_WIDTH/2); \ - m_fMapCenterY = clamp(m_fMapCenterY, SCREEN_HEIGHT/2 - (m_fMapSize - MENU_Y(MAP_MIN_SIZE)), m_fMapSize - MENU_Y(MAP_MIN_SIZE) + SCREEN_HEIGHT/2); \ + m_fMapCenterX = Clamp(m_fMapCenterX, SCREEN_WIDTH/2 - (m_fMapSize - MENU_X(MAP_MIN_SIZE)), m_fMapSize - MENU_X(MAP_MIN_SIZE) + SCREEN_WIDTH/2); \ + m_fMapCenterY = Clamp(m_fMapCenterY, SCREEN_HEIGHT/2 - (m_fMapSize - MENU_Y(MAP_MIN_SIZE)), m_fMapSize - MENU_Y(MAP_MIN_SIZE) + SCREEN_HEIGHT/2); \ } while(0) #endif @@ -3473,7 +3486,7 @@ CMenuManager::AdditionalOptionInput(bool &goBack) switch (m_nCurrScreen) { case MENUPAGE_MAP: { - static PauseModeTime lastMapTick = 0; + static uint32 lastMapTick = 0; // FIX: All those macros were hardcoded values originally. @@ -3499,8 +3512,8 @@ CMenuManager::AdditionalOptionInput(bool &goBack) m_fMapCenterX += (SCREEN_WIDTH/2 - m_fMapCenterX) / ((m_fMapSize - MENU_X(MAP_MIN_SIZE)) * 1/15.f); m_fMapSize = Max(MENU_Y(MAP_MIN_SIZE), m_fMapSize - MENU_Y(15.f)); - m_fMapCenterX = clamp(m_fMapCenterX, SCREEN_WIDTH/2 - (m_fMapSize - MENU_X(MAP_MIN_SIZE)), m_fMapSize - MENU_X(MAP_MIN_SIZE) + SCREEN_WIDTH/2); - m_fMapCenterY = clamp(m_fMapCenterY, SCREEN_HEIGHT/2 - (m_fMapSize - MENU_Y(MAP_MIN_SIZE)), m_fMapSize - MENU_Y(MAP_MIN_SIZE) + SCREEN_HEIGHT/2); + m_fMapCenterX = Clamp(m_fMapCenterX, SCREEN_WIDTH/2 - (m_fMapSize - MENU_X(MAP_MIN_SIZE)), m_fMapSize - MENU_X(MAP_MIN_SIZE) + SCREEN_WIDTH/2); + m_fMapCenterY = Clamp(m_fMapCenterY, SCREEN_HEIGHT/2 - (m_fMapSize - MENU_Y(MAP_MIN_SIZE)), m_fMapSize - MENU_Y(MAP_MIN_SIZE) + SCREEN_HEIGHT/2); } else { m_fMapSize = MENU_Y(MAP_MIN_SIZE); } @@ -3541,8 +3554,8 @@ CMenuManager::AdditionalOptionInput(bool &goBack) if (!justResetPointer) { m_fMapCenterX += m_nMousePosX - m_nMouseOldPosX; m_fMapCenterY += m_nMousePosY - m_nMouseOldPosY; - m_fMapCenterX = clamp(m_fMapCenterX, SCREEN_WIDTH/2 - (m_fMapSize - MENU_X(MAP_MIN_SIZE)), m_fMapSize - MENU_X(MAP_MIN_SIZE) + SCREEN_WIDTH/2); - m_fMapCenterY = clamp(m_fMapCenterY, SCREEN_HEIGHT/2 - (m_fMapSize - MENU_Y(MAP_MIN_SIZE)), m_fMapSize - MENU_Y(MAP_MIN_SIZE) + SCREEN_HEIGHT/2); + m_fMapCenterX = Clamp(m_fMapCenterX, SCREEN_WIDTH/2 - (m_fMapSize - MENU_X(MAP_MIN_SIZE)), m_fMapSize - MENU_X(MAP_MIN_SIZE) + SCREEN_WIDTH/2); + m_fMapCenterY = Clamp(m_fMapCenterY, SCREEN_HEIGHT/2 - (m_fMapSize - MENU_Y(MAP_MIN_SIZE)), m_fMapSize - MENU_Y(MAP_MIN_SIZE) + SCREEN_HEIGHT/2); } justResetPointer = false; @@ -3802,7 +3815,7 @@ CMenuManager::ExportStats() void CMenuManager::PrintRadioSelector(void) { - static PauseModeTime lastRadioChange = 0; + static uint32 lastRadioChange = 0; CSprite2d::Draw2DPolygon(MENU_X_LEFT_ALIGNED(418.f), MENU_Y(MENURADIO_SELECTOR_START_Y + MENURADIO_SELECTOR_HEIGHT), MENU_X_LEFT_ALIGNED(228.f), MENU_Y(MENURADIO_SELECTOR_START_Y + MENURADIO_SELECTOR_HEIGHT), @@ -3925,7 +3938,7 @@ CMenuManager::PrintRadioSelector(void) #endif static bool radioChangeRequested = false; - static PauseModeTime lastScrollCheck = 0; + static uint32 lastScrollCheck = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastScrollCheck > 17) { if (m_ScrollRadioBy == 1) { if (m_LeftMostRadioX > MENU_X_LEFT_ALIGNED(MENURADIO_ICON_FIRST_X - MENURADIO_ICON_SIZE)) { @@ -3968,7 +3981,7 @@ CMenuManager::PrintRadioSelector(void) if (radioChangeRequested) { if (CTimer::GetTimeInMillisecondsPauseMode() - lastRadioChange > 50) { DMAudio.SetRadioInCar(m_PrefsRadioStation); - DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1); + DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE); OutputDebugString("FRONTEND RADIO STATION CHANGED"); lastRadioChange = CTimer::GetTimeInMillisecondsPauseMode(); radioChangeRequested = false; @@ -4009,7 +4022,7 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack) field_159 = false; } - static PauseModeTime lastTimeClickedScrollButton = 0; + static uint32 lastTimeClickedScrollButton = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastTimeClickedScrollButton >= 200) { m_bPressedPgUpOnList = false; @@ -4395,7 +4408,7 @@ CMenuManager::UserInput(void) int curAction = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action; if (CPad::GetPad(0)->GetLeft() || CPad::GetPad(0)->GetPedWalkLeftRight() < 0 || CPad::GetPad(0)->GetDPadLeft()) { - static PauseModeTime lastSliderDecrease = 0; + static uint32 lastSliderDecrease = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastSliderDecrease > 150) { if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME || curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO || @@ -4406,7 +4419,7 @@ CMenuManager::UserInput(void) lastSliderDecrease = CTimer::GetTimeInMillisecondsPauseMode(); } } else if (CPad::GetPad(0)->GetRight() || CPad::GetPad(0)->GetPedWalkLeftRight() > 0 || CPad::GetPad(0)->GetDPadRight()) { - static PauseModeTime lastSliderIncrease = 0; + static uint32 lastSliderIncrease = 0; if (CTimer::GetTimeInMillisecondsPauseMode() - lastSliderIncrease > 150) { if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME || curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO || @@ -4545,19 +4558,11 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u #ifdef USE_DEBUG_SCRIPT_LOADER if (m_nCurrScreen == MENUPAGE_START_MENU || m_nCurrScreen == MENUPAGE_NEW_GAME || m_nCurrScreen == MENUPAGE_NEW_GAME_RELOAD) { -#ifdef RW_GL3 - if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_R) == GLFW_PRESS) { + if (CPad::GetPad(0)->GetChar('R')) { scriptToLoad = 1; DoSettingsBeforeStartingAGame(); return; } -#elif defined _WIN32 - if (GetAsyncKeyState('R') & 0x8000) { - scriptToLoad = 1; - DoSettingsBeforeStartingAGame(); - return; - } -#endif } #endif @@ -4702,7 +4707,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u case MENUACTION_LOADRADIO: if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) { SwitchToNewScreen(MENUPAGE_SOUND_SETTINGS); - DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1); + DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE); OutputDebugString("STARTED PLAYING FRONTEND AUDIO TRACK"); } break; @@ -4807,7 +4812,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume); DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume); DMAudio.SetRadioInCar(m_PrefsRadioStation); - DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1); + DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE); SaveSettings(); } else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) { m_PrefsBrightness = 256; @@ -5037,7 +5042,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u case MENUACTION_SPEAKERCONF: if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) { m_PrefsSpeakers -= changeAmount; - m_PrefsSpeakers = clamp(m_PrefsSpeakers, 0, 2); + m_PrefsSpeakers = Clamp(m_PrefsSpeakers, 0, 2); DMAudio.SetSpeakerConfig(m_PrefsSpeakers); SaveSettings(); } @@ -5396,7 +5401,7 @@ CMenuManager::ProcessFileActions() { #ifdef XBOX_MESSAGE_SCREEN if (m_bDialogOpen && DialogTextCmp("FESZ_WR")) { - PauseModeTime startTime = CTimer::GetTimeInMillisecondsPauseMode(); + uint32 startTime = CTimer::GetTimeInMillisecondsPauseMode(); int8 SaveSlot = PcSaveHelper.SaveSlot(m_nCurrSaveSlot); PcSaveHelper.PopulateSlotInfo(); @@ -5648,19 +5653,19 @@ CMenuManager::DrawQuitGameScreen(void) static int32 exitSignalTimer = 0; #ifdef FIX_BUGS - int alpha = clamp(m_nMenuFadeAlpha, 0, 255); + int alpha = Clamp(m_nMenuFadeAlpha, 0, 255); #else int alpha = m_nMenuFadeAlpha; #endif #ifndef MUCH_SHORTER_OUTRO_SCREEN - static PauseModeTime lastTickIncrease = 0; + static uint32 lastTickIncrease = 0; if (alpha == 255 && CTimer::GetTimeInMillisecondsPauseMode() - lastTickIncrease > 10) { exitSignalTimer++; lastTickIncrease = CTimer::GetTimeInMillisecondsPauseMode(); } #else - static PauseModeTime firstTick = CTimer::GetTimeInMillisecondsPauseMode(); + static uint32 firstTick = CTimer::GetTimeInMillisecondsPauseMode(); if (alpha == 255 && CTimer::GetTimeInMillisecondsPauseMode() - firstTick > 750) { exitSignalTimer = 150; } diff --git a/src/core/Frontend.h b/src/core/Frontend.h index 112ea7ad..b4e70613 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -735,7 +735,7 @@ public: #ifdef XBOX_MESSAGE_SCREEN static uint32 m_nDialogHideTimer; - static PauseModeTime m_nDialogHideTimerPauseMode; + static uint32 m_nDialogHideTimerPauseMode; static bool m_bDialogOpen; static wchar *m_pDialogText; static bool m_bSaveWasSuccessful; diff --git a/src/core/FrontendTriggers.h b/src/core/FrontendTriggers.h index b2bde09c..bbafb4be 100644 --- a/src/core/FrontendTriggers.h +++ b/src/core/FrontendTriggers.h @@ -779,7 +779,7 @@ TriggerAudio_RadioStation(CMenuMultiChoicePicturedTriggered *widget) if ( CMenuManager::m_PrefsRadioStation != widget->GetMenuSelection() ) { CMenuManager::m_PrefsRadioStation = widget->GetMenuSelection(); - DMAudio.PlayFrontEndTrack(CMenuManager::m_PrefsRadioStation, 1); + DMAudio.PlayFrontEndTrack(CMenuManager::m_PrefsRadioStation, TRUE); DMAudio.SetRadioInCar(CMenuManager::m_PrefsRadioStation); } } diff --git a/src/core/Frontend_PS2.cpp b/src/core/Frontend_PS2.cpp index c0fcc652..fa238031 100644 --- a/src/core/Frontend_PS2.cpp +++ b/src/core/Frontend_PS2.cpp @@ -1375,7 +1375,7 @@ CMenuManager::DrawFrontEndNormal(void) if ((m_nStartPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) <= 1600) alpha = float(m_nStartPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 400.0f; - m_someAlpha = 255 - clamp(alpha, 0.0f, 1.0f) * 255.0f; + m_someAlpha = 255 - Clamp(alpha, 0.0f, 1.0f) * 255.0f; switch ( m_nSlidingDir ) { @@ -1392,7 +1392,7 @@ CMenuManager::DrawFrontEndNormal(void) float slide = float(m_nEndPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 800.0f; float alpha = float((int32)(m_nEndPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) + -266) / 533.0f; - m_someAlpha = clamp(alpha, 0.0f, 1.0f) * 255.0f; + m_someAlpha = Clamp(alpha, 0.0f, 1.0f) * 255.0f; switch ( m_nSlidingDir ) { @@ -2858,7 +2858,7 @@ CMenuManager::ProcessDPadCrossJustDown(void) { if ( !gMusicPlaying ) { - DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1); + DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE); gMusicPlaying = true; } } diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 43bd3d11..c5e5224d 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -245,10 +245,16 @@ CGame::InitialiseRenderWare(void) #ifdef LIBRW #ifdef PS2_MATFX - rw::MatFX::modulateEnvMap = true; + rw::MatFX::envMapApplyLight = true; + rw::MatFX::envMapUseMatColor = true; + rw::MatFX::envMapFlipU = true; #else - rw::MatFX::modulateEnvMap = false; + rw::MatFX::envMapApplyLight = false; + rw::MatFX::envMapUseMatColor = false; + rw::MatFX::envMapFlipU = false; #endif + rw::RGBA envcol = { 64, 64, 64, 255 }; + rw::MatFX::envMapColor = envcol; #else #ifdef PS2_MATFX ReplaceMatFxCallback(); @@ -571,7 +577,7 @@ bool CGame::Initialise(const char* datFile) #endif - DMAudio.SetStartingTrackPositions(true); + DMAudio.SetStartingTrackPositions(TRUE); DMAudio.ChangeMusicMode(MUSICMODE_GAME); return true; } diff --git a/src/core/General.h b/src/core/General.h index 2f205c39..c17d916d 100644 --- a/src/core/General.h +++ b/src/core/General.h @@ -56,7 +56,7 @@ public: static float LimitRadianAngle(float angle) { - float result = clamp(angle, -25.0f, 25.0f); + float result = Clamp(angle, -25.0f, 25.0f); while (result >= PI) { result -= 2 * PI; diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp index 0534e34a..49bb33f8 100644 --- a/src/core/MenuScreensCustom.cpp +++ b/src/core/MenuScreensCustom.cpp @@ -26,6 +26,7 @@ #include "ModelInfo.h" #include "Pad.h" #include "ControllerConfig.h" +#include "DMAudio.h" // Menu screens array is at the bottom of the file. @@ -194,6 +195,8 @@ void MultiSamplingButtonPress(int8 action) { if (FrontEndMenuManager.m_nDisplayMSAALevel != FrontEndMenuManager.m_nPrefsMSAALevel) { FrontEndMenuManager.m_nPrefsMSAALevel = FrontEndMenuManager.m_nDisplayMSAALevel; _psSelectScreenVM(FrontEndMenuManager.m_nPrefsVideoMode); + DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND); + DMAudio.Service(); FrontEndMenuManager.SetHelperText(0); FrontEndMenuManager.SaveSettings(); } @@ -255,6 +258,8 @@ const char* screenModes[] = { "FED_FLS", "FED_WND" }; void ScreenModeAfterChange(int8 before, int8 after) { _psSelectScreenVM(FrontEndMenuManager.m_nPrefsVideoMode); // apply same resolution + DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND); + DMAudio.Service(); FrontEndMenuManager.SetHelperText(0); } diff --git a/src/core/Placeable.h b/src/core/Placeable.h index b0f9a15a..9c8c292a 100644 --- a/src/core/Placeable.h +++ b/src/core/Placeable.h @@ -2,12 +2,13 @@ class CPlaceable { +protected: + CMatrix m_matrix; + public: // disable allocation static void *operator new(size_t); - CMatrix m_matrix; - CPlaceable(void); const CVector &GetPosition(void) { return m_matrix.GetPosition(); } void SetPosition(float x, float y, float z) { @@ -20,6 +21,7 @@ public: CVector &GetForward(void) { return m_matrix.GetForward(); } CVector &GetUp(void) { return m_matrix.GetUp(); } CMatrix &GetMatrix(void) { return m_matrix; } + void SetMatrix(CMatrix &newMatrix) { m_matrix = newMatrix; } void SetTransform(RwMatrix *m) { m_matrix = CMatrix(m, false); } void SetHeading(float angle); void SetOrientation(float x, float y, float z){ diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index a64d4cca..36d05b82 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -299,7 +299,7 @@ CPlayerInfo::Process(void) m_fRoadDensity = ThePaths.CalcRoadDensity(playerPos.x, playerPos.y); } - m_fRoadDensity = clamp(m_fRoadDensity, 0.5f, 1.45f); + m_fRoadDensity = Clamp(m_fRoadDensity, 0.5f, 1.45f); // Because vehicle enter/exit use same key binding. bool enterOrExitVeh; diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp index bf35f8ef..d1947813 100644 --- a/src/core/Pools.cpp +++ b/src/core/Pools.cpp @@ -14,6 +14,7 @@ #include "Wanted.h" #include "World.h" #include "MemoryHeap.h" +#include "SaveBuf.h" CCPtrNodePool *CPools::ms_pPtrNodePool; CEntryInfoNodePool *CPools::ms_pEntryInfoNodePool; @@ -105,7 +106,7 @@ CPools::CheckPoolsEmpty() printf("pools have been cleared\n"); } - +// Thankfully unused, it would break the game! void CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot) { @@ -137,15 +138,20 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot) void CPools::LoadVehiclePool(uint8* buf, uint32 size) { INITSAVEBUF - int nNumCars = ReadSaveBuf<int>(buf); - int nNumBoats = ReadSaveBuf<int>(buf); - int nNumBikes = ReadSaveBuf<int>(buf); + int nNumCars, nNumBoats, nNumBikes; + ReadSaveBuf(&nNumCars, buf); + ReadSaveBuf(&nNumBoats, buf); + ReadSaveBuf(&nNumBikes, buf); for (int i = 0; i < nNumCars + nNumBoats + nNumBikes; i++) { - uint32 type = ReadSaveBuf<uint32>(buf); - int16 model = ReadSaveBuf<int16>(buf); + uint32 type; + int16 model; + int32 slot; + + ReadSaveBuf(&type, buf); + ReadSaveBuf(&model, buf); CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY); CStreaming::LoadAllRequestedModels(false); - int32 slot = ReadSaveBuf<int32>(buf); + ReadSaveBuf(&slot, buf); CVehicle* pVehicle; #ifdef COMPATIBLE_SAVES if (type == VEHICLE_TYPE_BOAT) diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 4bb9c966..f58f4687 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -19,6 +19,7 @@ #include "Streaming.h" #include "SpecialFX.h" #include "Font.h" +#include "SaveBuf.h" float CRadar::m_radarRange; sRadarTrace CRadar::ms_RadarTrace[NUMRADARBLIPS]; @@ -184,6 +185,75 @@ void GetTextureCorners(int32 x, int32 y, CVector2D *out) out[3].y = RADAR_TILE_SIZE * (y); } +uint8 CRadar::CalculateBlipAlpha(float dist) +{ + if (FrontEndMenuManager.m_bMenuMapActive) + return 255; + + if (dist <= 1.0f) + return 255; + + if (dist <= 10.0f) + return (128.0f * ((dist - 1.0f) / 9.0f)) + ((1.0f - (dist - 1.0f) / 9.0f) * 255.0f); + + return 128; +} + +void CRadar::ChangeBlipBrightness(int32 i, int32 bright) +{ + int index = GetActualBlipArrayIndex(i); + if (index != -1) + ms_RadarTrace[index].m_bDim = bright != 1; +} + +void CRadar::ChangeBlipColour(int32 i, int32 color) +{ + int index = GetActualBlipArrayIndex(i); + if (index != -1) + ms_RadarTrace[index].m_nColor = color; +} + +void CRadar::ChangeBlipDisplay(int32 i, eBlipDisplay display) +{ + int index = GetActualBlipArrayIndex(i); + if (index != -1) + ms_RadarTrace[index].m_eBlipDisplay = display; +} + +void CRadar::ChangeBlipScale(int32 i, int32 scale) +{ + int index = GetActualBlipArrayIndex(i); + if (index != -1) + ms_RadarTrace[index].m_wScale = scale; +} + +void CRadar::ClearBlip(int32 i) +{ + int index = GetActualBlipArrayIndex(i); + if (index != -1) { + SetRadarMarkerState(index, false); + ms_RadarTrace[index].m_bInUse = false; + ms_RadarTrace[index].m_eBlipType = BLIP_NONE; + ms_RadarTrace[index].m_eBlipDisplay = BLIP_DISPLAY_NEITHER; + ms_RadarTrace[index].m_eRadarSprite = RADAR_SPRITE_NONE; + } +} + +void CRadar::ClearBlipForEntity(eBlipType type, int32 id) +{ + for (int i = 0; i < NUMRADARBLIPS; i++) { + if (type == ms_RadarTrace[i].m_eBlipType && id == ms_RadarTrace[i].m_nEntityHandle) { + SetRadarMarkerState(i, false); + ms_RadarTrace[i].m_bInUse = false; + ms_RadarTrace[i].m_eBlipType = BLIP_NONE; + ms_RadarTrace[i].m_eBlipDisplay = BLIP_DISPLAY_NEITHER; + ms_RadarTrace[i].m_eRadarSprite = RADAR_SPRITE_NONE; + } + }; +} + +// Why not a proper clipping algorithm? +#ifdef THIS_IS_STUPID bool IsPointInsideRadar(const CVector2D &point) { @@ -264,74 +334,6 @@ int LineRadarBoxCollision(CVector2D &out, const CVector2D &p1, const CVector2D & return edge; } -uint8 CRadar::CalculateBlipAlpha(float dist) -{ - if (FrontEndMenuManager.m_bMenuMapActive) - return 255; - - if (dist <= 1.0f) - return 255; - - if (dist <= 10.0f) - return (128.0f * ((dist - 1.0f) / 9.0f)) + ((1.0f - (dist - 1.0f) / 9.0f) * 255.0f); - - return 128; -} - -void CRadar::ChangeBlipBrightness(int32 i, int32 bright) -{ - int index = GetActualBlipArrayIndex(i); - if (index != -1) - ms_RadarTrace[index].m_bDim = bright != 1; -} - -void CRadar::ChangeBlipColour(int32 i, int32 color) -{ - int index = GetActualBlipArrayIndex(i); - if (index != -1) - ms_RadarTrace[index].m_nColor = color; -} - -void CRadar::ChangeBlipDisplay(int32 i, eBlipDisplay display) -{ - int index = GetActualBlipArrayIndex(i); - if (index != -1) - ms_RadarTrace[index].m_eBlipDisplay = display; -} - -void CRadar::ChangeBlipScale(int32 i, int32 scale) -{ - int index = GetActualBlipArrayIndex(i); - if (index != -1) - ms_RadarTrace[index].m_wScale = scale; -} - -void CRadar::ClearBlip(int32 i) -{ - int index = GetActualBlipArrayIndex(i); - if (index != -1) { - SetRadarMarkerState(index, false); - ms_RadarTrace[index].m_bInUse = false; - ms_RadarTrace[index].m_eBlipType = BLIP_NONE; - ms_RadarTrace[index].m_eBlipDisplay = BLIP_DISPLAY_NEITHER; - ms_RadarTrace[index].m_eRadarSprite = RADAR_SPRITE_NONE; - } -} - -void CRadar::ClearBlipForEntity(eBlipType type, int32 id) -{ - for (int i = 0; i < NUMRADARBLIPS; i++) { - if (type == ms_RadarTrace[i].m_eBlipType && id == ms_RadarTrace[i].m_nEntityHandle) { - SetRadarMarkerState(i, false); - ms_RadarTrace[i].m_bInUse = false; - ms_RadarTrace[i].m_eBlipType = BLIP_NONE; - ms_RadarTrace[i].m_eBlipDisplay = BLIP_DISPLAY_NEITHER; - ms_RadarTrace[i].m_eRadarSprite = RADAR_SPRITE_NONE; - } - }; -} - -// Why not a proper clipping algorithm? int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect) { CVector2D corners[4] = { @@ -410,6 +412,50 @@ int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect) return n; } +#else + +int +ClipPolyPlane(const CVector2D *in, int nin, CVector2D *out, CVector *plane) +{ + int j; + int nout; + int x1, x2; + float d1, d2, t; + + nout = 0; + for(j = 0; j < nin; j++){ + x1 = j; + x2 = (j+1) % nin; + + d1 = plane->x*in[x1].x + plane->y*in[x1].y + plane->z; + d2 = plane->x*in[x2].x + plane->y*in[x2].y + plane->z; + if(d1*d2 < 0.0f){ + t = d1/(d1 - d2); + out[nout++] = in[x1]*(1.0f-t) + in[x2]*t; + } + if(d2 >= 0.0f) + out[nout++] = in[x2]; + } + return nout; +} + +int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect) +{ + CVector planes[4] = { + CVector(-1.0f, 0.0f, 1.0f), + CVector( 1.0f, 0.0f, 1.0f), + CVector(0.0f, -1.0f, 1.0f), + CVector(0.0f, 1.0f, 1.0f) + }; + CVector2D tmp[8]; + int n; + if(n = ClipPolyPlane(rect, 4, tmp, &planes[0]), n == 0) return 0; + if(n = ClipPolyPlane(tmp, n, poly, &planes[1]), n == 0) return 0; + if(n = ClipPolyPlane(poly, n, tmp, &planes[2]), n == 0) return 0; + if(n = ClipPolyPlane(tmp, n, poly, &planes[3]), n == 0) return 0; + return n; +} +#endif bool CRadar::DisplayThisBlip(int32 counter) { @@ -433,7 +479,7 @@ void CRadar::Draw3dMarkers() if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { CVector pos = entity->GetPosition(); pos.z += 1.2f * CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 2.5f; - C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 2.5f, CARBLIP_MARKER_COLOR_R, CARBLIP_MARKER_COLOR_G, CARBLIP_MARKER_COLOR_B, CARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); + C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 2.5f, CARBLIP_MARKER_COLOR_R, CARBLIP_MARKER_COLOR_G, CARBLIP_MARKER_COLOR_B, CARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); } break; } @@ -447,7 +493,7 @@ void CRadar::Draw3dMarkers() if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { CVector pos = entity->GetPosition(); pos.z += 3.0f; - C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.5f, CHARBLIP_MARKER_COLOR_R, CHARBLIP_MARKER_COLOR_G, CHARBLIP_MARKER_COLOR_B, CHARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); + C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 1.5f, CHARBLIP_MARKER_COLOR_R, CHARBLIP_MARKER_COLOR_G, CHARBLIP_MARKER_COLOR_B, CHARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); } break; } @@ -457,7 +503,7 @@ void CRadar::Draw3dMarkers() if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { CVector pos = entity->GetPosition(); pos.z += CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 1.0f + 1.0f; - C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.0f, OBJECTBLIP_MARKER_COLOR_R, OBJECTBLIP_MARKER_COLOR_G, OBJECTBLIP_MARKER_COLOR_B, OBJECTBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); + C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 1.0f, OBJECTBLIP_MARKER_COLOR_R, OBJECTBLIP_MARKER_COLOR_G, OBJECTBLIP_MARKER_COLOR_B, OBJECTBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); } break; } @@ -466,7 +512,7 @@ void CRadar::Draw3dMarkers() case BLIP_CONTACT_POINT: if (!CTheScripts::IsPlayerOnAMission()) { if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) - C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), 4, ms_RadarTrace[i].m_vecPos, 2.0f, COORDBLIP_MARKER_COLOR_R, COORDBLIP_MARKER_COLOR_G, COORDBLIP_MARKER_COLOR_B, COORDBLIP_MARKER_COLOR_A, 2048, 0.2f, 0); + C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_CYLINDER, ms_RadarTrace[i].m_vecPos, 2.0f, COORDBLIP_MARKER_COLOR_R, COORDBLIP_MARKER_COLOR_G, COORDBLIP_MARKER_COLOR_B, COORDBLIP_MARKER_COLOR_A, 2048, 0.2f, 0); } break; } @@ -928,21 +974,21 @@ INITSAVEBUF CheckSaveHeader(buf, 'R', 'D', 'R', '\0', size - SAVE_HEADER_SIZE); for (int i = 0; i < NUMRADARBLIPS; i++) { - ms_RadarTrace[i].m_nColor = ReadSaveBuf<uint32>(buf); - ms_RadarTrace[i].m_Radius = ReadSaveBuf<float>(buf); - ms_RadarTrace[i].m_eBlipType = ReadSaveBuf<uint32>(buf); - ms_RadarTrace[i].m_nEntityHandle = ReadSaveBuf<int32>(buf); - ms_RadarTrace[i].m_vec2DPos.x = ReadSaveBuf<float>(buf); // CVector2D - ms_RadarTrace[i].m_vec2DPos.y = ReadSaveBuf<float>(buf); - ms_RadarTrace[i].m_vecPos = ReadSaveBuf<CVector>(buf); - ms_RadarTrace[i].m_BlipIndex = ReadSaveBuf<uint16>(buf); - ms_RadarTrace[i].m_bDim = ReadSaveBuf<bool>(buf); - ms_RadarTrace[i].m_bInUse = ReadSaveBuf<bool>(buf); - ms_RadarTrace[i].m_bShortRange = ReadSaveBuf<bool>(buf); - ms_RadarTrace[i].m_unused = ReadSaveBuf<bool>(buf); - ms_RadarTrace[i].m_wScale = ReadSaveBuf<int16>(buf); - ms_RadarTrace[i].m_eBlipDisplay = ReadSaveBuf<uint16>(buf); - ms_RadarTrace[i].m_eRadarSprite = ReadSaveBuf<uint16>(buf); + ReadSaveBuf(&ms_RadarTrace[i].m_nColor, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_Radius, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_eBlipType, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_nEntityHandle, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_vec2DPos.x, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_vec2DPos.y, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_vecPos, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_BlipIndex, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_bDim, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_bInUse, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_bShortRange, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_unused, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_wScale, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_eBlipDisplay, buf); + ReadSaveBuf(&ms_RadarTrace[i].m_eRadarSprite, buf); } VALIDATESAVEBUF(size); @@ -1337,7 +1383,7 @@ CRadar::InitFrontEndMap() void CRadar::DrawYouAreHereSprite(float x, float y) { - static PauseModeTime lastChange = 0; + static uint32 lastChange = 0; static bool show = true; if (show) { @@ -1537,7 +1583,7 @@ void CRadar::DrawLegend(int32 x, int32 y, int32 sprite) { if (sprite < 0) { - static PauseModeTime lastChange = 0; + static uint32 lastChange = 0; static int8 blipMode = 0; CRGBA color; diff --git a/src/core/References.cpp b/src/core/References.cpp index dc83d96d..09913817 100644 --- a/src/core/References.cpp +++ b/src/core/References.cpp @@ -39,9 +39,7 @@ CEntity::RegisterReference(CEntity **pent) ref->pentity = pent; ref->next = m_pFirstReference; m_pFirstReference = ref; - return; } - return; } // Clean up the reference from *pent -> 'this' diff --git a/src/core/Ropes.cpp b/src/core/Ropes.cpp index e390a917..71297eb1 100644 --- a/src/core/Ropes.cpp +++ b/src/core/Ropes.cpp @@ -150,7 +150,7 @@ CRopes::FindCoorsAlongRope(uintptr id, float t, CVector *coors) float f; for(i = 0; i < ARRAY_SIZE(aRopes); i++) if(aRopes[i].m_bActive && aRopes[i].m_id == id){ - t = (ARRAY_SIZE(aRopes[0].m_pos)-1)*clamp(t, 0.0f, 0.999f); + t = (ARRAY_SIZE(aRopes[0].m_pos)-1)*Clamp(t, 0.0f, 0.999f); j = t; f = t - j; *coors = (1.0f-f)*aRopes[i].m_pos[j] + f*aRopes[i].m_pos[j+1]; diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index b28a99fc..6d980e18 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1724,7 +1724,13 @@ CStreaming::StreamVehiclesAndPeds(void) for(i = 0; i < CCarCtrl::TOTAL_CUSTOM_CLASSES; i++){ if(CCarCtrl::NumRequestsOfCarRating[i] > maxReq && ((i == 0 && zone.carThreshold[0] != 0) || +#ifdef FIX_BUGS + (i < CCarCtrl::NUM_CAR_CLASSES && zone.carThreshold[i] != zone.carThreshold[i-1]) || + (i == CCarCtrl::NUM_CAR_CLASSES && zone.boatThreshold[i - CCarCtrl::NUM_CAR_CLASSES] != 0) || + (i > CCarCtrl::NUM_CAR_CLASSES && i < CCarCtrl::TOTAL_CUSTOM_CLASSES && zone.boatThreshold[i - CCarCtrl::NUM_CAR_CLASSES] != zone.boatThreshold[i - CCarCtrl::NUM_CAR_CLASSES - 1]))) { +#else (i != 0 && zone.carThreshold[i] != zone.carThreshold[i-1]))) { +#endif maxReq = CCarCtrl::NumRequestsOfCarRating[i]; mostRequestedRating = i; } @@ -1867,8 +1873,7 @@ CStreaming::RemoveCurrentZonesModels(void) if (ms_currentPedGrp != -1) for (i = 0; i < NUMMODELSPERPEDGROUP; i++) { ms_bIsPedFromPedGroupLoaded[i] = false; - if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != -1 && - CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != MI_MALE01) { + if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != -1) { SetModelIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); SetModelTxdIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); } diff --git a/src/core/Timer.cpp b/src/core/Timer.cpp index 5ebe3f53..77f26a8b 100644 --- a/src/core/Timer.cpp +++ b/src/core/Timer.cpp @@ -8,7 +8,7 @@ #include "SpecialFX.h" uint32 CTimer::m_snTimeInMilliseconds; -PauseModeTime CTimer::m_snTimeInMillisecondsPauseMode = 1; +uint32 CTimer::m_snTimeInMillisecondsPauseMode = 1; uint32 CTimer::m_snTimeInMillisecondsNonClipped; uint32 CTimer::m_snPreviousTimeInMilliseconds; @@ -17,7 +17,11 @@ float CTimer::ms_fTimeScale; float CTimer::ms_fTimeStep; float CTimer::ms_fTimeStepNonClipped; bool CTimer::m_UserPause; -bool CTimer::m_CodePause; +bool CTimer::m_CodePause; +#ifdef FIX_BUGS +uint32 CTimer::m_LogicalFrameCounter; +uint32 CTimer::m_LogicalFramesPassed; +#endif uint32 _nCyclesPerMS = 1; @@ -35,10 +39,6 @@ RsTimerType suspendPcTimer; uint32 suspendDepth; -#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND -double frameTime; -#endif - void CTimer::Initialise(void) { debug("Initialising CTimer...\n"); @@ -51,6 +51,10 @@ void CTimer::Initialise(void) m_snTimeInMillisecondsNonClipped = 0; m_snPreviousTimeInMilliseconds = 0; m_snTimeInMilliseconds = 1; +#ifdef FIX_BUGS + m_LogicalFrameCounter = 0; + m_LogicalFramesPassed = 0; +#endif #ifdef _WIN32 LARGE_INTEGER perfFreq; @@ -82,8 +86,15 @@ void CTimer::Shutdown(void) ; } +#ifdef FIX_BUGS void CTimer::Update(void) -{ +{ + static double frameTimeLogical = 0.0; + static double frameTimeFraction = 0.0; + static double frameTimeFractionScaled = 0.0; + double frameTime; + double dblUpdInMs; + m_snPreviousTimeInMilliseconds = m_snTimeInMilliseconds; #ifdef _WIN32 @@ -98,12 +109,89 @@ void CTimer::Update(void) float updInCyclesScaled = GetIsPaused() ? updInCycles : updInCycles * ms_fTimeScale; - // We need that real frame time to fix transparent menu bug. -#ifndef FIX_HIGH_FPS_BUGS_ON_FRONTEND - double -#endif frameTime = updInCyclesScaled / (double)_nCyclesPerMS; + dblUpdInMs = (double)updInCycles / (double)_nCyclesPerMS; + } + else +#endif + { + RsTimerType timer = RsTimer(); + + RsTimerType updInMs = timer - oldPcTimer; + + frameTime = (double)updInMs * ms_fTimeScale; + + oldPcTimer = timer; + + dblUpdInMs = (double)updInMs; + } + + // count frames as if we're running at 30 fps + m_LogicalFramesPassed = 0; + frameTimeLogical += dblUpdInMs; + while (frameTimeLogical >= 1000.0 / 30.0) { + frameTimeLogical -= 1000.0 / 30.0; + m_LogicalFramesPassed++; + } + m_LogicalFrameCounter += m_LogicalFramesPassed; + + frameTimeFraction += dblUpdInMs; + frameTimeFractionScaled += frameTime; + + m_snTimeInMillisecondsPauseMode += uint32(frameTimeFraction); + + if ( GetIsPaused() ) + ms_fTimeStep = 0.0f; + else + { + m_snTimeInMilliseconds += uint32(frameTimeFractionScaled); + m_snTimeInMillisecondsNonClipped += uint32(frameTimeFractionScaled); + ms_fTimeStep = frameTime / 1000.0f * 50.0f; + } + frameTimeFraction -= uint32(frameTimeFraction); + frameTimeFractionScaled -= uint32(frameTimeFractionScaled); + + if ( ms_fTimeStep < 0.01f && !GetIsPaused() && !CSpecialFX::bSnapShotActive) + ms_fTimeStep = 0.01f; + + ms_fTimeStepNonClipped = ms_fTimeStep; + + if ( !CRecordDataForGame::IsPlayingBack() ) + { + ms_fTimeStep = Min(3.0f, ms_fTimeStep); + + if ( (m_snTimeInMilliseconds - m_snPreviousTimeInMilliseconds) > 60 ) + m_snTimeInMilliseconds = m_snPreviousTimeInMilliseconds + 60; + } + + if ( CRecordDataForChase::IsRecording() ) + { + ms_fTimeStep = 1.0f; + m_snTimeInMilliseconds = m_snPreviousTimeInMilliseconds + 16; + } + + m_FrameCounter++; +} +#else +void CTimer::Update(void) +{ + m_snPreviousTimeInMilliseconds = m_snTimeInMilliseconds; + +#ifdef _WIN32 + if ( (double)_nCyclesPerMS != 0.0 ) + { + LARGE_INTEGER pc; + QueryPerformanceCounter(&pc); + + int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart); // & 0x7FFFFFFF; pointless + + _oldPerfCounter = pc; + + float updInCyclesScaled = GetIsPaused() ? updInCycles : updInCycles * ms_fTimeScale; + + double frameTime = updInCyclesScaled / (double)_nCyclesPerMS; + m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + frameTime; if ( GetIsPaused() ) @@ -122,16 +210,12 @@ void CTimer::Update(void) RsTimerType updInMs = timer - oldPcTimer; - // We need that real frame time to fix transparent menu bug. -#ifndef FIX_HIGH_FPS_BUGS_ON_FRONTEND - double -#endif - frameTime = (double)updInMs * ms_fTimeScale; + double frameTime = (double)updInMs * ms_fTimeScale; oldPcTimer = timer; - + m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + frameTime; - + if ( GetIsPaused() ) ms_fTimeStep = 0.0f; else @@ -163,6 +247,7 @@ void CTimer::Update(void) m_FrameCounter++; } +#endif void CTimer::Suspend(void) { diff --git a/src/core/Timer.h b/src/core/Timer.h index 53591c4f..819bd30c 100644 --- a/src/core/Timer.h +++ b/src/core/Timer.h @@ -1,22 +1,20 @@ #pragma once -#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND -#define PauseModeTime double -#else -#define PauseModeTime uint32 -#endif - class CTimer { static uint32 m_snTimeInMilliseconds; - static PauseModeTime m_snTimeInMillisecondsPauseMode; + static uint32 m_snTimeInMillisecondsPauseMode; static uint32 m_snTimeInMillisecondsNonClipped; static uint32 m_snPreviousTimeInMilliseconds; static uint32 m_FrameCounter; static float ms_fTimeScale; static float ms_fTimeStep; static float ms_fTimeStepNonClipped; +#ifdef FIX_BUGS + static uint32 m_LogicalFrameCounter; + static uint32 m_LogicalFramesPassed; +#endif public: static bool m_UserPause; static bool m_CodePause; @@ -35,7 +33,7 @@ public: static void SetTimeInMilliseconds(uint32 t) { m_snTimeInMilliseconds = t; } static uint32 GetTimeInMillisecondsNonClipped(void) { return m_snTimeInMillisecondsNonClipped; } static void SetTimeInMillisecondsNonClipped(uint32 t) { m_snTimeInMillisecondsNonClipped = t; } - static PauseModeTime GetTimeInMillisecondsPauseMode(void) { return m_snTimeInMillisecondsPauseMode; } + static uint32 GetTimeInMillisecondsPauseMode(void) { return m_snTimeInMillisecondsPauseMode; } static void SetTimeInMillisecondsPauseMode(uint32 t) { m_snTimeInMillisecondsPauseMode = t; } static uint32 GetPreviousTimeInMilliseconds(void) { return m_snPreviousTimeInMilliseconds; } static void SetPreviousTimeInMilliseconds(uint32 t) { m_snPreviousTimeInMilliseconds = t; } @@ -67,9 +65,7 @@ public: #ifdef FIX_BUGS static float GetDefaultTimeStep(void) { return 50.0f / 30.0f; } static float GetTimeStepFix(void) { return GetTimeStep() / GetDefaultTimeStep(); } + static uint32 GetLogicalFrameCounter(void) { return m_LogicalFrameCounter; } + static uint32 GetLogicalFramesPassed(void) { return m_LogicalFramesPassed; } #endif }; - -#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND -extern double frameTime; -#endif diff --git a/src/core/World.cpp b/src/core/World.cpp index 2683a28d..841aab40 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -65,7 +65,7 @@ CWorld::Initialise() void CWorld::Add(CEntity *ent) { - if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, true); + if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, TRUE); if(ent->bIsBIGBuilding) ms_bigBuildingsList[ent->m_level].InsertItem(ent); @@ -80,7 +80,7 @@ CWorld::Add(CEntity *ent) void CWorld::Remove(CEntity *ent) { - if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, false); + if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, FALSE); if(ent->bIsBIGBuilding) ms_bigBuildingsList[ent->m_level].RemoveItem(ent); @@ -399,8 +399,8 @@ CWorld::ProcessVerticalLine(const CVector &point1, float z2, CColPoint &point, C CVector point2(point1.x, point1.y, z2); int secX = GetSectorIndexX(point1.x); int secY = GetSectorIndexY(point1.y); - secX = clamp(secX, 0, NUMSECTORS_X-1); - secY = clamp(secY, 0, NUMSECTORS_Y-1); + secX = Clamp(secX, 0, NUMSECTORS_X-1); + secY = Clamp(secY, 0, NUMSECTORS_Y-1); return ProcessVerticalLineSector(*GetSector(secX, secY), CColLine(point1, point2), point, entity, checkBuildings, checkVehicles, checkPeds, checkObjects, checkDummies, ignoreSeeThrough, poly); @@ -1486,7 +1486,7 @@ CWorld::CallOffChaseForAreaSectorListVehicles(CPtrList &list, float x1, float y1 CColModel *pColModel = pVehicle->GetColModel(); bool bInsideSphere = false; for(int32 i = 0; i < pColModel->numSpheres; i++) { - CVector pos = pVehicle->m_matrix * pColModel->spheres[i].center; + CVector pos = pVehicle->GetMatrix() * pColModel->spheres[i].center; float fRadius = pColModel->spheres[i].radius; if(pos.x + fRadius > x1 && pos.x - fRadius < x2 && pos.y + fRadius > y1 && pos.y - fRadius < y2) @@ -1803,7 +1803,7 @@ CWorld::RepositionOneObject(CEntity *pEntity) position.z = FindGroundZFor3DCoord(position.x, position.y, position.z + fHeight, nil) - fBoundingBoxMinZ; - pEntity->m_matrix.UpdateRW(); + pEntity->GetMatrix().UpdateRW(); pEntity->UpdateRwFrame(); } else if(IsLightThatNeedsRepositioning(modelId)) { CVector position = pEntity->GetMatrix().GetPosition(); diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp index 85564f03..93eca199 100644 --- a/src/core/Zones.cpp +++ b/src/core/Zones.cpp @@ -8,6 +8,7 @@ #include "Text.h" #include "World.h" #include "Timer.h" +#include "SaveBuf.h" eLevelName CTheZones::m_CurrLevel; int16 CTheZones::FindIndex; @@ -452,6 +453,7 @@ CTheZones::GetZoneInfoForTimeOfDay(const CVector *pos, CZoneInfo *info) assert(d >= 0.0f && d <= 1.0f); n = 1.0f - d; } +#ifdef FIX_BUGS info->carDensity = day->carDensity * d + night->carDensity * n; for(i = 0; i < ARRAY_SIZE(info->carThreshold); i++) info->carThreshold[i] = day->carThreshold[i] * d + night->carThreshold[i] * n; @@ -465,6 +467,22 @@ CTheZones::GetZoneInfoForTimeOfDay(const CVector *pos, CZoneInfo *info) info->copPedThreshold = day->copPedThreshold * d + night->copPedThreshold * n; for(i = 0; i < ARRAY_SIZE(info->gangPedThreshold); i++) info->gangPedThreshold[i] = day->gangPedThreshold[i] * d + night->gangPedThreshold[i] * n; +#else + // This is a complete mess. + info->carDensity = day->carDensity * n + night->carDensity * d; + for(i = 0; i < ARRAY_SIZE(info->carThreshold); i++) + info->carThreshold[i] = night->carThreshold[i] * d + night->carThreshold[i] * n; + for(i = 0; i < ARRAY_SIZE(info->boatThreshold); i++) + info->boatThreshold[i] = night->boatThreshold[i] * d + night->boatThreshold[i] * n; + for(i = 0; i < ARRAY_SIZE(info->gangThreshold); i++) + info->gangThreshold[i] = night->gangThreshold[i] * d + night->gangThreshold[i] * n; + + info->copThreshold = night->copThreshold * d + night->copThreshold * n; + info->pedDensity = night->pedDensity * d + night->pedDensity * n; + info->copPedThreshold = night->copPedThreshold * d + night->copPedThreshold * n; + for(i = 0; i < ARRAY_SIZE(info->gangPedThreshold); i++) + info->gangPedThreshold[i] = night->gangPedThreshold[i] * d + night->gangPedThreshold[i] * n; +#endif } if(CClock::GetIsTimeInRange(5, 19)) info->pedGroup = day->pedGroup; @@ -697,11 +715,11 @@ CTheZones::SaveOneZone(CZone *zone, uint8 **buffer, uint32 *length, eZoneType zo WriteSaveBuf(*buffer, *length, zone->zoneinfoNight); int32 zoneId; - zoneId = GetIndexForZonePointer(zone->child); + zoneId = GetIndexForNavigationZonePointer(zone->child); WriteSaveBuf(*buffer, *length, zoneId); - zoneId = GetIndexForZonePointer(zone->parent); + zoneId = GetIndexForNavigationZonePointer(zone->parent); WriteSaveBuf(*buffer, *length, zoneId); - zoneId = GetIndexForZonePointer(zone->next); + zoneId = GetIndexForNavigationZonePointer(zone->next); WriteSaveBuf(*buffer, *length, zoneId); } @@ -714,9 +732,9 @@ CTheZones::LoadAllZones(uint8 *buffer, uint32 size) uint32 length = 0; CheckSaveHeaderWithLength(buffer, length, 'Z', 'N', 'S', '\0', size - SAVE_HEADER_SIZE); - m_CurrLevel = ReadSaveBuf<eLevelName>(buffer, length); - FindIndex = ReadSaveBuf<int16>(buffer, length); - ReadSaveBuf<int16>(buffer, length); + ReadSaveBuf(&m_CurrLevel, buffer); + ReadSaveBuf(&FindIndex, buffer); + SkipSaveBuf(buffer, 2); for(i = 0; i < ARRAY_SIZE(NavigationZoneArray); i++) LoadOneZone(&NavigationZoneArray[i], &buffer, &length, ZONE_NAVIG); @@ -725,21 +743,21 @@ CTheZones::LoadAllZones(uint8 *buffer, uint32 size) LoadOneZone(&InfoZoneArray[i], &buffer, &length, ZONE_INFO); for(i = 0; i < ARRAY_SIZE(ZoneInfoArray); i++) - ZoneInfoArray[i] = ReadSaveBuf<CZoneInfo>(buffer, length); + ReadSaveBuf(&ZoneInfoArray[i], buffer); - TotalNumberOfNavigationZones = ReadSaveBuf<int16>(buffer, length); - TotalNumberOfInfoZones = ReadSaveBuf<int16>(buffer, length); - TotalNumberOfZoneInfos = ReadSaveBuf<int16>(buffer, length); - ReadSaveBuf<int16>(buffer, length); + ReadSaveBuf(&TotalNumberOfNavigationZones, buffer); + ReadSaveBuf(&TotalNumberOfInfoZones, buffer); + ReadSaveBuf(&TotalNumberOfZoneInfos, buffer); + SkipSaveBuf(buffer, 2); for(i = 0; i < ARRAY_SIZE(MapZoneArray); i++) LoadOneZone(&MapZoneArray[i], &buffer, &length, ZONE_MAPZONE); for(i = 0; i < ARRAY_SIZE(AudioZoneArray); i++) - AudioZoneArray[i] = ReadSaveBuf<int16>(buffer, length); + ReadSaveBuf(&AudioZoneArray[i], buffer); - TotalNumberOfMapZones = ReadSaveBuf<uint16>(buffer, length); - NumberOfAudioZones = ReadSaveBuf<uint16>(buffer, length); + ReadSaveBuf(&TotalNumberOfMapZones, buffer); + ReadSaveBuf(&NumberOfAudioZones, buffer); VALIDATESAVEBUF(size) } @@ -747,26 +765,36 @@ CTheZones::LoadAllZones(uint8 *buffer, uint32 size) void CTheZones::LoadOneZone(CZone *zone, uint8 **buffer, uint32 *length, eZoneType zoneType) { - *(uint32*)&zone->name[0] = ReadSaveBuf<uint32>(*buffer, *length); - *(uint32*)&zone->name[4] = ReadSaveBuf<uint32>(*buffer, *length); +#ifdef THIS_IS_STUPID + uint32 part1, part2; + ReadSaveBuf(&part1, *buffer, *length); + ReadSaveBuf(&part2, *buffer, *length); + + *(uint64 *)&zone->name[0] = (uint64)part2; + *(uint64 *)&zone->name[0] <<= 32; + *(uint64 *)&zone->name[0] |= (uint64)part1; +#else + for(int i = 0; i < sizeof(zone->name); i++) + ReadSaveBuf(&zone->name[i], *buffer, *length); +#endif - zone->minx = ReadSaveBuf<float>(*buffer, *length); - zone->miny = ReadSaveBuf<float>(*buffer, *length); - zone->minz = ReadSaveBuf<float>(*buffer, *length); - zone->maxx = ReadSaveBuf<float>(*buffer, *length); - zone->maxy = ReadSaveBuf<float>(*buffer, *length); - zone->maxz = ReadSaveBuf<float>(*buffer, *length); + ReadSaveBuf(&zone->minx, *buffer, *length); + ReadSaveBuf(&zone->miny, *buffer, *length); + ReadSaveBuf(&zone->minz, *buffer, *length); + ReadSaveBuf(&zone->maxx, *buffer, *length); + ReadSaveBuf(&zone->maxy, *buffer, *length); + ReadSaveBuf(&zone->maxz, *buffer, *length); - zone->type = ReadSaveBuf<eZoneType>(*buffer, *length); - zone->level = ReadSaveBuf<eLevelName>(*buffer, *length); - zone->zoneinfoDay = ReadSaveBuf<int16>(*buffer, *length); - zone->zoneinfoNight = ReadSaveBuf<int16>(*buffer, *length); + ReadSaveBuf(&zone->type, *buffer, *length); + ReadSaveBuf(&zone->level, *buffer, *length); + ReadSaveBuf(&zone->zoneinfoDay, *buffer, *length); + ReadSaveBuf(&zone->zoneinfoNight, *buffer, *length); int32 zoneId; - zoneId = ReadSaveBuf<int32>(*buffer, *length); - zone->child = GetPointerForZoneIndex(zoneId); - zoneId = ReadSaveBuf<int32>(*buffer, *length); - zone->parent = GetPointerForZoneIndex(zoneId); - zoneId = ReadSaveBuf<int32>(*buffer, *length); - zone->next = GetPointerForZoneIndex(zoneId); + ReadSaveBuf(&zoneId, *buffer, *length); + zone->child = GetPointerForNavigationZoneIndex(zoneId); + ReadSaveBuf(&zoneId, *buffer, *length); + zone->parent = GetPointerForNavigationZoneIndex(zoneId); + ReadSaveBuf(&zoneId, *buffer, *length); + zone->next = GetPointerForNavigationZoneIndex(zoneId); }
\ No newline at end of file diff --git a/src/core/Zones.h b/src/core/Zones.h index b987f009..2316eeef 100644 --- a/src/core/Zones.h +++ b/src/core/Zones.h @@ -103,8 +103,8 @@ public: static void SetPedDensity(uint16 zoneid, uint8 day, uint16 peddensity); static void SetPedGroup(uint16 zoneid, uint8 day, uint16 pedgroup); static int16 FindAudioZone(CVector *pos); - static CZone *GetPointerForZoneIndex(ssize_t i) { return i == -1 ? nil : &NavigationZoneArray[i]; } - static ssize_t GetIndexForZonePointer(CZone *zone) { return zone == nil ? -1 : zone - NavigationZoneArray; } + static CZone *GetPointerForNavigationZoneIndex(ssize_t i) { return i == -1 ? nil : &NavigationZoneArray[i]; } + static ssize_t GetIndexForNavigationZonePointer(CZone *zone) { return zone == nil ? -1 : zone - NavigationZoneArray; } static void AddZoneToAudioZoneArray(CZone *zone); static void InitialiseAudioZoneArray(void); static void SaveAllZones(uint8 *buffer, uint32 *length); diff --git a/src/core/common.h b/src/core/common.h index d39531cc..6f6acd49 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -214,6 +214,12 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #include "maths.h" #include "Vector.h" +#ifdef GTA_PS2 +#include "VuVector.h" +#define CVUVECTOR CVuVector +#else +#define CVUVECTOR CVector +#endif #include "Vector2D.h" #include "Matrix.h" #include "Rect.h" @@ -283,9 +289,9 @@ extern int strncasecmp(const char *str1, const char *str2, size_t len); extern wchar *AllocUnicode(const char*src); -#define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) +#define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) -#define clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius)) +#define Clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius)) inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) @@ -386,212 +392,3 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function #define CONCAT_(x,y) x##y #define CONCAT(x,y) CONCAT_(x,y) -#ifdef DEBUGMENU -// Tweaking stuff for debugmenu -#define TWEAKPATH ___tw___TWEAKPATH -#define SETTWEAKPATH(path) static const char *___tw___TWEAKPATH = path; -#define TWEAKFUNC(v) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); -#define TWEAKFUNCN(v, name) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); -#define TWEAKBOOL(v) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); -#define TWEAKBOOLN(v, name) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); -#define TWEAKINT32(v, lower, upper, step) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKINT32N(v, lower, upper, step, name) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKUINT32(v, lower, upper, step) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKUINT32N(v, lower, upper, step, name) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKINT16(v, lower, upper, step) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKINT16N(v, lower, upper, step, name) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKUINT16(v, lower, upper, step) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKUINT16N(v, lower, upper, step, name) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKINT8(v, lower, upper, step) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKINT8N(v, lower, upper, step, name) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKUINT8(v, lower, upper, step) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKUINT8N(v, lower, upper, step, name) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKFLOAT(v, lower, upper, step) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKFLOATN(v, lower, upper, step, name) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKSWITCH(v, lower, upper, str, f) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, str, f, TWEAKPATH); -#define TWEAKSWITCHN(v, lower, upper, str, f, name) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, str, f, TWEAKPATH); - -// interface -class CTweakVar -{ -public: - virtual void AddDBG(const char *path) = 0; -}; - -class CTweakVars -{ -public: - static void Add(CTweakVar *var); - static void AddDBG(const char *path); -}; - -class CTweakFunc : public CTweakVar -{ - const char *m_pPath, *m_pVarName; - void (*m_pFunc)(); -public: - CTweakFunc(void (*pFunc)(), const char *strName, const char *strPath) : - m_pPath(strPath), m_pVarName(strName), m_pFunc(pFunc) - { - CTweakVars::Add(this); - } - - void AddDBG(const char *path); -}; - -class CTweakBool : public CTweakVar -{ - const char *m_pPath, *m_pVarName; - bool *m_pBoolVar; -public: - CTweakBool(bool *pBool, const char *strName, const char *strPath) : - m_pPath(strPath), m_pVarName(strName), m_pBoolVar(pBool) - { - CTweakVars::Add(this); - } - - void AddDBG(const char *path); -}; - -class CTweakSwitch : public CTweakVar -{ - const char *m_pPath, *m_pVarName; - void *m_pIntVar; - int32 m_nMin, m_nMax; - const char **m_aStr; - void (*m_pFunc)(); -public: - CTweakSwitch(void *pInt, const char *strName, int32 nMin, int32 nMax, const char **aStr, - void (*pFunc)(), const char *strPath) - : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), m_nMin(nMin), m_nMax(nMax), - m_aStr(aStr) - { - CTweakVars::Add(this); - } - - void AddDBG(const char *path); -}; - -#define _TWEEKCLASS(name, type) \ - class name : public CTweakVar \ - { \ - public: \ - const char *m_pPath, *m_pVarName; \ - type *m_pIntVar, m_nLoawerBound, m_nUpperBound, m_nStep; \ - \ - name(type *pInt, const char *strName, type nLower, type nUpper, type nStep, \ - const char *strPath) \ - : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), \ - m_nLoawerBound(nLower), m_nUpperBound(nUpper), m_nStep(nStep) \ - \ - { \ - CTweakVars::Add(this); \ - } \ - \ - void AddDBG(const char *path); \ - }; - -_TWEEKCLASS(CTweakInt8, int8); -_TWEEKCLASS(CTweakUInt8, uint8); -_TWEEKCLASS(CTweakInt16, int16); -_TWEEKCLASS(CTweakUInt16, uint16); -_TWEEKCLASS(CTweakInt32, int32); -_TWEEKCLASS(CTweakUInt32, uint32); -_TWEEKCLASS(CTweakFloat, float); - -#undef _TWEEKCLASS -#endif - -#ifdef VALIDATE_SAVE_SIZE -extern int32 _saveBufCount; -#define INITSAVEBUF _saveBufCount = 0; -#define VALIDATESAVEBUF(b) assert(_saveBufCount == b); -#else -#define INITSAVEBUF -#define VALIDATESAVEBUF(b) -#endif - -inline void SkipSaveBuf(uint8 *&buf, int32 skip) -{ - buf += skip; -#ifdef VALIDATE_SAVE_SIZE - _saveBufCount += skip; -#endif -} - -inline void SkipSaveBuf(uint8*& buf, uint32 &length, int32 skip) -{ - buf += skip; - length += skip; -#ifdef VALIDATE_SAVE_SIZE - _saveBufCount += skip; -#endif -} - -template<typename T> -inline const T ReadSaveBuf(uint8 *&buf) -{ - T &value = *(T*)buf; - SkipSaveBuf(buf, sizeof(T)); - return value; -} - -template<typename T> -inline const T ReadSaveBuf(uint8 *&buf, uint32 &length) -{ - T &value = *(T*)buf; - SkipSaveBuf(buf, length, sizeof(T)); - return value; -} - -template<typename T> -inline T *WriteSaveBuf(uint8 *&buf, const T &value) -{ - T *p = (T*)buf; - *p = value; - SkipSaveBuf(buf, sizeof(T)); - return p; -} - -template<typename T> -inline T *WriteSaveBuf(uint8 *&buf, uint32 &length, const T &value) -{ - T *p = (T*)buf; - *p = value; - SkipSaveBuf(buf, length, sizeof(T)); - return p; -} - - -#define SAVE_HEADER_SIZE (4*sizeof(char)+sizeof(uint32)) - -#define WriteSaveHeader(buf,a,b,c,d,size) \ - WriteSaveBuf(buf, a);\ - WriteSaveBuf(buf, b);\ - WriteSaveBuf(buf, c);\ - WriteSaveBuf(buf, d);\ - WriteSaveBuf<uint32>(buf, size); - -#define WriteSaveHeaderWithLength(buf,len,a,b,c,d,size) \ - WriteSaveBuf(buf, len, a);\ - WriteSaveBuf(buf, len, b);\ - WriteSaveBuf(buf, len, c);\ - WriteSaveBuf(buf, len, d);\ - WriteSaveBuf<uint32>(buf, len, size); - -#define CheckSaveHeader(buf,a,b,c,d,size)\ - assert(ReadSaveBuf<char>(buf) == a);\ - assert(ReadSaveBuf<char>(buf) == b);\ - assert(ReadSaveBuf<char>(buf) == c);\ - assert(ReadSaveBuf<char>(buf) == d);\ - assert(ReadSaveBuf<uint32>(buf) == size); - -#define CheckSaveHeaderWithLength(buf,len,a,b,c,d,size)\ - assert(ReadSaveBuf<char>(buf,len) == a);\ - assert(ReadSaveBuf<char>(buf,len) == b);\ - assert(ReadSaveBuf<char>(buf,len) == c);\ - assert(ReadSaveBuf<char>(buf,len) == d);\ - assert(ReadSaveBuf<uint32>(buf,len) == size); - - -void cprintf(char*, ...); diff --git a/src/core/config.h b/src/core/config.h index 6d30a65f..2a3b8e6d 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -131,7 +131,6 @@ enum Config { NUM_PED_COMMENTS_SLOTS = 20, NUM_SOUNDS_SAMPLES_BANKS = 2, - NUM_SOUNDS_SAMPLES_SLOTS = 27, NUM_AUDIOENTITIES = 250, NUM_AUDIO_REFLECTIONS = 8, @@ -196,7 +195,8 @@ enum Config { #define DRAW_GAME_VERSION_TEXT #ifdef DRAW_GAME_VERSION_TEXT // unlike R* development builds, ours has runtime switch on debug menu & .ini, and disabled as default. - #define USE_OUR_VERSIONING // If you disable this then game will fetch version from peds.col, as R* did while in development + // If you disable this then game will fetch version from peds.col, as R* did while in development. + //#define USE_OUR_VERSIONING // enabled from buildfiles by default #endif // Memory allocation and compression @@ -248,7 +248,6 @@ enum Config { #define MORE_LANGUAGES // Add more translations to the game #define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible #define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS -#define FIX_HIGH_FPS_BUGS_ON_FRONTEND #define NO_MOVIES // add option to disable intro videos @@ -396,9 +395,12 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually // Audio #define RADIO_SCROLL_TO_PREV_STATION // Won't work without FIX_BUGS #define AUDIO_CACHE // cache sound lengths to speed up the cold boot +#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 43 (PC has 28 originally) //#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds) //#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder #define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files +#define MULTITHREADED_AUDIO // for streams. requires C++11 or later +#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused #ifdef AUDIO_OPUS #define AUDIO_OAL_USE_OPUS // enable support of opus files @@ -423,6 +425,7 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually #ifdef SQUEEZE_PERFORMANCE #undef PS2_ALPHA_TEST #undef NO_ISLAND_LOADING + #undef PS2_AUDIO_CHANNELS #endif // ------- @@ -452,7 +455,6 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually #undef MORE_LANGUAGES #undef COMPATIBLE_SAVES #undef LOAD_INI_SETTINGS -#undef FIX_HIGH_FPS_BUGS_ON_FRONTEND #undef ASPECT_RATIO_SCALE #undef PROPER_SCALING @@ -462,6 +464,11 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually #undef DISABLE_LOADING_SCREEN #undef DISABLE_VSYNC_ON_TEXTURE_CONVERSION +#undef EXTENDED_COLOURFILTER +#undef EXTENDED_PIPELINES +#undef SCREEN_DROPLETS +#undef NEW_RENDERER + #undef FIX_SPRITES #define PC_WATER @@ -511,6 +518,7 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually #undef IMPROVED_CAMERA #undef FREE_CAM #undef BIG_IMG - +#undef PS2_AUDIO_CHANNELS +#undef MULTITHREADED_AUDIO #undef RADIO_SCROLL_TO_PREV_STATION #endif diff --git a/src/core/main.cpp b/src/core/main.cpp index a38fe72a..e84c6eeb 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -379,7 +379,7 @@ DoRWStuffEndOfFrame(void) } #else if (CPad::GetPad(1)->GetLeftShockJustDown() || CPad::GetPad(0)->GetFJustDown(11)) { - sprintf(s, "screen_%11lld.png", time(nil)); + sprintf(s, "screen_%011lld.png", time(nil)); RwGrabScreen(Scene.camera, s); } #endif @@ -1131,11 +1131,14 @@ DisplayGameDebugText() #endif // #ifdef DRAW_GAME_VERSION_TEXT FrameSamples++; -#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND - FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds +#ifdef FIX_BUGS + // this is inaccurate with over 1000 fps + static uint32 PreviousTimeInMillisecondsPauseMode = 0; + FramesPerSecondCounter += (CTimer::GetTimeInMillisecondsPauseMode() - PreviousTimeInMillisecondsPauseMode) / 1000.0f; // convert to seconds + PreviousTimeInMillisecondsPauseMode = CTimer::GetTimeInMillisecondsPauseMode(); FramesPerSecond = FrameSamples / FramesPerSecondCounter; #else - FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f); + FramesPerSecondCounter += 1000.0f / CTimer::GetTimeStepNonClippedInMilliseconds(); FramesPerSecond = FramesPerSecondCounter / FrameSamples; #endif @@ -1281,11 +1284,13 @@ void RenderEffects_new(void) { PUSH_RENDERGROUP("RenderEffects_new"); +/* // stupid to do this before the whole world is drawn! CShadows::RenderStaticShadows(); // CRenderer::GenerateEnvironmentMap CShadows::RenderStoredShadows(); CSkidmarks::Render(); CRubbish::Render(); +*/ // these aren't really effects DefinedState(); @@ -1308,6 +1313,13 @@ if(gbRenderFadingInEntities) CRenderer::RenderFadingInEntities(); // actual effects here + + // from above + CShadows::RenderStaticShadows(); + CShadows::RenderStoredShadows(); + CSkidmarks::Render(); + CRubbish::Render(); + CGlass::Render(); // CMattRenderer::ResetRenderStates DefinedState(); diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 3f99b793..e2220467 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -1037,6 +1037,11 @@ extern bool gbRenderWorld2; #ifndef MASTER DebugMenuAddVarBool8("Render", "Occlusion debug", &bDispayOccDebugStuff, nil); #endif +#ifdef LIBRW + DebugMenuAddVarBool32("Render", "MatFX env map apply light", &rw::MatFX::envMapApplyLight, nil); + DebugMenuAddVarBool32("Render", "MatFX env map flip U", &rw::MatFX::envMapFlipU, nil); + DebugMenuAddVarBool32("Render", "MatFX env map use matcolor", &rw::MatFX::envMapUseMatColor, nil); +#endif #ifdef EXTENDED_PIPELINES static const char *vehpipenames[] = { "MatFX", "Neo" }; e = DebugMenuAddVar("Render", "Vehicle Pipeline", &CustomPipes::VehiclePipeSwitch, nil, @@ -1072,6 +1077,7 @@ extern bool gbRenderWorld2; DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil); #endif #ifndef FINAL + DebugMenuAddVarBool8("Debug", "Use debug render groups", &bDebugRenderGroups, nil); DebugMenuAddVarBool8("Debug", "Print Memory Usage", &gbPrintMemoryUsage, nil); #ifdef USE_CUSTOM_ALLOCATOR DebugMenuAddCmd("Debug", "Parse Heap", ParseHeap); diff --git a/src/entities/Dummy.cpp b/src/entities/Dummy.cpp index 9878b595..d62d2434 100644 --- a/src/entities/Dummy.cpp +++ b/src/entities/Dummy.cpp @@ -4,8 +4,8 @@ #include "World.h" #include "Dummy.h" -void *CDummy::operator new(size_t sz) { return CPools::GetDummyPool()->New(); } -void CDummy::operator delete(void *p, size_t sz) { CPools::GetDummyPool()->Delete((CDummy*)p); } +void *CDummy::operator new(size_t sz) throw() { return CPools::GetDummyPool()->New(); } +void CDummy::operator delete(void *p, size_t sz) throw() { CPools::GetDummyPool()->Delete((CDummy*)p); } void CDummy::Add(void) diff --git a/src/entities/Dummy.h b/src/entities/Dummy.h index 84b1ce1a..9b73eefc 100644 --- a/src/entities/Dummy.h +++ b/src/entities/Dummy.h @@ -12,8 +12,8 @@ public: void Add(void); void Remove(void); - static void *operator new(size_t); - static void operator delete(void*, size_t); + static void *operator new(size_t) throw(); + static void operator delete(void*, size_t) throw(); }; bool IsDummyPointerValid(CDummy* pDummy); diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 6204b748..8d51cae7 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "VuVector.h" #include "General.h" #include "RwHelper.h" #include "ModelIndices.h" @@ -25,6 +26,7 @@ #include "Ped.h" #include "Dummy.h" #include "WindModifiers.h" +#include "SaveBuf.h" int gBuildings; @@ -70,7 +72,7 @@ CEntity::CEntity(void) bDistanceFade = false; m_flagE1 = false; - m_flagE2 = false; + bDontCastShadowsOn = false; bOffscreen = false; bIsStaticWaitingForCollision = false; bDontStream = false; @@ -121,9 +123,9 @@ CEntity::CreateRwObject(void) if(IsBuilding()) gBuildings++; if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); + GetMatrix().AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic *)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); + GetMatrix().AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump *)m_rwObject)), false); mi->AddRef(); } @@ -135,9 +137,9 @@ CEntity::AttachToRwObject(RwObject *obj) m_rwObject = obj; if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); + GetMatrix().Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic *)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); + GetMatrix().Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump *)m_rwObject)), false); CModelInfo::GetModelInfo(m_modelIndex)->AddRef(); } @@ -149,7 +151,7 @@ CEntity::DetachFromRwObject(void) if(m_rwObject) CModelInfo::GetModelInfo(m_modelIndex)->RemoveRef(); m_rwObject = nil; - m_matrix.Detach(); + GetMatrix().Detach(); } RpAtomic* @@ -177,7 +179,7 @@ CEntity::DeleteRwObject(void) { RwFrame *f; - m_matrix.Detach(); + GetMatrix().Detach(); if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC){ f = RpAtomicGetFrame((RpAtomic*)m_rwObject); @@ -200,18 +202,18 @@ CEntity::GetBoundRect(void) { CRect rect; CVector v; - CColModel *col = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(); + CColModel *col = CModelInfo::GetColModel(m_modelIndex); - rect.ContainPoint(m_matrix * col->boundingBox.min); - rect.ContainPoint(m_matrix * col->boundingBox.max); + rect.ContainPoint(GetMatrix() * col->boundingBox.min); + rect.ContainPoint(GetMatrix() * col->boundingBox.max); v = col->boundingBox.min; v.x = col->boundingBox.max.x; - rect.ContainPoint(m_matrix * v); + rect.ContainPoint(GetMatrix() * v); v = col->boundingBox.max; v.x = col->boundingBox.min.x; - rect.ContainPoint(m_matrix * v); + rect.ContainPoint(GetMatrix() * v); return rect; } @@ -219,21 +221,27 @@ CEntity::GetBoundRect(void) CVector CEntity::GetBoundCentre(void) { - CVector v; - GetBoundCentre(v); - return v; + return GetMatrix() * CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center; } +#ifdef GTA_PS2 +void +CEntity::GetBoundCentre(CVuVector &out) +{ + TransformPoint(out, GetMatrix(), CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center); +} +#else void CEntity::GetBoundCentre(CVector &out) { - out = m_matrix * CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingSphere.center; + out = GetMatrix() * CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center; } +#endif float CEntity::GetBoundRadius(void) { - return CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingSphere.radius; + return CModelInfo::GetColModel(m_modelIndex)->boundingSphere.radius; } void @@ -372,7 +380,7 @@ CEntity::PreRender(void) CVector pos = GetPosition(); CShadows::StoreShadowToBeRendered(SHADOWTYPE_DARK, gpShadowPedTex, &pos, - 0.4f, 0.0f, 0.0f, -0.4f, + 0.4f, 0.0f, 0.0f, 0.4f, CTimeCycle::GetShadowStrength(), CTimeCycle::GetShadowStrength(), CTimeCycle::GetShadowStrength(), @@ -418,9 +426,11 @@ CEntity::Render(void) } bool -CEntity::GetIsTouching(CVector const ¢er, float radius) +CEntity::GetIsTouching(CVUVECTOR const ¢er, float radius) { - return sq(GetBoundRadius()+radius) > (GetBoundCentre()-center).MagnitudeSqr(); + CVUVECTOR boundCenter; + GetBoundCentre(boundCenter); + return sq(GetBoundRadius()+radius) > (boundCenter-center).MagnitudeSqr(); } bool @@ -438,8 +448,7 @@ CEntity::IsVisibleComplex(void) bool CEntity::GetIsOnScreen(void) { - return TheCamera.IsSphereVisible(GetBoundCentre(), GetBoundRadius(), - &TheCamera.GetCameraMatrix()); + return TheCamera.IsSphereVisible(GetBoundCentre(), GetBoundRadius()); } bool @@ -455,7 +464,7 @@ CEntity::GetIsOnScreenComplex(void) return true; CRect rect = GetBoundRect(); - CColModel *colmodel = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(); + CColModel *colmodel = CModelInfo::GetColModel(m_modelIndex); float z = GetPosition().z; float minz = z + colmodel->boundingBox.min.z; float maxz = z + colmodel->boundingBox.max.z; @@ -610,7 +619,7 @@ CEntity::Remove(void) float CEntity::GetDistanceFromCentreOfMassToBaseOfModel(void) { - return -CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingBox.min.z; + return -CModelInfo::GetColModel(m_modelIndex)->boundingBox.min.z; } void @@ -731,11 +740,6 @@ CEntity::PreRenderForGlassWindow(void) bIsVisible = false; } -/* -0x487A10 - SetAtomicAlphaCB -0x4879E0 - SetClumpAlphaCB -*/ - RpMaterial* SetAtomicAlphaCB(RpMaterial *material, void *data) { @@ -834,7 +838,7 @@ CEntity::SaveEntityFlags(uint8*& buf) if (bDistanceFade) tmp |= BIT(7); if (m_flagE1) tmp |= BIT(8); - if (m_flagE2) tmp |= BIT(9); + if (bDontCastShadowsOn) tmp |= BIT(9); if (bOffscreen) tmp |= BIT(10); if (bIsStaticWaitingForCollision) tmp |= BIT(11); if (bDontStream) tmp |= BIT(12); @@ -847,7 +851,8 @@ CEntity::SaveEntityFlags(uint8*& buf) void CEntity::LoadEntityFlags(uint8*& buf) { - uint32 tmp = ReadSaveBuf<uint32>(buf); + uint32 tmp; + ReadSaveBuf(&tmp, buf); m_type = (tmp & ((BIT(3) - 1))); m_status = ((tmp >> 3) & (BIT(5) - 1)); @@ -878,7 +883,7 @@ CEntity::LoadEntityFlags(uint8*& buf) bStreamingDontDelete = !!(tmp & BIT(30)); bRemoveFromWorld = !!(tmp & BIT(31)); - tmp = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&tmp, buf); bHasHitWall = !!(tmp & BIT(0)); bImBeingRendered = !!(tmp & BIT(1)); @@ -890,7 +895,7 @@ CEntity::LoadEntityFlags(uint8*& buf) bDistanceFade = !!(tmp & BIT(7)); m_flagE1 = !!(tmp & BIT(8)); - m_flagE2 = !!(tmp & BIT(9)); + bDontCastShadowsOn = !!(tmp & BIT(9)); bOffscreen = !!(tmp & BIT(10)); bIsStaticWaitingForCollision = !!(tmp & BIT(11)); bDontStream = !!(tmp & BIT(12)); diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 2749e3f7..957ee3bf 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -84,7 +84,7 @@ public: // flagsE uint32 m_flagE1 : 1; - uint32 m_flagE2 : 1; + uint32 bDontCastShadowsOn : 1; // Dont cast shadows on this object uint32 bOffscreen : 1; // offscreen flag. This can only be trusted when it is set to true uint32 bIsStaticWaitingForCollision : 1; // this is used by script created entities - they are static until the collision is loaded below them uint32 bDontStream : 1; // tell the streaming not to stream me @@ -148,11 +148,11 @@ public: return (RpClump*)m_rwObject; } - void GetBoundCentre(CVector &out); + void GetBoundCentre(CVUVECTOR &out); CVector GetBoundCentre(void); float GetBoundRadius(void); float GetDistanceFromCentreOfMassToBaseOfModel(void); - bool GetIsTouching(CVector const ¢er, float r); + bool GetIsTouching(CVUVECTOR const ¢er, float r); bool GetIsOnScreen(void); bool GetIsOnScreenComplex(void); bool IsVisible(void); diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index b897a6e2..890e7876 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -226,7 +226,7 @@ CPhysical::RemoveAndAdd(void) CRect CPhysical::GetBoundRect(void) { - CVector center; + CVUVECTOR center; float radius; GetBoundCentre(center); radius = GetBoundRadius(); @@ -462,7 +462,7 @@ CPhysical::ApplyMoveForce(float jx, float jy, float jz) void CPhysical::ApplyTurnForce(float jx, float jy, float jz, float px, float py, float pz) { - CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass); + CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass); CVector turnimpulse = CrossProduct(CVector(px, py, pz)-com, CVector(jx, jy, jz)); m_vecTurnSpeed += turnimpulse*(1.0f/m_fTurnMass); } @@ -477,7 +477,7 @@ CPhysical::ApplyFrictionMoveForce(float jx, float jy, float jz) void CPhysical::ApplyFrictionTurnForce(float jx, float jy, float jz, float px, float py, float pz) { - CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass); + CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass); CVector turnimpulse = CrossProduct(CVector(px, py, pz)-com, CVector(jx, jy, jz)); m_vecTurnFriction += turnimpulse*(1.0f/m_fTurnMass); } @@ -553,7 +553,7 @@ CPhysical::ApplyGravity(void) surfaceUp = point.normal; else surfaceUp = CVector(0.0f, 0.0f, 1.0f); - float t = clamp(CTimer::GetTimeStep() * 0.5f, 0.05f, 0.8f); + float t = Clamp(CTimer::GetTimeStep() * 0.5f, 0.05f, 0.8f); gravityUp = gravityUp * (1.0f - t) + surfaceUp * t; if (gravityUp.MagnitudeSqr() < 0.1f) gravityUp = CVector(0.0f, 0.0f, 1.0f); @@ -1023,7 +1023,7 @@ CPhysical::ApplyCollisionAlt(CEntity *B, CColPoint &colpoint, float &impulse, CV moveSpeed += vImpulse * (1.0f/m_fMass); // ApplyTurnForce - CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass); + CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass); CVector turnimpulse = CrossProduct(pointpos-com, vImpulse); turnSpeed += turnimpulse*(1.0f/m_fTurnMass); @@ -1259,7 +1259,7 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists) CPhysical *A, *B; CObject *Bobj; bool canshift; - CVector center; + CVUVECTOR center; float radius; int numCollisions; @@ -1418,7 +1418,7 @@ CPhysical::ProcessCollisionSectorList_SimpleCar(CPtrList *lists) { static CColPoint aColPoints[MAX_COLLISION_POINTS]; float radius; - CVector center; + CVUVECTOR center; int listtype; CPhysical *A, *B; int numCollisions; @@ -1585,7 +1585,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists) { static CColPoint aColPoints[MAX_COLLISION_POINTS]; float radius; - CVector center; + CVUVECTOR center; CPtrList *list; CPhysical *A, *B; CObject *Aobj, *Bobj; diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index fd68c743..d74e40db 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -155,7 +155,7 @@ CreateVehiclePipe(void) { #include "shaders/obj/neoVehicle_frag.inc" #include "shaders/obj/neoVehicle_vert.inc" - const char *vs[] = { shaderDecl, header_vert_src, neoVehicle_vert_src, nil }; + const char *vs[] = { shaderDecl, "#define DIRECTIONALS\n", header_vert_src, neoVehicle_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, neoVehicle_frag_src, nil }; neoVehicleShader = Shader::create(vs, fs); assert(neoVehicleShader); @@ -516,7 +516,7 @@ CreateRimLightPipes(void) { #include "shaders/obj/simple_frag.inc" #include "shaders/obj/neoRimSkin_vert.inc" - const char *vs[] = { shaderDecl, header_vert_src, neoRimSkin_vert_src, nil }; + const char *vs[] = { shaderDecl, "#define DIRECTIONALS\n", header_vert_src, neoRimSkin_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, simple_frag_src, nil }; neoRimSkinShader = Shader::create(vs, fs); assert(neoRimSkinShader); @@ -525,7 +525,7 @@ CreateRimLightPipes(void) { #include "shaders/obj/simple_frag.inc" #include "shaders/obj/neoRim_vert.inc" - const char *vs[] = { shaderDecl, header_vert_src, neoRim_vert_src, nil }; + const char *vs[] = { shaderDecl, "#define DIRECTIONALS\n", header_vert_src, neoRim_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, simple_frag_src, nil }; neoRimShader = Shader::create(vs, fs); assert(neoRimShader); diff --git a/src/extras/debugmenu.h b/src/extras/debugmenu.h index c2198aca..f1357c0a 100644 --- a/src/extras/debugmenu.h +++ b/src/extras/debugmenu.h @@ -2,6 +2,120 @@ #ifdef DEBUGMENU +// Tweaking stuff for debugmenu +#define TWEAKPATH ___tw___TWEAKPATH +#define SETTWEAKPATH(path) static const char *___tw___TWEAKPATH = path; +#define TWEAKFUNC(v) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); +#define TWEAKFUNCN(v, name) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); +#define TWEAKBOOL(v) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); +#define TWEAKBOOLN(v, name) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); +#define TWEAKINT32(v, lower, upper, step) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKINT32N(v, lower, upper, step, name) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKUINT32(v, lower, upper, step) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKUINT32N(v, lower, upper, step, name) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKINT16(v, lower, upper, step) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKINT16N(v, lower, upper, step, name) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKUINT16(v, lower, upper, step) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKUINT16N(v, lower, upper, step, name) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKINT8(v, lower, upper, step) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKINT8N(v, lower, upper, step, name) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKUINT8(v, lower, upper, step) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKUINT8N(v, lower, upper, step, name) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKFLOAT(v, lower, upper, step) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKFLOATN(v, lower, upper, step, name) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKSWITCH(v, lower, upper, str, f) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, str, f, TWEAKPATH); +#define TWEAKSWITCHN(v, lower, upper, str, f, name) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, str, f, TWEAKPATH); + +// interface +class CTweakVar +{ +public: + virtual void AddDBG(const char *path) = 0; +}; + +class CTweakVars +{ +public: + static void Add(CTweakVar *var); + static void AddDBG(const char *path); +}; + +class CTweakFunc : public CTweakVar +{ + const char *m_pPath, *m_pVarName; + void (*m_pFunc)(); +public: + CTweakFunc(void (*pFunc)(), const char *strName, const char *strPath) : + m_pPath(strPath), m_pVarName(strName), m_pFunc(pFunc) + { + CTweakVars::Add(this); + } + + void AddDBG(const char *path); +}; + +class CTweakBool : public CTweakVar +{ + const char *m_pPath, *m_pVarName; + bool *m_pBoolVar; +public: + CTweakBool(bool *pBool, const char *strName, const char *strPath) : + m_pPath(strPath), m_pVarName(strName), m_pBoolVar(pBool) + { + CTweakVars::Add(this); + } + + void AddDBG(const char *path); +}; + +class CTweakSwitch : public CTweakVar +{ + const char *m_pPath, *m_pVarName; + void *m_pIntVar; + int32 m_nMin, m_nMax; + const char **m_aStr; + void (*m_pFunc)(); +public: + CTweakSwitch(void *pInt, const char *strName, int32 nMin, int32 nMax, const char **aStr, + void (*pFunc)(), const char *strPath) + : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), m_nMin(nMin), m_nMax(nMax), + m_aStr(aStr) + { + CTweakVars::Add(this); + } + + void AddDBG(const char *path); +}; + +#define _TWEEKCLASS(name, type) \ + class name : public CTweakVar \ + { \ + public: \ + const char *m_pPath, *m_pVarName; \ + type *m_pIntVar, m_nLoawerBound, m_nUpperBound, m_nStep; \ + \ + name(type *pInt, const char *strName, type nLower, type nUpper, type nStep, \ + const char *strPath) \ + : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), \ + m_nLoawerBound(nLower), m_nUpperBound(nUpper), m_nStep(nStep) \ + \ + { \ + CTweakVars::Add(this); \ + } \ + \ + void AddDBG(const char *path); \ + }; + +_TWEEKCLASS(CTweakInt8, int8); +_TWEEKCLASS(CTweakUInt8, uint8); +_TWEEKCLASS(CTweakInt16, int16); +_TWEEKCLASS(CTweakUInt16, uint16); +_TWEEKCLASS(CTweakInt32, int32); +_TWEEKCLASS(CTweakUInt32, uint32); +_TWEEKCLASS(CTweakFloat, float); + +#undef _TWEEKCLASS + typedef void (*TriggerFunc)(void); struct Menu; diff --git a/src/extras/postfx.cpp b/src/extras/postfx.cpp index f698bd52..ee6c3964 100644 --- a/src/extras/postfx.cpp +++ b/src/extras/postfx.cpp @@ -49,6 +49,9 @@ CPostFX::InitOnce(void) void CPostFX::Open(RwCamera *cam) { + if(pFrontBuffer) + Close(); + uint32 width = Pow(2.0f, int32(log2(RwRasterGetWidth (RwCameraGetRaster(cam))))+1); uint32 height = Pow(2.0f, int32(log2(RwRasterGetHeight(RwCameraGetRaster(cam))))+1); uint32 depth = RwRasterGetDepth(RwCameraGetRaster(cam)); diff --git a/src/extras/screendroplets.cpp b/src/extras/screendroplets.cpp index 1412141e..2485386b 100644 --- a/src/extras/screendroplets.cpp +++ b/src/extras/screendroplets.cpp @@ -423,7 +423,7 @@ ScreenDroplets::ProcessCameraMovement(void) ms_movingEnabled = !isTopDown && !isLookingInDirection; // 0 when looking stright up, 180 when looking up or down - ms_camUpAngle = RADTODEG(Acos(clamp(camUp.z, -1.0f, 1.0f))); + ms_camUpAngle = RADTODEG(Acos(Clamp(camUp.z, -1.0f, 1.0f))); } void diff --git a/src/math/Matrix.h b/src/math/Matrix.h index 6da4c767..0adcf32c 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -92,22 +92,6 @@ public: void SetRotateXOnly(float angle); void SetRotateYOnly(float angle); void SetRotateZOnly(float angle); - void SetRotateZOnlyScaled(float angle, float scale) { - float c = Cos(angle); - float s = Sin(angle); - - rx = c * scale; - ry = s * scale; - rz = 0.0f; - - fx = -s * scale; - fy = c * scale; - fz = 0.0f; - - ux = 0.0f; - uy = 0.0f; - uz = scale; - } void SetRotateX(float angle); void SetRotateY(float angle); void SetRotateZ(float angle); diff --git a/src/math/VuVector.h b/src/math/VuVector.h index 30d62cfc..41584095 100644 --- a/src/math/VuVector.h +++ b/src/math/VuVector.h @@ -22,6 +22,8 @@ public: x = 1.0f; } */ + + // TODO: operator- }; void TransformPoint(CVuVector &out, const CMatrix &mat, const CVuVector &in); diff --git a/src/math/maths.h b/src/math/maths.h index 8d68bf64..6a228036 100644 --- a/src/math/maths.h +++ b/src/math/maths.h @@ -10,7 +10,7 @@ inline float Acos(float x) { return acosf(x); } inline float Tan(float x) { return tanf(x); } inline float Atan(float x) { return atanf(x); } inline float Atan2(float y, float x) { return atan2f(y, x); } -inline float Abs(float x) { return fabs(x); } +inline float Abs(float x) { return fabsf(x); } inline float Sqrt(float x) { return sqrtf(x); } inline float RecipSqrt(float x, float y) { return x/Sqrt(y); } inline float RecipSqrt(float x) { return RecipSqrt(1.0f, x); } diff --git a/src/modelinfo/BaseModelInfo.cpp b/src/modelinfo/BaseModelInfo.cpp index 765469b4..709420fd 100644 --- a/src/modelinfo/BaseModelInfo.cpp +++ b/src/modelinfo/BaseModelInfo.cpp @@ -27,6 +27,7 @@ CBaseModelInfo::Shutdown(void) m_2dEffectsID = -1; m_num2dEffects = 0; m_txdSlot = -1; + m_objectId = -1; } void diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h index 30f4c015..f92a73ad 100644 --- a/src/modelinfo/ModelInfo.h +++ b/src/modelinfo/ModelInfo.h @@ -38,6 +38,9 @@ public: return ms_modelInfoPtrs[id]; } static CBaseModelInfo *GetModelInfo(const char *name, int minIndex, int maxIndex); + static CColModel *GetColModel(int id){ + return ms_modelInfoPtrs[id]->GetColModel(); + } static bool IsBoatModel(int32 id); static bool IsBikeModel(int32 id); diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp index 28de2507..25b260d3 100644 --- a/src/modelinfo/PedModelInfo.cpp +++ b/src/modelinfo/PedModelInfo.cpp @@ -86,6 +86,11 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump) for(int i = 0; i < NUMPEDINFONODES; i++){ *mat = *invmat; + + // From LCS. Otherwise gives FPE +#ifdef FIX_BUGS + spheres[i].center = CVector(0.0f, 0.0f, 0.0f); +#else int id = ConvertPedNode2BoneTag(m_pColNodeInfos[i].pedNode); // this is wrong, wtf R* ??? int idx = RpHAnimIDGetIndex(hier, id); @@ -95,6 +100,7 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump) RwV3dTransformPoints(&pos, &pos, 1, mat); spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z); +#endif spheres[i].radius = m_pColNodeInfos[i].radius; spheres[i].surface = SURFACE_PED; spheres[i].piece = m_pColNodeInfos[i].pieceType; diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index 0605f54f..64c9e256 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -25,10 +25,32 @@ int16 CObject::nNoTempObjects; //int16 CObject::nBodyCastHealth = 1000; float CObject::fDistToNearestTree; -void *CObject::operator new(size_t sz) { return CPools::GetObjectPool()->New(); } -void *CObject::operator new(size_t sz, int handle) { return CPools::GetObjectPool()->New(handle);}; -void CObject::operator delete(void *p, size_t sz) { CPools::GetObjectPool()->Delete((CObject*)p); } -void CObject::operator delete(void *p, int handle) { CPools::GetObjectPool()->Delete((CObject*)p); } +// Object pools tends to be full sometimes, let's free a temp. object in this case. +#ifdef FIX_BUGS +void *CObject::operator new(size_t sz) throw() { + CObject *obj = CPools::GetObjectPool()->New(); + if (!obj) { + CObjectPool *objectPool = CPools::GetObjectPool(); + for (int32 i = 0; i < objectPool->GetSize(); i++) { + CObject *existing = objectPool->GetSlot(i); + if (existing && existing->ObjectCreatedBy == TEMP_OBJECT) { + int32 handle = objectPool->GetIndex(existing); + CWorld::Remove(existing); + delete existing; + obj = objectPool->New(handle); + break; + } + } + } + return obj; +} +#else +void *CObject::operator new(size_t sz) throw() { return CPools::GetObjectPool()->New(); } +#endif +void *CObject::operator new(size_t sz, int handle) throw() { return CPools::GetObjectPool()->New(handle); }; + +void CObject::operator delete(void *p, size_t sz) throw() { CPools::GetObjectPool()->Delete((CObject*)p); } +void CObject::operator delete(void *p, int handle) throw() { CPools::GetObjectPool()->Delete((CObject*)p); } CObject::CObject(void) { @@ -77,7 +99,7 @@ CObject::CObject(CDummyObject *dummy) if (dummy->m_rwObject) AttachToRwObject(dummy->m_rwObject); else - GetMatrix() = dummy->GetMatrix(); + SetMatrix(dummy->GetMatrix()); m_objectMatrix = dummy->GetMatrix(); dummy->DetachFromRwObject(); @@ -190,8 +212,8 @@ void CObject::Teleport(CVector vecPos) { CWorld::Remove(this); - m_matrix.GetPosition() = vecPos; - m_matrix.UpdateRW(); + GetMatrix().GetPosition() = vecPos; + GetMatrix().UpdateRW(); UpdateRwFrame(); CWorld::Add(this); } @@ -212,9 +234,9 @@ CObject::Render(void) float green = (0.8f * CTimeCycle::GetDirectionalGreen() + CTimeCycle::GetAmbientGreen_Obj()) * 165.75f; float blue = (0.8f * CTimeCycle::GetDirectionalBlue() + CTimeCycle::GetAmbientBlue_Obj()) * 165.75f; - red = clamp(red, 0.0f, 255.0f); - green = clamp(green, 0.0f, 255.0f); - blue = clamp(blue, 0.0f, 255.0f); + red = Clamp(red, 0.0f, 255.0f); + green = Clamp(green, 0.0f, 255.0f); + blue = Clamp(blue, 0.0f, 255.0f); int alpha = CGeneral::GetRandomNumberInRange(196, 225); @@ -356,7 +378,7 @@ CObject::ObjectDamage(float amount) } #endif if ((amount * m_fCollisionDamageMultiplier > 150.0f || bBodyCastDamageEffect) && m_nCollisionDamageEffect) { - const CVector &vecPos = m_matrix.GetPosition(); + const CVector& vecPos = GetMatrix().GetPosition(); const float fDirectionZ = 0.0002f * amount; switch (m_nCollisionDamageEffect) { case DAMAGE_EFFECT_CHANGE_MODEL: @@ -653,7 +675,7 @@ CObject::ObjectDamage(float amount) CParticle::AddParticle(PARTICLE_CAR_DEBRIS, particlePos, particleDir, nil, fSize, particleColor, nRotationSpeed, 0, nCurFrame, 0); if ((i % 7) == 0) { static RwRGBA secondaryColor = { 0x9A, 0x99, 0x99, 0x3E }; - CParticle::AddParticle(PARTICLE_DEBRIS, particlePos, particleDir, nil, 0.3, secondaryColor, nRotationSpeed, 0, 0, 0); + CParticle::AddParticle(PARTICLE_DEBRIS, particlePos, particleDir, nil, 0.3f, secondaryColor, nRotationSpeed); } } PlayOneShotScriptObject(SCRIPT_SOUND_BOX_DESTROYED_2, vecPos); @@ -746,7 +768,7 @@ CObject::Init(void) m_pCollidingEntity = nil; CColPoint point; CEntity *outEntity = nil; - const CVector &vecPos = m_matrix.GetPosition(); + const CVector& vecPos = GetMatrix().GetPosition(); if (CWorld::ProcessVerticalLine(vecPos, vecPos.z - 10.0f, point, outEntity, true, false, false, false, false, false, nil)) m_pCurSurface = outEntity; else diff --git a/src/objects/Object.h b/src/objects/Object.h index e34043a8..f59379bf 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -87,10 +87,10 @@ public: static int16 nNoTempObjects; static float fDistToNearestTree; - static void *operator new(size_t); - static void *operator new(size_t, int); - static void operator delete(void*, size_t); - static void operator delete(void*, int); + static void *operator new(size_t) throw(); + static void *operator new(size_t, int) throw(); + static void operator delete(void*, size_t) throw(); + static void operator delete(void*, int) throw(); CObject(void); CObject(int32, bool); diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp index 4d080d1f..d8aa3f60 100644 --- a/src/objects/ParticleObject.cpp +++ b/src/objects/ParticleObject.cpp @@ -33,7 +33,7 @@ CAudioHydrant::Add(CParticleObject *particleobject) if ( AEHANDLE_IS_FAILED(List[i].AudioEntity) ) return false; - DMAudio.SetEntityStatus(List[i].AudioEntity, true); + DMAudio.SetEntityStatus(List[i].AudioEntity, TRUE); List[i].pParticleObject = particleobject; diff --git a/src/objects/Stinger.cpp b/src/objects/Stinger.cpp index 79730c89..d3eee416 100644 --- a/src/objects/Stinger.cpp +++ b/src/objects/Stinger.cpp @@ -46,7 +46,14 @@ CStinger::Init(CPed *pPed) pOwner = pPed; for (i = 0; i < NUM_STINGER_SEGMENTS; i++) { - pSpikes[i] = new CStingerSegment; + pSpikes[i] = new CStingerSegment(); +#ifdef FIX_BUGS + if (!pSpikes[i]) { + // Abort!! Pool is full + Remove(); + return; + } +#endif pSpikes[i]->bUsesCollision = false; } bIsDeployed = true; @@ -75,10 +82,19 @@ CStinger::Remove() for (int32 i = 0; i < NUM_STINGER_SEGMENTS; i++) { CStingerSegment *spikeSegment = pSpikes[i]; + +#ifdef FIX_BUGS + if (spikeSegment) { + CWorld::Remove(spikeSegment); + delete spikeSegment; + pSpikes[i] = nil; + } +#else if (spikeSegment->m_entryInfoList.first != nil) spikeSegment->bRemoveFromWorld = true; else delete spikeSegment; +#endif } bIsDeployed = false; } @@ -86,9 +102,15 @@ CStinger::Remove() void CStinger::Deploy(CPed *pPed) { + // So total number of stingers allowed at the same time is 2, each by different CCopPed. if (NumOfStingerSegments < NUM_STINGER_SEGMENTS*2 && !pPed->bInVehicle && pPed->IsPedInControl()) { if (!bIsDeployed && RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_THROW_UNDER) == nil) { Init(pPed); +#ifdef FIX_BUGS + // Above call won't set it to true no more when object pool is full + if (!bIsDeployed) + return; +#endif pPed->SetPedState(PED_DEPLOY_STINGER); CAnimManager::AddAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_THROW_UNDER); } @@ -161,6 +183,7 @@ CStinger::CheckForBurstTyres() } } +// Only called when bIsDeployed void CStinger::Process() { @@ -197,7 +220,7 @@ CStinger::Process() float degangle = progress * ARRAY_SIZE(m_vPositions); float angle1 = m_fMax_Z + DEGTORAD(degangle); float angle2 = m_fMax_Z - DEGTORAD(degangle); - int pos = clamp(degangle, 0, ARRAY_SIZE(m_vPositions)-1); + int pos = Clamp(degangle, 0, ARRAY_SIZE(m_vPositions)-1); CVector2D pos2d = m_vPositions[pos]; CVector pos3d = m_vPos; @@ -226,7 +249,11 @@ CStinger::Process() break; case STINGERSTATE_REMOVE: Remove(); +#ifdef FIX_BUGS + return; +#else break; +#endif } CheckForBurstTyres(); }
\ No newline at end of file diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp index 36bb02b6..1efd7733 100644 --- a/src/peds/CopPed.cpp +++ b/src/peds/CopPed.cpp @@ -93,7 +93,7 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP) m_nHassleTimer = 0; field_61C = 0; field_624 = 0; - m_pStinger = new CStinger; + m_pStinger = new CStinger(); SetWeaponLockOnTarget(nil); } @@ -555,7 +555,7 @@ CCopPed::CopAI(void) if (CWorld::GetIsLineOfSightClear(GetPosition(), nearPed->GetPosition(), true, false, false, false, false, false, false)) { - Say(SOUND_PED_COP_REACTION); + Say(SOUND_PED_COP_ASK_FOR_ID); SetObjective(OBJECTIVE_HASSLE_CHAR, nearPed); nearPed->SetObjective(OBJECTIVE_WAIT_ON_FOOT_FOR_COP, this); m_nHassleTimer = CTimer::GetTimeInMilliseconds() + 100000; @@ -747,7 +747,7 @@ CCopPed::ProcessControl(void) } if (m_pPointGunAt) - Say(SOUND_PED_COP_UNK_129); + Say(SOUND_PED_COP_TARGETING); if (m_bStopAndShootDisabledZone) { bool dontShoot = false; diff --git a/src/peds/Gangs.cpp b/src/peds/Gangs.cpp index 2d6d1137..240f6b37 100644 --- a/src/peds/Gangs.cpp +++ b/src/peds/Gangs.cpp @@ -5,6 +5,7 @@ #include "General.h" #include "Streaming.h" #include "Weapon.h" +#include "SaveBuf.h" CGangInfo CGangs::Gang[NUM_GANGS]; bool CGangs::GangAttackWithCops[NUM_GANGS]; @@ -119,6 +120,6 @@ INITSAVEBUF CheckSaveHeader(buf, 'G','N','G','\0', size - SAVE_HEADER_SIZE); for (int i = 0; i < NUM_GANGS; i++) - Gang[i] = ReadSaveBuf<CGangInfo>(buf); + ReadSaveBuf(&Gang[i], buf); VALIDATESAVEBUF(size); } diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index ba09e8a4..44712fa0 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -39,6 +39,7 @@ #include "CutsceneShadow.h" #include "Clock.h" #include "Wanted.h" +#include "SaveBuf.h" CPed *gapTempPedList[50]; uint16 gnNumTempPedList; @@ -53,10 +54,10 @@ bool CPed::bFannyMagnetCheat; bool CPed::bPedCheat3; CVector2D CPed::ms_vec2DFleePosition; -void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); } -void *CPed::operator new(size_t sz, int handle) { return CPools::GetPedPool()->New(handle); } -void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); } -void CPed::operator delete(void *p, int handle) { CPools::GetPedPool()->Delete((CPed*)p); } +void *CPed::operator new(size_t sz) throw() { return CPools::GetPedPool()->New(); } +void *CPed::operator new(size_t sz, int handle) throw() { return CPools::GetPedPool()->New(handle); } +void CPed::operator delete(void *p, size_t sz) throw() { CPools::GetPedPool()->Delete((CPed*)p); } +void CPed::operator delete(void *p, int handle) throw() { CPools::GetPedPool()->Delete((CPed*)p); } float gfTommyFatness = 1.0f; @@ -317,7 +318,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) bCanGiveUpSunbathing = true; m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this); - DMAudio.SetEntityStatus(m_audioEntityId, true); + DMAudio.SetEntityStatus(m_audioEntityId, TRUE); m_fearFlags = CPedType::GetThreats(m_nPedType); m_threatEntity = nil; m_eventOrThreat = CVector2D(0.0f, 0.0f); @@ -402,6 +403,30 @@ CPed::~CPed(void) CPopulation::NumMiamiViceCops--; CPopulation::UpdatePedCount((ePedType)m_nPedType, true); DMAudio.DestroyEntity(m_audioEntityId); + + // Because of the nature of ped lists in GTA, it can sometimes be outdated. + // Remove ourself from nearPeds list of the Peds in our nearPeds list. +#ifdef FIX_BUGS + for(int i = 0; i < m_numNearPeds; i++) { + CPed *nearPed = m_nearPeds[i]; + assert(nearPed != nil); + if (!nearPed->IsPointerValid()) + continue; + + for(int j = 0; j < nearPed->m_numNearPeds;) { + assert(j == ARRAY_SIZE(m_nearPeds) - 1 || nearPed->m_nearPeds[j] || !nearPed->m_nearPeds[j+1]); // ensure nil comes after nil + + if (nearPed->m_nearPeds[j] == this) { + for (int k = j; k < ARRAY_SIZE(m_nearPeds) - 1; k++) { + nearPed->m_nearPeds[k] = nearPed->m_nearPeds[k + 1]; + nearPed->m_nearPeds[k + 1] = nil; + } + nearPed->m_numNearPeds--; + } else + j++; + } + } +#endif } void @@ -518,13 +543,15 @@ CPed::BuildPedLists(void) removePed = true; } } + + assert(i == ARRAY_SIZE(m_nearPeds) - 1 || m_nearPeds[i] || !m_nearPeds[i+1]); // ensure nil comes after nil + if (removePed) { // If we arrive here, the ped we're checking isn't "near", so we should remove it. for (int j = i; j < ARRAY_SIZE(m_nearPeds) - 1; j++) { m_nearPeds[j] = m_nearPeds[j + 1]; m_nearPeds[j + 1] = nil; } - // Above loop won't work on last slot, so we need to empty it. m_nearPeds[ARRAY_SIZE(m_nearPeds) - 1] = nil; m_numNearPeds--; } else @@ -2382,7 +2409,7 @@ CPed::ProcessControl(void) if (m_nPedState == PED_JUMP) { if (m_nWaitTimer <= 2000) { if (m_nWaitTimer < 1000) - m_nWaitTimer += CTimer::GetTimeStep() * 0.02f * 1000.0f; + m_nWaitTimer += CTimer::GetTimeStepInMilliseconds(); } else { m_nWaitTimer = 0; } @@ -2860,7 +2887,7 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints) CColModel *hisCol = CModelInfo::GetModelInfo(collidingEnt->GetModelIndex())->GetColModel(); if (!bUsesCollision && !bJustCheckCollision) - return false; + return 0; if (collidingEnt->IsVehicle() && ((CVehicle*)collidingEnt)->IsBoat()) collidedWithBoat = true; @@ -6748,7 +6775,7 @@ CPed::FollowPath(void) } void -CPed::SetEvasiveStep(CEntity *reason, uint8 animType) +CPed::SetEvasiveStep(CPhysical *reason, uint8 animType) { AnimationId stepAnim; @@ -6766,22 +6793,23 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType) if (neededTurn > PI) neededTurn = TWOPI - neededTurn; - CVehicle *veh = (CVehicle*)reason; - if (reason->IsVehicle() && veh->IsCar()) { + if (reason->IsVehicle() && ((CVehicle*)reason)->IsCar()) { + CVehicle *veh = (CVehicle*)reason; if (veh->m_nCarHornTimer != 0) { vehPressedHorn = true; if (!IsPlayer()) animType = 1; } } - if (neededTurn <= DEGTORAD(90.0f) || veh->GetModelIndex() == MI_RCBANDIT || vehPressedHorn || animType != 0) { - SetLookFlag(veh, true); - if ((CGeneral::GetRandomNumber() & 1) && veh->GetModelIndex() != MI_RCBANDIT && animType == 0) { + + if (neededTurn <= DEGTORAD(90.0f) || reason->GetModelIndex() == MI_RCBANDIT || vehPressedHorn || animType != 0) { + SetLookFlag(reason, true); + if ((CGeneral::GetRandomNumber() & 1) && reason->GetModelIndex() != MI_RCBANDIT && animType == 0) { stepAnim = ANIM_STD_HAILTAXI; } else { - float vehDirection = CGeneral::GetRadianAngleBetweenPoints( - veh->m_vecMoveSpeed.x, veh->m_vecMoveSpeed.y, + float dangerDirection = CGeneral::GetRadianAngleBetweenPoints( + reason->m_vecMoveSpeed.x, reason->m_vecMoveSpeed.y, 0.0f, 0.0f); // Let's turn our back to the "reason" @@ -6791,14 +6819,14 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType) angleToFace -= TWOPI; // We don't want to run towards car's direction - float dangerZone = angleToFace - vehDirection; + float dangerZone = angleToFace - dangerDirection; dangerZone = CGeneral::LimitRadianAngle(dangerZone); // So, add or subtract 90deg (jump to left/right) according to that if (dangerZone > 0.0f) - angleToFace = vehDirection - HALFPI; + angleToFace = dangerDirection - HALFPI; else - angleToFace = vehDirection + HALFPI; + angleToFace = dangerDirection + HALFPI; stepAnim = ANIM_STD_NUM; if (animType == 0 || animType == 1) @@ -7761,26 +7789,40 @@ CPed::SetPedPositionInCar(void) } else { m_fRotationCur = m_pMyVehicle->GetForward().Heading(); } - GetMatrix() = newMat; + SetMatrix(newMat); } void CPed::LookForSexyPeds(void) { if ((!IsPedInControl() && m_nPedState != PED_DRIVING) - || m_lookTimer >= CTimer::GetTimeInMilliseconds() || m_nPedType != PEDTYPE_CIVMALE) + || m_lookTimer >= CTimer::GetTimeInMilliseconds() || +#ifdef FIX_BUGS + (m_nPedType != PEDTYPE_CIVMALE) && !IsFemale() && (m_nPedType != PEDTYPE_CRIMINAL) && !IsGangMember() +#else + m_nPedType != PEDTYPE_CIVMALE +#endif + ) return; for (int i = 0; i < m_numNearPeds; i++) { if (CanSeeEntity(m_nearPeds[i])) { if ((GetPosition() - m_nearPeds[i]->GetPosition()).Magnitude() < 10.0f) { CPed *nearPed = m_nearPeds[i]; - if ((nearPed->m_pedStats->m_sexiness > m_pedStats->m_sexiness) - && nearPed->m_nPedType == PEDTYPE_CIVFEMALE) { + if((nearPed->m_pedStats->m_sexiness > m_pedStats->m_sexiness) +#ifdef FIX_BUGS + && ((IsFemale() && !nearPed->IsFemale()) || (!IsFemale() && nearPed->IsFemale()))) { +#else + && nearPed->m_nPedType == PEDTYPE_CIVFEMALE) { +#endif SetLookFlag(nearPed, true); m_lookTimer = CTimer::GetTimeInMilliseconds() + 4000; - Say(SOUND_PED_CHAT_SEXY); +#ifdef FIX_BUGS + Say(IsFemale() ? SOUND_PED_CHAT_SEXY_FEMALE : SOUND_PED_CHAT_SEXY_MALE); +#else + Say(SOUND_PED_CHAT_SEXY_MALE); +#endif return; } } @@ -8734,7 +8776,7 @@ CPed::Wait(void) if ((GetPosition() - nearPed->GetPosition()).MagnitudeSqr() < sq(10.f)) { for (int anim = ANIM_STRIP_A; anim <= ANIM_STRIP_G; anim++) { if (RpAnimBlendClumpGetAssociation(nearPed->GetClump(), anim)) - Say(SOUND_PED_149); + Say(SOUND_PED_JEER); } } } diff --git a/src/peds/Ped.h b/src/peds/Ped.h index c94cd320..f5a7d7dc 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -650,10 +650,10 @@ public: CVector m_vecSpotToGuard; float m_radiusToGuard; - static void *operator new(size_t); - static void *operator new(size_t, int); - static void operator delete(void*, size_t); - static void operator delete(void*, int); + static void *operator new(size_t) throw(); + static void *operator new(size_t, int) throw(); + static void operator delete(void*, size_t) throw(); + static void operator delete(void*, int) throw(); CPed(uint32 pedType); ~CPed(void); @@ -762,7 +762,7 @@ public: void SetAimFlag(CEntity* to); void SetAimFlag(float angle); void SetAmmo(eWeaponType weaponType, uint32 ammo); - void SetEvasiveStep(CEntity*, uint8); + void SetEvasiveStep(CPhysical*, uint8); void GrantAmmo(eWeaponType, uint32); void SetEvasiveDive(CPhysical*, uint8); void SetAttack(CEntity*); diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp index cd8b06fa..e204dad9 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -1076,8 +1076,8 @@ CPed::ProcessObjective(void) SetMoveState(PEDMOVE_STILL); if (m_objective == OBJECTIVE_HASSLE_CHAR) { - Say(SOUND_PED_COP_REACTION); - m_pedInObjective->Say(SOUND_PED_UNK_126); + Say(SOUND_PED_COP_ASK_FOR_ID); + m_pedInObjective->Say(SOUND_PED_INNOCENT); m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 3000; m_pedInObjective->m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 3000; SetObjective(OBJECTIVE_WANDER); @@ -4600,13 +4600,97 @@ CPed::ExitCar(void) CVector CPed::GetPositionToOpenCarDoor(CVehicle *veh, uint32 component) { - CVector vehDoorPos = GetPositionToOpenCarDoor(veh, component, 1.0f); + CVector doorPos; + CVector vehDoorOffset; + CVehicleModelInfo* vehModel = veh->GetModelInfo(); -/* - // Unused - vehDoorPosWithoutOffset = veh->GetMatrix() * localVehDoorPos; -*/ - return vehDoorPos; + if (veh->IsBike()) { + CBike* bike = (CBike*)veh; + + if (component == CAR_WINDSCREEN) { + doorPos = vehModel->GetFrontSeatPosn(); + return bike->GetMatrix() * (doorPos + + CVector(-vecPedBikeKickAnimOffset.x, vecPedBikeKickAnimOffset.y, -vecPedBikeKickAnimOffset.z)); + } else { + switch (bike->m_bikeAnimType) { + case ASSOCGRP_BIKE_VESPA: + vehDoorOffset = vecPedVespaBikeJumpRhsAnimOffset; + break; + case ASSOCGRP_BIKE_HARLEY: + vehDoorOffset = vecPedHarleyBikeJumpRhsAnimOffset; + break; + case ASSOCGRP_BIKE_DIRT: + vehDoorOffset = vecPedDirtBikeJumpRhsAnimOffset; + break; + default: + vehDoorOffset = vecPedStdBikeJumpRhsAnimOffset; + break; + } + } + + doorPos = vehModel->GetFrontSeatPosn(); + if (component == CAR_DOOR_LR || component == CAR_DOOR_RR) { + doorPos = vehModel->m_positions[CAR_POS_BACKSEAT]; + } + + if (component == CAR_DOOR_LR || component == CAR_DOOR_LF) { + vehDoorOffset.x *= -1.f; + } + + CVector correctedPos; + bike->GetCorrectedWorldDoorPosition(correctedPos, vehDoorOffset, doorPos); + return correctedPos; + } else { + float seatOffset; + if (veh->bIsVan && (component == CAR_DOOR_LR || component == CAR_DOOR_RR)) { + seatOffset = 0.0f; + vehDoorOffset = vecPedVanRearDoorAnimOffset; + } else { + seatOffset = veh->pHandling->fSeatOffsetDistance; + if (veh->bLowVehicle) { + vehDoorOffset = vecPedCarDoorLoAnimOffset; + } else { + vehDoorOffset = vecPedCarDoorAnimOffset; + } + } + + switch (component) { + case CAR_DOOR_RF: + doorPos = vehModel->GetFrontSeatPosn(); + doorPos.x += seatOffset; + vehDoorOffset.x = -vehDoorOffset.x; + break; + + case CAR_DOOR_RR: + doorPos = vehModel->m_positions[CAR_POS_BACKSEAT]; + doorPos.x += seatOffset; + vehDoorOffset.x = -vehDoorOffset.x; + break; + + case CAR_DOOR_LF: + doorPos = vehModel->GetFrontSeatPosn(); + doorPos.x += seatOffset; + doorPos.x = -doorPos.x; + break; + + case CAR_DOOR_LR: + doorPos = vehModel->m_positions[CAR_POS_BACKSEAT]; + doorPos.x += seatOffset; + doorPos.x = -doorPos.x; + break; + + default: + doorPos = vehModel->GetFrontSeatPosn(); + vehDoorOffset = CVector(0.0f, 0.0f, 0.0f); + break; + } + + CVector diffVec = doorPos - vehDoorOffset; + return Multiply3x3(veh->GetMatrix(), diffVec) + veh->GetPosition(); + + //unused + //doorPos = Multiply3x3(veh->GetMatrix(), doorPos) + veh->GetMatrix(); + } } void @@ -5058,7 +5142,7 @@ CPed::PedSetDraggedOutCarPositionCB(CAnimBlendAssociation* animAssoc, void* arg) break; } } else { - draggedOutOffset = vecPedDraggedOutCarAnimOffset; + draggedOutOffset = CVector(vecPedDraggedOutCarAnimOffset.x, vecPedDraggedOutCarAnimOffset.y, 0.0f); } if (ped->m_vehDoor == CAR_DOOR_RF || ped->m_vehDoor == CAR_DOOR_RR) draggedOutOffset.x = -draggedOutOffset.x; @@ -5069,7 +5153,7 @@ CPed::PedSetDraggedOutCarPositionCB(CAnimBlendAssociation* animAssoc, void* arg) ped->m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); ped->SetPosition(posAfterBeingDragged); - if (ped->m_pMyVehicle && !ped->m_pMyVehicle->IsBike() && !ped->m_pMyVehicle->IsRoomForPedToLeaveCar(ped->m_vehDoor, &vecPedDraggedOutCarAnimOffset)) { + if (ped->m_pMyVehicle && !ped->m_pMyVehicle->IsBike() && !ped->m_pMyVehicle->IsRoomForPedToLeaveCar(ped->m_vehDoor, &draggedOutOffset)) { ped->PositionPedOutOfCollision(); } @@ -5684,7 +5768,12 @@ CPed::GetPositionToOpenCarDoor(CVehicle *veh, uint32 component, float offset) doorPos = vehModel->GetFrontSeatPosn(); if (component == CAR_WINDSCREEN) { +#ifdef FIX_BUGS + return bike->GetMatrix() * (doorPos + + CVector(-vecPedBikeKickAnimOffset.x, vecPedBikeKickAnimOffset.y, -vecPedBikeKickAnimOffset.z)); +#else return bike->GetMatrix() * (doorPos + vecPedBikeKickAnimOffset); +#endif } else { switch (bike->m_bikeAnimType) { case ASSOCGRP_BIKE_VESPA: @@ -6312,7 +6401,7 @@ CPed::WarpPedToNearEntityOffScreen(CEntity *warpTo) if (Abs(zCorrectedPos.z - warpToPos.z) < 3.0f || Abs(zCorrectedPos.z - appropriatePos.z) < 3.0f) { appropriatePos.z = zCorrectedPos.z; - if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f, &TheCamera.GetCameraMatrix()) + if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f) && CWorld::GetIsLineOfSightClear(appropriatePos, warpToPos, true, true, false, true, false, false, false) && !CWorld::TestSphereAgainstWorld(appropriatePos, 0.6f, this, true, true, false, true, false, false)) { teleported = true; diff --git a/src/peds/PedDebug.cpp b/src/peds/PedDebug.cpp index aed11357..0dbabb58 100644 --- a/src/peds/PedDebug.cpp +++ b/src/peds/PedDebug.cpp @@ -157,6 +157,9 @@ static char PersonalityTypeText[][18] = { "Old Girl", "Tough Girl", "Tramp", +#ifdef FIX_BUGS // there's male and female ones + "Tramp", +#endif "Tourist", "Prostitute", "Criminal", diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp index 79e01211..8e377c81 100644 --- a/src/peds/PedFight.cpp +++ b/src/peds/PedFight.cpp @@ -821,7 +821,7 @@ CPed::Attack(void) || weaponAnimAssoc->currentTime - weaponAnimAssoc->timeStep > delayBetweenAnimAndFire) { if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CHAINSAW) { - DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_ATTACK, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_IDLE, 0.0f); } else if (weaponAnimTime <= delayBetweenAnimAndFire || weaponAnimTime - weaponAnimAssoc->timeStep > delayBetweenAnimAndFire || !weaponAnimAssoc->IsRunning()) { if (weaponAnimAssoc->speed < 1.0f) weaponAnimAssoc->speed = 1.0f; @@ -897,7 +897,7 @@ CPed::Attack(void) CPad::GetPad(0)->StartShake(240, 180); } } else { - DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_IDLE, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_ATTACK, 0.0f); if (IsPlayer()) { CPad::GetPad(0)->StartShake(240, 90); } @@ -1304,7 +1304,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) if (IsPlayer()) moveAssoc->speed = 1.2f; - m_takeAStepAfterAttack = 0; + m_takeAStepAfterAttack = false; m_fightButtonPressure = 0; } else if (IsPlayer() && GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && GetWeapon()->m_eWeaponType != WEAPONTYPE_BRASSKNUCKLE && @@ -3915,7 +3915,7 @@ CPed::DriveVehicle(void) targetLRLean = 0.0f; timeBlend = Pow(0.86f, CTimer::GetTimeStep()); } else { - targetLRLean = clamp(bike->m_fLeanLRAngle / bike->pBikeHandling->fFullAnimLean, -1.0f, 1.0f); + targetLRLean = Clamp(bike->m_fLeanLRAngle / bike->pBikeHandling->fFullAnimLean, -1.0f, 1.0f); timeBlend = Pow(0.86f, CTimer::GetTimeStep()); } @@ -4102,7 +4102,7 @@ CPed::DriveVehicle(void) lDriveAssoc->blendAmount = 0.0f; if (rDriveAssoc) - rDriveAssoc->blendAmount = clamp(steerAngle * -100.0f / 61.0f, 0.0f, 1.0f); + rDriveAssoc->blendAmount = Clamp(steerAngle * -100.0f / 61.0f, 0.0f, 1.0f); else if (m_pMyVehicle->IsBoat() && !(m_pMyVehicle->pHandling->Flags & HANDLING_SIT_IN_BOAT)) CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE_RIGHT); else if (m_pMyVehicle->bLowVehicle) @@ -4115,7 +4115,7 @@ CPed::DriveVehicle(void) rDriveAssoc->blendAmount = 0.0f; if (lDriveAssoc) - lDriveAssoc->blendAmount = clamp(steerAngle * 100.0f / 61.0f, 0.0f, 1.0f); + lDriveAssoc->blendAmount = Clamp(steerAngle * 100.0f / 61.0f, 0.0f, 1.0f); else if (m_pMyVehicle->IsBoat() && !(m_pMyVehicle->pHandling->Flags & HANDLING_SIT_IN_BOAT)) CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE_LEFT); else if (m_pMyVehicle->bLowVehicle) diff --git a/src/peds/PedIK.cpp b/src/peds/PedIK.cpp index 475e04f1..cf2e4ed5 100644 --- a/src/peds/PedIK.cpp +++ b/src/peds/PedIK.cpp @@ -17,9 +17,9 @@ const RwV3d XaxisIK = { 1.0f, 0.0f, 0.0f}; const RwV3d YaxisIK = { 0.0f, 1.0f, 0.0f}; const RwV3d ZaxisIK = { 0.0f, 0.0f, 1.0f}; -CPedIK::CPedIK(CPed *ped) +CPedIK::CPedIK(CPed *ped) : m_ped(ped) { - m_ped = ped; + assert(ped != nil); m_flags = 0; m_headOrient.yaw = 0.0f; m_headOrient.pitch = 0.0f; @@ -79,7 +79,7 @@ CPedIK::MoveLimb(LimbOrientation &limb, float targetYaw, float targetPitch, Limb } if (limb.yaw > moveInfo.maxYaw || limb.yaw < moveInfo.minYaw) { - limb.yaw = clamp(limb.yaw, moveInfo.minYaw, moveInfo.maxYaw); + limb.yaw = Clamp(limb.yaw, moveInfo.minYaw, moveInfo.maxYaw); result = ANGLES_SET_TO_MAX; } @@ -97,7 +97,7 @@ CPedIK::MoveLimb(LimbOrientation &limb, float targetYaw, float targetPitch, Limb } if (limb.pitch > moveInfo.maxPitch || limb.pitch < moveInfo.minPitch) { - limb.pitch = clamp(limb.pitch, moveInfo.minPitch, moveInfo.maxPitch); + limb.pitch = Clamp(limb.pitch, moveInfo.minPitch, moveInfo.maxPitch); result = ANGLES_SET_TO_MAX; } return result; @@ -122,14 +122,14 @@ CPedIK::LookInDirection(float targetYaw, float targetPitch) m_headOrient.yaw = Atan2(-m->at.y, -m->at.x); m_headOrient.yaw -= m_ped->m_fRotationCur; m_headOrient.yaw = CGeneral::LimitRadianAngle(m_headOrient.yaw); - float up = clamp(m->up.z, -1.0f, 1.0f); + float up = Clamp(m->up.z, -1.0f, 1.0f); m_headOrient.pitch = Atan2(-up, Sqrt(1.0f - SQR(-up))); } // parent of head is neck RwMatrix *m = GetComponentMatrix(m_ped, PED_NECK); yaw = CGeneral::LimitRadianAngle(Atan2(-m->at.y, -m->at.x)); - float up = clamp(m->up.z, -1.0f, 1.0f); + float up = Clamp(m->up.z, -1.0f, 1.0f); pitch = Atan2(-up, Sqrt(1.0f - SQR(-up))); float headYaw = CGeneral::LimitRadianAngle(targetYaw - (yaw + m_torsoOrient.yaw)); float headPitch = CGeneral::LimitRadianAngle(targetPitch - pitch) * Cos(Min(Abs(headYaw), HALFPI)); @@ -336,11 +336,11 @@ CPedIK::RestoreLookAt(void) void CPedIK::ExtractYawAndPitchWorld(RwMatrix *mat, float *yaw, float *pitch) { - float f = clamp(DotProduct(mat->up, CVector(0.0f, 1.0f, 0.0f)), -1.0f, 1.0f); + float f = Clamp(DotProduct(mat->up, CVector(0.0f, 1.0f, 0.0f)), -1.0f, 1.0f); *yaw = Acos(f); if (mat->up.x > 0.0f) *yaw = -*yaw; - f = clamp(DotProduct(mat->right, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); + f = Clamp(DotProduct(mat->right, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); *pitch = Acos(f); if (mat->up.z > 0.0f) *pitch = -*pitch; } @@ -348,11 +348,11 @@ CPedIK::ExtractYawAndPitchWorld(RwMatrix *mat, float *yaw, float *pitch) void CPedIK::ExtractYawAndPitchLocal(RwMatrix *mat, float *yaw, float *pitch) { - float f = clamp(DotProduct(mat->at, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); + float f = Clamp(DotProduct(mat->at, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); *yaw = Acos(f); if (mat->at.y > 0.0f) *yaw = -*yaw; - f = clamp(DotProduct(mat->right, CVector(1.0f, 0.0f, 0.0f)), -1.0f, 1.0f); + f = Clamp(DotProduct(mat->right, CVector(1.0f, 0.0f, 0.0f)), -1.0f, 1.0f); *pitch = Acos(f); if (mat->up.x > 0.0f) *pitch = -*pitch; } diff --git a/src/peds/PedIK.h b/src/peds/PedIK.h index ee719fea..8be04365 100644 --- a/src/peds/PedIK.h +++ b/src/peds/PedIK.h @@ -34,7 +34,7 @@ public: AIMS_WITH_ARM = 4, }; - CPed *m_ped; + CPed *Const m_ped; LimbOrientation m_headOrient; LimbOrientation m_torsoOrient; LimbOrientation m_upperArmOrient; diff --git a/src/peds/PedType.cpp b/src/peds/PedType.cpp index bacb1a78..dcd4c717 100644 --- a/src/peds/PedType.cpp +++ b/src/peds/PedType.cpp @@ -3,6 +3,7 @@ #include "General.h" #include "FileMgr.h" #include "PedType.h" +#include "SaveBuf.h" CPedType *CPedType::ms_apPedType[NUM_PEDTYPES]; CPedStats *CPedStats::ms_apPedStats[NUM_PEDSTATS]; @@ -201,7 +202,7 @@ INITSAVEBUF CheckSaveHeader(buf, 'P', 'T', 'P', '\0', size - SAVE_HEADER_SIZE); for(int i = 0; i < NUM_PEDTYPES; i++) - *ms_apPedType[i] = ReadSaveBuf<CPedType>(buf); + ReadSaveBuf(ms_apPedType[i], buf); VALIDATESAVEBUF(size) } diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 9c668cf4..9f75b155 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -23,6 +23,7 @@ #include "Replay.h" #include "PedPlacement.h" #include "VarConsole.h" +#include "SaveBuf.h" #define PAD_MOVE_TO_GAME_WORLD_MOVE 60.0f @@ -836,8 +837,8 @@ CPlayerPed::PlayerControlFighter(CPad *padUsed) if (padMove > 0.0f) { m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown) - TheCamera.Orientation; - m_takeAStepAfterAttack = padMove > 2 * PAD_MOVE_TO_GAME_WORLD_MOVE; - if (padUsed->GetSprint() && padMove > 1 * PAD_MOVE_TO_GAME_WORLD_MOVE) + m_takeAStepAfterAttack = padMove > (2 * PAD_MOVE_TO_GAME_WORLD_MOVE); + if (padUsed->GetSprint() && padMove > (1 * PAD_MOVE_TO_GAME_WORLD_MOVE)) bIsAttacking = false; } @@ -869,7 +870,7 @@ CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed) if (m_nPedState == PED_JUMP) { if (bIsInTheAir) { if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f) - && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { + && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O float angleCos = Cos(m_fRotationCur); @@ -1483,7 +1484,7 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed) if (m_nPedState == PED_JUMP) { if (bIsInTheAir) { if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f) - && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { + && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O float angleCos = Cos(m_fRotationCur); @@ -1679,7 +1680,7 @@ CPlayerPed::ProcessControl(void) } } if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CHAINSAW && m_nPedState != PED_ATTACK && !bInVehicle) { - DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_ATTACK, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_IDLE, 0.0f); } if (m_nMoveState != PEDMOVE_RUN && m_nMoveState != PEDMOVE_SPRINT) @@ -2079,13 +2080,13 @@ CPlayerPed::UpdateMeleeAttackers(void) void CPlayerPed::RemovePedFromMeleeList(CPed *ped) { - int i = 0; - for (; m_pMeleeList[i] != ped; i++) { - if (i >= ARRAY_SIZE(m_pMeleeList)) + for (uint16 i = 0; i < ARRAY_SIZE(m_pMeleeList); i++) { + if (m_pMeleeList[i] == ped) { + m_pMeleeList[i] = nil; + ped->m_attackTimer = 0; return; + } } - m_pMeleeList[i] = nil; - ped->m_attackTimer = 0; } void diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 5603e2c6..384cef99 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -413,7 +413,7 @@ CPopulation::PedCreationDistMultiplier() return 1.0f; float vehSpeed = veh->m_vecMoveSpeed.Magnitude2D(); - return clamp(vehSpeed - 0.1f + 1.0f, 1.0f, 1.5f); + return Clamp(vehSpeed - 0.1f + 1.0f, 1.0f, 1.5f); } CPed* @@ -911,10 +911,9 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones() void CPopulation::ConvertAllObjectsToDummyObjects() { - int poolSize = CPools::GetObjectPool()->GetSize(); - for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) { - - CObject *obj = CPools::GetObjectPool()->GetSlot(poolIndex); + uint32 i = CPools::GetObjectPool()->GetSize(); + while(i--) { + CObject *obj = CPools::GetObjectPool()->GetSlot(i); if (obj) { if (obj->CanBeDeleted()) ConvertToDummyObject(obj); @@ -980,27 +979,30 @@ CPopulation::TestSafeForRealObject(CDummyObject *dummy) { CPtrNode *ptrNode; CColModel *dummyCol = dummy->GetColModel(); - float colRadius = dummy->GetBoundRadius(); - CVector colCentre = dummy->GetBoundCentre(); - int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - colRadius); + float radius = dummyCol->boundingSphere.radius; + int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - radius); if (minX < 0) minX = 0; - int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - colRadius); + int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - radius); if (minY < 0) minY = 0; - int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + colRadius); + int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + radius); #ifdef FIX_BUGS if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X - 1; #else if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X; #endif - int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + colRadius); + int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + radius); #ifdef FIX_BUGS if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y - 1; #else if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y; #endif + float colRadius = dummy->GetBoundRadius(); + CVUVECTOR colCentre; + dummy->GetBoundCentre(colCentre); + static CColPoint aTempColPoints[MAX_COLLISION_POINTS]; for (int curY = minY; curY <= maxY; curY++) { @@ -1435,7 +1437,7 @@ CPopulation::PlaceGangMembersInFormation(ePedType pedType, int pedAmount, CVecto CPed *createdPeds[5]; if (!TheCamera.IsSphereVisible(coors, 3.0f) || MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) { - if (CPedPlacement::IsPositionClearForPed(coors, 3.0f, -1, 0)) { + if (CPedPlacement::IsPositionClearForPed(coors, 3.0f, -1, nil)) { bool leaderFoundGround; float leaderGroundZ = CWorld::FindGroundZFor3DCoord(coors.x, coors.y, coors.z, &leaderFoundGround) + 1.0f; if (leaderFoundGround) { @@ -1515,11 +1517,14 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c if (!TheCamera.IsSphereVisible(coors, circleR) || MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) { - if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, 0)) { + if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, nil)) { int pedIdx = 0; CVector leaderPos; +#ifdef FIX_BUGS + bool createLeader = true; +#endif - for (int i = 0; i < pedAmount; i++) { + for (int i = 0; i < pedAmount; i++) { float angleMult = i + CGeneral::GetRandomNumberInRange(-0.2f, 0.2f); float randomR = circleR + CGeneral::GetRandomNumberInRange(-0.2f, 0.2f) * circleR; float xOffset = randomR * Cos(angleMult * circleSector); @@ -1528,8 +1533,10 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c float groundZ = CWorld::FindGroundZFor3DCoord(xOffset + coors.x, yOffset + coors.y, coors.z + 1.0, &foundGround) + 1.0f; if (foundGround) { CVector finalPos(coors.x + xOffset, coors.y + yOffset, coors.z > groundZ ? coors.z : groundZ); - - if (i == 0) +#ifndef FIX_BUGS + const bool createLeader = i == 0; +#endif + if (createLeader) leaderPos = finalPos; int gangModel = ChooseGangOccupation(pedType - PEDTYPE_GANG1); @@ -1552,11 +1559,11 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c } } } - bool memberCanSeeLeader = i == 0 ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false); + bool memberCanSeeLeader = createLeader ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false); - bool notTooCloseToLeader = i == 0 ? true : !(Abs(finalPos.z - leaderPos.z) < 1.0f); + bool notTooHighFromLeader = createLeader ? true : !(Abs(finalPos.z - leaderPos.z) >= 1.0f); - if (!foundObstacle && memberCanSeeLeader && notTooCloseToLeader) { + if (!foundObstacle && memberCanSeeLeader && notTooHighFromLeader) { CPed* newPed = AddPed(pedType, gangModel, finalPos); if (newPed) { createdPeds[pedIdx++] = newPed; @@ -1569,6 +1576,9 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c newPed->bCanAttackPlayerWithCops = true; CVisibilityPlugins::SetClumpAlpha(newPed->GetClump(), 0); +#ifdef FIX_BUGS + createLeader = false; +#endif } // No. #ifndef FIX_BUGS @@ -1616,7 +1626,7 @@ CPopulation::PlaceCouple(ePedType manType, int32 manModel, ePedType womanType, i return; if (!TheCamera.IsSphereVisible(coors, 1.5f) || MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) { - if (CPedPlacement::IsPositionClearForPed(coors, CModelInfo::GetModelInfo(manModel)->GetColModel()->boundingSphere.radius, -1, 0)) { + if (CPedPlacement::IsPositionClearForPed(coors, CModelInfo::GetModelInfo(manModel)->GetColModel()->boundingSphere.radius, -1, nil)) { bool manFoundGround; float manGroundZ = CWorld::FindGroundZFor3DCoord(coors.x, coors.y, coors.z, &manFoundGround) + 1.0f; if (manFoundGround) { @@ -1698,9 +1708,12 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group) if (!TheCamera.IsSphereVisible(coors, circleR) || MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) { - if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, 0)) { + if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, nil)) { int pedIdx = 0; CVector leaderPos; +#ifdef FIX_BUGS + bool createLeader = true; +#endif for (int i = 0; i < pedAmount; i++) { float angleMult = i + CGeneral::GetRandomNumberInRange(-0.2f, 0.2f); @@ -1712,11 +1725,15 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group) if (foundGround) { CVector finalPos(coors.x + xOffset, coors.y + yOffset, coors.z > groundZ ? coors.z : groundZ); - if (i == 0) +#ifndef FIX_BUGS + const bool createLeader = i == 0; +#endif + if (createLeader) leaderPos = finalPos; int pedModel = ChooseCivilianOccupation(group); CPedModelInfo *pedModelInfo = (CPedModelInfo*)CModelInfo::GetModelInfo(pedModel); + if (pedModelInfo->GetRwObject()) { CEntity* obstacles[6] = { nil, nil, nil, nil, nil, nil }; CPedPlacement::IsPositionClearForPed(finalPos, CModelInfo::GetModelInfo(pedModel)->GetColModel()->boundingSphere.radius, ARRAY_SIZE(obstacles), obstacles); @@ -1736,11 +1753,11 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group) } } } - bool memberCanSeeLeader = i == 0 ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false); + bool memberCanSeeLeader = createLeader ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false); - bool notTooCloseToLeader = i == 0 ? true : !(Abs(finalPos.z - leaderPos.z) < 1.0f); + bool notTooHighFromLeader = createLeader ? true : !(Abs(finalPos.z - leaderPos.z) >= 1.0f); - if (!foundObstacle && memberCanSeeLeader && notTooCloseToLeader) { + if (!foundObstacle && memberCanSeeLeader && notTooHighFromLeader) { CPed *newPed = AddPed(pedModelInfo->m_pedType, pedModel, finalPos); if (newPed) { createdPeds[pedIdx++] = newPed; @@ -1751,6 +1768,9 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group) newPed->m_fRotationCur = angle; newPed->m_fearFlags = 0; CVisibilityPlugins::SetClumpAlpha(newPed->GetClump(), 0); +#ifdef FIX_BUGS + createLeader = false; +#endif } // No. #ifndef FIX_BUGS diff --git a/src/render/Console.h b/src/render/Console.h index b4fa60c4..9f22236f 100644 --- a/src/render/Console.h +++ b/src/render/Console.h @@ -23,3 +23,5 @@ public: }; extern CConsole TheConsole; + +void cprintf(char*, ...);
\ No newline at end of file diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp index 8b137aad..d9bf88d1 100644 --- a/src/render/Coronas.cpp +++ b/src/render/Coronas.cpp @@ -493,7 +493,7 @@ CCoronas::RenderReflections(void) if(spriteCoors.z < drawDist){ float fadeDistance = drawDist / 2.0f; float distanceFade = spriteCoors.z < fadeDistance ? 1.0f : 1.0f - (spriteCoors.z - fadeDistance)/fadeDistance; - distanceFade = clamp(distanceFade, 0.0f, 1.0f); + distanceFade = Clamp(distanceFade, 0.0f, 1.0f); float recipz = 1.0f/RwCameraGetNearClipPlane(Scene.camera); float heightFade = (20.0f - aCoronas[i].heightAboveRoad)/20.0f; int intensity = distanceFade*heightFade * 230.0 * CWeather::WetRoads; diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp index e92eee29..13dba1a6 100644 --- a/src/render/Fluff.cpp +++ b/src/render/Fluff.cpp @@ -23,6 +23,7 @@ #include "World.h" #include "Replay.h" #include "Coronas.h" +#include "SaveBuf.h" CPlaneTrail CPlaneTrails::aArray[6]; RwImVertexIndex TrailIndices[32] = { @@ -1154,7 +1155,7 @@ void CScriptPath::Update(void) { return; m_fPosition += m_fSpeed * CTimer::GetTimeStepInSeconds(); - m_fPosition = clamp(m_fPosition, 0.0f, m_fTotalLength); + m_fPosition = Clamp(m_fPosition, 0.0f, m_fTotalLength); if (m_pObjects[0] || m_pObjects[1] || m_pObjects[2] || m_pObjects[3] || m_pObjects[4] || m_pObjects[5]) { @@ -1267,7 +1268,7 @@ INITSAVEBUF aArray[i].Clear(); for (int32 i = 0; i < 3; i++) { - aArray[i] = ReadSaveBuf<CScriptPath>(buf); + ReadSaveBuf(&aArray[i], buf); for (int32 j = 0; j < 6; j++) { CScriptPath *pPath = &aArray[i]; @@ -1279,7 +1280,7 @@ INITSAVEBUF aArray[i].m_pNode = new CPlaneNode[aArray[i].m_numNodes]; for (int32 j = 0; j < aArray[i].m_numNodes; j++) { - aArray[i].m_pNode[j] = ReadSaveBuf<CPlaneNode>(buf); + ReadSaveBuf(&aArray[i].m_pNode[j], buf); } } VALIDATESAVEBUF(size) diff --git a/src/render/Glass.cpp b/src/render/Glass.cpp index 3409a058..b4ec8c7e 100644 --- a/src/render/Glass.cpp +++ b/src/render/Glass.cpp @@ -151,9 +151,9 @@ CFallingGlassPane::Render(void) uint8 alpha = CGlass::CalcAlphaWithNormal(&fwdNorm); #ifdef FIX_BUGS - uint16 time = clamp(CTimer::GetTimeInMilliseconds() > m_nTimer ? CTimer::GetTimeInMilliseconds() - m_nTimer : 0u, 0u, 500u); + uint16 time = Clamp(CTimer::GetTimeInMilliseconds() > m_nTimer ? CTimer::GetTimeInMilliseconds() - m_nTimer : 0u, 0u, 500u); #else - uint16 time = clamp(CTimer::GetTimeInMilliseconds() - m_nTimer, 0, 500); + uint16 time = Clamp(CTimer::GetTimeInMilliseconds() - m_nTimer, 0, 500); #endif uint8 color = int32( float(alpha) * (float(time) / 500) ); diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 91503917..33f33358 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -2070,7 +2070,7 @@ float CHud::DrawFadeState(DRAW_FADE_STATE fadingElement, int forceFadingIn) break; } - return clamp(alpha, 0.0f, 255.0f); + return Clamp(alpha, 0.0f, 255.0f); } void diff --git a/src/render/MBlur.cpp b/src/render/MBlur.cpp index 9f5122dc..cc8270ce 100644 --- a/src/render/MBlur.cpp +++ b/src/render/MBlur.cpp @@ -283,10 +283,10 @@ CMBlur::CreateImmediateModeData(RwCamera *cam, RwRect *rect, RwIm2DVertex *verts v1 = y1/height + v1Off; u2 = x2/width + u2Off; v2 = y2/height + v2Off; - u1 = clamp(u1, 0.0f, 1.0f); - v1 = clamp(v1, 0.0f, 1.0f); - u2 = clamp(u2, 0.0f, 1.0f); - v2 = clamp(v2, 0.0f, 1.0f); + u1 = Clamp(u1, 0.0f, 1.0f); + v1 = Clamp(v1, 0.0f, 1.0f); + u2 = Clamp(u2, 0.0f, 1.0f); + v2 = Clamp(v2, 0.0f, 1.0f); } float recipz = 1.0f/z; @@ -517,7 +517,7 @@ CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, void CMBlur::SetDrunkBlur(float drunkness) { - Drunkness = clamp(drunkness, 0.0f, 1.0f); + Drunkness = Clamp(drunkness, 0.0f, 1.0f); } void @@ -598,9 +598,9 @@ CMBlur::OverlayRenderFx(RwCamera *cam, RwRaster *frontBuf) int red = (0.75f*CTimeCycle::GetDirectionalRed() + CTimeCycle::GetAmbientRed())*0.55f * 255; int green = (0.75f*CTimeCycle::GetDirectionalGreen() + CTimeCycle::GetAmbientGreen())*0.55f * 255; int blue = (0.75f*CTimeCycle::GetDirectionalBlue() + CTimeCycle::GetAmbientBlue())*0.55f * 255; - red = clamp(red, 0, 255); - green = clamp(green, 0, 255); - blue = clamp(blue, 0, 255); + red = Clamp(red, 0, 255); + green = Clamp(green, 0, 255); + blue = Clamp(blue, 0, 255); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); @@ -695,7 +695,7 @@ CMBlur::OverlayRenderFx(RwCamera *cam, RwRaster *frontBuf) int alpha = FrontEndMenuManager.m_PrefsBrightness > 255 ? FrontEndMenuManager.m_PrefsBrightness - 90 : FrontEndMenuManager.m_PrefsBrightness - 130; - alpha = clamp(alpha, 16, 200)/2; + alpha = Clamp(alpha, 16, 200)/2; CreateImmediateModeData(cam, &fxRect[i], verts, CRGBA(0, 0, 0, alpha), 0.0f, 0.0f, 0.0f, 0.0f, fxZ[i], true); RwRenderStateSet(rwRENDERSTATETEXTURERASTER, gpHeatHazeRaster); diff --git a/src/render/Occlusion.cpp b/src/render/Occlusion.cpp index 3ea5678c..ec7101a6 100644 --- a/src/render/Occlusion.cpp +++ b/src/render/Occlusion.cpp @@ -513,8 +513,8 @@ bool CEntity::IsEntityOccluded(void) { } if (COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) { - CVector min = m_matrix * CModelInfo::GetModelInfo(GetModelIndex())->GetColModel()->boundingBox.min; - CVector max = m_matrix * CModelInfo::GetModelInfo(GetModelIndex())->GetColModel()->boundingBox.max; + CVector min = m_matrix * CModelInfo::GetColModel(m_modelIndex)->boundingBox.min; + CVector max = m_matrix * CModelInfo::GetColModel(m_modelIndex)->boundingBox.max; if (CalcScreenCoors(min, &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue; if (CalcScreenCoors(CVector(max.x, max.y, min.z), &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue; diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp index 14b48243..461a10a6 100644 --- a/src/render/Particle.cpp +++ b/src/render/Particle.cpp @@ -19,7 +19,8 @@ #include "ParticleObject.h" #include "Particle.h" #include "soundlist.h" - +#include "SaveBuf.h" +#include "debugmenu.h" #define MAX_PARTICLES_ON_SCREEN (750) @@ -970,15 +971,15 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe int32 ColorVariation = CGeneral::GetRandomNumberInRange(-psystem->m_InitialColorVariation, psystem->m_InitialColorVariation); //float ColorVariation = CGeneral::GetRandomNumberInRange((float)-psystem->m_InitialColorVariation, (float)psystem->m_InitialColorVariation); - pParticle->m_Color.red = clamp(pParticle->m_Color.red + + pParticle->m_Color.red = Clamp(pParticle->m_Color.red + PERCENT(pParticle->m_Color.red, ColorVariation), 0, 255); - pParticle->m_Color.green = clamp(pParticle->m_Color.green + + pParticle->m_Color.green = Clamp(pParticle->m_Color.green + PERCENT(pParticle->m_Color.green, ColorVariation), 0, 255); - pParticle->m_Color.blue = clamp(pParticle->m_Color.blue + + pParticle->m_Color.blue = Clamp(pParticle->m_Color.blue + PERCENT(pParticle->m_Color.blue, ColorVariation), 0, 255); } @@ -1384,15 +1385,15 @@ void CParticle::Update() { float colorMul = 1.0f - float(particle->m_nTimeWhenColorWillBeChanged - CTimer::GetTimeInMilliseconds()) / float(psystem->m_ColorFadeTime); - particle->m_Color.red = clamp( + particle->m_Color.red = Clamp( psystem->m_RenderColouring.red + int32(float(psystem->m_FadeDestinationColor.red - psystem->m_RenderColouring.red) * colorMul), 0, 255); - particle->m_Color.green = clamp( + particle->m_Color.green = Clamp( psystem->m_RenderColouring.green + int32(float(psystem->m_FadeDestinationColor.green - psystem->m_RenderColouring.green) * colorMul), 0, 255); - particle->m_Color.blue = clamp( + particle->m_Color.blue = Clamp( psystem->m_RenderColouring.blue + int32(float(psystem->m_FadeDestinationColor.blue - psystem->m_RenderColouring.blue) * colorMul), 0, 255); } @@ -1702,13 +1703,13 @@ void CParticle::Update() if ( particle->m_nFadeToBlackTimer != 0 ) { - particle->m_nColorIntensity = clamp(particle->m_nColorIntensity - particle->m_nFadeToBlackTimer, + particle->m_nColorIntensity = Clamp(particle->m_nColorIntensity - particle->m_nFadeToBlackTimer, 0, 255); } if ( particle->m_nFadeAlphaTimer != 0 ) { - particle->m_nAlpha = clamp(particle->m_nAlpha - particle->m_nFadeAlphaTimer, + particle->m_nAlpha = Clamp(particle->m_nAlpha - particle->m_nFadeAlphaTimer, 0, 255); if ( particle->m_nAlpha == 0 ) { @@ -1880,11 +1881,20 @@ void CParticle::Render() if ( canDraw && psystem->Flags & DRAWTOP2D ) { - float screenZ = (particle->m_vecPosition.z - CDraw::GetNearClipZ()) + float screenZ; +#ifdef FIX_BUGS + bool zIsZero = true; + if ( particle->m_vecPosition.z != 0.0f ) { +#endif + screenZ = (particle->m_vecPosition.z - CDraw::GetNearClipZ()) * (CSprite::GetFarScreenZ() - CSprite::GetNearScreenZ()) * CDraw::GetFarClipZ() / ( (CDraw::GetFarClipZ() - CDraw::GetNearClipZ()) * particle->m_vecPosition.z ) + CSprite::GetNearScreenZ(); +#ifdef FIX_BUGS + zIsZero = false; + } +#endif float stretchTexW; float stretchTexH; @@ -1900,6 +1910,9 @@ void CParticle::Render() stretchTexH = CGeneral::GetRandomNumberInRange(0.1f, 1.0f) * psystem->m_vecTextureStretch.y + 63.0f; } +#ifdef FIX_BUGS + if (!zIsZero) { +#endif if ( i == PARTICLE_WATERDROP ) { @@ -2001,7 +2014,10 @@ void CParticle::Render() canDraw = false; } - +#ifdef FIX_BUGS + } + if ( !(zIsZero && (i == PARTICLE_WATERDROP || i == PARTICLE_BLOODDROP || i == PARTICLE_HEATHAZE_IN_DIST || i == PARTICLE_HEATHAZE) ) ) +#endif if ( canDraw ) { if ( particle->m_nRotation != 0 ) diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp index ae079821..dd87bff6 100644 --- a/src/render/Shadows.cpp +++ b/src/render/Shadows.cpp @@ -1406,7 +1406,7 @@ CShadows::CastShadowSectorList(CPtrList &PtrList, float fStartX, float fStartY, { pEntity->m_scanCode = CWorld::GetCurrentScanCode(); - if ( pEntity->bUsesCollision && !pEntity->m_flagE2 ) + if ( pEntity->bUsesCollision && !pEntity->bDontCastShadowsOn) { if ( IsAreaVisible(pEntity->m_area) ) { diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp index b44848f9..61750f85 100644 --- a/src/render/SpecialFX.cpp +++ b/src/render/SpecialFX.cpp @@ -214,7 +214,6 @@ CSpecialFX::Render2DFXs(void) CFont::SetPropOn(); CFont::SetColor(CRGBA(100, 100, 100, 200)); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); - CFont::PrintString(SCREEN_WIDTH * 8 / 10, SCREEN_HEIGHT * 8 / 10, gUString); for (int32 i = 0; i < SCREEN_HEIGHT; i += 4) { RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE); diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp index ba6ab291..58b29ea9 100644 --- a/src/render/Sprite.cpp +++ b/src/render/Sprite.cpp @@ -401,13 +401,13 @@ CSprite::RenderBufferedOneXLUSprite_Rotate_2Colours(float x, float y, float z, f // Colour factors, cx/y is the direction in which colours change from rgb1 to rgb2 cf[0] = (cx*(-c-s) + cy*(-c+s))*0.5f + 0.5f; - cf[0] = clamp(cf[0], 0.0f, 1.0f); + cf[0] = Clamp(cf[0], 0.0f, 1.0f); cf[1] = (cx*(-c+s) + cy*( c+s))*0.5f + 0.5f; - cf[1] = clamp(cf[1], 0.0f, 1.0f); + cf[1] = Clamp(cf[1], 0.0f, 1.0f); cf[2] = (cx*( c+s) + cy*( c-s))*0.5f + 0.5f; - cf[2] = clamp(cf[2], 0.0f, 1.0f); + cf[2] = Clamp(cf[2], 0.0f, 1.0f); cf[3] = (cx*( c-s) + cy*(-c-s))*0.5f + 0.5f; - cf[3] = clamp(cf[3], 0.0f, 1.0f); + cf[3] = Clamp(cf[3], 0.0f, 1.0f); float screenz = m_f2DNearScreenZ + (z-CDraw::GetNearClipZ())*(m_f2DFarScreenZ-m_f2DNearScreenZ)*CDraw::GetFarClipZ() / diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp index e91aa790..dee60d66 100644 --- a/src/render/WaterLevel.cpp +++ b/src/render/WaterLevel.cpp @@ -179,10 +179,10 @@ CWaterLevel::Initialise(Const char *pWaterDat) int32 t = WATER_HUGE_Y(ms_aWaterRects[i].top); int32 b = WATER_HUGE_Y(ms_aWaterRects[i].bottom) + 1.0f; - l = clamp(l, 0, MAX_SMALL_SECTORS - 1); - r = clamp(r, 0, MAX_SMALL_SECTORS - 1); - t = clamp(t, 0, MAX_SMALL_SECTORS - 1); - b = clamp(b, 0, MAX_SMALL_SECTORS - 1); + l = Clamp(l, 0, MAX_SMALL_SECTORS - 1); + r = Clamp(r, 0, MAX_SMALL_SECTORS - 1); + t = Clamp(t, 0, MAX_SMALL_SECTORS - 1); + b = Clamp(b, 0, MAX_SMALL_SECTORS - 1); for (int32 x = l; x <= r; x++) { @@ -611,14 +611,14 @@ CWaterLevel::TestVisibilityForFineWaterBlocks(const CVector &worldPos) if ((lineEnd.x > WORLD_MIN_X && lineEnd.x < WORLD_MAX_X) && (lineEnd.y > WORLD_MIN_Y && lineEnd.y < WORLD_MAX_Y)) { - if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false, nil)) + if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false)) { lineStart.x += 0.4f; lineStart.y += 0.4f; lineEnd.x += 0.4f; lineEnd.y += 0.4f; - if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false, nil)) + if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false)) { return false; } @@ -991,10 +991,10 @@ CWaterLevel::RenderWater() if ( bUseCamEndY ) nEndY = WATER_TO_HUGE_SECTOR_Y(camPos.y); - nStartX = clamp(nStartX, 0, MAX_HUGE_SECTORS - 1); - nEndX = clamp(nEndX, 0, MAX_HUGE_SECTORS - 1); - nStartY = clamp(nStartY, 0, MAX_HUGE_SECTORS - 1); - nEndY = clamp(nEndY, 0, MAX_HUGE_SECTORS - 1); + nStartX = Clamp(nStartX, 0, MAX_HUGE_SECTORS - 1); + nEndX = Clamp(nEndX, 0, MAX_HUGE_SECTORS - 1); + nStartY = Clamp(nStartY, 0, MAX_HUGE_SECTORS - 1); + nEndY = Clamp(nEndY, 0, MAX_HUGE_SECTORS - 1); for ( int32 x = nStartX; x <= nEndX; x++ ) { @@ -1014,7 +1014,7 @@ CWaterLevel::RenderWater() if ( fHugeSectorMaxRenderDistSqr > fHugeSectorDistToCamSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecHugeSectorCentre.x, vecHugeSectorCentre.y, 0.0f), SectorRadius(HUGE_SECTOR_SIZE), &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecHugeSectorCentre.x, vecHugeSectorCentre.y, 0.0f), SectorRadius(HUGE_SECTOR_SIZE)) ) { #ifndef PC_WATER WavesCalculatedThisFrame = true; @@ -1088,7 +1088,7 @@ CWaterLevel::RenderWater() if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE), &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE)) ) { RenderOneFlatExtraHugeWaterPoly( vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2, @@ -1107,7 +1107,7 @@ CWaterLevel::RenderWater() if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE), &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE)) ) { RenderOneFlatExtraHugeWaterPoly( vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2, @@ -1136,7 +1136,7 @@ CWaterLevel::RenderWater() if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE), &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE)) ) { RenderOneFlatExtraHugeWaterPoly( vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2, @@ -1155,7 +1155,7 @@ CWaterLevel::RenderWater() if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.x, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE), &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.x, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE)) ) { RenderOneFlatExtraHugeWaterPoly( vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2, @@ -1259,10 +1259,10 @@ CWaterLevel::RenderTransparentWater(void) if ( bUseCamEndY ) nEndY = WATER_TO_HUGE_SECTOR_Y(camPos.y ); - nStartX = clamp(nStartX, 0, MAX_HUGE_SECTORS - 1); - nEndX = clamp(nEndX, 0, MAX_HUGE_SECTORS - 1); - nStartY = clamp(nStartY, 0, MAX_HUGE_SECTORS - 1); - nEndY = clamp(nEndY, 0, MAX_HUGE_SECTORS - 1); + nStartX = Clamp(nStartX, 0, MAX_HUGE_SECTORS - 1); + nEndX = Clamp(nEndX, 0, MAX_HUGE_SECTORS - 1); + nStartY = Clamp(nStartY, 0, MAX_HUGE_SECTORS - 1); + nEndY = Clamp(nEndY, 0, MAX_HUGE_SECTORS - 1); for ( int32 x = nStartX; x <= nEndX; x++ ) @@ -1287,7 +1287,7 @@ CWaterLevel::RenderTransparentWater(void) if ( fHugeSectorMaxRenderDistSqr > fHugeSectorDistToCamSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecHugeSectorCentre.x, vecHugeSectorCentre.y, 0.0f), SectorRadius(HUGE_SECTOR_SIZE), &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecHugeSectorCentre.x, vecHugeSectorCentre.y, 0.0f), SectorRadius(HUGE_SECTOR_SIZE)) ) { if ( fHugeSectorDistToCamSqr >= SQR(500.0f) ) { @@ -1311,7 +1311,7 @@ CWaterLevel::RenderTransparentWater(void) if ( fLargeSectorDistToCamSqr < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecLargeSectorCentre.x, vecLargeSectorCentre.y, 0.0f), SectorRadius(LARGE_SECTOR_SIZE), &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecLargeSectorCentre.x, vecLargeSectorCentre.y, 0.0f), SectorRadius(LARGE_SECTOR_SIZE)) ) { // Render four small(32x32) sectors, or one large(64x64). @@ -2161,10 +2161,10 @@ CWaterLevel::PreCalcWaterGeometry(void) float signX = CamFwdDir.x * 1.4144272f; float signY = CamFwdDir.y * 1.4144272f; - signX = clamp(signX, -1.0f, 1.0f); + signX = Clamp(signX, -1.0f, 1.0f); fCamX += 0.4f * signX * float(SMALL_SECTOR_SIZE * 2.0f); - signY = clamp(signY, -1.0f, 1.0f); + signY = Clamp(signY, -1.0f, 1.0f); fCamY += 0.4f * signY * float(SMALL_SECTOR_SIZE * 2.0f); int32 nBlock; @@ -2578,7 +2578,7 @@ CWaterLevel::RenderBoatWakes(void) float val = 500.0f - (CBoat::WAKE_LIFETIME - pBoat->m_afWakePointLifeTime[wake]) * 600.0f / CBoat::WAKE_LIFETIME; - fAplhaB = clamp(val, 0.0f, 255.0f); + fAplhaB = Clamp(val, 0.0f, 255.0f); } CVector2D vecDistB = pBoat->m_avec2dWakePoints[wake - 1] - pBoat->m_avec2dWakePoints[wake]; @@ -2888,10 +2888,10 @@ CWaterLevel::CalcDistanceToWater(float fX, float fY) int32 nStartY = WATER_TO_SMALL_SECTOR_Y(fY - fSectorMaxRenderDist) - 1; int32 nEndY = WATER_TO_SMALL_SECTOR_Y(fY + fSectorMaxRenderDist) + 1; - nStartX = clamp(nStartX, 0, MAX_SMALL_SECTORS - 1); - nEndX = clamp(nEndX, 0, MAX_SMALL_SECTORS - 1); - nStartY = clamp(nStartY, 0, MAX_SMALL_SECTORS - 1); - nEndY = clamp(nEndY, 0, MAX_SMALL_SECTORS - 1); + nStartX = Clamp(nStartX, 0, MAX_SMALL_SECTORS - 1); + nEndX = Clamp(nEndX, 0, MAX_SMALL_SECTORS - 1); + nStartY = Clamp(nStartY, 0, MAX_SMALL_SECTORS - 1); + nEndY = Clamp(nEndY, 0, MAX_SMALL_SECTORS - 1); float fDistSqr = 1.0e10f; @@ -2915,7 +2915,7 @@ CWaterLevel::CalcDistanceToWater(float fX, float fY) } } - return clamp(Sqrt(fDistSqr) - 23.0f, 0.0f, fSectorMaxRenderDist); + return Clamp(Sqrt(fDistSqr) - 23.0f, 0.0f, fSectorMaxRenderDist); } void @@ -3197,7 +3197,7 @@ CWaterLevel::HandleBeachToysStuff(void) vecPos.x += (fCos - fSin) * fAngle; vecPos.y += (fSin + fCos) * fAngle; - if ( TheCamera.IsSphereVisible(vecPos, 1.0f, &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(vecPos, 1.0f) ) { float fWaterLevel; @@ -3241,7 +3241,7 @@ CWaterLevel::HandleBeachToysStuff(void) vecPos.x += (fCos - fSin) * fAngle; vecPos.y += (fSin + fCos) * fAngle; - if ( TheCamera.IsSphereVisible(vecPos, 2.0f, &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(vecPos, 2.0f) ) { float fWaterLevel; diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp index ffbd7e8f..9f925a8c 100644 --- a/src/render/Weather.cpp +++ b/src/render/Weather.cpp @@ -137,7 +137,7 @@ void CWeather::Init(void) ForcedWeatherType = WEATHER_RANDOM; SoundHandle = DMAudio.CreateEntity(AUDIOTYPE_WEATHER, (void*)1); if (SoundHandle >= 0) - DMAudio.SetEntityStatus(SoundHandle, true); + DMAudio.SetEntityStatus(SoundHandle, TRUE); } void CWeather::Update(void) @@ -281,7 +281,7 @@ void CWeather::Update(void) if (SunGlare > 0.0f) { SunGlare *= Min(1.0f, 7.0 * CTimeCycle::GetSunDirection().z); - SunGlare = clamp(SunGlare, 0.0f, 1.0f); + SunGlare = Clamp(SunGlare, 0.0f, 1.0f); if (!CSpecialFX::bSnapShotActive) SunGlare *= (1.0f - (CGeneral::GetRandomNumber()&0x1F)*0.007f); } diff --git a/src/rw/MemoryMgr.cpp b/src/rw/MemoryMgr.cpp index 2379692c..b9cff043 100644 --- a/src/rw/MemoryMgr.cpp +++ b/src/rw/MemoryMgr.cpp @@ -28,10 +28,10 @@ RwMemoryFunctions memFuncs = { #ifdef USE_CUSTOM_ALLOCATOR // game seems to be using heap directly here, but this is nicer -void *operator new(size_t sz) { return MemoryMgrMalloc(sz); } -void *operator new[](size_t sz) { return MemoryMgrMalloc(sz); } -void operator delete(void *ptr) noexcept { MemoryMgrFree(ptr); } -void operator delete[](void *ptr) noexcept { MemoryMgrFree(ptr); } +void *operator new(size_t sz) throw() { return MemoryMgrMalloc(sz); } +void *operator new[](size_t sz) throw() { return MemoryMgrMalloc(sz); } +void operator delete(void *ptr) throw() { MemoryMgrFree(ptr); } +void operator delete[](void *ptr) throw() { MemoryMgrFree(ptr); } #endif void* diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp index 11fde99d..69f57933 100644 --- a/src/rw/RwHelper.cpp +++ b/src/rw/RwHelper.cpp @@ -4,11 +4,13 @@ #include "Timecycle.h" #include "skeleton.h" #include "Debug.h" +#include "MBlur.h" #if !defined(FINAL) || defined(DEBUGMENU) #include "rtcharse.h" #endif #ifndef FINAL RtCharset *debugCharset; +bool bDebugRenderGroups; #endif #ifdef PS2_ALPHA_TEST @@ -106,6 +108,8 @@ SetCullMode(uint32 mode) void PushRendergroup(const char *name) { + if(!bDebugRenderGroups) + return; #if defined(RW_OPENGL) if(GLAD_GL_KHR_debug) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, name); @@ -119,6 +123,8 @@ PushRendergroup(const char *name) void PopRendergroup(void) { + if(!bDebugRenderGroups) + return; #if defined(RW_OPENGL) if(GLAD_GL_KHR_debug) glPopDebugGroup(); @@ -575,6 +581,12 @@ CameraSize(RwCamera * camera, RwRect * rect, raster->width = zRaster->width = rect->w; raster->height = zRaster->height = rect->h; #endif +#ifdef FIX_BUGS + if(CMBlur::BlurOn){ + CMBlur::MotionBlurClose(); + CMBlur::MotionBlurOpen(camera); + } +#endif } /* Figure out the view window */ diff --git a/src/rw/RwHelper.h b/src/rw/RwHelper.h index 9352d1fd..a3a1928c 100644 --- a/src/rw/RwHelper.h +++ b/src/rw/RwHelper.h @@ -1,5 +1,6 @@ #pragma once +extern bool bDebugRenderGroups; extern bool gPS2alphaTest; extern bool gBackfaceCulling; diff --git a/src/rw/VisibilityPlugins.h b/src/rw/VisibilityPlugins.h index 9cdbc0c7..d375044b 100644 --- a/src/rw/VisibilityPlugins.h +++ b/src/rw/VisibilityPlugins.h @@ -127,7 +127,6 @@ public: int32 offset, int32 len); static int32 ms_framePluginOffset; - // Not actually used struct ClumpExt { ClumpVisibilityCB visibilityCB; diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index a97e9af7..a56ff2c3 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -251,6 +251,11 @@ GenericSave(int file) WriteSaveDataBlock(CStreaming::MemoryCardSave, "StreamingSize"); WriteSaveDataBlock(CPedType::Save, "PedTypeSize"); + // sure just write garbage data repeatedly ... +#ifndef THIS_IS_STUPID + memset(work_buff, 0, sizeof(work_buff)); +#endif + // Write padding for (int i = 0; i < 4; i++) { size = align4bytes(SIZE_OF_ONE_GAME_IN_BYTES - totalSize - 4); @@ -540,7 +545,11 @@ GetNameOfSavedGame(int32 slot) bool CheckDataNotCorrupt(int32 slot, char *name) { +#ifdef FIX_BUGS + char filename[MAX_PATH]; +#else char filename[100]; +#endif int32 blocknum = 0; eLevelName level = LEVEL_GENERIC; diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp index 70ca31d2..c9045705 100644 --- a/src/save/PCSave.cpp +++ b/src/save/PCSave.cpp @@ -25,7 +25,11 @@ C_PcSave::SetSaveDirectory(const char *path) bool C_PcSave::DeleteSlot(int32 slot) { +#ifdef FIX_BUGS + char FileName[MAX_PATH]; +#else char FileName[200]; +#endif PcSaveHelper.nErrorCode = SAVESTATUS_SUCCESSFUL; sprintf(FileName, "%s%i.b", DefaultPCSaveFileName, slot + 1); diff --git a/src/save/SaveBuf.h b/src/save/SaveBuf.h new file mode 100644 index 00000000..6e9b3ae9 --- /dev/null +++ b/src/save/SaveBuf.h @@ -0,0 +1,115 @@ +#pragma once + +#ifdef VALIDATE_SAVE_SIZE +extern int32 _saveBufCount; +#define INITSAVEBUF _saveBufCount = 0; +#define VALIDATESAVEBUF(b) assert(_saveBufCount == b); +#else +#define INITSAVEBUF +#define VALIDATESAVEBUF(b) +#endif + +inline void +SkipSaveBuf(uint8 *&buf, int32 skip) +{ + buf += skip; +#ifdef VALIDATE_SAVE_SIZE + _saveBufCount += skip; +#endif +} + +inline void +SkipSaveBuf(uint8*& buf, uint32 &length, int32 skip) +{ + buf += skip; + length += skip; +#ifdef VALIDATE_SAVE_SIZE + _saveBufCount += skip; +#endif +} + +template<typename T> +inline void +ReadSaveBuf(T *out, uint8 *&buf) +{ + *out = *(T *)buf; + SkipSaveBuf(buf, sizeof(T)); +} + +template<typename T> +inline void +ReadSaveBuf(T *out, uint8 *&buf, uint32 &length) +{ + *out = *(T *)buf; + SkipSaveBuf(buf, length, sizeof(T)); +} + +template<typename T> +inline T * +WriteSaveBuf(uint8 *&buf, const T &value) +{ + T *p = (T*)buf; + *p = value; + SkipSaveBuf(buf, sizeof(T)); + return p; +} + +template<typename T> +inline T * +WriteSaveBuf(uint8 *&buf, uint32 &length, const T &value) +{ + T *p = (T*)buf; + *p = value; + SkipSaveBuf(buf, length, sizeof(T)); + return p; +} + + +#define SAVE_HEADER_SIZE (4*sizeof(char)+sizeof(uint32)) + +#define WriteSaveHeader(buf,a,b,c,d,size) \ + WriteSaveBuf(buf, a);\ + WriteSaveBuf(buf, b);\ + WriteSaveBuf(buf, c);\ + WriteSaveBuf(buf, d);\ + WriteSaveBuf<uint32>(buf, size); + +#define WriteSaveHeaderWithLength(buf,len,a,b,c,d,size) \ + WriteSaveBuf(buf, len, a);\ + WriteSaveBuf(buf, len, b);\ + WriteSaveBuf(buf, len, c);\ + WriteSaveBuf(buf, len, d);\ + WriteSaveBuf(buf, len, (uint32)(size)); + +#ifdef VALIDATE_SAVE_SIZE +#define CheckSaveHeader(buf, a, b, c, d, size) do { \ + char _c; uint32 _size;\ + ReadSaveBuf(&_c, buf);\ + assert(_c == a);\ + ReadSaveBuf(&_c, buf);\ + assert(_c == b);\ + ReadSaveBuf(&_c, buf);\ + assert(_c == c);\ + ReadSaveBuf(&_c, buf);\ + assert(_c == d);\ + ReadSaveBuf(&_size, buf);\ + assert(_size == size);\ + } while(0) + +#define CheckSaveHeaderWithLength(buf,len,a,b,c,d,size) do { \ + char _c; uint32 _size;\ + ReadSaveBuf(&_c, buf, len);\ + assert(_c == a);\ + ReadSaveBuf(&_c, buf, len);\ + assert(_c == b);\ + ReadSaveBuf(&_c, buf, len);\ + assert(_c == c);\ + ReadSaveBuf(&_c, buf, len);\ + assert(_c == d);\ + ReadSaveBuf(&_size, buf, len);\ + assert(_size == size);\ + } while(0) +#else +#define CheckSaveHeader(buf, a, b, c, d, size) SkipSaveBuf(buf, 8); +#define CheckSaveHeaderWithLength(buf, len, a, b, c, d, size) SkipSaveBuf(buf, 8); +#endif diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index 9b43bcaf..a073f854 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -1,4 +1,5 @@ #include <time.h> +#include <limits.h> // This is the common include for platform/renderer specific skeletons(glfw.cpp, win.cpp etc.) and using cross platform things (like Windows directories wrapper, platform specific global arrays etc.) // Functions that's different on glfw and win but have same signature, should be located on platform.h. @@ -147,7 +148,7 @@ typedef void* HANDLE; struct WIN32_FIND_DATA { char extension[32]; // for searching - char folder[32]; // for searching + char folder[MAX_PATH]; // for searching char cFileName[256]; // because tSkinInfo has it 256 time_t ftLastWriteTime; }; diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index f5195b83..0928229f 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -919,7 +919,7 @@ void _InputInitialiseJoys() free(db); fclose(f); } else - printf("You don't seem to have copied " SDL_GAMEPAD_DB_PATH " file from re3/gamefiles to GTA3 directory. Some gamepads may not be recognized.\n"); + printf("You don't seem to have copied " SDL_GAMEPAD_DB_PATH " file from reVC/gamefiles to GTA: Vice City directory. Some gamepads may not be recognized.\n"); #undef SDL_GAMEPAD_DB_PATH diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 21bd0eb0..f251f58d 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -915,14 +915,14 @@ void WaitForState(FILTER_STATE State) */ void HandleGraphEvent(void) { - LONG evCode, evParam1, evParam2; + LONG evCode; + LONG_PTR evParam1, evParam2; HRESULT hr=S_OK; ASSERT(pME != nil); // Process all queued events - while (SUCCEEDED(pME->GetEvent(&evCode, (LONG_PTR *)&evParam1, - (LONG_PTR *)&evParam2, 0))) + while (SUCCEEDED(pME->GetEvent(&evCode, &evParam1, &evParam2, 0))) { // Free memory associated with callback, since we're not using it hr = pME->FreeEventParams(evCode, evParam1, evParam2); @@ -1498,7 +1498,7 @@ psSelectDevice() #ifdef DEFAULT_NATIVE_RESOLUTION GcurSelVM = 1; #else - MessageBox(nil, "Cannot find 640x480 video mode", "GTA3", MB_OK); + MessageBox(nil, "Cannot find 640x480 video mode", "GTA: Vice City", MB_OK); return FALSE; #endif } @@ -1541,7 +1541,7 @@ psSelectDevice() } if(bestFsMode < 0){ - MessageBox(nil, "Cannot find desired video mode", "GTA3", MB_OK); + MessageBox(nil, "Cannot find desired video mode", "GTA: Vice City", MB_OK); return FALSE; } GcurSelVM = bestFsMode; diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 06dc1b54..8a50ddcf 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -50,6 +50,7 @@ #include "Automobile.h" #include "Bike.h" #include "Wanted.h" +#include "SaveBuf.h" bool bAllCarCheat; @@ -2260,7 +2261,7 @@ CAutomobile::PreRender(void) // 1.0 if directly behind car, -1.0 if in front float behindness = DotProduct(lookVector, GetForward()); - behindness = clamp(behindness, -1.0f, 1.0f); // shouldn't be necessary + behindness = Clamp(behindness, -1.0f, 1.0f); // shouldn't be necessary // 0.0 if behind car, PI if in front // Abs not necessary float angle = Abs(Acos(behindness)); @@ -2618,7 +2619,7 @@ CAutomobile::PreRender(void) float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; if(GetModelIndex() == MI_VOODOO) groundOffset *= 0.6f; - mat.RotateY(Asin(clamp(-groundOffset, -1.0f, 1.0f))); + mat.RotateY(Asin(Clamp(-groundOffset, -1.0f, 1.0f))); } } if(pHandling->Flags & HANDLING_FAT_REARW) @@ -2659,7 +2660,7 @@ CAutomobile::PreRender(void) float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; if(GetModelIndex() == MI_VOODOO) groundOffset *= 0.6f; - mat.RotateY(Asin(clamp(groundOffset, -1.0f, 1.0f))); + mat.RotateY(Asin(Clamp(groundOffset, -1.0f, 1.0f))); } } if(pHandling->Flags & HANDLING_FAT_REARW) @@ -2692,7 +2693,7 @@ CAutomobile::PreRender(void) float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; if(GetModelIndex() == MI_VOODOO) groundOffset *= 0.6f; - mat.RotateY(Asin(clamp(-groundOffset, -1.0f, 1.0f))); + mat.RotateY(Asin(Clamp(-groundOffset, -1.0f, 1.0f))); } } if(pHandling->Flags & HANDLING_FAT_REARW) @@ -2726,7 +2727,7 @@ CAutomobile::PreRender(void) float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; if(GetModelIndex() == MI_VOODOO) groundOffset *= 0.6f; - mat.RotateY(Asin(clamp(groundOffset, -1.0f, 1.0f))); + mat.RotateY(Asin(Clamp(groundOffset, -1.0f, 1.0f))); } } if(pHandling->Flags & HANDLING_FAT_REARW) @@ -2860,7 +2861,7 @@ CAutomobile::PreRender(void) float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; if(GetModelIndex() == MI_VOODOO) groundOffset *= 0.6f; - mat.RotateY(Asin(clamp(-groundOffset, -1.0f, 1.0f))); + mat.RotateY(Asin(Clamp(-groundOffset, -1.0f, 1.0f))); } } if(pHandling->Flags & HANDLING_NARROW_FRONTW) @@ -2901,7 +2902,7 @@ CAutomobile::PreRender(void) float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; if(GetModelIndex() == MI_VOODOO) groundOffset *= 0.6f; - mat.RotateY(Asin(clamp(groundOffset, -1.0f, 1.0f))); + mat.RotateY(Asin(Clamp(groundOffset, -1.0f, 1.0f))); } } if(pHandling->Flags & HANDLING_NARROW_FRONTW) @@ -3119,7 +3120,7 @@ CAutomobile::ProcessControlInputs(uint8 pad) 0.2f*CTimer::GetTimeStep(); nLastControlInput = 0; } - m_fSteerInput = clamp(m_fSteerInput, -1.0f, 1.0f); + m_fSteerInput = Clamp(m_fSteerInput, -1.0f, 1.0f); // Accelerate/Brake float acceleration = (CPad::GetPad(pad)->GetAccelerate() - CPad::GetPad(pad)->GetBrake())/255.0f; @@ -3238,7 +3239,7 @@ CAutomobile::FireTruckControl(void) m_fCarGunLR += CPad::GetPad(0)->GetCarGunLeftRight() * 0.00025f * CTimer::GetTimeStep(); m_fCarGunUD += CPad::GetPad(0)->GetCarGunUpDown() * 0.0001f * CTimer::GetTimeStep(); } - m_fCarGunUD = clamp(m_fCarGunUD, 0.05f, 0.3f); + m_fCarGunUD = Clamp(m_fCarGunUD, 0.05f, 0.3f); CVector cannonPos(0.0f, 1.5f, 1.9f); @@ -3663,7 +3664,7 @@ CAutomobile::HydraulicControl(void) float limitDiff = extendedLowerLimit - normalLowerLimit; if(limitDiff != 0.0f && Abs(maxDelta/limitDiff) > 0.01f){ float f = (maxDelta + limitDiff)/2.0f/limitDiff; - f = clamp(f, 0.0f, 1.0f); + f = Clamp(f, 0.0f, 1.0f); DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_HYDRAULIC_3, f); if(f < 0.4f || f > 0.6f) setPrevRatio = true; @@ -4980,7 +4981,7 @@ CAutomobile::GetHeightAboveRoad(void) void CAutomobile::PlayCarHorn(void) { - int r; + uint32 r; if (IsAlarmOn() || m_nCarHornTimer != 0) return; @@ -5869,7 +5870,7 @@ void CAutomobile::Save(uint8*& buf) { CVehicle::Save(buf); - WriteSaveBuf<CDamageManager>(buf, Damage); + WriteSaveBuf(buf, Damage); SkipSaveBuf(buf, 1500 - 672 - sizeof(CDamageManager)); } @@ -5877,7 +5878,7 @@ void CAutomobile::Load(uint8*& buf) { CVehicle::Load(buf); - Damage = ReadSaveBuf<CDamageManager>(buf); + ReadSaveBuf(&Damage, buf); SkipSaveBuf(buf, 1500 - 672 - sizeof(CDamageManager)); SetupDamageAfterLoad(); } diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index 3e4c3a31..c42d342e 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -36,6 +36,7 @@ #include "Automobile.h" #include "Bike.h" #include "Debug.h" +#include "SaveBuf.h" const uint32 CBike::nSaveStructSize = #ifdef COMPATIBLE_SAVES @@ -532,7 +533,7 @@ CBike::ProcessControl(void) m_fWheelAngle += DEGTORAD(1.0f)*CTimer::GetTimeStep(); if(bIsStanding){ float f = Pow(0.97f, CTimer::GetTimeStep()); - m_fLeanLRAngle2 = m_fLeanLRAngle2*f - (Asin(clamp(GetRight().z,-1.0f,1.0f))+DEGTORAD(15.0f))*(1.0f-f); + m_fLeanLRAngle2 = m_fLeanLRAngle2*f - (Asin(Clamp(GetRight().z,-1.0f,1.0f))+DEGTORAD(15.0f))*(1.0f-f); m_fLeanLRAngle = m_fLeanLRAngle2; } }else{ @@ -1027,9 +1028,9 @@ CBike::ProcessControl(void) lean = DotProduct(m_vecMoveSpeed-initialMoveSpeed, m_vecAvgSurfaceRight); lean /= GRAVITY*Max(CTimer::GetTimeStep(), 0.01f); if(m_wheelStatus[BIKEWHEEL_FRONT] == WHEEL_STATUS_BURST) - lean = clamp(lean, -0.4f*pBikeHandling->fMaxLean, 0.4f*pBikeHandling->fMaxLean); + lean = Clamp(lean, -0.4f*pBikeHandling->fMaxLean, 0.4f*pBikeHandling->fMaxLean); else - lean = clamp(lean, -pBikeHandling->fMaxLean, pBikeHandling->fMaxLean); + lean = Clamp(lean, -pBikeHandling->fMaxLean, pBikeHandling->fMaxLean); float f = Pow(pBikeHandling->fDesLean, CTimer::GetTimeStep()); m_fLeanLRAngle2 = (Asin(lean) - idleAngle)*(1.0f-f) + m_fLeanLRAngle2*f; }else{ @@ -1052,11 +1053,11 @@ CBike::ProcessControl(void) if(m_aSuspensionSpringRatio[BIKESUSP_R1] < 1.0f || m_aSuspensionSpringRatio[BIKESUSP_R2] < 1.0f){ // BUG: this clamp makes no sense and the arguments seem swapped too ApplyTurnForce(contactPoints[BIKESUSP_R1], - m_fTurnMass*Sin(m_fBrakeDestabilization)*clamp(fwdSpeed, 0.5f, 0.2f)*0.013f*GetRight()*CTimer::GetTimeStep()); + m_fTurnMass*Sin(m_fBrakeDestabilization)*Clamp(fwdSpeed, 0.5f, 0.2f)*0.013f*GetRight()*CTimer::GetTimeStep()); }else{ // BUG: this clamp makes no sense and the arguments seem swapped too ApplyTurnForce(contactPoints[BIKESUSP_R1], - m_fTurnMass*Sin(m_fBrakeDestabilization)*clamp(fwdSpeed, 0.5f, 0.2f)*0.003f*GetRight()*CTimer::GetTimeStep()); + m_fTurnMass*Sin(m_fBrakeDestabilization)*Clamp(fwdSpeed, 0.5f, 0.2f)*0.003f*GetRight()*CTimer::GetTimeStep()); } }else m_fBrakeDestabilization = 0.0f; @@ -1219,7 +1220,7 @@ CBike::ProcessControl(void) // Balance bike if(bBalancedByRider || bIsBeingPickedUp || bIsStanding){ float onSideness = DotProduct(GetRight(), m_vecAvgSurfaceNormal); - onSideness = clamp(onSideness, -1.0f, 1.0f); + onSideness = Clamp(onSideness, -1.0f, 1.0f); CVector worldCOM = Multiply3x3(GetMatrix(), m_vecCentreOfMass); // Keep bike upright if(bBalancedByRider){ @@ -1839,7 +1840,7 @@ CBike::ProcessControlInputs(uint8 pad) 0.2f*CTimer::GetTimeStep(); nLastControlInput = 0; } - m_fSteerInput = clamp(m_fSteerInput, -1.0f, 1.0f); + m_fSteerInput = Clamp(m_fSteerInput, -1.0f, 1.0f); // Lean forward/backward float updown; @@ -1849,7 +1850,7 @@ CBike::ProcessControlInputs(uint8 pad) #endif updown = -CPad::GetPad(pad)->GetSteeringUpDown()/128.0f + CPad::GetPad(pad)->GetCarGunUpDown()/128.0f; m_fLeanInput += (updown - m_fLeanInput)*0.2f*CTimer::GetTimeStep(); - m_fLeanInput = clamp(m_fLeanInput, -1.0f, 1.0f); + m_fLeanInput = Clamp(m_fLeanInput, -1.0f, 1.0f); // Accelerate/Brake float acceleration = (CPad::GetPad(pad)->GetAccelerate() - CPad::GetPad(pad)->GetBrake())/255.0f; @@ -2546,7 +2547,7 @@ CBike::GetHeightAboveRoad(void) void CBike::PlayCarHorn(void) { - int r; + uint32 r; if (IsAlarmOn() || m_nCarHornTimer != 0) return; diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 0bc653c6..85a41099 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -28,6 +28,7 @@ #include "Record.h" #include "Shadows.h" #include "Wanted.h" +#include "SaveBuf.h" #define INVALID_ORIENTATION (-9999.99f) @@ -157,9 +158,9 @@ CBoat::ProcessControl(void) r = 127.5f*(CTimeCycle::GetAmbientRed_Obj() + 0.5f*CTimeCycle::GetDirectionalRed()); g = 127.5f*(CTimeCycle::GetAmbientGreen_Obj() + 0.5f*CTimeCycle::GetDirectionalGreen()); b = 127.5f*(CTimeCycle::GetAmbientBlue_Obj() + 0.5f*CTimeCycle::GetDirectionalBlue()); - r = clamp(r, 0, 255); - g = clamp(g, 0, 255); - b = clamp(b, 0, 255); + r = Clamp(r, 0, 255); + g = Clamp(g, 0, 255); + b = Clamp(b, 0, 255); splashColor.red = r; splashColor.green = g; splashColor.blue = b; @@ -168,9 +169,9 @@ CBoat::ProcessControl(void) r = 229.5f*(CTimeCycle::GetAmbientRed() + 0.85f*CTimeCycle::GetDirectionalRed()); g = 229.5f*(CTimeCycle::GetAmbientGreen() + 0.85f*CTimeCycle::GetDirectionalGreen()); b = 229.5f*(CTimeCycle::GetAmbientBlue() + 0.85f*CTimeCycle::GetDirectionalBlue()); - r = clamp(r, 0, 255); - g = clamp(g, 0, 255); - b = clamp(b, 0, 255); + r = Clamp(r, 0, 255); + g = Clamp(g, 0, 255); + b = Clamp(b, 0, 255); jetColor.red = r; jetColor.green = g; jetColor.blue = b; @@ -386,7 +387,7 @@ CBoat::ProcessControl(void) if(CPad::GetPad(0)->GetHandBrake()) steerLoss *= 0.5f; steerFactor -= steerLoss; - steerFactor = clamp(steerFactor, 0.0f, 1.0f); + steerFactor = Clamp(steerFactor, 0.0f, 1.0f); } CVector boundMin = GetColModel()->boundingBox.min; @@ -770,17 +771,17 @@ CBoat::ProcessControlInputs(uint8 pad) m_nPadID = 3; m_fBrake += (CPad::GetPad(pad)->GetBrake()/255.0f - m_fBrake)*0.1f; - m_fBrake = clamp(m_fBrake, 0.0f, 1.0f); + m_fBrake = Clamp(m_fBrake, 0.0f, 1.0f); if(m_fBrake < 0.05f){ m_fBrake = 0.0f; m_fAccelerate += (CPad::GetPad(pad)->GetAccelerate()/255.0f - m_fAccelerate)*0.1f; - m_fAccelerate = clamp(m_fAccelerate, 0.0f, 1.0f); + m_fAccelerate = Clamp(m_fAccelerate, 0.0f, 1.0f); }else m_fAccelerate = -m_fBrake*0.3f; m_fSteeringLeftRight += (-CPad::GetPad(pad)->GetSteeringLeftRight()/128.0f - m_fSteeringLeftRight)*0.2f; - m_fSteeringLeftRight = clamp(m_fSteeringLeftRight, -1.0f, 1.0f); + m_fSteeringLeftRight = Clamp(m_fSteeringLeftRight, -1.0f, 1.0f); float steeringSq = m_fSteeringLeftRight < 0.0f ? -SQR(m_fSteeringLeftRight) : SQR(m_fSteeringLeftRight); m_fSteerAngle = pHandling->fSteeringLock * DEGTORAD(steeringSq); @@ -1063,7 +1064,7 @@ CBoat::PreRender(void) rot = CGeneral::LimitRadianAngle(rot); if(rot > HALFPI) rot = PI; else if(rot < -HALFPI) rot = -PI; - rot = clamp(rot, -DEGTORAD(63.0f), DEGTORAD(63.0f)); + rot = Clamp(rot, -DEGTORAD(63.0f), DEGTORAD(63.0f)); m_fMovingSpeed += (0.008f * CWeather::Wind + 0.002f) * rot; m_fMovingSpeed *= Pow(0.9985f, CTimer::GetTimeStep())/(500.0f*SQR(m_fMovingSpeed) + 1.0f); diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 78e67d49..29d0c5c7 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -17,6 +17,7 @@ #include "World.h" #include "Zones.h" #include "Occlusion.h" +#include "SaveBuf.h" uint8 CTheCarGenerators::ProcessCounter; uint32 CTheCarGenerators::NumOfCarGenerators; @@ -292,14 +293,17 @@ void CTheCarGenerators::LoadAllCarGenerators(uint8* buffer, uint32 size) Init(); INITSAVEBUF CheckSaveHeader(buffer, 'C','G','N','\0', size - SAVE_HEADER_SIZE); - assert(ReadSaveBuf<uint32>(buffer) == nGeneralDataSize); - NumOfCarGenerators = ReadSaveBuf<uint32>(buffer); - CurrentActiveCount = ReadSaveBuf<uint32>(buffer); - ProcessCounter = ReadSaveBuf<uint8>(buffer); - GenerateEvenIfPlayerIsCloseCounter = ReadSaveBuf<uint8>(buffer); - ReadSaveBuf<int16>(buffer); // alignment - assert(ReadSaveBuf<uint32>(buffer) == sizeof(CarGeneratorArray)); + uint32 tmp; + ReadSaveBuf(&tmp, buffer); + assert(tmp == nGeneralDataSize); + ReadSaveBuf(&NumOfCarGenerators, buffer); + ReadSaveBuf(&CurrentActiveCount, buffer); + ReadSaveBuf(&ProcessCounter, buffer); + ReadSaveBuf(&GenerateEvenIfPlayerIsCloseCounter, buffer); + SkipSaveBuf(buffer, 2); + ReadSaveBuf(&tmp, buffer); + assert(tmp == sizeof(CarGeneratorArray)); for (int i = 0; i < NUM_CARGENS; i++) - CarGeneratorArray[i] = ReadSaveBuf<CCarGenerator>(buffer); + ReadSaveBuf(&CarGeneratorArray[i], buffer); VALIDATESAVEBUF(size) } diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp index b5926867..f217f055 100644 --- a/src/vehicles/Cranes.cpp +++ b/src/vehicles/Cranes.cpp @@ -11,6 +11,7 @@ #include "Replay.h" #include "Object.h" #include "World.h" +#include "SaveBuf.h" #define MAX_DISTANCE_TO_FIND_CRANE (10.0f) #define CRANE_UPDATE_RADIUS (300.0f) @@ -641,10 +642,10 @@ void CCranes::Load(uint8* buf, uint32 size) { INITSAVEBUF - NumCranes = ReadSaveBuf<int32>(buf); - CarsCollectedMilitaryCrane = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&NumCranes, buf); + ReadSaveBuf(&CarsCollectedMilitaryCrane, buf); for (int i = 0; i < NUM_CRANES; i++) - aCranes[i] = ReadSaveBuf<CCrane>(buf); + ReadSaveBuf(&aCranes[i], buf); for (int i = 0; i < NUM_CRANES; i++) { CCrane *pCrane = &aCranes[i]; if (pCrane->m_pCraneEntity != nil) diff --git a/src/vehicles/Door.cpp b/src/vehicles/Door.cpp index c80965aa..1b3f9e8f 100644 --- a/src/vehicles/Door.cpp +++ b/src/vehicles/Door.cpp @@ -52,11 +52,11 @@ CDoor::Process(CVehicle *vehicle) fSpeedDiff = vecSpeedDiff.y - vecSpeedDiff.x; break; } - fSpeedDiff = clamp(fSpeedDiff, -0.2f, 0.2f); + fSpeedDiff = Clamp(fSpeedDiff, -0.2f, 0.2f); if(Abs(fSpeedDiff) > 0.002f) m_fAngVel += fSpeedDiff; m_fAngVel *= 0.945f; - m_fAngVel = clamp(m_fAngVel, -0.3f, 0.3f); + m_fAngVel = Clamp(m_fAngVel, -0.3f, 0.3f); m_fAngle += m_fAngVel; m_nDoorState = DOORST_SWINGING; diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp index bf14416c..f51c8481 100644 --- a/src/vehicles/Heli.cpp +++ b/src/vehicles/Heli.cpp @@ -260,7 +260,7 @@ CHeli::ProcessControl(void) // Move up if too low if(GetPosition().z - 2.0f < groundZ && m_heliStatus != HELI_STATUS_SHOT_DOWN) m_vecMoveSpeed.z += CTimer::GetTimeStep()*0.01f; - m_vecMoveSpeed.z = clamp(m_vecMoveSpeed.z, -0.3f, 0.3f); + m_vecMoveSpeed.z = Clamp(m_vecMoveSpeed.z, -0.3f, 0.3f); } float fTargetDist = vTargetDist.Magnitude(); diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp index 48f7b8c0..0b40ca7e 100644 --- a/src/vehicles/Plane.cpp +++ b/src/vehicles/Plane.cpp @@ -123,7 +123,7 @@ void CPlane::DeleteRwObject(void) { if(m_rwObject && RwObjectGetType(m_rwObject) == rpATOMIC){ - m_matrix.Detach(); + GetMatrix().Detach(); if(RwObjectGetType(m_rwObject) == rpATOMIC){ // useless check RwFrame *f = RpAtomicGetFrame((RpAtomic*)m_rwObject); RpAtomicDestroy((RpAtomic*)m_rwObject); @@ -567,13 +567,13 @@ CPlane::ProcessControl(void) m_rwObject = CModelInfo::GetModelInfo(mi->m_planeLodId)->CreateInstance(); POP_MEMID(); if(m_rwObject) - m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject))); + GetMatrix().AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject))); } } }else if(CStreaming::HasModelLoaded(GetModelIndex())){ if(m_rwObject && RwObjectGetType(m_rwObject) == rpATOMIC){ // Get rid of LOD model - m_matrix.Detach(); + GetMatrix().Detach(); if(m_rwObject){ // useless check if(RwObjectGetType(m_rwObject) == rpATOMIC){ // useless check RwFrame *f = RpAtomicGetFrame((RpAtomic*)m_rwObject); diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 4e6c24ef..932f4fbc 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -32,6 +32,7 @@ #include "Timecycle.h" #include "Weather.h" #include "Coronas.h" +#include "SaveBuf.h" bool CVehicle::bWheelsOnlyCheat; bool CVehicle::bAllDodosCheat; @@ -50,10 +51,10 @@ bool CVehicle::bDisableRemoteDetonationOnContact; bool CVehicle::m_bDisplayHandlingInfo; #endif -void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); } -void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); } -void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); } -void CVehicle::operator delete(void *p, int handle) { CPools::GetVehiclePool()->Delete((CVehicle*)p); } +void *CVehicle::operator new(size_t sz) throw() { return CPools::GetVehiclePool()->New(); } +void *CVehicle::operator new(size_t sz, int handle) throw() { return CPools::GetVehiclePool()->New(handle); } +void CVehicle::operator delete(void *p, size_t sz) throw() { CPools::GetVehiclePool()->Delete((CVehicle*)p); } +void CVehicle::operator delete(void *p, int handle) throw() { CPools::GetVehiclePool()->Delete((CVehicle*)p); } #ifdef FIX_BUGS // I think they meant that @@ -151,7 +152,7 @@ CVehicle::CVehicle(uint8 CreatedBy) m_fMapObjectHeightAhead = m_fMapObjectHeightBehind = 0.0f; m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this); if(m_audioEntityId >= 0) - DMAudio.SetEntityStatus(m_audioEntityId, true); + DMAudio.SetEntityStatus(m_audioEntityId, TRUE); //m_nRadioStation = CGeneral::GetRandomNumber() % NUM_RADIOS; switch(GetModelIndex()){ case MI_HUNTER: @@ -478,11 +479,11 @@ CVehicle::FlyingControl(eFlightModel flightModel) ApplyMoveForce(GRAVITY * GetUp() * fThrust * m_fMass * CTimer::GetTimeStep()); if (GetUp().z > 0.0f){ - float upRight = clamp(GetRight().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); + float upRight = Clamp(GetRight().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep(); ApplyTurnForce(upImpulseRight * GetUp(), GetRight()); - float upFwd = clamp(GetForward().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); + float upFwd = Clamp(GetForward().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep(); ApplyTurnForce(upImpulseFwd * GetUp(), GetForward()); }else{ @@ -521,8 +522,8 @@ CVehicle::FlyingControl(eFlightModel flightModel) fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f; if (CPad::GetPad(0)->GetHorn()) { fYaw = 0.0f; - fPitch = clamp(flyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f); - fRoll = clamp(flyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f); + fPitch = Clamp(flyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f); + fRoll = Clamp(flyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f); } ApplyTurnForce(fPitch * GetUp() * flyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward()); ApplyTurnForce(fRoll * GetUp() * flyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight()); @@ -811,11 +812,12 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon if(contactSpeedRight != 0.0f){ // exert opposing force right = -contactSpeedRight/wheelsOnGround; -#ifdef FIX_BUGS + // BUG? // contactSpeedRight is independent of framerate but right has timestep as a factor // so we probably have to fix this - right *= CTimer::GetTimeStepFix(); -#endif + // fixing this causes jittery cars at 15fps, and causes the car to move backwards slowly at 18fps + // at 19fps, the effects are gone ... + //right *= CTimer::GetTimeStepFix(); if(wheelStatus == WHEEL_STATUS_BURST){ float fwdspeed = Min(contactSpeedFwd, fBurstSpeedMax); @@ -2161,9 +2163,9 @@ CVehicle::HeliDustGenerate(CEntity *heli, float radius, float ground, int rnd) float red = (0.3*CTimeCycle::GetDirectionalRed() + CTimeCycle::GetAmbientRed_Obj())*255.0f/4.0f; float green = (0.3*CTimeCycle::GetDirectionalGreen() + CTimeCycle::GetAmbientGreen_Obj())*255.0f/4.0f; float blue = (0.3*CTimeCycle::GetDirectionalBlue() + CTimeCycle::GetAmbientBlue_Obj())*255.0f/4.0f; - r = clamp(red, 0.0f, 255.0f); - g = clamp(green, 0.0f, 255.0f); - b = clamp(blue, 0.0f, 255.0f); + r = Clamp(red, 0.0f, 255.0f); + g = Clamp(green, 0.0f, 255.0f); + b = Clamp(blue, 0.0f, 255.0f); RwRGBA col1 = { r, g, b, (RwUInt8)CGeneral::GetRandomNumberInRange(8, 32) }; RwRGBA col2 = { 255, 255, 255, 32 }; @@ -2426,43 +2428,44 @@ CVehicle::Load(uint8*& buf) { CMatrix tmp; SkipSaveBuf(buf, 4); - tmp.GetRight().x = ReadSaveBuf<float>(buf); - tmp.GetRight().y = ReadSaveBuf<float>(buf); - tmp.GetRight().z = ReadSaveBuf<float>(buf); + ReadSaveBuf(&tmp.GetRight().x, buf); + ReadSaveBuf(&tmp.GetRight().y, buf); + ReadSaveBuf(&tmp.GetRight().z, buf); SkipSaveBuf(buf, 4); - tmp.GetForward().x = ReadSaveBuf<float>(buf); - tmp.GetForward().y = ReadSaveBuf<float>(buf); - tmp.GetForward().z = ReadSaveBuf<float>(buf); + ReadSaveBuf(&tmp.GetForward().x, buf); + ReadSaveBuf(&tmp.GetForward().y, buf); + ReadSaveBuf(&tmp.GetForward().z, buf); SkipSaveBuf(buf, 4); - tmp.GetUp().x = ReadSaveBuf<float>(buf); - tmp.GetUp().y = ReadSaveBuf<float>(buf); - tmp.GetUp().z = ReadSaveBuf<float>(buf); + ReadSaveBuf(&tmp.GetUp().x, buf); + ReadSaveBuf(&tmp.GetUp().y, buf); + ReadSaveBuf(&tmp.GetUp().z, buf); SkipSaveBuf(buf, 4); - tmp.GetPosition().x = ReadSaveBuf<float>(buf); - tmp.GetPosition().y = ReadSaveBuf<float>(buf); - tmp.GetPosition().z = ReadSaveBuf<float>(buf); + ReadSaveBuf(&tmp.GetPosition().x, buf); + ReadSaveBuf(&tmp.GetPosition().y, buf); + ReadSaveBuf(&tmp.GetPosition().z, buf); m_matrix = tmp; SkipSaveBuf(buf, 16); LoadEntityFlags(buf); SkipSaveBuf(buf, 208); AutoPilot.Load(buf); - m_currentColour1 = ReadSaveBuf<int8>(buf); - m_currentColour2 = ReadSaveBuf<int8>(buf); + ReadSaveBuf(&m_currentColour1, buf); + ReadSaveBuf(&m_currentColour2, buf); SkipSaveBuf(buf, 2); - m_nAlarmState = ReadSaveBuf<int16>(buf); + ReadSaveBuf(&m_nAlarmState, buf); SkipSaveBuf(buf, 42); - m_nNumMaxPassengers = ReadSaveBuf<int8>(buf); + ReadSaveBuf(&m_nNumMaxPassengers, buf); SkipSaveBuf(buf, 3); - field_1D0[0] = ReadSaveBuf<float>(buf); - field_1D0[1] = ReadSaveBuf<float>(buf); - field_1D0[2] = ReadSaveBuf<float>(buf); - field_1D0[3] = ReadSaveBuf<float>(buf); + ReadSaveBuf(&field_1D0[0], buf); + ReadSaveBuf(&field_1D0[1], buf); + ReadSaveBuf(&field_1D0[2], buf); + ReadSaveBuf(&field_1D0[3], buf); SkipSaveBuf(buf, 8); - m_fSteerAngle = ReadSaveBuf<float>(buf); - m_fGasPedal = ReadSaveBuf<float>(buf); - m_fBrakePedal = ReadSaveBuf<float>(buf); - VehicleCreatedBy = ReadSaveBuf<uint8>(buf); - uint8 flags = ReadSaveBuf<uint8>(buf); + ReadSaveBuf(&m_fSteerAngle, buf); + ReadSaveBuf(&m_fGasPedal, buf); + ReadSaveBuf(&m_fBrakePedal, buf); + ReadSaveBuf(&VehicleCreatedBy, buf); + uint8 flags; + ReadSaveBuf(&flags, buf); bIsLawEnforcer = !!(flags & BIT(0)); bIsLocked = !!(flags & BIT(3)); bEngineOn = !!(flags & BIT(4)); @@ -2470,16 +2473,17 @@ CVehicle::Load(uint8*& buf) bLightsOn = !!(flags & BIT(6)); bFreebies = !!(flags & BIT(7)); SkipSaveBuf(buf, 10); - m_fHealth = ReadSaveBuf<float>(buf); - m_nCurrentGear = ReadSaveBuf<uint8>(buf); + ReadSaveBuf(&m_fHealth, buf); + ReadSaveBuf(&m_nCurrentGear, buf); SkipSaveBuf(buf, 3); - m_fChangeGearTime = ReadSaveBuf<float>(buf); + ReadSaveBuf(&m_fChangeGearTime, buf); SkipSaveBuf(buf, 12); - m_nTimeOfDeath = ReadSaveBuf<uint32>(buf); + ReadSaveBuf(&m_nTimeOfDeath, buf); SkipSaveBuf(buf, 2); - m_nBombTimer = ReadSaveBuf<int16>(buf); + ReadSaveBuf(&m_nBombTimer, buf); SkipSaveBuf(buf, 12); - m_nDoorLock = (eCarLock)ReadSaveBuf<int8>(buf); + ReadSaveBuf(&flags, buf); + m_nDoorLock = (eCarLock)flags; SkipSaveBuf(buf, 111); } #endif diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 2fb2caf4..37b57944 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -278,10 +278,10 @@ public: float m_fSteerInput; uint8 m_vehType; - static void *operator new(size_t); - static void *operator new(size_t sz, int slot); - static void operator delete(void*, size_t); - static void operator delete(void*, int); + static void *operator new(size_t) throw(); + static void *operator new(size_t sz, int slot) throw(); + static void operator delete(void*, size_t) throw(); + static void operator delete(void*, int) throw(); CVehicle(void) {} // FAKE CVehicle(uint8 CreatedBy); diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp index 74137dc0..078f01fa 100644 --- a/src/weapons/Explosion.cpp +++ b/src/weapons/Explosion.cpp @@ -37,7 +37,7 @@ CExplosion::Initialise() ClearAllExplosions(); AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1); if (AudioHandle >= 0) - DMAudio.SetEntityStatus(AudioHandle, true); + DMAudio.SetEntityStatus(AudioHandle, TRUE); debug("CExplosion ready\n"); } diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 7a54941f..46ca4cc8 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -35,6 +35,7 @@ #include "Glass.h" #include "Sprite.h" #include "Pickups.h" +#include "SaveBuf.h" float fReloadAnimSampleFraction[5] = { 0.5f, 0.7f, 0.75f, 0.75f, 0.7f }; float fSeaSparrowAimingAngle = 10.0f; @@ -251,7 +252,7 @@ CWeapon::Fire(CEntity *shooter, CVector *fireSource) else if ( shooter->IsPed() && ((CPed*)shooter)->m_pSeekTarget != nil ) { float distToTarget = (shooter->GetPosition() - ((CPed*)shooter)->m_pSeekTarget->GetPosition()).Magnitude(); - float power = clamp((distToTarget-10.0f)*0.02f, 0.2f, 1.0f); + float power = Clamp((distToTarget-10.0f)*0.02f, 0.2f, 1.0f); fired = FireProjectile(shooter, source, power); } @@ -1066,7 +1067,11 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource) if ( info->m_nFiringRate >= 50 || !(++counter & 1) ) { +#ifdef FIX_BUGS + AddGunFlashBigGuns(*fireSource, target); +#else AddGunFlashBigGuns(*fireSource, *fireSource + target); +#endif CVector gunshellPos = *fireSource; gunshellPos -= CVector(0.65f*ahead.x, 0.65f*ahead.y, 0.0f); |