From e24513d2ad2eaf86a4deaaadc96c0d1be31cc8a4 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sat, 24 Oct 2020 18:10:51 +0200 Subject: Sfx audio logic --- src/audio/AudioManager.h | 108 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 101 insertions(+), 7 deletions(-) (limited to 'src/audio/AudioManager.h') diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 665e5b27..6794c2d3 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "audio_enums.h" #include "AudioCollision.h" @@ -91,8 +91,8 @@ public: m_nCommentsInBank[i] = 0; m_nActiveBank = 0; } - void Add(tPedComment *com); - void Process(); + void Add(tPedComment *com); // done + void Process(); // done }; VALIDATE_SIZE(cPedComments, 1164); @@ -200,7 +200,7 @@ public: uint8 m_nPlayerMood; uint32 m_nPlayerMoodTimer; uint8 field_rest[4]; - uint8 field_4B3C; + bool m_bGenericSfx; cPedComments m_sPedComments; int32 m_nFireAudioEntity; @@ -259,7 +259,101 @@ public: // functions returning talk sfx, // order from GetPedCommentSfx - // TODO: miami + int32 GetPlayerTalkSfx(CPed *ped, int16 sound); + int32 GetCopTalkSfx(CPed *ped, int16 sound); + int32 GetSwatTalkSfx(CPed *ped, int16 sound); + int32 GetFBITalkSfx(CPed *ped, int16 sound); + int32 GetArmyTalkSfx(CPed *ped, int16 sound); + int32 GetMedicTalkSfx(CPed *ped, int16 sound); + int32 GetFiremanTalkSfx(CPed *ped, int16 sound); + int32 GetDefaultTalkSfx(CPed *ped, int16 sound); + int32 GetHFYSTTalkSfx(CPed *ped, int16 sound); + int32 GetHFOSTTalkSfx(CPed *ped, int16 sound); + int32 GetHMYSTTalkSfx(CPed *ped, int16 sound); + int32 GetHMOSTTalkSfx(CPed *ped, int16 sound); + int32 GetHFYRITalkSfx(CPed *ped, int16 sound); + int32 GetHFORITalkSfx(CPed *ped, int16 sound); + int32 GetHMYRITalkSfx(CPed *ped, int16 sound); + int32 GetHMORITalkSfx(CPed *ped, int16 sound); + int32 GetHFYBETalkSfx(CPed *ped, int16 sound); + int32 GetHFOBETalkSfx(CPed *ped, int16 sound); + int32 GetHMYBETalkSfx(CPed *ped, int16 sound); + int32 GetHMOBETalkSfx(CPed *ped, int16 sound); + int32 GetHFYBUTalkSfx(CPed *ped, int16 sound); + int32 GetHFYMDTalkSfx(CPed *ped, int16 sound); + int32 GetHFYCGTalkSfx(CPed *ped, int16 sound); + int32 GetHFYPRTalkSfx(CPed *ped, int16 sound); + int32 GetHFOTRTalkSfx(CPed *ped, int16 sound); + int32 GetHMOTRTalkSfx(CPed *ped, int16 sound); + int32 GetHMYAPTalkSfx(CPed *ped, int16 sound); + int32 GetHMOCATalkSfx(CPed *ped, int16 sound); + int32 GetBMODKTalkSfx(CPed *ped, int16 sound); + int32 GetBMYCRTalkSfx(CPed *ped, int16 sound); + int32 GetBFYSTTalkSfx(CPed *ped, int16 sound); + int32 GetBFOSTTalkSfx(CPed *ped, int16 sound); + int32 GetBMYSTTalkSfx(CPed *ped, int16 sound); + int32 GetBMOSTTalkSfx(CPed *ped, int16 sound); + int32 GetBFYRITalkSfx(CPed *ped, int16 sound); + int32 GetBFORITalkSfx(CPed *ped, int16 sound); + int32 GetBMYRITalkSfx(CPed *ped, int16 sound); + int32 GetBFYBETalkSfx(CPed *ped, int16 sound); + int32 GetBMYBETalkSfx(CPed *ped, int16 sound); + int32 GetBFOBETalkSfx(CPed *ped, int16 sound); + int32 GetBMOBETalkSfx(CPed *ped, int16 sound); + int32 GetBMYBUTalkSfx(CPed *ped, int16 sound); + int32 GetBFYPRTalkSfx(CPed *ped, int16 sound); + int32 GetBFOTRTalkSfx(CPed *ped, int16 sound); + int32 GetBMOTRTalkSfx(CPed *ped, int16 sound); + int32 GetBMYPITalkSfx(CPed *ped, int16 sound); + int32 GetBMYBBTalkSfx(CPed *ped, int16 sound); + int32 GetWMYCRTalkSfx(CPed *ped, int16 sound); + int32 GetWFYSTTalkSfx(CPed *ped, int16 sound); + int32 GetWFOSTTalkSfx(CPed *ped, int16 sound); + int32 GetWMYSTTalkSfx(CPed *ped, int16 sound); + int32 GetWMOSTTalkSfx(CPed *ped, int16 sound); + int32 GetWFYRITalkSfx(CPed *ped, int16 sound); + int32 GetWFORITalkSfx(CPed *ped, int16 sound); + int32 GetWMYRITalkSfx(CPed *ped, int16 sound); + int32 GetWMORITalkSfx(CPed *ped, int16 sound); + int32 GetWFYBETalkSfx(CPed *ped, int16 sound); + int32 GetWMYBETalkSfx(CPed *ped, int16 sound); + int32 GetWFOBETalkSfx(CPed *ped, int16 sound); + int32 GetWMOBETalkSfx(CPed *ped, int16 sound); + int32 GetWMYCWTalkSfx(CPed *ped, int16 sound); + int32 GetWMYGOTalkSfx(CPed *ped, int16 sound); + int32 GetWFOGOTalkSfx(CPed *ped, int16 sound); + int32 GetWMOGOTalkSfx(CPed *ped, int16 sound); + int32 GetWFYLGTalkSfx(CPed *ped, int16 sound); + int32 GetWMYLGTalkSfx(CPed *ped, int16 sound); + int32 GetWFYBUTalkSfx(CPed *ped, int16 sound); + int32 GetWMYBUTalkSfx(CPed *ped, int16 sound); + int32 GetWMOBUTalkSfx(CPed *ped, int16 sound); + int32 GetWFYPRTalkSfx(CPed *ped, int16 sound); + int32 GetWFOTRTalkSfx(CPed *ped, int16 sound); + int32 GetWMOTRTalkSfx(CPed *ped, int16 sound); + int32 GetWMYPITalkSfx(CPed *ped, int16 sound); + int32 GetWMOCATalkSfx(CPed *ped, int16 sound); + int32 GetWFYJGTalkSfx(CPed *ped, int16 sound); + int32 GetWMYJGTalkSfx(CPed *ped, int16 sound); + int32 GetWFYSKTalkSfx(CPed *ped, int16 sound); + int32 GetWMYSKTalkSfx(CPed *ped, int16 sound); + int32 GetWFYSHTalkSfx(CPed *ped, int16 sound); + int32 GetWFOSHTalkSfx(CPed *ped, int16 sound); + int32 GetJFOTOTalkSfx(CPed *ped, int16 sound); + int32 GetJMOTOTalkSfx(CPed *ped, int16 sound); + int32 GetCBTalkSfx(CPed *ped, int16 sound); + int32 GetHNTalkSfx(CPed *ped, int16 sound); + int32 GetSGTalkSfx(CPed *ped, int16 sound); + int32 GetCLTalkSfx(CPed *ped, int16 sound); + int32 GetGDTalkSfx(CPed *ped, int16 sound); + int32 GetBKTalkSfx(CPed *ped, int16 sound); + int32 GetPGTalkSfx(CPed *ped, int16 sound); + int32 GetVICETalkSfx(CPed *ped, int16 sound, int16 model); + int32 GetWFYG1TalkSfx(CPed *ped, int16 sound); + int32 GetWFYG2TalkSfx(CPed *ped, int16 sound); + + int32 GetGenericMaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc) + int32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc) // end of functions returning talk sfx void GenerateIntegerRandomNumberTable(); @@ -276,7 +370,7 @@ public: int8 GetMissionScriptPoliceAudioPlayingStatus() const; uint8 GetNum3DProvidersAvailable() const; // done int32 GetPedCommentSfx(CPed *ped, int32 sound); - void GetPhrase(uint32 *phrase, uint32 *prevPhrase, uint32 sample, uint32 maxOffset) const; + void GetPhrase(int32 *phrase, int32 *prevPhrase, int32 sample, int32 maxOffset) const; float GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange); float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange); @@ -402,7 +496,7 @@ public: bool SetupJumboRumbleSound(uint8 emittingVol); bool SetupJumboTaxiSound(uint8 vol); bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); - void SetupPedComments(cPedParams *params, uint32 sound); + void SetupPedComments(cPedParams *params, uint32 sound); // done void SetupSuspectLastSeenReport(); void Terminate(); -- cgit v1.2.3