mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-27 22:55:40 +00:00
merge
This commit is contained in:
commit
c5c887cc11
19 changed files with 3806 additions and 3625 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
|
@ -747,9 +747,8 @@ cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
|
|||
m_aRequestedQueue[m_nActiveQueue][sample].m_nFinalPriority)
|
||||
break;
|
||||
}
|
||||
if (i < sample) {
|
||||
if (i < sample)
|
||||
memmove(&m_aRequestedOrderList[m_nActiveQueue][i + 1], &m_aRequestedOrderList[m_nActiveQueue][i], m_nActiveSamples - i - 1);
|
||||
}
|
||||
}
|
||||
m_aRequestedOrderList[m_nActiveQueue][i] = sample;
|
||||
}
|
||||
|
@ -770,23 +769,30 @@ cAudioManager::AddReflectionsToRequestedQueue()
|
|||
uint32 oldCounter = m_sQueueSample.m_nCounter;
|
||||
float oldDist = m_sQueueSample.m_fDistance;
|
||||
CVector oldPos = m_sQueueSample.m_vecPos;
|
||||
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||
if ( CTimer::GetIsSlowMotionActive() ) {
|
||||
emittingVolume = m_sQueueSample.m_nVolume;
|
||||
oldFreq = m_sQueueSample.m_nFrequency;
|
||||
} else {
|
||||
} 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;
|
||||
|
||||
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
|
||||
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||
if ( CTimer::GetIsSlowMotionActive() )
|
||||
m_afReflectionsDistances[i] = (m_anRandomTable[i % 4] % 3) * 50.f / 8.f;
|
||||
#endif
|
||||
|
||||
reflectionDistance = m_afReflectionsDistances[i];
|
||||
if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_MaxDistance) {
|
||||
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||
m_sQueueSample.m_nReflectionDelay = CTimer::GetIsSlowMotionActive() ? (reflectionDistance * 600.f / 1029.f) : (reflectionDistance * 300.f / 1029.f);
|
||||
#else
|
||||
m_sQueueSample.m_nReflectionDelay = reflectionDistance * 300.f / 1029.f;
|
||||
#endif
|
||||
if (m_sQueueSample.m_nReflectionDelay > 3) {
|
||||
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
|
||||
SET_EMITTING_VOLUME(emittingVolume);
|
||||
|
@ -795,9 +801,12 @@ cAudioManager::AddReflectionsToRequestedQueue()
|
|||
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
|
||||
m_sQueueSample.m_nCounter = oldCounter + (i + 1) * 256;
|
||||
if (m_sQueueSample.m_nLoopCount > 0) {
|
||||
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||
if ( CTimer::GetIsSlowMotionActive() ) {
|
||||
m_sQueueSample.m_nFrequency = halfOldFreq + ((halfOldFreq * i) / ARRAY_SIZE(m_afReflectionsDistances));
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
||||
if (noise > 0)
|
||||
m_sQueueSample.m_nFrequency -= noise;
|
||||
|
@ -979,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
|
||||
|
@ -997,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)
|
||||
|
@ -1393,6 +1402,41 @@ cAudioManager::GenerateIntegerRandomNumberTable()
|
|||
m_anRandomTable[i] = myrand();
|
||||
}
|
||||
|
||||
void
|
||||
cAudioManager::DirectlyEnqueueSample(uint32 sample, uint8 bank, uint32 counter, uint32 priority, uint32 freq, uint8 volume, uint8 framesToPlay, uint32 notStereo)
|
||||
{
|
||||
m_sQueueSample.m_nSampleIndex = sample;
|
||||
m_sQueueSample.m_nBankIndex = bank;
|
||||
m_sQueueSample.m_nCounter = counter;
|
||||
m_sQueueSample.m_nFrequency = freq;
|
||||
m_sQueueSample.m_nVolume = volume;
|
||||
SET_EMITTING_VOLUME(volume);
|
||||
m_sQueueSample.m_nPriority = priority;
|
||||
m_sQueueSample.m_nFramesToPlay = framesToPlay;
|
||||
m_sQueueSample.m_bReflections = FALSE;
|
||||
m_sQueueSample.m_nLoopCount = 0;
|
||||
SET_LOOP_OFFSETS(sample)
|
||||
#ifdef FIX_BUGS
|
||||
m_sQueueSample.m_bIs2D = TRUE;
|
||||
#else
|
||||
m_sQueueSample.m_bIs2D = FALSE;
|
||||
#endif
|
||||
m_sQueueSample.m_bStatic = FALSE;
|
||||
SET_SOUND_REVERB(FALSE);
|
||||
#ifdef FIX_BUGS
|
||||
m_sQueueSample.m_nPan = 63;
|
||||
AddSampleToRequestedQueue();
|
||||
#else
|
||||
// this is dumb and wrong, what were they thinking?
|
||||
m_sQueueSample.m_nPan = 0;
|
||||
AudioManager.AddSampleToRequestedQueue();
|
||||
if (!notStereo) {
|
||||
m_sQueueSample.m_nPan = 127;
|
||||
AudioManager.AddSampleToRequestedQueue();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef EXTERNAL_3D_SOUND
|
||||
void
|
||||
cAudioManager::AdjustSamplesVolume()
|
||||
|
|
|
@ -99,10 +99,10 @@ VALIDATE_SIZE(tPedComment, 28);
|
|||
class cPedComments
|
||||
{
|
||||
public:
|
||||
tPedComment m_asPedComments[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
||||
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
||||
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
|
||||
uint8 m_nActiveBank;
|
||||
tPedComment m_aPedCommentQueue[NUM_SOUND_QUEUES][NUM_PED_COMMENTS_SLOTS];
|
||||
uint8 m_aPedCommentOrderList[NUM_SOUND_QUEUES][NUM_PED_COMMENTS_SLOTS];
|
||||
uint8 m_nPedCommentCount[NUM_SOUND_QUEUES];
|
||||
uint8 m_nActiveQueue;
|
||||
#ifdef GTA_PC
|
||||
bool8 m_bDelay;
|
||||
uint32 m_nDelayTimer;
|
||||
|
@ -111,14 +111,14 @@ public:
|
|||
cPedComments()
|
||||
{
|
||||
for (int i = 0; i < NUM_PED_COMMENTS_SLOTS; i++)
|
||||
for (int j = 0; j < NUM_PED_COMMENTS_BANKS; j++) {
|
||||
m_asPedComments[j][i].m_nProcess = -1;
|
||||
m_nIndexMap[j][i] = NUM_PED_COMMENTS_SLOTS;
|
||||
for (int j = 0; j < NUM_SOUND_QUEUES; j++) {
|
||||
m_aPedCommentQueue[j][i].m_nProcess = -1;
|
||||
m_aPedCommentOrderList[j][i] = NUM_PED_COMMENTS_SLOTS;
|
||||
}
|
||||
|
||||
for (int i = 0; i < NUM_PED_COMMENTS_BANKS; i++)
|
||||
m_nCommentsInBank[i] = 0;
|
||||
m_nActiveBank = 0;
|
||||
for (int i = 0; i < NUM_SOUND_QUEUES; i++)
|
||||
m_nPedCommentCount[i] = 0;
|
||||
m_nActiveQueue = 0;
|
||||
}
|
||||
void Add(tPedComment *com);
|
||||
void Process();
|
||||
|
@ -359,6 +359,7 @@ public:
|
|||
void ClearActiveSamples();
|
||||
void GenerateIntegerRandomNumberTable();
|
||||
void LoadBankIfNecessary(uint8 bank);
|
||||
void DirectlyEnqueueSample(uint32 sample, uint8 bank, uint32 counter, uint32 priority, uint32 freq, uint8 volume, uint8 framesToPlay, uint32 notStereo = 0);
|
||||
|
||||
#ifdef EXTERNAL_3D_SOUND // actually must have been && AUDIO_MSS as well
|
||||
void AdjustSamplesVolume(); // inlined
|
||||
|
@ -381,12 +382,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);
|
||||
|
@ -663,3 +664,10 @@ public:
|
|||
|
||||
|
||||
extern cAudioManager AudioManager;
|
||||
|
||||
enum
|
||||
{
|
||||
PED_COMMENT_VOLUME = 127,
|
||||
PED_COMMENT_VOLUME_BEHIND_WALL = 31,
|
||||
COLLISION_MAX_DIST = 60,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,114 +347,114 @@ cAudioManager::SetupCrimeReport()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
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},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{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_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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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}
|
||||
};
|
||||
|
||||
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_SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{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_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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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},
|
||||
{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}
|
||||
};
|
||||
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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -1573,7 +1573,7 @@ CRadar::ToggleTargetMarker(float x, float y)
|
|||
ms_RadarTrace[nextBlip].m_bDim = 0;
|
||||
ms_RadarTrace[nextBlip].m_bInUse = 1;
|
||||
ms_RadarTrace[nextBlip].m_Radius = 1.0f;
|
||||
CVector pos(x, y, CWorld::FindGroundZForCoord(x,y));
|
||||
CVector pos(x, y, 0.0f);
|
||||
TargetMarkerPos = pos;
|
||||
ms_RadarTrace[nextBlip].m_vec2DPos = pos;
|
||||
ms_RadarTrace[nextBlip].m_vecPos = pos;
|
||||
|
|
|
@ -129,7 +129,6 @@ enum Config {
|
|||
NUMINVISIBLEENTITIES = 150,
|
||||
|
||||
NUM_AUDIOENTITY_EVENTS = 4,
|
||||
NUM_PED_COMMENTS_BANKS = 2,
|
||||
NUM_PED_COMMENTS_SLOTS = 20,
|
||||
|
||||
NUM_SOUND_QUEUES = 2,
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "CarCtrl.h"
|
||||
#include "Population.h"
|
||||
#include "IniFile.h"
|
||||
#include "Zones.h"
|
||||
|
||||
#include "crossplatform.h"
|
||||
|
||||
|
@ -771,12 +772,14 @@ FixCar(void)
|
|||
static void
|
||||
TeleportToWaypoint(void)
|
||||
{
|
||||
if (FindPlayerVehicle()) {
|
||||
if (CRadar::TargetMarkerId != -1)
|
||||
FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FindPlayerVehicle()->GetColModel()->boundingSphere.center.z));
|
||||
} else
|
||||
if(CRadar::TargetMarkerId != -1)
|
||||
FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FEET_OFFSET));
|
||||
if (CRadar::TargetMarkerId == -1)
|
||||
return;
|
||||
CEntity* pEntityToTeleport = FindPlayerEntity();
|
||||
CVector vNewPos = CRadar::TargetMarkerPos;
|
||||
CStreaming::LoadScene(vNewPos);
|
||||
CStreaming::LoadSceneCollision(vNewPos);
|
||||
vNewPos.z = CWorld::FindGroundZForCoord(vNewPos.x, vNewPos.y) + pEntityToTeleport->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pEntityToTeleport->Teleport(vNewPos);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1091,13 +1091,19 @@ enum
|
|||
|
||||
|
||||
// these indices are original
|
||||
MI_SKIMMER = -1000,
|
||||
MI_CADDY = -999,
|
||||
MI_TROPIC = -992,
|
||||
MI_COASTG = -991,
|
||||
MI_MARQUIS = -990,
|
||||
MI_RIO = -988,
|
||||
MI_DINGHY = -987,
|
||||
MI_SEASPAR = -986,
|
||||
MI_SPARROW = -985,
|
||||
MI_VOODOO = -984,
|
||||
MI_FBIRANCH = -982,
|
||||
MI_SANDKING = -981,
|
||||
MI_SQUALO = -974,
|
||||
MI_PHEONIX = -973,
|
||||
MI_COMET = -972,
|
||||
MI_KAUFMAN = -967,
|
||||
|
@ -1119,13 +1125,9 @@ enum
|
|||
MI_VIRGO,
|
||||
MI_GREENWOO,
|
||||
|
||||
// 25 of the following MIs originally are in this set:
|
||||
// {-1000, -997, -995, -994, -993, -991, -989, -987, -983, -980, -976, -974, -971, -970, -968, -966, -965, -964, -963, -962, -961, -960, -959, -958, -957, -956}
|
||||
MI_SQUALO = -2000,
|
||||
MI_JETMAX,
|
||||
MI_COASTG,
|
||||
MI_DINGHY,
|
||||
MI_SKIMMER,
|
||||
// 22 of the following MIs originally are in this set:
|
||||
// {-997, -995, -994, -993, -989, -983, -980, -976, -971, -970, -968, -966, -965, -964, -963, -962, -961, -960, -959, -958, -957, -956}
|
||||
MI_JETMAX = -2000,
|
||||
MI_CUBAN,
|
||||
MI_RANCHER,
|
||||
MI_BLISTAC,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -822,7 +822,9 @@ public:
|
|||
void RestorePreviousObjective(void);
|
||||
void SetIdle(void);
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER >= 1920 && _MSC_VER < 1929
|
||||
__declspec(noinline) // workaround for a compiler bug, hooray MS :P
|
||||
#endif
|
||||
#endif
|
||||
void SetObjective(eObjective, void*);
|
||||
void SetObjective(eObjective);
|
||||
|
|
|
@ -1139,8 +1139,8 @@ CBoat::RenderWaterOutPolys(void)
|
|||
RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.3f, -2.832f, 0.51f);
|
||||
break;
|
||||
case MI_SQUALO:
|
||||
RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.222f, 2.004f, 0.846f);
|
||||
RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.222f, 2.004f, 0.846f);
|
||||
RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.222f, 2.004f, 1.409f);
|
||||
RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.222f, 2.004f, 1.409f);
|
||||
RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.24f, -1.367f, 0.846f);
|
||||
RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.24f, -1.367f, 0.846f);
|
||||
break;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "TempColModels.h"
|
||||
#include "WaterLevel.h"
|
||||
#include "World.h"
|
||||
#include "sampman.h"
|
||||
|
||||
CFerryInst* CFerry::mspInst;
|
||||
|
||||
|
@ -706,7 +707,7 @@ void CFerry::OpenDoor(void)
|
|||
m_bUseFrontDoor = true;
|
||||
if (fDistToCar4 < fDistToCar1)
|
||||
m_bUseFrontDoor = false;
|
||||
// AudioManager.DirectlyEnqueueSample(0xb8,0,0,1,0x5622,0x7f,0x14,0); // TODO
|
||||
AudioManager.DirectlyEnqueueSample(SFX_GATE_START_CLU, SFX_BANK_0, 0, 1, 22050, 127, 20);
|
||||
}
|
||||
|
||||
void CFerry::CloseDoor(void)
|
||||
|
@ -714,7 +715,7 @@ void CFerry::CloseDoor(void)
|
|||
printf("closing the ferry door\n");
|
||||
m_nDoorState = FERRY_DOOR_CLOSING;
|
||||
m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 10000;
|
||||
// AudioManager.DirectlyEnqueueSample(0xb8, 0, 0, 1, 0x5622, 0x7f, 0x14, 0); // TODO
|
||||
AudioManager.DirectlyEnqueueSample(SFX_GATE_START_CLU, SFX_BANK_0, 0, 1, 22050, 127, 20); // shouldn't this be SFX_GATE_STOP_CLU?
|
||||
}
|
||||
|
||||
bool CFerry::IsDoorOpen(void)
|
||||
|
@ -798,7 +799,7 @@ void CFerry::PlayArrivedHorn(void)
|
|||
float fDistToCamera = (GetPosition() - TheCamera.GetPosition()).Magnitude();
|
||||
if (fDistToCamera < 200.0f) {
|
||||
uint8 volume = (200.0f - fDistToCamera) / 200.0f * 127;
|
||||
// AudioManager.DirectlyEnqueueSample(0x32, 0, 0, 1, 18000, volume, 0x32, 0); // TODO
|
||||
AudioManager.DirectlyEnqueueSample(SFX_CAR_HORN_TRUCK, SFX_BANK_0, 0, 1, 18000, volume, 50);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -277,7 +277,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;
|
||||
|
|
Loading…
Reference in a new issue