summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-06-08 13:29:55 +0200
committerSergeanur <s.anureev@yandex.ua>2020-06-08 13:29:55 +0200
commit8cd87236c98bc42cd98f80fc488460881cae2880 (patch)
treef8b7b5f9294f624b2947bb6e31546fa0fc9f699f /src/audio
parentMerge branch 'miami' into VC/MissionAudio (diff)
downloadre3-8cd87236c98bc42cd98f80fc488460881cae2880.tar
re3-8cd87236c98bc42cd98f80fc488460881cae2880.tar.gz
re3-8cd87236c98bc42cd98f80fc488460881cae2880.tar.bz2
re3-8cd87236c98bc42cd98f80fc488460881cae2880.tar.lz
re3-8cd87236c98bc42cd98f80fc488460881cae2880.tar.xz
re3-8cd87236c98bc42cd98f80fc488460881cae2880.tar.zst
re3-8cd87236c98bc42cd98f80fc488460881cae2880.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/AudioLogic.cpp23
-rw-r--r--src/audio/AudioManager.cpp2
-rw-r--r--src/audio/AudioManager.h18
-rw-r--r--src/audio/audio_enums.h31
4 files changed, 55 insertions, 19 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index ed27bdd3..a7d16dc4 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -149,10 +149,19 @@ cAudioManager::PostInitialiseGameSpecificSetup()
m_nPoliceChannelEntity = CreateEntity(AUDIOTYPE_POLICERADIO, (void *)1);
if (m_nPoliceChannelEntity >= 0)
SetEntityStatus(m_nPoliceChannelEntity, 1);
-
- m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void *)1);
+#ifdef GTA_BRIDGE
+ m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void*)1);
if (m_nBridgeEntity >= 0)
SetEntityStatus(m_nBridgeEntity, 1);
+#endif // GTA_BRIDGE
+ m_nEscalatorEntity = CreateEntity(AUDIOTYPE_ESCALATOR, (void*)1);
+ if (m_nEscalatorEntity >= 0)
+ SetEntityStatus(m_nEscalatorEntity, 1);
+
+ m_nExtraSoundsEntity = CreateEntity(AUDIOTYPE_EXTRA_SOUNDS, (void*)1);
+ if (m_nExtraSoundsEntity >= 0)
+ SetEntityStatus(m_nExtraSoundsEntity, 1);
+
m_sMissionAudio.m_nSampleIndex[0] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[0] = LOADING_STATUS_NOT_LOADED;
@@ -178,10 +187,20 @@ cAudioManager::PostInitialiseGameSpecificSetup()
void
cAudioManager::PreTerminateGameSpecificShutdown()
{
+#ifdef GTA_BRIDGE
if (m_nBridgeEntity >= 0) {
DestroyEntity(m_nBridgeEntity);
m_nBridgeEntity = AEHANDLE_NONE;
}
+#endif
+ if (m_nEscalatorEntity >= 0) {
+ DestroyEntity(m_nEscalatorEntity);
+ m_nEscalatorEntity = AEHANDLE_NONE;
+ }
+ if (m_nExtraSoundsEntity >= 0) {
+ DestroyEntity(m_nExtraSoundsEntity);
+ m_nExtraSoundsEntity = AEHANDLE_NONE;
+ }
if (m_nPoliceChannelEntity >= 0) {
DestroyEntity(m_nPoliceChannelEntity);
m_nPoliceChannelEntity = AEHANDLE_NONE;
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 97cdacf9..d8d28e1e 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -281,7 +281,7 @@ cAudioManager::DestroyAllGameCreatedEntities()
case AUDIOTYPE_PHYSICAL:
case AUDIOTYPE_EXPLOSION:
case AUDIOTYPE_WEATHER:
- case AUDIOTYPE_CRANE:
+ //case AUDIOTYPE_CRANE:
case AUDIOTYPE_GARAGE:
case AUDIOTYPE_FIREHYDRANT:
DestroyEntity(i);
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index e30c1068..e89efbd2 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -28,6 +28,7 @@ public:
uint8 m_nLoopsRemaining;
bool m_bRequireReflection; // Used for oneshots
uint8 m_nOffset;
+ uint8 field_4C;
int32 m_nReleasingVolumeDivider;
bool m_bIsProcessed;
bool m_bLoopEnded;
@@ -35,7 +36,7 @@ public:
int8 m_nVolumeChange;
};
-VALIDATE_SIZE(tSound, 92);
+VALIDATE_SIZE(tSound, 96);
class CPhysical;
class CAutomobile;
@@ -193,6 +194,14 @@ public:
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
cAudioScriptObjectManager m_sAudioScriptObjectManager;
+
+ // miami
+ uint8 field_4B30;
+ uint8 m_bPlayerMood;
+ uint32 field_4B34;
+ uint8 field_rest[4];
+ uint8 field_4B3C;
+
cPedComments m_sPedComments;
int32 m_nFireAudioEntity;
int32 m_nWaterCannonEntity;
@@ -202,7 +211,11 @@ public:
int32 m_nCollisionEntity;
cAudioCollisionManager m_sCollisionManager;
int32 m_nProjectileEntity;
+#ifdef GTA_BRIDGE
int32 m_nBridgeEntity;
+#endif
+ int32 m_nEscalatorEntity;
+ int32 m_nExtraSoundsEntity;
cMissionAudio m_sMissionAudio;
uint8 field_5538; // something related to phone dialogues
int32 m_anRandomTable[5];
@@ -210,6 +223,7 @@ public:
uint8 m_nUserPause;
uint8 m_nPreviousUserPause;
uint32 m_FrameCounter;
+ uint32 field_5554;
cAudioManager();
~cAudioManager();
@@ -408,7 +422,7 @@ public:
};
#ifdef AUDIO_MSS
-//static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
+static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
#endif
extern cAudioManager AudioManager;
diff --git a/src/audio/audio_enums.h b/src/audio/audio_enums.h
index 90b87f1d..1f13521b 100644
--- a/src/audio/audio_enums.h
+++ b/src/audio/audio_enums.h
@@ -1267,18 +1267,21 @@ enum AudioEntityHandle {
enum eAudioType : int32
{
AUDIOTYPE_PHYSICAL = 0,
- AUDIOTYPE_EXPLOSION = 1,
- AUDIOTYPE_FIRE = 2,
- AUDIOTYPE_WEATHER = 3,
- AUDIOTYPE_CRANE = 4,
- AUDIOTYPE_SCRIPTOBJECT = 5,
- AUDIOTYPE_BRIDGE = 6,
- AUDIOTYPE_COLLISION = 7,
- AUDIOTYPE_FRONTEND = 8,
- AUDIOTYPE_PROJECTILE = 9,
- AUDIOTYPE_GARAGE = 10,
- AUDIOTYPE_FIREHYDRANT = 11,
- AUDIOTYPE_WATERCANNON = 12,
- AUDIOTYPE_POLICERADIO = 13,
- TOTAL_AUDIO_TYPES = 14,
+ AUDIOTYPE_EXPLOSION,
+ AUDIOTYPE_FIRE,
+ AUDIOTYPE_WEATHER,
+ AUDIOTYPE_SCRIPTOBJECT,
+#ifdef GTA_BRIDGE
+ AUDIOTYPE_BRIDGE,
+#endif
+ AUDIOTYPE_COLLISION,
+ AUDIOTYPE_FRONTEND,
+ AUDIOTYPE_PROJECTILE,
+ AUDIOTYPE_GARAGE,
+ AUDIOTYPE_FIREHYDRANT,
+ AUDIOTYPE_WATERCANNON,
+ AUDIOTYPE_ESCALATOR,
+ AUDIOTYPE_EXTRA_SOUNDS,
+ AUDIOTYPE_POLICERADIO,
+ TOTAL_AUDIO_TYPES,
};