summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioLogic.cpp26
-rw-r--r--src/audio/AudioManager.cpp1
-rw-r--r--src/audio/AudioManager.h23
-rw-r--r--src/audio/MusicManager.cpp6
4 files changed, 21 insertions, 35 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index bf99f991..7bc2b93f 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -2027,33 +2027,17 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams *params)
}
bool
-cAudioManager::UsesSiren(int32 model) const
+cAudioManager::UsesSiren(cVehicleParams *params) const
{
- switch (model) {
- case FIRETRUK:
- case AMBULAN:
- case FBICAR:
- case POLICE:
- case ENFORCER:
- case PREDATOR:
- return true;
- default:
- return false;
- }
+ params->m_pVehicle->UsesSiren();
}
bool
-cAudioManager::UsesSirenSwitching(int32 model) const
+cAudioManager::UsesSirenSwitching(cVehicleParams *params) const
{
- switch (model) {
- case AMBULAN:
- case POLICE:
- case ENFORCER:
- case PREDATOR:
- return true;
- default:
+ if (params->m_nIndex == FIRETRUK || params->m_nIndex == MRWHOOP)
return false;
- }
+ return params->m_pVehicle->UsesSiren();
}
bool
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index d2a85285..338f33a4 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -275,6 +275,7 @@ cAudioManager::ResetTimers(uint32 time)
SampleManager.SetEffectsFadeVolume(0);
SampleManager.SetMusicFadeVolume(0);
MusicManager.ResetMusicAfterReload();
+ m_bIsPlayerShutUp = false;
#ifdef AUDIO_OAL
SampleManager.Service();
#endif
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index d2f9bc94..7783590e 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -76,6 +76,7 @@ public:
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
uint8 m_nActiveBank;
+ uint32 field_48C;
cPedComments()
{
@@ -93,7 +94,7 @@ public:
void Process();
};
-VALIDATE_SIZE(cPedComments, 1164);
+VALIDATE_SIZE(cPedComments, 0x490);
class CEntity;
@@ -286,8 +287,8 @@ public:
bool HasAirBrakes(int32 model) const; // done
void Initialise(); // done
- void InitialisePoliceRadio();
- void InitialisePoliceRadioZones();
+ void InitialisePoliceRadio(); //done
+ void InitialisePoliceRadioZones(); //done
void InterrogateAudioEntities(); // done
bool IsAudioInitialised() const; // done
bool IsMissionAudioSampleFinished(uint8 slot); // done
@@ -370,17 +371,17 @@ public:
void ProcessEscalators(); // done
void ProcessExtraSounds(); // done
- int32 RandomDisplacement(uint32 seed) const; //
+ int32 RandomDisplacement(uint32 seed) const; // done
void ReacquireDigitalHandle() const; // done
void ReleaseDigitalHandle() const; // done
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
void ReportCrime(int32 crime, const CVector *pos); // done
void ResetAudioLogicTimers(uint32 timer); // done
- void ResetPoliceRadio(); //
- void ResetTimers(uint32 time); //
+ void ResetPoliceRadio(); // done
+ void ResetTimers(uint32 time); // done
void Service(); //done
- void ServiceCollisions();
+ void ServiceCollisions(); //done
void ServicePoliceRadio();
void ServicePoliceRadioChannel(int32 wantedLevel);
void ServiceSoundEffects();
@@ -408,13 +409,13 @@ public:
void SetupPedComments(cPedParams *params, uint32 sound);
void SetupSuspectLastSeenReport();
- void Terminate();
- void TranslateEntity(Const CVector *v1, CVector *v2) const;
+ void Terminate(); //done
+ void TranslateEntity(Const CVector *v1, CVector *v2) const; //done
void UpdateReflections();
bool UsesReverseWarning(int32 model) const; //done
- bool UsesSiren(int32 model) const;
- bool UsesSirenSwitching(int32 model) const;
+ bool UsesSiren(cVehicleParams *params) const; //done
+ bool UsesSirenSwitching(cVehicleParams* params) const; //done
CVehicle *FindVehicleOfPlayer(); //done
void SetPedTalkingStatus(CPed *ped, uint8 status);
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index fde92590..4653acb7 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -374,7 +374,7 @@ cMusicManager::Service()
field_399A = true;
if (!field_3999 && !AudioManager.m_nUserPause && AudioManager.m_nPreviousUserPause)
field_3999 = true;
- if (AudioManager.field_5554 % 4 == 0) {
+ if (AudioManager.m_FrameCounter % 4 == 0) {
gNumRetunePresses = 0;
gRetuneCounter = 0;
field_2 = false;
@@ -422,7 +422,7 @@ cMusicManager::ServiceFrontEndMode()
m_nPlayingTrack = NO_TRACK;
}
- if (AudioManager.field_5554 % 4 != 0) return;
+ if (AudioManager.m_FrameCounter % 4 != 0) return;
if (!field_398F && !field_3995) {
m_nStreamedTrack = m_nFrontendTrack;
@@ -893,7 +893,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
{
field_398F = true;
SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
- if (!(AudioManager.field_5554 & 1)) {
+ if (!(AudioManager.m_FrameCounter & 1)) {
if (field_3995 || !SampleManager.IsStreamPlaying(0)) {
bRadioStatsRecorded2 = false;
if (SampleManager.IsStreamPlaying(0)) {