Merge branch 'miami' into lcs

This commit is contained in:
Sergeanur 2021-08-29 10:31:13 +03:00
commit eeacbfeb6a
12 changed files with 3633 additions and 3510 deletions

View File

@ -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

View File

@ -776,7 +776,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;
@ -988,9 +988,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
@ -1006,7 +1006,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)

View File

@ -381,12 +381,12 @@ public:
// vehicles
void ProcessVehicle(CVehicle *vehicle);
void ProcessCarHeli(cVehicleParams &params);
bool8 ProcessCarHeli(cVehicleParams &params);
void ProcessRainOnVehicle(cVehicleParams &params);
bool8 ProcessReverseGear(cVehicleParams &params);
void ProcessModelHeliVehicle(cVehicleParams &params);
void ProcessModelVehicle(cVehicleParams &params);
void ProcessVehicleFlatTyre(cVehicleParams &params);
bool8 ProcessVehicleFlatTyre(cVehicleParams &params);
bool8 ProcessVehicleRoadNoise(cVehicleParams &params);
bool8 ProcessWetRoadNoise(cVehicleParams &params);
bool8 ProcessVehicleEngine(cVehicleParams &params);
@ -663,3 +663,10 @@ public:
extern cAudioManager AudioManager;
enum
{
PED_COMMENT_VOLUME = 127,
PED_COMMENT_VOLUME_BEHIND_WALL = 31,
COLLISION_MAX_DIST = 60,
};

View File

@ -454,12 +454,12 @@ enum eSfxSample
SFX_BUILDING_BAR_2,
SFX_BUILDING_BAR_3,
SFX_BUILDING_BAR_4,
SFX_BUILDING_MAL1,
SFX_BUILDING_MAL2,
SFX_BUILDING_MAL3,
SFX_BUILDING_STR1,
SFX_BUILDING_STR2,
SFX_BUILDING_STR3,
SFX_BUILDING_MALIBU_1,
SFX_BUILDING_MALIBU_2,
SFX_BUILDING_MALIBU_3,
SFX_BUILDING_STRIP_1,
SFX_BUILDING_STRIP_2,
SFX_BUILDING_STRIP_3,
SFX_BUILDING_CHURCH,
SFX_BUILDING_FAN_1,
SFX_BUILDING_FAN_2,

View File

@ -140,7 +140,7 @@ cAudioManager::ServicePoliceRadio()
#ifdef FIX_BUGS
nLastSeen -= CTimer::GetLogicalFramesPassed();
#else
--nLastSeen;
nLastSeen--;
#endif
else {
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
@ -159,12 +159,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;
@ -268,12 +268,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;
}
@ -347,18 +347,7 @@ cAudioManager::SetupCrimeReport()
return TRUE;
}
void
cAudioManager::SetupSuspectLastSeenReport()
{
CVehicle *veh;
uint8 color1;
int32 main_color;
int32 sample;
int32 color_pre_modifier;
int32 color_post_modifier;
const int32 gCarColourTable[][3] = {
Const uint32 gCarColourTable[][3] = {
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
@ -368,9 +357,9 @@ cAudioManager::SetupSuspectLastSeenReport()
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
{SFX_POLICE_RADIO_BRIGHT, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
{SFX_POLICE_RADIO_LIGHT, SFX_SFX_POLICE_RADIO_BLUE, SFX_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_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_SFX_POLICE_RADIO_RED, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
@ -378,83 +367,94 @@ cAudioManager::SetupSuspectLastSeenReport()
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
{NO_SAMPLE, SFX_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},
{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_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
{NO_SAMPLE, SFX_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},
{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_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
{NO_SAMPLE, SFX_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},
{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_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
{NO_SAMPLE, SFX_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},
{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_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
{NO_SAMPLE, SFX_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},
{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_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
{NO_SAMPLE, SFX_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},
{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_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
{NO_SAMPLE, SFX_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}
};
{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;
uint32 main_color;
uint32 sample;
uint32 color_pre_modifier;
uint32 color_post_modifier;
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
veh = FindVehicleOfPlayer();
@ -691,7 +691,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);

View File

@ -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;
};
@ -213,8 +213,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);

View File

@ -377,15 +377,15 @@ SetUpDebugBanksInfo()
gBankStartOffset[43] = SFX_BUILDING_BAR_2;
gBankStartOffset[44] = SFX_BUILDING_BAR_3;
gBankStartOffset[45] = SFX_BUILDING_BAR_4;
gBankStartOffset[46] = SFX_BUILDING_MAL1;
gBankStartOffset[47] = SFX_BUILDING_MAL2;
gBankStartOffset[46] = SFX_BUILDING_MALIBU_1;
gBankStartOffset[47] = SFX_BUILDING_MALIBU_2;
gBankStartOffset[42] = SFX_BUILDING_BAR_1;
gBankStartOffset[49] = SFX_BUILDING_STR1;
gBankStartOffset[50] = SFX_BUILDING_STR2;
gBankStartOffset[51] = SFX_BUILDING_STR3;
gBankStartOffset[49] = SFX_BUILDING_STRIP_1;
gBankStartOffset[50] = SFX_BUILDING_STRIP_2;
gBankStartOffset[51] = SFX_BUILDING_STRIP_3;
gBankStartOffset[52] = SFX_BUILDING_CHURCH;
gBankStartOffset[53] = SFX_BUILDING_FAN_1;
gBankStartOffset[48] = SFX_BUILDING_MAL3;
gBankStartOffset[48] = SFX_BUILDING_MALIBU_3;
gBankStartOffset[55] = SFX_BUILDING_INSECTS_1;
gBankStartOffset[56] = SFX_BUILDING_INSECTS_2;
gBankStartOffset[54] = SFX_BUILDING_FAN_2;
@ -1721,13 +1721,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;

View File

@ -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 );

View File

@ -364,15 +364,15 @@ SetUpDebugBanksInfo()
gBankStartOffset[43] = SFX_BUILDING_BAR_2;
gBankStartOffset[44] = SFX_BUILDING_BAR_3;
gBankStartOffset[45] = SFX_BUILDING_BAR_4;
gBankStartOffset[46] = SFX_BUILDING_MAL1;
gBankStartOffset[47] = SFX_BUILDING_MAL2;
gBankStartOffset[46] = SFX_BUILDING_MALIBU_1;
gBankStartOffset[47] = SFX_BUILDING_MALIBU_2;
gBankStartOffset[42] = SFX_BUILDING_BAR_1;
gBankStartOffset[49] = SFX_BUILDING_STR1;
gBankStartOffset[50] = SFX_BUILDING_STR2;
gBankStartOffset[51] = SFX_BUILDING_STR3;
gBankStartOffset[49] = SFX_BUILDING_STRIP_1;
gBankStartOffset[50] = SFX_BUILDING_STRIP_2;
gBankStartOffset[51] = SFX_BUILDING_STRIP_3;
gBankStartOffset[52] = SFX_BUILDING_CHURCH;
gBankStartOffset[53] = SFX_BUILDING_FAN_1;
gBankStartOffset[48] = SFX_BUILDING_MAL3;
gBankStartOffset[48] = SFX_BUILDING_MALIBU_3;
gBankStartOffset[55] = SFX_BUILDING_INSECTS_1;
gBankStartOffset[56] = SFX_BUILDING_INSECTS_2;
gBankStartOffset[54] = SFX_BUILDING_FAN_2;
@ -1436,14 +1436,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 );

View File

@ -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) {

View File

@ -284,7 +284,7 @@ public:
uint8 m_vehLCS_2A4; // some timer
uint32 m_nCarHornTimer;
uint8 m_nCarHornPattern;
uint8 m_bSirenOrAlarm;
bool m_bSirenOrAlarm;
uint8 m_nCarHornDelay;
int8 m_comedyControlState;
int32 m_vehLCS_2B0;