summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-10-23 15:56:34 +0200
committerSergeanur <s.anureev@yandex.ua>2020-10-23 15:56:34 +0200
commitca497e2cbdb1130a402a84b3a4e632c26af751df (patch)
treef5d91e7d998861e5a4dbb39f44e748ac5691d7aa /src
parentMissed nil (diff)
downloadre3-ca497e2cbdb1130a402a84b3a4e632c26af751df.tar
re3-ca497e2cbdb1130a402a84b3a4e632c26af751df.tar.gz
re3-ca497e2cbdb1130a402a84b3a4e632c26af751df.tar.bz2
re3-ca497e2cbdb1130a402a84b3a4e632c26af751df.tar.lz
re3-ca497e2cbdb1130a402a84b3a4e632c26af751df.tar.xz
re3-ca497e2cbdb1130a402a84b3a4e632c26af751df.tar.zst
re3-ca497e2cbdb1130a402a84b3a4e632c26af751df.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioLogic.cpp8
-rw-r--r--src/audio/MusicManager.cpp12
-rw-r--r--src/audio/soundlist.h155
-rw-r--r--src/control/Script.cpp32
-rw-r--r--src/vehicles/Train.cpp2
5 files changed, 73 insertions, 136 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 6ea93f6d..d4ddbda8 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -5085,7 +5085,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
static uint8 iSound = 0;
switch (sound) {
- case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S:
+ /*case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S:
case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L:
male.m_pPed = nil;
male.m_bDistanceCalculated = false;
@@ -5113,7 +5113,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
emittingVolume = RandomDisplacement(10) + 50;
- break;
+ break;*/
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
case SCRIPT_SOUND_BULLET_HIT_GROUND_2:
case SCRIPT_SOUND_BULLET_HIT_GROUND_3:
@@ -5328,7 +5328,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
float distSquared;
switch (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_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_1;
@@ -5427,7 +5427,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 8;
m_sQueueSample.m_nReleasingVolumeDivider = 10;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- break;
+ break;*/
default:
return;
}
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 4653acb7..adae2708 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -1160,13 +1160,13 @@ cMusicManager::SetMalibuClubTrackPos(uint8 scriptObject)
if (m_nStreamedTrack != STREAMED_SOUND_MALIBU_AMBIENT && m_nPlayingTrack != STREAMED_SOUND_MALIBU_AMBIENT) {
switch (scriptObject)
{
- case SCRIPT_SOUND_MALIBU_1:
+ case SCRIPT_SOUND_NEW_BUILDING_MALIBU_1:
m_aTracks[STREAMED_SOUND_MALIBU_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 8640;
break;
- case SCRIPT_SOUND_MALIBU_2:
+ case SCRIPT_SOUND_NEW_BUILDING_MALIBU_2:
m_aTracks[STREAMED_SOUND_MALIBU_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 286720;
break;
- case SCRIPT_SOUND_MALIBU_3:
+ case SCRIPT_SOUND_NEW_BUILDING_MALIBU_3:
m_aTracks[STREAMED_SOUND_MALIBU_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 509120;
break;
}
@@ -1183,13 +1183,13 @@ cMusicManager::SetStripClubTrackPos(uint8 scriptObject)
{
switch (scriptObject)
{
- case SCRIPT_SOUND_STRIPCLUB_1:
+ case SCRIPT_SOUND_NEW_BUILDING_STRIP_1:
m_aTracks[STREAMED_SOUND_STRIPCLUB_AMBIENT].m_nPosition = AudioManager.m_anRandomTable[0] % 128;
break;
- case SCRIPT_SOUND_STRIPCLUB_2:
+ case SCRIPT_SOUND_NEW_BUILDING_STRIP_2:
m_aTracks[STREAMED_SOUND_STRIPCLUB_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 320200;
break;
- case SCRIPT_SOUND_STRIPCLUB_3:
+ case SCRIPT_SOUND_NEW_BUILDING_STRIP_3:
m_aTracks[STREAMED_SOUND_STRIPCLUB_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 672000;
break;
}
diff --git a/src/audio/soundlist.h b/src/audio/soundlist.h
index 2a3182ab..0521b576 100644
--- a/src/audio/soundlist.h
+++ b/src/audio/soundlist.h
@@ -212,123 +212,64 @@ enum eSound : uint16
enum eScriptSounds : uint16 {
- SCRIPT_SOUND_0 = 0,
- SCRIPT_SOUND_1,
- SCRIPT_SOUND_2,
- SCRIPT_SOUND_3,
- SCRIPT_SOUND_PARTY_1_LOOP_S,
- SCRIPT_SOUND_PARTY_1_LOOP_L,
- SCRIPT_SOUND_PARTY_2_LOOP_S,
- SCRIPT_SOUND_PARTY_2_LOOP_L,
- SCRIPT_SOUND_PARTY_3_LOOP_S,
- SCRIPT_SOUND_PARTY_3_LOOP_L,
- SCRIPT_SOUND_PARTY_4_LOOP_S,
- SCRIPT_SOUND_PARTY_4_LOOP_L,
- SCRIPT_SOUND_PARTY_5_LOOP_S,
- SCRIPT_SOUND_PARTY_5_LOOP_L,
- SCRIPT_SOUND_PARTY_6_LOOP_S,
- SCRIPT_SOUND_PARTY_6_LOOP_L,
- SCRIPT_SOUND_PARTY_7_LOOP_S,
- SCRIPT_SOUND_PARTY_7_LOOP_L,
- SCRIPT_SOUND_PARTY_8_LOOP_S,
- SCRIPT_SOUND_PARTY_8_LOOP_L,
- SCRIPT_SOUND_PARTY_9_LOOP_S,
- SCRIPT_SOUND_PARTY_9_LOOP_L,
- SCRIPT_SOUND_PARTY_10_LOOP_S,
- SCRIPT_SOUND_PARTY_10_LOOP_L,
- SCRIPT_SOUND_PARTY_11_LOOP_S,
- SCRIPT_SOUND_PARTY_11_LOOP_L,
- SCRIPT_SOUND_PARTY_12_LOOP_S,
- SCRIPT_SOUND_PARTY_12_LOOP_L,
- SCRIPT_SOUND_PARTY_13_LOOP_S,
- SCRIPT_SOUND_PARTY_13_LOOP_L,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_1_S,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_1_L,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_2_S,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_2_L,
- SCRIPT_SOUND_WORK_SHOP_LOOP_S,
- SCRIPT_SOUND_WORK_SHOP_LOOP_L,
- SCRIPT_SOUND_SAWMILL_LOOP_S,
- SCRIPT_SOUND_SAWMILL_LOOP_L,
- SCRIPT_SOUND_38,
- SCRIPT_SOUND_39,
-
- // MIAMI: only these are true so far
- SCRIPT_SOUND_MALIBU_1,
- SCRIPT_SOUND_MALIBU_2,
- SCRIPT_SOUND_MALIBU_3,
- SCRIPT_SOUND_STRIPCLUB_1,
- SCRIPT_SOUND_STRIPCLUB_2,
- SCRIPT_SOUND_STRIPCLUB_3,
-
- SCRIPT_SOUND_46_S,
- SCRIPT_SOUND_47_L,
- SCRIPT_SOUND_MARCO_BISTRO_S,
- SCRIPT_SOUND_MARCO_BISTRO_L,
- SCRIPT_SOUND_AIRPORT_LOOP_S,
- SCRIPT_SOUND_AIRPORT_LOOP_L,
- SCRIPT_SOUND_SHOP_LOOP_S,
- SCRIPT_SOUND_SHOP_LOOP_L,
- SCRIPT_SOUND_CINEMA_LOOP_S,
- SCRIPT_SOUND_CINEMA_LOOP_L,
- SCRIPT_SOUND_DOCKS_LOOP_S,
- SCRIPT_SOUND_DOCKS_LOOP_L,
- SCRIPT_SOUND_HOME_LOOP_S,
- SCRIPT_SOUND_HOME_LOOP_L,
- SCRIPT_SOUND_FRANKIE_PIANO,
- SCRIPT_SOUND_PARTY_1_LOOP,
- SCRIPT_SOUND_PORN_CINEMA_1_S,
- SCRIPT_SOUND_PORN_CINEMA_1_L,
- SCRIPT_SOUND_PORN_CINEMA_2_S,
- SCRIPT_SOUND_PORN_CINEMA_2_L,
- SCRIPT_SOUND_PORN_CINEMA_3_S,
- SCRIPT_SOUND_PORN_CINEMA_3_L,
- SCRIPT_SOUND_BANK_ALARM_LOOP_S,
- SCRIPT_SOUND_BANK_ALARM_LOOP_L,
- SCRIPT_SOUND_POLICE_BALL_LOOP_S,
- SCRIPT_SOUND_POLICE_BALL_LOOP_L,
- SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_S,
- SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_L,
- SCRIPT_SOUND_74,
- SCRIPT_SOUND_75,
- SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S,
- SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_L,
- SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S,
- SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L,
- SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_S,
- SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_L,
- SCRIPT_SOUND_EVIDENCE_PICKUP,
- SCRIPT_SOUND_UNLOAD_GOLD,
- SCRIPT_SOUND_RAVE_1_LOOP_S,
- SCRIPT_SOUND_RAVE_1_LOOP_L,
- SCRIPT_SOUND_RAVE_2_LOOP_S,
- SCRIPT_SOUND_RAVE_2_LOOP_L,
- SCRIPT_SOUND_RAVE_3_LOOP_S,
- SCRIPT_SOUND_RAVE_3_LOOP_L,
- SCRIPT_SOUND_MISTY_SEX_S,
- SCRIPT_SOUND_MISTY_SEX_L,
- SCRIPT_SOUND_GATE_START_CLUNK,
- SCRIPT_SOUND_GATE_STOP_CLUNK,
+ SCRIPT_SOUND_BANK_ALARM_LOOP = 0,
SCRIPT_SOUND_PART_MISSION_COMPLETE,
- SCRIPT_SOUND_CHUNKY_RUN_SHOUT,
- SCRIPT_SOUND_SECURITY_GUARD_AWAY_SHOUT,
+ SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP,
+ SCRIPT_SOUND_POLICE_CELL_DOOR_CLUNK,
+ SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP,
+ SCRIPT_SOUND_GARAGE_DOOR_CLUNK,
+ SCRIPT_SOUND_SNORING_LOOP,
SCRIPT_SOUND_RACE_START_3,
SCRIPT_SOUND_RACE_START_2,
SCRIPT_SOUND_RACE_START_1,
SCRIPT_SOUND_RACE_START_GO,
- SCRIPT_SOUND_SWAT_PED_SHOUT,
- SCRIPT_SOUND_PRETEND_FIRE_LOOP,
- SCRIPT_SOUND_AMMUNATION_CHAT_1,
- SCRIPT_SOUND_AMMUNATION_CHAT_2,
- SCRIPT_SOUND_AMMUNATION_CHAT_3,
+ SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP,
+ SCRIPT_SOUND_SHOOTING_RANGE_TARGET_HIT,
+ SCRIPT_SOUND_AMMUNATION_BUY_WEAPON,
+ SCRIPT_SOUND_AMMUNATION_BUY_WEAPON_DENIED,
+ SCRIPT_SOUND_WMYCW_TICKET_SPEECH,
+ SCRIPT_SOUND_IMRAN_ARM_BOMB,
+ SCRIPT_SOUND_ANDY_SNIPER_SHOT,
+ SCRIPT_SOUND_WILLIE_CARD_SWIPE,
+ SCRIPT_SOUND_MALE_AMBULANCE_OUCH,
+ SCRIPT_SOUND_FEMALE_AMBULANCE_OUCH,
+ SCRIPT_SOUND_BUILDING_BAR_1,
+ SCRIPT_SOUND_BUILDING_BAR_2,
+ SCRIPT_SOUND_BUILDING_BAR_3,
+ SCRIPT_SOUND_BUILDING_BAR_4,
+ SCRIPT_SOUND_BUILDING_BIKER_BAR,
+ SCRIPT_SOUND_BUILDING_CHURCH,
+ SCRIPT_SOUND_BUILDING_CLUB,
+ SCRIPT_SOUND_BUILDING_CUBA_1,
+ SCRIPT_SOUND_BUILDING_CUBA_2,
+ SCRIPT_SOUND_BUILDING_VOODOO,
+ SCRIPT_SOUND_BUILDING_MUSIC_SHOP,
+ SCRIPT_SOUND_BUILDING_STRIPCLUB_1,
+ SCRIPT_SOUND_BUILDING_STRIPCLUB_2,
+ SCRIPT_SOUND_BUILDING_SUPERSWEEP,
+ SCRIPT_SOUND_SEAPLANE_LOW_FUEL,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_1,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_2,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_3,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_4,
+ SCRIPT_SOUND_NEW_BUILDING_MALIBU_1,
+ SCRIPT_SOUND_NEW_BUILDING_MALIBU_2,
+ SCRIPT_SOUND_NEW_BUILDING_MALIBU_3,
+ SCRIPT_SOUND_NEW_BUILDING_STRIP_1,
+ SCRIPT_SOUND_NEW_BUILDING_STRIP_2,
+ SCRIPT_SOUND_NEW_BUILDING_STRIP_3,
+ SCRIPT_SOUND_NEW_BUILDING_CHURCH,
+ SCRIPT_SOUND_NEW_BUILDING_FAN_1,
+ SCRIPT_SOUND_NEW_BUILDING_FAN_2,
+ SCRIPT_SOUND_NEW_BUILDING_INSECT_1,
+ SCRIPT_SOUND_NEW_BUILDING_INSECT_2,
+ SCRIPT_SOUND_NEW_WATERFALL,
SCRIPT_SOUND_BULLET_HIT_GROUND_1,
SCRIPT_SOUND_BULLET_HIT_GROUND_2,
SCRIPT_SOUND_BULLET_HIT_GROUND_3,
SCRIPT_SOUND_BULLET_HIT_WATER, // no sound
- SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1,
- SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2,
SCRIPT_SOUND_PAYPHONE_RINGING,
- SCRIPT_SOUND_113,
+ SCRIPT_SOUND_113, // inherited from III
SCRIPT_SOUND_GLASS_BREAK_L,
SCRIPT_SOUND_GLASS_BREAK_S,
SCRIPT_SOUND_GLASS_CRACK,
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 8b046bf2..86c9e86e 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1817,7 +1817,7 @@ void CMissionCleanup::Process()
CStreaming::SetMissionDoesntRequireModel(MI_CUTOBJ01 + i);
CStreaming::ms_disableStreaming = false;
CHud::m_ItemToFlash = -1;
- CHud::SetHelpMessage(nil, false); // TODO(MIAMI): third parameter is false
+ CHud::SetHelpMessage(nil, false);
CUserDisplay::OnscnTimer.m_bDisabled = false;
CTheScripts::RemoveScriptTextureDictionary();
CWorld::Players[0].m_pPed->m_pWanted->m_bIgnoredByCops = false;
@@ -5387,22 +5387,7 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
case COMMAND_ADD_ONE_OFF_SOUND:
{
CollectParameters(&m_nIp, 4);
- // TODO(MIAMI)
- // SOUND_PART_MISSION_COMPLETE == 1
- // SOUND_RACE_START_3 == 7
- // SOUND_RACE_START_2 == 8
- // SOUND_RACE_START_1 == 9
- // SOUND_RACE_START_GO == 10
- // SOUND_AMMUNATION_BUY_WEAPON == 13
- // SOUND_AMMUNATION_BUY_WEAPON_DENIED == 14
- // SOUND_AMMUNATION_IMRAN_ARM_BOMB == 16
switch (ScriptParams[3]) {
- case SCRIPT_SOUND_EVIDENCE_PICKUP:
- DMAudio.PlayFrontEndSound(SOUND_EVIDENCE_PICKUP, 0);
- return 0;
- case SCRIPT_SOUND_UNLOAD_GOLD:
- DMAudio.PlayFrontEndSound(SOUND_UNLOAD_GOLD, 0);
- return 0;
case SCRIPT_SOUND_PART_MISSION_COMPLETE:
DMAudio.PlayFrontEndSound(SOUND_PART_MISSION_COMPLETE, 0);
return 0;
@@ -5418,6 +5403,15 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
case SCRIPT_SOUND_RACE_START_GO:
DMAudio.PlayFrontEndSound(SOUND_RACE_START_GO, 0);
return 0;
+ case SCRIPT_SOUND_AMMUNATION_BUY_WEAPON:
+ DMAudio.PlayFrontEndSound(SOUND_PICKUP_WEAPON_BOUGHT, 0);
+ return 0;
+ case SCRIPT_SOUND_AMMUNATION_BUY_WEAPON_DENIED:
+ DMAudio.PlayFrontEndSound(SOUND_GARAGE_NO_MONEY, 0);
+ return 0;
+ case SCRIPT_SOUND_IMRAN_ARM_BOMB:
+ DMAudio.PlayFrontEndSound(SOUND_AMMUNATION_IMRAN_ARM_BOMB, 0);
+ return 0;
default:
break;
}
@@ -8763,11 +8757,11 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
}
case COMMAND_INDUSTRIAL_PASSED:
CStats::IndustrialPassed = true;
- DMAudio.PlayRadioAnnouncement(13); //TODO: enum?
+ DMAudio.PlayRadioAnnouncement(STREAMED_SOUND_ANNOUNCE_COMMERCIAL_OPEN);
return 0;
case COMMAND_COMMERCIAL_PASSED:
CStats::CommercialPassed = true;
- DMAudio.PlayRadioAnnouncement(14); //TODO: enum?
+ DMAudio.PlayRadioAnnouncement(STREAMED_SOUND_ANNOUNCE_SUBURBAN_OPEN);
return 0;
case COMMAND_SUBURBAN_PASSED:
CStats::SuburbanPassed = true;
@@ -12909,7 +12903,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
case COMMAND_PRINT_HELP_FOREVER:
{
wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp);
- CHud::SetHelpMessage(text, false); // TODO(MIAMI): third param is true
+ CHud::SetHelpMessage(text, false, true);
return 0;
}
//case COMMAND_PRINT_HELP_FOREVER_WITH_NUMBER:
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp
index 546f72c2..fb8361c5 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -663,6 +663,7 @@ PlayAnnouncement(uint8 sound, uint8 station)
void
ProcessTrainAnnouncements(void)
{
+#ifdef GTA_TRAIN
for (int i = 0; i < ARRAY_SIZE(StationDist); i++) {
for (int j = 0; j < ARRAY_SIZE(EngineTrackPosition); j++) {
if (!bTrainArrivalAnnounced[i]) {
@@ -691,6 +692,7 @@ ProcessTrainAnnouncements(void)
}
}
}
+#endif
}
void