1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 23:00:01 +00:00

Merge pull request #321 from Sergeanur/audio_enums

Audio, use of enums and true/false
This commit is contained in:
Sergeanur 2020-02-02 16:56:22 +02:00 committed by GitHub
commit 0e2f7ff689
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 551 additions and 550 deletions

View file

@ -150,8 +150,8 @@ cAudioManager::SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter)
if(m_sQueueSample.m_bVolume) { if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = counter; m_sQueueSample.m_counter = counter;
m_sQueueSample.m_vecPos = col->m_vecPosition; m_sQueueSample.m_vecPos = col->m_vecPosition;
m_sQueueSample.m_bBankIndex = 0; m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_bIsDistant = 0; m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 7; m_sQueueSample.field_16 = 7;
m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol; m_sQueueSample.m_bEmittingVolume = emittingVol;
@ -163,8 +163,8 @@ cAudioManager::SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter)
m_sQueueSample.m_fSoundIntensity = 60.0f; m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.field_56 = 0; m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 5; m_sQueueSample.field_76 = 5;
m_sQueueSample.m_bReverbFlag = 1; m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = 0; m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
} }
} }
@ -269,8 +269,8 @@ cAudioManager::SetUpOneShotCollisionSound(cAudioCollision *col)
m_sQueueSample.m_counter = counter++; m_sQueueSample.m_counter = counter++;
if(counter >= 255) counter = 28; if(counter >= 255) counter = 28;
m_sQueueSample.m_vecPos = col->m_vecPosition; m_sQueueSample.m_vecPos = col->m_vecPosition;
m_sQueueSample.m_bBankIndex = 0; m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_bIsDistant = 0; m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 11; m_sQueueSample.field_16 = 11;
m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = emittingVol; m_sQueueSample.m_bEmittingVolume = emittingVol;
@ -279,8 +279,8 @@ cAudioManager::SetUpOneShotCollisionSound(cAudioCollision *col)
m_sQueueSample.field_48 = 4.0f; m_sQueueSample.field_48 = 4.0f;
m_sQueueSample.m_fSoundIntensity = 60.0f; m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.field_56 = 1; m_sQueueSample.field_56 = 1;
m_sQueueSample.m_bReverbFlag = 1; m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = 0; m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
} }
} }
@ -320,8 +320,8 @@ cAudioManager::ServiceCollisions()
if (!someArr2[i]) { if (!someArr2[i]) {
m_sCollisionManager.m_asCollisions2[i].m_pEntity1 = nil; m_sCollisionManager.m_asCollisions2[i].m_pEntity1 = nil;
m_sCollisionManager.m_asCollisions2[i].m_pEntity2 = nil; m_sCollisionManager.m_asCollisions2[i].m_pEntity2 = nil;
m_sCollisionManager.m_asCollisions2[i].m_bSurface1 = 0; m_sCollisionManager.m_asCollisions2[i].m_bSurface1 = SURFACE_DEFAULT;
m_sCollisionManager.m_asCollisions2[i].m_bSurface2 = 0; m_sCollisionManager.m_asCollisions2[i].m_bSurface2 = SURFACE_DEFAULT;
m_sCollisionManager.m_asCollisions2[i].m_fIntensity2 = 0.0f; m_sCollisionManager.m_asCollisions2[i].m_fIntensity2 = 0.0f;
m_sCollisionManager.m_asCollisions2[i].m_fIntensity1 = 0.0f; m_sCollisionManager.m_asCollisions2[i].m_fIntensity1 = 0.0f;
m_sCollisionManager.m_asCollisions2[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f); m_sCollisionManager.m_asCollisions2[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);

File diff suppressed because it is too large Load diff

View file

@ -140,7 +140,7 @@ public:
int32 m_counter; int32 m_counter;
int32 m_nSampleIndex; int32 m_nSampleIndex;
uint8 m_bBankIndex; uint8 m_bBankIndex;
uint8 m_bIsDistant; bool m_bIsDistant;
uint8 field_14; uint8 field_14;
uint8 field_15; uint8 field_15;
int32 field_16; int32 field_16;
@ -164,9 +164,9 @@ public:
uint8 field_58; uint8 field_58;
uint8 field_59; uint8 field_59;
CVector m_vecPos; CVector m_vecPos;
uint8 m_bReverbFlag; bool m_bReverbFlag;
uint8 m_bLoopsRemaining; uint8 m_bLoopsRemaining;
uint8 m_bRequireReflection; bool m_bRequireReflection;
uint8 m_bOffset; uint8 m_bOffset;
int32 field_76; int32 field_76;
uint8 m_bIsProcessed; uint8 m_bIsProcessed;

View file

@ -124,8 +124,8 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nEntityIndex = m_nPoliceChannelEntity; m_sQueueSample.m_nEntityIndex = m_nPoliceChannelEntity;
m_sQueueSample.m_counter = 0; m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE; m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE;
m_sQueueSample.m_bBankIndex = 0; m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_bIsDistant = 1; m_sQueueSample.m_bIsDistant = true;
m_sQueueSample.field_16 = 10; m_sQueueSample.field_16 = 10;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_bVolume = m_anRandomTable[2] % 20 + 15; m_sQueueSample.m_bVolume = m_anRandomTable[2] % 20 + 15;
@ -134,10 +134,10 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_POLICE_RADIO_CRACKLE); m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_POLICE_RADIO_CRACKLE); m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.field_56 = 0; m_sQueueSample.field_56 = 0;
m_sQueueSample.m_bReverbFlag = 0; m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bOffset = 63; m_sQueueSample.m_bOffset = 63;
m_sQueueSample.field_76 = 3; m_sQueueSample.field_76 = 3;
m_sQueueSample.m_bRequireReflection = 0; m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
} }

View file

@ -17,6 +17,7 @@ enum
SAMPLEBANK_MAIN, SAMPLEBANK_MAIN,
SAMPLEBANK_PED, SAMPLEBANK_PED,
MAX_SAMPLEBANKS, MAX_SAMPLEBANKS,
SAMPLEBANK_INVALID
}; };
#define MAX_PEDSFX 7 #define MAX_PEDSFX 7