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:44:36 +0200
commit1fa0116f5f856b4dbe68bb289443e28ae4012543 (patch)
treefac52d580474b0317e4c7186b89b4696736a3e6d /src/audio
parentWait states ported (scripted animations) (diff)
downloadre3-1fa0116f5f856b4dbe68bb289443e28ae4012543.tar
re3-1fa0116f5f856b4dbe68bb289443e28ae4012543.tar.gz
re3-1fa0116f5f856b4dbe68bb289443e28ae4012543.tar.bz2
re3-1fa0116f5f856b4dbe68bb289443e28ae4012543.tar.lz
re3-1fa0116f5f856b4dbe68bb289443e28ae4012543.tar.xz
re3-1fa0116f5f856b4dbe68bb289443e28ae4012543.tar.zst
re3-1fa0116f5f856b4dbe68bb289443e28ae4012543.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/AudioCollision.cpp29
-rw-r--r--src/audio/AudioLogic.cpp1367
-rw-r--r--src/audio/AudioManager.cpp124
-rw-r--r--src/audio/AudioManager.h114
-rw-r--r--src/audio/DMAudio.cpp26
-rw-r--r--src/audio/DMAudio.h22
-rw-r--r--src/audio/MusicManager.cpp272
-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, 1332 insertions, 1334 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 38836c3c..4de98327 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -123,62 +123,62 @@ cAudioManager::PostInitialiseGameSpecificSetup()
{
m_nFireAudioEntity = CreateEntity(AUDIOTYPE_FIRE, &gFireManager);
if (m_nFireAudioEntity >= 0)
- SetEntityStatus(m_nFireAudioEntity, true);
+ SetEntityStatus(m_nFireAudioEntity, TRUE);
m_nCollisionEntity = CreateEntity(AUDIOTYPE_COLLISION, (void *)1);
if (m_nCollisionEntity >= 0)
- SetEntityStatus(m_nCollisionEntity, true);
+ SetEntityStatus(m_nCollisionEntity, TRUE);
m_nFrontEndEntity = CreateEntity(AUDIOTYPE_FRONTEND, (void *)1);
if (m_nFrontEndEntity >= 0)
- SetEntityStatus(m_nFrontEndEntity, true);
+ SetEntityStatus(m_nFrontEndEntity, TRUE);
m_nProjectileEntity = CreateEntity(AUDIOTYPE_PROJECTILE, (void *)1);
if (m_nProjectileEntity >= 0)
- SetEntityStatus(m_nProjectileEntity, true);
+ SetEntityStatus(m_nProjectileEntity, TRUE);
m_nWaterCannonEntity = CreateEntity(AUDIOTYPE_WATERCANNON, (void *)1);
if (m_nWaterCannonEntity >= 0)
- SetEntityStatus(m_nWaterCannonEntity, true);
+ SetEntityStatus(m_nWaterCannonEntity, TRUE);
m_nPoliceChannelEntity = CreateEntity(AUDIOTYPE_POLICERADIO, (void *)1);
if (m_nPoliceChannelEntity >= 0)
- SetEntityStatus(m_nPoliceChannelEntity, true);
+ SetEntityStatus(m_nPoliceChannelEntity, TRUE);
#ifdef GTA_BRIDGE
m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void*)1);
if (m_nBridgeEntity >= 0)
- SetEntityStatus(m_nBridgeEntity, true);
+ SetEntityStatus(m_nBridgeEntity, TRUE);
#endif // GTA_BRIDGE
m_nEscalatorEntity = CreateEntity(AUDIOTYPE_ESCALATOR, (void*)1);
if (m_nEscalatorEntity >= 0)
- SetEntityStatus(m_nEscalatorEntity, true);
+ SetEntityStatus(m_nEscalatorEntity, TRUE);
m_nExtraSoundsEntity = CreateEntity(AUDIOTYPE_EXTRA_SOUNDS, (void*)1);
if (m_nExtraSoundsEntity >= 0)
- SetEntityStatus(m_nExtraSoundsEntity, true);
+ SetEntityStatus(m_nExtraSoundsEntity, TRUE);
m_sMissionAudio.m_nSampleIndex[0] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[0] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[0] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[0] = false;
- m_sMissionAudio.m_bIsPlayed[0] = false;
- m_sMissionAudio.m_bPredefinedProperties[0] = true;
+ m_sMissionAudio.m_bIsPlaying[0] = FALSE;
+ m_sMissionAudio.m_bIsPlayed[0] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[0] = TRUE;
m_sMissionAudio.m_nMissionAudioCounter[0] = 0;
- m_sMissionAudio.m_bIsMobile[0] = false;
+ m_sMissionAudio.m_bIsMobile[0] = FALSE;
field_5538 = 127;
m_sMissionAudio.m_nSampleIndex[1] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[1] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[1] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[1] = false;
- m_sMissionAudio.m_bIsPlayed[1] = false;
- m_sMissionAudio.m_bPredefinedProperties[1] = true;
+ m_sMissionAudio.m_bIsPlaying[1] = FALSE;
+ m_sMissionAudio.m_bIsPlayed[1] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[1] = TRUE;
m_sMissionAudio.m_nMissionAudioCounter[1] = 0;
- m_sMissionAudio.m_bIsMobile[1] = false;
+ m_sMissionAudio.m_bIsMobile[1] = FALSE;
field_5538 = 127;
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
- m_bIsPlayerShutUp = false;
+ m_bIsPlayerShutUp = FALSE;
m_nPlayerMood = PLAYER_MOOD_CALM;
m_nPlayerMoodTimer = 0;
}
@@ -261,7 +261,7 @@ cAudioManager::ProcessReverb() const
if (SampleManager.UpdateReverb() && m_bDynamicAcousticModelingStatus) {
for (uint32 i = 0; i < numChannels; i++) {
if (m_asActiveSamples[i].m_bReverbFlag)
- SampleManager.SetChannelReverbFlag(i, true);
+ SampleManager.SetChannelReverbFlag(i, TRUE);
}
}
}
@@ -274,11 +274,11 @@ cAudioManager::GetDistanceSquared(const CVector &v) const
}
void
-cAudioManager::CalculateDistance(bool &distCalculated, float dist)
+cAudioManager::CalculateDistance(bool8 &distCalculated, float dist)
{
if (!distCalculated) {
m_sQueueSample.m_fDistance = Sqrt(dist);
- distCalculated = true;
+ distCalculated = TRUE;
}
}
@@ -362,56 +362,56 @@ cAudioManager::ProcessEntity(int32 id)
switch (m_asAudioEntities[id].m_nType) {
case AUDIOTYPE_PHYSICAL:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessPhysical(id);
}
break;
case AUDIOTYPE_EXPLOSION:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessExplosions(id);
}
break;
case AUDIOTYPE_FIRE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessFires(id);
}
break;
case AUDIOTYPE_WEATHER:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
if(CGame::currArea == AREA_MAIN_MAP || CGame::currArea == AREA_EVERYWHERE)
ProcessWeather(id);
}
break;
/* case AUDIOTYPE_CRANE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessCrane();
}
break;*/
case AUDIOTYPE_SCRIPTOBJECT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessScriptObject(id);
}
break;
#ifdef GTA_BRIDGE
case AUDIOTYPE_BRIDGE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessBridge();
}
break;
#endif
case AUDIOTYPE_FRONTEND:
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
ProcessFrontEnd();
break;
case AUDIOTYPE_PROJECTILE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessProjectiles();
}
break;
@@ -421,25 +421,25 @@ cAudioManager::ProcessEntity(int32 id)
break;
case AUDIOTYPE_FIREHYDRANT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessFireHydrant();
}
break;
case AUDIOTYPE_WATERCANNON:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessWaterCannon(id);
}
break;
case AUDIOTYPE_ESCALATOR:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessEscalators();
}
break;
case AUDIOTYPE_EXTRA_SOUNDS:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
ProcessExtraSounds();
}
break;
@@ -722,9 +722,9 @@ const eSfxSample aEngineSounds[][2] = {
{ SFX_CAR_IDLE_UNUSED4, SFX_CAR_REV_UNUSED4 },
};
-bool bPlayerJustEnteredCar;
+bool8 bPlayerJustEnteredCar;
-const bool hornPatternsArray[8][44] = {
+const bool8 hornPatternsArray[8][44] = {
{false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,
false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false},
{false, false, true, true, true, false, false, false, false, true, true, true, true, false, false, false, false, true, true, true, true, false,
@@ -759,7 +759,7 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|| CGame::currArea == AREA_MALL
|| CGame::currArea == AREA_MAIN_MAP) {
m_sQueueSample.m_vecPos = veh->GetPosition();
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_pVehicle = veh;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
params.m_pTransmission = veh->pHandling != nil ? &veh->pHandling->Transmission : nil;
@@ -891,7 +891,7 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
veh->m_bRainSamplesCounter = 68;
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_CAR_RAIN_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 9;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 4000 + 28000;
m_sQueueSample.m_nLoopCount = 1;
@@ -900,15 +900,15 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
}
-bool
+bool8
cAudioManager::ProcessReverseGear(cVehicleParams& params)
{
const int reverseGearIntensity = 30;
@@ -918,10 +918,10 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
uint8 emittingVolume;
if (params.m_fDistance >= SQR(reverseGearIntensity))
- return false;
+ return FALSE;
automobile = (CAutomobile*)params.m_pVehicle;
if (automobile->m_modelIndex == MI_CADDY)
- return true;
+ return TRUE;
if (automobile->bEngineOn && (automobile->m_fGasPedal < 0.0f || automobile->m_nCurrentGear == 0)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
if (automobile->m_nDriveWheelsOnGround != 0) {
@@ -944,7 +944,7 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_GEAR;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = (6000.0f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
@@ -953,14 +953,14 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = reverseGearIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
void
@@ -975,14 +975,14 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
int16 acceletateState;
int16 brakeState;
uint8 volume;
- bool isPlayerVeh;
- bool vehSlowdown;
+ bool8 isPlayerVeh;
+ bool8 vehSlowdown;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
return;
if (FindPlayerVehicle() == params.m_pVehicle)
- isPlayerVeh = true;
+ isPlayerVeh = TRUE;
else
#ifdef FIX_BUGS
isPlayerVeh = CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle == params.m_pVehicle;
@@ -1008,7 +1008,7 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_RC_REV;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -1017,10 +1017,10 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_RC_REV);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1039,11 +1039,11 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
if (acceletateState < brakeState)
acceletateState = brakeState;
if (acceletateState <= 0) {
- vehSlowdown = true;
+ vehSlowdown = TRUE;
volume = 127;
freq = 18000;
} else {
- vehSlowdown = false;
+ vehSlowdown = FALSE;
volume = Min(127, (127 * acceletateState / 255) * 3.0f * Abs(params.m_fVelocityChange));
freq = Min(22000, (8000 * acceletateState / 255 + 14000) * 3.0f * Abs(params.m_fVelocityChange));
}
@@ -1073,7 +1073,7 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeDivider = 4;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -1082,9 +1082,9 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1105,7 +1105,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
static uint32 prevFreq = 22050;
uint32 freq;
- bool isPlayerVeh;
+ bool8 isPlayerVeh;
int16 acceletateState;
int16 brakeState;
@@ -1113,7 +1113,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
return;
if (FindPlayerVehicle() == params.m_pVehicle)
- isPlayerVeh = true;
+ isPlayerVeh = TRUE;
else
#ifdef FIX_BUGS
isPlayerVeh = CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle == params.m_pVehicle;
@@ -1136,7 +1136,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_CAR_RC_HELI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -1145,17 +1145,17 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_RC_HELI);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
if (isPlayerVeh)
prevFreq = freq;
}
-bool
+bool8
cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 95.0f;
@@ -1168,10 +1168,10 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
uint8 wheelsOnGround;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
wheelsOnGround = ((CAutomobile*)params.m_pVehicle)->m_nWheelsOnGround;
@@ -1184,7 +1184,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
break;
}
if (params.m_pTransmission == nil || wheelsOnGround == 0)
- return true;
+ return TRUE;
velocity = Abs(params.m_fVelocityChange);
if (velocity > 0.0f) {
@@ -1194,7 +1194,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
if (params.m_pVehicle->m_nSurfaceTouched == SURFACE_WATER) {
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
@@ -1212,18 +1212,18 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 30.0f;
@@ -1236,7 +1236,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
uint8 wheelsOnGround;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
wheelsOnGround = ((CAutomobile*)params.m_pVehicle)->m_nWheelsOnGround;
@@ -1249,7 +1249,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
break;
}
if (params.m_pTransmission == nil || wheelsOnGround == 0)
- return true;
+ return TRUE;
velocity = Abs(params.m_fVelocityChange);
if (velocity > 0.0f) {
@@ -1261,7 +1261,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_ROAD_NOISE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
multiplier = (m_sQueueSample.m_fDistance / SOUND_INTENSITY) * 0.5f;
freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE);
@@ -1272,15 +1272,15 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
void
@@ -1305,11 +1305,11 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
float relativeChange;
float modificator;
float traction;
- bool isMoped;
- bool caddyBool;
+ bool8 isMoped;
+ bool8 caddyBool;
- isMoped = false;
- caddyBool = false;
+ isMoped = FALSE;
+ caddyBool = FALSE;
traction = 0.0f;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
return;
@@ -1331,12 +1331,12 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
switch (veh->m_modelIndex) {
case MI_PIZZABOY:
case MI_FAGGIO:
- isMoped = true;
+ isMoped = TRUE;
currentGear = transmission->nNumberOfGears;
break;
case MI_CADDY:
currentGear = transmission->nNumberOfGears;
- caddyBool = true;
+ caddyBool = TRUE;
break;
default:
currentGear = veh->m_nCurrentGear;
@@ -1363,7 +1363,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
}
if (wheelsOnGround != 0) {
- if (!veh->bIsHandbrakeOn || isMoped && caddyBool) { //mb bug, bcs it's can't be true together
+ if (!veh->bIsHandbrakeOn || isMoped && caddyBool) { //mb bug, bcs it's can't be TRUE together
if (veh->GetStatus() == STATUS_SIMPLE || isMoped || caddyBool) {
traction = 0.0f;
} else {
@@ -1487,7 +1487,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
m_sQueueSample.m_nFrequency = freq + 20 * m_sQueueSample.m_nBankIndex % 100;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_TRUCK || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_TRUCK)
m_sQueueSample.m_nFrequency /= 2;
@@ -1497,10 +1497,10 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1526,7 +1526,7 @@ void
cAudioManager::PlayerJustGotInCar() const
{
if (m_bIsInitialised)
- bPlayerJustEnteredCar = true;
+ bPlayerJustEnteredCar = TRUE;
}
void
@@ -1536,7 +1536,7 @@ cAudioManager::PlayerJustLeftCar(void) const
}
void
-cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping)
+cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping)
{
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, 50.f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
@@ -1547,7 +1547,7 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
#else
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
#endif // GTA_PS2
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = freq;
if (notLooping) {
@@ -1561,9 +1561,9 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1578,7 +1578,7 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nCounter = 52;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_IDLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = 12500;
m_sQueueSample.m_nLoopCount = 0;
@@ -1588,9 +1588,9 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 200.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
if(params.m_fDistance < SQR(90)) {
@@ -1599,7 +1599,7 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0;
@@ -1609,9 +1609,9 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 90.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -1648,32 +1648,32 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
float velocityChangeForAudio;
float relativeVelocityChange;
float time;
- bool channelUsed;
- bool lostTraction;
- bool noGearBox;
- bool stuckInSand;
- bool processedAccelSampleStopped;
- bool isMoped;
+ bool8 channelUsed;
+ bool8 lostTraction;
+ bool8 noGearBox;
+ bool8 stuckInSand;
+ bool8 processedAccelSampleStopped;
+ bool8 isMoped;
static uint32 gearSoundStartTime = CTimer::GetTimeInMilliseconds();
static int32 nCruising = 0;
static int16 LastAccel = 0;
static uint8 CurrentPretendGear = 1;
- static bool bLostTractionLastFrame = false;
- static bool bHandbrakeOnLastFrame = false;
- static bool bAccelSampleStopped = true;
+ static bool8 bLostTractionLastFrame = FALSE;
+ static bool8 bHandbrakeOnLastFrame = FALSE;
+ static bool8 bAccelSampleStopped = TRUE;
- lostTraction = false;
+ lostTraction = FALSE;
isMoped = params.m_pVehicle->m_modelIndex == MI_PIZZABOY || params.m_pVehicle->m_modelIndex == MI_FAGGIO;
- processedAccelSampleStopped = false;
+ processedAccelSampleStopped = FALSE;
if (bPlayerJustEnteredCar) {
- bAccelSampleStopped = true;
- bPlayerJustEnteredCar = false;
+ bAccelSampleStopped = TRUE;
+ bPlayerJustEnteredCar = FALSE;
nCruising = 0;
LastAccel = 0;
- bLostTractionLastFrame = false;
+ bLostTractionLastFrame = FALSE;
CurrentPretendGear = 1;
- bHandbrakeOnLastFrame = false;
+ bHandbrakeOnLastFrame = FALSE;
}
if (CReplay::IsPlayingBack()) {
accelerateState = (255.0f * clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f));
@@ -1729,26 +1729,26 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
++wheelInUseCounter;
}
if (wheelInUseCounter > 2)
- lostTraction = true;
+ lostTraction = TRUE;
}
break;
case 'F':
if (params.m_VehicleType == VEHICLE_TYPE_BIKE) {
if (wheelState[BIKEWHEEL_FRONT] != WHEEL_STATE_NORMAL)
- lostTraction = true;
+ lostTraction = TRUE;
} else {
if ((wheelState[CARWHEEL_FRONT_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_FRONT_RIGHT] != WHEEL_STATE_NORMAL) &&
(wheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
- lostTraction = true;
+ lostTraction = TRUE;
}
break;
case 'R':
if (params.m_VehicleType == VEHICLE_TYPE_BIKE) {
if (wheelState[BIKEWHEEL_REAR] != WHEEL_STATE_NORMAL)
- lostTraction = true;
+ lostTraction = TRUE;
} else {
if (wheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || wheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL)
- lostTraction = true;
+ lostTraction = TRUE;
}
break;
default:
@@ -1771,7 +1771,6 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
engineSoundType = aVehicleSettings[params.m_nIndex].m_nBank;
soundOffset = gBankStartOffset[engineSoundType] - gBankStartOffset[CAR_SFX_BANKS_OFFSET];
//soundOffset = 3 * (engineSoundType - CAR_SFX_BANKS_OFFSET);
- noGearBox = false;
switch (engineSoundType) {
case SFX_BANK_PONTIAC:
gearSoundLength = 2526;
@@ -1816,7 +1815,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
gearSoundLength = 2410;
break;
default:
- noGearBox = true;
+ noGearBox = TRUE;
break;
}
if (!channelUsed || nCruising || noGearBox) {
@@ -1824,7 +1823,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
} else {
gearSoundLength -= 1000;
if (CTimer::GetTimeInMilliseconds() - gearSoundStartTime > gearSoundLength) {
- channelUsed = false;
+ channelUsed = FALSE;
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
}
}
@@ -1848,7 +1847,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
if (params.m_fVelocityChange < -0.001f) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
if (wheelsOnGround == 0 || params.m_pVehicle->bIsHandbrakeOn || lostTraction)
gasPedalAudio = *gasPedalAudioPtr;
@@ -1860,7 +1859,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
} else if (LastAccel > 0) {
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
nCruising = 0;
if (wheelsOnGround == 0
@@ -1881,7 +1880,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
vol /= 4;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(vol, freq, soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1, engineSoundType, 63, false);
+ AddPlayerCarSample(vol, freq, soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1, engineSoundType, 63, FALSE);
}
}
freq = (10000.f * gasPedalAudio) + 22050;
@@ -1921,7 +1920,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
}
if (params.m_pVehicle->bIsDrowning)
vol /= 4;
@@ -1931,8 +1930,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
if (bAccelSampleStopped) {
if (CurrentPretendGear != 1 || currentGear != 2)
CurrentPretendGear = Max(1, currentGear - 1);
- processedAccelSampleStopped = true;
- bAccelSampleStopped = false;
+ processedAccelSampleStopped = TRUE;
+ bAccelSampleStopped = FALSE;
}
if (channelUsed) {
SampleManager.SetChannelEmittingVolume(m_nActiveSamples, 120);
@@ -1943,12 +1942,12 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else if (processedAccelSampleStopped) {
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
- params.m_pVehicle->bAudioChangingGear = true;
+ params.m_pVehicle->bAudioChangingGear = TRUE;
if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
return;
SampleManager.SetChannelLoopCount(m_nActiveSamples, 1);
@@ -1962,13 +1961,13 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else if (CurrentPretendGear < params.m_pTransmission->nNumberOfGears - 1) {
++CurrentPretendGear;
gearSoundStartTime = CTimer::GetTimeInMilliseconds();
- params.m_pVehicle->bAudioChangingGear = true;
+ params.m_pVehicle->bAudioChangingGear = TRUE;
if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
return;
SampleManager.SetChannelLoopCount(m_nActiveSamples, 1);
@@ -1982,7 +1981,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != FALSE);
SampleManager.StartChannel(m_nActiveSamples);
}
} else {
@@ -1992,7 +1991,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
}
} else {
PlayCruising:
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
SampleManager.StopChannel(m_nActiveSamples);
if (isMoped || accelerateState >= 150 && wheelsOnGround && brakeState <= 0 && !params.m_pVehicle->bIsHandbrakeOn
&& !lostTraction && currentGear >= params.m_pTransmission->nNumberOfGears - 1) {
@@ -2005,7 +2004,7 @@ PlayCruising:
freq = 27 * nCruising + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(120, freq, soundOffset + SFX_CAR_AFTER_ACCEL_1, engineSoundType, 64, true);
+ AddPlayerCarSample(120, freq, soundOffset + SFX_CAR_AFTER_ACCEL_1, engineSoundType, 64, TRUE);
} else {
nCruising = 0;
}
@@ -2017,7 +2016,7 @@ PlayCruising:
return;
}
-bool
+bool8
cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2036,7 +2035,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
float skidVal = 0.0f;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
automobile = (CAutomobile*)params.m_pVehicle;
@@ -2054,10 +2053,10 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
break;
default:
debug("\n * AUDIOLOG: ProcessVehicleSkidding() Unsupported vehicle type %d * \n", params.m_VehicleType);
- return true;
+ return TRUE;
}
if (wheelsOnGround == 0)
- return true;
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
for (int32 i = 0; i < numWheels; i++) {
@@ -2099,7 +2098,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
m_sQueueSample.m_nFrequency = 13000.f * skidVal + 35000.f;
m_sQueueSample.m_nVolume /= 4;
if (m_sQueueSample.m_nVolume == 0)
- return true;
+ return TRUE;
break;
case SURFACE_GRAVEL:
case SURFACE_MUD_DRY:
@@ -2119,7 +2118,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 8;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -2127,14 +2126,14 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
float
@@ -2183,7 +2182,7 @@ cAudioManager::GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheel
return Max(relativeVelChange, Min(1.0f, Abs(veh->m_vecTurnSpeed.z) * 20.0f));
}
-bool
+bool8
cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2192,17 +2191,17 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
veh = params.m_pVehicle;
if (veh->m_bSirenOrAlarm && UsesSirenSwitching(params))
- return true;
+ return TRUE;
if (veh->m_modelIndex == MI_MRWHOOP)
- return true;
+ return TRUE;
if (veh->IsAlarmOn())
- return true;
+ return TRUE;
if (veh->m_nCarHornTimer != 0) {
if (veh->GetStatus() != STATUS_PLAYER) {
@@ -2211,7 +2210,7 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
veh->m_nCarHornPattern = (m_FrameCounter + m_sQueueSample.m_nEntityIndex) & 7;
if (!hornPatternsArray[veh->m_nCarHornPattern][44 - veh->m_nCarHornTimer])
- return true;
+ return TRUE;
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2221,7 +2220,7 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
m_sQueueSample.m_nCounter = 4;
m_sQueueSample.m_nSampleIndex = aVehicleSettings[params.m_nIndex].m_nHornSample;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency;
m_sQueueSample.m_nLoopCount = 0;
@@ -2234,31 +2233,31 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::UsesSiren(cVehicleParams& params) const
{
return params.m_pVehicle->UsesSiren();
}
-bool
+bool8
cAudioManager::UsesSirenSwitching(cVehicleParams& params) const
{
if (params.m_nIndex == FIRETRUK || params.m_nIndex == MRWHOOP)
- return false;
+ return FALSE;
return UsesSiren(params);
}
-bool
+bool8
cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
{
const float SOUND_INTENSITY = 110.0f;
@@ -2267,18 +2266,18 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
veh = params.m_pVehicle;
if (!veh->m_bSirenOrAlarm && !veh->IsAlarmOn())
- return true;
+ return TRUE;
if (veh->IsAlarmOn()) {
if (CTimer::GetTimeInMilliseconds() > veh->m_nCarHornTimer)
veh->m_nCarHornTimer = CTimer::GetTimeInMilliseconds() + 750;
if (veh->m_nCarHornTimer < CTimer::GetTimeInMilliseconds() + 375)
- return true;
+ return TRUE;
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2288,7 +2287,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nCounter = 5;
if (UsesSiren(params)) {
if (params.m_pVehicle->GetStatus() == STATUS_ABANDONED)
- return true;
+ return TRUE;
if (veh->m_nCarHornTimer != 0 && params.m_nIndex != FIRETRUK && params.m_nIndex != MRWHOOP) {
m_sQueueSample.m_nSampleIndex = SFX_SIREN_FAST;
if (params.m_nIndex == FBIRANCH)
@@ -2308,7 +2307,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = volume;
@@ -2316,22 +2315,22 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 7.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::UsesReverseWarning(int32 model) const
{
return model == LINERUN || model == FIRETRUK || model == BUS || model == COACH || model == PACKER || model == FLATBED;
}
-bool
+bool8
cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
{
const float SOUND_INTENSITY = 50.0f;
@@ -2340,7 +2339,7 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (veh->bEngineOn && veh->m_fGasPedal < 0.0f) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2350,7 +2349,7 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
m_sQueueSample.m_nCounter = 12;
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_WARNING;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = (100 * m_sQueueSample.m_nEntityIndex & 1023) + SampleManager.GetSampleBaseFrequency(SFX_REVERSE_WARNING);
m_sQueueSample.m_nLoopCount = 0;
@@ -2363,17 +2362,17 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2384,7 +2383,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
float velocity;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2401,7 +2400,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = m_anRandomTable[1] % 6 + SFX_COL_CAR_PANEL_1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) + RandomDisplacement(1000);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -2409,19 +2408,19 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
AddSampleToRequestedQueue();
}
}
}
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessAirBrakes(cVehicleParams& params)
{
const float SOUND_INTENSITY = 30.0f;
@@ -2429,14 +2428,14 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
uint8 volume;
if (params.m_fDistance > SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
if (!automobile->bEngineOn)
- return true;
+ return TRUE;
if ((automobile->m_fVelocityChangeForAudio < 0.025f || params.m_fVelocityChange >= 0.025f) &&
(automobile->m_fVelocityChangeForAudio > -0.025f || params.m_fVelocityChange <= 0.025f))
- return true;
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
volume = m_anRandomTable[0] % 10 + 70;
@@ -2447,7 +2446,7 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AIR_BRAKES);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_nEmittingVolume = volume;
@@ -2455,23 +2454,23 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::HasAirBrakes(int32 model) const
{
return model == LINERUN || model == FIRETRUK || model == TRASH || model == BUS || model == BARRACKS
|| model == COACH || model == PACKER || model == FLATBED;
}
-bool
+bool8
cAudioManager::ProcessEngineDamage(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2480,11 +2479,11 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
uint8 emittingVolume;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pVehicle->m_modelIndex == MI_CADDY)
- return true;
+ return TRUE;
if (params.m_pVehicle->GetStatus() == STATUS_WRECKED)
- return true;
+ return TRUE;
health = params.m_pVehicle->m_fHealth;
if (health < 390.0f) {
if (health < 250.0f) {
@@ -2505,24 +2504,24 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 28;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessCarBombTick(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -2531,7 +2530,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
uint8 bombType;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pVehicle->bEngineOn) {
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
@@ -2542,7 +2541,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
break;
default:
debug("\n * AUDIOLOG: ProcessCarBombTick() Unsupported vehicle type %d * \n", params.m_VehicleType);
- return true;
+ return TRUE;
break;
}
if (bombType == CARBOMB_TIMEDACTIVE) {
@@ -2552,7 +2551,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
m_sQueueSample.m_nCounter = 35;
m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
m_sQueueSample.m_nLoopCount = 0;
@@ -2561,15 +2560,15 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
}
- return true;
+ return TRUE;
}
void
@@ -2579,15 +2578,15 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
uint8 emittingVol;
float relVol;
float vol;
- bool noReflections;
- bool isHeli;
+ bool8 noReflections;
+ bool8 isHeli;
float maxDist;
static uint8 GunIndex = 53;
for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- noReflections = false;
- isHeli = false;
- m_sQueueSample.m_bRequireReflection = false;
+ noReflections = FALSE;
+ isHeli = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
event = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
switch (event) {
case SOUND_CAR_DOOR_CLOSE_BONNET:
@@ -2630,7 +2629,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_DOOR_OPEN_BONNET:
@@ -2670,7 +2669,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_WINDSHIELD_CRACK: {
@@ -2745,7 +2744,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_LIGHT_BREAK: {
@@ -2790,7 +2789,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- noReflections = true;
+ noReflections = TRUE;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[0] % 15 + 55;
break;
@@ -2875,7 +2874,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
emittingVol = (37.0f * vol * 625.0f / 24.0f) + 90;
maxDist = SQR(SOUND_INTENSITY);
- noReflections = true;
+ noReflections = TRUE;
break;
}
case SOUND_CAR_BOMB_TICK: {
@@ -2888,7 +2887,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVol = 60;
break;
}
@@ -2970,8 +2969,8 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
- isHeli = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ isHeli = TRUE;
break;
default:
{
@@ -3024,7 +3023,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
}
@@ -3056,7 +3055,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVol = 50;
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -3070,7 +3069,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
}
/* case SOUND_PED_BODYCAST_HIT:
pedParams.m_pPed = nil;
- pedParams.m_bDistanceCalculated = false;
+ pedParams.m_bDistanceCalculated = FALSE;
pedParams.m_fDistance = 0.0f;
pedParams.m_bDistanceCalculated = params.m_bDistanceCalculated;
pedParams.m_fDistance = params.m_fDistance;
@@ -3097,7 +3096,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVol = m_anRandomTable[4] % 20 + 90;
break;
}
@@ -3115,7 +3114,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 20 + 55;
CrunchOffset %= 2;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_CAR_PED_COLLISION: {
@@ -3145,18 +3144,18 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
if (m_sQueueSample.m_nVolume != 0) {
if (noReflections) {
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
} else {
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
}
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
if (isHeli) {
if (0.2f * m_sQueueSample.m_fSoundIntensity > m_sQueueSample.m_fDistance) {
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nOffset = 0;
#ifdef THIS_IS_STUPID
goto AddSample;
@@ -3167,14 +3166,14 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = GunIndex++;
if (GunIndex > 58)
GunIndex = 53;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
continue;
#endif
}
- isHeli = false;
+ isHeli = FALSE;
}
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
#ifdef THIS_IS_STUPID
AddSample:
AddSampleToRequestedQueue();
@@ -3198,7 +3197,7 @@ AddSample:
}
#ifdef GTA_TRAIN
-bool
+bool8
cAudioManager::ProcessTrainNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 140.0f;
@@ -3208,7 +3207,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
float speedMultipler;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_fVelocityChange > 0.0f) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -3221,7 +3220,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nCounter = 32;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN);
m_sQueueSample.m_nLoopCount = 0;
@@ -3230,10 +3229,10 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3261,16 +3260,16 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
// }
//}
}
- return true;
+ return TRUE;
}
#endif
-bool
+bool8
cAudioManager::ProcessBoatEngine(cVehicleParams& params)
{
CBoat *boat;
float padRelativeAccerate;
- bool isV12 = false;
+ bool8 isV12 = FALSE;
static int32 LastFreq = 2000;
static int8 LastVol = 0;
@@ -3279,7 +3278,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
if (params.m_fDistance < SQR(intensity)) {
boat = (CBoat *)params.m_pVehicle;
if(boat->GetStatus() == STATUS_WRECKED)
- return true;
+ return TRUE;
float freqModificator;
float volModificator;
@@ -3301,7 +3300,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
case MI_JETMAX:
freqModificator = 6000.0f;
volModificator = 60.0f;
- isV12 = true;
+ isV12 = TRUE;
BaseFreq = 9000;
BaseVol = 20;
break;
@@ -3319,18 +3318,18 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
BaseFreq = 1782;
break;
default:
- return true;
+ return TRUE;
}
- bool bIsPlayerVeh;
+ bool8 bIsPlayerVeh;
if(FindPlayerVehicle() == params.m_pVehicle) {
float padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
padRelativeAccerate = padAccelerate / 255.0f;
- bIsPlayerVeh = true;
+ bIsPlayerVeh = TRUE;
} else {
padRelativeAccerate = Max(params.m_pVehicle->m_fGasPedal, params.m_pVehicle->m_fBrakePedal);
- bIsPlayerVeh = false;
+ bIsPlayerVeh = FALSE;
}
int Freq = BaseFreq + (padRelativeAccerate * freqModificator);
@@ -3368,7 +3367,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
else
m_sQueueSample.m_nSampleIndex = SFX_BOAT_CRUISER_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = Vol;
@@ -3376,10 +3375,10 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3393,7 +3392,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = 80;
@@ -3401,10 +3400,10 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3412,12 +3411,12 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
LastFreq = Freq;
LastVol = Vol;
}
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool
+bool8
cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
{
float velocityChange;
@@ -3425,11 +3424,11 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
float multiplier;
if (params.m_fDistance > SQR(50))
- return false;
+ return FALSE;
velocityChange = Abs(params.m_fVelocityChange);
if (velocityChange <= 0.0005f && ((CBoat*)params.m_pVehicle)->bBoatInWater)
- return true;
+ return TRUE;
velocityChange = Min(0.75f, velocityChange);
multiplier = (velocityChange - 0.0005f) / (1499.0f / 2000.0f);
@@ -3440,7 +3439,7 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
m_sQueueSample.m_nCounter = 38;
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = (6050.f * multiplier) + 16000;
m_sQueueSample.m_nLoopCount = 0;
@@ -3449,14 +3448,14 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 6;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
void
@@ -3476,12 +3475,12 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
float propellerSpeed;
float freqModifier; //may be relate to angle with horison
float cameraAngle;
- bool distanceCalculatedOld;
+ bool8 distanceCalculatedOld;
float distanceOld;
CVector vecPosOld;
float volumeModifier;//TODO find better name
- bool hunterBool;
+ bool8 hunterBool;
static uint32 freqFrontPrev = 14287;
static uint32 freqPropellerPrev = 7143;
@@ -3489,7 +3488,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
boat = nil;
automobile = nil;
- hunterBool = false;
+ hunterBool = FALSE;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
return;
@@ -3545,7 +3544,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
}
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3553,10 +3552,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3573,7 +3572,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
if (playerVeh == veh && (accelerateState > 0 || brakeState > 0) && freq < 1300)//unnesesary freqModifier alredy <= 1300
freq = 1300;
if (veh->m_modelIndex == MI_HUNTER)
- hunterBool = true;
+ hunterBool = TRUE;
}
@@ -3586,7 +3585,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_HELI_APACHE_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000 + freq;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3594,10 +3593,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
} else if (boat != nil) {
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO1;
@@ -3612,7 +3611,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqFrontPrev, 197);
freqFrontPrev = m_sQueueSample.m_nFrequency;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3620,16 +3619,16 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
} else {
m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_MAI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3637,10 +3636,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3674,7 +3673,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
}
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3682,10 +3681,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
@@ -3708,7 +3707,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
}
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nCounter = 12;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
@@ -3716,10 +3715,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 30;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3744,7 +3743,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO4;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 12;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = propellerSpeed * 100.0f;
@@ -3752,10 +3751,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_SEAPLANE_PRO4);
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
m_sQueueSample.m_fSoundIntensity = 20.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3770,7 +3769,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
else if (params.m_VehicleType == VEHICLE_TYPE_HELI)
m_sQueueSample.m_vecPos = CVector(0.0f, -10.0f, 0.0f); //this is from android, but for real it's not used
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
if (params.m_fDistance < SQR(27.0f)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -3779,7 +3778,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = hunterBool ? SFX_HELI_APACHE_3 : SFX_CAR_HELI_REA;
m_sQueueSample.m_nBankIndex = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000;
m_sQueueSample.m_nLoopCount = 0;
@@ -3788,10 +3787,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 27.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3809,7 +3808,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
CAutomobile* automobile;
CBike* bike;
- bool wheelBurst;
+ bool8 wheelBurst;
uint8 emittingVol;
float modifier;
@@ -3820,19 +3819,19 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
switch (params.m_VehicleType) {
case VEHICLE_TYPE_CAR:
automobile = (CAutomobile*)params.m_pVehicle;
- wheelBurst = false;
+ wheelBurst = FALSE;
for (int i = 0; i < 4; i++)
if (automobile->Damage.GetWheelStatus(i) == WHEEL_STATUS_BURST && automobile->m_aWheelTimer[i] > 0.0f)
- wheelBurst = true;
+ wheelBurst = TRUE;
if (!wheelBurst)
return;
break;
case VEHICLE_TYPE_BIKE:
bike = (CBike*)params.m_pVehicle;
- wheelBurst = false;
+ wheelBurst = FALSE;
for(int i = 0; i < 2; i++)
if (bike->m_wheelStatus[i] == WHEEL_STATUS_BURST && bike->m_aWheelTimer[i] > 0.0f)
- wheelBurst = true;
+ wheelBurst = TRUE;
if (!wheelBurst)
return;
break;
@@ -3847,7 +3846,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
if (m_sQueueSample.m_nVolume) {
m_sQueueSample.m_nCounter = 95;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BURST_L;
m_sQueueSample.m_nFrequency = (5500.0f * modifier) + 8000;
@@ -3857,10 +3856,10 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_TYRE_BURST_L);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -3999,12 +3998,12 @@ cAudioManager::ProcessJumboDecel(CPlane *plane)
}
}
-bool
+bool8
cAudioManager::SetupJumboTaxiSound(uint8 vol)
{
const float SOUND_INTENSITY = 180.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
uint8 emittingVol = (vol / 2) + ((vol / 2) * m_sQueueSample.m_fDistance / SOUND_INTENSITY);
@@ -4016,7 +4015,7 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = GetJumboTaxiFreq();
m_sQueueSample.m_nLoopCount = 0;
@@ -4025,22 +4024,22 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
{
const float SOUND_INTENSITY = 170.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
@@ -4048,7 +4047,7 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_WHINE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -4057,21 +4056,21 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
{
const float SOUND_INTENSITY = 180.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
uint8 emittingVol = vol - gJumboVolOffsetPercentage / 100;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
@@ -4079,7 +4078,7 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
m_sQueueSample.m_nCounter = 3;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_ENGINE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -4088,20 +4087,20 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboFlySound(uint8 emittingVol)
{
const float SOUND_INTENSITY = 440.0f;
- if(m_sQueueSample.m_fDistance >= SOUND_INTENSITY) return false;
+ if(m_sQueueSample.m_fDistance >= SOUND_INTENSITY) return FALSE;
int32 vol = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
m_sQueueSample.m_nVolume = vol;
@@ -4109,7 +4108,7 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
m_sQueueSample.m_nLoopCount = 0;
@@ -4118,21 +4117,21 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false; // todo port fix to re3
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE; // todo port fix to re3
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
{
const float SOUND_INTENSITY = 240.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
@@ -4140,7 +4139,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nCounter = 5;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_RUMBLE);
m_sQueueSample.m_nLoopCount = 0;
@@ -4149,11 +4148,11 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 12;
m_sQueueSample.m_nOffset = 0;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
m_sQueueSample.m_nCounter = 6;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
@@ -4161,7 +4160,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nOffset = MAX_VOLUME;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
int32
@@ -4199,7 +4198,7 @@ cAudioManager::ProcessPed(CPhysical *ped)
m_sQueueSample.m_vecPos = ped->GetPosition();
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_pPed = (CPed *)ped;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
ProcessPedOneShots(params);
@@ -4213,9 +4212,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
CPed *ped = params.m_pPed;
- bool narrowSoundRange;
+ bool8 narrowSoundRange;
int16 sound;
- bool stereo;
+ bool8 stereo;
CWeapon *weapon;
float maxDist = 0.f; // uninitialized variable
@@ -4224,9 +4223,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
weapon = params.m_pPed->GetWeapon();
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- stereo = false;
- narrowSoundRange = false;
- m_sQueueSample.m_bRequireReflection = false;
+ stereo = FALSE;
+ narrowSoundRange = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
sound = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
switch (sound) {
case SOUND_STEP_START:
@@ -4303,9 +4302,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_FALL_LAND:
case SOUND_FALL_COLLAPSE:
@@ -4331,9 +4330,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_FIGHT_37:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
@@ -4419,7 +4418,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
++iSound;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4430,9 +4429,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_WEAPON_BAT_ATTACK:
case SOUND_WEAPON_KNIFE_ATTACK:
@@ -4465,7 +4464,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
- stereo = true;
+ stereo = TRUE;
break;
}
}
@@ -4476,7 +4475,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
}
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4486,9 +4485,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 20 + 100;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_WEAPON_CHAINSAW_IDLE:
@@ -4511,8 +4510,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_IDLE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_CHAINSAW_IDLE);
m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
break;
case SOUND_WEAPON_CHAINSAW_ATTACK:
@@ -4535,8 +4534,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
break;
case SOUND_WEAPON_CHAINSAW_MADECONTACT:
@@ -4561,8 +4560,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_CAR_CHAINSAW_ATTACK);
m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
break;
case SOUND_WEAPON_SHOT_FIRED:
@@ -4575,7 +4574,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 1;
@@ -4587,16 +4586,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[0] % 20 + 80;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_COLT45:
m_sQueueSample.m_nSampleIndex = SFX_COLT45_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4608,16 +4607,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[1] % 10 + 90;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_PYTHON:
m_sQueueSample.m_nSampleIndex = SFX_PYTHON_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PYTHON_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4629,17 +4628,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 127;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SHOTGUN:
case WEAPONTYPE_STUBBY_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4651,16 +4650,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 10 + 100;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SPAS12_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_SPAS12_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SPAS12_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4672,16 +4671,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 10 + 100;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_TEC9:
m_sQueueSample.m_nSampleIndex = SFX_TEC_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 17000;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4692,16 +4691,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_UZI:
case WEAPONTYPE_MINIGUN:
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4713,15 +4712,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SILENCED_INGRAM:
m_sQueueSample.m_nSampleIndex = SFX_TEC_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 34000;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4732,15 +4731,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_MP5:
m_sQueueSample.m_nSampleIndex = SFX_MP5_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_MP5_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4752,15 +4751,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_M4:
m_sQueueSample.m_nSampleIndex = SFX_RUGER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 43150;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -4771,15 +4770,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 90;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_RUGER:
m_sQueueSample.m_nSampleIndex = SFX_RUGER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RUGER_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4791,16 +4790,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[3] % 15 + 90;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_SNIPERRIFLE:
case WEAPONTYPE_LASERSCOPE:
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
if (weapon->m_eWeaponType == WEAPONTYPE_SNIPERRIFLE)
m_sQueueSample.m_nFrequency = 25472;
else
@@ -4815,10 +4814,10 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[4] % 10 + 110;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
+ stereo = TRUE;
break;
case WEAPONTYPE_FLAMETHROWER:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_LEFT;
@@ -4834,17 +4833,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nEmittingVolume = 90;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 6;
- stereo = true;
+ stereo = TRUE;
break;
case WEAPONTYPE_M60:
case WEAPONTYPE_HELICANNON:
m_sQueueSample.m_nSampleIndex = SFX_M60_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M60_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -4856,9 +4855,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 127;
m_sQueueSample.m_nEmittingVolume = 127;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- stereo = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ stereo = TRUE;
break;
default:
continue;
@@ -4903,7 +4902,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
emittingVol = 75;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nReleasingVolumeModificator = 5;
@@ -4914,9 +4913,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = 75;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_WEAPON_AK47_BULLET_ECHO:
{
@@ -4948,7 +4947,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
switch (weaponType) {
case WEAPONTYPE_TEC9:
m_sQueueSample.m_nFrequency = 13000;
@@ -4979,9 +4978,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[4] % 10 + 80;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_WEAPON_FLAMETHROWER_FIRE:
@@ -4999,14 +4998,14 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 70;
m_sQueueSample.m_nEmittingVolume = 70;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
break;
case SOUND_WEAPON_HIT_PED:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_PED;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BULLET_PED);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
m_sQueueSample.m_nReleasingVolumeModificator = 7;
@@ -5018,8 +5017,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[0] % 20 + 90;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
break;
case SOUND_SPLASH:
if (m_FrameCounter <= iSplashFrame)
@@ -5028,7 +5027,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -5039,9 +5038,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
emittingVol = m_anRandomTable[2] % 30 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_MELEE_ATTACK_START:
{
@@ -5061,7 +5060,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
@@ -5076,9 +5075,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_SKATING:
@@ -5089,7 +5088,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[3] & 1) + SFX_SKATE_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound;
- stereo = true;
+ stereo = TRUE;
++iSound;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 1000 + 17000;
if (param2 == 0)
@@ -5103,9 +5102,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = (m_anRandomTable[2] % 20 + 70) * param1 / 127;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
}
case SOUND_WEAPON_MINIGUN_ATTACK:
@@ -5122,8 +5121,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_LEFT);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_MINIGUN_FIRE_LEFT);
m_sQueueSample.m_nEmittingVolume = 127;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
break;
case SOUND_WEAPON_MINIGUN_2:
@@ -5140,8 +5139,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_MINIGUN_FIRE_RIGHT);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_MINIGUN_FIRE_RIGHT);
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
break;
case SOUND_WEAPON_MINIGUN_3:
@@ -5158,9 +5157,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 127;
m_sQueueSample.m_nEmittingVolume = 127;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SOUND_SHIRT_WIND_FLAP:
if (params.m_pPed->IsPlayer() && params.m_pPed->m_pMyVehicle) {
@@ -5201,8 +5200,8 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
}
}
@@ -5220,13 +5219,13 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
if (m_sQueueSample.m_nVolume != 0) {
if (stereo) {
if (m_sQueueSample.m_fDistance < 0.2f * m_sQueueSample.m_fSoundIntensity) {
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nOffset = 0;
} else {
- stereo = false;
+ stereo = FALSE;
}
}
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
if (stereo) {
m_sQueueSample.m_nOffset = 127;
@@ -5247,7 +5246,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
void
-cAudioManager::SetPedTalkingStatus(CPed *ped, uint8 status)
+cAudioManager::SetPedTalkingStatus(CPed *ped, bool8 status)
{
if (ped != nil)
ped->m_canTalk = status;
@@ -5275,12 +5274,12 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
if(ped != nil) {
if(!ped->m_canTalk) return;
- m_bGenericSfx = false;
+ m_bGenericSfx = FALSE;
pedComment.m_nSampleIndex = GetPedCommentSfx(ped, sound);
if(pedComment.m_nSampleIndex == NO_SAMPLE) return;
soundIntensity = 40.0f;
} else {
- m_bGenericSfx = true;
+ m_bGenericSfx = TRUE;
switch(sound) {
case SOUND_PED_HELI_PLAYER_FOUND:
soundIntensity = 400.0f;
@@ -7821,7 +7820,7 @@ cAudioManager::GetGenericMaleTalkSfx(CPed *ped, int16 sound)
{
uint32 sfx;
- m_bGenericSfx = true;
+ m_bGenericSfx = TRUE;
switch(sound) {
case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_MALE_DEATH_01, 28); break;
case SOUND_PED_BULLET_HIT:
@@ -7886,7 +7885,7 @@ cPedComments::Process()
uint32 sampleIndex;
uint8 actualUsedBank;
tPedComment *comment;
- bool prevUsed = false;
+ bool8 prevUsed = FALSE;
static uint8 counter = 0;
static int32 prevSamples[10];
@@ -7897,7 +7896,7 @@ cPedComments::Process()
if(m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nSampleIndex ==
prevSamples[(counter + 1 + i) % ARRAY_SIZE(prevSamples)]) {
m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nProcess = -1;
- prevUsed = true;
+ prevUsed = TRUE;
break;
}
}
@@ -7922,14 +7921,14 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
AudioManager.m_sQueueSample.m_fSoundIntensity = 40.0f;
- AudioManager.m_sQueueSample.m_bReleasingSoundFlag = true;
+ AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE;
AudioManager.m_sQueueSample.m_vecPos = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos;
- AudioManager.m_sQueueSample.m_bReverbFlag = true;
- AudioManager.m_sQueueSample.m_bRequireReflection = true;
- AudioManager.m_sQueueSample.m_bIs2D = false;
+ AudioManager.m_sQueueSample.m_bReverbFlag = TRUE;
+ AudioManager.m_sQueueSample.m_bRequireReflection = TRUE;
+ AudioManager.m_sQueueSample.m_bIs2D = FALSE;
#ifdef FIX_BUGS
if (sampleIndex >= SFX_TONI_ANGRY_BUSTED_01 && sampleIndex <= SFX_TONI_WISECRACKING_SHOOT_26) { // check if player sfx
- AudioManager.m_sQueueSample.m_bIs2D = true;
+ AudioManager.m_sQueueSample.m_bIs2D = TRUE;
AudioManager.m_sQueueSample.m_nOffset = 63;
}
#endif // FIX_BUGS
@@ -7942,7 +7941,7 @@ cPedComments::Process()
AudioManager.AddSampleToRequestedQueue();
#if defined(GTA_PC) && !defined(FIX_BUGS)
m_nDelayTimer = CTimer::GetTimeInMilliseconds();
- m_bDelay = true;
+ m_bDelay = TRUE;
#endif
}
}
@@ -7970,7 +7969,7 @@ cPedComments::Process()
m_nCommentsInBank[actualUsedBank] = 0;
#if defined(GTA_PC) && !defined(FIX_BUGS)
if(m_bDelay)
- if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = false;
+ if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = FALSE;
#endif
}
@@ -8000,7 +7999,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case EXPLOSION_MOLOTOV:
m_sQueueSample.m_fSoundIntensity = 150.0f;
@@ -8008,7 +8007,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
break;
case EXPLOSION_MINE:
case EXPLOSION_HELI_BOMB:
@@ -8017,7 +8016,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 12347;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
default:
m_sQueueSample.m_fSoundIntensity = 200.0f;
@@ -8037,13 +8036,13 @@ cAudioManager::ProcessExplosions(int32 explosion)
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -8104,19 +8103,19 @@ cAudioManager::ProcessFires(int32)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nReleasingVolumeDivider = 10;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
if (gFireManager.m_aFires[i].m_bExtinguishedWithWater) {
- gFireManager.m_aFires[i].m_bExtinguishedWithWater = false;
+ gFireManager.m_aFires[i].m_bExtinguishedWithWater = FALSE;
emittingVol = 100.0f * gFireManager.m_aFires[i].m_fWaterExtinguishCountdown;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
@@ -8128,14 +8127,14 @@ cAudioManager::ProcessFires(int32)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nReleasingVolumeDivider = 10;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8164,14 +8163,14 @@ cAudioManager::ProcessWaterCannon(int32)
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = 50;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8244,14 +8243,14 @@ cAudioManager::ProcessEscalators()
m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_nCounter = i;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_BOAT_V12_LOOP);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_BOAT_V12_LOOP);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8296,8 +8295,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
emittingVolume = 60;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SCRIPT_SOUND_GARAGE_DOOR_CLUNK:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -8308,8 +8307,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 4;
emittingVolume = 60;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_HIT:
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
@@ -8322,7 +8321,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
m_sQueueSample.m_nReleasingVolumeModificator = 9;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 90;
break;
case SCRIPT_SOUND_WILLIE_CARD_SWIPE:
@@ -8333,8 +8332,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = 20159;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
break;
case SCRIPT_SOUND_MALE_AMBULANCE_OUCH:
{
@@ -8358,8 +8357,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_HORN_JEEP); // BUG?
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bIs2D = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
break;
//case SCRIPT_SOUND_PAYPHONE_RINGING:
// m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -8380,7 +8379,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_GLASS_BREAK_S:
m_sQueueSample.m_fSoundIntensity = 60.0f;
@@ -8390,7 +8389,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_GLASS_CRACK:
m_sQueueSample.m_fSoundIntensity = 60.0f;
@@ -8400,8 +8399,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
break;
case SCRIPT_SOUND_GLASS_LIGHT_BREAK:
m_sQueueSample.m_fSoundIntensity = 55.0f;
@@ -8410,7 +8409,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 19000;
m_sQueueSample.m_nReleasingVolumeModificator = 9;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = RandomDisplacement(11) + 25;
break;
case SCRIPT_SOUND_BOX_DESTROYED_1:
@@ -8420,8 +8419,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_BOX_DESTROYED_2:
@@ -8431,8 +8430,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_METAL_COLLISION:
@@ -8443,8 +8442,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVolume = m_anRandomTable[2] % 30 + 70;
break;
case SCRIPT_SOUND_TIRE_COLLISION:
@@ -8455,8 +8454,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
case SCRIPT_SOUND_HIT_BALL:
@@ -8467,8 +8466,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
case SCRIPT_SOUND_GUNSHELL_DROP:
@@ -8504,7 +8503,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_fSoundIntensity = 20.0f;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
case SCRIPT_SOUND_GUNSHELL_DROP_SOFT:
@@ -8514,7 +8513,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_fSoundIntensity = 20.0f;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
default:
@@ -8528,11 +8527,11 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -8554,7 +8553,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP:
case SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP:
@@ -8566,7 +8565,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_SNORING_LOOP:
m_sQueueSample.m_fSoundIntensity = 6.0f;
@@ -8577,7 +8576,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 6;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP:
m_sQueueSample.m_fSoundIntensity = 40.0f;
@@ -8588,7 +8587,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_1:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_1;
@@ -8599,7 +8598,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_2:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_2;
@@ -8610,7 +8609,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_3:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_3;
@@ -8621,7 +8620,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_4:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_4;
@@ -8632,7 +8631,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_MALIBU_1:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return;
@@ -8645,7 +8644,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_MALIBU_2:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return;
@@ -8658,7 +8657,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_MALIBU_3:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_MALIBU_AMBIENT) return;
@@ -8671,7 +8670,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_1:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return;
@@ -8684,7 +8683,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_2:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return;
@@ -8697,7 +8696,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_3:
if(MusicManager.m_nPlayingTrack == STREAMED_SOUND_STRIPCLUB_AMBIENT) return;
@@ -8710,7 +8709,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_CHURCH:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_CHURCH;
@@ -8721,7 +8720,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_WATERFALL:
emittingVolume = 30;
@@ -8732,7 +8731,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nReleasingVolumeDivider = 9;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
default: return;
}
@@ -8743,14 +8742,14 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
m_sQueueSample.m_nEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8788,14 +8787,14 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nOffset = (m_anRandomTable[2] & 15) + 55;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
if (CWeather::Rain > 0.0f && (!CCullZones::CamNoRain() || !CCullZones::PlayerNoRain())) {
@@ -8806,15 +8805,15 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 30;
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
x = 0.0f;
@@ -8831,15 +8830,15 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
CObject::fDistToNearestTree = 999999.9f;
}
@@ -8848,11 +8847,11 @@ cAudioManager::ProcessWeather(int32 id)
void
cAudioManager::ProcessFrontEnd()
{
- bool stereo;
- bool processedPickup;
- bool processedMission;
- bool staticFreq;
- bool center;
+ bool8 stereo;
+ bool8 processedPickup;
+ bool8 processedMission;
+ bool8 staticFreq;
+ bool8 center;
int16 sample;
static uint8 iSound = 0;
@@ -8861,11 +8860,11 @@ cAudioManager::ProcessFrontEnd()
static uint32 radioDial = SFX_RADIO_DIAL_1;
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- staticFreq = false;
- processedPickup = false;
- center = false;
- processedMission = false;
- stereo = false;
+ staticFreq = FALSE;
+ processedPickup = FALSE;
+ center = FALSE;
+ processedMission = FALSE;
+ stereo = FALSE;
switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) {
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE;
@@ -8877,9 +8876,9 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_BAD_VEHICLE:
case SOUND_GARAGE_BOMB_ALREADY_SET:
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
- stereo = true;
- staticFreq = true;
- center = true;
+ stereo = TRUE;
+ staticFreq = TRUE;
+ center = TRUE;
break;
case SOUND_GARAGE_OPENING:
case SOUND_71: //case SOUND_41:
@@ -8887,8 +8886,8 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_VEHICLE_ACCEPTED:
case SOUND_EVIDENCE_PICKUP:
case SOUND_UNLOAD_GOLD:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
break;
case SOUND_GARAGE_BOMB1_SET:
@@ -8896,60 +8895,60 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_BOMB3_SET:
case SOUND_PICKUP_WEAPON_BOUGHT:
case SOUND_PICKUP_WEAPON:
- center = true;
- processedPickup = true;
+ center = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_PICKUP_HEALTH:
case SOUND_81: //case SOUND_4B:
case SOUND_PICKUP_ADRENALINE:
case SOUND_PICKUP_ARMOUR:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
break;
case SOUND_80:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
- center = true;
- staticFreq = true;
+ center = TRUE;
+ staticFreq = TRUE;
break;
case SOUND_PICKUP_BONUS:
case SOUND_FRONTEND_MENU_STARTING:
case SOUND_HUD:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_FE_INFO_LEFT;
- center = true;
+ center = TRUE;
break;
case SOUND_PICKUP_MONEY:
- stereo = true;
- processedPickup = true;
+ stereo = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
break;
case SOUND_PICKUP_HIDDEN_PACKAGE:
case SOUND_PICKUP_PACMAN_PILL:
case SOUND_PICKUP_PACMAN_PACKAGE:
case SOUND_PICKUP_FLOAT_PACKAGE:
- center = true;
- processedPickup = true;
+ center = TRUE;
+ processedPickup = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_RACE_START_3:
case SOUND_RACE_START_2:
case SOUND_RACE_START_1:
case SOUND_PART_MISSION_COMPLETE:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
- processedMission = true;
- center = true;
+ processedMission = TRUE;
+ center = TRUE;
break;
case SOUND_RACE_START_GO:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_GO_LEFT;
- center = true;
+ center = TRUE;
break;
case SOUND_CLOCK_TICK:
m_sQueueSample.m_nSampleIndex = SFX_TIMER;
@@ -8987,7 +8986,7 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nSampleIndex = SFX_FE_BACK;
break;
case SOUND_FRONTEND_FAIL:
- stereo = true;
+ stereo = TRUE;
m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT;
break;
case SOUND_FRONTEND_AUDIO_TEST:
@@ -9026,10 +9025,10 @@ cAudioManager::ProcessFrontEnd()
// m_sQueueSample.m_nVolume = (CWeather::Wind - 1.0f) * m_sQueueSample.m_nVolume;
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nBankIndex = SFX_BANK_FRONT_END_MENU;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -9052,8 +9051,8 @@ cAudioManager::ProcessFrontEnd()
}
m_sQueueSample.m_nOffset = 63;
}
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
if (stereo) {
++m_sQueueSample.m_nSampleIndex;
@@ -9076,7 +9075,7 @@ cAudioManager::ProcessCrane()
{
CCrane *crane = (CCrane *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity;
float distSquared;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
static const int intensity = 80;
if (crane) {
@@ -9091,7 +9090,7 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_CRANE_MAGNET;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = 6000;
m_sQueueSample.m_nLoopCount = 0;
@@ -9100,10 +9099,10 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
if (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents) {
@@ -9111,9 +9110,9 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nSampleIndex = SFX_COL_CAR_2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COL_CAR_2);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -9167,14 +9166,14 @@ cAudioManager::ProcessProjectiles()
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = i;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -9192,7 +9191,7 @@ cAudioManager::ProcessGarages()
uint32 sampleIndex;
uint8 j;
float distSquared;
- bool distCalculated;
+ bool8 distCalculated;
static uint8 iSound = 32;
@@ -9203,7 +9202,7 @@ cAudioManager::ProcessGarages()
if (entity == nil)
continue;
m_sQueueSample.m_vecPos = entity->GetPosition();
- distCalculated = false;
+ distCalculated = FALSE;
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
if (distSquared < SQR(SOUND_INTENSITY)) {
state = CGarages::aGarages[i].m_eGarageState;
@@ -9223,7 +9222,7 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) / 2;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nCounter = iSound++;
if (iSound < 32)
iSound = 32;
@@ -9235,7 +9234,7 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
}
} else {
m_sQueueSample.m_nSampleIndex = SFX_GARAGE_DOOR_LOOP;
@@ -9244,19 +9243,19 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nEmittingVolume = 90;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
break;
@@ -9285,16 +9284,16 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nEmittingVolume = 60;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_nCounter = iSound++;
if (iSound < 32)
iSound = 32;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bRequireReflection = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -9312,7 +9311,7 @@ cAudioManager::ProcessFireHydrant()
const float SOUND_INTENSITY = 35;
float distSquared;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
m_sQueueSample.m_vecPos = ((CEntity *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition();
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
@@ -9326,13 +9325,13 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nEmittingVolume = 40;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
AddSampleToRequestedQueue();
@@ -9347,7 +9346,7 @@ void
cAudioManager::ProcessBridge()
{
float dist;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
if (CBridge::pLiftRoad) {
m_sQueueSample.m_vecPos = CBridge::pLiftRoad->GetPosition();
@@ -9383,7 +9382,7 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_EXTRAS;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);
m_sQueueSample.m_nLoopCount = 0;
@@ -9392,10 +9391,10 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 450.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}*/
@@ -9410,7 +9409,7 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE; // todo check sfx name
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = 5500;
m_sQueueSample.m_nLoopCount = 0;
@@ -9419,9 +9418,9 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = bridgeIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverbFlag = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -9445,7 +9444,7 @@ cAudioManager::ProcessBridgeOneShots()
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 1;
@@ -9454,9 +9453,9 @@ cAudioManager::ProcessBridgeOneShots()
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = bridgeIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -9465,7 +9464,7 @@ cAudioManager::ProcessBridgeOneShots()
#endif
#pragma region MISSION_AUDIO
-bool g_bMissionAudioLoadFailed[MISSION_AUDIO_SLOTS];
+bool8 g_bMissionAudioLoadFailed[MISSION_AUDIO_SLOTS];
struct MissionAudioData {
const char *m_pName;
@@ -11354,10 +11353,10 @@ FindMissionAudioSfx(const char *name)
return NO_SAMPLE;
}
-bool
+bool8
cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
{
- return false;
+ return FALSE;
}
// LCS: mission audio turns from streamed to sampled
@@ -11371,13 +11370,13 @@ cAudioManager::PreloadMissionAudio(uint8 slot, Const char *name)
m_sMissionAudio.m_nSampleIndex[slot] = missionAudioSfx;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[slot] = false;
+ m_sMissionAudio.m_bIsPlaying[slot] = FALSE;
//m_sMissionAudio.m_nMissionAudioCounter[slot] = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
m_sMissionAudio.m_nMissionAudioCounter[slot] = m_nTimeSpent * SampleManager.GetSampleLength(missionAudioSfx) / SampleManager.GetSampleBaseFrequency(missionAudioSfx);
m_sMissionAudio.m_nMissionAudioCounter[slot] *= 4;
- m_sMissionAudio.m_bIsPlayed[slot] = false;
- m_sMissionAudio.m_bPredefinedProperties[slot] = true;
- g_bMissionAudioLoadFailed[slot] = false;
+ m_sMissionAudio.m_bIsPlayed[slot] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE;
+ g_bMissionAudioLoadFailed[slot] = FALSE;
}
}
}
@@ -11395,7 +11394,7 @@ void
cAudioManager::SetMissionAudioLocation(uint8 slot, float x, float y, float z)
{
if (m_bIsInitialised && slot < MISSION_AUDIO_SLOTS) {
- m_sMissionAudio.m_bPredefinedProperties[slot] = false;
+ m_sMissionAudio.m_bPredefinedProperties[slot] = FALSE;
m_sMissionAudio.m_vecPos[slot] = CVector(x, y, z);
}
}
@@ -11405,25 +11404,25 @@ cAudioManager::PlayLoadedMissionAudio(uint8 slot)
{
if (m_bIsInitialised && slot < MISSION_AUDIO_SLOTS && m_sMissionAudio.m_nSampleIndex[slot] != NO_SAMPLE && m_sMissionAudio.m_nLoadingStatus[slot] == LOADING_STATUS_LOADED &&
m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_STOPPED)
- m_sMissionAudio.m_bIsPlayed[slot] = true;
+ m_sMissionAudio.m_bIsPlayed[slot] = TRUE;
}
-bool
+bool8
cAudioManager::ShouldDuckMissionAudio(uint8 slot) const
{
//if (IsMissionAudioSamplePlaying(slot))
// return m_sMissionAudio.m_nSampleIndex[slot] != STREAMED_SOUND_MISSION_ROK2_01;
- return false;
+ return FALSE;
}
-bool
+bool8
cAudioManager::IsMissionAudioSamplePlaying(uint8 slot) const
{
if (m_bIsInitialised) {
if (slot < MISSION_AUDIO_SLOTS)
return m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_PLAYING;
else
- return true;
+ return TRUE;
} else {
static int32 cPretendFrame[MISSION_AUDIO_SLOTS] = { 1, 1 };
@@ -11431,14 +11430,14 @@ cAudioManager::IsMissionAudioSamplePlaying(uint8 slot) const
}
}
-bool
+bool8
cAudioManager::IsMissionAudioSampleFinished(uint8 slot)
{
if (m_bIsInitialised) {
if (slot < MISSION_AUDIO_SLOTS)
return m_sMissionAudio.m_nPlayStatus[slot] == PLAY_STATUS_FINISHED;
else
- return true;
+ return TRUE;
}
static int32 cPretendFrame[MISSION_AUDIO_SLOTS] = { 1, 1 };
@@ -11453,11 +11452,11 @@ cAudioManager::ClearMissionAudio(uint8 slot)
m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying[slot] = false;
- m_sMissionAudio.m_bIsPlayed[slot] = false;
- m_sMissionAudio.m_bPredefinedProperties[slot] = true;
+ m_sMissionAudio.m_bIsPlaying[slot] = FALSE;
+ m_sMissionAudio.m_bIsPlayed[slot] = FALSE;
+ m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE;
m_sMissionAudio.m_nMissionAudioCounter[slot] = 0;
- m_sMissionAudio.m_bIsMobile[slot] = false;
+ m_sMissionAudio.m_bIsMobile[slot] = FALSE;
//SampleManager.StopStreamedFile(slot + 1);
SampleManager.StopChannel(slot + 29);
}
@@ -11619,7 +11618,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
break;
nCheckPlayingDelay[slot] = 0;
}
- m_sMissionAudio.m_bIsPlaying[slot] = true;
+ m_sMissionAudio.m_bIsPlaying[slot] = TRUE;
}
break;
default:
@@ -11629,7 +11628,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
case LOADING_STATUS_FAILED:
if (++nFramesUntilFailedLoad[slot] >= 120) {
nFramesForPretendPlaying[slot] = 0;
- g_bMissionAudioLoadFailed[slot] = true;
+ g_bMissionAudioLoadFailed[slot] = TRUE;
nFramesUntilFailedLoad[slot] = 0;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_LOADED;
}
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 f59c56b1..c6169ed3 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)
@@ -382,7 +382,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
@@ -399,17 +399,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
@@ -423,20 +423,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
@@ -465,25 +465,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)
#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
@@ -502,26 +502,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();
@@ -530,12 +530,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 e15bde94..6ffd7b54 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);
@@ -1347,7 +1347,7 @@ cMusicManager::DisplayRadioStationName()
#endif
}
-bool
+bool8
cMusicManager::UsesPoliceRadio(CVehicle *veh)
{
switch (veh->GetModelIndex())
@@ -1357,15 +1357,15 @@ 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_CABBIE) return false;
@@ -1377,10 +1377,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 bcdd4fff..f4c15bed 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
@@ -687,7 +687,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;
@@ -712,10 +712,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)
@@ -727,7 +727,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 c6ae5d46..8b8d2336 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -137,9 +137,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];
@@ -169,16 +169,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);
@@ -187,14 +187,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);
@@ -204,10 +204,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);
@@ -216,23 +216,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 1be56441..85b00f44 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];
@@ -533,7 +533,7 @@ cSampleManager::AutoDetect3DProviders()
return -1;
}
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
IShellLink* psl;
@@ -569,7 +569,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -579,15 +579,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];
@@ -639,10 +639,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
- bShortcut = false;
+ bShortcut = FALSE;
}
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
@@ -682,7 +682,7 @@ _FindMP3s(void)
{
_pMP3List->pLinkPath = NULL;
}
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -690,10 +690,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -717,11 +717,11 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
if ( filepathlen > MAX_PATH )
{
@@ -764,7 +764,7 @@ _FindMP3s(void)
pList = _pMP3List;
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -792,11 +792,11 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
}
}
@@ -908,7 +908,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -921,7 +921,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -932,10 +932,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -964,13 +964,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++ )
@@ -996,7 +996,7 @@ cSampleManager::Initialise(void)
curprovider = -1;
prevprovider = -1;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
usingEAX=0;
usingEAX3=0;
@@ -1021,7 +1021,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;
@@ -1062,24 +1062,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)
@@ -1129,7 +1129,7 @@ cSampleManager::Initialise(void)
{
OutputDebugString(AIL_last_error());
Terminate();
- return false;
+ return FALSE;
}
add_providers();
@@ -1159,9 +1159,9 @@ cSampleManager::Initialise(void)
}
else
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
Terminate();
- return false;
+ return FALSE;
}
}
*/
@@ -1204,7 +1204,7 @@ cSampleManager::Initialise(void)
AIL_close_stream(mp3Stream[0]);
mp3Stream[0] = NULL;
- bFileNotFound = false;
+ bFileNotFound = FALSE;
#ifdef AUDIO_CACHE
if (!CreateCache)
break;
@@ -1215,7 +1215,7 @@ cSampleManager::Initialise(void)
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
@@ -1250,11 +1250,11 @@ cSampleManager::Initialise(void)
mp3Stream[0] = NULL;
nStreamLength[i] = tatalms;
- bFileNotFound = false;
+ bFileNotFound = FALSE;
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}*/
@@ -1269,11 +1269,11 @@ cSampleManager::Initialise(void)
if ( FrontEndMenuManager.m_bQuitGameNoCD )
{
Terminate();
- return false;
+ return FALSE;
}
continue;
#else
- m_bInitialised = true;
+ m_bInitialised = TRUE;
#endif
}
@@ -1292,14 +1292,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);
@@ -1328,7 +1328,7 @@ cSampleManager::Initialise(void)
TRACE("providerset");
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
U32 n = 0;
@@ -1345,7 +1345,7 @@ cSampleManager::Initialise(void)
if ( n == m_nNumberOfProviders )
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1370,13 +1370,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);
}
@@ -1408,12 +1408,12 @@ cSampleManager::Initialise(void)
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
TRACE("end");
- return true;
+ return TRUE;
}
void
@@ -1462,10 +1462,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
@@ -1483,17 +1483,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)
}
@@ -1575,48 +1575,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;
@@ -1629,10 +1629,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32
@@ -1654,11 +1654,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() )
@@ -1667,7 +1667,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
@@ -1675,10 +1675,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;
@@ -1686,7 +1686,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1725,14 +1725,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;
@@ -1753,7 +1753,7 @@ cSampleManager::UpdateReverb(void)
fRatio = clamp(fRatio, 0.0f, 0.6f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
if ( usingEAX3 )
{
@@ -1775,13 +1775,13 @@ 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 )
{
@@ -1789,14 +1789,14 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- 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);
@@ -1809,10 +1809,10 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
}
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -1820,7 +1820,7 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1830,14 +1830,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);
@@ -1849,10 +1849,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
{
@@ -1868,10 +1868,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;
}
}
@@ -1966,7 +1966,7 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
void
cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -1974,7 +1974,7 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1994,7 +1994,7 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
void
cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2002,7 +2002,7 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2022,7 +2022,7 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n
void
cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2030,7 +2030,7 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2047,10 +2047,10 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
}
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2058,7 +2058,7 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2068,14 +2068,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;
}
}
@@ -2083,7 +2083,7 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
void
cSampleManager::StartChannel(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2091,7 +2091,7 @@ cSampleManager::StartChannel(uint32 nChannel)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2111,7 +2111,7 @@ cSampleManager::StartChannel(uint32 nChannel)
void
cSampleManager::StopChannel(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2119,7 +2119,7 @@ cSampleManager::StopChannel(uint32 nChannel)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2180,12 +2180,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);
}
}
@@ -2199,7 +2199,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
int i = 0;
@@ -2207,7 +2207,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] )
{
@@ -2243,12 +2243,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;
} else {
if ( e->pLinkPath != NULL )
@@ -2265,9 +2265,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
}
@@ -2300,14 +2300,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)
@@ -2325,9 +2325,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;
}
}
@@ -2352,12 +2352,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
@@ -2373,7 +2373,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
mp3Stream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
}
@@ -2411,7 +2411,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;
@@ -2452,7 +2452,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return 0;
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
if ( m_bInitialised )
@@ -2460,16 +2460,16 @@ 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)
{
SetUpDebugBanksInfo();
@@ -2478,7 +2478,7 @@ cSampleManager::InitialiseSampleBanks(void)
fpSampleDescHandle = fopen(SampleBankDescFilename, "rb");
if ( fpSampleDescHandle == NULL )
- return false;
+ return FALSE;
fpSampleDataHandle = fopen(SampleBankDataFilename, "rb");
if ( fpSampleDataHandle == NULL )
@@ -2486,7 +2486,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2513,7 +2513,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 d5159379..3a4203c0 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 =
@@ -265,11 +265,11 @@ release_existing()
DEV("release_existing()\n");
}
-static bool
+static bool8
set_new_provider(int index)
{
if ( curprovider == index )
- return true;
+ return TRUE;
curprovider = index;
@@ -301,7 +301,7 @@ set_new_provider(int index)
{
curprovider=-1;
release_existing();
- return false;
+ return FALSE;
}
alListenerf (AL_GAIN, 1.0f);
@@ -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 false;// track == STREAMED_SOUND_RADIO_KCHAT || track == STREAMED_SOUND_RADIO_VCPR || track == STREAMED_SOUND_RADIO_POLICE;
@@ -556,13 +556,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;
@@ -597,7 +597,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -607,31 +607,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
}
@@ -640,8 +640,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];
@@ -684,9 +684,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]);
@@ -726,7 +726,7 @@ _FindMP3s(void)
_pMP3List->pLinkPath = NULL;
}
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -734,10 +734,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -755,9 +755,9 @@ _FindMP3s(void)
{
OutputDebugString("Resolving Link");
OutputDebugString(filepath);
- bShortcut = true;
+ bShortcut = TRUE;
} else {
- bShortcut = false;
+ bShortcut = FALSE;
if (filepathlen > MAX_PATH) {
continue;
}
@@ -796,7 +796,7 @@ _FindMP3s(void)
pList = _pMP3List;
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -818,9 +818,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]);
@@ -932,7 +932,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -945,7 +945,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -956,10 +956,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -985,11 +985,11 @@ void cSampleManager::ReacquireDigitalHandle(void)
}
}
-bool
+bool8
cSampleManager::Initialise(void)
{
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
SetUpDebugBanksInfo();
EFXInit();
CStream::Initialise();
@@ -1034,7 +1034,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;
@@ -1123,7 +1123,7 @@ cSampleManager::Initialise(void)
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (uintptr)malloc(nSampleBankSize[SFX_BANK_0]);
@@ -1132,7 +1132,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);
@@ -1151,7 +1151,7 @@ cSampleManager::Initialise(void)
}
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
if ( defaultProvider >= 0 && defaultProvider < m_nNumberOfProviders )
{
@@ -1160,7 +1160,7 @@ cSampleManager::Initialise(void)
else
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1183,13 +1183,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);
}
@@ -1221,10 +1221,10 @@ cSampleManager::Initialise(void)
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
- return true;
+ return TRUE;
}
void
@@ -1258,12 +1258,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)
@@ -1320,24 +1320,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
@@ -1356,14 +1356,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
@@ -1371,10 +1371,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);
@@ -1382,7 +1382,7 @@ cSampleManager::IsSampleBankLoaded(uint8 nBank)
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
@@ -1397,10 +1397,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
@@ -1423,13 +1423,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() )
@@ -1438,7 +1438,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
@@ -1453,17 +1453,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;
@@ -1471,7 +1471,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1514,13 +1514,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;
@@ -1541,7 +1541,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 )
@@ -1578,11 +1578,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 );
@@ -1592,7 +1592,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);
@@ -1600,7 +1600,7 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
}
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
@@ -1610,14 +1610,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);
@@ -1635,10 +1635,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
@@ -1741,7 +1741,7 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
aChannel[nChannel].SetLoopCount(nLoopCount);
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
@@ -1813,7 +1813,7 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
@@ -1821,7 +1821,7 @@ cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
if ( stream )
{
- stream->SetPause(nPauseFlag != 0);
+ stream->SetPause(nPauseFlag != FALSE);
}
}
@@ -1841,7 +1841,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
int i = 0;
@@ -1849,7 +1849,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] )
{
@@ -1894,18 +1894,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 {
@@ -1924,8 +1924,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;
@@ -1970,18 +1970,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)
@@ -1996,9 +1996,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;
@@ -2036,18 +2036,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
@@ -2063,7 +2063,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
aStream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
@@ -2097,7 +2097,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 );
@@ -2140,7 +2140,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return nStreamLength[nStream];
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
@@ -2150,10 +2150,10 @@ cSampleManager::IsStreamPlaying(uint8 nStream)
if ( stream )
{
if ( stream->IsPlaying() )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -2174,14 +2174,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 )
@@ -2189,7 +2189,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2221,7 +2221,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