mirror of
https://github.com/halpz/re3.git
synced 2025-03-04 03:39:41 +00:00
Merge branch 'miami' into lcs
This commit is contained in:
commit
0c55f331cf
|
@ -5275,7 +5275,10 @@ cAudioManager::SetupPedComments(cPedParams ¶ms, uint16 sound)
|
||||||
pedComment.m_nEntityIndex = m_sQueueSample.m_nEntityIndex;
|
pedComment.m_nEntityIndex = m_sQueueSample.m_nEntityIndex;
|
||||||
pedComment.m_vecPos = m_sQueueSample.m_vecPos;
|
pedComment.m_vecPos = m_sQueueSample.m_vecPos;
|
||||||
pedComment.m_fDistance = m_sQueueSample.m_fDistance;
|
pedComment.m_fDistance = m_sQueueSample.m_fDistance;
|
||||||
pedComment.m_bVolume = m_sQueueSample.m_nVolume;
|
pedComment.m_nVolume = m_sQueueSample.m_nVolume;
|
||||||
|
#if defined(EXTERNAL_3D_SOUND) && defined(FIX_BUGS)
|
||||||
|
pedComment.m_nEmittingVolume = emittingVol;
|
||||||
|
#endif
|
||||||
m_sPedComments.Add(&pedComment);
|
m_sPedComments.Add(&pedComment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8058,7 +8061,10 @@ cAudioManager::DebugPlayPedComment(int32 sound)
|
||||||
pedComment.m_nProcess = 10;
|
pedComment.m_nProcess = 10;
|
||||||
pedComment.m_nEntityIndex = 0;
|
pedComment.m_nEntityIndex = 0;
|
||||||
pedComment.m_fDistance = 0.0f;
|
pedComment.m_fDistance = 0.0f;
|
||||||
pedComment.m_bVolume = 99;
|
pedComment.m_nVolume = 99;
|
||||||
|
#if defined(EXTERNAL_3D_SOUND) && defined(FIX_BUGS)
|
||||||
|
pedComment.m_nEmittingVolume = 99;
|
||||||
|
#endif
|
||||||
|
|
||||||
pedComment.m_vecPos = CWorld::Players[0].m_pPed->GetPosition();
|
pedComment.m_vecPos = CWorld::Players[0].m_pPed->GetPosition();
|
||||||
|
|
||||||
|
@ -8072,7 +8078,7 @@ cPedComments::Add(tPedComment *com)
|
||||||
|
|
||||||
if (m_nCommentsInBank[m_nActiveBank] >= NUM_PED_COMMENTS_SLOTS) {
|
if (m_nCommentsInBank[m_nActiveBank] >= NUM_PED_COMMENTS_SLOTS) {
|
||||||
index = m_nIndexMap[m_nActiveBank][NUM_PED_COMMENTS_SLOTS - 1];
|
index = m_nIndexMap[m_nActiveBank][NUM_PED_COMMENTS_SLOTS - 1];
|
||||||
if (m_asPedComments[m_nActiveBank][index].m_bVolume > com->m_bVolume)
|
if (m_asPedComments[m_nActiveBank][index].m_nVolume > com->m_nVolume)
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
index = m_nCommentsInBank[m_nActiveBank]++;
|
index = m_nCommentsInBank[m_nActiveBank]++;
|
||||||
|
@ -8083,7 +8089,7 @@ cPedComments::Add(tPedComment *com)
|
||||||
uint32 i = 0;
|
uint32 i = 0;
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
for (i = 0; i < index; i++) {
|
for (i = 0; i < index; i++) {
|
||||||
if (m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][i]].m_bVolume < m_asPedComments[m_nActiveBank][index].m_bVolume) {
|
if (m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][i]].m_nVolume < m_asPedComments[m_nActiveBank][index].m_nVolume) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8129,7 +8135,7 @@ cPedComments::Process()
|
||||||
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
|
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
|
||||||
AudioManager.m_sQueueSample.m_nBankIndex = SFX_BANK_PED_COMMENTS;
|
AudioManager.m_sQueueSample.m_nBankIndex = SFX_BANK_PED_COMMENTS;
|
||||||
AudioManager.m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
AudioManager.m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
||||||
AudioManager.m_sQueueSample.m_nVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_bVolume;
|
AudioManager.m_sQueueSample.m_nVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nVolume;
|
||||||
AudioManager.m_sQueueSample.m_fDistance = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_fDistance;
|
AudioManager.m_sQueueSample.m_fDistance = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_fDistance;
|
||||||
AudioManager.m_sQueueSample.m_nLoopCount = 1;
|
AudioManager.m_sQueueSample.m_nLoopCount = 1;
|
||||||
#ifndef GTA_PS2
|
#ifndef GTA_PS2
|
||||||
|
@ -8137,8 +8143,12 @@ cPedComments::Process()
|
||||||
AudioManager.m_sQueueSample.m_nLoopEnd = -1;
|
AudioManager.m_sQueueSample.m_nLoopEnd = -1;
|
||||||
#endif
|
#endif
|
||||||
#ifdef EXTERNAL_3D_SOUND
|
#ifdef EXTERNAL_3D_SOUND
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
AudioManager.m_sQueueSample.m_nEmittingVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nEmittingVolume;
|
||||||
|
#else
|
||||||
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
|
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
|
||||||
#endif
|
#endif // FIX_BUGS
|
||||||
|
#endif // EXTERNAL_3D_SOUND
|
||||||
AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
|
AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
|
||||||
AudioManager.m_sQueueSample.m_SoundIntensity = 40.0f;
|
AudioManager.m_sQueueSample.m_SoundIntensity = 40.0f;
|
||||||
AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE;
|
AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE;
|
||||||
|
|
|
@ -70,8 +70,11 @@ public:
|
||||||
int32 m_nEntityIndex;
|
int32 m_nEntityIndex;
|
||||||
CVector m_vecPos;
|
CVector m_vecPos;
|
||||||
float m_fDistance;
|
float m_fDistance;
|
||||||
uint8 m_bVolume;
|
uint8 m_nVolume;
|
||||||
int8 m_nProcess;
|
int8 m_nProcess;
|
||||||
|
#if defined(EXTERNAL_3D_SOUND) && defined(FIX_BUGS)
|
||||||
|
uint8 m_nEmittingVolume;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(tPedComment, 28);
|
VALIDATE_SIZE(tPedComment, 28);
|
||||||
|
|
|
@ -310,7 +310,7 @@ extern wchar *AllocUnicode(const char*src);
|
||||||
|
|
||||||
#define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
|
#define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
|
||||||
|
|
||||||
#define Clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius))
|
#define Clamp2(v, center, radius) ((v) > (center) ? Min(v, center + radius) : Max(v, center - radius))
|
||||||
|
|
||||||
inline float sq(float x) { return x*x; }
|
inline float sq(float x) { return x*x; }
|
||||||
#define SQR(x) ((x) * (x))
|
#define SQR(x) ((x) * (x))
|
||||||
|
|
|
@ -501,8 +501,10 @@ bool LoadINISettings()
|
||||||
ReadIniIfExists("Audio", "MusicVolume", &FrontEndMenuManager.m_PrefsMusicVolume);
|
ReadIniIfExists("Audio", "MusicVolume", &FrontEndMenuManager.m_PrefsMusicVolume);
|
||||||
ReadIniIfExists("Audio", "MP3BoostVolume", &FrontEndMenuManager.m_PrefsMP3BoostVolume);
|
ReadIniIfExists("Audio", "MP3BoostVolume", &FrontEndMenuManager.m_PrefsMP3BoostVolume);
|
||||||
ReadIniIfExists("Audio", "Radio", &FrontEndMenuManager.m_PrefsRadioStation);
|
ReadIniIfExists("Audio", "Radio", &FrontEndMenuManager.m_PrefsRadioStation);
|
||||||
|
#ifdef EXTERNAL_3D_SOUND
|
||||||
ReadIniIfExists("Audio", "SpeakerType", &FrontEndMenuManager.m_PrefsSpeakers);
|
ReadIniIfExists("Audio", "SpeakerType", &FrontEndMenuManager.m_PrefsSpeakers);
|
||||||
ReadIniIfExists("Audio", "Provider", &FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
|
ReadIniIfExists("Audio", "Provider", &FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
|
||||||
|
#endif
|
||||||
ReadIniIfExists("Audio", "DynamicAcoustics", &FrontEndMenuManager.m_PrefsDMA);
|
ReadIniIfExists("Audio", "DynamicAcoustics", &FrontEndMenuManager.m_PrefsDMA);
|
||||||
ReadIniIfExists("Display", "Brightness", &FrontEndMenuManager.m_PrefsBrightness);
|
ReadIniIfExists("Display", "Brightness", &FrontEndMenuManager.m_PrefsBrightness);
|
||||||
ReadIniIfExists("Display", "DrawDistance", &FrontEndMenuManager.m_PrefsLOD);
|
ReadIniIfExists("Display", "DrawDistance", &FrontEndMenuManager.m_PrefsLOD);
|
||||||
|
@ -608,8 +610,10 @@ void SaveINISettings()
|
||||||
StoreIni("Audio", "MusicVolume", FrontEndMenuManager.m_PrefsMusicVolume);
|
StoreIni("Audio", "MusicVolume", FrontEndMenuManager.m_PrefsMusicVolume);
|
||||||
StoreIni("Audio", "MP3BoostVolume", FrontEndMenuManager.m_PrefsMP3BoostVolume);
|
StoreIni("Audio", "MP3BoostVolume", FrontEndMenuManager.m_PrefsMP3BoostVolume);
|
||||||
StoreIni("Audio", "Radio", FrontEndMenuManager.m_PrefsRadioStation);
|
StoreIni("Audio", "Radio", FrontEndMenuManager.m_PrefsRadioStation);
|
||||||
|
#ifdef EXTERNAL_3D_SOUND
|
||||||
StoreIni("Audio", "SpeakerType", FrontEndMenuManager.m_PrefsSpeakers);
|
StoreIni("Audio", "SpeakerType", FrontEndMenuManager.m_PrefsSpeakers);
|
||||||
StoreIni("Audio", "Provider", FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
|
StoreIni("Audio", "Provider", FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
|
||||||
|
#endif
|
||||||
StoreIni("Audio", "DynamicAcoustics", FrontEndMenuManager.m_PrefsDMA);
|
StoreIni("Audio", "DynamicAcoustics", FrontEndMenuManager.m_PrefsDMA);
|
||||||
StoreIni("Display", "Brightness", FrontEndMenuManager.m_PrefsBrightness);
|
StoreIni("Display", "Brightness", FrontEndMenuManager.m_PrefsBrightness);
|
||||||
StoreIni("Display", "DrawDistance", FrontEndMenuManager.m_PrefsLOD);
|
StoreIni("Display", "DrawDistance", FrontEndMenuManager.m_PrefsLOD);
|
||||||
|
|
Loading…
Reference in a new issue