1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 20:10:00 +00:00

Merge branch 'master' into miami

# Conflicts:
#	src/audio/AudioLogic.cpp
#	src/audio/AudioSamples.h
#	src/audio/soundlist.h
#	src/core/Frontend.cpp
#	src/core/Frontend.h
#	src/core/MenuScreens.cpp
#	src/peds/Ped.cpp
#	src/peds/PlayerPed.cpp
#	src/render/Hud.cpp
#	src/vehicles/Vehicle.h
This commit is contained in:
Sergeanur 2020-06-06 08:42:58 +03:00
commit afa4fa6510
8 changed files with 314 additions and 120 deletions

View file

@ -59,6 +59,67 @@ void
cAudioManager::PreInitialiseGameSpecificSetup() const cAudioManager::PreInitialiseGameSpecificSetup() const
{ {
BankStartOffset[SAMPLEBANK_MAIN] = SAMPLEBANK_START; BankStartOffset[SAMPLEBANK_MAIN] = SAMPLEBANK_START;
#ifdef GTA_PS2
BankStartOffset[SAMPLEBANK_CAR_PACARD] = SFX_CAR_ACCEL_1;
BankStartOffset[SAMPLEBANK_CAR_PATHFINDER] = SFX_CAR_ACCEL_2;
BankStartOffset[SAMPLEBANK_CAR_PORSCHE] = SFX_CAR_ACCEL_3;
BankStartOffset[SAMPLEBANK_CAR_SPIDER] = SFX_CAR_ACCEL_4;
BankStartOffset[SAMPLEBANK_CAR_MERC] = SFX_CAR_ACCEL_5;
BankStartOffset[SAMPLEBANK_CAR_MACKTRUCK] = SFX_CAR_ACCEL_6;
BankStartOffset[SAMPLEBANK_CAR_HOTROD] = SFX_CAR_ACCEL_7;
BankStartOffset[SAMPLEBANK_CAR_COBRA] = SFX_CAR_ACCEL_8;
BankStartOffset[SAMPLEBANK_CAR_NONE] = SFX_CAR_ACCEL_9;
BankStartOffset[SAMPLEBANK_FRONTEND] = SFX_PAGE_CHANGE_AND_BACK_LEFT;
BankStartOffset[SAMPLEBANK_TRAIN] = SFX_TRAIN_STATION_AMBIENCE_LOOP;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_1] = SFX_CLUB_1;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_2] = SFX_CLUB_2;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_3] = SFX_CLUB_3;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_4] = SFX_CLUB_4;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_5] = SFX_CLUB_5;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_6] = SFX_CLUB_6;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_7] = SFX_CLUB_7;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_8] = SFX_CLUB_8;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_9] = SFX_CLUB_9;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_10] = SFX_CLUB_10;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_11] = SFX_CLUB_11;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_12] = SFX_CLUB_12;
BankStartOffset[SAMPLEBANK_BUILDING_CLUB_RAGGA] = SFX_CLUB_RAGGA;
BankStartOffset[SAMPLEBANK_BUILDING_STRIP_CLUB_1] = SFX_STRIP_CLUB_1;
BankStartOffset[SAMPLEBANK_BUILDING_STRIP_CLUB_2] = SFX_STRIP_CLUB_2;
BankStartOffset[SAMPLEBANK_BUILDING_WORKSHOP] = SFX_WORKSHOP_1;
BankStartOffset[SAMPLEBANK_BUILDING_PIANO_BAR] = SFX_PIANO_BAR_1;
BankStartOffset[SAMPLEBANK_BUILDING_SAWMILL] = SFX_SAWMILL_LOOP;
BankStartOffset[SAMPLEBANK_BUILDING_DOG_FOOD_FACTORY] = SFX_DOG_FOOD_FACTORY;
BankStartOffset[SAMPLEBANK_BUILDING_LAUNDERETTE] = SFX_LAUNDERETTE_LOOP;
BankStartOffset[SAMPLEBANK_BUILDING_RESTAURANT_CHINATOWN] = SFX_RESTAURANT_CHINATOWN;
BankStartOffset[SAMPLEBANK_BUILDING_RESTAURANT_ITALY] = SFX_RESTAURANT_ITALY;
BankStartOffset[SAMPLEBANK_BUILDING_RESTAURANT_GENERIC_1] = SFX_RESTAURANT_GENERIC_1;
BankStartOffset[SAMPLEBANK_BUILDING_RESTAURANT_GENERIC_2] = SFX_RESTAURANT_GENERIC_2;
BankStartOffset[SAMPLEBANK_BUILDING_AIRPORT] = SFX_AIRPORT_ANNOUNCEMENT_1;
BankStartOffset[SAMPLEBANK_BUILDING_SHOP] = SFX_SHOP_LOOP;
BankStartOffset[SAMPLEBANK_BUILDING_CINEMA] = SFX_CINEMA_BASS_1;
BankStartOffset[SAMPLEBANK_BUILDING_DOCKS] = SFX_DOCKS_FOGHORN;
BankStartOffset[SAMPLEBANK_BUILDING_HOME] = SFX_HOME_1;
BankStartOffset[SAMPLEBANK_BUILDING_PORN_1] = SFX_PORN_1_LOOP;
BankStartOffset[SAMPLEBANK_BUILDING_PORN_2] = SFX_PORN_2_LOOP;
BankStartOffset[SAMPLEBANK_BUILDING_PORN_3] = SFX_PORN_3_LOOP;
BankStartOffset[SAMPLEBANK_BUILDING_POLICE_BALL] = SFX_POLICE_BALL_1;
BankStartOffset[SAMPLEBANK_BUILDING_BANK_ALARM] = SFX_BANK_ALARM_1;
BankStartOffset[SAMPLEBANK_BUILDING_RAVE_INDUSTRIAL] = SFX_RAVE_INDUSTRIAL;
BankStartOffset[SAMPLEBANK_BUILDING_RAVE_COMMERCIAL] = SFX_RAVE_COMMERCIAL;
BankStartOffset[SAMPLEBANK_BUILDING_RAVE_SUBURBAN] = SFX_RAVE_SUBURBAN;
BankStartOffset[SAMPLEBANK_BUILDING_RAVE_COMMERCIAL_2] = SFX_RAVE_COMMERCIAL_2;
BankStartOffset[SAMPLEBANK_BUILDING_39] = SFX_CLUB_1_1;
BankStartOffset[SAMPLEBANK_BUILDING_40] = SFX_CLUB_1_2;
BankStartOffset[SAMPLEBANK_BUILDING_41] = SFX_CLUB_1_3;
BankStartOffset[SAMPLEBANK_BUILDING_42] = SFX_CLUB_1_4;
BankStartOffset[SAMPLEBANK_BUILDING_43] = SFX_CLUB_1_5;
BankStartOffset[SAMPLEBANK_BUILDING_44] = SFX_CLUB_1_6;
BankStartOffset[SAMPLEBANK_BUILDING_45] = SFX_CLUB_1_7;
BankStartOffset[SAMPLEBANK_BUILDING_46] = SFX_CLUB_1_8;
BankStartOffset[SAMPLEBANK_BUILDING_47] = SFX_CLUB_1_9;
BankStartOffset[SAMPLEBANK_EXTRAS] = SFX_EXPLOSION_1;
#endif // GTA_PS2
BankStartOffset[SAMPLEBANK_PED] = SAMPLEBANK_PED_START; BankStartOffset[SAMPLEBANK_PED] = SAMPLEBANK_PED_START;
} }
@ -449,7 +510,7 @@ enum
struct tVehicleSampleData { struct tVehicleSampleData {
eSfxSample m_nAccelerationSampleIndex; eSfxSample m_nAccelerationSampleIndex;
uint8 m_bEngineSoundType; uint8 m_nBank;
eSfxSample m_nHornSample; eSfxSample m_nHornSample;
int32 m_nHornFrequency; int32 m_nHornFrequency;
uint8 m_nSirenOrAlarmSample; uint8 m_nSirenOrAlarmSample;
@ -1036,7 +1097,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams *params)
if (m_sQueueSample.m_nVolume != 0) { if (m_sQueueSample.m_nVolume != 0) {
if (automobile->GetStatus() == STATUS_SIMPLE) { if (automobile->GetStatus() == STATUS_SIMPLE) {
if (modificator < 0.02f) { if (modificator < 0.02f) {
m_sQueueSample.m_nSampleIndex = aVehicleSettings[params->m_nIndex].m_bEngineSoundType - 1 + SFX_CAR_IDLE_1; m_sQueueSample.m_nSampleIndex = aVehicleSettings[params->m_nIndex].m_nBank - CAR_SAMPLEBANKS_OFFSET + SFX_CAR_IDLE_1;
freq = modificator * 10000 + 22050; freq = modificator * 10000 + 22050;
m_sQueueSample.m_nCounter = 52; m_sQueueSample.m_nCounter = 52;
} else { } else {
@ -1045,7 +1106,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams *params)
} }
} else { } else {
if (automobile->m_fGasPedal < 0.05f) { if (automobile->m_fGasPedal < 0.05f) {
m_sQueueSample.m_nSampleIndex = aVehicleSettings[params->m_nIndex].m_bEngineSoundType - 1 + SFX_CAR_IDLE_1; m_sQueueSample.m_nSampleIndex = aVehicleSettings[params->m_nIndex].m_nBank - CAR_SAMPLEBANKS_OFFSET + SFX_CAR_IDLE_1;
freq = modificator * 10000 + 22050; freq = modificator * 10000 + 22050;
m_sQueueSample.m_nCounter = 52; m_sQueueSample.m_nCounter = 52;
} else { } else {
@ -1101,13 +1162,17 @@ cAudioManager::PlayerJustLeftCar(void) const
} }
void void
cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 unk1, uint8 counter, bool notLooping) cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping)
{ {
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, 50.f, m_sQueueSample.m_fDistance); m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, 50.f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) { if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = counter; m_sQueueSample.m_nCounter = counter;
m_sQueueSample.m_nSampleIndex = sample; m_sQueueSample.m_nSampleIndex = sample;
#ifdef GTA_PS2
m_sQueueSample.m_nBankIndex = bank;
#else
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN;
#endif // GTA_PS2
m_sQueueSample.m_bIs2D = false; m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = freq; m_sQueueSample.m_nFrequency = freq;
@ -1144,11 +1209,11 @@ cAudioManager::ProcessCesna(cVehicleParams *params)
} else if (nAccel < 60) { } else if (nAccel < 60) {
++nAccel; ++nAccel;
} }
AddPlayerCarSample(85 * (60 - nAccel) / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_IDLE, 0, 52, true); AddPlayerCarSample(85 * (60 - nAccel) / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_IDLE, SAMPLEBANK_MAIN, 52, true);
AddPlayerCarSample(85 * nAccel / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_REV, 0, 2, true); AddPlayerCarSample(85 * nAccel / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_REV, SAMPLEBANK_MAIN, 2, true);
} }
} else if (params->m_nIndex == DODO) { } else if (params->m_nIndex == DODO) {
AddPlayerCarSample(105, 17000, SFX_CESNA_IDLE, 0, 52, true); AddPlayerCarSample(105, 17000, SFX_CESNA_IDLE, SAMPLEBANK_MAIN, 52, true);
} else if (params->m_fDistance < SQR(200)) { } else if (params->m_fDistance < SQR(200)) {
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance); CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, 200.f, m_sQueueSample.m_fDistance); m_sQueueSample.m_nVolume = ComputeVolume(80, 200.f, m_sQueueSample.m_fDistance);
@ -1290,8 +1355,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
} else } else
freqModifier = 0; freqModifier = 0;
engineSoundType = aVehicleSettings[params->m_nIndex].m_bEngineSoundType; engineSoundType = aVehicleSettings[params->m_nIndex].m_nBank;
soundOffset = 3 * (engineSoundType - 1); soundOffset = 3 * (engineSoundType - CAR_SAMPLEBANKS_OFFSET);
if (accelerateState <= 0) { if (accelerateState <= 0) {
if (params->m_fVelocityChange < -0.001f) { if (params->m_fVelocityChange < -0.001f) {
if (channelUsed) { if (channelUsed) {
@ -1318,16 +1383,16 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
} }
if (gasPedalAudio > 0.05f) { if (gasPedalAudio > 0.05f) {
freq = (5000.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 19000; freq = (5000.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 19000;
if (engineSoundType == 6) if (engineSoundType == SAMPLEBANK_CAR_MACKTRUCK)
freq /= 2; freq /= 2;
AddPlayerCarSample((25.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 40, freq, (soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1), engineSoundType, 63, AddPlayerCarSample((25.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 40, freq, (soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1), engineSoundType, 63,
false); false);
} }
} }
freq = (10000.f * gasPedalAudio) + 22050; freq = (10000.f * gasPedalAudio) + 22050;
if (engineSoundType == 6) if (engineSoundType == SAMPLEBANK_CAR_MACKTRUCK)
freq /= 2; freq /= 2;
AddPlayerCarSample(110 - (40.f * gasPedalAudio), freq, (engineSoundType - 1 + SFX_CAR_IDLE_1), 0, 52, true); AddPlayerCarSample(110 - (40.f * gasPedalAudio), freq, (engineSoundType - CAR_SAMPLEBANKS_OFFSET + SFX_CAR_IDLE_1), SAMPLEBANK_MAIN, 52, true);
CurrentPretendGear = Max(1, currentGear); CurrentPretendGear = Max(1, currentGear);
} else { } else {
@ -1348,13 +1413,13 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
automobile->m_fGasPedalAudio = accelerationMultipler; automobile->m_fGasPedalAudio = accelerationMultipler;
} }
freq = freqModifier + baseFreq; freq = freqModifier + baseFreq;
if (engineSoundType == 6) if (engineSoundType == SAMPLEBANK_CAR_MACKTRUCK)
freq /= 2; freq /= 2;
if (channelUsed) { if (channelUsed) {
SampleManager.StopChannel(m_nActiveSamples); SampleManager.StopChannel(m_nActiveSamples);
bAccelSampleStopped = true; bAccelSampleStopped = true;
} }
AddPlayerCarSample(vol, freq, (engineSoundType - 1 + SFX_CAR_REV_1), 0, 2, true); AddPlayerCarSample(vol, freq, (engineSoundType - CAR_SAMPLEBANKS_OFFSET + SFX_CAR_REV_1), SAMPLEBANK_MAIN, 2, true);
} else { } else {
TranslateEntity(&m_sQueueSample.m_vecPos, &pos); TranslateEntity(&m_sQueueSample.m_vecPos, &pos);
if (bAccelSampleStopped) { if (bAccelSampleStopped) {
@ -1388,7 +1453,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
SampleManager.SetChannel3DPosition(m_nActiveSamples, pos.x, pos.y, pos.z); SampleManager.SetChannel3DPosition(m_nActiveSamples, pos.x, pos.y, pos.z);
SampleManager.SetChannel3DDistances(m_nActiveSamples, 50.f, 12.5f); SampleManager.SetChannel3DDistances(m_nActiveSamples, 50.f, 12.5f);
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050; freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
if (engineSoundType == 6) if (engineSoundType == SAMPLEBANK_CAR_MACKTRUCK)
freq /= 2; freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq); SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) { if (!channelUsed) {
@ -1411,7 +1476,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
--nCruising; --nCruising;
} }
freq = 27 * nCruising + freqModifier + 22050; freq = 27 * nCruising + freqModifier + 22050;
if (engineSoundType == 6) if (engineSoundType == SAMPLEBANK_CAR_MACKTRUCK)
freq /= 2; freq /= 2;
AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType, 64, true); AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType, 64, true);
} }
@ -3992,7 +4057,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
if (type == EXPLOSION_HELI) if (type == EXPLOSION_HELI)
m_sQueueSample.m_nFrequency = 8 * m_sQueueSample.m_nFrequency / 10; m_sQueueSample.m_nFrequency = 8 * m_sQueueSample.m_nFrequency / 10;
m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_EXTRAS;
break; break;
} }
pos = CExplosion::GetExplosionPosition(i); pos = CExplosion::GetExplosionPosition(i);
@ -4197,13 +4262,14 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bIs2D = false; m_sQueueSample.m_bIs2D = false;
emittingVolume = m_anRandomTable[2] % 20 + 90; emittingVolume = m_anRandomTable[2] % 20 + 90;
break; break;
/*case SCRIPT_SOUND_110: /*
case SCRIPT_SOUND_111: case SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1:
if (SampleManager.IsSampleBankLoaded(0) != 1) case SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2:
if (!SampleManager.IsSampleBankLoaded(SAMPLEBANK_TRAIN))
return; return;
m_sQueueSample.m_fSoundIntensity = 80.0f; m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_STATION_ANNOUNCE; m_sQueueSample.m_nSampleIndex = SFX_TRAIN_STATION_ANNOUNCE;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_TRAIN;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_STATION_ANNOUNCE); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_STATION_ANNOUNCE);
m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nReleasingVolumeModificator = 0;
@ -4400,7 +4466,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_1_LOOP_S: case SCRIPT_SOUND_PARTY_1_LOOP_S:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1; m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4410,7 +4476,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_1_LOOP_L: case SCRIPT_SOUND_PARTY_1_LOOP_L:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1; m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4420,7 +4486,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_2_LOOP_S: case SCRIPT_SOUND_PARTY_2_LOOP_S:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2; m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_2;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4430,7 +4496,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_2_LOOP_L: case SCRIPT_SOUND_PARTY_2_LOOP_L:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2; m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_2;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4440,7 +4506,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_3_LOOP_S: case SCRIPT_SOUND_PARTY_3_LOOP_S:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3; m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_3;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4450,7 +4516,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_3_LOOP_L: case SCRIPT_SOUND_PARTY_3_LOOP_L:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3; m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_3;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4460,7 +4526,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_4_LOOP_S: case SCRIPT_SOUND_PARTY_4_LOOP_S:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4; m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_4;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4470,7 +4536,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_4_LOOP_L: case SCRIPT_SOUND_PARTY_4_LOOP_L:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4; m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_4;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4480,7 +4546,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
case SCRIPT_SOUND_PARTY_1_LOOP: case SCRIPT_SOUND_PARTY_1_LOOP:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1; m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME; emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
@ -4530,7 +4596,7 @@ cAudioManager::ProcessWeather(int32 id)
if (m_asAudioEntities[id].m_AudioEvents && m_asAudioEntities[id].m_awAudioEvent[0] == SOUND_LIGHTNING) { if (m_asAudioEntities[id].m_AudioEvents && m_asAudioEntities[id].m_awAudioEvent[0] == SOUND_LIGHTNING) {
if (m_asAudioEntities[id].m_afVolume[0] >= 10.f) { if (m_asAudioEntities[id].m_afVolume[0] >= 10.f) {
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1; m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_EXTRAS;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000; m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000;
vol = (m_asAudioEntities[id].m_afVolume[0] - 10.f) + 40; vol = (m_asAudioEntities[id].m_afVolume[0] - 10.f) + 40;
} else { } else {
@ -4584,6 +4650,7 @@ cAudioManager::ProcessFrontEnd()
bool stereo; bool stereo;
bool processedPickup; bool processedPickup;
bool processedMission; bool processedMission;
bool frontendBank;
int16 sample; int16 sample;
static uint8 iSound = 0; static uint8 iSound = 0;
@ -4594,6 +4661,7 @@ cAudioManager::ProcessFrontEnd()
processedPickup = false; processedPickup = false;
stereo = false; stereo = false;
processedMission = false; processedMission = false;
frontendBank = false;
switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) { switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) {
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM: case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE; m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE;
@ -4630,7 +4698,7 @@ cAudioManager::ProcessFrontEnd()
// processedPickup = true; // processedPickup = true;
// stereo = true; // stereo = true;
// break; // break;
//case SOUND_4A: //case SOUND_PICKUP_ERROR:
// m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT; // m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
// processedPickup = true; // processedPickup = true;
// stereo = true; // stereo = true;
@ -4665,13 +4733,18 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT; m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT;
stereo = true; stereo = true;
break; break;
case SOUND_FRONTEND_MENU_COMPLETED: case SOUND_FRONTEND_MENU_NEW_PAGE:
m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT; m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT;
stereo = true; stereo = true;
frontendBank = true;
frontendBank = true;
break; break;
case SOUND_FRONTEND_MENU_SUCCESS: case SOUND_FRONTEND_MENU_SETTING_CHANGE:
m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT_LEFT; m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT_LEFT;
stereo = true; stereo = true;
frontendBank = true;
frontendBank = true;
frontendBank = true;
break; break;
//case SOUND_FRONTEND_EXIT: //case SOUND_FRONTEND_EXIT:
// m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT; // m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT;
@ -4682,6 +4755,7 @@ cAudioManager::ProcessFrontEnd()
// break; // break;
case SOUND_FRONTEND_FAIL: case SOUND_FRONTEND_FAIL:
m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT; m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT;
frontendBank = true;
stereo = true; stereo = true;
break; break;
case SOUND_FRONTEND_NO_RADIO: case SOUND_FRONTEND_NO_RADIO:
@ -4720,7 +4794,7 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nCounter = iSound++; m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bReleasingSoundFlag = true; m_sQueueSample.m_bReleasingSoundFlag = true;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = frontendBank ? SAMPLEBANK_FRONTEND : SAMPLEBANK_MAIN;
m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bIs2D = true; m_sQueueSample.m_bIs2D = true;
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume; m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
@ -5046,7 +5120,7 @@ cAudioManager::ProcessBridgeWarning()
if (m_sQueueSample.m_nVolume != 0) { if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING; m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_EXTRAS;
m_sQueueSample.m_bIs2D = false; m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);

View file

@ -217,7 +217,7 @@ public:
// "Should" be in alphabetic order, except "getXTalkSfx" // "Should" be in alphabetic order, except "getXTalkSfx"
void AddDetailsToRequestedOrderList(uint8 sample); void AddDetailsToRequestedOrderList(uint8 sample);
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 unk1, void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank,
uint8 counter, bool notLooping); uint8 counter, bool notLooping);
void AddReflectionsToRequestedQueue(); void AddReflectionsToRequestedQueue();
void AddReleasingSounds(); void AddReleasingSounds();

View file

@ -13,9 +13,83 @@ struct tSample {
int32 nLoopEnd; int32 nLoopEnd;
}; };
#ifdef GTA_PS2
#define PS2BANK(e) e
#else
#define PS2BANK(e) e = SAMPLEBANK_MAIN
#endif // GTA_PS2
enum enum
{ {
SAMPLEBANK_MAIN, SAMPLEBANK_MAIN,
CAR_SAMPLEBANKS_OFFSET,
SAMPLEBANK_CAR_PACARD = CAR_SAMPLEBANKS_OFFSET,
SAMPLEBANK_CAR_PATHFINDER,
SAMPLEBANK_CAR_PORSCHE,
SAMPLEBANK_CAR_SPIDER,
SAMPLEBANK_CAR_MERC,
SAMPLEBANK_CAR_MACKTRUCK,
SAMPLEBANK_CAR_HOTROD,
SAMPLEBANK_CAR_COBRA,
SAMPLEBANK_CAR_NONE,
PS2BANK(SAMPLEBANK_FRONTEND),
PS2BANK(SAMPLEBANK_TRAIN),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_1),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_2),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_3),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_4),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_5),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_6),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_7),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_8),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_9),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_10),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_11),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_12),
PS2BANK(SAMPLEBANK_BUILDING_CLUB_RAGGA),
PS2BANK(SAMPLEBANK_BUILDING_STRIP_CLUB_1),
PS2BANK(SAMPLEBANK_BUILDING_STRIP_CLUB_2),
PS2BANK(SAMPLEBANK_BUILDING_WORKSHOP),
PS2BANK(SAMPLEBANK_BUILDING_PIANO_BAR),
PS2BANK(SAMPLEBANK_BUILDING_SAWMILL),
PS2BANK(SAMPLEBANK_BUILDING_DOG_FOOD_FACTORY),
PS2BANK(SAMPLEBANK_BUILDING_LAUNDERETTE),
PS2BANK(SAMPLEBANK_BUILDING_RESTAURANT_CHINATOWN),
PS2BANK(SAMPLEBANK_BUILDING_RESTAURANT_ITALY),
PS2BANK(SAMPLEBANK_BUILDING_RESTAURANT_GENERIC_1),
PS2BANK(SAMPLEBANK_BUILDING_RESTAURANT_GENERIC_2),
PS2BANK(SAMPLEBANK_BUILDING_AIRPORT),
PS2BANK(SAMPLEBANK_BUILDING_SHOP),
PS2BANK(SAMPLEBANK_BUILDING_CINEMA),
PS2BANK(SAMPLEBANK_BUILDING_DOCKS),
PS2BANK(SAMPLEBANK_BUILDING_HOME),
PS2BANK(SAMPLEBANK_BUILDING_PORN_1),
PS2BANK(SAMPLEBANK_BUILDING_PORN_2),
PS2BANK(SAMPLEBANK_BUILDING_PORN_3),
PS2BANK(SAMPLEBANK_BUILDING_POLICE_BALL),
PS2BANK(SAMPLEBANK_BUILDING_BANK_ALARM),
PS2BANK(SAMPLEBANK_BUILDING_RAVE_INDUSTRIAL),
PS2BANK(SAMPLEBANK_BUILDING_RAVE_COMMERCIAL),
PS2BANK(SAMPLEBANK_BUILDING_RAVE_SUBURBAN),
PS2BANK(SAMPLEBANK_BUILDING_RAVE_COMMERCIAL_2),
PS2BANK(SAMPLEBANK_BUILDING_39),
PS2BANK(SAMPLEBANK_BUILDING_40),
PS2BANK(SAMPLEBANK_BUILDING_41),
PS2BANK(SAMPLEBANK_BUILDING_42),
PS2BANK(SAMPLEBANK_BUILDING_43),
PS2BANK(SAMPLEBANK_BUILDING_44),
PS2BANK(SAMPLEBANK_BUILDING_45),
PS2BANK(SAMPLEBANK_BUILDING_46),
PS2BANK(SAMPLEBANK_BUILDING_47),
PS2BANK(SAMPLEBANK_EXTRAS),
SAMPLEBANK_PED, SAMPLEBANK_PED,
MAX_SAMPLEBANKS, MAX_SAMPLEBANKS,
SAMPLEBANK_INVALID SAMPLEBANK_INVALID

View file

@ -196,10 +196,10 @@ enum eSound : uint16
SOUND_194, SOUND_194,
// TODO(Miami): They're frontend sounds but names are copy-paste and incorrect // TODO(Miami): They're frontend sounds but names are copy-paste and incorrect
SOUND_FRONTEND_MENU_COMPLETED, SOUND_FRONTEND_MENU_NEW_PAGE,
SOUND_FRONTEND_FAIL, SOUND_FRONTEND_FAIL,
SOUND_FRONTEND_MENU_SUCCESS, SOUND_FRONTEND_MENU_SETTING_CHANGE,
SOUND_FRONTEND_EXIT, SOUND_FRONTEND_MENU_BACK,
SOUND_FRONTEND_AUDIO_TEST, SOUND_FRONTEND_AUDIO_TEST,
SOUND_INJURED_PED_MALE_OUCH, SOUND_INJURED_PED_MALE_OUCH,
@ -322,8 +322,8 @@ enum eScriptSounds : uint16 {
SCRIPT_SOUND_BULLET_HIT_GROUND_2, SCRIPT_SOUND_BULLET_HIT_GROUND_2,
SCRIPT_SOUND_BULLET_HIT_GROUND_3, SCRIPT_SOUND_BULLET_HIT_GROUND_3,
SCRIPT_SOUND_BULLET_HIT_WATER, // no sound SCRIPT_SOUND_BULLET_HIT_WATER, // no sound
SCRIPT_SOUND_110, SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1,
SCRIPT_SOUND_111, SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2,
SCRIPT_SOUND_PAYPHONE_RINGING, SCRIPT_SOUND_PAYPHONE_RINGING,
SCRIPT_SOUND_113, SCRIPT_SOUND_113,
SCRIPT_SOUND_GLASS_BREAK_L, SCRIPT_SOUND_GLASS_BREAK_L,

View file

@ -319,7 +319,7 @@ CMenuManager::PageUpList(bool playSoundOnSuccess)
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
if (m_nFirstVisibleRowOnList > 0) { if (m_nFirstVisibleRowOnList > 0) {
if(playSoundOnSuccess) if(playSoundOnSuccess)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nFirstVisibleRowOnList = Max(0, m_nFirstVisibleRowOnList - MAX_VISIBLE_LIST_ROW); m_nFirstVisibleRowOnList = Max(0, m_nFirstVisibleRowOnList - MAX_VISIBLE_LIST_ROW);
m_nSelectedListRow = Min(m_nSelectedListRow, m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW - 1); m_nSelectedListRow = Min(m_nSelectedListRow, m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW - 1);
@ -337,7 +337,7 @@ CMenuManager::PageDownList(bool playSoundOnSuccess)
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
if (m_nFirstVisibleRowOnList < m_nTotalListRow - MAX_VISIBLE_LIST_ROW) { if (m_nFirstVisibleRowOnList < m_nTotalListRow - MAX_VISIBLE_LIST_ROW) {
if(playSoundOnSuccess) if(playSoundOnSuccess)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nFirstVisibleRowOnList = Min(m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW, m_nTotalListRow - MAX_VISIBLE_LIST_ROW); m_nFirstVisibleRowOnList = Min(m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW, m_nTotalListRow - MAX_VISIBLE_LIST_ROW);
m_nSelectedListRow = Max(m_nSelectedListRow, m_nFirstVisibleRowOnList); m_nSelectedListRow = Max(m_nSelectedListRow, m_nFirstVisibleRowOnList);
@ -690,7 +690,7 @@ CMenuManager::DisplayHelperText()
case 0: case 0:
{ {
int action = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action; int action = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
if (action != MENUACTION_CHANGEMENU && action != MENUACTION_REDEFCTRL && action != MENUACTION_RESTOREDEF) { if (action != MENUACTION_CHANGEMENU && action != MENUACTION_KEYBOARDCTRLS && action != MENUACTION_RESTOREDEF) {
CFont::SetColor(CRGBA(255, 255, 255, 255)); CFont::SetColor(CRGBA(255, 255, 255, 255));
CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_MIG")); CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_MIG"));
} }
@ -1722,7 +1722,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
if (!m_bKeyIsOK) if (!m_bKeyIsOK)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_bKeyIsOK = true; m_bKeyIsOK = true;
} else { } else {
@ -1936,7 +1936,7 @@ CMenuManager::DrawControllerSetupScreen()
float curOptY = i * rowHeight + yStart; float curOptY = i * rowHeight + yStart;
if (m_nMousePosY > MENU_Y(curOptY) && m_nMousePosY < MENU_Y(rowHeight + curOptY)) { if (m_nMousePosY > MENU_Y(curOptY) && m_nMousePosY < MENU_Y(rowHeight + curOptY)) {
if (m_nPrevOption != i && m_nCurrExLayer == HOVEROPTION_LIST) if (m_nPrevOption != i && m_nCurrExLayer == HOVEROPTION_LIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nPrevOption = i; m_nPrevOption = i;
if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) { if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) {
@ -1950,7 +1950,7 @@ CMenuManager::DrawControllerSetupScreen()
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(370.0f)) { if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(370.0f)) {
#endif #endif
if (m_nSelectedContSetupColumn != CONTSETUP_PED_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST) if (m_nSelectedContSetupColumn != CONTSETUP_PED_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nSelectedContSetupColumn = CONTSETUP_PED_COLUMN; m_nSelectedContSetupColumn = CONTSETUP_PED_COLUMN;
#ifdef FIX_BUGS #ifdef FIX_BUGS
@ -1959,7 +1959,7 @@ CMenuManager::DrawControllerSetupScreen()
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(370.0f) && m_nMousePosX < SCREEN_WIDTH) { } else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(370.0f) && m_nMousePosX < SCREEN_WIDTH) {
#endif #endif
if (m_nSelectedContSetupColumn != CONTSETUP_VEHICLE_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST) if (m_nSelectedContSetupColumn != CONTSETUP_VEHICLE_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN; m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN;
} }
@ -2648,13 +2648,13 @@ CMenuManager::DrawPlayerSetupScreen()
if (rowIdx == m_nSelectedListRow) { if (rowIdx == m_nSelectedListRow) {
m_nHoverOption = HOVEROPTION_NOT_HOVERING; m_nHoverOption = HOVEROPTION_NOT_HOVERING;
if (m_nSkinsTotal > 0) { if (m_nSkinsTotal > 0) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
strcpy(m_PrefsSkinFile, m_aSkinName); strcpy(m_PrefsSkinFile, m_aSkinName);
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile); CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
SaveSettings(); SaveSettings();
} }
} else { } else {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
m_nSelectedListRow = rowIdx; m_nSelectedListRow = rowIdx;
m_nHoverOption = HOVEROPTION_NOT_HOVERING; m_nHoverOption = HOVEROPTION_NOT_HOVERING;
@ -2810,7 +2810,7 @@ CMenuManager::DrawPlayerSetupScreen()
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26)) && m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|| m_nCurrExLayer == HOVEROPTION_BACK) { || m_nCurrExLayer == HOVEROPTION_BACK) {
if (m_nHoverOption != HOVEROPTION_BACK) if (m_nHoverOption != HOVEROPTION_BACK)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nHoverOption = HOVEROPTION_BACK; m_nHoverOption = HOVEROPTION_BACK;
@ -2821,7 +2821,7 @@ CMenuManager::DrawPlayerSetupScreen()
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26)) && m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|| m_nCurrExLayer == HOVEROPTION_USESKIN) { || m_nCurrExLayer == HOVEROPTION_USESKIN) {
if (m_nHoverOption != HOVEROPTION_USESKIN) if (m_nHoverOption != HOVEROPTION_USESKIN)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nHoverOption = HOVEROPTION_USESKIN; m_nHoverOption = HOVEROPTION_USESKIN;
@ -3502,7 +3502,7 @@ CMenuManager::ProcessButtonPresses(void)
field_159 = true; field_159 = true;
} }
else { else {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
ControlsManager.ClearSettingsAssociatedWithAction((e_ControllerAction)m_CurrCntrlAction, (eControllerType)i); ControlsManager.ClearSettingsAssociatedWithAction((e_ControllerAction)m_CurrCntrlAction, (eControllerType)i);
m_bKeyIsOK = false; m_bKeyIsOK = false;
@ -3589,7 +3589,7 @@ CMenuManager::ProcessButtonPresses(void)
++m_nPrevOption; ++m_nPrevOption;
} }
m_nOptionHighlightTransitionBlend = 0; m_nOptionHighlightTransitionBlend = 0;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
} }
} }
@ -3642,7 +3642,7 @@ CMenuManager::ProcessButtonPresses(void)
} }
if (CPad::GetPad(0)->GetTabJustDown()) { if (CPad::GetPad(0)->GetTabJustDown()) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_bShowMouse = false; m_bShowMouse = false;
switch (m_nCurrExLayer) { switch (m_nCurrExLayer) {
case HOVEROPTION_BACK: case HOVEROPTION_BACK:
@ -3678,7 +3678,7 @@ CMenuManager::ProcessButtonPresses(void)
if (!m_bPressedUpOnList) { if (!m_bPressedUpOnList) {
m_bPressedUpOnList = true; m_bPressedUpOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
ScrollUpListByOne(); ScrollUpListByOne();
} }
} else { } else {
@ -3700,7 +3700,7 @@ CMenuManager::ProcessButtonPresses(void)
if (!m_bPressedDownOnList) { if (!m_bPressedDownOnList) {
m_bPressedDownOnList = true; m_bPressedDownOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
ScrollDownListByOne(); ScrollDownListByOne();
} }
} else { } else {
@ -3716,7 +3716,7 @@ CMenuManager::ProcessButtonPresses(void)
m_bPressedPgUpOnList = true; m_bPressedPgUpOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
PageUpList(false); PageUpList(false);
} }
} }
@ -3728,14 +3728,14 @@ CMenuManager::ProcessButtonPresses(void)
m_bPressedPgDnOnList = true; m_bPressedPgDnOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
PageDownList(false); PageDownList(false);
} }
} }
if (CPad::GetPad(0)->GetHome()) { if (CPad::GetPad(0)->GetHome()) {
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
m_nFirstVisibleRowOnList = 0; m_nFirstVisibleRowOnList = 0;
} }
@ -3745,7 +3745,7 @@ CMenuManager::ProcessButtonPresses(void)
if (CPad::GetPad(0)->GetEnd()) { if (CPad::GetPad(0)->GetEnd()) {
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
m_nFirstVisibleRowOnList = m_nTotalListRow - MAX_VISIBLE_LIST_ROW; m_nFirstVisibleRowOnList = m_nTotalListRow - MAX_VISIBLE_LIST_ROW;
} }
@ -3772,7 +3772,7 @@ CMenuManager::ProcessButtonPresses(void)
break; break;
case HOVEROPTION_USESKIN: case HOVEROPTION_USESKIN:
if (m_nSkinsTotal > 0) { if (m_nSkinsTotal > 0) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin = m_pSkinListHead.nextSkin;
strcpy(m_PrefsSkinFile, m_aSkinName); strcpy(m_PrefsSkinFile, m_aSkinName);
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile); CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
@ -3839,12 +3839,12 @@ CMenuManager::ProcessButtonPresses(void)
} else { } else {
if (CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) { if (CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
goDown = true; goDown = true;
m_nOptionHighlightTransitionBlend = 0; m_nOptionHighlightTransitionBlend = 0;
} else if (CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) { } else if (CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
goUp = true; goUp = true;
m_nOptionHighlightTransitionBlend = 0; m_nOptionHighlightTransitionBlend = 0;
} }
@ -3874,7 +3874,7 @@ CMenuManager::ProcessButtonPresses(void)
} else if (CPad::GetPad(0)->GetLeftMouseJustDown()) { } else if (CPad::GetPad(0)->GetLeftMouseJustDown()) {
#ifdef TIDY_UP_PBP #ifdef TIDY_UP_PBP
if (m_nHoverOption >= HOVEROPTION_RADIO_0 && m_nHoverOption <= HOVEROPTION_RADIO_9) { if (m_nHoverOption >= HOVEROPTION_RADIO_0 && m_nHoverOption <= HOVEROPTION_RADIO_9) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = m_nHoverOption - HOVEROPTION_RADIO_0; m_PrefsRadioStation = m_nHoverOption - HOVEROPTION_RADIO_0;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3888,7 +3888,7 @@ CMenuManager::ProcessButtonPresses(void)
#else #else
switch (m_nHoverOption) { switch (m_nHoverOption) {
case HOVEROPTION_RADIO_0: case HOVEROPTION_RADIO_0:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = HEAD_RADIO; m_PrefsRadioStation = HEAD_RADIO;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3896,7 +3896,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_1: case HOVEROPTION_RADIO_1:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = DOUBLE_CLEF; m_PrefsRadioStation = DOUBLE_CLEF;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3904,7 +3904,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_2: case HOVEROPTION_RADIO_2:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = JAH_RADIO; m_PrefsRadioStation = JAH_RADIO;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3912,7 +3912,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_3: case HOVEROPTION_RADIO_3:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = RISE_FM; m_PrefsRadioStation = RISE_FM;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3920,7 +3920,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_4: case HOVEROPTION_RADIO_4:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = LIPS_106; m_PrefsRadioStation = LIPS_106;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3928,7 +3928,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_5: case HOVEROPTION_RADIO_5:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = GAME_FM; m_PrefsRadioStation = GAME_FM;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3936,7 +3936,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_6: case HOVEROPTION_RADIO_6:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = MSX_FM; m_PrefsRadioStation = MSX_FM;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3944,7 +3944,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_7: case HOVEROPTION_RADIO_7:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = FLASHBACK; m_PrefsRadioStation = FLASHBACK;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3952,7 +3952,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_8: case HOVEROPTION_RADIO_8:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = CHATTERBOX; m_PrefsRadioStation = CHATTERBOX;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -3960,7 +3960,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_9: case HOVEROPTION_RADIO_9:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = USERTRACK; m_PrefsRadioStation = USERTRACK;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4090,11 +4090,11 @@ CMenuManager::ProcessButtonPresses(void)
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) { || CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action; int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
if (option == MENUACTION_BRIGHTNESS || option == MENUACTION_DRAWDIST) if (option == MENUACTION_BRIGHTNESS || option == MENUACTION_DRAWDIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
else if (option == MENUACTION_SFXVOLUME) else if (option == MENUACTION_SFXVOLUME)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
else if (option == MENUACTION_MOUSESENS) else if (option == MENUACTION_MOUSESENS)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
if (CPad::GetPad(0)->GetBackJustDown()) { if (CPad::GetPad(0)->GetBackJustDown()) {
@ -4119,14 +4119,14 @@ CMenuManager::ProcessButtonPresses(void)
#ifdef PS2_LIKE_MENU #ifdef PS2_LIKE_MENU
if (CPad::GetPad(0)->GetLeftMouseJustDown() && hoveredBottomBarOption != -1) { if (CPad::GetPad(0)->GetLeftMouseJustDown() && hoveredBottomBarOption != -1) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
bottomBarActive = false; bottomBarActive = false;
curBottomBarOption = hoveredBottomBarOption; curBottomBarOption = hoveredBottomBarOption;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, false); ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, false);
return; return;
} else if (bottomBarActive) { } else if (bottomBarActive) {
if (CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetCrossJustDown()) { if (CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetCrossJustDown()) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
bottomBarActive = false; bottomBarActive = false;
// If there's a menu change with fade ongoing, finish it now // If there's a menu change with fade ongoing, finish it now
@ -4136,7 +4136,7 @@ CMenuManager::ProcessButtonPresses(void)
} else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown() } else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown()
|| CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) { || CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
if (curBottomBarOption > 0) if (curBottomBarOption > 0)
curBottomBarOption--; curBottomBarOption--;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true); ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
@ -4144,7 +4144,7 @@ CMenuManager::ProcessButtonPresses(void)
} else if (CPad::GetPad(0)->GetRightJustDown() || CPad::GetPad(0)->GetAnaloguePadRight() || CPad::GetPad(0)->GetDPadRightJustDown() } else if (CPad::GetPad(0)->GetRightJustDown() || CPad::GetPad(0)->GetAnaloguePadRight() || CPad::GetPad(0)->GetDPadRightJustDown()
|| CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) { || CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
if (curBottomBarOption < bbTabCount-1) if (curBottomBarOption < bbTabCount-1)
curBottomBarOption++; curBottomBarOption++;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true); ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
@ -4184,9 +4184,9 @@ CMenuManager::ProcessButtonPresses(void)
if (Slots[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot - 1] == SLOT_EMPTY) if (Slots[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot - 1] == SLOT_EMPTY)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
else else
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} else } else
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
} else { } else {
// This is duplicate, back button already processed below // This is duplicate, back button already processed below
#ifndef TIDY_UP_PBP #ifndef TIDY_UP_PBP
@ -4202,7 +4202,7 @@ CMenuManager::ProcessButtonPresses(void)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
} else { } else {
if (m_nCurrScreen != MENUPAGE_NEW_GAME_RELOAD) { if (m_nCurrScreen != MENUPAGE_NEW_GAME_RELOAD) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
} }
} else if (option != MENUACTION_CHANGEMENU && option != MENUACTION_BRIGHTNESS && option != MENUACTION_DRAWDIST } else if (option != MENUACTION_CHANGEMENU && option != MENUACTION_BRIGHTNESS && option != MENUACTION_DRAWDIST
@ -4211,7 +4211,7 @@ CMenuManager::ProcessButtonPresses(void)
&& option != MENUACTION_YES && option != MENUACTION_NO && option != MENUACTION_YES && option != MENUACTION_NO
&& option != MENUACTION_SCREENRES) { && option != MENUACTION_SCREENRES) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
if ((m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) || (m_nCurrScreen == MENUPAGE_SKIN_SELECT)) { if ((m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) || (m_nCurrScreen == MENUPAGE_SKIN_SELECT)) {
@ -4371,7 +4371,7 @@ CMenuManager::ProcessButtonPresses(void)
case MENUACTION_RESUME_FROM_SAVEZONE: case MENUACTION_RESUME_FROM_SAVEZONE:
RequestFrontEndShutDown(); RequestFrontEndShutDown();
break; break;
case MENUACTION_REDEFCTRL: case MENUACTION_KEYBOARDCTRLS:
SwitchToNewScreen(MENUPAGE_KEYBOARD_CONTROLS); SwitchToNewScreen(MENUPAGE_KEYBOARD_CONTROLS);
m_nSelectedListRow = 0; m_nSelectedListRow = 0;
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
@ -4426,7 +4426,7 @@ CMenuManager::ProcessButtonPresses(void)
if (selectedProvider != INVALID_AUDIO_PROVIDER) { if (selectedProvider != INVALID_AUDIO_PROVIDER) {
m_nPrefsAudio3DProviderIndex = DMAudio.SetCurrent3DProvider(m_nPrefsAudio3DProviderIndex); m_nPrefsAudio3DProviderIndex = DMAudio.SetCurrent3DProvider(m_nPrefsAudio3DProviderIndex);
if (selectedProvider == m_nPrefsAudio3DProviderIndex) { if (selectedProvider == m_nPrefsAudio3DProviderIndex) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SetHelperText(0); SetHelperText(0);
} else { } else {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
@ -4545,11 +4545,11 @@ CMenuManager::ProcessButtonPresses(void)
} }
break; break;
} }
case MENUACTION_KEYBOARDCTRLS: //case MENUACTION_KEYBOARDCTRLS:
SwitchToNewScreen(MENUPAGE_KEYBOARD_CONTROLS); // SwitchToNewScreen(MENUPAGE_KEYBOARD_CONTROLS);
m_nSelectedListRow = 0; // m_nSelectedListRow = 0;
m_nCurrExLayer = HOVEROPTION_LIST; // m_nCurrExLayer = HOVEROPTION_LIST;
break; // break;
} }
} }
ProcessOnOffMenuOptions(); ProcessOnOffMenuOptions();
@ -4557,7 +4557,7 @@ CMenuManager::ProcessButtonPresses(void)
if (goBack) { if (goBack) {
ResetHelperText(); ResetHelperText();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_EXIT, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_BACK, 0);
#ifdef PS2_LIKE_MENU #ifdef PS2_LIKE_MENU
if (m_nCurrScreen == MENUPAGE_PAUSE_MENU || bottomBarActive) { if (m_nCurrScreen == MENUPAGE_PAUSE_MENU || bottomBarActive) {
#else #else
@ -4669,7 +4669,7 @@ CMenuManager::ProcessButtonPresses(void)
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) { switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
case MENUACTION_RADIO: case MENUACTION_RADIO:
m_PrefsRadioStation += changeValueBy; m_PrefsRadioStation += changeValueBy;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
if (DMAudio.IsMP3RadioChannelAvailable()) { if (DMAudio.IsMP3RadioChannelAvailable()) {
if (m_PrefsRadioStation < WILDSTYLE) if (m_PrefsRadioStation < WILDSTYLE)
m_PrefsRadioStation = USERTRACK; m_PrefsRadioStation = USERTRACK;
@ -4697,14 +4697,14 @@ CMenuManager::ProcessButtonPresses(void)
if (m_PrefsUseWideScreen < 0) if (m_PrefsUseWideScreen < 0)
m_PrefsUseWideScreen = 2; m_PrefsUseWideScreen = 2;
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#endif #endif
case MENUACTION_SCREENRES: case MENUACTION_SCREENRES:
if (m_bGameNotLoaded) { if (m_bGameNotLoaded) {
RwChar** videoMods = _psGetVideoModeList(); RwChar** videoMods = _psGetVideoModeList();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
if (changeValueBy > 0) { if (changeValueBy > 0) {
do { do {
++m_nDisplayVideoMode; ++m_nDisplayVideoMode;
@ -4724,7 +4724,7 @@ CMenuManager::ProcessButtonPresses(void)
break; break;
#ifdef IMPROVED_VIDEOMODE #ifdef IMPROVED_VIDEOMODE
case MENUACTION_SCREENMODE: case MENUACTION_SCREENMODE:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nSelectedScreenMode = !m_nSelectedScreenMode; m_nSelectedScreenMode = !m_nSelectedScreenMode;
break; break;
#endif #endif
@ -4733,7 +4733,7 @@ CMenuManager::ProcessButtonPresses(void)
m_nPrefsAudio3DProviderIndex += changeValueBy; m_nPrefsAudio3DProviderIndex += changeValueBy;
m_nPrefsAudio3DProviderIndex = clamp(m_nPrefsAudio3DProviderIndex, 0, DMAudio.GetNum3DProvidersAvailable() - 1); m_nPrefsAudio3DProviderIndex = clamp(m_nPrefsAudio3DProviderIndex, 0, DMAudio.GetNum3DProvidersAvailable() - 1);
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
break; break;
case MENUACTION_SPEAKERCONF: case MENUACTION_SPEAKERCONF:
if (m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER) { if (m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER) {
@ -4741,13 +4741,13 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsSpeakers = clamp(m_PrefsSpeakers, 0, 2); m_PrefsSpeakers = clamp(m_PrefsSpeakers, 0, 2);
DMAudio.SetSpeakerConfig(m_PrefsSpeakers); DMAudio.SetSpeakerConfig(m_PrefsSpeakers);
SaveSettings(); SaveSettings();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
break; break;
case MENUACTION_CTRLMETHOD: case MENUACTION_CTRLMETHOD:
m_ControlMethod = !m_ControlMethod; m_ControlMethod = !m_ControlMethod;
CCamera::m_bUseMouse3rdPerson = !m_ControlMethod; CCamera::m_bUseMouse3rdPerson = !m_ControlMethod;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
} }
@ -4758,7 +4758,7 @@ CMenuManager::ProcessButtonPresses(void)
} else { } else {
m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN; m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN;
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
} }
} }
} }
@ -4769,27 +4769,27 @@ CMenuManager::ProcessOnOffMenuOptions()
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) { switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
case MENUACTION_CTRLVIBRATION: case MENUACTION_CTRLVIBRATION:
m_PrefsUseVibration = !m_PrefsUseVibration; m_PrefsUseVibration = !m_PrefsUseVibration;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_CTRLCONFIG: case MENUACTION_CTRLCONFIG:
CPad::GetPad(0)->Mode++; CPad::GetPad(0)->Mode++;
if (CPad::GetPad(0)->Mode > 3) if (CPad::GetPad(0)->Mode > 3)
CPad::GetPad(0)->Mode = 0; CPad::GetPad(0)->Mode = 0;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_FRAMESYNC: case MENUACTION_FRAMESYNC:
m_PrefsVsyncDisp = !m_PrefsVsyncDisp; m_PrefsVsyncDisp = !m_PrefsVsyncDisp;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_FRAMELIMIT: case MENUACTION_FRAMELIMIT:
m_PrefsFrameLimiter = !m_PrefsFrameLimiter; m_PrefsFrameLimiter = !m_PrefsFrameLimiter;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_TRAILS: case MENUACTION_TRAILS:
CMBlur::BlurOn = !CMBlur::BlurOn; CMBlur::BlurOn = !CMBlur::BlurOn;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
if (CMBlur::BlurOn) if (CMBlur::BlurOn)
CMBlur::MotionBlurOpen(Scene.camera); CMBlur::MotionBlurOpen(Scene.camera);
@ -4798,53 +4798,53 @@ CMenuManager::ProcessOnOffMenuOptions()
break; break;
case MENUACTION_SUBTITLES: case MENUACTION_SUBTITLES:
m_PrefsShowSubtitles = !m_PrefsShowSubtitles; m_PrefsShowSubtitles = !m_PrefsShowSubtitles;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#ifndef ASPECT_RATIO_SCALE #ifndef ASPECT_RATIO_SCALE
case MENUACTION_WIDESCREEN: case MENUACTION_WIDESCREEN:
m_PrefsUseWideScreen = !m_PrefsUseWideScreen; m_PrefsUseWideScreen = !m_PrefsUseWideScreen;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#endif #endif
case MENUACTION_SETDBGFLAG: case MENUACTION_SETDBGFLAG:
CTheScripts::InvertDebugFlag(); CTheScripts::InvertDebugFlag();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_SWITCHBIGWHITEDEBUGLIGHT: case MENUACTION_SWITCHBIGWHITEDEBUGLIGHT:
gbBigWhiteDebugLightSwitchedOn = !gbBigWhiteDebugLightSwitchedOn; gbBigWhiteDebugLightSwitchedOn = !gbBigWhiteDebugLightSwitchedOn;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_COLLISIONPOLYS: case MENUACTION_COLLISIONPOLYS:
gbShowCollisionPolys = !gbShowCollisionPolys; gbShowCollisionPolys = !gbShowCollisionPolys;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_SHOWHEADBOB: case MENUACTION_SHOWHEADBOB:
TheCamera.m_bHeadBob = !TheCamera.m_bHeadBob; TheCamera.m_bHeadBob = !TheCamera.m_bHeadBob;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_INVVERT: case MENUACTION_INVVERT:
MousePointerStateHelper.bInvertVertically = !MousePointerStateHelper.bInvertVertically; MousePointerStateHelper.bInvertVertically = !MousePointerStateHelper.bInvertVertically;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_DYNAMICACOUSTIC: case MENUACTION_DYNAMICACOUSTIC:
m_PrefsDMA = !m_PrefsDMA; m_PrefsDMA = !m_PrefsDMA;
DMAudio.SetDynamicAcousticModelingStatus(m_PrefsDMA); DMAudio.SetDynamicAcousticModelingStatus(m_PrefsDMA);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_MOUSESTEER: case MENUACTION_MOUSESTEER:
CVehicle::m_bDisableMouseSteering = !CVehicle::m_bDisableMouseSteering; CVehicle::m_bDisableMouseSteering = !CVehicle::m_bDisableMouseSteering;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#ifdef FREE_CAM #ifdef FREE_CAM
case MENUACTION_FREECAM: case MENUACTION_FREECAM:
TheCamera.bFreeCam = !TheCamera.bFreeCam; TheCamera.bFreeCam = !TheCamera.bFreeCam;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#endif #endif
@ -5284,7 +5284,7 @@ CMenuManager::PrintMap(void)
float x = ((mapPoint.x - diffX) / (m_fMapSize * 2)) * (WORLD_SIZE_X / MENU_MAP_WIDTH_SCALE) - (WORLD_SIZE_X / 2 + MENU_MAP_LEFT_OFFSET * MENU_MAP_LENGTH_UNIT); float x = ((mapPoint.x - diffX) / (m_fMapSize * 2)) * (WORLD_SIZE_X / MENU_MAP_WIDTH_SCALE) - (WORLD_SIZE_X / 2 + MENU_MAP_LEFT_OFFSET * MENU_MAP_LENGTH_UNIT);
float y = (WORLD_SIZE_Y / 2 - MENU_MAP_TOP_OFFSET * MENU_MAP_LENGTH_UNIT) - ((mapPoint.y - diffY) / (m_fMapSize * 2)) * (WORLD_SIZE_Y / MENU_MAP_HEIGHT_SCALE); float y = (WORLD_SIZE_Y / 2 - MENU_MAP_TOP_OFFSET * MENU_MAP_LENGTH_UNIT) - ((mapPoint.y - diffY) / (m_fMapSize * 2)) * (WORLD_SIZE_Y / MENU_MAP_HEIGHT_SCALE);
CRadar::ToggleTargetMarker(x, y); CRadar::ToggleTargetMarker(x, y);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
} }

View file

@ -255,7 +255,7 @@ enum eMenuAction
MENUACTION_PARSEHEAP, MENUACTION_PARSEHEAP,
// MENUACTION_MEMCARDSAVECONFIRM is that on VC enum?? // MENUACTION_MEMCARDSAVECONFIRM is that on VC enum??
MENUACTION_DEBUGSTREAM, MENUACTION_DEBUGSTREAM,
MENUACTION_REDEFCTRL, //MENUACTION_KEYBOARDCTRLS,
MENUACTION_GETKEY, MENUACTION_GETKEY,
MENUACTION_SHOWHEADBOB, MENUACTION_SHOWHEADBOB,
MENUACTION_UNK80, MENUACTION_UNK80,

View file

@ -5785,6 +5785,7 @@ CPed::SetWaitState(eWaitState state, void *time)
#ifdef FIX_BUGS #ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this); animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif #endif
break; break;
case WAITSTATE_PLAYANIM_COWER: case WAITSTATE_PLAYANIM_COWER:
waitAnim = ANIM_HANDSCOWER; waitAnim = ANIM_HANDSCOWER;
@ -6523,6 +6524,9 @@ CPed::Die(void)
uint8 uint8
CPed::DoesLOSBulletHitPed(CColPoint &colPoint) CPed::DoesLOSBulletHitPed(CColPoint &colPoint)
{ {
#ifdef FIX_BUGS
return 1;
#else
uint8 retVal = 2; uint8 retVal = 2;
float headZ = GetNodePosition(PED_HEAD).z; float headZ = GetNodePosition(PED_HEAD).z;
@ -6538,6 +6542,7 @@ CPed::DoesLOSBulletHitPed(CColPoint &colPoint)
retVal = 0; retVal = 0;
return retVal; return retVal;
#endif
} }
// --MIAMI: Done // --MIAMI: Done

View file

@ -13,6 +13,7 @@
#include "DMAudio.h" #include "DMAudio.h"
#include "HandlingMgr.h" #include "HandlingMgr.h"
#include "Train.h" #include "Train.h"
#include "AudioScriptObject.h"
static CTrainNode* pTrackNodes; static CTrainNode* pTrackNodes;
static int16 NumTrackNodes; static int16 NumTrackNodes;
@ -35,6 +36,8 @@ static float EngineTrackSpeed_S[4];
CVector CTrain::aStationCoors[3]; CVector CTrain::aStationCoors[3];
CVector CTrain::aStationCoors_S[4]; CVector CTrain::aStationCoors_S[4];
static bool bTrainArrivalAnnounced[3] = {false, false, false};
CTrain::CTrain(int32 id, uint8 CreatedBy) CTrain::CTrain(int32 id, uint8 CreatedBy)
: CVehicle(CreatedBy) : CVehicle(CreatedBy)
{ {
@ -642,10 +645,48 @@ CTrain::ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int1
#endif #endif
} }
void
PlayAnnouncement(uint8 sound, uint8 station)
{
// this was gone in a PC version but inlined on PS2
cAudioScriptObject *obj = new cAudioScriptObject;
obj->AudioId = sound;
obj->Posn = CTrain::aStationCoors[station];
obj->AudioEntity = AEHANDLE_NONE;
DMAudio.CreateOneShotScriptObject(obj);
}
void void
ProcessTrainAnnouncements(void) ProcessTrainAnnouncements(void)
{ {
// TODO but unused for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (!bTrainArrivalAnnounced[i]) {
float preDist = StationDist[i] - 100.0f;
if (preDist < 0.0f)
preDist += TotalLengthOfTrack;
if (EngineTrackPosition[j] > preDist && EngineTrackPosition[j] < StationDist[i]) {
bTrainArrivalAnnounced[i] = true;
PlayAnnouncement(SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1, i);
break;
}
} else {
float postDist = StationDist[i] + 10.0f;
#ifdef FIX_BUGS
if (postDist > TotalLengthOfTrack)
postDist -= TotalLengthOfTrack;
#else
if (postDist < 0.0f) // does this even make sense here?
postDist += TotalLengthOfTrack;
#endif
if (EngineTrackPosition[j] > StationDist[i] && EngineTrackPosition[j] < postDist) {
bTrainArrivalAnnounced[i] = false;
PlayAnnouncement(SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2, i);
break;
}
}
}
}
} }
void void