summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio/AudioCollision.cpp26
-rw-r--r--src/audio/AudioLogic.cpp1144
-rw-r--r--src/audio/AudioManager.cpp98
-rw-r--r--src/audio/AudioManager.h104
-rw-r--r--src/audio/DMAudio.cpp20
-rw-r--r--src/audio/DMAudio.h16
-rw-r--r--src/audio/MusicManager.cpp204
-rw-r--r--src/audio/MusicManager.h42
-rw-r--r--src/audio/PolRadio.cpp56
-rw-r--r--src/audio/sampman.h44
-rw-r--r--src/audio/sampman_miles.cpp282
-rw-r--r--src/audio/sampman_null.cpp56
-rw-r--r--src/audio/sampman_oal.cpp208
-rw-r--r--src/control/Garages.cpp2
-rw-r--r--src/control/Replay.cpp4
-rw-r--r--src/control/Script4.cpp2
-rw-r--r--src/core/Frontend.cpp34
-rw-r--r--src/core/FrontendTriggers.h6
-rw-r--r--src/core/Frontend_PS2.cpp2
-rw-r--r--src/core/World.cpp4
-rw-r--r--src/objects/ParticleObject.cpp2
-rw-r--r--src/peds/Ped.cpp2
-rw-r--r--src/render/Weather.cpp2
-rw-r--r--src/vehicles/Cranes.cpp4
-rw-r--r--src/vehicles/Vehicle.cpp2
-rw-r--r--src/weapons/Explosion.cpp2
26 files changed, 1184 insertions, 1184 deletions
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index 6ce7bbac..0f96cec4 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -166,7 +166,7 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun
m_sQueueSample.m_nCounter = counter;
m_sQueueSample.m_vecPos = col.m_vecPosition;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 7;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -176,10 +176,10 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -307,7 +307,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
if(counter >= 255) counter = 28;
m_sQueueSample.m_vecPos = col.m_vecPosition;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 11;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -315,9 +315,9 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -328,13 +328,13 @@ void
cAudioManager::ServiceCollisions()
{
int i, j;
- bool abRepeatedCollision1[NUMAUDIOCOLLISIONS];
- bool abRepeatedCollision2[NUMAUDIOCOLLISIONS];
+ bool8 abRepeatedCollision1[NUMAUDIOCOLLISIONS];
+ bool8 abRepeatedCollision2[NUMAUDIOCOLLISIONS];
m_sQueueSample.m_nEntityIndex = m_nCollisionEntity;
for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
- abRepeatedCollision1[i] = abRepeatedCollision2[i] = false;
+ abRepeatedCollision1[i] = abRepeatedCollision2[i] = FALSE;
for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
@@ -344,8 +344,8 @@ cAudioManager::ServiceCollisions()
&& (m_sCollisionManager.m_asCollisions1[index].m_bSurface1 == m_sCollisionManager.m_asCollisions2[j].m_bSurface1)
&& (m_sCollisionManager.m_asCollisions1[index].m_bSurface2 == m_sCollisionManager.m_asCollisions2[j].m_bSurface2)
) {
- abRepeatedCollision1[index] = true;
- abRepeatedCollision2[j] = true;
+ abRepeatedCollision1[index] = TRUE;
+ abRepeatedCollision2[j] = TRUE;
m_sCollisionManager.m_asCollisions1[index].m_nBaseVolume = ++m_sCollisionManager.m_asCollisions2[j].m_nBaseVolume;
SetUpLoopingCollisionSound(m_sCollisionManager.m_asCollisions1[index], j);
break;
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index ec364c27..2f173d5e 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -128,38 +128,38 @@ 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);
m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void *)1);
if (m_nBridgeEntity >= 0)
- SetEntityStatus(m_nBridgeEntity, true);
+ SetEntityStatus(m_nBridgeEntity, TRUE);
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying = false;
- m_sMissionAudio.m_bIsPlayed = false;
- m_sMissionAudio.m_bPredefinedProperties = true;
+ m_sMissionAudio.m_bIsPlaying = FALSE;
+ m_sMissionAudio.m_bIsPlayed = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties = TRUE;
m_sMissionAudio.m_nMissionAudioCounter = 0;
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
}
@@ -240,7 +240,7 @@ cAudioManager::ProcessReverb() const
;
i++) {
if (m_asActiveSamples[i].m_bReverbFlag)
- SampleManager.SetChannelReverbFlag(i, true);
+ SampleManager.SetChannelReverbFlag(i, TRUE);
}
}
}
@@ -253,11 +253,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;
}
}
@@ -291,53 +291,53 @@ 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;
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;
case AUDIOTYPE_BRIDGE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessBridge();
}
break;
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;
@@ -347,13 +347,13 @@ 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;
@@ -548,25 +548,25 @@ const tVehicleSampleData aVehicleSettings[MAX_CARS] = {
{SFX_CAR_REV_1, SFX_BANK_PACARD, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, OLD_DOOR}};
-bool bPlayerJustEnteredCar;
-
-const bool hornPatternsArray[8][44] = {
- {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false,
- false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false},
- {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
- true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false},
- {false, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, true, true, true, true, true, false,
- false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false},
- {false, false, true, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true,
- true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false},
- {false, false, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},
- {false, false, true, true, true, false, false, false, true, true, true, false, false, false, false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},
- {false, false, true, true, true, true, false, false, false, false, true, true, true, false, false, true, true, true, false, false, true, true,
- true, true, true, true, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, false, false},
- {false, false, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true, true,
- false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false},
+bool8 bPlayerJustEnteredCar;
+
+const bool8 hornPatternsArray[8][44] = {
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE,
+ FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE},
};
@@ -578,7 +578,7 @@ cAudioManager::ProcessVehicle(CVehicle *veh)
cVehicleParams params;
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);
@@ -677,7 +677,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;
@@ -686,16 +686,16 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = rainOnVehicleIntensity;
- 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;
@@ -706,7 +706,7 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
float modificator;
if (params.m_fDistance >= SQR(reverseGearIntensity))
- return false;
+ return FALSE;
veh = params.m_pVehicle;
if (veh->bEngineOn && (veh->m_fGasPedal < 0.0f || veh->m_nCurrentGear == 0)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -730,7 +730,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.f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
@@ -739,14 +739,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
@@ -781,7 +781,7 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams& params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_REMOTE_CONTROLLED_CAR;
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 = (11025.f * velocityChange / params.m_pTransmission->fMaxVelocity + 11025.f);
m_sQueueSample.m_nLoopCount = 0;
@@ -790,10 +790,10 @@ cAudioManager::ProcessModelCarEngine(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();
}
}
@@ -804,7 +804,7 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams& params)
-bool
+bool8
cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 95.0f;
@@ -816,7 +816,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
float velocity;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pTransmission != nil) {
if (((CAutomobile*)params.m_pVehicle)->m_nDriveWheelsOnGround != 0) {
velocity = Abs(params.m_fVelocityChange);
@@ -827,7 +827,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;
@@ -845,19 +845,19 @@ 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;
@@ -869,7 +869,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
float velChange;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pTransmission != nil) {
if (((CAutomobile *)params.m_pVehicle)->m_nDriveWheelsOnGround != 0) {
velChange = Abs(params.m_fVelocityChange);
@@ -882,7 +882,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;
#ifdef FIX_BUGS
multiplier = (m_sQueueSample.m_fDistance / SOUND_INTENSITY) * 0.5f;
@@ -897,16 +897,16 @@ 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
@@ -1033,7 +1033,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
}
}
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 + 100 * m_sQueueSample.m_nEntityIndex % 1000;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_6 || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_6)
@@ -1044,10 +1044,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();
}
}
@@ -1070,7 +1070,7 @@ void
cAudioManager::PlayerJustGotInCar() const
{
if (m_bIsInitialised)
- bPlayerJustEnteredCar = true;
+ bPlayerJustEnteredCar = TRUE;
}
void
@@ -1080,7 +1080,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) {
@@ -1091,7 +1091,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) {
@@ -1105,9 +1105,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();
}
}
@@ -1127,11 +1127,11 @@ cAudioManager::ProcessCesna(cVehicleParams& params)
} else if (nAccel < 60) {
++nAccel;
}
- AddPlayerCarSample(85 * (60 - nAccel) / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, true);
- AddPlayerCarSample(85 * nAccel / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_REV, SFX_BANK_0, 2, true);
+ AddPlayerCarSample(85 * (60 - nAccel) / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, TRUE);
+ AddPlayerCarSample(85 * nAccel / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_REV, SFX_BANK_0, 2, TRUE);
}
} else if (params.m_nIndex == DODO) {
- AddPlayerCarSample(105, 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, true);
+ AddPlayerCarSample(105, 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, TRUE);
} else if (params.m_fDistance < SQR(200)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, 200.f, m_sQueueSample.m_fDistance);
@@ -1139,7 +1139,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;
@@ -1149,9 +1149,9 @@ cAudioManager::ProcessCesna(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 8.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)) {
@@ -1160,7 +1160,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 = 0;
m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0;
@@ -1170,9 +1170,9 @@ cAudioManager::ProcessCesna(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 8.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();
}
}
@@ -1199,9 +1199,9 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
int soundOffset;
uint8 engineSoundType;
int16 accelerateState;
- bool channelUsed;
- bool lostTraction;
- bool processedAccelSampleStopped;
+ bool8 channelUsed;
+ bool8 lostTraction;
+ bool8 processedAccelSampleStopped;
uint8 currentGear;
float gasPedalAudio;
CVector pos;
@@ -1209,21 +1209,21 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
static int16 LastAccel = 0;
static int16 LastBrake = 0;
static uint8 CurrentPretendGear = 1;
- static bool bLostTractionLastFrame = false;
- static bool bHandbrakeOnLastFrame = false;
+ static bool8 bLostTractionLastFrame = FALSE;
+ static bool8 bHandbrakeOnLastFrame = FALSE;
static int32 nCruising = 0;
- static bool bAccelSampleStopped = true;
+ static bool8 bAccelSampleStopped = TRUE;
- lostTraction = false;
- processedAccelSampleStopped = false;
+ lostTraction = FALSE;
+ processedAccelSampleStopped = FALSE;
if (bPlayerJustEnteredCar) {
- bAccelSampleStopped = true;
- bPlayerJustEnteredCar = false;
+ bAccelSampleStopped = TRUE;
+ bPlayerJustEnteredCar = FALSE;
nCruising = 0;
LastAccel = 0;
- bLostTractionLastFrame = false;
+ bLostTractionLastFrame = FALSE;
LastBrake = 0;
- bHandbrakeOnLastFrame = false;
+ bHandbrakeOnLastFrame = FALSE;
CurrentPretendGear = 1;
}
if (CReplay::IsPlayingBack())
@@ -1249,16 +1249,16 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
++wheelInUseCounter;
}
if (wheelInUseCounter > 2)
- lostTraction = true;
+ lostTraction = TRUE;
break;
case 'F':
if ((automobile->m_aWheelState[CARWHEEL_FRONT_LEFT] != WHEEL_STATE_NORMAL || automobile->m_aWheelState[CARWHEEL_FRONT_RIGHT] != WHEEL_STATE_NORMAL) &&
(automobile->m_aWheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || automobile->m_aWheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
- lostTraction = true;
+ lostTraction = TRUE;
break;
case 'R':
if ((automobile->m_aWheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL) || (automobile->m_aWheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
- lostTraction = true;
+ lostTraction = TRUE;
break;
}
@@ -1279,7 +1279,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
if (params.m_fVelocityChange < -0.001f) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
if (automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction)
gasPedalAudio = automobile->m_fGasPedalAudio;
@@ -1291,7 +1291,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
} else if (LastAccel > 0) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
nCruising = 0;
if (automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction ||
@@ -1304,13 +1304,13 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
AddPlayerCarSample((25.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 40, freq, (soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1), engineSoundType, 63,
- false);
+ FALSE);
}
}
freq = (10000.f * gasPedalAudio) + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(110 - (40.f * gasPedalAudio), freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1), SFX_BANK_0, 52, true);
+ AddPlayerCarSample(110 - (40.f * gasPedalAudio), freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1), SFX_BANK_0, 52, TRUE);
CurrentPretendGear = Max(1, currentGear);
} else {
@@ -1335,9 +1335,9 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
freq /= 2;
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
- AddPlayerCarSample(vol, freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1), SFX_BANK_0, 2, true);
+ AddPlayerCarSample(vol, freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1), SFX_BANK_0, 2, TRUE);
} else {
TranslateEntity(&m_sQueueSample.m_vecPos, &pos);
if (bAccelSampleStopped) {
@@ -1347,8 +1347,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
gearNr = 1;
CurrentPretendGear = gearNr;
}
- processedAccelSampleStopped = true;
- bAccelSampleStopped = false;
+ processedAccelSampleStopped = TRUE;
+ bAccelSampleStopped = FALSE;
}
if (!channelUsed) {
@@ -1375,14 +1375,14 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
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);
}
}
break;
}
if (nCruising != 0) {
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
if (accelerateState < 150 || automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction ||
currentGear < params.m_pTransmission->nNumberOfGears - 1) {
nCruising = 0;
@@ -1396,7 +1396,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
freq = 27 * nCruising + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType, 64, true);
+ AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType, 64, TRUE);
}
}
}
@@ -1406,7 +1406,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
bLostTractionLastFrame = lostTraction;
}
-bool
+bool8
cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -1418,10 +1418,10 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
float skidVal = 0.0f;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
if (automobile->m_nWheelsOnGround == 0)
- return true;
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
for (int32 i = 0; i < ARRAY_SIZE(automobile->m_aWheelState); i++) {
if (automobile->m_aWheelState[i] == WHEEL_STATE_NORMAL || automobile->Damage.GetWheelStatus(i) == WHEEL_STATUS_MISSING)
@@ -1462,7 +1462,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:
@@ -1479,7 +1479,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;
@@ -1487,14 +1487,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
@@ -1569,7 +1569,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;
@@ -1578,10 +1578,10 @@ 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 = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1589,7 +1589,7 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
}
}
-bool
+bool8
cAudioManager::UsesSiren(int32 model) const
{
switch (model) {
@@ -1599,13 +1599,13 @@ cAudioManager::UsesSiren(int32 model) const
case POLICE:
case ENFORCER:
case PREDATOR:
- return true;
+ return TRUE;
default:
- return false;
+ return FALSE;
}
}
-bool
+bool8
cAudioManager::UsesSirenSwitching(int32 model) const
{
switch (model) {
@@ -1613,21 +1613,21 @@ cAudioManager::UsesSirenSwitching(int32 model) const
case POLICE:
case ENFORCER:
case PREDATOR:
- return true;
+ return TRUE;
default:
- return false;
+ return FALSE;
}
}
-bool
+bool8
cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
{
const float SOUND_INTENSITY = 110.0f;
if (params.m_fDistance < SQR(SOUND_INTENSITY)) {
CVehicle *veh = params.m_pVehicle;
- if (veh->m_bSirenOrAlarm == false && !veh->IsAlarmOn())
- return true;
+ if (veh->m_bSirenOrAlarm == FALSE && !veh->IsAlarmOn())
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
@@ -1635,7 +1635,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nCounter = 5;
if (UsesSiren(params.m_nIndex)) {
if (params.m_pVehicle->GetStatus() == STATUS_ABANDONED)
- return true;
+ return TRUE;
if (veh->m_nCarHornTimer && params.m_nIndex != FIRETRUK) {
m_sQueueSample.m_nSampleIndex = SFX_SIREN_FAST;
if (params.m_nIndex == FBICAR)
@@ -1652,7 +1652,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nSirenOrAlarmFrequency;
}
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 = 80;
@@ -1660,25 +1660,25 @@ 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;
} else
- return true;
+ return TRUE;
} else
- return false;
+ return FALSE;
}
-bool
+bool8
cAudioManager::UsesReverseWarning(int32 model) const
{
return model == LINERUN || model == FIRETRUK || model == TRASH || model == BUS || model == COACH;
}
-bool
+bool8
cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
{
const float SOUND_INTENSITY = 50.0f;
@@ -1686,7 +1686,7 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
CVehicle *veh = params.m_pVehicle;
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);
@@ -1695,7 +1695,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;
@@ -1704,17 +1704,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;
@@ -1725,7 +1725,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);
@@ -1742,7 +1742,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;
@@ -1750,33 +1750,33 @@ 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)
{
CAutomobile *automobile;
uint8 rand;
if (params.m_fDistance > SQR(30))
- 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);
rand = m_anRandomTable[0] % 10 + 70;
@@ -1787,7 +1787,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 = rand;
@@ -1795,22 +1795,22 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
- 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 == COACH;
}
-bool
+bool8
cAudioManager::ProcessEngineDamage(cVehicleParams& params)
{
const int engineDamageIntensity = 40;
@@ -1820,12 +1820,12 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
uint8 emittingVolume;
if (params.m_fDistance >= SQR(engineDamageIntensity))
- return false;
+ return FALSE;
veh = (CAutomobile *)params.m_pVehicle;
if (veh->bEngineOn) {
engineStatus = veh->Damage.GetEngineStatus();
if (engineStatus > 250 || engineStatus < 100)
- return true;
+ return TRUE;
if (engineStatus < 225) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
emittingVolume = 6;
@@ -1842,30 +1842,30 @@ 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 = engineDamageIntensity;
- 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)
{
CAutomobile *automobile;
if (params.m_fDistance >= SQR(40.f))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
if (automobile->bEngineOn && automobile->m_bombType == CARBOMB_TIMEDACTIVE) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -1874,7 +1874,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;
@@ -1883,14 +1883,14 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 40.0f;
- 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
@@ -1900,7 +1900,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
uint8 emittingVol;
float relVol;
float vol;
- bool noReflections;
+ bool8 noReflections;
float maxDist;
static uint8 WaveIndex = 41;
@@ -1910,7 +1910,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
noReflections = 0;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
event = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
switch (event) {
case SOUND_CAR_DOOR_CLOSE_BONNET:
@@ -1950,7 +1950,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:
@@ -1988,7 +1988,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: {
@@ -2034,7 +2034,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: {
@@ -2079,7 +2079,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;
@@ -2161,7 +2161,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
emittingVol = (37.f * vol * 2500.0f / 96.0f) + 90;
maxDist = SQR(SOUND_INTENSITY);
- noReflections = true;
+ noReflections = TRUE;
break;
}
case SOUND_CAR_BOMB_TICK: {
@@ -2174,7 +2174,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;
}
@@ -2234,7 +2234,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;
@@ -2265,7 +2265,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;
}
@@ -2282,7 +2282,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: {
@@ -2311,23 +2311,23 @@ 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_bIs2D = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bIs2D = FALSE;
AddSampleToRequestedQueue();
}
}
}
}
-bool
+bool8
cAudioManager::ProcessTrainNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 300.0f;
@@ -2337,7 +2337,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);
@@ -2350,7 +2350,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nCounter = 32;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_FAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_FAR);
m_sQueueSample.m_nLoopCount = 0;
@@ -2359,10 +2359,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();
}
}
@@ -2373,7 +2373,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nCounter = 33;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) + 100 * m_sQueueSample.m_nEntityIndex % 987;
m_sQueueSample.m_nLoopCount = 0;
@@ -2382,18 +2382,18 @@ cAudioManager::ProcessTrainNoise(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 = 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::ProcessBoatEngine(cVehicleParams& params)
{
CBoat *boat;
@@ -2419,7 +2419,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nFrequency = 10386;
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;
@@ -2427,10 +2427,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();
}
if (FindPlayerVehicle() == params.m_pVehicle) {
@@ -2454,12 +2454,12 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
}
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, intensity, m_sQueueSample.m_fDistance);
if (!m_sQueueSample.m_nVolume)
- return true;
+ return TRUE;
m_sQueueSample.m_nCounter = 40;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_ACCEL;
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 = emittingVol;
@@ -2467,10 +2467,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;
} else {
if (FindPlayerVehicle() == params.m_pVehicle) {
padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
@@ -2512,10 +2512,10 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, intensity, m_sQueueSample.m_fDistance);
if (!m_sQueueSample.m_nVolume)
- return true;
+ return TRUE;
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 = emittingVol;
@@ -2523,18 +2523,18 @@ 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();
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool
+bool8
cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
{
float velocityChange;
@@ -2542,11 +2542,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);
@@ -2557,7 +2557,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;
@@ -2566,14 +2566,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 = 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;
}
struct tHelicopterSampleData {
@@ -2582,7 +2582,7 @@ struct tHelicopterSampleData {
uint8 m_bBaseVolume;
};
-bool
+bool8
cAudioManager::ProcessHelicopter(cVehicleParams& params)
{
CHeli *heli;
@@ -2593,7 +2593,7 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
static const tHelicopterSampleData gHeliSfxRanges[3] = {{400.f, 380.f, 100}, {100.f, 70.f, MAX_VOLUME}, {60.f, 30.f, MAX_VOLUME}};
if (SQR(gHeliSfxRanges[0].m_fMaxDistance) <= params.m_fDistance)
- return false;
+ return FALSE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
heli = (CHeli *)params.m_pVehicle;
@@ -2601,7 +2601,7 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
MaxDist = gHeliSfxRanges[i].m_fMaxDistance;
dist = m_sQueueSample.m_fDistance;
if (dist >= MaxDist)
- return true;
+ return TRUE;
baseDist = gHeliSfxRanges[i].m_fBaseDistance;
if (dist < baseDist)
emittingVol = (gHeliSfxRanges[i].m_bBaseVolume * ((MaxDist - dist) / (MaxDist - baseDist)));
@@ -2613,7 +2613,7 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
m_sQueueSample.m_nCounter = i + 65;
m_sQueueSample.m_nSampleIndex = i + SFX_HELI_1;
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 = 1200 * heli->m_nHeliId + SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 0;
@@ -2622,14 +2622,14 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = gHeliSfxRanges[i].m_fMaxDistance;
- 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
@@ -2771,12 +2771,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);
@@ -2788,7 +2788,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;
@@ -2797,22 +2797,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);
@@ -2820,7 +2820,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;
@@ -2829,21 +2829,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);
@@ -2851,7 +2851,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;
@@ -2860,21 +2860,21 @@ 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;
+ return FALSE;
int32 vol = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
m_sQueueSample.m_nVolume = vol;
@@ -2882,29 +2882,29 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
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 = 1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
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);
@@ -2912,7 +2912,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;
@@ -2921,11 +2921,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;
@@ -2933,7 +2933,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nOffset = MAX_VOLUME;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
int32
@@ -2954,7 +2954,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);
if (ped->GetModelIndex() == MI_FATMALE02)
@@ -2993,7 +2993,7 @@ cAudioManager::ProcessPedHeadphones(cPedParams &params)
m_sQueueSample.m_nCounter = 64;
m_sQueueSample.m_nSampleIndex = SFX_HEADPHONES;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_HEADPHONES);
m_sQueueSample.m_nLoopCount = 0;
@@ -3002,10 +3002,10 @@ cAudioManager::ProcessPedHeadphones(cPedParams &params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 7.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();
}
return;
@@ -3021,9 +3021,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
@@ -3031,9 +3031,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:
@@ -3110,9 +3110,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:
@@ -3138,9 +3138,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_PUNCH_33:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
@@ -3192,7 +3192,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
AddFightSound:
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;
@@ -3203,15 +3203,15 @@ 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:
m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -3222,12 +3222,12 @@ 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_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
else
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_WEAPON_SHOT_FIRED:
weapon = ped->GetWeapon();
@@ -3236,7 +3236,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
@@ -3248,18 +3248,18 @@ 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_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
else
- stereo = true;
+ stereo = TRUE;
break;
case WEAPONTYPE_UZI:
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;
@@ -3271,14 +3271,14 @@ 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;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
break;
case WEAPONTYPE_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;
@@ -3290,18 +3290,18 @@ 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_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
else
- stereo = true;
+ stereo = TRUE;
break;
case WEAPONTYPE_AK47:
m_sQueueSample.m_nSampleIndex = SFX_AK47_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AK47_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -3313,14 +3313,14 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[1] % 15 + 70;
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 WEAPONTYPE_M16:
m_sQueueSample.m_nSampleIndex = SFX_M16_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M16_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -3332,14 +3332,14 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[4] % 15 + 70;
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 WEAPONTYPE_SNIPERRIFLE:
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SNIPER_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -3351,18 +3351,18 @@ 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_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
else
- stereo = true;
+ stereo = TRUE;
break;
case WEAPONTYPE_ROCKETLAUNCHER:
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;
@@ -3374,12 +3374,12 @@ 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_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
else
- stereo = true;
+ stereo = TRUE;
break;
case WEAPONTYPE_FLAMETHROWER:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_LEFT;
@@ -3395,13 +3395,13 @@ 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;
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
else
- stereo = true;
+ stereo = TRUE;
break;
default:
continue;
@@ -3444,7 +3444,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;
@@ -3455,9 +3455,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:
case SOUND_WEAPON_UZI_BULLET_ECHO:
@@ -3465,7 +3465,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_UZI_END_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_END_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -3477,12 +3477,12 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[4] % 10 + 40;
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;
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
else
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_WEAPON_FLAMETHROWER_FIRE:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_START_LEFT;
@@ -3499,14 +3499,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;
@@ -3518,14 +3518,14 @@ 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:
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;
@@ -3536,9 +3536,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;
default:
SetupPedComments(params, sound);
@@ -3553,13 +3553,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;
@@ -6101,18 +6101,18 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_fSoundIntensity = 50.0f;
break;
}
- 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;
if (sampleIndex >= SFX_AMMU_D && sampleIndex <= SFX_AMMU_F) {
- AudioManager.m_sQueueSample.m_bReverbFlag = false;
- AudioManager.m_sQueueSample.m_bRequireReflection = false;
+ AudioManager.m_sQueueSample.m_bReverbFlag = FALSE;
+ AudioManager.m_sQueueSample.m_bRequireReflection = FALSE;
} else {
- AudioManager.m_sQueueSample.m_bReverbFlag = true;
- AudioManager.m_sQueueSample.m_bRequireReflection = true;
+ AudioManager.m_sQueueSample.m_bReverbFlag = TRUE;
+ AudioManager.m_sQueueSample.m_bRequireReflection = TRUE;
}
- AudioManager.m_sQueueSample.m_bIs2D = false;
+ AudioManager.m_sQueueSample.m_bIs2D = FALSE;
AudioManager.m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(AudioManager.m_sQueueSample.m_nSampleIndex) + AudioManager.RandomDisplacement(750);
if (CTimer::GetIsSlowMotionActive())
@@ -6203,15 +6203,15 @@ 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_bReverbFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = 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_bRequireReflection = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -6273,14 +6273,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();
}
}
@@ -6317,14 +6317,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();
}
}
@@ -6386,8 +6386,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = 9000;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
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 = RandomDisplacement(10) + 50;
break;
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
@@ -6400,7 +6400,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_TRAIN_ANNOUNCEMENT_1:
@@ -6414,7 +6414,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_STATION_ANNOUNCE);
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_PAYPHONE_RINGING:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -6424,8 +6424,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING);
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
break;
case SCRIPT_SOUND_GLASS_BREAK_L:
m_sQueueSample.m_fSoundIntensity = 60.0f;
@@ -6435,7 +6435,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;
@@ -6445,7 +6445,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;
@@ -6455,8 +6455,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;
@@ -6465,7 +6465,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:
@@ -6475,8 +6475,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:
@@ -6486,8 +6486,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:
@@ -6498,8 +6498,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:
@@ -6510,8 +6510,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_GUNSHELL_DROP:
@@ -6546,7 +6546,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:
@@ -6556,7 +6556,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:
@@ -6570,11 +6570,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();
}
}
@@ -7175,14 +7175,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();
}
}
@@ -7247,16 +7247,16 @@ cAudioManager::ProcessPornCinema(uint8 sound)
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
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_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -7270,15 +7270,15 @@ cAudioManager::ProcessPornCinema(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nCounter = rand + 1;
- 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_nReleasingVolumeModificator = 6;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
gPornNextTime = time + 2000 + m_anRandomTable[3] % 6000;
}
@@ -7308,16 +7308,16 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_WORKSHOP;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_WORKSHOP_1);
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_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = 30;
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();
}
}
@@ -7347,16 +7347,16 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SAWMILL;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SAWMILL_LOOP);
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_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = 30;
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();
}
time = CTimer::GetTimeInMilliseconds();
@@ -7367,15 +7367,15 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SAWMILL;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = 1;
- 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_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
gSawMillNextTime = time + 2000 + m_anRandomTable[3] % 4000;
}
@@ -7403,16 +7403,16 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_LAUNDERETTE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_LOOP);
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_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = 45;
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();
}
m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
@@ -7421,16 +7421,16 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_LAUNDERETTE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_SONG_LOOP);
m_sQueueSample.m_nCounter = 1;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = 110;
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();
}
}
@@ -7460,16 +7460,16 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SHOP;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOP_LOOP);
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_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = 30;
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();
}
time = CTimer::GetTimeInMilliseconds();
@@ -7481,16 +7481,16 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SHOP;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = rand + 1;
- 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_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = 70;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
gShopNextTime = time + 3000 + m_anRandomTable[3] % 7000;
}
@@ -7524,16 +7524,16 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_AIRPORT;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = iSound++;
- 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_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = 110;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
gAirportNextTime = time + 10000 + m_anRandomTable[3] % 20000;
}
@@ -7571,16 +7571,16 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 4);
m_sQueueSample.m_nCounter = iSound++;
- 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_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
gCinemaNextTime = time + 1000 + m_anRandomTable[3] % 4000;
}
@@ -7620,16 +7620,16 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOCKS_FOGHORN);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
m_sQueueSample.m_nCounter = iSound++;
- 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_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
gDocksNextTime = time + 10000 + m_anRandomTable[3] % 40000;
}
@@ -7668,16 +7668,16 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nCounter = iSound++;
- 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_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_nEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
AddSampleToRequestedQueue();
gHomeNextTime = time + 1000 + m_anRandomTable[3] % 4000;
}
@@ -7720,19 +7720,19 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nCounter = iSound++;
- 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_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
cPedParams params;
- params.m_bDistanceCalculated = true;
+ params.m_bDistanceCalculated = TRUE;
params.m_fDistance = distSquared;
SetupPedComments(params, SOUND_INJURED_PED_MALE_PRISON);
}
@@ -7768,14 +7768,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())) {
@@ -7786,15 +7786,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();
}
}
@@ -7802,10 +7802,10 @@ cAudioManager::ProcessWeather(int32 id)
void
cAudioManager::ProcessFrontEnd()
{
- bool stereo;
- bool processedPickup;
- bool processedMission;
- bool frontendBank;
+ bool8 stereo;
+ bool8 processedPickup;
+ bool8 processedMission;
+ bool8 frontendBank;
int16 sample;
static uint8 iSound = 0;
@@ -7813,10 +7813,10 @@ cAudioManager::ProcessFrontEnd()
static uint32 cPartMisComNextFrame = 0;
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- processedPickup = false;
- stereo = false;
- processedMission = false;
- frontendBank = false;
+ processedPickup = FALSE;
+ stereo = FALSE;
+ processedMission = FALSE;
+ frontendBank = 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;
@@ -7828,7 +7828,7 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_BAD_VEHICLE:
case SOUND_GARAGE_BOMB_ALREADY_SET:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_GARAGE_OPENING:
case SOUND_GARAGE_BOMB1_SET:
@@ -7844,19 +7844,19 @@ cAudioManager::ProcessFrontEnd()
case SOUND_EVIDENCE_PICKUP:
case SOUND_UNLOAD_GOLD:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_2_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PICKUP_WEAPON_BOUGHT:
case SOUND_PICKUP_WEAPON:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_1_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PICKUP_ERROR:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PICKUP_BONUS:
case SOUND_PICKUP_MONEY:
@@ -7865,8 +7865,8 @@ cAudioManager::ProcessFrontEnd()
case SOUND_PICKUP_PACMAN_PACKAGE:
case SOUND_PICKUP_FLOAT_PACKAGE:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_3_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PAGER:
// TODO: ps2 code
@@ -7883,49 +7883,49 @@ cAudioManager::ProcessFrontEnd()
break;
case SOUND_PART_MISSION_COMPLETE:
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE;
- processedMission = true;
+ processedMission = TRUE;
break;
case SOUND_FRONTEND_MENU_STARTING:
m_sQueueSample.m_nSampleIndex = SFX_START_BUTTON_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_FRONTEND_MENU_NEW_PAGE:
m_sQueueSample.m_nSampleIndex = SFX_PAGE_CHANGE_AND_BACK_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MENU_NAVIGATION:
m_sQueueSample.m_nSampleIndex = SFX_HIGHLIGHT_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MENU_SETTING_CHANGE:
m_sQueueSample.m_nSampleIndex = SFX_SELECT_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MENU_BACK:
m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_STEREO:
m_sQueueSample.m_nSampleIndex = SFX_STEREO_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MONO:
m_sQueueSample.m_nSampleIndex = SFX_MONO;
- frontendBank = true;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_AUDIO_TEST:
m_sQueueSample.m_nSampleIndex = m_anRandomTable[0] % 3 + SFX_NOISE_BURST_1;
- frontendBank = true;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_FAIL:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_LEFT;
- frontendBank = true;
- stereo = true;
+ frontendBank = TRUE;
+ stereo = TRUE;
break;
case SOUND_FRONTEND_RADIO_TURN_OFF:
case SOUND_FRONTEND_RADIO_CHANGE:
@@ -7962,10 +7962,10 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nVolume = 110;
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nBankIndex = frontendBank ? SFX_BANK_FRONT_END_MENU : SFX_BANK_0;
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;
@@ -7973,8 +7973,8 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nOffset = m_anRandomTable[0] & 31;
else
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;
@@ -7990,7 +7990,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) {
@@ -8005,7 +8005,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;
@@ -8014,10 +8014,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) {
@@ -8025,9 +8025,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();
}
}
@@ -8075,14 +8075,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();
}
}
@@ -8100,7 +8100,7 @@ cAudioManager::ProcessGarages()
uint32 sampleIndex;
uint8 j;
float distSquared;
- bool distCalculated;
+ bool8 distCalculated;
static uint8 iSound = 32;
@@ -8111,7 +8111,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;
@@ -8131,7 +8131,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;
@@ -8143,7 +8143,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;
@@ -8152,19 +8152,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;
@@ -8193,16 +8193,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();
}
}
@@ -8218,7 +8218,7 @@ void
cAudioManager::ProcessFireHydrant()
{
float distSquared;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
static const int intensity = 35;
m_sQueueSample.m_vecPos = ((CEntity *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition();
@@ -8230,7 +8230,7 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_nCounter = 0;
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 = 4;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.m_nLoopCount = 0;
@@ -8239,10 +8239,10 @@ cAudioManager::ProcessFireHydrant()
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 = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8255,7 +8255,7 @@ void
cAudioManager::ProcessBridge()
{
float dist;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
if (CBridge::pLiftRoad) {
m_sQueueSample.m_vecPos = CBridge::pLiftRoad->GetPosition();
@@ -8290,7 +8290,7 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
- 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;
@@ -8299,10 +8299,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();
}
}
@@ -8317,7 +8317,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;
@@ -8326,9 +8326,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();
}
}
@@ -8352,7 +8352,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;
@@ -8361,9 +8361,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();
}
}
@@ -8371,7 +8371,7 @@ cAudioManager::ProcessBridgeOneShots()
#pragma endregion
#pragma region MISSION_AUDIO
-bool g_bMissionAudioLoadFailed;
+bool8 g_bMissionAudioLoadFailed;
struct MissionAudioData {
const char *m_pName;
@@ -8425,7 +8425,7 @@ FindMissionAudioSfx(const char *name)
return NO_SAMPLE;
}
-bool
+bool8
cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
{
switch (soundMission) {
@@ -8441,9 +8441,9 @@ cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
case STREAMED_SOUND_MISSION_R5_A:
case STREAMED_SOUND_MISSION_LO2_A:
case STREAMED_SOUND_MISSION_LO6_A:
- return true;
+ return TRUE;
default:
- return false;
+ return FALSE;
}
}
@@ -8456,12 +8456,12 @@ cAudioManager::PreloadMissionAudio(Const char *name)
m_sMissionAudio.m_nSampleIndex = missionAudioSfx;
m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying = false;
+ m_sMissionAudio.m_bIsPlaying = FALSE;
m_sMissionAudio.m_nMissionAudioCounter = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
m_sMissionAudio.m_nMissionAudioCounter *= 4;
- m_sMissionAudio.m_bIsPlayed = false;
- m_sMissionAudio.m_bPredefinedProperties = true;
- g_bMissionAudioLoadFailed = false;
+ m_sMissionAudio.m_bIsPlayed = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties = TRUE;
+ g_bMissionAudioLoadFailed = FALSE;
}
}
}
@@ -8479,7 +8479,7 @@ void
cAudioManager::SetMissionAudioLocation(float x, float y, float z)
{
if (m_bIsInitialised) {
- m_sMissionAudio.m_bPredefinedProperties = false;
+ m_sMissionAudio.m_bPredefinedProperties = FALSE;
m_sMissionAudio.m_vecPos = CVector(x, y, z);
}
}
@@ -8489,10 +8489,10 @@ cAudioManager::PlayLoadedMissionAudio()
{
if (m_bIsInitialised && m_sMissionAudio.m_nSampleIndex != NO_SAMPLE && m_sMissionAudio.m_nLoadingStatus == LOADING_STATUS_LOADED &&
m_sMissionAudio.m_nPlayStatus == PLAY_STATUS_STOPPED)
- m_sMissionAudio.m_bIsPlayed = true;
+ m_sMissionAudio.m_bIsPlayed = TRUE;
}
-bool
+bool8
cAudioManager::IsMissionAudioSampleFinished()
{
if (m_bIsInitialised)
@@ -8510,9 +8510,9 @@ cAudioManager::ClearMissionAudio()
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying = false;
- m_sMissionAudio.m_bIsPlayed = false;
- m_sMissionAudio.m_bPredefinedProperties = true;
+ m_sMissionAudio.m_bIsPlaying = FALSE;
+ m_sMissionAudio.m_bIsPlayed = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties = TRUE;
m_sMissionAudio.m_nMissionAudioCounter = 0;
}
}
@@ -8565,9 +8565,9 @@ cAudioManager::ProcessMissionAudio()
SetMissionScriptPoliceAudio(m_sMissionAudio.m_nSampleIndex);
} else {
if (m_nUserPause)
- SampleManager.PauseStream(1, 1);
+ SampleManager.PauseStream(TRUE, 1);
if (m_sMissionAudio.m_bPredefinedProperties) {
- SampleManager.SetStreamedVolumeAndPan(80, 63, 1, 1);
+ SampleManager.SetStreamedVolumeAndPan(80, 63, TRUE, 1);
} else {
distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos);
if (distSquared >= SQR(50.0f)) {
@@ -8579,7 +8579,7 @@ cAudioManager::ProcessMissionAudio()
TranslateEntity(&m_sMissionAudio.m_vecPos, &vec);
pan = ComputePan(50.f, &vec);
}
- SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, 1, 1);
+ SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, 1);
}
SampleManager.StartPreloadedStreamedFile(1);
}
@@ -8606,9 +8606,9 @@ cAudioManager::ProcessMissionAudio()
} else if (m_sMissionAudio.m_bIsPlaying) {
if (SampleManager.IsStreamPlaying(1) || m_nUserPause || m_nPreviousUserPause) {
if (m_nUserPause)
- SampleManager.PauseStream(1, 1);
+ SampleManager.PauseStream(TRUE, 1);
else
- SampleManager.PauseStream(0, 1);
+ SampleManager.PauseStream(FALSE, 1);
} else {
m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_FINISHED;
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
@@ -8623,7 +8623,7 @@ cAudioManager::ProcessMissionAudio()
break;
nCheckPlayingDelay = 0;
}
- m_sMissionAudio.m_bIsPlaying = true;
+ m_sMissionAudio.m_bIsPlaying = TRUE;
}
break;
default:
@@ -8633,7 +8633,7 @@ cAudioManager::ProcessMissionAudio()
case LOADING_STATUS_FAILED:
if (++nFramesUntilFailedLoad >= 90) {
nFramesForPretendPlaying = 0;
- g_bMissionAudioLoadFailed = true;
+ g_bMissionAudioLoadFailed = TRUE;
nFramesUntilFailedLoad = 0;
m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_LOADED;
}
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index f61350fb..c15d04bd 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -22,8 +22,8 @@ const int allChannels = channels + 2;
cAudioManager::cAudioManager()
{
- m_bIsInitialised = false;
- m_bReverb = true;
+ m_bIsInitialised = FALSE;
+ m_bReverb = TRUE;
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
m_nTimeSpent = TIME_SPENT;
m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
@@ -34,16 +34,16 @@ cAudioManager::cAudioManager()
ClearActiveSamples();
GenerateIntegerRandomNumberTable();
field_4 = 0;
- m_bDynamicAcousticModelingStatus = true;
+ m_bDynamicAcousticModelingStatus = TRUE;
for (int i = 0; i < NUM_AUDIOENTITIES; i++) {
- m_asAudioEntities[i].m_bIsUsed = false;
+ m_asAudioEntities[i].m_bIsUsed = FALSE;
m_anAudioEntityIndices[i] = NUM_AUDIOENTITIES;
}
m_nAudioEntitiesTotal = 0;
m_FrameCounter = 0;
- m_bFifthFrameFlag = false;
- m_bTimerJustReset = false;
+ m_bFifthFrameFlag = FALSE;
+ m_bTimerJustReset = FALSE;
m_nTimer = 0;
}
@@ -81,7 +81,7 @@ cAudioManager::Terminate()
MusicManager.Terminate();
for (uint32 i = 0; i < NUM_AUDIOENTITIES; i++) {
- m_asAudioEntities[i].m_bIsUsed = false;
+ m_asAudioEntities[i].m_bIsUsed = FALSE;
m_anAudioEntityIndices[i] = ARRAY_SIZE(m_anAudioEntityIndices);
}
@@ -96,7 +96,7 @@ cAudioManager::Terminate()
SampleManager.Terminate();
- m_bIsInitialised = false;
+ m_bIsInitialised = FALSE;
PostTerminateGameSpecificShutdown();
}
}
@@ -108,7 +108,7 @@ cAudioManager::Service()
if (m_bTimerJustReset) {
ResetAudioLogicTimers(m_nTimer);
MusicManager.ResetTimers(m_nTimer);
- m_bTimerJustReset = false;
+ m_bTimerJustReset = FALSE;
}
if (m_bIsInitialised) {
m_nPreviousUserPause = m_nUserPause;
@@ -130,8 +130,8 @@ cAudioManager::CreateEntity(eAudioType type, void *entity)
return AEHANDLE_ERROR_BADAUDIOTYPE;
for (uint32 i = 0; i < ARRAY_SIZE(m_asAudioEntities); i++) {
if (!m_asAudioEntities[i].m_bIsUsed) {
- m_asAudioEntities[i].m_bIsUsed = true;
- m_asAudioEntities[i].m_bStatus = false;
+ m_asAudioEntities[i].m_bIsUsed = TRUE;
+ m_asAudioEntities[i].m_bStatus = FALSE;
m_asAudioEntities[i].m_nType = type;
m_asAudioEntities[i].m_pEntity = entity;
m_asAudioEntities[i].m_awAudioEvent[0] = SOUND_NO_SOUND;
@@ -150,7 +150,7 @@ void
cAudioManager::DestroyEntity(int32 id)
{
if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed) {
- m_asAudioEntities[id].m_bIsUsed = false;
+ m_asAudioEntities[id].m_bIsUsed = FALSE;
for (int32 i = 0; i < m_nAudioEntitiesTotal; ++i) {
if (id == m_anAudioEntityIndices[i]) {
if (i < NUM_AUDIOENTITIES - 1)
@@ -163,7 +163,7 @@ cAudioManager::DestroyEntity(int32 id)
}
void
-cAudioManager::SetEntityStatus(int32 id, uint8 status)
+cAudioManager::SetEntityStatus(int32 id, bool8 status)
{
if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed)
m_asAudioEntities[id].m_bStatus = status;
@@ -191,7 +191,7 @@ cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
}
} else {
int32 i = 0;
- while (true) {
+ while (TRUE) {
if (i >= entity.m_AudioEvents) {
if (entity.m_AudioEvents < ARRAY_SIZE(entity.m_awAudioEvent)) {
entity.m_awAudioEvent[i] = sound;
@@ -238,7 +238,7 @@ cAudioManager::SetEffectsFadeVol(uint8 volume) const
}
void
-cAudioManager::SetMonoMode(uint8 mono)
+cAudioManager::SetMonoMode(bool8 mono)
{
SampleManager.SetMonoMode(mono);
}
@@ -253,7 +253,7 @@ void
cAudioManager::ResetTimers(uint32 time)
{
if (m_bIsInitialised) {
- m_bTimerJustReset = true;
+ m_bTimerJustReset = TRUE;
m_nTimer = time;
ClearRequestedQueue();
if (m_nActiveSampleQueue) {
@@ -372,13 +372,13 @@ cAudioManager::SetSpeakerConfig(int32 conf) const
SampleManager.SetSpeakerConfig(conf);
}
-bool
+bool8
cAudioManager::IsMP3RadioChannelAvailable() const
{
if (m_bIsInitialised)
return SampleManager.IsMP3RadioChannelAvailable();
- return false;
+ return FALSE;
}
void
@@ -398,12 +398,12 @@ cAudioManager::ReacquireDigitalHandle() const
}
void
-cAudioManager::SetDynamicAcousticModelingStatus(uint8 status)
+cAudioManager::SetDynamicAcousticModelingStatus(bool8 status)
{
- m_bDynamicAcousticModelingStatus = status!=0;
+ m_bDynamicAcousticModelingStatus = status;
}
-bool
+bool8
cAudioManager::CheckForAnAudioFileOnCD() const
{
return SampleManager.CheckForAnAudioFileOnCD();
@@ -418,7 +418,7 @@ cAudioManager::GetCDAudioDriveLetter() const
return 0;
}
-bool
+bool8
cAudioManager::IsAudioInitialised() const
{
return m_bIsInitialised;
@@ -527,7 +527,7 @@ cAudioManager::RandomDisplacement(uint32 seed) const
{
int32 value;
- static bool bPos = true;
+ static bool8 bPos = TRUE;
static uint32 Adjustment = 0;
if (!seed)
@@ -558,7 +558,7 @@ cAudioManager::AddSampleToRequestedQueue()
{
int32 calculatedVolume;
uint8 sampleIndex;
- bool bReflections;
+ bool8 bReflections;
if (m_sQueueSample.m_nSampleIndex < TOTAL_AUDIO_SAMPLES) {
calculatedVolume = m_sQueueSample.m_nReleasingVolumeModificator * (MAX_VOLUME - m_sQueueSample.m_nVolume);
@@ -571,21 +571,21 @@ cAudioManager::AddSampleToRequestedQueue()
++m_SampleRequestQueuesStatus[m_nActiveSampleQueue];
}
m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
- m_sQueueSample.m_bLoopEnded = false;
+ m_sQueueSample.m_bLoopEnded = FALSE;
if (m_sQueueSample.m_bIs2D) {
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
m_sQueueSample.m_nLoopsRemaining = 0;
}
if (m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount) {
bReflections = m_sQueueSample.m_bRequireReflection;
} else {
- bReflections = false;
+ bReflections = FALSE;
m_sQueueSample.m_nLoopsRemaining = 0;
}
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
if (!m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
m_asSamples[m_nActiveSampleQueue][sampleIndex] = m_sQueueSample;
@@ -692,7 +692,7 @@ cAudioManager::UpdateReflections()
void
cAudioManager::AddReleasingSounds()
{
- bool toProcess[44]; // why not 27?
+ bool8 toProcess[44]; // why not 27? because PS2?
int8 queue = m_nActiveSampleQueue == 0 ? 1 : 0;
@@ -701,11 +701,11 @@ cAudioManager::AddReleasingSounds()
if (sample.m_bLoopEnded)
continue;
- toProcess[i] = false;
+ toProcess[i] = FALSE;
for (int32 j = 0; j < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; j++) {
if (sample.m_nEntityIndex == m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][j]].m_nEntityIndex &&
sample.m_nCounter == m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][j]].m_nCounter) {
- toProcess[i] = true;
+ toProcess[i] = TRUE;
break;
}
}
@@ -741,7 +741,7 @@ cAudioManager::AddReleasingSounds()
void
cAudioManager::ProcessActiveQueues()
{
- bool flag;
+ bool8 flag;
float position2;
float position1;
@@ -758,8 +758,8 @@ cAudioManager::ProcessActiveQueues()
CVector position;
for (int32 i = 0; i < m_nActiveSamples; i++) {
- m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false;
- m_asActiveSamples[i].m_bIsProcessed = false;
+ m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = FALSE;
+ m_asActiveSamples[i].m_bIsProcessed = FALSE;
}
for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) {
@@ -775,15 +775,15 @@ cAudioManager::ProcessActiveQueues()
flag = !(j & 1);
}
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
- sample.m_bLoopEnded = true;
- m_asActiveSamples[j].m_bLoopEnded = true;
+ sample.m_bLoopEnded = TRUE;
+ m_asActiveSamples[j].m_bLoopEnded = TRUE;
m_asActiveSamples[j].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
continue;
}
}
- sample.m_bIsProcessed = true;
- m_asActiveSamples[j].m_bIsProcessed = true;
+ sample.m_bIsProcessed = TRUE;
+ m_asActiveSamples[j].m_bIsProcessed = TRUE;
sample.m_nVolumeChange = -1;
if (!sample.m_bReleasingSoundFlag) {
if (sample.m_bIs2D) {
@@ -837,8 +837,8 @@ cAudioManager::ProcessActiveQueues()
SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
break;
}
- sample.m_bIsProcessed = false;
- m_asActiveSamples[j].m_bIsProcessed = false;
+ sample.m_bIsProcessed = FALSE;
+ m_asActiveSamples[j].m_bIsProcessed = FALSE;
}
}
}
@@ -902,8 +902,8 @@ cAudioManager::ProcessActiveQueues()
SampleManager.SetChannel3DDistances(j, m_asActiveSamples[j].m_fSoundIntensity, 0.25f * m_asActiveSamples[j].m_fSoundIntensity);
SampleManager.StartChannel(j);
}
- m_asActiveSamples[j].m_bIsProcessed = true;
- sample.m_bIsProcessed = true;
+ m_asActiveSamples[j].m_bIsProcessed = TRUE;
+ sample.m_bIsProcessed = TRUE;
sample.m_nVolumeChange = -1;
break;
}
@@ -930,28 +930,28 @@ cAudioManager::ClearActiveSamples()
m_asActiveSamples[i].m_nCounter = 0;
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[i].m_nBankIndex = INVALID_SFX_BANK;
- m_asActiveSamples[i].m_bIs2D = false;
+ m_asActiveSamples[i].m_bIs2D = FALSE;
m_asActiveSamples[i].m_nReleasingVolumeModificator = 5;
m_asActiveSamples[i].m_nFrequency = 0;
m_asActiveSamples[i].m_nVolume = 0;
m_asActiveSamples[i].m_nEmittingVolume = 0;
m_asActiveSamples[i].m_fDistance = 0.0f;
- m_asActiveSamples[i].m_bIsProcessed = false;
- m_asActiveSamples[i].m_bLoopEnded = false;
+ m_asActiveSamples[i].m_bIsProcessed = FALSE;
+ m_asActiveSamples[i].m_bLoopEnded = FALSE;
m_asActiveSamples[i].m_nLoopCount = 1;
m_asActiveSamples[i].m_nLoopStart = 0;
m_asActiveSamples[i].m_nLoopEnd = -1;
m_asActiveSamples[i].m_fSpeedMultiplier = 0.0f;
m_asActiveSamples[i].m_fSoundIntensity = 200.0f;
m_asActiveSamples[i].m_nOffset = 63;
- m_asActiveSamples[i].m_bReleasingSoundFlag = false;
+ m_asActiveSamples[i].m_bReleasingSoundFlag = FALSE;
m_asActiveSamples[i].m_nCalculatedVolume = 0;
m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
m_asActiveSamples[i].m_nVolumeChange = -1;
m_asActiveSamples[i].m_vecPos = CVector(0.0f, 0.0f, 0.0f);
- m_asActiveSamples[i].m_bReverbFlag = false;
+ m_asActiveSamples[i].m_bReverbFlag = FALSE;
m_asActiveSamples[i].m_nLoopsRemaining = 0;
- m_asActiveSamples[i].m_bRequireReflection = false;
+ m_asActiveSamples[i].m_bRequireReflection = FALSE;
}
}
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 57fbc818..edf5eb63 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -11,7 +11,7 @@ public:
int32 m_nCounter;
int32 m_nSampleIndex;
uint8 m_nBankIndex;
- bool m_bIs2D;
+ bool8 m_bIs2D;
int32 m_nReleasingVolumeModificator;
uint32 m_nFrequency;
uint8 m_nVolume;
@@ -22,15 +22,15 @@ public:
uint8 m_nEmittingVolume;
float m_fSpeedMultiplier;
float m_fSoundIntensity;
- bool m_bReleasingSoundFlag;
+ bool8 m_bReleasingSoundFlag;
CVector m_vecPos;
- bool m_bReverbFlag;
+ bool8 m_bReverbFlag;
uint8 m_nLoopsRemaining;
- bool m_bRequireReflection; // Used for oneshots
+ bool8 m_bRequireReflection; // Used for oneshots
uint8 m_nOffset;
int32 m_nReleasingVolumeDivider;
- bool m_bIsProcessed;
- bool m_bLoopEnded;
+ bool8 m_bIsProcessed;
+ bool8 m_bLoopEnded;
int32 m_nCalculatedVolume;
int8 m_nVolumeChange;
};
@@ -45,7 +45,7 @@ class tAudioEntity
public:
eAudioType m_nType;
void *m_pEntity;
- bool m_bIsUsed;
+ bool8 m_bIsUsed;
uint8 m_bStatus;
int16 m_awAudioEvent[NUM_AUDIOENTITY_EVENTS];
float m_afVolume[NUM_AUDIOENTITY_EVENTS];
@@ -99,13 +99,13 @@ class cMissionAudio
{
public:
CVector m_vecPos;
- bool m_bPredefinedProperties;
+ bool8 m_bPredefinedProperties;
int32 m_nSampleIndex;
uint8 m_nLoadingStatus;
uint8 m_nPlayStatus;
- bool m_bIsPlaying;
+ bool8 m_bIsPlaying;
int32 m_nMissionAudioCounter;
- bool m_bIsPlayed;
+ bool8 m_bIsPlayed;
};
VALIDATE_SIZE(cMissionAudio, 32);
@@ -129,7 +129,7 @@ class CPed;
class cPedParams
{
public:
- bool m_bDistanceCalculated;
+ bool8 m_bDistanceCalculated;
float m_fDistance;
CPed *m_pPed;
@@ -144,7 +144,7 @@ public:
class cVehicleParams
{
public:
- bool m_bDistanceCalculated;
+ bool8 m_bDistanceCalculated;
float m_fDistance;
CVehicle *m_pVehicle;
cTransmission *m_pTransmission;
@@ -184,14 +184,14 @@ enum {
class cAudioManager
{
public:
- bool m_bIsInitialised;
- bool m_bReverb; // unused
- bool m_bFifthFrameFlag;
+ bool8 m_bIsInitialised;
+ bool8 m_bReverb; // unused
+ bool8 m_bFifthFrameFlag;
uint8 m_nActiveSamples;
uint8 field_4; // unused
- bool m_bDynamicAcousticModelingStatus;
+ bool8 m_bDynamicAcousticModelingStatus;
float m_fSpeedOfSound;
- bool m_bTimerJustReset;
+ bool8 m_bTimerJustReset;
int32 m_nTimer;
tSound m_sQueueSample;
uint8 m_nActiveSampleQueue;
@@ -230,19 +230,19 @@ public:
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
- bool ShouldDuckMissionAudio() const { return m_sMissionAudio.m_nPlayStatus == 1; }
+ bool8 ShouldDuckMissionAudio() const { return m_sMissionAudio.m_nPlayStatus == 1; }
// "Should" be in alphabetic order, except "getXTalkSfx"
void AddDetailsToRequestedOrderList(uint8 sample);
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank,
- uint8 counter, bool notLooping);
+ uint8 counter, bool8 notLooping);
void AddReflectionsToRequestedQueue();
void AddReleasingSounds();
void AddSampleToRequestedQueue();
void AgeCrimes();
- void CalculateDistance(bool &condition, float dist);
- bool CheckForAnAudioFileOnCD() const;
+ void CalculateDistance(bool8 &condition, float dist);
+ bool8 CheckForAnAudioFileOnCD() const;
void ClearActiveSamples();
void ClearMissionAudio();
void ClearRequestedQueue();
@@ -355,17 +355,17 @@ public:
float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
cTransmission *transmission, float velocityChange);
- bool HasAirBrakes(int32 model) const;
+ bool8 HasAirBrakes(int32 model) const;
void Initialise();
void InitialisePoliceRadio();
void InitialisePoliceRadioZones();
void InterrogateAudioEntities();
- bool IsAudioInitialised() const;
- bool IsMissionAudioSampleFinished();
- bool IsMP3RadioChannelAvailable() const;
+ bool8 IsAudioInitialised() const;
+ bool8 IsMissionAudioSampleFinished();
+ bool8 IsMP3RadioChannelAvailable() const;
- bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const;
+ bool8 MissionScriptAudioUsesPoliceChannel(int32 soundMission) const;
void PlayLoadedMissionAudio();
void PlayOneShot(int32 index, uint16 sound, float vol);
@@ -379,27 +379,27 @@ public:
void PreTerminateGameSpecificShutdown();
/// processX - main logic of adding new sounds
void ProcessActiveQueues();
- bool ProcessAirBrakes(cVehicleParams& params);
+ bool8 ProcessAirBrakes(cVehicleParams& params);
void ProcessAirportScriptObject(uint8 sound);
- bool ProcessBoatEngine(cVehicleParams& params);
- bool ProcessBoatMovingOverWater(cVehicleParams& params);
+ bool8 ProcessBoatEngine(cVehicleParams& params);
+ bool8 ProcessBoatMovingOverWater(cVehicleParams& params);
void ProcessBridge();
void ProcessBridgeMotor();
void ProcessBridgeOneShots();
void ProcessBridgeWarning();
- bool ProcessCarBombTick(cVehicleParams& params);
+ bool8 ProcessCarBombTick(cVehicleParams& params);
void ProcessCesna(cVehicleParams& params);
void ProcessCinemaScriptObject(uint8 sound);
void ProcessCrane();
void ProcessDocksScriptObject(uint8 sound);
- bool ProcessEngineDamage(cVehicleParams& params);
+ bool8 ProcessEngineDamage(cVehicleParams& params);
void ProcessEntity(int32 sound);
void ProcessExplosions(int32 explosion);
void ProcessFireHydrant();
void ProcessFires(int32 entity);
void ProcessFrontEnd();
void ProcessGarages();
- bool ProcessHelicopter(cVehicleParams& params);
+ bool8 ProcessHelicopter(cVehicleParams& params);
void ProcessHomeScriptObject(uint8 sound);
void ProcessJumbo(cVehicleParams& params);
void ProcessJumboAccel(CPlane *plane);
@@ -424,24 +424,24 @@ public:
void ProcessProjectiles();
void ProcessRainOnVehicle(cVehicleParams& params);
void ProcessReverb() const;
- bool ProcessReverseGear(cVehicleParams& params);
+ bool8 ProcessReverseGear(cVehicleParams& params);
void ProcessSawMillScriptObject(uint8 sound);
void ProcessScriptObject(int32 id);
void ProcessShopScriptObject(uint8 sound);
void ProcessSpecial();
- bool ProcessTrainNoise(cVehicleParams& params);
+ bool8 ProcessTrainNoise(cVehicleParams& params);
void ProcessVehicle(CVehicle *vehicle);
- bool ProcessVehicleDoors(cVehicleParams& params);
+ bool8 ProcessVehicleDoors(cVehicleParams& params);
void ProcessVehicleEngine(cVehicleParams& params);
void ProcessVehicleHorn(cVehicleParams& params);
void ProcessVehicleOneShots(cVehicleParams& params);
- bool ProcessVehicleReverseWarning(cVehicleParams& params);
- bool ProcessVehicleRoadNoise(cVehicleParams& params);
- bool ProcessVehicleSirenOrAlarm(cVehicleParams& params);
- bool ProcessVehicleSkidding(cVehicleParams& params);
+ bool8 ProcessVehicleReverseWarning(cVehicleParams& params);
+ bool8 ProcessVehicleRoadNoise(cVehicleParams& params);
+ bool8 ProcessVehicleSirenOrAlarm(cVehicleParams& params);
+ bool8 ProcessVehicleSkidding(cVehicleParams& params);
void ProcessWaterCannon(int32);
void ProcessWeather(int32 id);
- bool ProcessWetRoadNoise(cVehicleParams& params);
+ bool8 ProcessWetRoadNoise(cVehicleParams& params);
void ProcessWorkShopScriptObject(uint8 sound);
int32 RandomDisplacement(uint32 seed) const;
@@ -460,25 +460,25 @@ public:
void ServicePoliceRadioChannel(uint8 wantedLevel);
void ServiceSoundEffects();
int8 SetCurrent3DProvider(uint8 which);
- void SetDynamicAcousticModelingStatus(uint8 status);
+ void SetDynamicAcousticModelingStatus(bool8 status);
void SetEffectsFadeVol(uint8 volume) const;
void SetEffectsMasterVolume(uint8 volume) const;
- void SetEntityStatus(int32 id, uint8 status);
+ void SetEntityStatus(int32 id, bool8 status);
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision);
void SetMissionAudioLocation(float x, float y, float z);
void SetMissionScriptPoliceAudio(int32 sfx) const;
- void SetMonoMode(uint8 mono);
+ void SetMonoMode(bool8 mono);
void SetMusicFadeVol(uint8 volume) const;
void SetMusicMasterVolume(uint8 volume) const;
void SetSpeakerConfig(int32 conf) const;
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
void SetUpOneShotCollisionSound(const cAudioCollision &col);
- bool SetupCrimeReport();
- bool SetupJumboEngineSound(uint8 vol, uint32 freq);
- bool SetupJumboFlySound(uint8 emittingVol);
- bool SetupJumboRumbleSound(uint8 emittingVol);
- bool SetupJumboTaxiSound(uint8 vol);
- bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
+ bool8 SetupCrimeReport();
+ bool8 SetupJumboEngineSound(uint8 vol, uint32 freq);
+ bool8 SetupJumboFlySound(uint8 emittingVol);
+ bool8 SetupJumboRumbleSound(uint8 emittingVol);
+ bool8 SetupJumboTaxiSound(uint8 vol);
+ bool8 SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
void SetupPedComments(cPedParams &params, uint16 sound);
void SetupSuspectLastSeenReport();
@@ -487,9 +487,9 @@ public:
void UpdateGasPedalAudio(CAutomobile *automobile);
void UpdateReflections();
- bool UsesReverseWarning(int32 model) const;
- bool UsesSiren(int32 model) const;
- bool UsesSirenSwitching(int32 model) const;
+ bool8 UsesReverseWarning(int32 model) const;
+ bool8 UsesSiren(int32 model) const;
+ bool8 UsesSirenSwitching(int32 model) const;
#ifdef GTA_PC
// only used in pc
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 1027a084..eea91bd1 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -39,7 +39,7 @@ cDMAudio::DestroyEntity(int32 audioEntity)
}
void
-cDMAudio::SetEntityStatus(int32 audioEntity, uint8 status)
+cDMAudio::SetEntityStatus(int32 audioEntity, bool8 status)
{
AudioManager.SetEntityStatus(audioEntity, status);
}
@@ -57,7 +57,7 @@ cDMAudio::DestroyAllGameCreatedEntities(void)
}
void
-cDMAudio::SetMonoMode(uint8 mono)
+cDMAudio::SetMonoMode(bool8 mono)
{
AudioManager.SetMonoMode(mono);
}
@@ -128,7 +128,7 @@ cDMAudio::SetSpeakerConfig(int32 config)
AudioManager.SetSpeakerConfig(config);
}
-bool
+bool8
cDMAudio::IsMP3RadioChannelAvailable(void)
{
return AudioManager.IsMP3RadioChannelAvailable();
@@ -147,12 +147,12 @@ cDMAudio::ReacquireDigitalHandle(void)
}
void
-cDMAudio::SetDynamicAcousticModelingStatus(uint8 status)
+cDMAudio::SetDynamicAcousticModelingStatus(bool8 status)
{
AudioManager.SetDynamicAcousticModelingStatus(status);
}
-bool
+bool8
cDMAudio::CheckForAnAudioFileOnCD(void)
{
return AudioManager.CheckForAnAudioFileOnCD();
@@ -164,7 +164,7 @@ cDMAudio::GetCDAudioDriveLetter(void)
return AudioManager.GetCDAudioDriveLetter();
}
-bool
+bool8
cDMAudio::IsAudioInitialised(void)
{
return AudioManager.IsAudioInitialised();
@@ -182,7 +182,7 @@ cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject)
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
- AudioManager.SetEntityStatus(audioEntity, true);
+ AudioManager.SetEntityStatus(audioEntity, TRUE);
return audioEntity;
}
@@ -200,7 +200,7 @@ cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject)
if ( AEHANDLE_IS_OK(audioEntity) )
{
- AudioManager.SetEntityStatus(audioEntity, true);
+ AudioManager.SetEntityStatus(audioEntity, TRUE);
AudioManager.PlayOneShot(audioEntity, scriptObject->AudioId, 0.0f);
}
}
@@ -230,7 +230,7 @@ cDMAudio::PlayRadioAnnouncement(uint8 announcement)
}
void
-cDMAudio::PlayFrontEndTrack(uint8 track, uint8 frontendFlag)
+cDMAudio::PlayFrontEndTrack(uint8 track, bool8 frontendFlag)
{
MusicManager.PlayFrontEndTrack(track, frontendFlag);
}
@@ -295,7 +295,7 @@ cDMAudio::PlayLoadedMissionAudio(void)
AudioManager.PlayLoadedMissionAudio();
}
-bool
+bool8
cDMAudio::IsMissionAudioSampleFinished(void)
{
return AudioManager.IsMissionAudioSampleFinished();
diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h
index 3e6d5603..19689fab 100644
--- a/src/audio/DMAudio.h
+++ b/src/audio/DMAudio.h
@@ -22,11 +22,11 @@ public:
int32 CreateEntity(eAudioType type, void *UID);
void DestroyEntity(int32 audioEntity);
- void SetEntityStatus(int32 audioEntity, uint8 status);
+ void SetEntityStatus(int32 audioEntity, bool8 status);
void PlayOneShot(int32 audioEntity, uint16 oneShot, float volume);
void DestroyAllGameCreatedEntities(void);
- void SetMonoMode(uint8 mono);
+ void SetMonoMode(bool8 mono);
void SetEffectsMasterVolume(uint8 volume);
void SetMusicMasterVolume(uint8 volume);
void SetEffectsFadeVol(uint8 volume);
@@ -40,17 +40,17 @@ public:
void SetSpeakerConfig(int32 config);
- bool IsMP3RadioChannelAvailable(void);
+ bool8 IsMP3RadioChannelAvailable(void);
void ReleaseDigitalHandle(void);
void ReacquireDigitalHandle(void);
- void SetDynamicAcousticModelingStatus(uint8 status);
+ void SetDynamicAcousticModelingStatus(bool8 status);
- bool CheckForAnAudioFileOnCD(void);
+ bool8 CheckForAnAudioFileOnCD(void);
char GetCDAudioDriveLetter(void);
- bool IsAudioInitialised(void);
+ bool8 IsAudioInitialised(void);
void ReportCrime(eCrimeType crime, CVector const &pos);
@@ -64,7 +64,7 @@ public:
void PlayFrontEndSound(uint16 frontend, uint32 volume);
void PlayRadioAnnouncement(uint8 announcement);
- void PlayFrontEndTrack(uint8 track, uint8 frontendFlag);
+ void PlayFrontEndTrack(uint8 track, bool8 frontendFlag);
void StopFrontEndTrack(void);
void ResetTimers(uint32 time);
@@ -79,7 +79,7 @@ public:
uint8 GetMissionAudioLoadingStatus(void);
void SetMissionAudioLocation(float x, float y, float z);
void PlayLoadedMissionAudio(void);
- bool IsMissionAudioSampleFinished(void);
+ bool8 IsMissionAudioSampleFinished(void);
void ClearMissionAudio(void);
uint8 GetRadioInCar(void);
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 3e1a7384..88ef96fa 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -22,42 +22,42 @@ static_assert(false, "RADIO_SCROLL_TO_PREV_STATION and RADIO_OFF_TEXT won't work
cMusicManager MusicManager;
int32 gNumRetunePresses;
int32 gRetuneCounter;
-bool bHasStarted;
+bool8 bHasStarted;
cMusicManager::cMusicManager()
{
- m_bIsInitialised = false;
- m_bDisabled = false;
+ m_bIsInitialised = FALSE;
+ m_bDisabled = FALSE;
m_nMusicMode = MUSICMODE_DISABLED;
m_nNextTrack = NO_TRACK;
m_nPlayingTrack = NO_TRACK;
- m_bFrontendTrackFinished = false;
- m_bPlayInFrontend = false;
- m_bSetNextStation = false;
+ m_bFrontendTrackFinished = FALSE;
+ m_bPlayInFrontend = FALSE;
+ m_bSetNextStation = FALSE;
m_nAnnouncement = NO_TRACK;
- m_bPreviousPlayerInCar = false;
- m_bPlayerInCar = false;
- m_bAnnouncementInProgress = false;
- m_bVerifyAmbienceTrackStartedToPlay = false;
- bHasStarted = false;
+ m_bPreviousPlayerInCar = FALSE;
+ m_bPlayerInCar = FALSE;
+ m_bAnnouncementInProgress = FALSE;
+ m_bVerifyAmbienceTrackStartedToPlay = FALSE;
+ bHasStarted = FALSE;
}
-bool
+bool8
cMusicManager::PlayerInCar()
{
if(!FindPlayerVehicle())
- return false;
+ return FALSE;
int32 State = FindPlayerPed()->m_nPedState;
if(State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED)
- return false;
+ return FALSE;
if (!FindPlayerVehicle())
- return true;
+ return TRUE;
if (FindPlayerVehicle()->GetStatus() == STATUS_WRECKED)
- return false;
+ return FALSE;
switch (FindPlayerVehicle()->GetModelIndex()) {
case MI_FIRETRUCK:
@@ -67,8 +67,8 @@ cMusicManager::PlayerInCar()
case MI_TRAIN:
case MI_SPEEDER:
case MI_REEFER:
- case MI_GHOST: return false;
- default: return true;
+ case MI_GHOST: return FALSE;
+ default: return TRUE;
}
}
@@ -224,7 +224,7 @@ cMusicManager::DisplayRadioStationName()
}
}
-bool
+bool8
cMusicManager::Initialise()
{
int pos;
@@ -265,18 +265,18 @@ cMusicManager::Initialise()
m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
- m_bResetTimers = false;
+ m_bResetTimers = FALSE;
m_nResetTime = 0;
m_nTimer = m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
- m_bDoTrackService = false;
- m_bIgnoreTimeDelay = false;
- m_bRadioSetByScript = false;
+ m_bDoTrackService = FALSE;
+ m_bIgnoreTimeDelay = FALSE;
+ m_bRadioSetByScript = FALSE;
m_nRadioStationScript = HEAD_RADIO;
m_nRadioPosition = -1;
m_nRadioInCar = NO_TRACK;
gNumRetunePresses = 0;
gRetuneCounter = 0;
- m_bIsInitialised = true;
+ m_bIsInitialised = TRUE;
}
return m_bIsInitialised;
}
@@ -291,7 +291,7 @@ cMusicManager::Terminate()
m_nNextTrack = NO_TRACK;
m_nPlayingTrack = NO_TRACK;
}
- m_bIsInitialised = false;
+ m_bIsInitialised = FALSE;
}
void
@@ -325,16 +325,16 @@ cMusicManager::ChangeMusicMode(uint8 mode)
}
m_nNextTrack = NO_TRACK;
m_nPlayingTrack = NO_TRACK;
- m_bFrontendTrackFinished = false;
- m_bPlayInFrontend = false;
- m_bSetNextStation = false;
- m_bPreviousPlayerInCar = false;
- m_bPlayerInCar = false;
- m_bAnnouncementInProgress = false;
+ m_bFrontendTrackFinished = FALSE;
+ m_bPlayInFrontend = FALSE;
+ m_bSetNextStation = FALSE;
+ m_bPreviousPlayerInCar = FALSE;
+ m_bPlayerInCar = FALSE;
+ m_bAnnouncementInProgress = FALSE;
m_nTimer = m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
- m_bDoTrackService = false;
- m_bIgnoreTimeDelay = true;
- m_bVerifyAmbienceTrackStartedToPlay = false;
+ m_bDoTrackService = FALSE;
+ m_bIgnoreTimeDelay = TRUE;
+ m_bVerifyAmbienceTrackStartedToPlay = FALSE;
m_nMusicMode = mode2;
break;
default: return;
@@ -383,7 +383,7 @@ void
cMusicManager::SetRadioChannelByScript(uint8 station, int32 pos)
{
if (m_bIsInitialised && station < RADIO_OFF) {
- m_bRadioSetByScript = true;
+ m_bRadioSetByScript = TRUE;
m_nRadioStationScript = station;
m_nRadioPosition = pos == -1 ? -1 : pos % m_aTracks[station].m_nLength;
}
@@ -393,12 +393,12 @@ cMusicManager::SetRadioChannelByScript(uint8 station, int32 pos)
void
cMusicManager::ResetMusicAfterReload()
{
- m_bRadioSetByScript = false;
+ m_bRadioSetByScript = FALSE;
m_nRadioStationScript = 0;
m_nRadioPosition = -1;
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
- m_bSetNextStation = false;
+ m_bAnnouncementInProgress = FALSE;
+ m_bSetNextStation = FALSE;
gRetuneCounter = 0;
gNumRetunePresses = 0;
}
@@ -407,7 +407,7 @@ cMusicManager::ResetMusicAfterReload()
void
cMusicManager::ResetTimers(int32 time)
{
- m_bResetTimers = true;
+ m_bResetTimers = TRUE;
m_nResetTime = time;
}
@@ -415,23 +415,23 @@ void
cMusicManager::Service()
{
if (m_bResetTimers) {
- m_bResetTimers = false;
+ m_bResetTimers = FALSE;
m_nLastTrackServiceTime = m_nResetTime;
}
if (!m_bIsInitialised || m_bDisabled) return;
if (m_nMusicMode == MUSICMODE_CUTSCENE) {
- SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 0);
+ SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE, 0);
return;
}
m_nTimer = CTimer::GetTimeInMillisecondsPauseMode();
if (m_nTimer > (m_nLastTrackServiceTime + 2000) || m_bIgnoreTimeDelay) {
- m_bIgnoreTimeDelay = false;
- m_bDoTrackService = true;
+ m_bIgnoreTimeDelay = FALSE;
+ m_bDoTrackService = TRUE;
m_nLastTrackServiceTime = m_nTimer;
- } else m_bDoTrackService = false;
+ } else m_bDoTrackService = FALSE;
if (m_nNextTrack == NO_TRACK && SampleManager.IsStreamPlaying(0))
SampleManager.StopStreamedFile(0);
@@ -466,22 +466,22 @@ cMusicManager::ServiceFrontEndMode()
if (!SampleManager.IsStreamPlaying(0))
SampleManager.StartStreamedFile(m_nNextTrack, 0, 0);
} else {
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
if (!SampleManager.StartStreamedFile(m_nNextTrack, m_nNextTrack < NUM_RADIOS ? GetTrackStartPos(m_nNextTrack) : 0, 0))
return;
- SampleManager.SetStreamedVolumeAndPan(100, 63, 0, 0);
- if (m_bPlayInFrontend) bHasStarted = true;
- else m_bFrontendTrackFinished = true;
+ SampleManager.SetStreamedVolumeAndPan(100, 63, FALSE, 0);
+ if (m_bPlayInFrontend) bHasStarted = TRUE;
+ else m_bFrontendTrackFinished = TRUE;
}
}
if (SampleManager.IsStreamPlaying(0))
- SampleManager.SetStreamedVolumeAndPan((CPad::GetPad(0)->bDisplayNoControllerMessage || CPad::GetPad(0)->bObsoleteControllerMessage) ? 0 : 100, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan((CPad::GetPad(0)->bDisplayNoControllerMessage || CPad::GetPad(0)->bObsoleteControllerMessage) ? 0 : 100, 63, FALSE, 0);
}
void
cMusicManager::ServiceGameMode()
{
- bool bRadioOff = false;
+ bool8 bRadioOff = FALSE;
static int8 nFramesSinceCutsceneEnded = -1;
uint8 volume;
@@ -525,7 +525,7 @@ cMusicManager::ServiceGameMode()
}
if (AudioManager.m_nPreviousUserPause)
- m_bPreviousPlayerInCar = false;
+ m_bPreviousPlayerInCar = FALSE;
if (!m_bPlayerInCar) {
if (m_bPreviousPlayerInCar) {
if (m_nNextTrack != STREAMED_SOUND_RADIO_POLICE)
@@ -541,7 +541,7 @@ cMusicManager::ServiceGameMode()
&& ServiceAnnouncement())
{
if (m_bAnnouncementInProgress) {
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
return;
}
m_nPlayingTrack = m_nNextTrack;
@@ -558,7 +558,7 @@ cMusicManager::ServiceGameMode()
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 1.0f);
gRetuneCounter = 0;
gNumRetunePresses = 0;
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
}
// Because when you switch radio back and forth, gNumRetunePresses will be 0 but gRetuneCounter won't.
#ifdef RADIO_SCROLL_TO_PREV_STATION
@@ -566,24 +566,24 @@ cMusicManager::ServiceGameMode()
if (gRetuneCounter > 1) gRetuneCounter--;
else if (gRetuneCounter == 1) gRetuneCounter = -1;
else if (gRetuneCounter == -1) {
- m_bSetNextStation = true;
+ m_bSetNextStation = TRUE;
gRetuneCounter = 0;
}
}
#else
if (gNumRetunePresses) {
if (gRetuneCounter != 0) gRetuneCounter--;
- else m_bSetNextStation = true;
+ else m_bSetNextStation = TRUE;
}
#endif
if (gRetuneCounter)
AudioManager.DoPoliceRadioCrackle();
if (m_bSetNextStation) {
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
m_nPlayingTrack = m_nNextTrack;
m_nNextTrack = GetNextCarTuning();
if (m_nNextTrack == STREAMED_SOUND_CITY_AMBIENT || m_nNextTrack == STREAMED_SOUND_WATER_AMBIENT)
- bRadioOff = true;
+ bRadioOff = TRUE;
if (m_nPlayingTrack == STREAMED_SOUND_CITY_AMBIENT || m_nPlayingTrack == STREAMED_SOUND_WATER_AMBIENT)
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 0.0f);
@@ -592,7 +592,7 @@ cMusicManager::ServiceGameMode()
if (ChangeRadioChannel()) {
ServiceTrack();
} else {
- m_bPlayerInCar = false;
+ m_bPlayerInCar = FALSE;
if (FindPlayerVehicle())
FindPlayerVehicle()->m_nRadioStation = m_nNextTrack;
m_nNextTrack = NO_TRACK;
@@ -601,7 +601,7 @@ cMusicManager::ServiceGameMode()
if (TheCamera.pTargetEntity != nil) {
float DistToTargetSq = (TheCamera.pTargetEntity->GetPosition() - TheCamera.GetPosition()).MagnitudeSqr();
if (DistToTargetSq >= SQR(55.0f)) {
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
} else if (DistToTargetSq >= SQR(10.0f)) {
volume = ((45.0f - (Sqrt(DistToTargetSq) - 10.0f)) / 45.0f * 100.0f);
uint8 pan;
@@ -616,17 +616,17 @@ cMusicManager::ServiceGameMode()
}
if (gRetuneCounter)
volume /= 4;
- SampleManager.SetStreamedVolumeAndPan(volume, pan, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(volume, pan, FALSE, 0);
} else if (AudioManager.ShouldDuckMissionAudio()) {
- SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(25, 63, FALSE, 0);
} else if (gRetuneCounter) {
- SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(25, 63, FALSE, 0);
} else {
- SampleManager.SetStreamedVolumeAndPan(100, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(100, 63, FALSE, 0);
}
}
} else if (AudioManager.ShouldDuckMissionAudio()) {
- SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(25, 63, FALSE, 0);
nFramesSinceCutsceneEnded = 0;
} else {
if (nFramesSinceCutsceneEnded == -1) {
@@ -643,7 +643,7 @@ cMusicManager::ServiceGameMode()
}
if (gRetuneCounter != 0)
volume /= 4;
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, FALSE, 0);
}
return;
}
@@ -663,7 +663,7 @@ cMusicManager::ServiceGameMode()
m_nNextTrack = m_nRadioStationScript;
if (FindPlayerVehicle()->m_nRadioStation == m_nNextTrack) {
m_nPlayingTrack = NO_TRACK;
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
SampleManager.StopStreamedFile(0);
}
if (m_nRadioPosition != -1) {
@@ -680,11 +680,11 @@ cMusicManager::ServiceGameMode()
}
if (ChangeRadioChannel()) {
if (m_bRadioSetByScript) {
- m_bRadioSetByScript = false;
+ m_bRadioSetByScript = FALSE;
FindPlayerVehicle()->m_nRadioStation = m_nNextTrack;
}
} else {
- m_bPlayerInCar = false;
+ m_bPlayerInCar = FALSE;
m_nNextTrack = NO_TRACK;
}
}
@@ -709,14 +709,14 @@ cMusicManager::PlayAnnouncement(uint8 announcement)
}
void
-cMusicManager::PlayFrontEndTrack(uint8 track, uint8 bPlayInFrontend)
+cMusicManager::PlayFrontEndTrack(uint8 track, bool8 bPlayInFrontend)
{
if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS) {
if (m_nMusicMode == MUSICMODE_GAME) {
if (m_nNextTrack != NO_TRACK) {
if (m_bAnnouncementInProgress) {
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
}
m_aTracks[m_nNextTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0);
m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
@@ -732,10 +732,10 @@ cMusicManager::PlayFrontEndTrack(uint8 track, uint8 bPlayInFrontend)
m_nPlayingTrack = m_nNextTrack;
m_nNextTrack = track;
- m_bPlayInFrontend = !!bPlayInFrontend;
- m_bFrontendTrackFinished = false;
- m_bDoTrackService = true;
- bHasStarted = false;
+ m_bPlayInFrontend = bPlayInFrontend;
+ m_bFrontendTrackFinished = FALSE;
+ m_bDoTrackService = TRUE;
+ bHasStarted = FALSE;
if (m_nNextTrack < NUM_RADIOS) {
gRetuneCounter = 0;
gNumRetunePresses = 0;
@@ -751,7 +751,7 @@ cMusicManager::PreloadCutSceneMusic(uint8 track)
while (SampleManager.IsStreamPlaying(0))
SampleManager.StopStreamedFile(0);
SampleManager.PreloadStreamedFile(track, 0);
- SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 0);
+ SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE, 0);
m_nNextTrack = track;
}
}
@@ -787,7 +787,7 @@ cMusicManager::GetTrackStartPos(uint8 track)
}
-bool
+bool8
cMusicManager::UsesPoliceRadio(CVehicle *veh)
{
switch (veh->GetModelIndex())
@@ -798,9 +798,9 @@ cMusicManager::UsesPoliceRadio(CVehicle *veh)
case MI_PREDATOR:
case MI_RHINO:
case MI_BARRACKS:
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -810,7 +810,7 @@ cMusicManager::ServiceAmbience()
if (m_bAnnouncementInProgress) {
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
}
if (m_nNextTrack < RADIO_OFF) {
if (SampleManager.IsStreamPlaying(0)) {
@@ -831,11 +831,11 @@ cMusicManager::ServiceAmbience()
m_nNextTrack = TheCamera.DistanceToWater <= 45.0f ? STREAMED_SOUND_WATER_AMBIENT : STREAMED_SOUND_CITY_AMBIENT;
if (m_nNextTrack == m_nPlayingTrack) {
- ComputeAmbienceVol(false, volume);
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
+ ComputeAmbienceVol(FALSE, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE, 0);
if (m_bVerifyAmbienceTrackStartedToPlay) {
if (SampleManager.IsStreamPlaying(0))
- m_bVerifyAmbienceTrackStartedToPlay = false;
+ m_bVerifyAmbienceTrackStartedToPlay = FALSE;
} else ServiceTrack();
} else {
if (m_nPlayingTrack < TOTAL_STREAMED_SOUNDS) {
@@ -844,18 +844,18 @@ cMusicManager::ServiceAmbience()
SampleManager.StopStreamedFile(0);
}
uint32 pos = GetTrackStartPos(m_nNextTrack);
- SampleManager.SetStreamedVolumeAndPan(0, 63, 1, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, TRUE, 0);
if (SampleManager.StartStreamedFile(m_nNextTrack, pos, 0)) {
- ComputeAmbienceVol(true, volume);
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
- m_bVerifyAmbienceTrackStartedToPlay = true;
+ ComputeAmbienceVol(TRUE, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE, 0);
+ m_bVerifyAmbienceTrackStartedToPlay = TRUE;
} else
m_nNextTrack = NO_TRACK;
}
}
void
-cMusicManager::ComputeAmbienceVol(uint8 reset, uint8 &outVolume)
+cMusicManager::ComputeAmbienceVol(bool8 reset, uint8 &outVolume)
{
static float fVol = 0.0f;
@@ -883,16 +883,16 @@ cMusicManager::ServiceTrack()
}
}
-bool
+bool8
cMusicManager::ServiceAnnouncement()
{
static int8 cCheck = 0;
if (m_bAnnouncementInProgress) {
if (!SampleManager.IsStreamPlaying(0)) {
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
}
- return true;
+ return TRUE;
}
if (++cCheck >= 30) {
@@ -906,21 +906,21 @@ cMusicManager::ServiceAnnouncement()
}
}
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
if (SampleManager.StartStreamedFile(m_nAnnouncement, 0, 0)) {
- SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, 0, 0);
- m_bAnnouncementInProgress = true;
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, FALSE, 0);
+ m_bAnnouncementInProgress = TRUE;
m_nPlayingTrack = m_nNextTrack;
m_nNextTrack = m_nAnnouncement;
- return true;
+ return TRUE;
}
if (cCheck != 0) cCheck--;
else cCheck = 30;
- return false;
+ return FALSE;
}
- return false;
+ return FALSE;
}
uint8
@@ -987,21 +987,21 @@ cMusicManager::GetNextCarTuning()
return veh->m_nRadioStation;
}
-bool
+bool8
cMusicManager::ChangeRadioChannel()
{
if (m_nNextTrack != m_nPlayingTrack) {
if (m_nPlayingTrack < TOTAL_STREAMED_SOUNDS) {
m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0);
m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
SampleManager.StopStreamedFile(0);
}
if (SampleManager.IsStreamPlaying(0))
- return false;
+ return FALSE;
if (!SampleManager.StartStreamedFile(m_nNextTrack, GetTrackStartPos(m_nNextTrack), 0))
- return false;
- SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, 0, 0);
+ return FALSE;
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, FALSE, 0);
}
- return true;
+ return TRUE;
}
diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h
index 5d277f0e..4c4447fe 100644
--- a/src/audio/MusicManager.h
+++ b/src/audio/MusicManager.h
@@ -15,48 +15,48 @@ class CVehicle;
class cMusicManager
{
public:
- bool m_bIsInitialised;
- bool m_bDisabled;
+ bool8 m_bIsInitialised;
+ bool8 m_bDisabled;
uint8 m_nMusicMode;
uint8 m_nNextTrack;
uint8 m_nPlayingTrack;
- bool m_bFrontendTrackFinished;
- bool m_bPlayInFrontend;
- bool m_bSetNextStation;
+ bool8 m_bFrontendTrackFinished;
+ bool8 m_bPlayInFrontend;
+ bool8 m_bSetNextStation;
uint8 m_nAnnouncement;
- bool m_bPreviousPlayerInCar;
- bool m_bPlayerInCar;
- bool m_bAnnouncementInProgress;
+ bool8 m_bPreviousPlayerInCar;
+ bool8 m_bPlayerInCar;
+ bool8 m_bAnnouncementInProgress;
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
- bool m_bResetTimers;
+ bool8 m_bResetTimers;
uint32 m_nResetTime;
uint32 m_nLastTrackServiceTime;
uint32 m_nTimer;
- bool m_bDoTrackService;
- bool m_bIgnoreTimeDelay;
- bool m_bVerifyAmbienceTrackStartedToPlay;
- bool m_bRadioSetByScript;
+ bool8 m_bDoTrackService;
+ bool8 m_bIgnoreTimeDelay;
+ bool8 m_bVerifyAmbienceTrackStartedToPlay;
+ bool8 m_bRadioSetByScript;
uint8 m_nRadioStationScript;
int32 m_nRadioPosition;
uint8 m_nRadioInCar;
public:
cMusicManager();
- bool IsInitialised() { return m_bIsInitialised; }
+ bool8 IsInitialised() { return m_bIsInitialised; }
uint32 GetMusicMode() { return m_nMusicMode; }
uint8 GetNextTrack() { return m_nNextTrack; }
- bool Initialise();
+ bool8 Initialise();
void Terminate();
void ChangeMusicMode(uint8 mode);
void StopFrontEndTrack();
- bool PlayerInCar();
+ bool8 PlayerInCar();
void DisplayRadioStationName();
void PlayAnnouncement(uint8);
- void PlayFrontEndTrack(uint8, uint8);
+ void PlayFrontEndTrack(uint8, bool8);
void PreloadCutSceneMusic(uint8);
void PlayPreloadedCutSceneMusic(void);
void StopCutSceneMusic(void);
@@ -73,15 +73,15 @@ public:
void ServiceAmbience();
void ServiceTrack();
- bool UsesPoliceRadio(CVehicle *veh);
+ bool8 UsesPoliceRadio(CVehicle *veh);
uint32 GetTrackStartPos(uint8);
- void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
- bool ServiceAnnouncement();
+ void ComputeAmbienceVol(bool8 reset, uint8& outVolume);
+ bool8 ServiceAnnouncement();
uint8 GetCarTuning();
uint8 GetNextCarTuning();
- bool ChangeRadioChannel();
+ bool8 ChangeRadioChannel();
};
VALIDATE_SIZE(cMusicManager, 0x95C);
diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp
index cb12a2fe..3664796b 100644
--- a/src/audio/PolRadio.cpp
+++ b/src/audio/PolRadio.cpp
@@ -94,8 +94,8 @@ cAudioManager::InitialisePoliceRadio()
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++)
m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
- SampleManager.SetChannelReverbFlag(policeChannel, false);
- gSpecialSuspectLastSeenReport = false;
+ SampleManager.SetChannelReverbFlag(policeChannel, FALSE);
+ gSpecialSuspectLastSeenReport = FALSE;
for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++)
gMinTimeToNextReport[i] = m_FrameCounter;
}
@@ -131,7 +131,7 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_nVolume = m_anRandomTable[2] % 20 + 15;
@@ -139,11 +139,11 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_POLICE_RADIO_CRACKLE);
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = FALSE;
m_sQueueSample.m_nOffset = 63;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
@@ -156,7 +156,7 @@ cAudioManager::ServicePoliceRadio()
if(!m_bIsInitialised) return;
if(m_nUserPause == 0) {
- bool crimeReport = SetupCrimeReport();
+ bool8 crimeReport = SetupCrimeReport();
#ifdef FIX_BUGS // Crash at 0x5fe6ef
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
return;
@@ -179,12 +179,12 @@ cAudioManager::ServicePoliceRadio()
void
cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
{
- bool processed = false;
+ bool8 processed = FALSE;
uint32 sample;
int32 freq;
static int cWait = 0;
- static bool bChannelOpen = false;
+ static bool8 bChannelOpen = FALSE;
static uint8 bMissionAudioPhysicalPlayingStatus = 0;
static int32 PoliceChannelFreq = 5500;
@@ -194,14 +194,14 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == 1 &&
SampleManager.IsStreamPlaying(1)) {
- SampleManager.PauseStream(1, 1);
+ SampleManager.PauseStream(TRUE, 1);
}
} else {
if (m_nPreviousUserPause && g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES &&
bMissionAudioPhysicalPlayingStatus == 1) {
- SampleManager.PauseStream(0, 1);
+ SampleManager.PauseStream(FALSE, 1);
}
- if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = false;
+ if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = FALSE;
if (cWait) {
--cWait;
return;
@@ -225,7 +225,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
}
} else if (!SampleManager.GetChannelUsedFlag(policeChannel)) {
SampleManager.PreloadStreamedFile(g_nMissionAudioSfx, 1);
- SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 1);
+ SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE, 1);
SampleManager.StartPreloadedStreamedFile(1);
g_nMissionAudioPlayingStatus = 1;
bMissionAudioPhysicalPlayingStatus = 0;
@@ -246,8 +246,8 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
if (gSpecialSuspectLastSeenReport) {
gSpecialSuspectLastSeenReport = 0;
} else if (((sample >= SFX_POLICE_RADIO_MESSAGE_NOISE_1) && (sample <= SFX_POLICE_RADIO_MESSAGE_NOISE_3)) || sample == TOTAL_AUDIO_SAMPLES) {
- bChannelOpen = false;
- processed = true;
+ bChannelOpen = FALSE;
+ processed = TRUE;
}
}
if (sample == TOTAL_AUDIO_SAMPLES) {
@@ -259,7 +259,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
case SFX_POLICE_RADIO_MESSAGE_NOISE_2:
case SFX_POLICE_RADIO_MESSAGE_NOISE_3:
freq = m_anRandomTable[4] % 2000 + 10025;
- bChannelOpen = bChannelOpen == false;
+ bChannelOpen = bChannelOpen == FALSE;
break;
default: freq = SampleManager.GetSampleBaseFrequency(sample); break;
}
@@ -276,7 +276,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
}
}
-bool
+bool8
cAudioManager::SetupCrimeReport()
{
int16 audioZoneId;
@@ -289,13 +289,13 @@ cAudioManager::SetupCrimeReport()
float quarterY;
int i;
int32 sampleIndex;
- bool processed = false;
+ bool8 processed = FALSE;
- if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return false;
+ if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return FALSE;
if (60 - m_sPoliceRadioQueue.policeChannelTimer <= 9) {
AgeCrimes();
- return true;
+ return TRUE;
}
for (i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
@@ -303,7 +303,7 @@ cAudioManager::SetupCrimeReport()
break;
}
- if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return false;
+ if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return FALSE;
audioZoneId = CTheZones::FindAudioZone(&m_sPoliceRadioQueue.crimes[i].position);
if (audioZoneId >= 0 && audioZoneId < NUMAUDIOZONES) {
zone = CTheZones::GetAudioZone(audioZoneId);
@@ -336,10 +336,10 @@ cAudioManager::SetupCrimeReport()
if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
m_sPoliceRadioQueue.Add(SFX_NORTH);
- processed = true;
+ processed = TRUE;
} else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
m_sPoliceRadioQueue.Add(SFX_SOUTH);
- processed = true;
+ processed = TRUE;
}
if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
@@ -359,7 +359,7 @@ cAudioManager::SetupCrimeReport()
}
m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
AgeCrimes();
- return true;
+ return TRUE;
}
void
@@ -714,7 +714,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
float quarterX;
float quarterY;
int32 sample;
- bool processed = false;
+ bool8 processed = false;
CVector vec = CVector(x, y, z);
if (!m_bIsInitialised) return;
@@ -745,10 +745,10 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
if (vec.y > halfY + quarterY) {
m_sPoliceRadioQueue.Add(SFX_NORTH);
- processed = true;
+ processed = TRUE;
} else if (vec.y < halfY - quarterY) {
m_sPoliceRadioQueue.Add(SFX_SOUTH);
- processed = true;
+ processed = TRUE;
}
if (vec.x > halfX + quarterX)
@@ -761,7 +761,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
m_sPoliceRadioQueue.Add(sample);
m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
- gSpecialSuspectLastSeenReport = true;
+ gSpecialSuspectLastSeenReport = TRUE;
break;
}
}
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index a5f6c7e2..765c75d3 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -118,10 +118,10 @@ class cSampleManager
uint8 m_nMusicVolume;
uint8 m_nEffectsFadeVolume;
uint8 m_nMusicFadeVolume;
- uint8 m_nMonoMode;
+ bool8 m_nMonoMode;
char unk;
char m_szCDRomRootPath[80];
- bool m_bInitialised;
+ bool8 m_bInitialised;
uint8 m_nNumberOfProviders;
char *m_aAudioProviders[MAXPROVIDERS];
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
@@ -145,16 +145,16 @@ public:
int8 GetCurrent3DProviderIndex(void);
int8 SetCurrent3DProvider(uint8 which);
- bool IsMP3RadioChannelAvailable(void);
+ bool8 IsMP3RadioChannelAvailable(void);
void ReleaseDigitalHandle (void);
void ReacquireDigitalHandle(void);
- bool Initialise(void);
- void Terminate (void);
+ bool8 Initialise(void);
+ void Terminate (void);
- bool CheckForAnAudioFileOnCD(void);
- char GetCDAudioDriveLetter (void);
+ bool8 CheckForAnAudioFileOnCD(void);
+ char GetCDAudioDriveLetter (void);
void UpdateEffectsVolume(void);
@@ -162,14 +162,14 @@ public:
void SetMusicMasterVolume (uint8 nVolume);
void SetEffectsFadeVolume (uint8 nVolume);
void SetMusicFadeVolume (uint8 nVolume);
- void SetMonoMode (uint8 nMode);
+ void SetMonoMode (bool8 nMode);
- bool LoadSampleBank (uint8 nBank);
- void UnloadSampleBank (uint8 nBank);
- bool IsSampleBankLoaded(uint8 nBank);
+ bool8 LoadSampleBank (uint8 nBank);
+ void UnloadSampleBank (uint8 nBank);
+ bool8 IsSampleBankLoaded(uint8 nBank);
- bool IsPedCommentLoaded(uint32 nComment);
- bool LoadPedComment (uint32 nComment);
+ bool8 IsPedCommentLoaded(uint32 nComment);
+ bool8 LoadPedComment (uint32 nComment);
int32 GetBankContainingSound(uint32 offset);
int32 _GetPedCommentSlot(uint32 nComment);
@@ -179,10 +179,10 @@ public:
int32 GetSampleLoopEndOffset (uint32 nSample);
uint32 GetSampleLength (uint32 nSample);
- bool UpdateReverb(void);
+ bool8 UpdateReverb(void);
- void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
- bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
+ void SetChannelReverbFlag (uint32 nChannel, bool8 nReverbFlag);
+ bool8 InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
@@ -191,23 +191,23 @@ public:
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
- bool GetChannelUsedFlag (uint32 nChannel);
+ bool8 GetChannelUsedFlag (uint32 nChannel);
void StartChannel (uint32 nChannel);
void StopChannel (uint32 nChannel);
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
- void PauseStream (uint8 nPauseFlag, uint8 nStream);
+ void PauseStream (bool8 nPauseFlag, uint8 nStream);
void StartPreloadedStreamedFile (uint8 nStream);
- bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
+ bool8 StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
void StopStreamedFile (uint8 nStream);
int32 GetStreamedFilePosition (uint8 nStream);
- void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
+ void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream);
int32 GetStreamedFileLength (uint8 nStream);
- bool IsStreamPlaying (uint8 nStream);
+ bool8 IsStreamPlaying (uint8 nStream);
#ifdef AUDIO_OAL
void Service(void);
#endif
- bool InitialiseSampleBanks(void);
+ bool8 InitialiseSampleBanks(void);
};
extern cSampleManager SampleManager;
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 351c4958..4237c6a3 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -28,7 +28,7 @@ char SampleBankDataFilename[] = "AUDIO\\SFX.RAW";
FILE *fpSampleDescHandle;
FILE *fpSampleDataHandle;
-bool bSampleBankLoaded [MAX_SFX_BANKS];
+bool8 bSampleBankLoaded [MAX_SFX_BANKS];
int32 nSampleBankDiscStartOffset [MAX_SFX_BANKS];
int32 nSampleBankSize [MAX_SFX_BANKS];
int32 nSampleBankMemoryStartAddress[MAX_SFX_BANKS];
@@ -62,16 +62,16 @@ int8 nStreamPan [MAX_STREAMS];
int8 nStreamVolume[MAX_STREAMS];
uint32 _CurMP3Index;
int32 _CurMP3Pos;
-bool _bIsMp3Active;
+bool8 _bIsMp3Active;
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
-bool _bUseHDDAudio;
+bool8 _bUseHDDAudio;
char _aHDDPath[MAX_PATH];
#endif
///////////////////////////////////////////////////////////////
-bool _bSampmanInitialised = false;
+bool8 _bSampmanInitialised = FALSE;
//
// Miscellaneous globals / defines
@@ -98,7 +98,7 @@ S32 speaker_type=0;
U32 _maxSamples;
float _fPrevEaxRatioDestination;
-bool _usingMilesFast2D;
+bool8 _usingMilesFast2D;
float _fEffectsLevel;
@@ -170,17 +170,17 @@ release_existing()
}
_fPrevEaxRatioDestination = 0.0f;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
_fEffectsLevel = 0.0f;
}
-static bool
+static bool8
set_new_provider(S32 index)
{
DWORD result;
if ( curprovider == index )
- return true;
+ return TRUE;
//close the already opened provider
curprovider = index;
@@ -207,7 +207,7 @@ set_new_provider(S32 index)
release_existing();
- return false;
+ return FALSE;
}
else
{
@@ -238,7 +238,7 @@ set_new_provider(S32 index)
AIL_set_3D_room_type(opened_provider, ENVIRONMENT_CAVE);
if ( !strcmp(providers[index].name, "Miles Fast 2D Positional Audio") )
- _usingMilesFast2D = true;
+ _usingMilesFast2D = TRUE;
}
AIL_3D_provider_attribute(opened_provider, "Maximum supported samples", &_maxSamples);
@@ -256,11 +256,11 @@ set_new_provider(S32 index)
AIL_set_3D_sample_effects_level(opened_samples[i], 0.0f);
}
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
cSampleManager::cSampleManager(void) :
@@ -353,7 +353,7 @@ cSampleManager::SetCurrent3DProvider(uint8 nProvider)
return curprovider;
}
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
IShellLink* psl;
@@ -389,7 +389,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -399,15 +399,15 @@ _ResolveLink(char const *path, char *out)
psl->Release();
}
- return false;
+ return FALSE;
}
static void
_FindMP3s(void)
{
tMP3Entry *pList;
- bool bShortcut;
- bool bInitFirstEntry;
+ bool8 bShortcut;
+ bool8 bInitFirstEntry;
HANDLE hFind;
char path[MAX_PATH];
char filepath[MAX_PATH*2];
@@ -474,10 +474,10 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - couldn't resolve shortcut");
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
- bShortcut = false;
+ bShortcut = FALSE;
}
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
@@ -524,7 +524,7 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - OK\n");
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -534,10 +534,10 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -569,11 +569,11 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - couldn't resolve shortcut");
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
if ( filepathlen > MAX_PATH )
{
@@ -620,7 +620,7 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - OK\n");
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -658,11 +658,11 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - couldn't resolve shortcut");
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
}
}
@@ -784,7 +784,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -797,7 +797,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -808,10 +808,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -840,13 +840,13 @@ cSampleManager::ReacquireDigitalHandle(void)
}
}
-bool
+bool8
cSampleManager::Initialise(void)
{
TRACE("start");
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
{
for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
@@ -872,7 +872,7 @@ cSampleManager::Initialise(void)
curprovider = -1;
prevprovider = -1;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
usingEAX=0;
usingEAX3=0;
@@ -897,7 +897,7 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < MAX_SFX_BANKS; i++ )
{
- bSampleBankLoaded[i] = false;
+ bSampleBankLoaded[i] = FALSE;
nSampleBankDiscStartOffset[i] = 0;
nSampleBankSize[i] = 0;
nSampleBankMemoryStartAddress[i] = 0;
@@ -936,7 +936,7 @@ cSampleManager::Initialise(void)
{
OutputDebugString(AIL_last_error());
Terminate();
- return false;
+ return FALSE;
}
add_providers();
@@ -944,14 +944,14 @@ cSampleManager::Initialise(void)
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
@@ -964,7 +964,7 @@ cSampleManager::Initialise(void)
if (cacheFile) {
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
fclose(cacheFile);
- m_bInitialised = true;
+ m_bInitialised = TRUE;
}else {
#endif
TRACE("cdrom");
@@ -973,9 +973,9 @@ cSampleManager::Initialise(void)
char filepath[MAX_PATH];
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
- while (true)
+ while (TRUE)
{
int32 drive = 'C';
@@ -1000,7 +1000,7 @@ cSampleManager::Initialise(void)
{
fclose(f);
- bool bFileNotFound = false;
+ bool8 bFileNotFound = FALSE;
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
@@ -1020,19 +1020,19 @@ cSampleManager::Initialise(void)
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
if ( !bFileNotFound )
{
- m_bInitialised = true;
+ m_bInitialised = TRUE;
break;
}
else
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
continue;
}
}
@@ -1047,11 +1047,11 @@ cSampleManager::Initialise(void)
if ( FrontEndMenuManager.m_bQuitGameNoCD )
{
Terminate();
- return false;
+ return FALSE;
}
continue;
#else
- m_bInitialised = true;
+ m_bInitialised = TRUE;
#endif
}
@@ -1071,7 +1071,7 @@ cSampleManager::Initialise(void)
{
int32 streamLength[TOTAL_STREAMED_SOUNDS];
- bool bFileNotFound = false;
+ bool8 bFileNotFound = FALSE;
char rootpath[MAX_PATH];
strcpy(_aHDDPath, m_szCDRomRootPath);
@@ -1101,14 +1101,14 @@ cSampleManager::Initialise(void)
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
}
else
- bFileNotFound = true;
+ bFileNotFound = TRUE;
if ( !bFileNotFound )
{
@@ -1117,10 +1117,10 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
nStreamLength[i] = streamLength[i];
- _bUseHDDAudio = true;
+ _bUseHDDAudio = TRUE;
}
else
- _bUseHDDAudio = false;
+ _bUseHDDAudio = FALSE;
}
#endif
#ifdef AUDIO_CACHE
@@ -1152,7 +1152,7 @@ cSampleManager::Initialise(void)
TRACE("providerset");
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
U32 n = 0;
@@ -1169,7 +1169,7 @@ cSampleManager::Initialise(void)
if ( n == m_nNumberOfProviders )
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1198,13 +1198,13 @@ cSampleManager::Initialise(void)
time_t t = time(NULL);
tm *localtm;
- bool bUseRandomTable;
+ bool8 bUseRandomTable;
if ( t == -1 )
- bUseRandomTable = true;
+ bUseRandomTable = TRUE;
else
{
- bUseRandomTable = false;
+ bUseRandomTable = FALSE;
localtm = localtime(&t);
}
@@ -1236,12 +1236,12 @@ cSampleManager::Initialise(void)
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
TRACE("end");
- return true;
+ return TRUE;
}
void
@@ -1290,10 +1290,10 @@ cSampleManager::Terminate(void)
AIL_shutdown();
- _bSampmanInitialised = false;
+ _bSampmanInitialised = FALSE;
}
-bool
+bool8
cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
@@ -1316,13 +1316,13 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
{
fclose(f);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
#else
- return true;
+ return TRUE;
#endif // #if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
}
@@ -1415,48 +1415,48 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
}
void
-cSampleManager::SetMonoMode(uint8 nMode)
+cSampleManager::SetMonoMode(bool8 nMode)
{
m_nMonoMode = nMode;
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
if ( MusicManager.IsInitialised()
&& MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
&& nBank != SFX_BANK_0 )
{
- return false;
+ return FALSE;
}
if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank],fpSampleDataHandle) != nSampleBankSize[nBank] )
- return false;
+ return FALSE;
- bSampleBankLoaded[nBank] = true;
+ bSampleBankLoaded[nBank] = TRUE;
- return true;
+ return TRUE;
}
void
cSampleManager::UnloadSampleBank(uint8 nBank)
{
- bSampleBankLoaded[nBank] = false;
+ bSampleBankLoaded[nBank] = FALSE;
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
int8 slot;
@@ -1469,10 +1469,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32
@@ -1494,11 +1494,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
// no talking peds during cutsenes or the game end
if ( MusicManager.IsInitialised() )
@@ -1507,7 +1507,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
@@ -1515,7 +1515,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
case MUSICMODE_FRONTEND:
{
if ( MusicManager.GetNextTrack() == STREAMED_SOUND_GAME_COMPLETED )
- return false;
+ return FALSE;
break;
}
@@ -1523,10 +1523,10 @@ cSampleManager::LoadPedComment(uint32 nComment)
}
if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize )
- return false;
+ return FALSE;
nPedSlotSfxAddr[nCurrentPedSlot] = nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot;
nPedSlotSfx [nCurrentPedSlot] = nComment;
@@ -1534,7 +1534,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1573,14 +1573,14 @@ cSampleManager::GetSampleLength(uint32 nSample)
return m_aSamples[nSample].nSize >> 1;
}
-bool
+bool8
cSampleManager::UpdateReverb(void)
{
if ( !usingEAX )
- return false;
+ return FALSE;
if ( AudioManager.GetFrameCounter() & 15 )
- return false;
+ return FALSE;
float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
@@ -1627,7 +1627,7 @@ cSampleManager::UpdateReverb(void)
fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
if ( usingEAX3 )
{
@@ -1647,26 +1647,26 @@ cSampleManager::UpdateReverb(void)
_fPrevEaxRatioDestination = fRatio;
- return true;
+ return TRUE;
}
void
-cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
+cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( usingEAX )
{
- if ( nReverbFlag != 0 )
+ if ( nReverbFlag != FALSE )
{
if ( !b2d )
AIL_set_3D_sample_effects_level(opened_samples[nChannel], _fEffectsLevel);
@@ -1679,16 +1679,16 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
}
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1698,14 +1698,14 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( nSfx < SAMPLEBANK_MAX )
{
if ( !IsSampleBankLoaded(nBank) )
- return false;
+ return FALSE;
addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset;
}
else
{
if ( !IsPedCommentLoaded(nSfx) )
- return false;
+ return FALSE;
int32 slot = _GetPedCommentSlot(nSfx);
@@ -1717,10 +1717,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
{
AIL_set_sample_address(opened_2dsamples[nChannel - MAXCHANNELS], (void *)addr, m_aSamples[nSfx].nSize);
- return true;
+ return TRUE;
}
else
- return false;
+ return FALSE;
}
else
{
@@ -1736,10 +1736,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( AIL_set_3D_sample_info(opened_samples[nChannel], &info) == 0 )
{
OutputDebugString(AIL_last_error());
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
}
@@ -1831,13 +1831,13 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
void
cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1857,13 +1857,13 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
void
cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1883,13 +1883,13 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n
void
cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1906,16 +1906,16 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
}
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1925,14 +1925,14 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
return AIL_sample_status(opened_2dsamples[nChannel - MAXCHANNELS]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
}
else
{
if ( opened_samples[nChannel] )
return AIL_3D_sample_status(opened_samples[nChannel]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
}
}
@@ -1940,13 +1940,13 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
void
cSampleManager::StartChannel(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1966,13 +1966,13 @@ cSampleManager::StartChannel(uint32 nChannel)
void
cSampleManager::StopChannel(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
case CHANNEL2D:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2024,12 +2024,12 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
if ( m_bInitialised )
{
if ( mp3Stream[nStream] )
- AIL_pause_stream(mp3Stream[nStream], nPauseFlag != 0);
+ AIL_pause_stream(mp3Stream[nStream], nPauseFlag != FALSE);
}
}
@@ -2043,7 +2043,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
int i = 0;
@@ -2051,7 +2051,7 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
char filename[MAX_PATH];
if ( !m_bInitialised || nFile >= TOTAL_STREAMED_SOUNDS )
- return false;
+ return FALSE;
if ( mp3Stream[nStream] )
{
@@ -2081,9 +2081,9 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
} else {
if ( e->pLinkPath != NULL )
@@ -2100,9 +2100,9 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- _bIsMp3Active = true;
+ _bIsMp3Active = TRUE;
- return true;
+ return TRUE;
}
// fall through, start playing from another song
}
@@ -2128,9 +2128,9 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
}
if(mp3->pLinkPath != NULL)
@@ -2148,9 +2148,9 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
AIL_set_stream_ms_position(mp3Stream[nStream], 0);
AIL_pause_stream(mp3Stream[nStream], 0);
#ifdef FIX_BUGS
- _bIsMp3Active = true;
+ _bIsMp3Active = TRUE;
#endif
- return true;
+ return TRUE;
}
}
@@ -2169,9 +2169,9 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -2187,7 +2187,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
mp3Stream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
}
@@ -2225,7 +2225,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
}
void
-cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
+cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream)
{
uint8 vol = nVolume;
@@ -2258,7 +2258,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return 0;
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
if ( m_bInitialised )
@@ -2266,23 +2266,23 @@ cSampleManager::IsStreamPlaying(uint8 nStream)
if ( mp3Stream[nStream] )
{
if ( AIL_stream_status(mp3Stream[nStream]) == SMP_PLAYING )
- return true;
+ return TRUE;
else
- return false;
+ return FALSE;
}
}
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::InitialiseSampleBanks(void)
{
int32 nBank = SFX_BANK_0;
fpSampleDescHandle = fopen(SampleBankDescFilename, "rb");
if ( fpSampleDescHandle == NULL )
- return false;
+ return FALSE;
fpSampleDataHandle = fopen(SampleBankDataFilename, "rb");
if ( fpSampleDataHandle == NULL )
@@ -2290,7 +2290,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2317,7 +2317,7 @@ cSampleManager::InitialiseSampleBanks(void)
nSampleBankSize[SFX_BANK_0] = nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS] - nSampleBankDiscStartOffset[SFX_BANK_0];
nSampleBankSize[SFX_BANK_PED_COMMENTS] = _nSampleDataEndOffset - nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS];
- return true;
+ return TRUE;
}
#endif
diff --git a/src/audio/sampman_null.cpp b/src/audio/sampman_null.cpp
index e44e5b57..95603c72 100644
--- a/src/audio/sampman_null.cpp
+++ b/src/audio/sampman_null.cpp
@@ -4,7 +4,7 @@
#include "AudioManager.h"
cSampleManager SampleManager;
-bool _bSampmanInitialised = false;
+bool8 _bSampmanInitialised = FALSE;
uint32 BankStartOffset[MAX_SFX_BANKS];
uint32 nNumMP3s;
@@ -60,7 +60,7 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
return 0;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -75,10 +75,10 @@ void cSampleManager::ReacquireDigitalHandle(void)
{
}
-bool
+bool8
cSampleManager::Initialise(void)
{
- return true;
+ return TRUE;
}
void
@@ -87,9 +87,9 @@ cSampleManager::Terminate(void)
}
-bool cSampleManager::CheckForAnAudioFileOnCD(void)
+bool8 cSampleManager::CheckForAnAudioFileOnCD(void)
{
- return true;
+ return TRUE;
}
char cSampleManager::GetCDAudioDriveLetter(void)
@@ -128,11 +128,11 @@ cSampleManager::SetMonoMode(uint8 nMode)
{
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS );
- return false;
+ return FALSE;
}
void
@@ -141,20 +141,20 @@ cSampleManager::UnloadSampleBank(uint8 nBank)
ASSERT( nBank < MAX_SFX_BANKS );
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS );
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- return false;
+ return FALSE;
}
@@ -164,11 +164,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- return false;
+ return FALSE;
}
int32
@@ -205,22 +205,22 @@ cSampleManager::GetSampleLength(uint32 nSample)
return 0;
}
-bool cSampleManager::UpdateReverb(void)
+bool8 cSampleManager::UpdateReverb(void)
{
- return false;
+ return FALSE;
}
void
-cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
+cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
- return false;
+ return FALSE;
}
void
@@ -276,12 +276,12 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
- return false;
+ return FALSE;
}
void
@@ -303,7 +303,7 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
}
@@ -314,12 +314,12 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
ASSERT( nStream < MAX_STREAMS );
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
- return false;
+ return FALSE;
}
void
@@ -350,19 +350,19 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return 1;
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::InitialiseSampleBanks(void)
{
- return true;
+ return TRUE;
}
#endif
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 3d4b8dbd..15add7cb 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -48,7 +48,7 @@
//TODO: max channels
cSampleManager SampleManager;
-bool _bSampmanInitialised = false;
+bool8 _bSampmanInitialised = FALSE;
uint32 BankStartOffset[MAX_SFX_BANKS];
@@ -84,7 +84,7 @@ OggOpusFile *fpSampleDataHandle;
#else
FILE *fpSampleDataHandle;
#endif
-bool bSampleBankLoaded [MAX_SFX_BANKS];
+bool8 bSampleBankLoaded [MAX_SFX_BANKS];
int32 nSampleBankDiscStartOffset [MAX_SFX_BANKS];
int32 nSampleBankSize [MAX_SFX_BANKS];
uintptr nSampleBankMemoryStartAddress[MAX_SFX_BANKS];
@@ -120,7 +120,7 @@ uint8 nStreamPan [MAX_STREAMS];
uint8 nStreamVolume[MAX_STREAMS];
uint32 _CurMP3Index;
int32 _CurMP3Pos;
-bool _bIsMp3Active;
+bool8 _bIsMp3Active;
///////////////////////////////////////////////////////////////
// Env Size Diffus Room RoomHF RoomLF DecTm DcHF DcLF Refl RefDel Ref Pan Revb RevDel Rev Pan EchTm EchDp ModTm ModDp AirAbs HFRef LFRef RRlOff FLAGS
EAXLISTENERPROPERTIES StartEAX3 =
@@ -265,11 +265,11 @@ release_existing()
DEV("release_existing()\n");
}
-static bool
+static bool8
set_new_provider(int index)
{
if ( curprovider == index )
- return true;
+ return TRUE;
curprovider = index;
@@ -301,7 +301,7 @@ set_new_provider(int index)
{
curprovider=-1;
release_existing();
- return false;
+ return FALSE;
}
alListenerf (AL_GAIN, 1.0f);
@@ -382,13 +382,13 @@ set_new_provider(int index)
aChannel[i].SetReverbMix(ALEffectSlot, 0.0f);
}
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-static bool
+static bool8
IsThisTrackAt16KHz(uint32 track)
{
return track == STREAMED_SOUND_RADIO_CHAT;
@@ -456,13 +456,13 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
return curprovider;
}
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
#ifdef _WIN32
size_t len = strlen(path);
if (len < 4 || strcmp(&path[len - 4], ".lnk") != 0)
- return false;
+ return FALSE;
IShellLink* psl;
WIN32_FIND_DATA fd;
@@ -497,7 +497,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -507,31 +507,31 @@ _ResolveLink(char const *path, char *out)
psl->Release();
}
- return false;
+ return FALSE;
#else
struct stat sb;
if (lstat(path, &sb) == -1) {
perror("lstat: ");
- return false;
+ return FALSE;
}
if (S_ISLNK(sb.st_mode)) {
char* linkname = (char*)alloca(sb.st_size + 1);
if (linkname == NULL) {
fprintf(stderr, "insufficient memory\n");
- return false;
+ return FALSE;
}
if (readlink(path, linkname, sb.st_size + 1) < 0) {
perror("readlink: ");
- return false;
+ return FALSE;
}
linkname[sb.st_size] = '\0';
strcpy(out, linkname);
- return true;
+ return TRUE;
} else {
- return false;
+ return FALSE;
}
#endif
}
@@ -540,8 +540,8 @@ static void
_FindMP3s(void)
{
tMP3Entry *pList;
- bool bShortcut;
- bool bInitFirstEntry;
+ bool8 bShortcut;
+ bool8 bInitFirstEntry;
HANDLE hFind;
char path[MAX_PATH];
char filepath[MAX_PATH*2];
@@ -584,9 +584,9 @@ _FindMP3s(void)
{
OutputDebugString("Resolving Link");
OutputDebugString(filepath);
- bShortcut = true;
+ bShortcut = TRUE;
} else
- bShortcut = false;
+ bShortcut = FALSE;
aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]);
@@ -626,7 +626,7 @@ _FindMP3s(void)
_pMP3List->pLinkPath = NULL;
}
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -634,10 +634,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -655,9 +655,9 @@ _FindMP3s(void)
{
OutputDebugString("Resolving Link");
OutputDebugString(filepath);
- bShortcut = true;
+ bShortcut = TRUE;
} else {
- bShortcut = false;
+ bShortcut = FALSE;
if (filepathlen > MAX_PATH) {
continue;
}
@@ -696,7 +696,7 @@ _FindMP3s(void)
pList = _pMP3List;
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -718,9 +718,9 @@ _FindMP3s(void)
{
OutputDebugString("Resolving Link");
OutputDebugString(filepath);
- bShortcut = true;
+ bShortcut = TRUE;
} else
- bShortcut = false;
+ bShortcut = FALSE;
aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]);
@@ -830,7 +830,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -843,7 +843,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -854,10 +854,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -883,11 +883,11 @@ void cSampleManager::ReacquireDigitalHandle(void)
}
}
-bool
+bool8
cSampleManager::Initialise(void)
{
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
EFXInit();
CStream::Initialise();
@@ -932,7 +932,7 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < MAX_SFX_BANKS; i++ )
{
- bSampleBankLoaded[i] = false;
+ bSampleBankLoaded[i] = FALSE;
nSampleBankDiscStartOffset[i] = 0;
nSampleBankSize[i] = 0;
nSampleBankMemoryStartAddress[i] = 0;
@@ -1000,7 +1000,7 @@ cSampleManager::Initialise(void)
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (uintptr)malloc(nSampleBankSize[SFX_BANK_0]);
@@ -1009,7 +1009,7 @@ cSampleManager::Initialise(void)
if ( nSampleBankMemoryStartAddress[SFX_BANK_0] == 0 )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (uintptr)malloc(PED_BLOCKSIZE*MAX_PEDSFX);
@@ -1028,7 +1028,7 @@ cSampleManager::Initialise(void)
}
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
if ( defaultProvider >= 0 && defaultProvider < m_nNumberOfProviders )
{
@@ -1037,7 +1037,7 @@ cSampleManager::Initialise(void)
else
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1060,13 +1060,13 @@ cSampleManager::Initialise(void)
time_t t = time(NULL);
tm *localtm;
- bool bUseRandomTable;
+ bool8 bUseRandomTable;
if ( t == -1 )
- bUseRandomTable = true;
+ bUseRandomTable = TRUE;
else
{
- bUseRandomTable = false;
+ bUseRandomTable = FALSE;
localtm = localtime(&t);
}
@@ -1098,10 +1098,10 @@ cSampleManager::Initialise(void)
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
- return true;
+ return TRUE;
}
void
@@ -1135,12 +1135,12 @@ cSampleManager::Terminate(void)
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = 0;
}
- _bSampmanInitialised = false;
+ _bSampmanInitialised = FALSE;
}
-bool cSampleManager::CheckForAnAudioFileOnCD(void)
+bool8 cSampleManager::CheckForAnAudioFileOnCD(void)
{
- return true;
+ return TRUE;
}
char cSampleManager::GetCDAudioDriveLetter(void)
@@ -1196,19 +1196,19 @@ cSampleManager::SetMonoMode(uint8 nMode)
m_nMonoMode = nMode;
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
if ( MusicManager.IsInitialised()
&& MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
&& nBank != SFX_BANK_0 )
{
- return false;
+ return FALSE;
}
#ifdef OPUS_SFX
@@ -1227,14 +1227,14 @@ cSampleManager::LoadSampleBank(uint8 nBank)
}
#else
if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank], fpSampleDataHandle) != nSampleBankSize[nBank] )
- return false;
+ return FALSE;
#endif
- bSampleBankLoaded[nBank] = true;
+ bSampleBankLoaded[nBank] = TRUE;
- return true;
+ return TRUE;
}
void
@@ -1242,10 +1242,10 @@ cSampleManager::UnloadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
- bSampleBankLoaded[nBank] = false;
+ bSampleBankLoaded[nBank] = FALSE;
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
@@ -1253,7 +1253,7 @@ cSampleManager::IsSampleBankLoaded(uint8 nBank)
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
@@ -1268,10 +1268,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
@@ -1294,13 +1294,13 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
// no talking peds during cutsenes or the game end
if ( MusicManager.IsInitialised() )
@@ -1309,7 +1309,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
@@ -1317,7 +1317,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
case MUSICMODE_FRONTEND:
{
if ( MusicManager.GetNextTrack() == STREAMED_SOUND_GAME_COMPLETED )
- return false;
+ return FALSE;
break;
}
@@ -1332,17 +1332,17 @@ cSampleManager::LoadPedComment(uint32 nComment)
int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead),
samplesSize, NULL);
if (size <= 0) {
- return false;
+ return FALSE;
}
samplesRead += size * 2;
samplesSize -= size;
}
#else
if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize )
- return false;
+ return FALSE;
#endif
nPedSlotSfx[nCurrentPedSlot] = nComment;
@@ -1350,7 +1350,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1393,13 +1393,13 @@ cSampleManager::GetSampleLength(uint32 nSample)
return m_aSamples[nSample].nSize / sizeof(uint16);
}
-bool cSampleManager::UpdateReverb(void)
+bool8 cSampleManager::UpdateReverb(void)
{
if ( !usingEAX && !_usingEFX )
- return false;
+ return FALSE;
if ( AudioManager.GetFrameCounter() & 15 )
- return false;
+ return FALSE;
float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
@@ -1420,7 +1420,7 @@ bool cSampleManager::UpdateReverb(void)
fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
#ifdef JUICY_OAL
if ( usingEAX3 || _usingEFX )
@@ -1455,11 +1455,11 @@ bool cSampleManager::UpdateReverb(void)
_fPrevEaxRatioDestination = fRatio;
- return true;
+ return TRUE;
}
void
-cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
+cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
@@ -1469,7 +1469,7 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
{
alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect);
- if ( nReverbFlag != 0 )
+ if ( nReverbFlag != FALSE )
aChannel[nChannel].SetReverbMix(ALEffectSlot, _fEffectsLevel);
else
aChannel[nChannel].SetReverbMix(ALEffectSlot, 0.0f);
@@ -1477,7 +1477,7 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
}
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
@@ -1487,14 +1487,14 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( nSfx < SAMPLEBANK_MAX )
{
if ( !IsSampleBankLoaded(nBank) )
- return false;
+ return FALSE;
addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset;
}
else
{
if ( !IsPedCommentLoaded(nSfx) )
- return false;
+ return FALSE;
int32 slot = _GetPedCommentSlot(nSfx);
addr = (nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE * slot);
@@ -1512,10 +1512,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
aChannel[nChannel].SetSampleData ((void*)addr, m_aSamples[nSfx].nSize, m_aSamples[nSfx].nFrequency);
aChannel[nChannel].SetLoopPoints (0, -1);
aChannel[nChannel].SetPitch (1.0f);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -1619,7 +1619,7 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
aChannel[nChannel].SetLoopCount(nLoopCount);
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
@@ -1673,7 +1673,7 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
@@ -1681,7 +1681,7 @@ cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
if ( stream )
{
- stream->SetPause(nPauseFlag != 0);
+ stream->SetPause(nPauseFlag != FALSE);
}
}
@@ -1701,7 +1701,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
int i = 0;
@@ -1709,7 +1709,7 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
char filename[MAX_PATH];
if ( nFile >= TOTAL_STREAMED_SOUNDS )
- return false;
+ return FALSE;
if ( aStream[nStream] )
{
@@ -1742,12 +1742,12 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
stream->Start();
- return true;
+ return TRUE;
} else {
delete stream;
aStream[nStream] = NULL;
}
- return false;
+ return FALSE;
} else {
if ( e->pLinkPath != NULL )
@@ -1765,8 +1765,8 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
aStream[nStream]->Start();
- _bIsMp3Active = true;
- return true;
+ _bIsMp3Active = TRUE;
+ return TRUE;
} else {
delete aStream[nStream];
aStream[nStream] = NULL;
@@ -1798,12 +1798,12 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
stream->Start();
- return true;
+ return TRUE;
} else {
delete stream;
aStream[nStream] = NULL;
}
- return false;
+ return FALSE;
}
}
if(mp3->pLinkPath != NULL)
@@ -1818,9 +1818,9 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
if (aStream[nStream]->Setup()) {
aStream[nStream]->Start();
#ifdef FIX_BUGS
- _bIsMp3Active = true;
+ _bIsMp3Active = TRUE;
#endif
- return true;
+ return TRUE;
} else {
delete aStream[nStream];
aStream[nStream] = NULL;
@@ -1845,12 +1845,12 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
stream->Start();
- return true;
+ return TRUE;
} else {
delete stream;
aStream[nStream] = NULL;
}
- return false;
+ return FALSE;
}
void
@@ -1866,7 +1866,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
aStream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
@@ -1934,7 +1934,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return nStreamLength[nStream];
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
@@ -1944,10 +1944,10 @@ cSampleManager::IsStreamPlaying(uint8 nStream)
if ( stream )
{
if ( stream->IsPlaying() )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -1968,14 +1968,14 @@ cSampleManager::Service(void)
}
}
-bool
+bool8
cSampleManager::InitialiseSampleBanks(void)
{
int32 nBank = SFX_BANK_0;
fpSampleDescHandle = fcaseopen(SampleBankDescFilename, "rb");
if ( fpSampleDescHandle == NULL )
- return false;
+ return FALSE;
#ifndef OPUS_SFX
fpSampleDataHandle = fcaseopen(SampleBankDataFilename, "rb");
if ( fpSampleDataHandle == NULL )
@@ -1983,7 +1983,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2015,6 +2015,6 @@ cSampleManager::InitialiseSampleBanks(void)
nSampleBankSize[SFX_BANK_0] = nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS] - nSampleBankDiscStartOffset[SFX_BANK_0];
nSampleBankSize[SFX_BANK_PED_COMMENTS] = _nSampleDataEndOffset - nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS];
- return true;
+ return TRUE;
}
#endif
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index d6e36875..792d3bda 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -160,7 +160,7 @@ void CGarages::Init(void)
aCarsInSafeHouse3[i].Init();
hGarages = DMAudio.CreateEntity(AUDIOTYPE_GARAGE, (void*)1);
if (hGarages >= 0)
- DMAudio.SetEntityStatus(hGarages, true);
+ DMAudio.SetEntityStatus(hGarages, TRUE);
AddOne(
CVector(CRUSHER_GARAGE_X1, CRUSHER_GARAGE_Y1, CRUSHER_GARAGE_Z1),
CVector(CRUSHER_GARAGE_X2, CRUSHER_GARAGE_Y2, CRUSHER_GARAGE_Z2),
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index d8b15385..20a38cc0 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -1232,7 +1232,7 @@ void CReplay::RestoreStuffFromMem(void)
ped->SetModelIndex(mi);
ped->m_pVehicleAnim = nil;
ped->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, ped);
- DMAudio.SetEntityStatus(ped->m_audioEntityId, true);
+ DMAudio.SetEntityStatus(ped->m_audioEntityId, TRUE);
CPopulation::UpdatePedCount((ePedType)ped->m_nPedType, false);
if (ped->m_wepModelID >= 0)
ped->AddWeaponModel(ped->m_wepModelID);
@@ -1270,7 +1270,7 @@ void CReplay::RestoreStuffFromMem(void)
car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true);
}
vehicle->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, vehicle);
- DMAudio.SetEntityStatus(vehicle->m_audioEntityId, true);
+ DMAudio.SetEntityStatus(vehicle->m_audioEntityId, TRUE);
CCarCtrl::UpdateCarCount(vehicle, false);
if ((mi == MI_AIRTRAIN || mi == MI_DEADDODO) && vehicle->m_rwObject){
CVehicleModelInfo* info = (CVehicleModelInfo*)CModelInfo::GetModelInfo(mi);
diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp
index 93956ea2..65459c9e 100644
--- a/src/control/Script4.cpp
+++ b/src/control/Script4.cpp
@@ -1327,7 +1327,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
{
CollectParameters(&m_nIp, 1);
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
- DMAudio.PlayFrontEndTrack(ScriptParams[0] + STREAMED_SOUND_MISSION_COMPLETED - 1, 0);
+ DMAudio.PlayFrontEndTrack(ScriptParams[0] + STREAMED_SOUND_MISSION_COMPLETED - 1, FALSE);
return 0;
}
case COMMAND_CLEAR_AREA:
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 4f3f31a4..4677e4c9 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -4422,7 +4422,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = m_nHoverOption - HOVEROPTION_RADIO_0;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
} else if (m_nHoverOption == HOVEROPTION_RANDOM_ITEM
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_RESUME) {
@@ -4436,7 +4436,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = HEAD_RADIO;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_1:
@@ -4444,7 +4444,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = DOUBLE_CLEF;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_2:
@@ -4452,7 +4452,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = JAH_RADIO;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_3:
@@ -4460,7 +4460,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = RISE_FM;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_4:
@@ -4468,7 +4468,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = LIPS_106;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_5:
@@ -4476,7 +4476,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = GAME_FM;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_6:
@@ -4484,7 +4484,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = MSX_FM;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_7:
@@ -4492,7 +4492,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = FLASHBACK;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_8:
@@ -4500,7 +4500,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = CHATTERBOX;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_9:
@@ -4508,7 +4508,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = USERTRACK;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RANDOM_ITEM:
@@ -4731,7 +4731,7 @@ CMenuManager::ProcessButtonPresses(void)
curBottomBarOption = hoveredBottomBarOption;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, false);
if (bbNames[curBottomBarOption].screenId == MENUPAGE_SOUND_SETTINGS)
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
return;
} else if (bottomBarActive) {
if (CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetCrossJustDown()) {
@@ -4739,7 +4739,7 @@ CMenuManager::ProcessButtonPresses(void)
bottomBarActive = false;
if (bbNames[curBottomBarOption].screenId == MENUPAGE_SOUND_SETTINGS)
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
return;
} else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown()
@@ -4890,7 +4890,7 @@ CMenuManager::ProcessButtonPresses(void)
}
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
#endif
break;
@@ -5100,7 +5100,7 @@ CMenuManager::ProcessButtonPresses(void)
DMAudio.SetMusicMasterVolume(102);
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
SaveSettings();
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
m_PrefsFrameLimiter = true;
@@ -5186,7 +5186,7 @@ CMenuManager::ProcessButtonPresses(void)
break;
case MENUACTION_LOADRADIO:
ChangeScreen(MENUPAGE_SOUND_SETTINGS, 0, true, true);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("STARTED PLAYING FRONTEND AUDIO TRACK");
break;
#ifdef MISSION_REPLAY
@@ -5381,7 +5381,7 @@ CMenuManager::ProcessButtonPresses(void)
}
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
#ifdef ASPECT_RATIO_SCALE
diff --git a/src/core/FrontendTriggers.h b/src/core/FrontendTriggers.h
index b2bde09c..44bae54f 100644
--- a/src/core/FrontendTriggers.h
+++ b/src/core/FrontendTriggers.h
@@ -779,7 +779,7 @@ TriggerAudio_RadioStation(CMenuMultiChoicePicturedTriggered *widget)
if ( CMenuManager::m_PrefsRadioStation != widget->GetMenuSelection() )
{
CMenuManager::m_PrefsRadioStation = widget->GetMenuSelection();
- DMAudio.PlayFrontEndTrack(CMenuManager::m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(CMenuManager::m_PrefsRadioStation, TRUE);
DMAudio.SetRadioInCar(CMenuManager::m_PrefsRadioStation);
}
}
@@ -792,12 +792,12 @@ TriggerAudio_StereoMono(CMenuMultiChoiceTriggered *widget)
{
if (widget->GetMenuSelection() == 1)
{
- DMAudio.SetMonoMode(true);
+ DMAudio.SetMonoMode(TRUE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MONO, 0);
}
else
{
- DMAudio.SetMonoMode(false);
+ DMAudio.SetMonoMode(FALSE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_STEREO, 0);
}
}
diff --git a/src/core/Frontend_PS2.cpp b/src/core/Frontend_PS2.cpp
index 1cb944d1..457a5ff8 100644
--- a/src/core/Frontend_PS2.cpp
+++ b/src/core/Frontend_PS2.cpp
@@ -2871,7 +2871,7 @@ CMenuManager::ProcessDPadCrossJustDown(void)
{
if ( !gMusicPlaying )
{
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
gMusicPlaying = true;
}
}
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 768ed7f9..6e8314f4 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -64,7 +64,7 @@ CWorld::Initialise()
void
CWorld::Add(CEntity *ent)
{
- if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, true);
+ if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, TRUE);
if(ent->bIsBIGBuilding)
ms_bigBuildingsList[ent->m_level].InsertItem(ent);
@@ -79,7 +79,7 @@ CWorld::Add(CEntity *ent)
void
CWorld::Remove(CEntity *ent)
{
- if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, false);
+ if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, FALSE);
if(ent->bIsBIGBuilding)
ms_bigBuildingsList[ent->m_level].RemoveItem(ent);
diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp
index 71f223d7..211a568c 100644
--- a/src/objects/ParticleObject.cpp
+++ b/src/objects/ParticleObject.cpp
@@ -33,7 +33,7 @@ CAudioHydrant::Add(CParticleObject *particleobject)
if ( AEHANDLE_IS_FAILED(List[i].AudioEntity) )
return false;
- DMAudio.SetEntityStatus(List[i].AudioEntity, true);
+ DMAudio.SetEntityStatus(List[i].AudioEntity, TRUE);
List[i].pParticleObject = particleobject;
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 936e039f..a564c9e5 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -244,7 +244,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
bHasACamera = true;
m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this);
- DMAudio.SetEntityStatus(m_audioEntityId, true);
+ DMAudio.SetEntityStatus(m_audioEntityId, TRUE);
m_fearFlags = CPedType::GetThreats(m_nPedType);
m_threatEntity = nil;
m_eventOrThreat = CVector2D(0.0f, 0.0f);
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp
index 771f85de..e57d57d6 100644
--- a/src/render/Weather.cpp
+++ b/src/render/Weather.cpp
@@ -114,7 +114,7 @@ void CWeather::Init(void)
ForcedWeatherType = WEATHER_RANDOM;
SoundHandle = DMAudio.CreateEntity(AUDIOTYPE_WEATHER, (void*)1);
if (SoundHandle >= 0)
- DMAudio.SetEntityStatus(SoundHandle, true);
+ DMAudio.SetEntityStatus(SoundHandle, TRUE);
}
void CWeather::Update(void)
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp
index 1191465a..0c7913af 100644
--- a/src/vehicles/Cranes.cpp
+++ b/src/vehicles/Cranes.cpp
@@ -85,7 +85,7 @@ void CCranes::AddThisOneCrane(CEntity* pEntity)
pCrane->m_bWasMilitaryCrane = false;
pCrane->m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[NumCranes]);
if (pCrane->m_nAudioEntity >= 0)
- DMAudio.SetEntityStatus(pCrane->m_nAudioEntity, true);
+ DMAudio.SetEntityStatus(pCrane->m_nAudioEntity, TRUE);
pCrane->m_bIsTop = (MODELID_CRANE_1 != pEntity->GetModelIndex());
// Is this used to avoid military crane?
if (pCrane->m_bIsTop || pEntity->GetPosition().y > 0.0f) {
@@ -669,7 +669,7 @@ void CCranes::Load(uint8* buf, uint32 size)
for (int i = 0; i < NUM_CRANES; i++) {
aCranes[i].m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[i]);
if (aCranes[i].m_nAudioEntity != 0)
- DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, true);
+ DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, TRUE);
}
VALIDATESAVEBUF(size);
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 6696f4a6..8885485d 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -108,7 +108,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_fMapObjectHeightAhead = m_fMapObjectHeightBehind = 0.0f;
m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this);
if(m_audioEntityId >= 0)
- DMAudio.SetEntityStatus(m_audioEntityId, true);
+ DMAudio.SetEntityStatus(m_audioEntityId, TRUE);
m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK;
m_pCurGroundEntity = nil;
m_bRainAudioCounter = 0;
diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp
index 8ab81748..f79c0278 100644
--- a/src/weapons/Explosion.cpp
+++ b/src/weapons/Explosion.cpp
@@ -46,7 +46,7 @@ CExplosion::Initialise()
}
AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
if (AudioHandle >= 0)
- DMAudio.SetEntityStatus(AudioHandle, true);
+ DMAudio.SetEntityStatus(AudioHandle, TRUE);
debug("CExplosion ready\n");
}