summaryrefslogtreecommitdiff
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp1367
1 files changed, 683 insertions, 684 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 38836c3c..4de98327 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -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;
}
@@ -261,7 +261,7 @@ cAudioManager::ProcessReverb() const
if (SampleManager.UpdateReverb() && m_bDynamicAcousticModelingStatus) {
for (uint32 i = 0; i < numChannels; i++) {
if (m_asActiveSamples[i].m_bReverbFlag)
- SampleManager.SetChannelReverbFlag(i, true);
+ SampleManager.SetChannelReverbFlag(i, TRUE);
}
}
}
@@ -274,11 +274,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;
}
}
@@ -362,56 +362,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 +421,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;
@@ -722,9 +722,9 @@ const eSfxSample aEngineSounds[][2] = {
{ SFX_CAR_IDLE_UNUSED4, SFX_CAR_REV_UNUSED4 },
};
-bool bPlayerJustEnteredCar;
+bool8 bPlayerJustEnteredCar;
-const bool hornPatternsArray[8][44] = {
+const bool8 hornPatternsArray[8][44] = {
{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, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false},
{false, false, true, true, true, false, false, false, false, true, true, true, true, false, false, false, false, true, true, true, true, false,
@@ -759,7 +759,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;
@@ -891,7 +891,7 @@ 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;
@@ -900,15 +900,15 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -918,10 +918,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) {
@@ -944,7 +944,7 @@ 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;
@@ -953,14 +953,14 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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
@@ -975,14 +975,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;
@@ -1008,7 +1008,7 @@ 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;
@@ -1017,10 +1017,10 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -1039,11 +1039,11 @@ 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));
}
@@ -1073,7 +1073,7 @@ 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;
@@ -1082,9 +1082,9 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -1105,7 +1105,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
static uint32 prevFreq = 22050;
uint32 freq;
- bool isPlayerVeh;
+ bool8 isPlayerVeh;
int16 acceletateState;
int16 brakeState;
@@ -1113,7 +1113,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;
@@ -1136,7 +1136,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
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;
@@ -1145,17 +1145,17 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -1168,10 +1168,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;
@@ -1184,7 +1184,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) {
@@ -1194,7 +1194,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;
@@ -1212,18 +1212,18 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -1236,7 +1236,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;
@@ -1249,7 +1249,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) {
@@ -1261,7 +1261,7 @@ 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);
@@ -1272,15 +1272,15 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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
@@ -1305,11 +1305,11 @@ 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;
@@ -1331,12 +1331,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;
@@ -1363,7 +1363,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 {
@@ -1487,7 +1487,7 @@ 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_TRUCK || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_TRUCK)
m_sQueueSample.m_nFrequency /= 2;
@@ -1497,10 +1497,10 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -1526,7 +1526,7 @@ void
cAudioManager::PlayerJustGotInCar() const
{
if (m_bIsInitialised)
- bPlayerJustEnteredCar = true;
+ bPlayerJustEnteredCar = TRUE;
}
void
@@ -1536,7 +1536,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) {
@@ -1547,7 +1547,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) {
@@ -1561,9 +1561,9 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -1578,7 +1578,7 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
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;
@@ -1588,9 +1588,9 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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)) {
@@ -1599,7 +1599,7 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
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;
@@ -1609,9 +1609,9 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -1648,32 +1648,32 @@ 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));
@@ -1729,26 +1729,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:
@@ -1771,7 +1771,6 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
engineSoundType = aVehicleSettings[params.m_nIndex].m_nBank;
soundOffset = gBankStartOffset[engineSoundType] - gBankStartOffset[CAR_SFX_BANKS_OFFSET];
//soundOffset = 3 * (engineSoundType - CAR_SFX_BANKS_OFFSET);
- noGearBox = false;
switch (engineSoundType) {
case SFX_BANK_PONTIAC:
gearSoundLength = 2526;
@@ -1816,7 +1815,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
gearSoundLength = 2410;
break;
default:
- noGearBox = true;
+ noGearBox = TRUE;
break;
}
if (!channelUsed || nCruising || noGearBox) {
@@ -1824,7 +1823,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
} else {
gearSoundLength -= 1000;
if (CTimer::GetTimeInMilliseconds() - gearSoundStartTime > gearSoundLength) {
- channelUsed = false;
+ channelUsed = FALSE;
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
}
}
@@ -1848,7 +1847,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
if (params.m_fVelocityChange < -0.001f) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
if (wheelsOnGround == 0 || params.m_pVehicle->bIsHandbrakeOn || lostTraction)
gasPedalAudio = *gasPedalAudioPtr;
@@ -1860,7 +1859,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
} else if (LastAccel > 0) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
nCruising = 0;
if (wheelsOnGround == 0
@@ -1881,7 +1880,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;
@@ -1921,7 +1920,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
if (params.m_pVehicle->bIsDrowning)
vol /= 4;
@@ -1931,8 +1930,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
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);
@@ -1943,12 +1942,12 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else if (processedAccelSampleStopped) {
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
- params.m_pVehicle->bAudioChangingGear = true;
+ params.m_pVehicle->bAudioChangingGear = TRUE;
if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
return;
SampleManager.SetChannelLoopCount(m_nActiveSamples, 1);
@@ -1962,13 +1961,13 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else if (CurrentPretendGear < params.m_pTransmission->nNumberOfGears - 1) {
++CurrentPretendGear;
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
- params.m_pVehicle->bAudioChangingGear = true;
+ params.m_pVehicle->bAudioChangingGear = TRUE;
if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
return;
SampleManager.SetChannelLoopCount(m_nActiveSamples, 1);
@@ -1982,7 +1981,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else {
@@ -1992,7 +1991,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
}
} else {
PlayCruising:
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
SampleManager.StopChannel(m_nActiveSamples);
if (isMoped || accelerateState >= 150 && wheelsOnGround && brakeState <= 0 && !params.m_pVehicle->bIsHandbrakeOn
&& !lostTraction && currentGear >= params.m_pTransmission->nNumberOfGears - 1) {
@@ -2005,7 +2004,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;
}
@@ -2017,7 +2016,7 @@ PlayCruising:
return;
}
-bool
+bool8
cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2036,7 +2035,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;
@@ -2054,10 +2053,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++) {
@@ -2099,7 +2098,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:
@@ -2119,7 +2118,7 @@ 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;
@@ -2127,14 +2126,14 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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
@@ -2183,7 +2182,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;
@@ -2192,17 +2191,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) {
@@ -2211,7 +2210,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);
@@ -2221,7 +2220,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;
@@ -2234,31 +2233,31 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -2267,18 +2266,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);
@@ -2288,7 +2287,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)
@@ -2308,7 +2307,7 @@ 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;
@@ -2316,22 +2315,22 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -2340,7 +2339,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);
@@ -2350,7 +2349,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;
@@ -2363,17 +2362,17 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -2384,7 +2383,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);
@@ -2401,7 +2400,7 @@ 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;
@@ -2409,19 +2408,19 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -2429,14 +2428,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;
@@ -2447,7 +2446,7 @@ 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;
@@ -2455,23 +2454,23 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -2480,11 +2479,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) {
@@ -2505,24 +2504,24 @@ 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);
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;
@@ -2531,7 +2530,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:
@@ -2542,7 +2541,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) {
@@ -2552,7 +2551,7 @@ 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;
@@ -2561,15 +2560,15 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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
@@ -2579,15 +2578,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:
@@ -2630,7 +2629,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:
@@ -2670,7 +2669,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: {
@@ -2745,7 +2744,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: {
@@ -2790,7 +2789,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;
@@ -2875,7 +2874,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: {
@@ -2888,7 +2887,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;
}
@@ -2970,8 +2969,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:
{
@@ -3024,7 +3023,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;
}
}
@@ -3056,7 +3055,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;
@@ -3070,7 +3069,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;
@@ -3097,7 +3096,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;
}
@@ -3115,7 +3114,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: {
@@ -3145,18 +3144,18 @@ 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);
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;
@@ -3167,14 +3166,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();
@@ -3198,7 +3197,7 @@ AddSample:
}
#ifdef GTA_TRAIN
-bool
+bool8
cAudioManager::ProcessTrainNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 140.0f;
@@ -3208,7 +3207,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);
@@ -3221,7 +3220,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nCounter = 32;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN;
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);
m_sQueueSample.m_nLoopCount = 0;
@@ -3230,10 +3229,10 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3261,16 +3260,16 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
// }
//}
}
- 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;
@@ -3279,7 +3278,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;
@@ -3301,7 +3300,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
case MI_JETMAX:
freqModificator = 6000.0f;
volModificator = 60.0f;
- isV12 = true;
+ isV12 = TRUE;
BaseFreq = 9000;
BaseVol = 20;
break;
@@ -3319,18 +3318,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);
@@ -3368,7 +3367,7 @@ 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;
@@ -3376,10 +3375,10 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3393,7 +3392,7 @@ 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;
@@ -3401,10 +3400,10 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3412,12 +3411,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;
@@ -3425,11 +3424,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);
@@ -3440,7 +3439,7 @@ 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;
@@ -3449,14 +3448,14 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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
@@ -3476,12 +3475,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;
@@ -3489,7 +3488,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
boat = nil;
automobile = nil;
- hunterBool = false;
+ hunterBool = FALSE;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
return;
@@ -3545,7 +3544,7 @@ 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;
@@ -3553,10 +3552,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3573,7 +3572,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;
}
@@ -3586,7 +3585,7 @@ 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;
@@ -3594,10 +3593,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -3612,7 +3611,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
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;
@@ -3620,16 +3619,16 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -3637,10 +3636,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3674,7 +3673,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
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;
@@ -3682,10 +3681,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
@@ -3708,7 +3707,7 @@ 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;
@@ -3716,10 +3715,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3744,7 +3743,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
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;
@@ -3752,10 +3751,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3770,7 +3769,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
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;
+ 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);
@@ -3779,7 +3778,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
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_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000;
m_sQueueSample.m_nLoopCount = 0;
@@ -3788,10 +3787,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3809,7 +3808,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
CAutomobile* automobile;
CBike* bike;
- bool wheelBurst;
+ bool8 wheelBurst;
uint8 emittingVol;
float modifier;
@@ -3820,19 +3819,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;
@@ -3847,7 +3846,7 @@ 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;
@@ -3857,10 +3856,10 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -3999,12 +3998,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);
@@ -4016,7 +4015,7 @@ 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;
@@ -4025,22 +4024,22 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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);
@@ -4048,7 +4047,7 @@ 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;
@@ -4057,21 +4056,21 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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);
@@ -4079,7 +4078,7 @@ 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;
@@ -4088,20 +4087,20 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -4109,7 +4108,7 @@ 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;
@@ -4118,21 +4117,21 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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);
@@ -4140,7 +4139,7 @@ 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;
@@ -4149,11 +4148,11 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -4161,7 +4160,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nOffset = MAX_VOLUME;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
int32
@@ -4199,7 +4198,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);
@@ -4213,9 +4212,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
CPed *ped = params.m_pPed;
- bool narrowSoundRange;
+ bool8 narrowSoundRange;
int16 sound;
- bool stereo;
+ bool8 stereo;
CWeapon *weapon;
float maxDist = 0.f; // uninitialized variable
@@ -4224,9 +4223,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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:
@@ -4303,9 +4302,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
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_FALL_LAND:
case SOUND_FALL_COLLAPSE:
@@ -4331,9 +4330,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
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_FIGHT_37:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
@@ -4419,7 +4418,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
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;
@@ -4430,9 +4429,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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:
@@ -4465,7 +4464,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
}
}
@@ -4476,7 +4475,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -4486,9 +4485,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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_IDLE:
@@ -4511,8 +4510,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_IDLE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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_ATTACK:
@@ -4535,8 +4534,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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:
@@ -4561,8 +4560,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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:
@@ -4575,7 +4574,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -4587,16 +4586,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -4608,16 +4607,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -4629,17 +4628,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -4651,16 +4650,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -4672,16 +4671,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -4692,16 +4691,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -4713,15 +4712,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -4732,15 +4731,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -4752,15 +4751,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -4771,15 +4770,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -4791,16 +4790,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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
@@ -4815,10 +4814,10 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -4834,17 +4833,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
@@ -4856,9 +4855,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -4903,7 +4902,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
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;
@@ -4914,9 +4913,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
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:
{
@@ -4948,7 +4947,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
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;
@@ -4979,9 +4978,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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:
@@ -4999,14 +4998,14 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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;
@@ -5018,8 +5017,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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)
@@ -5028,7 +5027,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -5039,9 +5038,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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:
{
@@ -5061,7 +5060,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
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;
@@ -5076,9 +5075,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
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_SKATING:
@@ -5089,7 +5088,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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)
@@ -5103,9 +5102,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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:
@@ -5122,8 +5121,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_LEFT);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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:
@@ -5140,8 +5139,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_RIGHT);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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:
@@ -5158,9 +5157,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
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) {
@@ -5201,8 +5200,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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;
}
}
@@ -5220,13 +5219,13 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -5247,7 +5246,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
void
-cAudioManager::SetPedTalkingStatus(CPed *ped, uint8 status)
+cAudioManager::SetPedTalkingStatus(CPed *ped, bool8 status)
{
if (ped != nil)
ped->m_canTalk = status;
@@ -5275,12 +5274,12 @@ cAudioManager::SetupPedComments(cPedParams &params, 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;
@@ -7821,7 +7820,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_MALE_DEATH_01, 28); break;
case SOUND_PED_BULLET_HIT:
@@ -7886,7 +7885,7 @@ cPedComments::Process()
uint32 sampleIndex;
uint8 actualUsedBank;
tPedComment *comment;
- bool prevUsed = false;
+ bool8 prevUsed = FALSE;
static uint8 counter = 0;
static int32 prevSamples[10];
@@ -7897,7 +7896,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;
}
}
@@ -7922,14 +7921,14 @@ cPedComments::Process()
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 >= SFX_TONI_ANGRY_BUSTED_01 && sampleIndex <= SFX_TONI_WISECRACKING_SHOOT_26) { // check if player sfx
- AudioManager.m_sQueueSample.m_bIs2D = true;
+ AudioManager.m_sQueueSample.m_bIs2D = TRUE;
AudioManager.m_sQueueSample.m_nOffset = 63;
}
#endif // FIX_BUGS
@@ -7942,7 +7941,7 @@ cPedComments::Process()
AudioManager.AddSampleToRequestedQueue();
#if defined(GTA_PC) && !defined(FIX_BUGS)
m_nDelayTimer = CTimer::GetTimeInMilliseconds();
- m_bDelay = true;
+ m_bDelay = TRUE;
#endif
}
}
@@ -7970,7 +7969,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
}
@@ -8000,7 +7999,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;
@@ -8008,7 +8007,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:
@@ -8017,7 +8016,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;
@@ -8037,13 +8036,13 @@ 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;
+ m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -8104,19 +8103,19 @@ 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;
+ 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) {
@@ -8128,14 +8127,14 @@ 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;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8164,14 +8163,14 @@ 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;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8244,14 +8243,14 @@ 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;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8296,8 +8295,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;
@@ -8308,8 +8307,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:
@@ -8322,7 +8321,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:
@@ -8333,8 +8332,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:
{
@@ -8358,8 +8357,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;
@@ -8380,7 +8379,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;
@@ -8390,7 +8389,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;
@@ -8400,8 +8399,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;
@@ -8410,7 +8409,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:
@@ -8420,8 +8419,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:
@@ -8431,8 +8430,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:
@@ -8443,8 +8442,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:
@@ -8455,8 +8454,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:
@@ -8467,8 +8466,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:
@@ -8504,7 +8503,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:
@@ -8514,7 +8513,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:
@@ -8528,11 +8527,11 @@ 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;
+ m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -8554,7 +8553,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:
@@ -8566,7 +8565,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;
@@ -8577,7 +8576,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;
@@ -8588,7 +8587,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;
@@ -8599,7 +8598,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;
@@ -8610,7 +8609,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;
@@ -8621,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_BAR_4:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_4;
@@ -8632,7 +8631,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;
@@ -8645,7 +8644,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;
@@ -8658,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_BUILDING_MALIBU_3:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return;
@@ -8671,7 +8670,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;
@@ -8684,7 +8683,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;
@@ -8697,7 +8696,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;
@@ -8710,7 +8709,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;
@@ -8721,7 +8720,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;
@@ -8732,7 +8731,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;
}
@@ -8743,14 +8742,14 @@ 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;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8788,14 +8787,14 @@ 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;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
if (CWeather::Rain > 0.0f && (!CCullZones::CamNoRain() || !CCullZones::PlayerNoRain())) {
@@ -8806,15 +8805,15 @@ 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;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
x = 0.0f;
@@ -8831,15 +8830,15 @@ 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;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
CObject::fDistToNearestTree = 999999.9f;
}
@@ -8848,11 +8847,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;
@@ -8861,11 +8860,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;
@@ -8877,9 +8876,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:
@@ -8887,8 +8886,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:
@@ -8896,60 +8895,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_FE_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;
@@ -8987,7 +8986,7 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nSampleIndex = SFX_FE_BACK;
break;
case SOUND_FRONTEND_FAIL:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT;
break;
case SOUND_FRONTEND_AUDIO_TEST:
@@ -9026,10 +9025,10 @@ 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;
@@ -9052,8 +9051,8 @@ cAudioManager::ProcessFrontEnd()
}
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;
@@ -9076,7 +9075,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) {
@@ -9091,7 +9090,7 @@ 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;
@@ -9100,10 +9099,10 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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) {
@@ -9111,9 +9110,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();
}
}
@@ -9167,14 +9166,14 @@ 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;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -9192,7 +9191,7 @@ cAudioManager::ProcessGarages()
uint32 sampleIndex;
uint8 j;
float distSquared;
- bool distCalculated;
+ bool8 distCalculated;
static uint8 iSound = 32;
@@ -9203,7 +9202,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;
@@ -9223,7 +9222,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;
@@ -9235,7 +9234,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;
@@ -9244,19 +9243,19 @@ 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);
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;
@@ -9285,16 +9284,16 @@ 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;
m_sQueueSample.m_nCounter = iSound++;
if (iSound < 32)
iSound = 32;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -9312,7 +9311,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);
@@ -9326,13 +9325,13 @@ 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);
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();
@@ -9347,7 +9346,7 @@ void
cAudioManager::ProcessBridge()
{
float dist;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
if (CBridge::pLiftRoad) {
m_sQueueSample.m_vecPos = CBridge::pLiftRoad->GetPosition();
@@ -9383,7 +9382,7 @@ 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;
@@ -9392,10 +9391,10 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}*/
@@ -9410,7 +9409,7 @@ 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;
@@ -9419,9 +9418,9 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(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();
}
}
@@ -9445,7 +9444,7 @@ 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;
@@ -9454,9 +9453,9 @@ cAudioManager::ProcessBridgeOneShots()
m_sQueueSample.m_nLoopEnd = -1;
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();
}
}
@@ -9465,7 +9464,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;
@@ -11354,10 +11353,10 @@ FindMissionAudioSfx(const char *name)
return NO_SAMPLE;
}
-bool
+bool8
cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
{
- return false;
+ return FALSE;
}
// LCS: mission audio turns from streamed to sampled
@@ -11371,13 +11370,13 @@ 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] = m_nTimeSpent * SampleManager.GetSampleLength(missionAudioSfx) / SampleManager.GetSampleBaseFrequency(missionAudioSfx);
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;
}
}
}
@@ -11395,7 +11394,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);
}
}
@@ -11405,25 +11404,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 };
@@ -11431,14 +11430,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 };
@@ -11453,11 +11452,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);
SampleManager.StopChannel(slot + 29);
}
@@ -11619,7 +11618,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
break;
nCheckPlayingDelay[slot] = 0;
}
- m_sMissionAudio.m_bIsPlaying[slot] = true;
+ m_sMissionAudio.m_bIsPlaying[slot] = TRUE;
}
break;
default:
@@ -11629,7 +11628,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;
}