mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 22:49:01 +00:00
miamification of some audio structs
This commit is contained in:
parent
65032389a4
commit
8cd87236c9
6 changed files with 59 additions and 26 deletions
|
@ -149,10 +149,19 @@ cAudioManager::PostInitialiseGameSpecificSetup()
|
||||||
m_nPoliceChannelEntity = CreateEntity(AUDIOTYPE_POLICERADIO, (void *)1);
|
m_nPoliceChannelEntity = CreateEntity(AUDIOTYPE_POLICERADIO, (void *)1);
|
||||||
if (m_nPoliceChannelEntity >= 0)
|
if (m_nPoliceChannelEntity >= 0)
|
||||||
SetEntityStatus(m_nPoliceChannelEntity, 1);
|
SetEntityStatus(m_nPoliceChannelEntity, 1);
|
||||||
|
#ifdef GTA_BRIDGE
|
||||||
m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void *)1);
|
m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void*)1);
|
||||||
if (m_nBridgeEntity >= 0)
|
if (m_nBridgeEntity >= 0)
|
||||||
SetEntityStatus(m_nBridgeEntity, 1);
|
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_nSampleIndex[0] = NO_SAMPLE;
|
||||||
m_sMissionAudio.m_nLoadingStatus[0] = LOADING_STATUS_NOT_LOADED;
|
m_sMissionAudio.m_nLoadingStatus[0] = LOADING_STATUS_NOT_LOADED;
|
||||||
|
@ -178,10 +187,20 @@ cAudioManager::PostInitialiseGameSpecificSetup()
|
||||||
void
|
void
|
||||||
cAudioManager::PreTerminateGameSpecificShutdown()
|
cAudioManager::PreTerminateGameSpecificShutdown()
|
||||||
{
|
{
|
||||||
|
#ifdef GTA_BRIDGE
|
||||||
if (m_nBridgeEntity >= 0) {
|
if (m_nBridgeEntity >= 0) {
|
||||||
DestroyEntity(m_nBridgeEntity);
|
DestroyEntity(m_nBridgeEntity);
|
||||||
m_nBridgeEntity = AEHANDLE_NONE;
|
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) {
|
if (m_nPoliceChannelEntity >= 0) {
|
||||||
DestroyEntity(m_nPoliceChannelEntity);
|
DestroyEntity(m_nPoliceChannelEntity);
|
||||||
m_nPoliceChannelEntity = AEHANDLE_NONE;
|
m_nPoliceChannelEntity = AEHANDLE_NONE;
|
||||||
|
|
|
@ -281,7 +281,7 @@ cAudioManager::DestroyAllGameCreatedEntities()
|
||||||
case AUDIOTYPE_PHYSICAL:
|
case AUDIOTYPE_PHYSICAL:
|
||||||
case AUDIOTYPE_EXPLOSION:
|
case AUDIOTYPE_EXPLOSION:
|
||||||
case AUDIOTYPE_WEATHER:
|
case AUDIOTYPE_WEATHER:
|
||||||
case AUDIOTYPE_CRANE:
|
//case AUDIOTYPE_CRANE:
|
||||||
case AUDIOTYPE_GARAGE:
|
case AUDIOTYPE_GARAGE:
|
||||||
case AUDIOTYPE_FIREHYDRANT:
|
case AUDIOTYPE_FIREHYDRANT:
|
||||||
DestroyEntity(i);
|
DestroyEntity(i);
|
||||||
|
|
|
@ -28,6 +28,7 @@ public:
|
||||||
uint8 m_nLoopsRemaining;
|
uint8 m_nLoopsRemaining;
|
||||||
bool m_bRequireReflection; // Used for oneshots
|
bool m_bRequireReflection; // Used for oneshots
|
||||||
uint8 m_nOffset;
|
uint8 m_nOffset;
|
||||||
|
uint8 field_4C;
|
||||||
int32 m_nReleasingVolumeDivider;
|
int32 m_nReleasingVolumeDivider;
|
||||||
bool m_bIsProcessed;
|
bool m_bIsProcessed;
|
||||||
bool m_bLoopEnded;
|
bool m_bLoopEnded;
|
||||||
|
@ -35,7 +36,7 @@ public:
|
||||||
int8 m_nVolumeChange;
|
int8 m_nVolumeChange;
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(tSound, 92);
|
VALIDATE_SIZE(tSound, 96);
|
||||||
|
|
||||||
class CPhysical;
|
class CPhysical;
|
||||||
class CAutomobile;
|
class CAutomobile;
|
||||||
|
@ -193,6 +194,14 @@ public:
|
||||||
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
|
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
|
||||||
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
|
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
|
||||||
cAudioScriptObjectManager m_sAudioScriptObjectManager;
|
cAudioScriptObjectManager m_sAudioScriptObjectManager;
|
||||||
|
|
||||||
|
// miami
|
||||||
|
uint8 field_4B30;
|
||||||
|
uint8 m_bPlayerMood;
|
||||||
|
uint32 field_4B34;
|
||||||
|
uint8 field_rest[4];
|
||||||
|
uint8 field_4B3C;
|
||||||
|
|
||||||
cPedComments m_sPedComments;
|
cPedComments m_sPedComments;
|
||||||
int32 m_nFireAudioEntity;
|
int32 m_nFireAudioEntity;
|
||||||
int32 m_nWaterCannonEntity;
|
int32 m_nWaterCannonEntity;
|
||||||
|
@ -202,7 +211,11 @@ public:
|
||||||
int32 m_nCollisionEntity;
|
int32 m_nCollisionEntity;
|
||||||
cAudioCollisionManager m_sCollisionManager;
|
cAudioCollisionManager m_sCollisionManager;
|
||||||
int32 m_nProjectileEntity;
|
int32 m_nProjectileEntity;
|
||||||
|
#ifdef GTA_BRIDGE
|
||||||
int32 m_nBridgeEntity;
|
int32 m_nBridgeEntity;
|
||||||
|
#endif
|
||||||
|
int32 m_nEscalatorEntity;
|
||||||
|
int32 m_nExtraSoundsEntity;
|
||||||
cMissionAudio m_sMissionAudio;
|
cMissionAudio m_sMissionAudio;
|
||||||
uint8 field_5538; // something related to phone dialogues
|
uint8 field_5538; // something related to phone dialogues
|
||||||
int32 m_anRandomTable[5];
|
int32 m_anRandomTable[5];
|
||||||
|
@ -210,6 +223,7 @@ public:
|
||||||
uint8 m_nUserPause;
|
uint8 m_nUserPause;
|
||||||
uint8 m_nPreviousUserPause;
|
uint8 m_nPreviousUserPause;
|
||||||
uint32 m_FrameCounter;
|
uint32 m_FrameCounter;
|
||||||
|
uint32 field_5554;
|
||||||
|
|
||||||
cAudioManager();
|
cAudioManager();
|
||||||
~cAudioManager();
|
~cAudioManager();
|
||||||
|
@ -408,7 +422,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef AUDIO_MSS
|
#ifdef AUDIO_MSS
|
||||||
//static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
|
static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern cAudioManager AudioManager;
|
extern cAudioManager AudioManager;
|
||||||
|
|
|
@ -1267,18 +1267,21 @@ enum AudioEntityHandle {
|
||||||
enum eAudioType : int32
|
enum eAudioType : int32
|
||||||
{
|
{
|
||||||
AUDIOTYPE_PHYSICAL = 0,
|
AUDIOTYPE_PHYSICAL = 0,
|
||||||
AUDIOTYPE_EXPLOSION = 1,
|
AUDIOTYPE_EXPLOSION,
|
||||||
AUDIOTYPE_FIRE = 2,
|
AUDIOTYPE_FIRE,
|
||||||
AUDIOTYPE_WEATHER = 3,
|
AUDIOTYPE_WEATHER,
|
||||||
AUDIOTYPE_CRANE = 4,
|
AUDIOTYPE_SCRIPTOBJECT,
|
||||||
AUDIOTYPE_SCRIPTOBJECT = 5,
|
#ifdef GTA_BRIDGE
|
||||||
AUDIOTYPE_BRIDGE = 6,
|
AUDIOTYPE_BRIDGE,
|
||||||
AUDIOTYPE_COLLISION = 7,
|
#endif
|
||||||
AUDIOTYPE_FRONTEND = 8,
|
AUDIOTYPE_COLLISION,
|
||||||
AUDIOTYPE_PROJECTILE = 9,
|
AUDIOTYPE_FRONTEND,
|
||||||
AUDIOTYPE_GARAGE = 10,
|
AUDIOTYPE_PROJECTILE,
|
||||||
AUDIOTYPE_FIREHYDRANT = 11,
|
AUDIOTYPE_GARAGE,
|
||||||
AUDIOTYPE_WATERCANNON = 12,
|
AUDIOTYPE_FIREHYDRANT,
|
||||||
AUDIOTYPE_POLICERADIO = 13,
|
AUDIOTYPE_WATERCANNON,
|
||||||
TOTAL_AUDIO_TYPES = 14,
|
AUDIOTYPE_ESCALATOR,
|
||||||
|
AUDIOTYPE_EXTRA_SOUNDS,
|
||||||
|
AUDIOTYPE_POLICERADIO,
|
||||||
|
TOTAL_AUDIO_TYPES,
|
||||||
};
|
};
|
||||||
|
|
|
@ -126,9 +126,9 @@ enum Config {
|
||||||
|
|
||||||
NUM_SOUNDS_SAMPLES_BANKS = 2,
|
NUM_SOUNDS_SAMPLES_BANKS = 2,
|
||||||
NUM_SOUNDS_SAMPLES_SLOTS = 27,
|
NUM_SOUNDS_SAMPLES_SLOTS = 27,
|
||||||
NUM_AUDIOENTITIES = 200,
|
NUM_AUDIOENTITIES = 250,
|
||||||
|
|
||||||
NUM_AUDIO_REFLECTIONS = 5,
|
NUM_AUDIO_REFLECTIONS = 8,
|
||||||
NUM_SCRIPT_MAX_ENTITIES = 40,
|
NUM_SCRIPT_MAX_ENTITIES = 40,
|
||||||
|
|
||||||
NUM_GARAGE_STORED_CARS = 4,
|
NUM_GARAGE_STORED_CARS = 4,
|
||||||
|
|
|
@ -84,9 +84,6 @@ void CCranes::AddThisOneCrane(CEntity* pEntity)
|
||||||
pCrane->m_nTimeForNextCheck = 0;
|
pCrane->m_nTimeForNextCheck = 0;
|
||||||
pCrane->m_nCraneState = CCrane::IDLE;
|
pCrane->m_nCraneState = CCrane::IDLE;
|
||||||
pCrane->m_bWasMilitaryCrane = false;
|
pCrane->m_bWasMilitaryCrane = false;
|
||||||
pCrane->m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[NumCranes]);
|
|
||||||
if (pCrane->m_nAudioEntity >= 0)
|
|
||||||
DMAudio.SetEntityStatus(pCrane->m_nAudioEntity, 1);
|
|
||||||
pCrane->m_bIsTop = (MODELID_CRANE_1 != pEntity->GetModelIndex());
|
pCrane->m_bIsTop = (MODELID_CRANE_1 != pEntity->GetModelIndex());
|
||||||
#if 0
|
#if 0
|
||||||
// Is this used to avoid military crane?
|
// Is this used to avoid military crane?
|
||||||
|
@ -669,11 +666,11 @@ void CCranes::Load(uint8* buf, uint32 size)
|
||||||
if (pCrane->m_pVehiclePickedUp != nil)
|
if (pCrane->m_pVehiclePickedUp != nil)
|
||||||
pCrane->m_pVehiclePickedUp = CPools::GetVehiclePool()->GetSlot((uintptr)pCrane->m_pVehiclePickedUp - 1);
|
pCrane->m_pVehiclePickedUp = CPools::GetVehiclePool()->GetSlot((uintptr)pCrane->m_pVehiclePickedUp - 1);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < NUM_CRANES; i++) {
|
/*for (int i = 0; i < NUM_CRANES; i++) {
|
||||||
aCranes[i].m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[i]);
|
aCranes[i].m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[i]);
|
||||||
if (aCranes[i].m_nAudioEntity != 0)
|
if (aCranes[i].m_nAudioEntity != 0)
|
||||||
DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, 1);
|
DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, 1);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
VALIDATESAVEBUF(size);
|
VALIDATESAVEBUF(size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue