mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-27 22:25:40 +00:00
Audio: fixing bugs, fixing types, making code more accurate to original
This commit is contained in:
parent
8ef1e29a5c
commit
9a7b469f4e
12 changed files with 3634 additions and 3513 deletions
|
@ -8,8 +8,6 @@
|
|||
#include "SurfaceTable.h"
|
||||
#include "sampman.h"
|
||||
|
||||
const int CollisionSoundIntensity = 60;
|
||||
|
||||
void
|
||||
cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower,
|
||||
float velocity)
|
||||
|
@ -32,7 +30,7 @@ cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface
|
|||
}
|
||||
CVector pos = (v1 + v2) * 0.5f;
|
||||
distSquared = GetDistanceSquared(pos);
|
||||
if(distSquared < SQR(CollisionSoundIntensity)) {
|
||||
if(distSquared < SQR(COLLISION_MAX_DIST)) {
|
||||
m_sCollisionManager.m_sQueue.m_pEntity1 = entity1;
|
||||
m_sCollisionManager.m_sQueue.m_pEntity2 = entity2;
|
||||
m_sCollisionManager.m_sQueue.m_bSurface1 = surface1;
|
||||
|
@ -48,8 +46,8 @@ cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface
|
|||
void
|
||||
cAudioCollisionManager::AddCollisionToRequestedQueue()
|
||||
{
|
||||
int32 collisionsIndex;
|
||||
int32 i;
|
||||
uint32 collisionsIndex;
|
||||
uint32 i;
|
||||
|
||||
|
||||
if (m_bCollisionsInQueue < NUMAUDIOCOLLISIONS)
|
||||
|
@ -83,11 +81,11 @@ cAudioManager::ServiceCollisions()
|
|||
|
||||
m_sQueueSample.m_nEntityIndex = m_nCollisionEntity;
|
||||
|
||||
for(int i = 0; i < NUMAUDIOCOLLISIONS; i++)
|
||||
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++) {
|
||||
for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
|
||||
for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
|
||||
int index = m_sCollisionManager.m_bIndicesTable[i];
|
||||
if ((m_sCollisionManager.m_asCollisions1[index].m_pEntity1 == m_sCollisionManager.m_asCollisions2[j].m_pEntity1)
|
||||
&& (m_sCollisionManager.m_asCollisions1[index].m_pEntity2 == m_sCollisionManager.m_asCollisions2[j].m_pEntity2)
|
||||
|
@ -103,8 +101,8 @@ cAudioManager::ServiceCollisions()
|
|||
}
|
||||
}
|
||||
|
||||
for(i = 0; i < NUMAUDIOCOLLISIONS; i++) {
|
||||
if(!abRepeatedCollision2[i]) {
|
||||
for (i = 0; i < NUMAUDIOCOLLISIONS; i++) {
|
||||
if (!abRepeatedCollision2[i]) {
|
||||
m_sCollisionManager.m_asCollisions2[i].m_pEntity1 = nil;
|
||||
m_sCollisionManager.m_asCollisions2[i].m_pEntity2 = nil;
|
||||
m_sCollisionManager.m_asCollisions2[i].m_bSurface1 = SURFACE_DEFAULT;
|
||||
|
@ -116,11 +114,11 @@ cAudioManager::ServiceCollisions()
|
|||
}
|
||||
}
|
||||
|
||||
for(i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
|
||||
for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
|
||||
int index = m_sCollisionManager.m_bIndicesTable[i];
|
||||
if(!abRepeatedCollision1[index]) {
|
||||
for(j = 0; j < NUMAUDIOCOLLISIONS; j++) {
|
||||
if(!abRepeatedCollision2[j]) {
|
||||
if (!abRepeatedCollision1[index]) {
|
||||
for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
|
||||
if (!abRepeatedCollision2[j]) {
|
||||
m_sCollisionManager.m_asCollisions2[j].m_nBaseVolume = 1;
|
||||
m_sCollisionManager.m_asCollisions2[j].m_pEntity1 = m_sCollisionManager.m_asCollisions1[index].m_pEntity1;
|
||||
m_sCollisionManager.m_asCollisions2[j].m_pEntity2 = m_sCollisionManager.m_asCollisions1[index].m_pEntity2;
|
||||
|
@ -134,12 +132,12 @@ cAudioManager::ServiceCollisions()
|
|||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < NUMAUDIOCOLLISIONS; i++)
|
||||
for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
|
||||
m_sCollisionManager.m_bIndicesTable[i] = NUMAUDIOCOLLISIONS;
|
||||
m_sCollisionManager.m_bCollisionsInQueue = 0;
|
||||
}
|
||||
|
||||
static const int32 gOneShotCol[] = {SFX_COL_TARMAC_1,
|
||||
static const uint32 gOneShotCol[] = {SFX_COL_TARMAC_1,
|
||||
SFX_COL_TARMAC_1,
|
||||
SFX_COL_GRASS_1,
|
||||
SFX_COL_GRAVEL_1,
|
||||
|
@ -181,7 +179,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
|||
uint16 s1;
|
||||
uint16 s2;
|
||||
|
||||
int32 emittingVol;
|
||||
uint32 emittingVol;
|
||||
float ratio;
|
||||
|
||||
static uint16 counter = 28;
|
||||
|
@ -200,11 +198,11 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
|||
s1 = SURFACE_CAR_PANEL;
|
||||
ratio = Min(1.f, 2.f * ratio);
|
||||
}
|
||||
emittingVol = 40.f * ratio;
|
||||
emittingVol = 40 * ratio;
|
||||
if(emittingVol) {
|
||||
m_sQueueSample.m_fDistance = Sqrt(col.m_fDistance);
|
||||
m_sQueueSample.m_nVolume =
|
||||
ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
|
||||
ComputeVolume(emittingVol, COLLISION_MAX_DIST, m_sQueueSample.m_fDistance);
|
||||
if(m_sQueueSample.m_nVolume > 0) {
|
||||
m_sQueueSample.m_nSampleIndex = gOneShotCol[s1];
|
||||
switch(m_sQueueSample.m_nSampleIndex) {
|
||||
|
@ -268,7 +266,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
|||
SET_EMITTING_VOLUME(emittingVol);
|
||||
RESET_LOOP_OFFSETS
|
||||
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
|
||||
m_sQueueSample.m_MaxDistance = CollisionSoundIntensity;
|
||||
m_sQueueSample.m_MaxDistance = COLLISION_MAX_DIST;
|
||||
m_sQueueSample.m_bStatic = TRUE;
|
||||
SET_SOUND_REVERB(TRUE);
|
||||
SET_SOUND_REFLECTION(FALSE);
|
||||
|
@ -286,7 +284,7 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun
|
|||
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
|
||||
if(emittingVol) {
|
||||
CalculateDistance(distCalculated, m_sQueueSample.m_fDistance);
|
||||
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
|
||||
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, COLLISION_MAX_DIST, m_sQueueSample.m_fDistance);
|
||||
if(m_sQueueSample.m_nVolume > 0) {
|
||||
m_sQueueSample.m_nCounter = counter;
|
||||
m_sQueueSample.m_vecPos = col.m_vecPosition;
|
||||
|
@ -297,7 +295,7 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun
|
|||
SET_EMITTING_VOLUME(emittingVol);
|
||||
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
|
||||
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
|
||||
m_sQueueSample.m_MaxDistance = CollisionSoundIntensity;
|
||||
m_sQueueSample.m_MaxDistance = COLLISION_MAX_DIST;
|
||||
m_sQueueSample.m_bStatic = FALSE;
|
||||
m_sQueueSample.m_nFramesToPlay = 5;
|
||||
SET_SOUND_REVERB(TRUE);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -781,7 +781,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
|
|||
} else
|
||||
#endif
|
||||
emittingVolume = (9 * m_sQueueSample.m_nVolume) / 16;
|
||||
m_sQueueSample.m_MaxDistance /= 2.f;
|
||||
m_sQueueSample.m_MaxDistance /= 2.0f;
|
||||
|
||||
uint32 halfOldFreq = oldFreq >> 1;
|
||||
|
||||
|
@ -993,9 +993,9 @@ cAudioManager::AddReleasingSounds()
|
|||
if (sample.m_nSampleIndex >= SAMPLEBANK_PED_START && sample.m_nSampleIndex <= SAMPLEBANK_PED_END) { // check if it's ped comment
|
||||
uint8 vol;
|
||||
if (CWorld::GetIsLineOfSightClear(TheCamera.GetPosition(), sample.m_vecPos, true, false, false, false, false, false))
|
||||
vol = MAX_VOLUME;
|
||||
vol = PED_COMMENT_VOLUME;
|
||||
else
|
||||
vol = 31;
|
||||
vol = PED_COMMENT_VOLUME_BEHIND_WALL;
|
||||
#ifdef EXTERNAL_3D_SOUND
|
||||
sample.m_nEmittingVolume = vol;
|
||||
#endif
|
||||
|
@ -1011,7 +1011,7 @@ cAudioManager::AddReleasingSounds()
|
|||
if (sample.m_nEmittingVolumeChange > 0)
|
||||
sample.m_nEmittingVolumeChange = volumeDiff * sample.m_nEmittingVolumeChange;
|
||||
#endif
|
||||
sample.m_nVolume = Min(127, newVolume);
|
||||
sample.m_nVolume = Min(MAX_VOLUME, newVolume);
|
||||
}
|
||||
}
|
||||
if (sample.m_nVolume == 0)
|
||||
|
|
|
@ -372,12 +372,12 @@ public:
|
|||
|
||||
// vehicles
|
||||
void ProcessVehicle(CVehicle *vehicle);
|
||||
void ProcessCarHeli(cVehicleParams ¶ms);
|
||||
bool8 ProcessCarHeli(cVehicleParams ¶ms);
|
||||
void ProcessRainOnVehicle(cVehicleParams ¶ms);
|
||||
bool8 ProcessReverseGear(cVehicleParams ¶ms);
|
||||
void ProcessModelHeliVehicle(cVehicleParams ¶ms);
|
||||
void ProcessModelVehicle(cVehicleParams ¶ms);
|
||||
void ProcessVehicleFlatTyre(cVehicleParams ¶ms);
|
||||
bool8 ProcessVehicleFlatTyre(cVehicleParams ¶ms);
|
||||
bool8 ProcessVehicleRoadNoise(cVehicleParams ¶ms);
|
||||
bool8 ProcessWetRoadNoise(cVehicleParams ¶ms);
|
||||
bool8 ProcessVehicleEngine(cVehicleParams ¶ms);
|
||||
|
@ -638,3 +638,10 @@ static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
|
|||
#endif
|
||||
|
||||
extern cAudioManager AudioManager;
|
||||
|
||||
enum
|
||||
{
|
||||
PED_COMMENT_VOLUME = 127,
|
||||
PED_COMMENT_VOLUME_BEHIND_WALL = 31,
|
||||
COLLISION_MAX_DIST = 60,
|
||||
};
|
||||
|
|
|
@ -522,12 +522,12 @@ enum eSfxSample
|
|||
SFX_BUILDING_BAR_2, // 11030
|
||||
SFX_BUILDING_BAR_3, // 11031
|
||||
SFX_BUILDING_BAR_4, // 11032
|
||||
SFX_BUILDING_MAL1, // 11033
|
||||
SFX_BUILDING_MAL2, // 11034
|
||||
SFX_BUILDING_MAL3, // 11035
|
||||
SFX_BUILDING_STR1, // 11036
|
||||
SFX_BUILDING_STR2, // 11037
|
||||
SFX_BUILDING_STR3, // 11038
|
||||
SFX_BUILDING_MALIBU_1, // 11033
|
||||
SFX_BUILDING_MALIBU_2, // 11034
|
||||
SFX_BUILDING_MALIBU_3, // 11035
|
||||
SFX_BUILDING_STRIP_1, // 11036
|
||||
SFX_BUILDING_STRIP_2, // 11037
|
||||
SFX_BUILDING_STRIP_3, // 11038
|
||||
SFX_BUILDING_CHURCH, // 11039
|
||||
SFX_BUILDING_FAN_1, // 11040
|
||||
SFX_BUILDING_FAN_2, // 11041
|
||||
|
|
|
@ -139,7 +139,7 @@ cAudioManager::ServicePoliceRadio()
|
|||
#ifdef FIX_BUGS
|
||||
nLastSeen -= CTimer::GetLogicalFramesPassed();
|
||||
#else
|
||||
--nLastSeen;
|
||||
nLastSeen--;
|
||||
#endif
|
||||
else {
|
||||
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
|
||||
|
@ -157,12 +157,12 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||
{
|
||||
bool8 processed = FALSE;
|
||||
uint32 sample;
|
||||
int32 freq;
|
||||
uint32 freq;
|
||||
|
||||
static int cWait = 0;
|
||||
static bool8 bChannelOpen = FALSE;
|
||||
static uint8 bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_STOPPED;
|
||||
static int32 PoliceChannelFreq = 22050;
|
||||
static uint32 PoliceChannelFreq = 22050;
|
||||
|
||||
if (!m_bIsInitialised) return;
|
||||
|
||||
|
@ -266,12 +266,12 @@ cAudioManager::SetupCrimeReport()
|
|||
float quarterX;
|
||||
float quarterY;
|
||||
int i;
|
||||
int32 sampleIndex;
|
||||
uint32 sampleIndex;
|
||||
bool8 processed = FALSE;
|
||||
|
||||
if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return FALSE;
|
||||
|
||||
if (60 - m_sPoliceRadioQueue.m_nSamplesInQueue <= 9) {
|
||||
if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue <= 9) {
|
||||
AgeCrimes();
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -345,114 +345,114 @@ cAudioManager::SetupCrimeReport()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
Const uint32 gCarColourTable[][3] = {
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}
|
||||
};
|
||||
|
||||
void
|
||||
cAudioManager::SetupSuspectLastSeenReport()
|
||||
{
|
||||
CVehicle *veh;
|
||||
uint8 color1;
|
||||
int32 main_color;
|
||||
int32 sample;
|
||||
uint32 main_color;
|
||||
uint32 sample;
|
||||
|
||||
int32 color_pre_modifier;
|
||||
int32 color_post_modifier;
|
||||
|
||||
const int32 gCarColourTable[][3] = {
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}
|
||||
};
|
||||
uint32 color_pre_modifier;
|
||||
uint32 color_post_modifier;
|
||||
|
||||
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
|
||||
veh = FindVehicleOfPlayer();
|
||||
|
@ -690,7 +690,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
|
|||
float halfY;
|
||||
float quarterX;
|
||||
float quarterY;
|
||||
int32 sample;
|
||||
uint32 sample;
|
||||
bool8 processed = FALSE;
|
||||
CVector vec = CVector(x, y, z);
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#define MAX_FREQ DIGITALRATE
|
||||
|
||||
struct tSample {
|
||||
int32 nOffset;
|
||||
uint32 nOffset;
|
||||
uint32 nSize;
|
||||
int32 nFrequency;
|
||||
int32 nLoopStart;
|
||||
uint32 nFrequency;
|
||||
uint32 nLoopStart;
|
||||
int32 nLoopEnd;
|
||||
};
|
||||
|
||||
|
@ -211,8 +211,8 @@ public:
|
|||
|
||||
int32 _GetPedCommentSlot(uint32 nComment);
|
||||
|
||||
int32 GetSampleBaseFrequency (uint32 nSample);
|
||||
int32 GetSampleLoopStartOffset(uint32 nSample);
|
||||
uint32 GetSampleBaseFrequency (uint32 nSample);
|
||||
uint32 GetSampleLoopStartOffset(uint32 nSample);
|
||||
int32 GetSampleLoopEndOffset (uint32 nSample);
|
||||
uint32 GetSampleLength (uint32 nSample);
|
||||
|
||||
|
|
|
@ -1670,13 +1670,13 @@ cSampleManager::GetBankContainingSound(uint32 offset)
|
|||
return INVALID_SFX_BANK;
|
||||
}
|
||||
|
||||
int32
|
||||
uint32
|
||||
cSampleManager::GetSampleBaseFrequency(uint32 nSample)
|
||||
{
|
||||
return m_aSamples[nSample].nFrequency;
|
||||
}
|
||||
|
||||
int32
|
||||
uint32
|
||||
cSampleManager::GetSampleLoopStartOffset(uint32 nSample)
|
||||
{
|
||||
return m_aSamples[nSample].nLoopStart;
|
||||
|
|
|
@ -184,14 +184,14 @@ cSampleManager::GetBankContainingSound(uint32 offset)
|
|||
return INVALID_SFX_BANK;
|
||||
}
|
||||
|
||||
int32
|
||||
uint32
|
||||
cSampleManager::GetSampleBaseFrequency(uint32 nSample)
|
||||
{
|
||||
ASSERT( nSample < TOTAL_AUDIO_SAMPLES );
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32
|
||||
uint32
|
||||
cSampleManager::GetSampleLoopStartOffset(uint32 nSample)
|
||||
{
|
||||
ASSERT( nSample < TOTAL_AUDIO_SAMPLES );
|
||||
|
|
|
@ -1352,14 +1352,14 @@ cSampleManager::GetBankContainingSound(uint32 offset)
|
|||
return INVALID_SFX_BANK;
|
||||
}
|
||||
|
||||
int32
|
||||
uint32
|
||||
cSampleManager::GetSampleBaseFrequency(uint32 nSample)
|
||||
{
|
||||
ASSERT( nSample < TOTAL_AUDIO_SAMPLES );
|
||||
return m_aSamples[nSample].nFrequency;
|
||||
}
|
||||
|
||||
int32
|
||||
uint32
|
||||
cSampleManager::GetSampleLoopStartOffset(uint32 nSample)
|
||||
{
|
||||
ASSERT( nSample < TOTAL_AUDIO_SAMPLES );
|
||||
|
|
|
@ -206,7 +206,7 @@ CEmergencyPed::MedicAI(void)
|
|||
if (!waitUntilMedicEntersCar) {
|
||||
CCarCtrl::JoinCarWithRoadSystem(m_pMyVehicle);
|
||||
m_pMyVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
|
||||
m_pMyVehicle->m_bSirenOrAlarm = 0;
|
||||
m_pMyVehicle->m_bSirenOrAlarm = false;
|
||||
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = 12;
|
||||
m_pMyVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_SLOW_DOWN_FOR_CARS;
|
||||
if (m_pMyVehicle->bIsAmbulanceOnDuty) {
|
||||
|
|
|
@ -271,7 +271,7 @@ public:
|
|||
uint8 m_bRainSamplesCounter;
|
||||
uint32 m_nCarHornTimer;
|
||||
uint8 m_nCarHornPattern;
|
||||
uint8 m_bSirenOrAlarm;
|
||||
bool m_bSirenOrAlarm;
|
||||
uint8 m_nCarHornDelay;
|
||||
int8 m_comedyControlState;
|
||||
CStoredCollPoly m_aCollPolys[2]; // poly which is under front/rear part of car
|
||||
|
|
Loading…
Reference in a new issue