summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioCollision.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/AudioCollision.cpp')
-rw-r--r--src/audio/AudioCollision.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index 6ce7bbac..fd819641 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -166,20 +166,17 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun
m_sQueueSample.m_nCounter = counter;
m_sQueueSample.m_vecPos = col.m_vecPosition;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 7;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart =
- SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd =
- SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -307,17 +304,16 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
if(counter >= 255) counter = 28;
m_sQueueSample.m_vecPos = col.m_vecPosition;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 11;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -328,13 +324,13 @@ void
cAudioManager::ServiceCollisions()
{
int i, j;
- bool abRepeatedCollision1[NUMAUDIOCOLLISIONS];
- bool abRepeatedCollision2[NUMAUDIOCOLLISIONS];
+ bool8 abRepeatedCollision1[NUMAUDIOCOLLISIONS];
+ bool8 abRepeatedCollision2[NUMAUDIOCOLLISIONS];
m_sQueueSample.m_nEntityIndex = m_nCollisionEntity;
for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
- abRepeatedCollision1[i] = abRepeatedCollision2[i] = false;
+ abRepeatedCollision1[i] = abRepeatedCollision2[i] = FALSE;
for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
@@ -344,8 +340,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;