summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-22 12:08:26 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:34:32 +0200
commit5bcdb933a78abb2b9b8d6648d17502240bd9fd29 (patch)
treedf31ee5fefd2ee7716b9ba01cc0062361520a655 /src/audio
parentFix C3dMarkers::PlaceMarker calls in Radar (diff)
downloadre3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar
re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.gz
re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.bz2
re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.lz
re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.xz
re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.zst
re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioCollision.cpp29
-rw-r--r--src/audio/AudioLogic.cpp1454
-rw-r--r--src/audio/AudioManager.cpp124
-rw-r--r--src/audio/AudioManager.h116
-rw-r--r--src/audio/DMAudio.cpp26
-rw-r--r--src/audio/DMAudio.h22
-rw-r--r--src/audio/MusicManager.cpp274
-rw-r--r--src/audio/MusicManager.h54
-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.cpp60
-rw-r--r--src/audio/sampman_oal.cpp216
13 files changed, 1378 insertions, 1379 deletions
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index 250cd18e..be1ee48b 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -158,7 +158,7 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
void
cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
{
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
if(col.m_fIntensity2 > 0.0016f) {
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
if(emittingVol) {
@@ -168,7 +168,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;
@@ -178,10 +178,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();
}
}
@@ -311,7 +311,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;
@@ -319,9 +319,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();
}
}
@@ -332,13 +332,12 @@ void
cAudioManager::ServiceCollisions()
{
int i, j;
- bool abRepeatedCollision1[NUMAUDIOCOLLISIONS];
- bool abRepeatedCollision2[NUMAUDIOCOLLISIONS];
+ bool8 abRepeatedCollision1[NUMAUDIOCOLLISIONS];
+ bool8 abRepeatedCollision2[NUMAUDIOCOLLISIONS];
m_sQueueSample.m_nEntityIndex = m_nCollisionEntity;
- for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
- abRepeatedCollision1[i] = abRepeatedCollision2[i] = false;
+ for (int i = 0; i < NUMAUDIOCOLLISIONS; i++) abRepeatedCollision1[i] = abRepeatedCollision2[i] = FALSE;
for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
@@ -348,8 +347,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 9296a154..a3493e38 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -123,62 +123,62 @@ cAudioManager::PostInitialiseGameSpecificSetup()
{
m_nFireAudioEntity = CreateEntity(AUDIOTYPE_FIRE, &gFireManager);
if (m_nFireAudioEntity >= 0)
- SetEntityStatus(m_nFireAudioEntity, true);
+ SetEntityStatus(m_nFireAudioEntity, TRUE);
m_nCollisionEntity = CreateEntity(AUDIOTYPE_COLLISION, (void *)1);
if (m_nCollisionEntity >= 0)
- SetEntityStatus(m_nCollisionEntity, true);
+ SetEntityStatus(m_nCollisionEntity, TRUE);
m_nFrontEndEntity = CreateEntity(AUDIOTYPE_FRONTEND, (void *)1);
if (m_nFrontEndEntity >= 0)
- SetEntityStatus(m_nFrontEndEntity, true);
+ SetEntityStatus(m_nFrontEndEntity, TRUE);
m_nProjectileEntity = CreateEntity(AUDIOTYPE_PROJECTILE, (void *)1);
if (m_nProjectileEntity >= 0)
- SetEntityStatus(m_nProjectileEntity, true);
+ SetEntityStatus(m_nProjectileEntity, TRUE);
m_nWaterCannonEntity = CreateEntity(AUDIOTYPE_WATERCANNON, (void *)1);
if (m_nWaterCannonEntity >= 0)
- SetEntityStatus(m_nWaterCannonEntity, true);
+ SetEntityStatus(m_nWaterCannonEntity, TRUE);
m_nPoliceChannelEntity = CreateEntity(AUDIOTYPE_POLICERADIO, (void *)1);
if (m_nPoliceChannelEntity >= 0)
- SetEntityStatus(m_nPoliceChannelEntity, true);
+ SetEntityStatus(m_nPoliceChannelEntity, TRUE);
#ifdef GTA_BRIDGE
m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void*)1);
if (m_nBridgeEntity >= 0)
- SetEntityStatus(m_nBridgeEntity, true);
+ SetEntityStatus(m_nBridgeEntity, TRUE);
#endif // GTA_BRIDGE
m_nEscalatorEntity = CreateEntity(AUDIOTYPE_ESCALATOR, (void*)1);
if (m_nEscalatorEntity >= 0)
- SetEntityStatus(m_nEscalatorEntity, true);
+ SetEntityStatus(m_nEscalatorEntity, TRUE);
m_nExtraSoundsEntity = CreateEntity(AUDIOTYPE_EXTRA_SOUNDS, (void*)1);
if (m_nExtraSoundsEntity >= 0)
- SetEntityStatus(m_nExtraSoundsEntity, true);
+ SetEntityStatus(m_nExtraSoundsEntity, TRUE);
m_sMissionAudio.m_nSampleIndex[0] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[0] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[0] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[0] = false;
- m_sMissionAudio.m_bIsPlayed[0] = false;
- m_sMissionAudio.m_bPredefinedProperties[0] = true;
+ m_sMissionAudio.m_bIsPlaying[0] = FALSE;
+ m_sMissionAudio.m_bIsPlayed[0] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[0] = TRUE;
m_sMissionAudio.m_nMissionAudioCounter[0] = 0;
- m_sMissionAudio.m_bIsMobile[0] = false;
+ m_sMissionAudio.m_bIsMobile[0] = FALSE;
field_5538 = 127;
m_sMissionAudio.m_nSampleIndex[1] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[1] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[1] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[1] = false;
- m_sMissionAudio.m_bIsPlayed[1] = false;
- m_sMissionAudio.m_bPredefinedProperties[1] = true;
+ m_sMissionAudio.m_bIsPlaying[1] = FALSE;
+ m_sMissionAudio.m_bIsPlayed[1] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[1] = TRUE;
m_sMissionAudio.m_nMissionAudioCounter[1] = 0;
- m_sMissionAudio.m_bIsMobile[1] = false;
+ m_sMissionAudio.m_bIsMobile[1] = FALSE;
field_5538 = 127;
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
- m_bIsPlayerShutUp = false;
+ m_bIsPlayerShutUp = FALSE;
m_nPlayerMood = PLAYER_MOOD_CALM;
m_nPlayerMoodTimer = 0;
}
@@ -261,7 +261,7 @@ cAudioManager::ProcessReverb() const
if (SampleManager.UpdateReverb() && m_bDynamicAcousticModelingStatus) {
for (uint32 i = 0; i < numChannels; i++) {
if (m_asActiveSamples[i].m_bReverbFlag)
- SampleManager.SetChannelReverbFlag(i, true);
+ SampleManager.SetChannelReverbFlag(i, TRUE);
}
}
}
@@ -274,11 +274,11 @@ cAudioManager::GetDistanceSquared(const CVector &v) const
}
void
-cAudioManager::CalculateDistance(bool &distCalculated, float dist)
+cAudioManager::CalculateDistance(bool8 &distCalculated, float dist)
{
if (!distCalculated) {
m_sQueueSample.m_fDistance = Sqrt(dist);
- distCalculated = true;
+ distCalculated = TRUE;
}
}
@@ -362,56 +362,56 @@ cAudioManager::ProcessEntity(int32 id)
switch (m_asAudioEntities[id].m_nType) {
case AUDIOTYPE_PHYSICAL:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessPhysical(id);
}
break;
case AUDIOTYPE_EXPLOSION:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessExplosions(id);
}
break;
case AUDIOTYPE_FIRE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessFires(id);
}
break;
case AUDIOTYPE_WEATHER:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
if(CGame::currArea == AREA_MAIN_MAP || CGame::currArea == AREA_EVERYWHERE)
ProcessWeather(id);
}
break;
/* case AUDIOTYPE_CRANE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessCrane();
}
break;*/
case AUDIOTYPE_SCRIPTOBJECT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessScriptObject(id);
}
break;
#ifdef GTA_BRIDGE
case AUDIOTYPE_BRIDGE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessBridge();
}
break;
#endif
case AUDIOTYPE_FRONTEND:
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
ProcessFrontEnd();
break;
case AUDIOTYPE_PROJECTILE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessProjectiles();
}
break;
@@ -421,25 +421,25 @@ cAudioManager::ProcessEntity(int32 id)
break;
case AUDIOTYPE_FIREHYDRANT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessFireHydrant();
}
break;
case AUDIOTYPE_WATERCANNON:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessWaterCannon(id);
}
break;
case AUDIOTYPE_ESCALATOR:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessEscalators();
}
break;
case AUDIOTYPE_EXTRA_SOUNDS:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessExtraSounds();
}
break;
@@ -719,25 +719,25 @@ const tVehicleSampleData aVehicleSettings[MAX_CARS] = {
-bool bPlayerJustEnteredCar;
-
-const bool hornPatternsArray[8][44] = {
- {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false,
- false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false},
- {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
- true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false},
- {false, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, true, true, true, true, true, false,
- false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false},
- {false, false, true, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true,
- true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false},
- {false, false, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},
- {false, false, true, true, true, false, false, false, true, true, true, false, false, false, false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},
- {false, false, true, true, true, true, false, false, false, false, true, true, true, false, false, true, true, true, false, false, true, true,
- true, true, true, true, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, false, false},
- {false, false, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true, true,
- false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false},
+bool8 bPlayerJustEnteredCar;
+
+const bool8 hornPatternsArray[8][44] = {
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE,
+ FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE},
};
void cAudioManager::ProcessVehicle(CVehicle* veh)
@@ -756,7 +756,7 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|| CGame::currArea == AREA_MALL
|| CGame::currArea == AREA_MAIN_MAP) {
m_sQueueSample.m_vecPos = veh->GetPosition();
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_pVehicle = veh;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
params.m_pTransmission = veh->pHandling != nil ? &veh->pHandling->Transmission : nil;
@@ -882,7 +882,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;
@@ -891,15 +891,15 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
}
-bool
+bool8
cAudioManager::ProcessReverseGear(cVehicleParams& params)
{
const int reverseGearIntensity = 30;
@@ -909,10 +909,10 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
uint8 emittingVolume;
if (params.m_fDistance >= SQR(reverseGearIntensity))
- return false;
+ return FALSE;
automobile = (CAutomobile*)params.m_pVehicle;
if (automobile->m_modelIndex == MI_CADDY)
- return true;
+ return TRUE;
if (automobile->bEngineOn && (automobile->m_fGasPedal < 0.0f || automobile->m_nCurrentGear == 0)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
if (automobile->m_nDriveWheelsOnGround != 0) {
@@ -935,7 +935,7 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_GEAR;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = (6000.0f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
@@ -944,14 +944,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
@@ -966,14 +966,14 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
int16 acceletateState;
int16 brakeState;
uint8 volume;
- bool isPlayerVeh;
- bool vehSlowdown;
+ bool8 isPlayerVeh;
+ bool8 vehSlowdown;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
return;
if (FindPlayerVehicle() == params.m_pVehicle)
- isPlayerVeh = true;
+ isPlayerVeh = TRUE;
else
#ifdef FIX_BUGS
isPlayerVeh = CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle == params.m_pVehicle;
@@ -999,7 +999,7 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_RC_REV;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -1008,10 +1008,10 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_RC_REV);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1030,11 +1030,11 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
if (acceletateState < brakeState)
acceletateState = brakeState;
if (acceletateState <= 0) {
- vehSlowdown = true;
+ vehSlowdown = TRUE;
volume = 127;
freq = 18000;
} else {
- vehSlowdown = false;
+ vehSlowdown = FALSE;
volume = Min(127, (127 * acceletateState / 255) * 3.0f * Abs(params.m_fVelocityChange));
freq = Min(22000, (8000 * acceletateState / 255 + 14000) * 3.0f * Abs(params.m_fVelocityChange));
}
@@ -1064,7 +1064,7 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeDivider = 4;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -1073,9 +1073,9 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1096,7 +1096,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
static uint32 prevFreq = 22050;
uint32 freq;
- bool isPlayerVeh;
+ bool8 isPlayerVeh;
int16 acceletateState;
int16 brakeState;
@@ -1104,7 +1104,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
return;
if (FindPlayerVehicle() == params.m_pVehicle)
- isPlayerVeh = true;
+ isPlayerVeh = TRUE;
else
#ifdef FIX_BUGS
isPlayerVeh = CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle == params.m_pVehicle;
@@ -1127,7 +1127,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_CAR_RC_HELI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -1136,17 +1136,17 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_RC_HELI);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
if (isPlayerVeh)
prevFreq = freq;
}
-bool
+bool8
cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 95.0f;
@@ -1159,10 +1159,10 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
uint8 wheelsOnGround;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
wheelsOnGround = ((CAutomobile*)params.m_pVehicle)->m_nWheelsOnGround;
@@ -1175,7 +1175,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
break;
}
if (params.m_pTransmission == nil || wheelsOnGround == 0)
- return true;
+ return TRUE;
velocity = Abs(params.m_fVelocityChange);
if (velocity > 0.0f) {
@@ -1185,7 +1185,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;
@@ -1203,18 +1203,18 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 30.0f;
@@ -1227,7 +1227,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
uint8 wheelsOnGround;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
wheelsOnGround = ((CAutomobile*)params.m_pVehicle)->m_nWheelsOnGround;
@@ -1240,7 +1240,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
break;
}
if (params.m_pTransmission == nil || wheelsOnGround == 0)
- return true;
+ return TRUE;
velocity = Abs(params.m_fVelocityChange);
if (velocity > 0.0f) {
@@ -1252,7 +1252,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_ROAD_NOISE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
multiplier = (m_sQueueSample.m_fDistance / SOUND_INTENSITY) * 0.5f;
freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE);
@@ -1263,15 +1263,15 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
void
@@ -1296,11 +1296,11 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
float relativeChange;
float modificator;
float traction;
- bool isMoped;
- bool caddyBool;
+ bool8 isMoped;
+ bool8 caddyBool;
- isMoped = false;
- caddyBool = false;
+ isMoped = FALSE;
+ caddyBool = FALSE;
traction = 0.0f;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
return;
@@ -1322,12 +1322,12 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
switch (veh->m_modelIndex) {
case MI_PIZZABOY:
case MI_FAGGIO:
- isMoped = true;
+ isMoped = TRUE;
currentGear = transmission->nNumberOfGears;
break;
case MI_CADDY:
currentGear = transmission->nNumberOfGears;
- caddyBool = true;
+ caddyBool = TRUE;
break;
default:
currentGear = veh->m_nCurrentGear;
@@ -1354,7 +1354,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
}
if (wheelsOnGround != 0) {
- if (!veh->bIsHandbrakeOn || isMoped && caddyBool) { //mb bug, bcs it's can't be true together
+ if (!veh->bIsHandbrakeOn || isMoped && caddyBool) { //mb bug, bcs it's can't be TRUE together
if (veh->GetStatus() == STATUS_SIMPLE || isMoped || caddyBool) {
traction = 0.0f;
} else {
@@ -1478,7 +1478,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
m_sQueueSample.m_nFrequency = freq + 20 * m_sQueueSample.m_nBankIndex % 100;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_5 || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_5)
m_sQueueSample.m_nFrequency /= 2;
@@ -1488,10 +1488,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();
}
}
@@ -1517,7 +1517,7 @@ void
cAudioManager::PlayerJustGotInCar() const
{
if (m_bIsInitialised)
- bPlayerJustEnteredCar = true;
+ bPlayerJustEnteredCar = TRUE;
}
void
@@ -1527,7 +1527,7 @@ cAudioManager::PlayerJustLeftCar(void) const
}
void
-cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping)
+cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping)
{
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, 50.f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
@@ -1538,7 +1538,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) {
@@ -1552,9 +1552,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();
}
}
@@ -1569,7 +1569,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;
@@ -1579,9 +1579,9 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 200.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
if(params.m_fDistance < SQR(90)) {
@@ -1590,7 +1590,7 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0;
@@ -1600,9 +1600,9 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 90.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1639,32 +1639,32 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
float velocityChangeForAudio;
float relativeVelocityChange;
float time;
- bool channelUsed;
- bool lostTraction;
- bool noGearBox;
- bool stuckInSand;
- bool processedAccelSampleStopped;
- bool isMoped;
+ bool8 channelUsed;
+ bool8 lostTraction;
+ bool8 noGearBox;
+ bool8 stuckInSand;
+ bool8 processedAccelSampleStopped;
+ bool8 isMoped;
static uint32 gearSoundStartTime = CTimer::GetTimeInMilliseconds();
static int32 nCruising = 0;
static int16 LastAccel = 0;
static uint8 CurrentPretendGear = 1;
- static bool bLostTractionLastFrame = false;
- static bool bHandbrakeOnLastFrame = false;
- static bool bAccelSampleStopped = true;
+ static bool8 bLostTractionLastFrame = FALSE;
+ static bool8 bHandbrakeOnLastFrame = FALSE;
+ static bool8 bAccelSampleStopped = TRUE;
- lostTraction = false;
+ lostTraction = FALSE;
isMoped = params.m_pVehicle->m_modelIndex == MI_PIZZABOY || params.m_pVehicle->m_modelIndex == MI_FAGGIO;
- processedAccelSampleStopped = false;
+ processedAccelSampleStopped = FALSE;
if (bPlayerJustEnteredCar) {
- bAccelSampleStopped = true;
- bPlayerJustEnteredCar = false;
+ bAccelSampleStopped = TRUE;
+ bPlayerJustEnteredCar = FALSE;
nCruising = 0;
LastAccel = 0;
- bLostTractionLastFrame = false;
+ bLostTractionLastFrame = FALSE;
CurrentPretendGear = 1;
- bHandbrakeOnLastFrame = false;
+ bHandbrakeOnLastFrame = FALSE;
}
if (CReplay::IsPlayingBack()) {
accelerateState = (255.0f * clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f));
@@ -1720,26 +1720,26 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
++wheelInUseCounter;
}
if (wheelInUseCounter > 2)
- lostTraction = true;
+ lostTraction = TRUE;
}
break;
case 'F':
if (params.m_VehicleType == VEHICLE_TYPE_BIKE) {
if (wheelState[BIKEWHEEL_FRONT] != WHEEL_STATE_NORMAL)
- lostTraction = true;
+ lostTraction = TRUE;
} else {
if ((wheelState[CARWHEEL_FRONT_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_FRONT_RIGHT] != WHEEL_STATE_NORMAL) &&
(wheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
- lostTraction = true;
+ lostTraction = TRUE;
}
break;
case 'R':
if (params.m_VehicleType == VEHICLE_TYPE_BIKE) {
if (wheelState[BIKEWHEEL_REAR] != WHEEL_STATE_NORMAL)
- lostTraction = true;
+ lostTraction = TRUE;
} else {
if (wheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL)
- lostTraction = true;
+ lostTraction = TRUE;
}
break;
default:
@@ -1761,7 +1761,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
gearSoundLength = 0;
engineSoundType = aVehicleSettings[params.m_nIndex].m_nBank;
soundOffset = 3 * (engineSoundType - CAR_SFX_BANKS_OFFSET);
- noGearBox = false;
+ noGearBox = FALSE;
switch (engineSoundType) {
case SFX_BANK_PONTIAC:
gearSoundLength = 2526;
@@ -1806,7 +1806,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
gearSoundLength = 2410;
break;
default:
- noGearBox = true;
+ noGearBox = TRUE;
break;
}
if (!channelUsed || nCruising || noGearBox) {
@@ -1814,7 +1814,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
} else {
gearSoundLength -= 1000;
if (CTimer::GetTimeInMilliseconds() - gearSoundStartTime > gearSoundLength) {
- channelUsed = false;
+ channelUsed = FALSE;
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
}
}
@@ -1838,7 +1838,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
if (params.m_fVelocityChange < -0.001f) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
if (wheelsOnGround == 0 || params.m_pVehicle->bIsHandbrakeOn || lostTraction)
gasPedalAudio = *gasPedalAudioPtr;
@@ -1850,7 +1850,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
} else if (LastAccel > 0) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
nCruising = 0;
if (wheelsOnGround == 0
@@ -1871,7 +1871,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
vol /= 4;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(vol, freq, soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1, engineSoundType, 63, false);
+ AddPlayerCarSample(vol, freq, soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1, engineSoundType, 63, FALSE);
}
}
freq = (10000.f * gasPedalAudio) + 22050;
@@ -1880,7 +1880,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
if (params.m_pVehicle->bIsDrowning)
vol /= 4;
- AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1, SFX_BANK_0, 52, true);
+ AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1, SFX_BANK_0, 52, TRUE);
CurrentPretendGear = Max(1, currentGear);
}
@@ -1911,18 +1911,18 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
if (params.m_pVehicle->bIsDrowning)
vol /= 4;
- AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1, SFX_BANK_0, 2, true);
+ AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1, SFX_BANK_0, 2, TRUE);
} else {
TranslateEntity(&m_sQueueSample.m_vecPos, &pos);
if (bAccelSampleStopped) {
if (CurrentPretendGear != 1 || currentGear != 2)
CurrentPretendGear = Max(1, currentGear - 1);
- processedAccelSampleStopped = true;
- bAccelSampleStopped = false;
+ processedAccelSampleStopped = TRUE;
+ bAccelSampleStopped = FALSE;
}
if (channelUsed) {
SampleManager.SetChannelEmittingVolume(m_nActiveSamples, 120);
@@ -1933,12 +1933,12 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else if (processedAccelSampleStopped) {
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
- params.m_pVehicle->bAudioChangingGear = true;
+ params.m_pVehicle->bAudioChangingGear = TRUE;
if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
return;
SampleManager.SetChannelLoopCount(m_nActiveSamples, 1);
@@ -1952,13 +1952,13 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else if (CurrentPretendGear < params.m_pTransmission->nNumberOfGears - 1) {
++CurrentPretendGear;
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
- params.m_pVehicle->bAudioChangingGear = true;
+ params.m_pVehicle->bAudioChangingGear = TRUE;
if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
return;
SampleManager.SetChannelLoopCount(m_nActiveSamples, 1);
@@ -1972,7 +1972,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else {
@@ -1982,7 +1982,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
}
} else {
PlayCruising:
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
SampleManager.StopChannel(m_nActiveSamples);
if (isMoped || accelerateState >= 150 && wheelsOnGround && brakeState <= 0 && !params.m_pVehicle->bIsHandbrakeOn
&& !lostTraction && currentGear >= params.m_pTransmission->nNumberOfGears - 1) {
@@ -1995,7 +1995,7 @@ PlayCruising:
freq = 27 * nCruising + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(120, freq, soundOffset + SFX_CAR_AFTER_ACCEL_1, engineSoundType, 64, true);
+ AddPlayerCarSample(120, freq, soundOffset + SFX_CAR_AFTER_ACCEL_1, engineSoundType, 64, TRUE);
} else {
nCruising = 0;
}
@@ -2007,7 +2007,7 @@ PlayCruising:
return;
}
-bool
+bool8
cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2026,7 +2026,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
float skidVal = 0.0f;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
automobile = (CAutomobile*)params.m_pVehicle;
@@ -2044,10 +2044,10 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
break;
default:
debug("\n * AUDIOLOG: ProcessVehicleSkidding() Unsupported vehicle type %d * \n", params.m_VehicleType);
- return true;
+ return TRUE;
}
if (wheelsOnGround == 0)
- return true;
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
for (int32 i = 0; i < numWheels; i++) {
@@ -2089,7 +2089,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
m_sQueueSample.m_nFrequency = 13000.f * skidVal + 35000.f;
m_sQueueSample.m_nVolume /= 4;
if (m_sQueueSample.m_nVolume == 0)
- return true;
+ return TRUE;
break;
case SURFACE_GRAVEL:
case SURFACE_MUD_DRY:
@@ -2109,7 +2109,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;
@@ -2117,14 +2117,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
@@ -2173,7 +2173,7 @@ cAudioManager::GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheel
return Max(relativeVelChange, Min(1.0f, Abs(veh->m_vecTurnSpeed.z) * 20.0f));
}
-bool
+bool8
cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2182,17 +2182,17 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
veh = params.m_pVehicle;
if (veh->m_bSirenOrAlarm && UsesSirenSwitching(params))
- return true;
+ return TRUE;
if (veh->m_modelIndex == MI_MRWHOOP)
- return true;
+ return TRUE;
if (veh->IsAlarmOn())
- return true;
+ return TRUE;
if (veh->m_nCarHornTimer != 0) {
if (veh->GetStatus() != STATUS_PLAYER) {
@@ -2201,7 +2201,7 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
veh->m_nCarHornPattern = (m_FrameCounter + m_sQueueSample.m_nEntityIndex) & 7;
if (!hornPatternsArray[veh->m_nCarHornPattern][44 - veh->m_nCarHornTimer])
- return true;
+ return TRUE;
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2211,7 +2211,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;
@@ -2224,31 +2224,31 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::UsesSiren(cVehicleParams& params) const
{
return params.m_pVehicle->UsesSiren();
}
-bool
+bool8
cAudioManager::UsesSirenSwitching(cVehicleParams& params) const
{
if (params.m_nIndex == FIRETRUK || params.m_nIndex == MRWHOOP)
- return false;
+ return FALSE;
return UsesSiren(params);
}
-bool
+bool8
cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
{
const float SOUND_INTENSITY = 110.0f;
@@ -2257,18 +2257,18 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
veh = params.m_pVehicle;
if (!veh->m_bSirenOrAlarm && !veh->IsAlarmOn())
- return true;
+ return TRUE;
if (veh->IsAlarmOn()) {
if (CTimer::GetTimeInMilliseconds() > veh->m_nCarHornTimer)
veh->m_nCarHornTimer = CTimer::GetTimeInMilliseconds() + 750;
if (veh->m_nCarHornTimer < CTimer::GetTimeInMilliseconds() + 375)
- return true;
+ return TRUE;
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2278,7 +2278,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nCounter = 5;
if (UsesSiren(params)) {
if (params.m_pVehicle->GetStatus() == STATUS_ABANDONED)
- return true;
+ return TRUE;
if (veh->m_nCarHornTimer != 0 && params.m_nIndex != FIRETRUK && params.m_nIndex != MRWHOOP) {
m_sQueueSample.m_nSampleIndex = SFX_SIREN_FAST;
if (params.m_nIndex == FBIRANCH)
@@ -2298,7 +2298,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = volume;
@@ -2306,22 +2306,22 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 7.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::UsesReverseWarning(int32 model) const
{
return model == LINERUN || model == FIRETRUK || model == BUS || model == COACH || model == PACKER || model == FLATBED;
}
-bool
+bool8
cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
{
const float SOUND_INTENSITY = 50.0f;
@@ -2330,7 +2330,7 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (veh->bEngineOn && veh->m_fGasPedal < 0.0f) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2340,7 +2340,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;
@@ -2353,17 +2353,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;
@@ -2374,7 +2374,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
float velocity;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2391,7 +2391,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;
@@ -2399,19 +2399,19 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
AddSampleToRequestedQueue();
}
}
}
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessAirBrakes(cVehicleParams& params)
{
const float SOUND_INTENSITY = 30.0f;
@@ -2419,14 +2419,14 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance > SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
if (!automobile->bEngineOn)
- return true;
+ return TRUE;
if ((automobile->m_fVelocityChangeForAudio < 0.025f || params.m_fVelocityChange >= 0.025f) &&
(automobile->m_fVelocityChangeForAudio > -0.025f || params.m_fVelocityChange <= 0.025f))
- return true;
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
volume = m_anRandomTable[0] % 10 + 70;
@@ -2437,7 +2437,7 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AIR_BRAKES);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_nEmittingVolume = volume;
@@ -2445,23 +2445,23 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::HasAirBrakes(int32 model) const
{
return model == LINERUN || model == FIRETRUK || model == TRASH || model == BUS || model == BARRACKS
|| model == COACH || model == PACKER || model == FLATBED;
}
-bool
+bool8
cAudioManager::ProcessEngineDamage(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2470,11 +2470,11 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
uint8 emittingVolume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pVehicle->m_modelIndex == MI_CADDY)
- return true;
+ return TRUE;
if (params.m_pVehicle->GetStatus() == STATUS_WRECKED)
- return true;
+ return TRUE;
health = params.m_pVehicle->m_fHealth;
if (health < 390.0f) {
if (health < 250.0f) {
@@ -2495,24 +2495,24 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 28;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessCarBombTick(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2521,7 +2521,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
uint8 bombType;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pVehicle->bEngineOn) {
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
@@ -2532,7 +2532,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
break;
default:
debug("\n * AUDIOLOG: ProcessCarBombTick() Unsupported vehicle type %d * \n", params.m_VehicleType);
- return true;
+ return TRUE;
break;
}
if (bombType == CARBOMB_TIMEDACTIVE) {
@@ -2542,7 +2542,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;
@@ -2551,15 +2551,15 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
}
- return true;
+ return TRUE;
}
void
@@ -2569,15 +2569,15 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
uint8 emittingVol;
float relVol;
float vol;
- bool noReflections;
- bool isHeli;
+ bool8 noReflections;
+ bool8 isHeli;
float maxDist;
static uint8 GunIndex = 53;
for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- noReflections = false;
- isHeli = false;
- m_sQueueSample.m_bRequireReflection = false;
+ noReflections = FALSE;
+ isHeli = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
event = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
switch (event) {
case SOUND_CAR_DOOR_CLOSE_BONNET:
@@ -2620,7 +2620,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_DOOR_OPEN_BONNET:
@@ -2660,7 +2660,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_WINDSHIELD_CRACK: {
@@ -2735,7 +2735,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_LIGHT_BREAK: {
@@ -2780,7 +2780,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- noReflections = true;
+ noReflections = TRUE;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[0] % 15 + 55;
break;
@@ -2865,7 +2865,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
emittingVol = (37.0f * vol * 625.0f / 24.0f) + 90;
maxDist = SQR(SOUND_INTENSITY);
- noReflections = true;
+ noReflections = TRUE;
break;
}
case SOUND_CAR_BOMB_TICK: {
@@ -2878,7 +2878,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVol = 60;
break;
}
@@ -2960,8 +2960,8 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
- isHeli = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ isHeli = TRUE;
break;
default:
{
@@ -3014,7 +3014,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
}
@@ -3046,7 +3046,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVol = 50;
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -3060,7 +3060,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
}
/* case SOUND_PED_BODYCAST_HIT:
pedParams.m_pPed = nil;
- pedParams.m_bDistanceCalculated = false;
+ pedParams.m_bDistanceCalculated = FALSE;
pedParams.m_fDistance = 0.0f;
pedParams.m_bDistanceCalculated = params.m_bDistanceCalculated;
pedParams.m_fDistance = params.m_fDistance;
@@ -3087,7 +3087,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVol = m_anRandomTable[4] % 20 + 90;
break;
}
@@ -3105,7 +3105,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 20 + 55;
CrunchOffset %= 2;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_PED_COLLISION: {
@@ -3135,18 +3135,18 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
if (m_sQueueSample.m_nVolume != 0) {
if (noReflections) {
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
} else {
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
}
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
if (isHeli) {
if (0.2f * m_sQueueSample.m_fSoundIntensity > m_sQueueSample.m_fDistance) {
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nOffset = 0;
#ifdef THIS_IS_STUPID
goto AddSample;
@@ -3157,14 +3157,14 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = GunIndex++;
if (GunIndex > 58)
GunIndex = 53;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
continue;
#endif
}
- isHeli = false;
+ isHeli = FALSE;
}
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
#ifdef THIS_IS_STUPID
AddSample:
AddSampleToRequestedQueue();
@@ -3188,7 +3188,7 @@ AddSample:
}
#ifdef GTA_TRAIN
-bool
+bool8
cAudioManager::ProcessTrainNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 300.0f;
@@ -3198,7 +3198,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
float speedMultipler;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_fVelocityChange > 0.0f) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -3211,7 +3211,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;
@@ -3220,10 +3220,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();
}
}
@@ -3234,7 +3234,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;
@@ -3243,24 +3243,24 @@ 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;
}
#endif
-bool
+bool8
cAudioManager::ProcessBoatEngine(cVehicleParams& params)
{
CBoat *boat;
float padRelativeAccerate;
- bool isV12 = false;
+ bool8 isV12 = FALSE;
static int32 LastFreq = 2000;
static int8 LastVol = 0;
@@ -3269,7 +3269,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
if (params.m_fDistance < SQR(intensity)) {
boat = (CBoat *)params.m_pVehicle;
if(boat->GetStatus() == STATUS_WRECKED)
- return true;
+ return TRUE;
float freqModificator;
float volModificator;
@@ -3291,7 +3291,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
case MI_JETMAX:
freqModificator = 6000.0f;
volModificator = 60.0f;
- isV12 = true;
+ isV12 = TRUE;
BaseFreq = 9000;
BaseVol = 20;
break;
@@ -3309,18 +3309,18 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
BaseFreq = 1782;
break;
default:
- return true;
+ return TRUE;
}
- bool bIsPlayerVeh;
+ bool8 bIsPlayerVeh;
if(FindPlayerVehicle() == params.m_pVehicle) {
float padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
padRelativeAccerate = padAccelerate / 255.0f;
- bIsPlayerVeh = true;
+ bIsPlayerVeh = TRUE;
} else {
padRelativeAccerate = Max(params.m_pVehicle->m_fGasPedal, params.m_pVehicle->m_fBrakePedal);
- bIsPlayerVeh = false;
+ bIsPlayerVeh = FALSE;
}
int Freq = BaseFreq + (padRelativeAccerate * freqModificator);
@@ -3358,7 +3358,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
else
m_sQueueSample.m_nSampleIndex = SFX_BOAT_CRUISER_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = Vol;
@@ -3366,10 +3366,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();
}
}
@@ -3383,7 +3383,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = 80;
@@ -3391,10 +3391,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();
}
}
@@ -3402,12 +3402,12 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
LastFreq = Freq;
LastVol = Vol;
}
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool
+bool8
cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
{
float velocityChange;
@@ -3415,11 +3415,11 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
float multiplier;
if (params.m_fDistance > SQR(50))
- return false;
+ return FALSE;
velocityChange = Abs(params.m_fVelocityChange);
if (velocityChange <= 0.0005f && ((CBoat*)params.m_pVehicle)->bBoatInWater)
- return true;
+ return TRUE;
velocityChange = Min(0.75f, velocityChange);
multiplier = (velocityChange - 0.0005f) / (1499.0f / 2000.0f);
@@ -3430,7 +3430,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;
@@ -3439,14 +3439,14 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 6;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
void
@@ -3466,12 +3466,12 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
float propellerSpeed;
float freqModifier; //may be relate to angle with horison
float cameraAngle;
- bool distanceCalculatedOld;
+ bool8 distanceCalculatedOld;
float distanceOld;
CVector vecPosOld;
float volumeModifier;//TODO find better name
- bool hunterBool;
+ bool8 hunterBool;
static uint32 freqFrontPrev = 14287;
static uint32 freqPropellerPrev = 7143;
@@ -3479,7 +3479,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
boat = nil;
automobile = nil;
- hunterBool = false;
+ hunterBool = FALSE;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
return;
@@ -3535,7 +3535,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
}
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3543,10 +3543,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3563,7 +3563,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
if (playerVeh == veh && (accelerateState > 0 || brakeState > 0) && freq < 1300)//unnesesary freqModifier alredy <= 1300
freq = 1300;
if (veh->m_modelIndex == MI_HUNTER)
- hunterBool = true;
+ hunterBool = TRUE;
}
@@ -3576,7 +3576,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_HELI_APACHE_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000 + freq;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3584,10 +3584,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
} else if (boat != nil) {
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO1;
@@ -3602,7 +3602,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqFrontPrev, 197);
freqFrontPrev = m_sQueueSample.m_nFrequency;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3610,16 +3610,16 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
} else {
m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_MAI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3627,10 +3627,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3664,7 +3664,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
}
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3672,10 +3672,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
@@ -3698,7 +3698,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
}
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nCounter = 12;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3706,10 +3706,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 30;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3734,7 +3734,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO4;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 12;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = propellerSpeed * 100.0f;
@@ -3742,10 +3742,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_SEAPLANE_PRO4);
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
m_sQueueSample.m_fSoundIntensity = 20.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3760,7 +3760,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
else if (params.m_VehicleType == VEHICLE_TYPE_HELI)
m_sQueueSample.m_vecPos = CVector(0.0f, -10.0f, 0.0f); //this is from android, but for real it's not used
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
if (params.m_fDistance < SQR(27.0f)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -3769,7 +3769,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = hunterBool ? SFX_HELI_APACHE_3 : SFX_CAR_HELI_REA;
m_sQueueSample.m_nBankIndex = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000;
m_sQueueSample.m_nLoopCount = 0;
@@ -3778,10 +3778,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 27.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3799,7 +3799,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
CAutomobile* automobile;
CBike* bike;
- bool wheelBurst;
+ bool8 wheelBurst;
uint8 emittingVol;
float modifier;
@@ -3810,19 +3810,19 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
automobile = (CAutomobile*)params.m_pVehicle;
- wheelBurst = false;
+ wheelBurst = FALSE;
for (int i = 0; i < 4; i++)
if (automobile->Damage.GetWheelStatus(i) == WHEEL_STATUS_BURST && automobile->m_aWheelTimer[i] > 0.0f)
- wheelBurst = true;
+ wheelBurst = TRUE;
if (!wheelBurst)
return;
break;
case VEHICLE_TYPE_BIKE:
bike = (CBike*)params.m_pVehicle;
- wheelBurst = false;
+ wheelBurst = FALSE;
for(int i = 0; i < 2; i++)
if (bike->m_wheelStatus[i] == WHEEL_STATUS_BURST && bike->m_aWheelTimer[i] > 0.0f)
- wheelBurst = true;
+ wheelBurst = TRUE;
if (!wheelBurst)
return;
break;
@@ -3837,7 +3837,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
if (m_sQueueSample.m_nVolume) {
m_sQueueSample.m_nCounter = 95;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BURST_L;
m_sQueueSample.m_nFrequency = (5500.0f * modifier) + 8000;
@@ -3847,10 +3847,10 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_TYRE_BURST_L);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3989,12 +3989,12 @@ cAudioManager::ProcessJumboDecel(CPlane *plane)
}
}
-bool
+bool8
cAudioManager::SetupJumboTaxiSound(uint8 vol)
{
const float SOUND_INTENSITY = 180.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
uint8 emittingVol = (vol / 2) + ((vol / 2) * m_sQueueSample.m_fDistance / SOUND_INTENSITY);
@@ -4006,7 +4006,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;
@@ -4015,22 +4015,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);
@@ -4038,7 +4038,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;
@@ -4047,21 +4047,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);
@@ -4069,7 +4069,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;
@@ -4078,20 +4078,20 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboFlySound(uint8 emittingVol)
{
const float SOUND_INTENSITY = 440.0f;
- if(m_sQueueSample.m_fDistance >= SOUND_INTENSITY) return false;
+ if(m_sQueueSample.m_fDistance >= SOUND_INTENSITY) return FALSE;
int32 vol = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
m_sQueueSample.m_nVolume = vol;
@@ -4099,7 +4099,7 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
m_sQueueSample.m_nLoopCount = 0;
@@ -4108,21 +4108,21 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false; // todo port fix to re3
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE; // todo port fix to re3
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
{
const float SOUND_INTENSITY = 240.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
@@ -4130,7 +4130,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;
@@ -4139,11 +4139,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;
@@ -4151,7 +4151,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nOffset = MAX_VOLUME;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
int32
@@ -4172,7 +4172,7 @@ cAudioManager::ProcessPed(CPhysical *ped)
m_sQueueSample.m_vecPos = ped->GetPosition();
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_pPed = (CPed *)ped;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
ProcessPedOneShots(params);
@@ -4186,9 +4186,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
@@ -4197,9 +4197,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:
@@ -4276,9 +4276,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:
@@ -4304,9 +4304,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_FIGHT_37:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
@@ -4388,7 +4388,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
++iSound;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4399,9 +4399,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_WEAPON_BAT_ATTACK:
case SOUND_WEAPON_KNIFE_ATTACK:
@@ -4434,7 +4434,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
- stereo = true;
+ stereo = TRUE;
break;
}
}
@@ -4445,7 +4445,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
}
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4455,9 +4455,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 20 + 100;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_WEAPON_CHAINSAW_IDLE:
@@ -4480,8 +4480,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_IDLE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_CHAINSAW_IDLE);
m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
break;
case SOUND_WEAPON_CHAINSAW_ATTACK:
@@ -4504,8 +4504,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
break;
case SOUND_WEAPON_CHAINSAW_MADECONTACT:
@@ -4530,8 +4530,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
break;
case SOUND_WEAPON_SHOT_FIRED:
@@ -4544,7 +4544,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 1;
@@ -4556,16 +4556,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[0] % 20 + 80;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_COLT45:
m_sQueueSample.m_nSampleIndex = SFX_COLT45_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4577,16 +4577,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[1] % 10 + 90;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_PYTHON:
m_sQueueSample.m_nSampleIndex = SFX_PYTHON_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PYTHON_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4598,17 +4598,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 127;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SHOTGUN:
case WEAPONTYPE_STUBBY_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4620,16 +4620,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 10 + 100;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SPAS12_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_SPAS12_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SPAS12_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4641,16 +4641,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 10 + 100;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_TEC9:
m_sQueueSample.m_nSampleIndex = SFX_TEC_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 17000;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4661,16 +4661,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_UZI:
case WEAPONTYPE_MINIGUN:
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4682,15 +4682,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SILENCED_INGRAM:
m_sQueueSample.m_nSampleIndex = SFX_TEC_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 34000;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4701,15 +4701,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_MP5:
m_sQueueSample.m_nSampleIndex = SFX_MP5_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_MP5_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4721,15 +4721,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_M4:
m_sQueueSample.m_nSampleIndex = SFX_RUGER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 43150;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4740,15 +4740,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 90;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_RUGER:
m_sQueueSample.m_nSampleIndex = SFX_RUGER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RUGER_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4760,16 +4760,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 90;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SNIPERRIFLE:
case WEAPONTYPE_LASERSCOPE:
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
if (weapon->m_eWeaponType == WEAPONTYPE_SNIPERRIFLE)
m_sQueueSample.m_nFrequency = 25472;
else
@@ -4784,10 +4784,10 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[4] % 10 + 110;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_FLAMETHROWER:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_LEFT;
@@ -4803,17 +4803,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nEmittingVolume = 90;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 6;
- stereo = true;
+ stereo = TRUE;
break;
case WEAPONTYPE_M60:
case WEAPONTYPE_HELICANNON:
m_sQueueSample.m_nSampleIndex = SFX_M60_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M60_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4825,9 +4825,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 127;
m_sQueueSample.m_nEmittingVolume = 127;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
default:
continue;
@@ -4872,7 +4872,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;
@@ -4883,9 +4883,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:
{
@@ -4917,7 +4917,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
switch (weaponType) {
case WEAPONTYPE_TEC9:
m_sQueueSample.m_nFrequency = 13000;
@@ -4948,9 +4948,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[4] % 10 + 80;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_WEAPON_FLAMETHROWER_FIRE:
@@ -4968,14 +4968,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;
@@ -4987,8 +4987,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[0] % 20 + 90;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
break;
case SOUND_SPLASH:
if (m_FrameCounter <= iSplashFrame)
@@ -4997,7 +4997,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -5008,9 +5008,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[2] % 30 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_MELEE_ATTACK_START:
{
@@ -5030,7 +5030,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -5045,9 +5045,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_SKATING:
@@ -5058,7 +5058,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[3] & 1) + SFX_SKATE_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound;
- stereo = true;
+ stereo = TRUE;
++iSound;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 1000 + 17000;
if (param2 == 0)
@@ -5072,9 +5072,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = (m_anRandomTable[2] % 20 + 70) * param1 / 127;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_WEAPON_MINIGUN_ATTACK:
@@ -5091,8 +5091,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_LEFT);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_MINIGUN_FIRE_LEFT);
m_sQueueSample.m_nEmittingVolume = 127;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
break;
case SOUND_WEAPON_MINIGUN_2:
@@ -5109,8 +5109,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_RIGHT);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_MINIGUN_FIRE_RIGHT);
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
break;
case SOUND_WEAPON_MINIGUN_3:
@@ -5127,9 +5127,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 127;
m_sQueueSample.m_nEmittingVolume = 127;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_SHIRT_WIND_FLAP:
if (params.m_pPed->IsPlayer() && params.m_pPed->m_pMyVehicle) {
@@ -5170,8 +5170,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
}
}
@@ -5189,13 +5189,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;
@@ -5216,7 +5216,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
void
-cAudioManager::SetPedTalkingStatus(CPed *ped, uint8 status)
+cAudioManager::SetPedTalkingStatus(CPed *ped, bool8 status)
{
if (ped != nil)
ped->m_canTalk = status;
@@ -5244,12 +5244,12 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
if(ped != nil) {
if(!ped->m_canTalk) return;
- m_bGenericSfx = false;
+ m_bGenericSfx = FALSE;
pedComment.m_nSampleIndex = GetPedCommentSfx(ped, sound);
if(pedComment.m_nSampleIndex == NO_SAMPLE) return;
soundIntensity = 40.0f;
} else {
- m_bGenericSfx = true;
+ m_bGenericSfx = TRUE;
switch(sound) {
case SOUND_PED_HELI_PLAYER_FOUND:
soundIntensity = 400.0f;
@@ -7825,7 +7825,7 @@ cAudioManager::GetGenericMaleTalkSfx(CPed *ped, int16 sound)
{
uint32 sfx;
- m_bGenericSfx = true;
+ m_bGenericSfx = TRUE;
switch(sound) {
case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_MALE_DEATH_1, 41); break;
case SOUND_PED_BULLET_HIT:
@@ -7841,7 +7841,7 @@ uint32
cAudioManager::GetGenericFemaleTalkSfx(CPed *ped, int16 sound)
{
uint32 sfx;
- m_bGenericSfx = true;
+ m_bGenericSfx = TRUE;
switch(sound) {
case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_DEATH_1, 22); break;
case SOUND_PED_BULLET_HIT:
@@ -7889,7 +7889,7 @@ cPedComments::Process()
uint32 sampleIndex;
uint8 actualUsedBank;
tPedComment *comment;
- bool prevUsed = false;
+ bool8 prevUsed = FALSE;
static uint8 counter = 0;
static int32 prevSamples[10];
@@ -7900,7 +7900,7 @@ cPedComments::Process()
if(m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nSampleIndex ==
prevSamples[(counter + 1 + i) % ARRAY_SIZE(prevSamples)]) {
m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nProcess = -1;
- prevUsed = true;
+ prevUsed = TRUE;
break;
}
}
@@ -7925,14 +7925,14 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
AudioManager.m_sQueueSample.m_fSoundIntensity = 40.0f;
- AudioManager.m_sQueueSample.m_bReleasingSoundFlag = true;
+ AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE;
AudioManager.m_sQueueSample.m_vecPos = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos;
- AudioManager.m_sQueueSample.m_bReverbFlag = true;
- AudioManager.m_sQueueSample.m_bRequireReflection = true;
- AudioManager.m_sQueueSample.m_bIs2D = false;
+ AudioManager.m_sQueueSample.m_bReverbFlag = TRUE;
+ AudioManager.m_sQueueSample.m_bRequireReflection = TRUE;
+ AudioManager.m_sQueueSample.m_bIs2D = FALSE;
#ifdef FIX_BUGS
if (sampleIndex >= SFX_PLAYER_ANGRY_BUSTED_1 && sampleIndex < TOTAL_AUDIO_SAMPLES) { // check if player sfx
- AudioManager.m_sQueueSample.m_bIs2D = true;
+ AudioManager.m_sQueueSample.m_bIs2D = TRUE;
AudioManager.m_sQueueSample.m_nOffset = 63;
}
#endif // FIX_BUGS
@@ -7945,7 +7945,7 @@ cPedComments::Process()
AudioManager.AddSampleToRequestedQueue();
#if defined(GTA_PC) && !defined(FIX_BUGS)
m_nDelayTimer = CTimer::GetTimeInMilliseconds();
- m_bDelay = true;
+ m_bDelay = TRUE;
#endif
}
}
@@ -7973,7 +7973,7 @@ cPedComments::Process()
m_nCommentsInBank[actualUsedBank] = 0;
#if defined(GTA_PC) && !defined(FIX_BUGS)
if(m_bDelay)
- if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = false;
+ if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = FALSE;
#endif
}
@@ -8003,7 +8003,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case EXPLOSION_MOLOTOV:
m_sQueueSample.m_fSoundIntensity = 150.0f;
@@ -8011,7 +8011,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
break;
case EXPLOSION_MINE:
case EXPLOSION_HELI_BOMB:
@@ -8020,7 +8020,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 12347;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
default:
m_sQueueSample.m_fSoundIntensity = 200.0f;
@@ -8040,13 +8040,13 @@ cAudioManager::ProcessExplosions(int32 explosion)
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -8107,19 +8107,19 @@ cAudioManager::ProcessFires(int32)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nReleasingVolumeDivider = 10;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
if (gFireManager.m_aFires[i].m_bExtinguishedWithWater) {
- gFireManager.m_aFires[i].m_bExtinguishedWithWater = false;
+ gFireManager.m_aFires[i].m_bExtinguishedWithWater = FALSE;
emittingVol = 100.0f * gFireManager.m_aFires[i].m_fWaterExtinguishCountdown;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
@@ -8131,14 +8131,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();
}
}
@@ -8167,14 +8167,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();
}
}
@@ -8204,17 +8204,17 @@ cAudioManager::ProcessExtraSounds()
m_sQueueSample.m_nSampleIndex = SFX_ARCADE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARCADE);
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_ARCADE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_ARCADE);
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
AddSampleToRequestedQueue();
}
@@ -8247,14 +8247,14 @@ cAudioManager::ProcessEscalators()
m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_nCounter = i;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_BOAT_V12_LOOP);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_BOAT_V12_LOOP);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8299,8 +8299,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
emittingVolume = 60;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SCRIPT_SOUND_GARAGE_DOOR_CLUNK:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -8311,8 +8311,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 4;
emittingVolume = 60;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_HIT:
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
@@ -8325,7 +8325,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 9;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 90;
break;
case SCRIPT_SOUND_WILLIE_CARD_SWIPE:
@@ -8336,8 +8336,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = 20159;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
break;
case SCRIPT_SOUND_MALE_AMBULANCE_OUCH:
{
@@ -8361,8 +8361,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_HORN_JEEP); // BUG?
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bIs2D = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
break;
case SCRIPT_SOUND_PAYPHONE_RINGING:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -8372,8 +8372,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;
@@ -8383,7 +8383,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;
@@ -8393,7 +8393,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;
@@ -8403,8 +8403,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;
@@ -8413,7 +8413,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:
@@ -8423,8 +8423,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:
@@ -8434,8 +8434,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:
@@ -8446,8 +8446,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:
@@ -8458,8 +8458,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
case SCRIPT_SOUND_HIT_BALL:
@@ -8470,8 +8470,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
case SCRIPT_SOUND_GUNSHELL_DROP:
@@ -8507,7 +8507,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:
@@ -8517,7 +8517,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:
@@ -8531,11 +8531,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();
}
}
@@ -8557,7 +8557,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP:
case SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP:
@@ -8569,7 +8569,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_SNORING_LOOP:
m_sQueueSample.m_fSoundIntensity = 6.0f;
@@ -8580,7 +8580,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 6;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP:
m_sQueueSample.m_fSoundIntensity = 40.0f;
@@ -8591,7 +8591,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_1:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_1;
@@ -8602,7 +8602,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_2:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_2;
@@ -8613,7 +8613,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_3:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_3;
@@ -8624,7 +8624,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_4:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_4;
@@ -8635,7 +8635,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_MALIBU_1:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return;
@@ -8648,7 +8648,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_MALIBU_2:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return;
@@ -8661,7 +8661,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_MALIBU_3:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return;
@@ -8674,7 +8674,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_1:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return;
@@ -8687,7 +8687,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_2:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return;
@@ -8700,7 +8700,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_3:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return;
@@ -8713,7 +8713,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_CHURCH:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_CHURCH;
@@ -8724,7 +8724,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_WATERFALL:
emittingVolume = 30;
@@ -8735,7 +8735,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nReleasingVolumeDivider = 9;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
default: return;
}
@@ -8746,14 +8746,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();
}
}
@@ -8791,14 +8791,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())) {
@@ -8809,15 +8809,15 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 30;
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
x = 0.0f;
@@ -8834,15 +8834,15 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
CObject::fDistToNearestTree = 999999.9f;
}
@@ -8851,11 +8851,11 @@ cAudioManager::ProcessWeather(int32 id)
void
cAudioManager::ProcessFrontEnd()
{
- bool stereo;
- bool processedPickup;
- bool processedMission;
- bool staticFreq;
- bool center;
+ bool8 stereo;
+ bool8 processedPickup;
+ bool8 processedMission;
+ bool8 staticFreq;
+ bool8 center;
int16 sample;
static uint8 iSound = 0;
@@ -8864,11 +8864,11 @@ cAudioManager::ProcessFrontEnd()
static uint32 radioDial = SFX_RADIO_DIAL_1;
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- staticFreq = false;
- processedPickup = false;
- center = false;
- processedMission = false;
- stereo = false;
+ staticFreq = FALSE;
+ processedPickup = FALSE;
+ center = FALSE;
+ processedMission = FALSE;
+ stereo = FALSE;
switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) {
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE;
@@ -8880,9 +8880,9 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_BAD_VEHICLE:
case SOUND_GARAGE_BOMB_ALREADY_SET:
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
- stereo = true;
- staticFreq = true;
- center = true;
+ stereo = TRUE;
+ staticFreq = TRUE;
+ center = TRUE;
break;
case SOUND_GARAGE_OPENING:
case SOUND_71: //case SOUND_41:
@@ -8890,8 +8890,8 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_VEHICLE_ACCEPTED:
case SOUND_EVIDENCE_PICKUP:
case SOUND_UNLOAD_GOLD:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
break;
case SOUND_GARAGE_BOMB1_SET:
@@ -8899,60 +8899,60 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_BOMB3_SET:
case SOUND_PICKUP_WEAPON_BOUGHT:
case SOUND_PICKUP_WEAPON:
- center = true;
- processedPickup = true;
+ center = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_PICKUP_HEALTH:
case SOUND_81: //case SOUND_4B:
case SOUND_PICKUP_ADRENALINE:
case SOUND_PICKUP_ARMOUR:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
break;
case SOUND_80:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
- center = true;
- staticFreq = true;
+ center = TRUE;
+ staticFreq = TRUE;
break;
case SOUND_PICKUP_BONUS:
case SOUND_FRONTEND_MENU_STARTING:
case SOUND_HUD:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_INFO_LEFT;
- center = true;
+ center = TRUE;
break;
case SOUND_PICKUP_MONEY:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
break;
case SOUND_PICKUP_HIDDEN_PACKAGE:
case SOUND_PICKUP_PACMAN_PILL:
case SOUND_PICKUP_PACMAN_PACKAGE:
case SOUND_PICKUP_FLOAT_PACKAGE:
- center = true;
- processedPickup = true;
+ center = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_RACE_START_3:
case SOUND_RACE_START_2:
case SOUND_RACE_START_1:
case SOUND_PART_MISSION_COMPLETE:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
- processedMission = true;
- center = true;
+ processedMission = TRUE;
+ center = TRUE;
break;
case SOUND_RACE_START_GO:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_GO_LEFT;
- center = true;
+ center = TRUE;
break;
case SOUND_CLOCK_TICK:
m_sQueueSample.m_nSampleIndex = SFX_TIMER;
@@ -8978,19 +8978,19 @@ cAudioManager::ProcessFrontEnd()
radioDial = m_sQueueSample.m_nSampleIndex;
break;
case SOUND_FRONTEND_HIGHLIGHT_OPTION:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT;
break;
case SOUND_FRONTEND_ENTER_OR_ADJUST:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT_LEFT;
break;
case SOUND_FRONTEND_BACK:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_FE_BACK_LEFT;
break;
case SOUND_FRONTEND_FAIL:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT;
break;
case SOUND_FRONTEND_AUDIO_TEST:
@@ -9029,10 +9029,10 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nVolume = (CWeather::Wind - 1.0f) * m_sQueueSample.m_nVolume;
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nBankIndex = SFX_BANK_FRONT_END_MENU;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -9055,8 +9055,8 @@ cAudioManager::ProcessFrontEnd()
}
m_sQueueSample.m_nOffset = 63;
}
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
if (stereo) {
++m_sQueueSample.m_nSampleIndex;
@@ -9079,7 +9079,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) {
@@ -9094,7 +9094,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;
@@ -9103,10 +9103,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) {
@@ -9114,9 +9114,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();
}
}
@@ -9170,14 +9170,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();
}
}
@@ -9195,7 +9195,7 @@ cAudioManager::ProcessGarages()
uint32 sampleIndex;
uint8 j;
float distSquared;
- bool distCalculated;
+ bool8 distCalculated;
static uint8 iSound = 32;
@@ -9206,7 +9206,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;
@@ -9226,7 +9226,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;
@@ -9238,7 +9238,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;
@@ -9247,19 +9247,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;
@@ -9288,16 +9288,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();
}
}
@@ -9315,7 +9315,7 @@ cAudioManager::ProcessFireHydrant()
const float SOUND_INTENSITY = 35;
float distSquared;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
m_sQueueSample.m_vecPos = ((CEntity *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition();
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
@@ -9329,13 +9329,13 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nEmittingVolume = 40;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
AddSampleToRequestedQueue();
@@ -9350,7 +9350,7 @@ void
cAudioManager::ProcessBridge()
{
float dist;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
if (CBridge::pLiftRoad) {
m_sQueueSample.m_vecPos = CBridge::pLiftRoad->GetPosition();
@@ -9385,7 +9385,7 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_EXTRAS;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);
m_sQueueSample.m_nLoopCount = 0;
@@ -9394,10 +9394,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();
}
}
@@ -9412,7 +9412,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;
@@ -9421,9 +9421,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();
}
}
@@ -9447,7 +9447,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;
@@ -9456,9 +9456,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();
}
}
@@ -9467,7 +9467,7 @@ cAudioManager::ProcessBridgeOneShots()
#endif
#pragma region MISSION_AUDIO
-bool g_bMissionAudioLoadFailed[MISSION_AUDIO_SLOTS];
+bool8 g_bMissionAudioLoadFailed[MISSION_AUDIO_SLOTS];
struct MissionAudioData {
const char *m_pName;
@@ -9862,10 +9862,10 @@ FindMissionAudioSfx(const char *name)
return NO_SAMPLE;
}
-bool
+bool8
cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
{
- return false;
+ return FALSE;
}
void
@@ -9877,12 +9877,12 @@ cAudioManager::PreloadMissionAudio(uint8 slot, Const char *name)
m_sMissionAudio.m_nSampleIndex[slot] = missionAudioSfx;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[slot] = false;
+ m_sMissionAudio.m_bIsPlaying[slot] = FALSE;
m_sMissionAudio.m_nMissionAudioCounter[slot] = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
m_sMissionAudio.m_nMissionAudioCounter[slot] *= 4;
- m_sMissionAudio.m_bIsPlayed[slot] = false;
- m_sMissionAudio.m_bPredefinedProperties[slot] = true;
- g_bMissionAudioLoadFailed[slot] = false;
+ m_sMissionAudio.m_bIsPlayed[slot] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE;
+ g_bMissionAudioLoadFailed[slot] = FALSE;
}
}
}
@@ -9900,7 +9900,7 @@ void
cAudioManager::SetMissionAudioLocation(uint8 slot, float x, float y, float z)
{
if (m_bIsInitialised && slot < MISSION_AUDIO_SLOTS) {
- m_sMissionAudio.m_bPredefinedProperties[slot] = false;
+ m_sMissionAudio.m_bPredefinedProperties[slot] = FALSE;
m_sMissionAudio.m_vecPos[slot] = CVector(x, y, z);
}
}
@@ -9910,25 +9910,25 @@ cAudioManager::PlayLoadedMissionAudio(uint8 slot)
{
if (m_bIsInitialised && slot < MISSION_AUDIO_SLOTS && m_sMissionAudio.m_nSampleIndex[slot] != NO_SAMPLE && m_sMissionAudio.m_nLoadingStatus[slot] == LOADING_STATUS_LOADED &&
m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_STOPPED)
- m_sMissionAudio.m_bIsPlayed[slot] = true;
+ m_sMissionAudio.m_bIsPlayed[slot] = TRUE;
}
-bool
+bool8
cAudioManager::ShouldDuckMissionAudio(uint8 slot) const
{
if (IsMissionAudioSamplePlaying(slot))
return m_sMissionAudio.m_nSampleIndex[slot] != STREAMED_SOUND_MISSION_ROK2_01;
- return false;
+ return FALSE;
}
-bool
+bool8
cAudioManager::IsMissionAudioSamplePlaying(uint8 slot) const
{
if (m_bIsInitialised) {
if (slot < MISSION_AUDIO_SLOTS)
return m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_PLAYING;
else
- return true;
+ return TRUE;
} else {
static int32 cPretendFrame[MISSION_AUDIO_SLOTS] = { 1, 1 };
@@ -9936,14 +9936,14 @@ cAudioManager::IsMissionAudioSamplePlaying(uint8 slot) const
}
}
-bool
+bool8
cAudioManager::IsMissionAudioSampleFinished(uint8 slot)
{
if (m_bIsInitialised) {
if (slot < MISSION_AUDIO_SLOTS)
return m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_FINISHED;
else
- return true;
+ return TRUE;
}
static int32 cPretendFrame[MISSION_AUDIO_SLOTS] = { 1, 1 };
@@ -9958,11 +9958,11 @@ cAudioManager::ClearMissionAudio(uint8 slot)
m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[slot] = false;
- m_sMissionAudio.m_bIsPlayed[slot] = false;
- m_sMissionAudio.m_bPredefinedProperties[slot] = true;
+ m_sMissionAudio.m_bIsPlaying[slot] = FALSE;
+ m_sMissionAudio.m_bIsPlayed[slot] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE;
m_sMissionAudio.m_nMissionAudioCounter[slot] = 0;
- m_sMissionAudio.m_bIsMobile[slot] = false;
+ m_sMissionAudio.m_bIsMobile[slot] = FALSE;
SampleManager.StopStreamedFile(slot + 1);
}
}
@@ -10014,14 +10014,14 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
SetMissionScriptPoliceAudio(m_sMissionAudio.m_nSampleIndex[slot]);
} else {
if (m_nUserPause)
- SampleManager.PauseStream(1, slot + 1);
+ SampleManager.PauseStream(TRUE, slot + 1);
if (m_sMissionAudio.m_bPredefinedProperties[slot]) {
if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_CAMERAL)
- SampleManager.SetStreamedVolumeAndPan(80, 0, 1, slot + 1);
+ SampleManager.SetStreamedVolumeAndPan(80, 0, TRUE, slot + 1);
else if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_CAMERAR)
- SampleManager.SetStreamedVolumeAndPan(80, 127, 1, slot + 1);
+ SampleManager.SetStreamedVolumeAndPan(80, 127, TRUE, slot + 1);
else
- SampleManager.SetStreamedVolumeAndPan(80, 63, 1, slot + 1);
+ SampleManager.SetStreamedVolumeAndPan(80, 63, TRUE, slot + 1);
} else {
distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos[slot]);
if (distSquared >= SQR(80.0f)) {
@@ -10036,14 +10036,14 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
TranslateEntity(&m_sMissionAudio.m_vecPos[slot], &vec);
pan = ComputePan(80.f, &vec);
}
- SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, 1, slot + 1);
+ SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, slot + 1);
}
SampleManager.StartPreloadedStreamedFile(slot + 1);
}
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_PLAYING;
nCheckPlayingDelay[slot] = 30;
if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A)
- m_sMissionAudio.m_bIsMobile[slot] = true;
+ m_sMissionAudio.m_bIsMobile[slot] = TRUE;
break;
case PLAY_STATUS_PLAYING:
if (m_bTimerJustReset) {
@@ -10065,10 +10065,10 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
} else if (m_sMissionAudio.m_bIsPlaying[slot]) {
if (SampleManager.IsStreamPlaying(slot + 1) || m_nUserPause || m_nPreviousUserPause) {
if (m_nUserPause)
- SampleManager.PauseStream(1, slot + 1);
+ SampleManager.PauseStream(TRUE, slot + 1);
else
{
- SampleManager.PauseStream(0, slot + 1);
+ SampleManager.PauseStream(FALSE, slot + 1);
if (!m_sMissionAudio.m_bPredefinedProperties[slot]) {
distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos[slot]);
if (distSquared >= SQR(80.0f)) {
@@ -10083,7 +10083,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
TranslateEntity(&m_sMissionAudio.m_vecPos[slot], &vec);
pan = ComputePan(80.f, &vec);
}
- SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, 1, slot + 1);
+ SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, slot + 1);
}
}
} else if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_ROK2_01) {
@@ -10091,7 +10091,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
} else {
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_FINISHED;
if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A)
- m_sMissionAudio.m_bIsMobile[slot] = false;
+ m_sMissionAudio.m_bIsMobile[slot] = FALSE;
m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE;
SampleManager.StopStreamedFile(slot + 1);
m_sMissionAudio.m_nMissionAudioCounter[slot] = 0;
@@ -10104,7 +10104,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
break;
nCheckPlayingDelay[slot] = 0;
}
- m_sMissionAudio.m_bIsPlaying[slot] = true;
+ m_sMissionAudio.m_bIsPlaying[slot] = TRUE;
}
break;
default:
@@ -10114,7 +10114,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
case LOADING_STATUS_FAILED:
if (++nFramesUntilFailedLoad[slot] >= 120) {
nFramesForPretendPlaying[slot] = 0;
- g_bMissionAudioLoadFailed[slot] = true;
+ g_bMissionAudioLoadFailed[slot] = TRUE;
nFramesUntilFailedLoad[slot] = 0;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_LOADED;
}
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 2304b4c4..3be053d2 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -23,8 +23,8 @@ const int allChannels = channels + 2;
cAudioManager::cAudioManager()
{
- m_bIsInitialised = false;
- m_bReverb = true;
+ m_bIsInitialised = FALSE;
+ m_bReverb = TRUE;
field_6 = 0;
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
m_nTimeSpent = TIME_SPENT;
@@ -36,16 +36,16 @@ cAudioManager::cAudioManager()
ClearActiveSamples();
GenerateIntegerRandomNumberTable();
field_4 = 0;
- m_bDynamicAcousticModelingStatus = true;
+ m_bDynamicAcousticModelingStatus = TRUE;
for (int i = 0; i < NUM_AUDIOENTITIES; i++) {
- m_asAudioEntities[i].m_bIsUsed = false;
+ m_asAudioEntities[i].m_bIsUsed = FALSE;
m_anAudioEntityIndices[i] = NUM_AUDIOENTITIES;
}
m_nAudioEntitiesTotal = 0;
m_FrameCounter = 0;
- m_bFifthFrameFlag = false;
- m_bTimerJustReset = false;
+ m_bFifthFrameFlag = FALSE;
+ m_bTimerJustReset = FALSE;
m_nTimer = 0;
}
@@ -83,7 +83,7 @@ cAudioManager::Terminate()
MusicManager.Terminate();
for (uint32 i = 0; i < NUM_AUDIOENTITIES; i++) {
- m_asAudioEntities[i].m_bIsUsed = false;
+ m_asAudioEntities[i].m_bIsUsed = FALSE;
m_anAudioEntityIndices[i] = ARRAY_SIZE(m_anAudioEntityIndices);
}
@@ -98,7 +98,7 @@ cAudioManager::Terminate()
SampleManager.Terminate();
- m_bIsInitialised = false;
+ m_bIsInitialised = FALSE;
PostTerminateGameSpecificShutdown();
}
}
@@ -110,7 +110,7 @@ cAudioManager::Service()
if (m_bTimerJustReset) {
ResetAudioLogicTimers(m_nTimer);
MusicManager.ResetTimers(m_nTimer);
- m_bTimerJustReset = false;
+ m_bTimerJustReset = FALSE;
}
if (m_bIsInitialised) {
m_nPreviousUserPause = m_nUserPause;
@@ -132,8 +132,8 @@ cAudioManager::CreateEntity(eAudioType type, void *entity)
return AEHANDLE_ERROR_BADAUDIOTYPE;
for (uint32 i = 0; i < ARRAY_SIZE(m_asAudioEntities); i++) {
if (!m_asAudioEntities[i].m_bIsUsed) {
- m_asAudioEntities[i].m_bIsUsed = true;
- m_asAudioEntities[i].m_bStatus = false;
+ m_asAudioEntities[i].m_bIsUsed = TRUE;
+ m_asAudioEntities[i].m_bStatus = FALSE;
m_asAudioEntities[i].m_nType = type;
m_asAudioEntities[i].m_pEntity = entity;
m_asAudioEntities[i].m_awAudioEvent[0] = SOUND_NO_SOUND;
@@ -152,7 +152,7 @@ void
cAudioManager::DestroyEntity(int32 id)
{
if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed) {
- m_asAudioEntities[id].m_bIsUsed = false;
+ m_asAudioEntities[id].m_bIsUsed = FALSE;
for (int32 i = 0; i < m_nAudioEntitiesTotal; ++i) {
if (id == m_anAudioEntityIndices[i]) {
if (i < NUM_AUDIOENTITIES - 1)
@@ -165,7 +165,7 @@ cAudioManager::DestroyEntity(int32 id)
}
void
-cAudioManager::SetEntityStatus(int32 id, uint8 status)
+cAudioManager::SetEntityStatus(int32 id, bool8 status)
{
if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed)
m_asAudioEntities[id].m_bStatus = status;
@@ -193,7 +193,7 @@ cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
}
} else {
int32 i = 0;
- while (true) {
+ while (TRUE) {
if (i >= entity.m_AudioEvents) {
if (entity.m_AudioEvents < ARRAY_SIZE(entity.m_awAudioEvent)) {
entity.m_awAudioEvent[i] = sound;
@@ -246,7 +246,7 @@ cAudioManager::SetEffectsFadeVol(uint8 volume) const
}
void
-cAudioManager::SetMonoMode(uint8 mono)
+cAudioManager::SetMonoMode(bool8 mono)
{
SampleManager.SetMonoMode(mono);
}
@@ -261,7 +261,7 @@ void
cAudioManager::ResetTimers(uint32 time)
{
if (m_bIsInitialised) {
- m_bTimerJustReset = true;
+ m_bTimerJustReset = TRUE;
m_nTimer = time;
ClearRequestedQueue();
if (m_nActiveSampleQueue) {
@@ -280,7 +280,7 @@ cAudioManager::ResetTimers(uint32 time)
SampleManager.SetEffectsFadeVolume(0);
SampleManager.SetMusicFadeVolume(0);
MusicManager.ResetMusicAfterReload();
- m_bIsPlayerShutUp = false;
+ m_bIsPlayerShutUp = FALSE;
#ifdef AUDIO_OAL
SampleManager.Service();
#endif
@@ -391,13 +391,13 @@ cAudioManager::SetSpeakerConfig(int32 conf) const
SampleManager.SetSpeakerConfig(conf);
}
-bool
+bool8
cAudioManager::IsMP3RadioChannelAvailable() const
{
if (m_bIsInitialised)
return SampleManager.IsMP3RadioChannelAvailable();
- return false;
+ return FALSE;
}
void
@@ -417,25 +417,25 @@ cAudioManager::ReacquireDigitalHandle() const
}
void
-cAudioManager::SetDynamicAcousticModelingStatus(uint8 status)
+cAudioManager::SetDynamicAcousticModelingStatus(bool8 status)
{
- m_bDynamicAcousticModelingStatus = status!=0;
+ m_bDynamicAcousticModelingStatus = status;
}
-bool
+bool8
cAudioManager::CheckForAnAudioFileOnCD() const
{
return SampleManager.CheckForAnAudioFileOnCD();
}
-uint8
+char
cAudioManager::GetCDAudioDriveLetter() const
{
if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter();
- return 0;
+ return '\0';
}
-bool
+bool8
cAudioManager::IsAudioInitialised() const
{
return m_bIsInitialised;
@@ -545,7 +545,7 @@ cAudioManager::RandomDisplacement(uint32 seed) const
{
int32 value;
- static bool bPos = true;
+ static bool8 bPos = TRUE;
static uint32 Adjustment = 0;
if (!seed)
@@ -576,7 +576,7 @@ cAudioManager::AddSampleToRequestedQueue()
{
int32 calculatedVolume;
uint8 sampleIndex;
- bool bReflections;
+ bool8 bReflections;
if (m_sQueueSample.m_nSampleIndex < TOTAL_AUDIO_SAMPLES) {
calculatedVolume = m_sQueueSample.m_nReleasingVolumeModificator * (MAX_VOLUME - m_sQueueSample.m_nVolume);
@@ -589,24 +589,24 @@ cAudioManager::AddSampleToRequestedQueue()
++m_SampleRequestQueuesStatus[m_nActiveSampleQueue];
}
m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
- m_sQueueSample.m_bLoopEnded = false;
+ m_sQueueSample.m_bLoopEnded = FALSE;
if (m_sQueueSample.m_bIs2D || CCullZones::InRoomForAudio()) {
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
m_sQueueSample.m_nLoopsRemaining = 0;
}
if (m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount) {
bReflections = m_sQueueSample.m_bRequireReflection;
} else {
- bReflections = false;
+ bReflections = FALSE;
m_sQueueSample.m_nLoopsRemaining = 0;
}
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
if ( m_bReverb && m_sQueueSample.m_bIs2D )
m_sQueueSample.field_4C = 30;
if (!m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
m_asSamples[m_nActiveSampleQueue][sampleIndex] = m_sQueueSample;
@@ -773,7 +773,7 @@ cAudioManager::UpdateReflections()
void
cAudioManager::AddReleasingSounds()
{
- bool toProcess[44]; // why not 27?
+ bool8 toProcess[44]; // why not 27?
int8 queue = m_nActiveSampleQueue == 0 ? 1 : 0;
@@ -782,11 +782,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;
}
}
@@ -811,7 +811,7 @@ cAudioManager::AddReleasingSounds()
if (sample.m_nReleasingVolumeModificator < 20)
++sample.m_nReleasingVolumeModificator;
}
- sample.m_bReleasingSoundFlag = false;
+ sample.m_bReleasingSoundFlag = FALSE;
}
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
AddSampleToRequestedQueue();
@@ -829,12 +829,12 @@ cAudioManager::ProcessActiveQueues()
uint8 vol;
uint8 offset;
float x;
- bool flag;
- bool missionState;
+ bool8 flag;
+ bool8 missionState;
for (int32 i = 0; i < m_nActiveSamples; i++) {
- m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false;
- m_asActiveSamples[i].m_bIsProcessed = false;
+ m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = FALSE;
+ m_asActiveSamples[i].m_bIsProcessed = FALSE;
}
for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
tSound& sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
@@ -847,19 +847,19 @@ cAudioManager::ProcessActiveQueues()
if (m_FrameCounter & 1) {
if (!(j & 1)) {
- flag = false;
+ flag = FALSE;
} else {
- flag = true;
+ flag = TRUE;
}
} else if (j & 1) {
- flag = false;
+ flag = FALSE;
} else {
- flag = true;
+ flag = TRUE;
}
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
- sample.m_bLoopEnded = true;
- m_asActiveSamples[j].m_bLoopEnded = true;
+ sample.m_bLoopEnded = TRUE;
+ m_asActiveSamples[j].m_bLoopEnded = TRUE;
m_asActiveSamples[j].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
continue;
@@ -867,8 +867,8 @@ cAudioManager::ProcessActiveQueues()
if (!sample.m_nReleasingVolumeDivider)
sample.m_nReleasingVolumeDivider = 1;
}
- sample.m_bIsProcessed = true;
- m_asActiveSamples[j].m_bIsProcessed = true;
+ sample.m_bIsProcessed = TRUE;
+ m_asActiveSamples[j].m_bIsProcessed = TRUE;
sample.m_nVolumeChange = -1;
if (!sample.m_bReleasingSoundFlag) {
if (sample.m_bIs2D) {
@@ -900,10 +900,10 @@ cAudioManager::ProcessActiveQueues()
emittingVol = vol;
}
- missionState = false;
+ missionState = FALSE;
for (int32 k = 0; k < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); k++) {
if (m_sMissionAudio.m_bIsMobile[k]) {
- missionState = true;
+ missionState = TRUE;
break;
}
}
@@ -924,8 +924,8 @@ cAudioManager::ProcessActiveQueues()
SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
break; //continue for i
}
- sample.m_bIsProcessed = false;
- m_asActiveSamples[j].m_bIsProcessed = false;
+ sample.m_bIsProcessed = FALSE;
+ m_asActiveSamples[j].m_bIsProcessed = FALSE;
//continue for j
}
}
@@ -966,10 +966,10 @@ cAudioManager::ProcessActiveQueues()
}
if (SampleManager.InitialiseChannel(k, m_asActiveSamples[k].m_nSampleIndex, m_asActiveSamples[k].m_nBankIndex)) {
SampleManager.SetChannelFrequency(k, m_asActiveSamples[k].m_nFrequency);
- bool isMobile = false;
+ bool8 isMobile = FALSE;
for (int32 l = 0; l < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); l++) {
if (m_sMissionAudio.m_bIsMobile[l]) {
- isMobile = true;
+ isMobile = TRUE;
break;
}
}
@@ -1000,8 +1000,8 @@ cAudioManager::ProcessActiveQueues()
SampleManager.SetChannel3DDistances(k, m_asActiveSamples[k].m_fSoundIntensity, 0.25f * m_asActiveSamples[k].m_fSoundIntensity);
SampleManager.StartChannel(k);
}
- m_asActiveSamples[k].m_bIsProcessed = true;
- sample.m_bIsProcessed = true;
+ m_asActiveSamples[k].m_bIsProcessed = TRUE;
+ sample.m_bIsProcessed = TRUE;
sample.m_nVolumeChange = -1;
break;
}
@@ -1029,28 +1029,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 98faa8fd..49535252 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -13,7 +13,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;
@@ -24,16 +24,16 @@ 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;
uint8 field_4C;
int32 m_nReleasingVolumeDivider;
- bool m_bIsProcessed;
- bool m_bLoopEnded;
+ bool8 m_bIsProcessed;
+ bool8 m_bLoopEnded;
int32 m_nCalculatedVolume;
int8 m_nVolumeChange;
};
@@ -48,7 +48,7 @@ class tAudioEntity
public:
eAudioType m_nType;
void *m_pEntity;
- bool m_bIsUsed;
+ bool8 m_bIsUsed;
uint8 m_bStatus;
int16 m_awAudioEvent[NUM_AUDIOENTITY_EVENTS];
float m_afVolume[NUM_AUDIOENTITY_EVENTS];
@@ -78,7 +78,7 @@ public:
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
uint8 m_nActiveBank;
#ifdef GTA_PC
- bool m_bDelay;
+ bool8 m_bDelay;
uint32 m_nDelayTimer;
#endif
@@ -110,14 +110,14 @@ class cMissionAudio
{
public:
CVector m_vecPos[MISSION_AUDIO_SLOTS];
- bool m_bPredefinedProperties[MISSION_AUDIO_SLOTS];
+ bool8 m_bPredefinedProperties[MISSION_AUDIO_SLOTS];
int32 m_nSampleIndex[MISSION_AUDIO_SLOTS];
uint8 m_nLoadingStatus[MISSION_AUDIO_SLOTS];
uint8 m_nPlayStatus[MISSION_AUDIO_SLOTS];
- bool m_bIsPlaying[MISSION_AUDIO_SLOTS];
+ bool8 m_bIsPlaying[MISSION_AUDIO_SLOTS];
int32 m_nMissionAudioCounter[MISSION_AUDIO_SLOTS];
- bool m_bIsPlayed[MISSION_AUDIO_SLOTS];
- bool m_bIsMobile[MISSION_AUDIO_SLOTS];
+ bool8 m_bIsPlayed[MISSION_AUDIO_SLOTS];
+ bool8 m_bIsMobile[MISSION_AUDIO_SLOTS];
};
VALIDATE_SIZE(cMissionAudio, 0x38);
@@ -141,7 +141,7 @@ class CPed;
class cPedParams
{
public:
- bool m_bDistanceCalculated;
+ bool8 m_bDistanceCalculated;
float m_fDistance;
CPed *m_pPed;
@@ -157,7 +157,7 @@ class cVehicleParams
{
public:
int32 m_VehicleType;
- bool m_bDistanceCalculated;
+ bool8 m_bDistanceCalculated;
float m_fDistance;
CVehicle *m_pVehicle;
cTransmission *m_pTransmission;
@@ -193,15 +193,15 @@ enum {
class cAudioManager
{
public:
- bool m_bIsInitialised;
+ bool8 m_bIsInitialised;
uint8 m_bReverb; // unused
- bool m_bFifthFrameFlag;
+ bool8 m_bFifthFrameFlag;
uint8 m_nActiveSamples;
uint8 field_4; // unused
- bool m_bDynamicAcousticModelingStatus;
+ bool8 m_bDynamicAcousticModelingStatus;
int8 field_6;
float m_fSpeedOfSound;
- bool m_bTimerJustReset;
+ bool8 m_bTimerJustReset;
int32 m_nTimer;
tSound m_sQueueSample;
uint8 m_nActiveSampleQueue;
@@ -217,11 +217,11 @@ public:
cAudioScriptObjectManager m_sAudioScriptObjectManager;
// miami
- uint8 m_bIsPlayerShutUp;
+ bool8 m_bIsPlayerShutUp;
uint8 m_nPlayerMood;
uint32 m_nPlayerMoodTimer;
uint8 field_rest[4];
- bool m_bGenericSfx;
+ bool8 m_bGenericSfx;
cPedComments m_sPedComments;
int32 m_nFireAudioEntity;
@@ -253,19 +253,19 @@ public:
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
- bool IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
- bool ShouldDuckMissionAudio(uint8 slot) const;
+ bool8 IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
+ bool8 ShouldDuckMissionAudio(uint8 slot) const;
// "Should" be in alphabetic order, except "getXTalkSfx"
void AddDetailsToRequestedOrderList(uint8 sample); // done (inlined in vc)
- void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping); // done
+ void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping); // done
void AddReflectionsToRequestedQueue(); // done
void AddReleasingSounds(); // done
void AddSampleToRequestedQueue(); // done
void AgeCrimes(); // done (inlined in vc)
- void CalculateDistance(bool &condition, float dist); // done
- bool CheckForAnAudioFileOnCD() const; // done
+ void CalculateDistance(bool8 &condition, float dist); // done
+ bool8 CheckForAnAudioFileOnCD() const; // done
void ClearActiveSamples(); // done
void ClearMissionAudio(uint8 slot); // done (inlined in vc)
void ClearRequestedQueue(); // done (inlined in vc)
@@ -379,7 +379,7 @@ public:
void GenerateIntegerRandomNumberTable(); // done
char *Get3DProviderName(uint8 id) const; // done
- uint8 GetCDAudioDriveLetter() const; // done
+ char GetCDAudioDriveLetter() const; // done
int8 GetCurrent3DProviderIndex() const; // done
int8 AutoDetect3DProviders() const; // done
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
@@ -396,17 +396,17 @@ public:
float velocityChange); // done
float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); // done
- bool HasAirBrakes(int32 model) const; // done
+ bool8 HasAirBrakes(int32 model) const; // done
void Initialise(); // done
void InitialisePoliceRadio(); // done
void InitialisePoliceRadioZones(); // done
void InterrogateAudioEntities(); // done (inlined)
- bool IsAudioInitialised() const; // done
- bool IsMissionAudioSampleFinished(uint8 slot); // done
- bool IsMP3RadioChannelAvailable() const; // done
+ bool8 IsAudioInitialised() const; // done
+ bool8 IsMissionAudioSampleFinished(uint8 slot); // done
+ bool8 IsMP3RadioChannelAvailable() const; // done
- bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
+ bool8 MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
void PlayLoadedMissionAudio(uint8 slot); // done
void PlayOneShot(int32 index, uint16 sound, float vol); // done
@@ -420,20 +420,20 @@ public:
void PreTerminateGameSpecificShutdown(); // done
/// processX - main logic of adding new sounds
void ProcessActiveQueues(); // done
- bool ProcessAirBrakes(cVehicleParams& params); // done
- bool ProcessBoatEngine(cVehicleParams& params);
- bool ProcessBoatMovingOverWater(cVehicleParams& params); //done
+ bool8 ProcessAirBrakes(cVehicleParams& params); // done
+ bool8 ProcessBoatEngine(cVehicleParams& params);
+ bool8 ProcessBoatMovingOverWater(cVehicleParams& params); //done
#ifdef GTA_BRIDGE
void ProcessBridge(); // done(bcs not exists in VC)
void ProcessBridgeMotor(); // done(bcs not exists in VC)
void ProcessBridgeOneShots(); // done(bcs not exists in VC)
void ProcessBridgeWarning(); // done(bcs not exists in VC)
#endif
- bool ProcessCarBombTick(cVehicleParams& params); // done
+ bool8 ProcessCarBombTick(cVehicleParams& params); // done
void ProcessCarHeli(cVehicleParams& params); // done
void ProcessCesna(cVehicleParams& params); // done
//void ProcessCrane(); // done(bcs not exists in VC)
- bool ProcessEngineDamage(cVehicleParams& params); // done
+ bool8 ProcessEngineDamage(cVehicleParams& params); // done
void ProcessEntity(int32 sound); // done
void ProcessExplosions(int32 explosion); // done
void ProcessFireHydrant(); // done
@@ -462,25 +462,25 @@ public:
void ProcessProjectiles(); // done
void ProcessRainOnVehicle(cVehicleParams& params); // done
void ProcessReverb() const; // done
- bool ProcessReverseGear(cVehicleParams& params); // done
+ bool8 ProcessReverseGear(cVehicleParams& params); // done
void ProcessScriptObject(int32 id); // done
void ProcessSpecial(); // done
#ifdef GTA_TRAIN
- bool ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC)
+ bool8 ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC)
#endif
void ProcessVehicle(CVehicle *vehicle); // done
- bool ProcessVehicleDoors(cVehicleParams &params); // done
+ bool8 ProcessVehicleDoors(cVehicleParams &params); // done
void ProcessVehicleEngine(cVehicleParams &params); // done
void ProcessVehicleFlatTyre(cVehicleParams &params); // done
- bool ProcessVehicleHorn(cVehicleParams &params); // done
+ bool8 ProcessVehicleHorn(cVehicleParams &params); // done
void ProcessVehicleOneShots(cVehicleParams &params); // done
- bool ProcessVehicleReverseWarning(cVehicleParams &params); // done
- bool ProcessVehicleRoadNoise(cVehicleParams &params); // done
- bool ProcessVehicleSirenOrAlarm(cVehicleParams &params); // done
- bool ProcessVehicleSkidding(cVehicleParams &params); // done
+ bool8 ProcessVehicleReverseWarning(cVehicleParams &params); // done
+ bool8 ProcessVehicleRoadNoise(cVehicleParams &params); // done
+ bool8 ProcessVehicleSirenOrAlarm(cVehicleParams &params); // done
+ bool8 ProcessVehicleSkidding(cVehicleParams &params); // done
void ProcessWaterCannon(int32); // done
void ProcessWeather(int32 id); // done
- bool ProcessWetRoadNoise(cVehicleParams& params); // done
+ bool8 ProcessWetRoadNoise(cVehicleParams& params); // done
void ProcessEscalators(); // done
void ProcessExtraSounds(); // done
@@ -499,26 +499,26 @@ public:
void ServicePoliceRadioChannel(uint8 wantedLevel); // done
void ServiceSoundEffects(); // done
int8 SetCurrent3DProvider(uint8 which); // done
- void SetDynamicAcousticModelingStatus(uint8 status); // done
+ void SetDynamicAcousticModelingStatus(bool8 status); // done
void SetEffectsFadeVol(uint8 volume) const; // done
void SetEffectsMasterVolume(uint8 volume) const; // done
void SetMP3BoostVolume(uint8 volume) const; // done
- void SetEntityStatus(int32 id, uint8 status); // done
+ void SetEntityStatus(int32 id, bool8 status); // done
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); // done
void SetMissionAudioLocation(uint8 slot, float x, float y, float z); // done
void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized
- void SetMonoMode(uint8 mono); // done
+ void SetMonoMode(bool8 mono); // done
void SetMusicFadeVol(uint8 volume) const; // done
void SetMusicMasterVolume(uint8 volume) const; // done
void SetSpeakerConfig(int32 conf) const; // done
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); // done
void SetUpOneShotCollisionSound(const cAudioCollision &col); // done
- bool SetupCrimeReport(); // done
- bool SetupJumboEngineSound(uint8 vol, uint32 freq); // done
- bool SetupJumboFlySound(uint8 emittingVol); // done
- bool SetupJumboRumbleSound(uint8 emittingVol); // done
- bool SetupJumboTaxiSound(uint8 vol); // done
- bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done
+ bool8 SetupCrimeReport(); // done
+ bool8 SetupJumboEngineSound(uint8 vol, uint32 freq); // done
+ bool8 SetupJumboFlySound(uint8 emittingVol); // done
+ bool8 SetupJumboRumbleSound(uint8 emittingVol); // done
+ bool8 SetupJumboTaxiSound(uint8 vol); // done
+ bool8 SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done
void SetupPedComments(cPedParams &params, uint16 sound); // done
void SetupSuspectLastSeenReport();
@@ -527,12 +527,12 @@ public:
void UpdateGasPedalAudio(CVehicle *veh, int vehType); // done
void UpdateReflections(); // done
- bool UsesReverseWarning(int32 model) const; // done
- bool UsesSiren(cVehicleParams &params) const; // done
- bool UsesSirenSwitching(cVehicleParams &params) const; // done
+ bool8 UsesReverseWarning(int32 model) const; // done
+ bool8 UsesSiren(cVehicleParams &params) const; // done
+ bool8 UsesSirenSwitching(cVehicleParams &params) const; // done
CVehicle *FindVehicleOfPlayer(); // done
- void SetPedTalkingStatus(CPed *ped, uint8 status); // done
+ void SetPedTalkingStatus(CPed *ped, bool8 status); // done
void SetPlayersMood(uint8 mood, uint32 time); // done
float Sqrt(float v) const { return v <= 0.0f ? 0.0f : ::Sqrt(v); }
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 7c99e89f..bc77361f 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -39,7 +39,7 @@ cDMAudio::DestroyEntity(int32 audioEntity)
}
void
-cDMAudio::SetEntityStatus(int32 audioEntity, uint8 status)
+cDMAudio::SetEntityStatus(int32 audioEntity, bool8 status)
{
AudioManager.SetEntityStatus(audioEntity, status);
}
@@ -57,7 +57,7 @@ cDMAudio::DestroyAllGameCreatedEntities(void)
}
void
-cDMAudio::SetMonoMode(uint8 mono)
+cDMAudio::SetMonoMode(bool8 mono)
{
AudioManager.SetMonoMode(mono);
}
@@ -142,7 +142,7 @@ cDMAudio::SetSpeakerConfig(int32 config)
AudioManager.SetSpeakerConfig(config);
}
-bool
+bool8
cDMAudio::IsMP3RadioChannelAvailable(void)
{
return AudioManager.IsMP3RadioChannelAvailable();
@@ -161,12 +161,12 @@ cDMAudio::ReacquireDigitalHandle(void)
}
void
-cDMAudio::SetDynamicAcousticModelingStatus(uint8 status)
+cDMAudio::SetDynamicAcousticModelingStatus(bool8 status)
{
AudioManager.SetDynamicAcousticModelingStatus(status);
}
-bool
+bool8
cDMAudio::CheckForAnAudioFileOnCD(void)
{
return AudioManager.CheckForAnAudioFileOnCD();
@@ -178,7 +178,7 @@ cDMAudio::GetCDAudioDriveLetter(void)
return AudioManager.GetCDAudioDriveLetter();
}
-bool
+bool8
cDMAudio::IsAudioInitialised(void)
{
return AudioManager.IsAudioInitialised();
@@ -196,7 +196,7 @@ cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject)
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
- AudioManager.SetEntityStatus(audioEntity, true);
+ AudioManager.SetEntityStatus(audioEntity, TRUE);
return audioEntity;
}
@@ -214,7 +214,7 @@ cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject)
if ( AEHANDLE_IS_OK(audioEntity) )
{
- AudioManager.SetEntityStatus(audioEntity, true);
+ AudioManager.SetEntityStatus(audioEntity, TRUE);
AudioManager.PlayOneShot(audioEntity, scriptObject->AudioId, 0.0f);
}
}
@@ -244,7 +244,7 @@ cDMAudio::PlayRadioAnnouncement(uint32 announcement)
}
void
-cDMAudio::PlayFrontEndTrack(uint32 track, uint8 frontendFlag)
+cDMAudio::PlayFrontEndTrack(uint32 track, bool8 frontendFlag)
{
MusicManager.PlayFrontEndTrack(track, frontendFlag);
}
@@ -309,7 +309,7 @@ cDMAudio::PlayLoadedMissionAudio(uint8 slot)
AudioManager.PlayLoadedMissionAudio(slot);
}
-bool
+bool8
cDMAudio::IsMissionAudioSampleFinished(uint8 slot)
{
return AudioManager.IsMissionAudioSampleFinished(slot);
@@ -340,7 +340,7 @@ cDMAudio::SetRadioChannel(uint32 radio, int32 pos)
}
void
-cDMAudio::SetStartingTrackPositions(uint8 isStartGame)
+cDMAudio::SetStartingTrackPositions(bool8 isStartGame)
{
MusicManager.SetStartingTrackPositions(isStartGame);
}
@@ -364,7 +364,7 @@ cDMAudio::GetRadioPosition(uint32 station)
}
void
-cDMAudio::SetPedTalkingStatus(CPed *ped, uint8 status)
+cDMAudio::SetPedTalkingStatus(CPed *ped, bool8 status)
{
return AudioManager.SetPedTalkingStatus(ped, status);
}
@@ -376,7 +376,7 @@ cDMAudio::SetPlayersMood(uint8 mood, uint32 time)
}
void
-cDMAudio::ShutUpPlayerTalking(uint8 state)
+cDMAudio::ShutUpPlayerTalking(bool8 state)
{
AudioManager.m_bIsPlayerShutUp = state;
} \ No newline at end of file
diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h
index 2c10043f..5b684fd3 100644
--- a/src/audio/DMAudio.h
+++ b/src/audio/DMAudio.h
@@ -25,11 +25,11 @@ public:
int32 CreateEntity(eAudioType type, void *UID);
void DestroyEntity(int32 audioEntity);
- void SetEntityStatus(int32 audioEntity, uint8 status);
+ void SetEntityStatus(int32 audioEntity, bool8 status);
void PlayOneShot(int32 audioEntity, uint16 oneShot, float volume);
void DestroyAllGameCreatedEntities(void);
- void SetMonoMode(uint8 mono);
+ void SetMonoMode(bool8 mono);
void SetMP3BoostVolume(uint8 volume);
void SetEffectsMasterVolume(uint8 volume);
void SetMusicMasterVolume(uint8 volume);
@@ -46,17 +46,17 @@ public:
void SetSpeakerConfig(int32 config);
- bool IsMP3RadioChannelAvailable(void);
+ bool8 IsMP3RadioChannelAvailable(void);
void ReleaseDigitalHandle(void);
void ReacquireDigitalHandle(void);
- void SetDynamicAcousticModelingStatus(uint8 status);
+ void SetDynamicAcousticModelingStatus(bool8 status);
- bool CheckForAnAudioFileOnCD(void);
+ bool8 CheckForAnAudioFileOnCD(void);
char GetCDAudioDriveLetter(void);
- bool IsAudioInitialised(void);
+ bool8 IsAudioInitialised(void);
void ReportCrime(eCrimeType crime, CVector const &pos);
@@ -70,7 +70,7 @@ public:
void PlayFrontEndSound(uint16 frontend, uint32 volume);
void PlayRadioAnnouncement(uint32 announcement);
- void PlayFrontEndTrack(uint32 track, uint8 frontendFlag);
+ void PlayFrontEndTrack(uint32 track, bool8 frontendFlag);
void StopFrontEndTrack(void);
void ResetTimers(uint32 time);
@@ -85,19 +85,19 @@ public:
uint8 GetMissionAudioLoadingStatus(uint8 slot);
void SetMissionAudioLocation(uint8 slot, float x, float y, float z);
void PlayLoadedMissionAudio(uint8 slot);
- bool IsMissionAudioSampleFinished(uint8 slot);
+ bool8 IsMissionAudioSampleFinished(uint8 slot);
void ClearMissionAudio(uint8 slot);
uint8 GetRadioInCar(void);
void SetRadioInCar(uint32 radio);
void SetRadioChannel(uint32 radio, int32 pos);
- void SetStartingTrackPositions(uint8 isStartGame);
+ void SetStartingTrackPositions(bool8 isStartGame);
float *GetListenTimeArray();
uint32 GetFavouriteRadioStation();
int32 GetRadioPosition(uint32 station);
- void SetPedTalkingStatus(class CPed *ped, uint8 status);
+ void SetPedTalkingStatus(class CPed *ped, bool8 status);
void SetPlayersMood(uint8 mood, uint32 time);
- void ShutUpPlayerTalking(uint8 state);
+ void ShutUpPlayerTalking(bool8 state);
};
extern cDMAudio DMAudio;
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 1a727b4f..e56bc013 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -28,7 +28,7 @@ static_assert(false, "R*'s radio implementation is quite buggy, RADIO_SCROLL_TO_
cMusicManager MusicManager;
int32 gNumRetunePresses;
int32 gRetuneCounter;
-bool g_bAnnouncementReadPosAlready;
+bool8 g_bAnnouncementReadPosAlready;
uint8 RadioStaticCounter = 5;
uint32 RadioStaticTimer;
@@ -50,13 +50,13 @@ uint32 NewGameRadioTimers[10] =
cMusicManager::cMusicManager()
{
- m_bIsInitialised = false;
- m_bDisabled = false;
+ m_bIsInitialised = FALSE;
+ m_bDisabled = FALSE;
m_nFrontendTrack = NO_TRACK;
m_nPlayingTrack = NO_TRACK;
m_nUpcomingMusicMode = MUSICMODE_DISABLED;
m_nMusicMode = MUSICMODE_DISABLED;
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
for (int i = 0; i < NUM_RADIOS; i++)
aListenTimeArray[i] = 0.0f;
@@ -66,7 +66,7 @@ cMusicManager::cMusicManager()
m_nCurrentVolume = 0;
m_nMaxVolume = 0;
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
}
void
@@ -74,38 +74,38 @@ cMusicManager::ResetMusicAfterReload()
{
float afRadioTime[NUM_RADIOS];
- m_bRadioSetByScript = false;
+ m_bRadioSetByScript = FALSE;
m_nRadioStationScript = WILDSTYLE;
m_nRadioPosition = -1;
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
- m_bSetNextStation = false;
+ m_bAnnouncementInProgress = FALSE;
+ m_bSetNextStation = FALSE;
RadioStaticTimer = 0;
gNumRetunePresses = 0;
gRetuneCounter = 0;
m_nFrontendTrack = NO_TRACK;
m_nPlayingTrack = NO_TRACK;
- m_FrontendLoopFlag = false;
- m_bTrackChangeStarted = false;
+ m_FrontendLoopFlag = FALSE;
+ m_bTrackChangeStarted = FALSE;
m_nNextTrack = NO_TRACK;
- m_nNextLoopFlag = false;
- m_bVerifyNextTrackStartedToPlay = false;
- m_bGameplayAllowsRadio = false;
- m_bRadioStreamReady = false;
+ m_nNextLoopFlag = FALSE;
+ m_bVerifyNextTrackStartedToPlay = FALSE;
+ m_bGameplayAllowsRadio = FALSE;
+ m_bRadioStreamReady = FALSE;
nFramesSinceCutsceneEnded = -1;
- m_bUserResumedGame = false;
- m_bMusicModeChangeStarted = false;
- m_bEarlyFrontendTrack = false;
+ m_bUserResumedGame = FALSE;
+ m_bMusicModeChangeStarted = FALSE;
+ m_bEarlyFrontendTrack = FALSE;
m_nVolumeLatency = 0;
m_nCurrentVolume = 0;
m_nMaxVolume = 0;
- bool bRadioWasEverListened = false;
+ bool8 bRadioWasEverListened = FALSE;
for (int i = 0; i < NUM_RADIOS; i++) {
afRadioTime[i] = CStats::GetFavoriteRadioStationList(i);
if (!bRadioWasEverListened && afRadioTime[i] != 0.0f)
- bRadioWasEverListened = true;
+ bRadioWasEverListened = TRUE;
}
if (!bRadioWasEverListened) return;
@@ -125,7 +125,7 @@ cMusicManager::ResetMusicAfterReload()
}
void
-cMusicManager::SetStartingTrackPositions(uint8 isNewGameTimer)
+cMusicManager::SetStartingTrackPositions(bool8 isNewGameTimer)
{
int pos;
@@ -174,15 +174,15 @@ cMusicManager::SetStartingTrackPositions(uint8 isNewGameTimer)
}
}
-bool
+bool8
cMusicManager::Initialise()
{
if (!IsInitialised()) {
- m_bIsInitialised = true;
- SetStartingTrackPositions(false);
- m_bResetTimers = false;
+ m_bIsInitialised = TRUE;
+ SetStartingTrackPositions(FALSE);
+ m_bResetTimers = FALSE;
m_nResetTime = 0;
- m_bRadioSetByScript = false;
+ m_bRadioSetByScript = FALSE;
m_nRadioStationScript = WILDSTYLE;
m_nRadioPosition = -1;
m_nRadioInCar = NO_TRACK;
@@ -192,18 +192,18 @@ cMusicManager::Initialise()
m_nPlayingTrack = NO_TRACK;
m_nUpcomingMusicMode = MUSICMODE_DISABLED;
m_nMusicMode = MUSICMODE_DISABLED;
- m_FrontendLoopFlag = false;
- m_bTrackChangeStarted = false;
+ m_FrontendLoopFlag = FALSE;
+ m_bTrackChangeStarted = FALSE;
m_nNextTrack = NO_TRACK;
- m_nNextLoopFlag = false;
- m_bVerifyNextTrackStartedToPlay = false;
- m_bGameplayAllowsRadio = false;
- m_bRadioStreamReady = false;
+ m_nNextLoopFlag = FALSE;
+ m_bVerifyNextTrackStartedToPlay = FALSE;
+ m_bGameplayAllowsRadio = FALSE;
+ m_bRadioStreamReady = FALSE;
nFramesSinceCutsceneEnded = -1;
- m_bUserResumedGame = false;
- m_bMusicModeChangeStarted = false;
+ m_bUserResumedGame = FALSE;
+ m_bMusicModeChangeStarted = FALSE;
m_nMusicModeToBeSet = MUSICMODE_DISABLED;
- m_bEarlyFrontendTrack = false;
+ m_bEarlyFrontendTrack = FALSE;
m_nVolumeLatency = 0;
m_nCurrentVolume = 0;
m_nMaxVolume = 0;
@@ -220,7 +220,7 @@ cMusicManager::Terminate()
SampleManager.StopStreamedFile(0);
m_nPlayingTrack = NO_TRACK;
}
- m_bIsInitialised = false;
+ m_bIsInitialised = FALSE;
}
void
@@ -230,29 +230,29 @@ cMusicManager::SetRadioChannelByScript(uint32 station, int32 pos)
if (station == STREAMED_SOUND_RADIO_MP3_PLAYER)
station = STREAMED_SOUND_CITY_AMBIENT;
if (station <= STREAMED_SOUND_RADIO_POLICE) {
- m_bRadioSetByScript = true;
+ m_bRadioSetByScript = TRUE;
m_nRadioStationScript = station;
m_nRadioPosition = pos == -1 ? -1 : pos % m_aTracks[station].m_nLength;
}
}
}
-bool
+bool8
cMusicManager::PlayerInCar()
{
CVehicle *vehicle = AudioManager.FindVehicleOfPlayer();
if(!vehicle)
- return false;
+ return FALSE;
int32 State = FindPlayerPed()->m_nPedState;
if(State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED)
- return false;
+ return FALSE;
if (vehicle->GetStatus() == STATUS_WRECKED)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
uint32
@@ -325,16 +325,16 @@ cMusicManager::ChangeMusicMode(uint8 mode)
while (SampleManager.IsStreamPlaying(0))
SampleManager.StopStreamedFile(0);
m_nMusicMode = m_nUpcomingMusicMode;
- m_bMusicModeChangeStarted = false;
- m_bTrackChangeStarted = false;
+ m_bMusicModeChangeStarted = FALSE;
+ m_bTrackChangeStarted = FALSE;
m_nNextTrack = NO_TRACK;
- m_nNextLoopFlag = false;
- m_bVerifyNextTrackStartedToPlay = false;
+ m_nNextLoopFlag = FALSE;
+ m_bVerifyNextTrackStartedToPlay = FALSE;
m_nPlayingTrack = NO_TRACK;
m_nFrontendTrack = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
m_nAnnouncement = NO_TRACK;
- g_bAnnouncementReadPosAlready = false;
+ g_bAnnouncementReadPosAlready = FALSE;
break;
case MUSICMODE_DISABLE: m_nUpcomingMusicMode = MUSICMODE_DISABLED; break;
default: return;
@@ -344,7 +344,7 @@ cMusicManager::ChangeMusicMode(uint8 mode)
void
cMusicManager::ResetTimers(int32 time)
{
- m_bResetTimers = true;
+ m_bResetTimers = TRUE;
m_nResetTime = time;
}
@@ -352,11 +352,11 @@ void
cMusicManager::Service()
{
if (m_bResetTimers) {
- m_bResetTimers = false;
+ m_bResetTimers = FALSE;
m_nLastTrackServiceTime = m_nResetTime;
}
- static bool bRadioStatsRecorded = false;
+ static bool8 bRadioStatsRecorded = FALSE;
if (!m_bIsInitialised || m_bDisabled) return;
@@ -369,39 +369,39 @@ cMusicManager::Service()
{
case MUSICMODE_FRONTEND: ServiceFrontEndMode(); break;
case MUSICMODE_GAME: ServiceGameMode(); break;
- case MUSICMODE_CUTSCENE: SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 0); break;
+ case MUSICMODE_CUTSCENE: SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE, 0); break;
}
}
else
m_nMusicMode = MUSICMODE_DISABLED;
} else {
- m_bMusicModeChangeStarted = true;
+ m_bMusicModeChangeStarted = TRUE;
if (!m_bUserResumedGame && !AudioManager.m_nUserPause && AudioManager.m_nPreviousUserPause)
- m_bUserResumedGame = true;
+ m_bUserResumedGame = TRUE;
if (AudioManager.m_FrameCounter % 4 == 0) {
gNumRetunePresses = 0;
gRetuneCounter = 0;
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
if (SampleManager.IsStreamPlaying(0)) {
if (m_nPlayingTrack != NO_TRACK && !bRadioStatsRecorded)
{
RecordRadioStats();
m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0);
m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- bRadioStatsRecorded = true;
+ bRadioStatsRecorded = TRUE;
}
SampleManager.StopStreamedFile(0);
} else {
- bRadioStatsRecorded = false;
+ bRadioStatsRecorded = FALSE;
m_nMusicMode = m_nMusicModeToBeSet;
- m_bMusicModeChangeStarted = false;
- m_bTrackChangeStarted = false;
+ m_bMusicModeChangeStarted = FALSE;
+ m_bTrackChangeStarted = FALSE;
m_nNextTrack = NO_TRACK;
- m_nNextLoopFlag = false;
- m_bVerifyNextTrackStartedToPlay = false;
+ m_nNextLoopFlag = FALSE;
+ m_bVerifyNextTrackStartedToPlay = FALSE;
m_nPlayingTrack = NO_TRACK;
if (m_bEarlyFrontendTrack)
- m_bEarlyFrontendTrack = false;
+ m_bEarlyFrontendTrack = FALSE;
else
m_nFrontendTrack = NO_TRACK;
}
@@ -412,15 +412,15 @@ cMusicManager::Service()
void
cMusicManager::ServiceFrontEndMode()
{
- static bool bRadioStatsRecorded = false;
+ static bool8 bRadioStatsRecorded = FALSE;
if (m_bAnnouncementInProgress) {
SampleManager.StopStreamedFile(0);
if (SampleManager.IsStreamPlaying(0))
return;
- g_bAnnouncementReadPosAlready = false;
+ g_bAnnouncementReadPosAlready = FALSE;
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
m_nNextTrack = NO_TRACK;
m_nFrontendTrack = NO_TRACK;
m_nPlayingTrack = NO_TRACK;
@@ -439,7 +439,7 @@ cMusicManager::ServiceFrontEndMode()
else {
if (m_nCurrentVolume < m_nMaxVolume)
m_nCurrentVolume = Min(m_nMaxVolume, m_nCurrentVolume + 6);
- SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE, 0);
}
} else {
if (m_nPlayingTrack == STREAMED_SOUND_RADIO_MP3_PLAYER)
@@ -448,13 +448,13 @@ cMusicManager::ServiceFrontEndMode()
ChangeMusicMode(MUSICMODE_GAME);
}
} else {
- m_bTrackChangeStarted = true;
+ m_bTrackChangeStarted = TRUE;
if (m_bVerifyNextTrackStartedToPlay || !SampleManager.IsStreamPlaying(0)) {
- bRadioStatsRecorded = false;
+ bRadioStatsRecorded = FALSE;
if (SampleManager.IsStreamPlaying(0) || m_nNextTrack == NO_TRACK) {
m_nPlayingTrack = m_nNextTrack;
- m_bVerifyNextTrackStartedToPlay = false;
- m_bTrackChangeStarted = false;
+ m_bVerifyNextTrackStartedToPlay = FALSE;
+ m_bTrackChangeStarted = FALSE;
} else {
uint32 trackStartPos = (m_nNextTrack > STREAMED_SOUND_RADIO_POLICE) ? 0 : GetTrackStartPos(m_nNextTrack);
if (m_nNextTrack != NO_TRACK) {
@@ -463,10 +463,10 @@ cMusicManager::ServiceFrontEndMode()
m_nVolumeLatency = 3;
m_nCurrentVolume = 0;
m_nMaxVolume = 100;
- SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE, 0);
if (m_nNextTrack < STREAMED_SOUND_CITY_AMBIENT)
m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
- m_bVerifyNextTrackStartedToPlay = true;
+ m_bVerifyNextTrackStartedToPlay = TRUE;
}
}
} else {
@@ -474,9 +474,9 @@ cMusicManager::ServiceFrontEndMode()
m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0);
m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
RecordRadioStats();
- bRadioStatsRecorded = true;
+ bRadioStatsRecorded = TRUE;
}
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
SampleManager.StopStreamedFile(0);
}
}
@@ -488,7 +488,7 @@ cMusicManager::ServiceGameMode()
CPed *ped = FindPlayerPed();
CVehicle *vehicle = AudioManager.FindVehicleOfPlayer();
m_bRadioStreamReady = m_bGameplayAllowsRadio;
- m_bGameplayAllowsRadio = false;
+ m_bGameplayAllowsRadio = FALSE;
switch (CGame::currArea)
{
@@ -499,14 +499,14 @@ cMusicManager::ServiceGameMode()
case AREA_BLOOD:
case AREA_OVALRING:
case AREA_MALIBU_CLUB:
- m_bGameplayAllowsRadio = false;
+ m_bGameplayAllowsRadio = FALSE;
break;
default:
if (SampleManager.GetMusicVolume()) {
if (PlayerInCar())
- m_bGameplayAllowsRadio = true;
+ m_bGameplayAllowsRadio = TRUE;
} else
- m_bGameplayAllowsRadio = false;
+ m_bGameplayAllowsRadio = FALSE;
break;
}
@@ -514,7 +514,7 @@ cMusicManager::ServiceGameMode()
nFramesSinceCutsceneEnded = -1;
gNumRetunePresses = 0;
gRetuneCounter = 0;
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
} else if (ped) {
if(!ped->DyingOrDead() && vehicle) {
#ifdef GTA_PC
@@ -567,11 +567,11 @@ cMusicManager::ServiceGameMode()
if (m_bUserResumedGame)
{
- m_bRadioStreamReady = false;
- m_bUserResumedGame = false;
+ m_bRadioStreamReady = FALSE;
+ m_bUserResumedGame = FALSE;
}
if (m_nPlayingTrack == NO_TRACK && m_nFrontendTrack == NO_TRACK)
- m_bRadioStreamReady = false;
+ m_bRadioStreamReady = FALSE;
if (m_bGameplayAllowsRadio)
{
@@ -594,7 +594,7 @@ cMusicManager::ServiceGameMode()
m_aTracks[m_nFrontendTrack].m_nPosition = m_nRadioPosition;
m_aTracks[m_nFrontendTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
- m_bRadioSetByScript = false;
+ m_bRadioSetByScript = FALSE;
return;
}
@@ -605,7 +605,7 @@ cMusicManager::ServiceGameMode()
if (m_nAnnouncement < NO_TRACK) {
if ((m_bAnnouncementInProgress || m_nFrontendTrack == m_nPlayingTrack) && ServiceAnnouncement()) {
if (m_bAnnouncementInProgress) {
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
gNumRetunePresses = 0;
gRetuneCounter = 0;
return;
@@ -613,7 +613,7 @@ cMusicManager::ServiceGameMode()
if(m_nAnnouncement == NO_TRACK) {
m_nNextTrack = NO_TRACK;
m_nFrontendTrack = GetCarTuning();
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
gRetuneCounter = 0;
gNumRetunePresses = 0;
}
@@ -635,7 +635,7 @@ cMusicManager::ServiceGameMode()
if(gRetuneCounter > 1)
gRetuneCounter--;
else if(gRetuneCounter == 1) {
- m_bSetNextStation = true;
+ m_bSetNextStation = TRUE;
gRetuneCounter = 0;
}
}
@@ -644,7 +644,7 @@ cMusicManager::ServiceGameMode()
{
if (--gRetuneCounter == 0)
{
- m_bSetNextStation = true;
+ m_bSetNextStation = TRUE;
gRetuneCounter = 0;
}
}
@@ -694,7 +694,7 @@ cMusicManager::ServiceGameMode()
SetUpCorrectAmbienceTrack();
ServiceTrack(vehicle, ped);
if (m_bSetNextStation)
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
return;
}
if (UsesPoliceRadio(vehicle))
@@ -713,13 +713,13 @@ cMusicManager::ServiceGameMode()
gRetuneCounter = 0;
gNumRetunePresses = 0;
- m_bSetNextStation = false;
- m_bRadioSetByScript = false;
+ m_bSetNextStation = FALSE;
+ m_bRadioSetByScript = FALSE;
if (m_nFrontendTrack >= STREAMED_SOUND_CITY_AMBIENT && m_nFrontendTrack <= STREAMED_SOUND_AMBSIL_AMBIENT)
SetUpCorrectAmbienceTrack();
ServiceTrack(vehicle, ped);
if (m_bSetNextStation)
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
return;
}
@@ -728,9 +728,9 @@ cMusicManager::ServiceGameMode()
SampleManager.StopStreamedFile(0);
if (SampleManager.IsStreamPlaying(0))
return;
- g_bAnnouncementReadPosAlready = false;
+ g_bAnnouncementReadPosAlready = FALSE;
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
m_nNextTrack = NO_TRACK;
m_nFrontendTrack = NO_TRACK;
m_nPlayingTrack = NO_TRACK;
@@ -808,7 +808,7 @@ GetHeightScale()
}
void
-cMusicManager::ComputeAmbienceVol(uint8 reset, uint8& outVolume)
+cMusicManager::ComputeAmbienceVol(bool8 reset, uint8& outVolume)
{
static float fVol = 0.0f;
@@ -868,7 +868,7 @@ cMusicManager::ComputeAmbienceVol(uint8 reset, uint8& outVolume)
outVolume = (90.0f - fHeightScale) / 50.0f * fVol;
}
-bool
+bool8
cMusicManager::ServiceAnnouncement()
{
if (m_bAnnouncementInProgress) {
@@ -876,36 +876,36 @@ cMusicManager::ServiceAnnouncement()
m_nPlayingTrack = m_nNextTrack;
else if (m_nPlayingTrack != NO_TRACK) {
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
m_nPlayingTrack = NO_TRACK;
}
- return true;
+ return TRUE;
} else if (SampleManager.IsStreamPlaying(0)) {
if (m_nPlayingTrack != NO_TRACK && !g_bAnnouncementReadPosAlready) {
RecordRadioStats();
m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- g_bAnnouncementReadPosAlready = true;
+ g_bAnnouncementReadPosAlready = TRUE;
m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
SampleManager.StopStreamedFile(0);
} else {
- g_bAnnouncementReadPosAlready = false;
+ g_bAnnouncementReadPosAlready = FALSE;
m_nPlayingTrack = NO_TRACK;
m_nNextTrack = m_nAnnouncement;
SampleManager.SetStreamedFileLoopFlag(0, 0);
SampleManager.StartStreamedFile(m_nNextTrack, 0, 0);
- SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 0, 0);
- m_bAnnouncementInProgress = true;
+ SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, FALSE, 0);
+ m_bAnnouncementInProgress = TRUE;
}
- return true;
+ return TRUE;
}
void
cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
{
- static bool bRadioStatsRecorded = false;
- static bool bRadioStatsRecorded2 = false;
+ static bool8 bRadioStatsRecorded = FALSE;
+ static bool8 bRadioStatsRecorded2 = FALSE;
uint8 volume;
if (!m_bTrackChangeStarted)
m_nNextTrack = m_nFrontendTrack;
@@ -915,30 +915,30 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0);
m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
RecordRadioStats();
- bRadioStatsRecorded = true;
+ bRadioStatsRecorded = TRUE;
}
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
SampleManager.StopStreamedFile(0);
}
return;
}
if (bRadioStatsRecorded) {
- bRadioStatsRecorded = false;
+ bRadioStatsRecorded = FALSE;
m_nPlayingTrack = NO_TRACK;
}
if (m_nNextTrack != m_nPlayingTrack)
{
- m_bTrackChangeStarted = true;
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ m_bTrackChangeStarted = TRUE;
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
if (!(AudioManager.m_FrameCounter & 1)) {
if (m_bVerifyNextTrackStartedToPlay || !SampleManager.IsStreamPlaying(0)) {
- bRadioStatsRecorded2 = false;
+ bRadioStatsRecorded2 = FALSE;
if (SampleManager.IsStreamPlaying(0)) {
m_nPlayingTrack = m_nNextTrack;
- m_bVerifyNextTrackStartedToPlay = false;
- m_bTrackChangeStarted = false;
+ m_bVerifyNextTrackStartedToPlay = FALSE;
+ m_bTrackChangeStarted = FALSE;
if (veh) {
#ifdef FIX_BUGS
if (m_nPlayingTrack >= STREAMED_SOUND_CITY_AMBIENT && m_nPlayingTrack <= STREAMED_SOUND_AMBSIL_AMBIENT)
@@ -962,16 +962,16 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
m_nVolumeLatency = 10;
m_nCurrentVolume = 0;
m_nMaxVolume = 100;
- SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE, 0);
}
else
{
- ComputeAmbienceVol(true, volume);
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
+ ComputeAmbienceVol(TRUE, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE, 0);
}
if (m_nNextTrack < STREAMED_SOUND_CITY_AMBIENT)
m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
- m_bVerifyNextTrackStartedToPlay = true;
+ m_bVerifyNextTrackStartedToPlay = TRUE;
}
}
} else {
@@ -981,7 +981,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
{
m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition(0);
m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- bRadioStatsRecorded2 = true;
+ bRadioStatsRecorded2 = TRUE;
RecordRadioStats();
if (m_nPlayingTrack >= STREAMED_SOUND_HAVANA_CITY_AMBIENT && m_nPlayingTrack <= STREAMED_SOUND_HAVANA_BEACH_AMBIENT)
{
@@ -989,7 +989,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_HURRICANE, 0.0);
}
}
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
SampleManager.StopStreamedFile(0);
}
}
@@ -998,8 +998,8 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
if (m_nPlayingTrack >= STREAMED_SOUND_CITY_AMBIENT && m_nPlayingTrack <= STREAMED_SOUND_AMBSIL_AMBIENT)
{
- ComputeAmbienceVol(false, volume);
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
+ ComputeAmbienceVol(FALSE, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE, 0);
return;
}
if (CTimer::GetIsSlowMotionActive())
@@ -1009,7 +1009,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
float DistToTargetSq = (TheCamera.pTargetEntity->GetPosition() - TheCamera.GetPosition()).MagnitudeSqr();
if (DistToTargetSq >= SQR(55.0f))
{
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
}
else if (DistToTargetSq >= SQR(10.0f))
{
@@ -1026,17 +1026,17 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
}
if (gRetuneCounter != 0)
volume = 0;
- SampleManager.SetStreamedVolumeAndPan(volume, pan, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(volume, pan, FALSE, 0);
}
else if (AudioManager.ShouldDuckMissionAudio(0) || AudioManager.ShouldDuckMissionAudio(1))
- SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE, 0);
else if (gRetuneCounter != 0)
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE, 0);
else
- SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(m_nCurrentVolume, 63, FALSE, 0);
}
} else if (AudioManager.ShouldDuckMissionAudio(0) || AudioManager.ShouldDuckMissionAudio(1)) {
- SampleManager.SetStreamedVolumeAndPan(Min(m_nCurrentVolume, 25), 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(Min(m_nCurrentVolume, 25), 63, FALSE, 0);
nFramesSinceCutsceneEnded = 0;
} else {
if (nFramesSinceCutsceneEnded == -1)
@@ -1058,7 +1058,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
}
if (gRetuneCounter != 0)
volume = 0;
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, FALSE, 0);
}
if (m_nVolumeLatency > 0)
m_nVolumeLatency--;
@@ -1074,7 +1074,7 @@ cMusicManager::PreloadCutSceneMusic(uint32 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_nPlayingTrack = track;
}
}
@@ -1096,14 +1096,14 @@ cMusicManager::StopCutSceneMusic(void)
}
void
-cMusicManager::PlayFrontEndTrack(uint32 track, uint8 loopFlag)
+cMusicManager::PlayFrontEndTrack(uint32 track, bool8 loopFlag)
{
if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS && (m_nUpcomingMusicMode == MUSICMODE_FRONTEND || m_nMusicMode == MUSICMODE_FRONTEND))
{
m_nFrontendTrack = track;
m_FrontendLoopFlag = loopFlag;
if (m_nMusicMode != MUSICMODE_FRONTEND)
- m_bEarlyFrontendTrack = true;
+ m_bEarlyFrontendTrack = TRUE;
}
}
@@ -1201,7 +1201,7 @@ cMusicManager::GetFavouriteRadioStation()
return favstation;
}
-bool
+bool8
cMusicManager::CheckForMusicInterruptions()
{
return (m_nPlayingTrack == STREAMED_SOUND_MISSION_COMPLETED) || (m_nPlayingTrack == STREAMED_SOUND_CUTSCENE_FINALE);
@@ -1361,7 +1361,7 @@ cMusicManager::DisplayRadioStationName()
#endif
}
-bool
+bool8
cMusicManager::UsesPoliceRadio(CVehicle *veh)
{
switch (veh->GetModelIndex())
@@ -1371,18 +1371,18 @@ cMusicManager::UsesPoliceRadio(CVehicle *veh)
case MI_COASTG:
case MI_RHINO:
case MI_BARRACKS:
- return true;
+ return TRUE;
case MI_MRWHOOP:
case MI_HUNTER:
- return false;
+ return FALSE;
}
return veh->UsesSiren();
}
-bool
+bool8
cMusicManager::UsesTaxiRadio(CVehicle *veh)
{
- if (veh->GetModelIndex() != MI_KAUFMAN) return false;
+ if (veh->GetModelIndex() != MI_KAUFMAN) return FALSE;
return CTheScripts::bPlayerHasMetDebbieHarry;
}
@@ -1391,10 +1391,10 @@ cMusicManager::ServiceAmbience()
{
}
-bool
+bool8
cMusicManager::ChangeRadioChannel()
{
- return true;
+ return TRUE;
}
// these two are empty
diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h
index 27456d79..3d2b7cee 100644
--- a/src/audio/MusicManager.h
+++ b/src/audio/MusicManager.h
@@ -16,18 +16,18 @@ class CPed;
class cMusicManager
{
public:
- bool m_bIsInitialised;
- bool m_bDisabled;
- bool m_bSetNextStation;
+ bool8 m_bIsInitialised;
+ bool8 m_bDisabled;
+ bool8 m_bSetNextStation;
uint8 m_nVolumeLatency;
uint8 m_nCurrentVolume;
uint8 m_nMaxVolume;
uint32 m_nAnnouncement;
- bool m_bAnnouncementInProgress;
+ bool8 m_bAnnouncementInProgress;
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
- bool m_bResetTimers;
+ bool8 m_bResetTimers;
uint32 m_nResetTime;
- bool m_bRadioSetByScript;
+ bool8 m_bRadioSetByScript;
uint8 m_nRadioStationScript;
int32 m_nRadioPosition;
uint32 m_nRadioInCar;
@@ -35,40 +35,40 @@ public:
uint32 m_nPlayingTrack;
uint8 m_nUpcomingMusicMode;
uint8 m_nMusicMode;
- bool m_FrontendLoopFlag;
- bool m_bTrackChangeStarted;
+ bool8 m_FrontendLoopFlag;
+ bool8 m_bTrackChangeStarted;
uint32 m_nNextTrack;
- bool m_nNextLoopFlag;
- bool m_bVerifyNextTrackStartedToPlay;
- bool m_bGameplayAllowsRadio;
- bool m_bRadioStreamReady;
+ bool8 m_nNextLoopFlag;
+ bool8 m_bVerifyNextTrackStartedToPlay;
+ bool8 m_bGameplayAllowsRadio;
+ bool8 m_bRadioStreamReady;
int8 nFramesSinceCutsceneEnded;
- bool m_bUserResumedGame;
- bool m_bMusicModeChangeStarted;
+ bool8 m_bUserResumedGame;
+ bool8 m_bMusicModeChangeStarted;
uint8 m_nMusicModeToBeSet;
- bool m_bEarlyFrontendTrack;
+ bool8 m_bEarlyFrontendTrack;
float aListenTimeArray[NUM_RADIOS];
float m_nLastTrackServiceTime;
public:
cMusicManager();
- bool IsInitialised() { return m_bIsInitialised; }
+ bool8 IsInitialised() { return m_bIsInitialised; }
uint8 GetMusicMode() { return m_nMusicMode; }
uint32 GetCurrentTrack() { return m_nPlayingTrack; }
void ResetMusicAfterReload();
- void SetStartingTrackPositions(uint8 isNewGameTimer);
- bool Initialise();
+ void SetStartingTrackPositions(bool8 isNewGameTimer);
+ bool8 Initialise();
void Terminate();
void ChangeMusicMode(uint8 mode);
void StopFrontEndTrack();
- bool PlayerInCar();
+ bool8 PlayerInCar();
void DisplayRadioStationName();
void PlayAnnouncement(uint32);
- void PlayFrontEndTrack(uint32, uint8);
+ void PlayFrontEndTrack(uint32, bool8);
void PreloadCutSceneMusic(uint32);
void PlayPreloadedCutSceneMusic(void);
void StopCutSceneMusic(void);
@@ -83,16 +83,16 @@ public:
void ServiceAmbience();
void ServiceTrack(CVehicle *veh, CPed *ped);
- bool UsesPoliceRadio(CVehicle *veh);
- bool UsesTaxiRadio(CVehicle *veh);
+ bool8 UsesPoliceRadio(CVehicle *veh);
+ bool8 UsesTaxiRadio(CVehicle *veh);
uint32 GetTrackStartPos(uint32 track);
- void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
- bool ServiceAnnouncement();
+ void ComputeAmbienceVol(bool8 reset, uint8& outVolume);
+ bool8 ServiceAnnouncement();
uint32 GetCarTuning();
uint32 GetNextCarTuning();
- bool ChangeRadioChannel();
+ bool8 ChangeRadioChannel();
void RecordRadioStats();
void SetUpCorrectAmbienceTrack();
float *GetListenTimeArray();
@@ -100,7 +100,7 @@ public:
uint32 GetFavouriteRadioStation();
void SetMalibuClubTrackPos(uint8 pos);
void SetStripClubTrackPos(uint8 pos);
- bool CheckForMusicInterruptions();
+ bool8 CheckForMusicInterruptions();
void Enable();
void Disable();
@@ -109,5 +109,5 @@ public:
VALIDATE_SIZE(cMusicManager, 0x95C);
extern cMusicManager MusicManager;
-extern bool g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h
+extern bool8 g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h
float GetHeightScale();
diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp
index 75ec2fd8..cf92bb95 100644
--- a/src/audio/PolRadio.cpp
+++ b/src/audio/PolRadio.cpp
@@ -68,8 +68,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;
}
@@ -105,7 +105,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;
@@ -113,11 +113,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();
}
@@ -130,7 +130,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;
@@ -156,12 +156,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 = 22050;
@@ -171,14 +171,14 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == 1 &&
SampleManager.IsStreamPlaying(1)) {
- SampleManager.PauseStream(1, 1);
+ SampleManager.PauseStream(TRUE, 1);
}
} else {
if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE &&
bMissionAudioPhysicalPlayingStatus == 1) {
- SampleManager.PauseStream(0, 1);
+ SampleManager.PauseStream(FALSE, 1);
}
- if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = false;
+ if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = FALSE;
if (cWait) {
--cWait;
return;
@@ -202,7 +202,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;
@@ -223,8 +223,8 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
if (gSpecialSuspectLastSeenReport) {
gSpecialSuspectLastSeenReport = 0;
} else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) {
- bChannelOpen = false;
- processed = true;
+ bChannelOpen = FALSE;
+ processed = TRUE;
}
}
if (sample == NO_SAMPLE) {
@@ -234,7 +234,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
switch (sample) {
case SFX_POLICE_RADIO_MESSAGE_NOISE_1:
freq = m_anRandomTable[4] % 2000 + 10025;
- bChannelOpen = bChannelOpen == false;
+ bChannelOpen = bChannelOpen == FALSE;
break;
default: freq = SampleManager.GetSampleBaseFrequency(sample); break;
}
@@ -251,7 +251,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
}
}
-bool
+bool8
cAudioManager::SetupCrimeReport()
{
int16 audioZoneId;
@@ -264,13 +264,13 @@ cAudioManager::SetupCrimeReport()
float quarterY;
int i;
int32 sampleIndex;
- bool processed = false;
+ bool8 processed = FALSE;
- if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return false;
+ if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return FALSE;
if (60 - m_sPoliceRadioQueue.policeChannelTimer <= 9) {
AgeCrimes();
- return true;
+ return TRUE;
}
for (i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
@@ -278,7 +278,7 @@ cAudioManager::SetupCrimeReport()
break;
}
- if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return false;
+ if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return FALSE;
audioZoneId = CTheZones::FindAudioZone(&m_sPoliceRadioQueue.crimes[i].position);
if (audioZoneId >= 0 && audioZoneId < NUMAUDIOZONES) {
zone = CTheZones::GetAudioZone(audioZoneId);
@@ -317,10 +317,10 @@ cAudioManager::SetupCrimeReport()
if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
m_sPoliceRadioQueue.Add(SFX_NORTH);
- processed = true;
+ processed = TRUE;
} else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
m_sPoliceRadioQueue.Add(SFX_SOUTH);
- processed = true;
+ processed = TRUE;
}
if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
@@ -339,7 +339,7 @@ cAudioManager::SetupCrimeReport()
}
m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
AgeCrimes();
- return true;
+ return TRUE;
}
void
@@ -688,7 +688,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
float quarterX;
float quarterY;
int32 sample;
- bool processed = false;
+ bool8 processed = FALSE;
CVector vec = CVector(x, y, z);
if (!m_bIsInitialised) return;
@@ -713,10 +713,10 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
if (vec.y > halfY + quarterY) {
m_sPoliceRadioQueue.Add(SFX_NORTH);
- processed = true;
+ processed = TRUE;
} else if (vec.y < halfY - quarterY) {
m_sPoliceRadioQueue.Add(SFX_SOUTH);
- processed = true;
+ processed = TRUE;
}
if (vec.x > halfX + quarterX)
@@ -728,7 +728,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
m_sPoliceRadioQueue.Add(sample);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(NO_SAMPLE);
- gSpecialSuspectLastSeenReport = true;
+ gSpecialSuspectLastSeenReport = TRUE;
break;
}
}
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index 5d7d39af..50d1b17f 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -135,9 +135,9 @@ class cSampleManager
uint8 m_nMP3BoostVolume;
uint8 m_nEffectsFadeVolume;
uint8 m_nMusicFadeVolume;
- uint8 m_nMonoMode;
+ bool8 m_nMonoMode;
char m_szCDRomRootPath[80];
- bool m_bInitialised;
+ bool8 m_bInitialised;
uint8 m_nNumberOfProviders;
char *m_aAudioProviders[MAXPROVIDERS];
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
@@ -167,16 +167,16 @@ public:
int8 AutoDetect3DProviders();
- bool IsMP3RadioChannelAvailable(void);
+ bool8 IsMP3RadioChannelAvailable(void);
void ReleaseDigitalHandle (void);
void ReacquireDigitalHandle(void);
- bool Initialise(void);
- void Terminate (void);
+ bool8 Initialise(void);
+ void Terminate (void);
- bool CheckForAnAudioFileOnCD(void);
- char GetCDAudioDriveLetter (void);
+ bool8 CheckForAnAudioFileOnCD(void);
+ char GetCDAudioDriveLetter (void);
void UpdateEffectsVolume(void);
@@ -185,14 +185,14 @@ public:
void SetMP3BoostVolume (uint8 nVolume);
void SetEffectsFadeVolume (uint8 nVolume);
void SetMusicFadeVolume (uint8 nVolume);
- void SetMonoMode (uint8 nMode);
+ void SetMonoMode (bool8 nMode);
- bool LoadSampleBank (uint8 nBank);
- void UnloadSampleBank (uint8 nBank);
- bool IsSampleBankLoaded(uint8 nBank);
+ bool8 LoadSampleBank (uint8 nBank);
+ void UnloadSampleBank (uint8 nBank);
+ bool8 IsSampleBankLoaded(uint8 nBank);
- bool IsPedCommentLoaded(uint32 nComment);
- bool LoadPedComment (uint32 nComment);
+ bool8 IsPedCommentLoaded(uint32 nComment);
+ bool8 LoadPedComment (uint32 nComment);
int32 GetBankContainingSound(uint32 offset);
int32 _GetPedCommentSlot(uint32 nComment);
@@ -202,10 +202,10 @@ public:
int32 GetSampleLoopEndOffset (uint32 nSample);
uint32 GetSampleLength (uint32 nSample);
- bool UpdateReverb(void);
+ bool8 UpdateReverb(void);
- void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
- bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
+ void SetChannelReverbFlag (uint32 nChannel, bool8 nReverbFlag);
+ bool8 InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
@@ -214,23 +214,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 (uint32 nFile, uint8 nStream);
- void PauseStream (uint8 nPauseFlag, uint8 nStream);
+ void PauseStream (bool8 nPauseFlag, uint8 nStream);
void StartPreloadedStreamedFile (uint8 nStream);
- bool StartStreamedFile (uint32 nFile, uint32 nPos, uint8 nStream);
+ bool8 StartStreamedFile (uint32 nFile, uint32 nPos, uint8 nStream);
void StopStreamedFile (uint8 nStream);
int32 GetStreamedFilePosition (uint8 nStream);
- void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
+ 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);
uint8 GetMusicVolume() const { return m_nMusicVolume; }
void SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nStream);
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 3eee78ae..a6f04775 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];
@@ -63,11 +63,11 @@ int8 nStreamVolume[MAX_STREAMS];
uint8 nStreamLoopedFlag[MAX_STREAMS];
uint32 _CurMP3Index;
int32 _CurMP3Pos;
-bool _bIsMp3Active;
+bool8 _bIsMp3Active;
///////////////////////////////////////////////////////////////
-bool _bSampmanInitialised = false;
+bool8 _bSampmanInitialised = FALSE;
//
// Miscellaneous globals / defines
@@ -94,7 +94,7 @@ S32 speaker_type=0;
U32 _maxSamples;
float _fPrevEaxRatioDestination;
-bool _usingMilesFast2D;
+bool8 _usingMilesFast2D;
float _fEffectsLevel;
@@ -166,17 +166,17 @@ release_existing()
}
_fPrevEaxRatioDestination = 0.0f;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
_fEffectsLevel = 0.0f;
}
-static bool
+static bool8
set_new_provider(S32 index)
{
DWORD result;
if ( curprovider == index )
- return true;
+ return TRUE;
//close the already opened provider
curprovider = index;
@@ -203,7 +203,7 @@ set_new_provider(S32 index)
release_existing();
- return false;
+ return FALSE;
}
else
{
@@ -234,7 +234,7 @@ set_new_provider(S32 index)
AIL_set_3D_room_type(opened_provider, ENVIRONMENT_CAVE);
if ( !strcmp(providers[index].name, "Miles Fast 2D Positional Audio") )
- _usingMilesFast2D = true;
+ _usingMilesFast2D = TRUE;
}
AIL_3D_provider_attribute(opened_provider, "Maximum supported samples", &_maxSamples);
@@ -252,11 +252,11 @@ set_new_provider(S32 index)
AIL_set_3D_sample_effects_level(opened_samples[i], 0.0f);
}
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
U32 RadioHandlers[9];
@@ -459,7 +459,7 @@ cSampleManager::AutoDetect3DProviders()
return -1;
}
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
IShellLink* psl;
@@ -495,7 +495,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -505,15 +505,15 @@ _ResolveLink(char const *path, char *out)
psl->Release();
}
- return false;
+ return FALSE;
}
static void
_FindMP3s(void)
{
tMP3Entry *pList;
- bool bShortcut;
- bool bInitFirstEntry;
+ bool8 bShortcut;
+ bool8 bInitFirstEntry;
HANDLE hFind;
char path[MAX_PATH];
char filepath[MAX_PATH*2];
@@ -565,10 +565,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
- bShortcut = false;
+ bShortcut = FALSE;
}
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
@@ -608,7 +608,7 @@ _FindMP3s(void)
{
_pMP3List->pLinkPath = NULL;
}
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -616,10 +616,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -643,11 +643,11 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
if ( filepathlen > MAX_PATH )
{
@@ -690,7 +690,7 @@ _FindMP3s(void)
pList = _pMP3List;
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -718,11 +718,11 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
}
}
@@ -834,7 +834,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -847,7 +847,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -858,10 +858,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -890,13 +890,13 @@ cSampleManager::ReacquireDigitalHandle(void)
}
}
-bool
+bool8
cSampleManager::Initialise(void)
{
TRACE("start");
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
{
for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
@@ -922,7 +922,7 @@ cSampleManager::Initialise(void)
curprovider = -1;
prevprovider = -1;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
usingEAX=0;
usingEAX3=0;
@@ -947,7 +947,7 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < MAX_SFX_BANKS; i++ )
{
- bSampleBankLoaded[i] = false;
+ bSampleBankLoaded[i] = FALSE;
nSampleBankDiscStartOffset[i] = 0;
nSampleBankSize[i] = 0;
nSampleBankMemoryStartAddress[i] = 0;
@@ -988,24 +988,24 @@ cSampleManager::Initialise(void)
#ifdef AUDIO_CACHE
TRACE("cache");
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
- bool CreateCache = false;
+ bool8 CreateCache = FALSE;
if (cacheFile) {
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
fclose(cacheFile);
}else
- CreateCache = true;
+ CreateCache = TRUE;
#endif
char filepath[MAX_PATH];
- bool bFileNotFound;
+ bool8 bFileNotFound;
S32 tatalms;
TRACE("cdrom");
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
- while (true)
+ while (TRUE)
{
// Find path of WAVs (originally in HDD)
@@ -1046,7 +1046,7 @@ cSampleManager::Initialise(void)
{
OutputDebugString(AIL_last_error());
Terminate();
- return false;
+ return FALSE;
}
add_providers();
@@ -1076,9 +1076,9 @@ cSampleManager::Initialise(void)
}
else
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1113,7 +1113,7 @@ cSampleManager::Initialise(void)
AIL_close_stream(mp3Stream[0]);
mp3Stream[0] = NULL;
- bFileNotFound = false;
+ bFileNotFound = FALSE;
#ifdef AUDIO_CACHE
if (!CreateCache)
break;
@@ -1124,7 +1124,7 @@ cSampleManager::Initialise(void)
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
@@ -1159,11 +1159,11 @@ cSampleManager::Initialise(void)
mp3Stream[0] = NULL;
nStreamLength[i] = tatalms;
- bFileNotFound = false;
+ bFileNotFound = FALSE;
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
@@ -1178,11 +1178,11 @@ cSampleManager::Initialise(void)
if ( FrontEndMenuManager.m_bQuitGameNoCD )
{
Terminate();
- return false;
+ return FALSE;
}
continue;
#else
- m_bInitialised = true;
+ m_bInitialised = TRUE;
#endif
}
@@ -1201,14 +1201,14 @@ cSampleManager::Initialise(void)
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
@@ -1237,7 +1237,7 @@ cSampleManager::Initialise(void)
TRACE("providerset");
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
U32 n = 0;
@@ -1254,7 +1254,7 @@ cSampleManager::Initialise(void)
if ( n == m_nNumberOfProviders )
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1279,13 +1279,13 @@ cSampleManager::Initialise(void)
time_t t = time(NULL);
tm *localtm;
- bool bUseRandomTable;
+ bool8 bUseRandomTable;
if ( t == -1 )
- bUseRandomTable = true;
+ bUseRandomTable = TRUE;
else
{
- bUseRandomTable = false;
+ bUseRandomTable = FALSE;
localtm = localtime(&t);
}
@@ -1317,12 +1317,12 @@ cSampleManager::Initialise(void)
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
TRACE("end");
- return true;
+ return TRUE;
}
void
@@ -1371,10 +1371,10 @@ cSampleManager::Terminate(void)
AIL_shutdown();
- _bSampmanInitialised = false;
+ _bSampmanInitialised = FALSE;
}
-bool
+bool8
cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if !defined(NO_CDCHECK) // TODO: check steam, probably GTAVC_STEAM_PATCH needs to be added
@@ -1392,17 +1392,17 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume);
DMAudio.Service();
- return true;
+ return TRUE;
}
DMAudio.SetMusicMasterVolume(0);
DMAudio.SetEffectsMasterVolume(0);
DMAudio.Service();
- return false;
+ return FALSE;
#else
- return true;
+ return TRUE;
#endif // #if !defined(NO_CDCHECK)
}
@@ -1484,48 +1484,48 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
}
void
-cSampleManager::SetMonoMode(uint8 nMode)
+cSampleManager::SetMonoMode(bool8 nMode)
{
m_nMonoMode = nMode;
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
if ( MusicManager.IsInitialised()
&& MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
&& nBank != SFX_BANK_0 )
{
- return false;
+ return FALSE;
}
if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank],fpSampleDataHandle) != nSampleBankSize[nBank] )
- return false;
+ return FALSE;
- bSampleBankLoaded[nBank] = true;
+ bSampleBankLoaded[nBank] = TRUE;
- return true;
+ return TRUE;
}
void
cSampleManager::UnloadSampleBank(uint8 nBank)
{
- bSampleBankLoaded[nBank] = false;
+ bSampleBankLoaded[nBank] = FALSE;
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
int8 slot;
@@ -1538,10 +1538,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32
@@ -1563,11 +1563,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
// no talking peds during cutsenes or the game end
if ( MusicManager.IsInitialised() )
@@ -1576,7 +1576,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
@@ -1584,10 +1584,10 @@ cSampleManager::LoadPedComment(uint32 nComment)
}
if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize )
- return false;
+ return FALSE;
nPedSlotSfxAddr[nCurrentPedSlot] = nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot;
nPedSlotSfx [nCurrentPedSlot] = nComment;
@@ -1595,7 +1595,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1634,14 +1634,14 @@ cSampleManager::GetSampleLength(uint32 nSample)
return m_aSamples[nSample].nSize >> 1;
}
-bool
+bool8
cSampleManager::UpdateReverb(void)
{
if ( !usingEAX )
- return false;
+ return FALSE;
if ( AudioManager.GetFrameCounter() & 15 )
- return false;
+ return FALSE;
float fRatio = 0.0f;
@@ -1662,7 +1662,7 @@ cSampleManager::UpdateReverb(void)
fRatio = clamp(fRatio, 0.0f, 0.6f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
if ( usingEAX3 )
{
@@ -1684,26 +1684,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);
@@ -1716,16 +1716,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;
}
}
@@ -1735,14 +1735,14 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( nSfx < SAMPLEBANK_MAX )
{
if ( !IsSampleBankLoaded(nBank) )
- return false;
+ return FALSE;
addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset;
}
else
{
if ( !IsPedCommentLoaded(nSfx) )
- return false;
+ return FALSE;
int32 slot = _GetPedCommentSlot(nSfx);
@@ -1754,10 +1754,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
{
AIL_set_sample_address(opened_2dsamples[nChannel - MAXCHANNELS], (void *)addr, m_aSamples[nSfx].nSize);
- return true;
+ return TRUE;
}
else
- return false;
+ return FALSE;
}
else
{
@@ -1773,10 +1773,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;
}
}
@@ -1867,13 +1867,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;
}
}
@@ -1893,13 +1893,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;
}
}
@@ -1919,13 +1919,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;
}
}
@@ -1942,16 +1942,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;
}
}
@@ -1961,14 +1961,14 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
return AIL_sample_status(opened_2dsamples[nChannel - MAXCHANNELS]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
}
else
{
if ( opened_samples[nChannel] )
return AIL_3D_sample_status(opened_samples[nChannel]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
}
}
@@ -1976,13 +1976,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;
}
}
@@ -2002,13 +2002,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;
}
}
@@ -2060,12 +2060,12 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
if ( m_bInitialised )
{
if ( mp3Stream[nStream] )
- AIL_pause_stream(mp3Stream[nStream], nPauseFlag != 0);
+ AIL_pause_stream(mp3Stream[nStream], nPauseFlag != FALSE);
}
}
@@ -2079,7 +2079,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
int i = 0;
@@ -2087,7 +2087,7 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
char filename[MAX_PATH];
if ( !m_bInitialised || nFile >= TOTAL_STREAMED_SOUNDS )
- return false;
+ return FALSE;
if ( mp3Stream[nStream] )
{
@@ -2114,12 +2114,12 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
AIL_open_stream(DIG, filename, 0);
if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
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 )
@@ -2136,9 +2136,9 @@ cSampleManager::StartStreamedFile(uint32 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
}
@@ -2163,14 +2163,14 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(
mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
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)
@@ -2188,9 +2188,9 @@ cSampleManager::StartStreamedFile(uint32 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;
}
}
@@ -2207,12 +2207,12 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -2228,7 +2228,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
mp3Stream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
}
@@ -2266,7 +2266,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
}
void
-cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
+cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream)
{
uint8 vol = nVolume;
float boostMult = 0.0f;
@@ -2307,7 +2307,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return 0;
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
if ( m_bInitialised )
@@ -2315,23 +2315,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 )
@@ -2339,7 +2339,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2366,7 +2366,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;
}
diff --git a/src/audio/sampman_null.cpp b/src/audio/sampman_null.cpp
index e9a9eaa1..3352ae02 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)
@@ -129,15 +129,15 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
}
void
-cSampleManager::SetMonoMode(uint8 nMode)
+cSampleManager::SetMonoMode(bool8 nMode)
{
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS );
- return false;
+ return FALSE;
}
void
@@ -146,20 +146,20 @@ cSampleManager::UnloadSampleBank(uint8 nBank)
ASSERT( nBank < MAX_SFX_BANKS );
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS );
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- return false;
+ return FALSE;
}
@@ -169,11 +169,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- return false;
+ return FALSE;
}
int32
@@ -210,22 +210,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
@@ -281,12 +281,12 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
- return false;
+ return FALSE;
}
void
@@ -308,7 +308,7 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
}
@@ -319,12 +319,12 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
ASSERT( nStream < MAX_STREAMS );
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
- return false;
+ return FALSE;
}
void
@@ -342,7 +342,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
}
void
-cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
+cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
}
@@ -355,19 +355,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;
}
void
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 5a300cff..e74fac82 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];
@@ -121,7 +121,7 @@ uint8 nStreamVolume[MAX_STREAMS];
uint8 nStreamLoopedFlag[MAX_STREAMS];
uint32 _CurMP3Index;
int32 _CurMP3Pos;
-bool _bIsMp3Active;
+bool8 _bIsMp3Active;
///////////////////////////////////////////////////////////////
// Env Size Diffus Room RoomHF RoomLF DecTm DcHF DcLF Refl RefDel Ref Pan Revb RevDel Rev Pan EchTm EchDp ModTm ModDp AirAbs HFRef LFRef RRlOff FLAGS
EAXLISTENERPROPERTIES StartEAX3 =
@@ -266,11 +266,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;
@@ -302,7 +302,7 @@ set_new_provider(int index)
{
curprovider=-1;
release_existing();
- return false;
+ return FALSE;
}
alListenerf (AL_GAIN, 1.0f);
@@ -383,13 +383,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_KCHAT || track == STREAMED_SOUND_RADIO_VCPR || track == STREAMED_SOUND_RADIO_POLICE;
@@ -482,13 +482,13 @@ cSampleManager::AutoDetect3DProviders()
return -1;
}
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
#ifdef _WIN32
size_t len = strlen(path);
if (len < 4 || strcmp(&path[len - 4], ".lnk") != 0)
- return false;
+ return FALSE;
IShellLink* psl;
WIN32_FIND_DATA fd;
@@ -523,7 +523,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -533,31 +533,31 @@ _ResolveLink(char const *path, char *out)
psl->Release();
}
- return false;
+ return FALSE;
#else
struct stat sb;
if (lstat(path, &sb) == -1) {
perror("lstat: ");
- return false;
+ return FALSE;
}
if (S_ISLNK(sb.st_mode)) {
char* linkname = (char*)alloca(sb.st_size + 1);
if (linkname == NULL) {
fprintf(stderr, "insufficient memory\n");
- return false;
+ return FALSE;
}
if (readlink(path, linkname, sb.st_size + 1) < 0) {
perror("readlink: ");
- return false;
+ return FALSE;
}
linkname[sb.st_size] = '\0';
strcpy(out, linkname);
- return true;
+ return TRUE;
} else {
- return false;
+ return FALSE;
}
#endif
}
@@ -566,8 +566,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];
@@ -610,9 +610,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]);
@@ -652,7 +652,7 @@ _FindMP3s(void)
_pMP3List->pLinkPath = NULL;
}
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -660,10 +660,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -681,9 +681,9 @@ _FindMP3s(void)
{
OutputDebugString("Resolving Link");
OutputDebugString(filepath);
- bShortcut = true;
+ bShortcut = TRUE;
} else {
- bShortcut = false;
+ bShortcut = FALSE;
if (filepathlen > MAX_PATH) {
continue;
}
@@ -722,7 +722,7 @@ _FindMP3s(void)
pList = _pMP3List;
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -744,9 +744,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]);
@@ -858,7 +858,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -871,7 +871,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -882,10 +882,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -911,11 +911,11 @@ void cSampleManager::ReacquireDigitalHandle(void)
}
}
-bool
+bool8
cSampleManager::Initialise(void)
{
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
EFXInit();
CStream::Initialise();
@@ -960,7 +960,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;
@@ -1031,7 +1031,7 @@ cSampleManager::Initialise(void)
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (uintptr)malloc(nSampleBankSize[SFX_BANK_0]);
@@ -1040,7 +1040,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);
@@ -1059,7 +1059,7 @@ cSampleManager::Initialise(void)
}
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
if ( defaultProvider >= 0 && defaultProvider < m_nNumberOfProviders )
{
@@ -1068,7 +1068,7 @@ cSampleManager::Initialise(void)
else
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1091,13 +1091,13 @@ cSampleManager::Initialise(void)
time_t t = time(NULL);
tm *localtm;
- bool bUseRandomTable;
+ bool8 bUseRandomTable;
if ( t == -1 )
- bUseRandomTable = true;
+ bUseRandomTable = TRUE;
else
{
- bUseRandomTable = false;
+ bUseRandomTable = FALSE;
localtm = localtime(&t);
}
@@ -1129,10 +1129,10 @@ cSampleManager::Initialise(void)
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
- return true;
+ return TRUE;
}
void
@@ -1166,12 +1166,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)
@@ -1228,24 +1228,24 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
}
void
-cSampleManager::SetMonoMode(uint8 nMode)
+cSampleManager::SetMonoMode(bool8 nMode)
{
m_nMonoMode = nMode;
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
if ( MusicManager.IsInitialised()
&& MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
&& nBank != SFX_BANK_0 )
{
- return false;
+ return FALSE;
}
#ifdef OPUS_SFX
@@ -1264,14 +1264,14 @@ cSampleManager::LoadSampleBank(uint8 nBank)
}
#else
if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank], fpSampleDataHandle) != nSampleBankSize[nBank] )
- return false;
+ return FALSE;
#endif
- bSampleBankLoaded[nBank] = true;
+ bSampleBankLoaded[nBank] = TRUE;
- return true;
+ return TRUE;
}
void
@@ -1279,10 +1279,10 @@ cSampleManager::UnloadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
- bSampleBankLoaded[nBank] = false;
+ bSampleBankLoaded[nBank] = FALSE;
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
@@ -1290,7 +1290,7 @@ cSampleManager::IsSampleBankLoaded(uint8 nBank)
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
@@ -1305,10 +1305,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
@@ -1331,13 +1331,13 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
// no talking peds during cutsenes or the game end
if ( MusicManager.IsInitialised() )
@@ -1346,7 +1346,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
@@ -1361,17 +1361,17 @@ cSampleManager::LoadPedComment(uint32 nComment)
int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead),
samplesSize, NULL);
if (size <= 0) {
- return false;
+ return FALSE;
}
samplesRead += size * 2;
samplesSize -= size;
}
#else
if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize )
- return false;
+ return FALSE;
#endif
nPedSlotSfx[nCurrentPedSlot] = nComment;
@@ -1379,7 +1379,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1422,13 +1422,13 @@ cSampleManager::GetSampleLength(uint32 nSample)
return m_aSamples[nSample].nSize / sizeof(uint16);
}
-bool cSampleManager::UpdateReverb(void)
+bool8 cSampleManager::UpdateReverb(void)
{
if ( !usingEAX && !_usingEFX )
- return false;
+ return FALSE;
if ( AudioManager.GetFrameCounter() & 15 )
- return false;
+ return FALSE;
float fRatio = 0.0f;
@@ -1449,7 +1449,7 @@ bool cSampleManager::UpdateReverb(void)
fRatio = clamp(fRatio, 0.0f, 0.6f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
#ifdef JUICY_OAL
if ( usingEAX3 || _usingEFX )
@@ -1486,11 +1486,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 );
@@ -1500,7 +1500,7 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
{
alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect);
- if ( nReverbFlag != 0 )
+ if ( nReverbFlag != FALSE )
aChannel[nChannel].SetReverbMix(ALEffectSlot, _fEffectsLevel);
else
aChannel[nChannel].SetReverbMix(ALEffectSlot, 0.0f);
@@ -1508,7 +1508,7 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
}
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
@@ -1518,14 +1518,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);
@@ -1543,10 +1543,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
@@ -1649,7 +1649,7 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
aChannel[nChannel].SetLoopCount(nLoopCount);
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
@@ -1703,7 +1703,7 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
@@ -1711,7 +1711,7 @@ cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
if ( stream )
{
- stream->SetPause(nPauseFlag != 0);
+ stream->SetPause(nPauseFlag != FALSE);
}
}
@@ -1731,7 +1731,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
int i = 0;
@@ -1739,7 +1739,7 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
char filename[MAX_PATH];
if ( nFile >= TOTAL_STREAMED_SOUNDS )
- return false;
+ return FALSE;
if ( aStream[nStream] )
{
@@ -1768,18 +1768,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if (stream->Setup()) {
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
if (position != 0)
stream->SetPosMS(position);
stream->Start();
- return true;
+ return TRUE;
} else {
delete stream;
aStream[nStream] = NULL;
}
- return false;
+ return FALSE;
} else {
@@ -1798,8 +1798,8 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
aStream[nStream]->Start();
- _bIsMp3Active = true;
- return true;
+ _bIsMp3Active = TRUE;
+ return TRUE;
} else {
delete aStream[nStream];
aStream[nStream] = NULL;
@@ -1827,18 +1827,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if (stream->Setup()) {
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
if (position != 0)
stream->SetPosMS(position);
stream->Start();
- return true;
+ return TRUE;
} else {
delete stream;
aStream[nStream] = NULL;
}
- return false;
+ return FALSE;
}
}
if (mp3->pLinkPath != NULL)
@@ -1853,9 +1853,9 @@ cSampleManager::StartStreamedFile(uint32 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;
@@ -1876,18 +1876,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if ( stream->Setup() ) {
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
if (position != 0)
stream->SetPosMS(position);
stream->Start();
- return true;
+ return TRUE;
} else {
delete stream;
aStream[nStream] = NULL;
}
- return false;
+ return FALSE;
}
void
@@ -1903,7 +1903,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
aStream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
@@ -1937,7 +1937,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
}
void
-cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
+cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
@@ -1980,7 +1980,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return nStreamLength[nStream];
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
@@ -1990,10 +1990,10 @@ cSampleManager::IsStreamPlaying(uint8 nStream)
if ( stream )
{
if ( stream->IsPlaying() )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -2014,14 +2014,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 )
@@ -2029,7 +2029,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2061,7 +2061,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;
}
void