aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/ai
diff options
context:
space:
mode:
authorThanasis Antoniou2019-04-05 21:33:47 +0300
committerThanasis Antoniou2019-04-05 21:35:55 +0300
commita0beaa6f4e925292f3ffaa8045e580cd579d3ed0 (patch)
tree8debb2e8a7d8d7a58295d939ea8cd8bfe2b3e8e5 /engines/bladerunner/script/ai
parent62660da0bc8bdbaa464f8b25ee993f6dfb90aa85 (diff)
downloadscummvm-rg350-a0beaa6f4e925292f3ffaa8045e580cd579d3ed0.tar.gz
scummvm-rg350-a0beaa6f4e925292f3ffaa8045e580cd579d3ed0.tar.bz2
scummvm-rg350-a0beaa6f4e925292f3ffaa8045e580cd579d3ed0.zip
BLADERUNNER: SFX named constants and MissSound fix
Still pending cleaning up Ambient_Sounds_Add_Sound and Ambient_Sounds_Add_Looping_Sound calls
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r--engines/bladerunner/script/ai/bryant.cpp2
-rw-r--r--engines/bladerunner/script/ai/bullet_bob.cpp4
-rw-r--r--engines/bladerunner/script/ai/clovis.cpp4
-rw-r--r--engines/bladerunner/script/ai/dektora.cpp36
-rw-r--r--engines/bladerunner/script/ai/desk_clerk.cpp2
-rw-r--r--engines/bladerunner/script/ai/early_q.cpp14
-rw-r--r--engines/bladerunner/script/ai/free_slot_a.cpp8
-rw-r--r--engines/bladerunner/script/ai/free_slot_b.cpp4
-rw-r--r--engines/bladerunner/script/ai/gaff.cpp2
-rw-r--r--engines/bladerunner/script/ai/general_doll.cpp2
-rw-r--r--engines/bladerunner/script/ai/generic_walker_a.cpp2
-rw-r--r--engines/bladerunner/script/ai/generic_walker_b.cpp2
-rw-r--r--engines/bladerunner/script/ai/generic_walker_c.cpp2
-rw-r--r--engines/bladerunner/script/ai/gordo.cpp18
-rw-r--r--engines/bladerunner/script/ai/hanoi.cpp4
-rw-r--r--engines/bladerunner/script/ai/holloway.cpp2
-rw-r--r--engines/bladerunner/script/ai/izo.cpp4
-rw-r--r--engines/bladerunner/script/ai/luther.cpp4
-rw-r--r--engines/bladerunner/script/ai/maggie.cpp8
-rw-r--r--engines/bladerunner/script/ai/mccoy.cpp20
-rw-r--r--engines/bladerunner/script/ai/moraji.cpp4
-rw-r--r--engines/bladerunner/script/ai/mutant1.cpp6
-rw-r--r--engines/bladerunner/script/ai/mutant2.cpp4
-rw-r--r--engines/bladerunner/script/ai/mutant3.cpp2
-rw-r--r--engines/bladerunner/script/ai/officer_grayford.cpp2
-rw-r--r--engines/bladerunner/script/ai/photographer.cpp2
-rw-r--r--engines/bladerunner/script/ai/runciter.cpp4
-rw-r--r--engines/bladerunner/script/ai/sadik.cpp26
-rw-r--r--engines/bladerunner/script/ai/steele.cpp12
-rw-r--r--engines/bladerunner/script/ai/transient.cpp6
-rw-r--r--engines/bladerunner/script/ai/tyrell_guard.cpp4
-rw-r--r--engines/bladerunner/script/ai/zuben.cpp10
32 files changed, 114 insertions, 112 deletions
diff --git a/engines/bladerunner/script/ai/bryant.cpp b/engines/bladerunner/script/ai/bryant.cpp
index bedb19de63..2a76ee9655 100644
--- a/engines/bladerunner/script/ai/bryant.cpp
+++ b/engines/bladerunner/script/ai/bryant.cpp
@@ -117,7 +117,7 @@ void AIScriptBryant::ShotAtAndMissed() {
bool AIScriptBryant::ShotAtAndHit() {
AI_Movement_Track_Flush(kActorBryant);
- Sound_Play(3, 100, 0, 0, 50);
+ Sound_Play(kSfxFEMHURT1, 100, 0, 0, 50); // a bug?
return false;
}
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index 75acdfdb21..47e3852c29 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -264,10 +264,10 @@ bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) {
*animation = 506;
}
if (_animationFrame == 10) {
- Sound_Play(492, 75, 0, 0, 50);
+ Sound_Play(kSfxSHOTCOK1, 75, 0, 0, 50);
}
if (_animationFrame == 5) {
- Sound_Play(493, 90, 0, 0, 50);
+ Sound_Play(kSfxSHOTGUN1, 90, 0, 0, 50);
Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy);
}
break;
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index eba72e342a..542beb027a 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -832,10 +832,10 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
} else {
snd = 9015;
}
- Sound_Play_Speech_Line(5, snd, 75, 0, 99);
+ Sound_Play_Speech_Line(kActorClovis, snd, 75, 0, 99);
}
if (_animationFrame == 4) {
- Actor_Combat_AI_Hit_Attempt(5);
+ Actor_Combat_AI_Hit_Attempt(kActorClovis);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
flag = true;
diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp
index 54fa6d6c30..b4e059ab6e 100644
--- a/engines/bladerunner/script/ai/dektora.cpp
+++ b/engines/bladerunner/script/ai/dektora.cpp
@@ -173,7 +173,7 @@ void AIScriptDektora::CompletedMovementTrack() {
case 272:
AI_Movement_Track_Flush(kActorDektora);
Actor_Face_Heading(kActorDektora, 0, 0);
- Sound_Play(451, 71, 0, 0, 50);
+ Sound_Play(kSfxDEKGLAS1, 71, 0, 0, 50);
_animationState = 35;
_animationFrame = 0;
@@ -487,7 +487,7 @@ bool AIScriptDektora::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Face_Actor(kActorSteele, kActorDektora, true);
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
Delay(250);
- Sound_Play(3, 100, 0, 0, 50);
+ Sound_Play(kSfxFEMHURT1, 100, 0, 0, 50);
Actor_Set_Goal_Number(kActorDektora, kGoalDektoraNR11BurningGoToWindow);
} else {
Actor_Set_Goal_Number(kActorDektora, kGoalDektoraNR11BurningGoToMcCoy);
@@ -722,7 +722,7 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
}
if (_animationFrame == 5) {
- Actor_Combat_AI_Hit_Attempt(3);
+ Actor_Combat_AI_Hit_Attempt(kActorDektora);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(141)) {
@@ -750,11 +750,11 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
} else {
speech = 9015;
}
- Sound_Play_Speech_Line(3, speech, 75, 0, 99);
+ Sound_Play_Speech_Line(kActorDektora, speech, 75, 0, 99);
}
if (_animationFrame == 6) {
- Actor_Combat_AI_Hit_Attempt(3);
+ Actor_Combat_AI_Hit_Attempt(kActorDektora);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(142)) {
@@ -943,7 +943,7 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
}
if (_animationFrame == 11) {
- Ambient_Sounds_Play_Sound(206, 80, -20, -20, 20);
+ Ambient_Sounds_Play_Sound(kSfxZUBLAND1, 80, -20, -20, 20);
}
break;
@@ -952,15 +952,15 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 1) {
switch (Random_Query(0, 2)) {
case 0:
- Sound_Play(567, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE1, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 1:
- Sound_Play(568, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE2, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 2:
- Sound_Play(569, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE3, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
}
}
@@ -979,15 +979,15 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 1) {
switch (Random_Query(0, 2)) {
case 0:
- Sound_Play(567, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE1, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 1:
- Sound_Play(568, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE2, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 2:
- Sound_Play(569, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE3, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
}
}
@@ -1005,15 +1005,15 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 1) {
switch (Random_Query(0, 2)) {
case 0:
- Sound_Play(567, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE1, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 1:
- Sound_Play(568, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE2, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 2:
- Sound_Play(569, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE3, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
}
}
@@ -1030,15 +1030,15 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 1) {
switch (Random_Query(0, 2)) {
case 0:
- Sound_Play(567, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE1, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 1:
- Sound_Play(568, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE2, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
case 2:
- Sound_Play(569, (100 / Random_Query(5, 9)), 0, 0, 50);
+ Sound_Play(kSfxWHISTLE3, (100 / Random_Query(5, 9)), 0, 0, 50);
break;
}
}
diff --git a/engines/bladerunner/script/ai/desk_clerk.cpp b/engines/bladerunner/script/ai/desk_clerk.cpp
index f723b3335b..363a7e3d26 100644
--- a/engines/bladerunner/script/ai/desk_clerk.cpp
+++ b/engines/bladerunner/script/ai/desk_clerk.cpp
@@ -248,7 +248,7 @@ bool AIScriptDeskClerk::UpdateAnimation(int *animation, int *frame) {
*animation = 670;
_animationFrame++;
if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(670) - 2) {
- Ambient_Sounds_Play_Sound(206, 40, 30, 30, 99);
+ Ambient_Sounds_Play_Sound(kSfxZUBLAND1, 40, 30, 30, 99);
Actor_Set_Goal_Number(kActorDeskClerk, kGoalDeskClerkKnockedOut);
Actor_Change_Animation_Mode(kActorDeskClerk, kAnimationModeIdle);
*animation = 661;
diff --git a/engines/bladerunner/script/ai/early_q.cpp b/engines/bladerunner/script/ai/early_q.cpp
index 39fbb9fa36..4d67360f7b 100644
--- a/engines/bladerunner/script/ai/early_q.cpp
+++ b/engines/bladerunner/script/ai/early_q.cpp
@@ -401,7 +401,7 @@ bool AIScriptEarlyQ::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
Actor_Change_Animation_Mode(kActorEarlyQ, 23);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, false);
- Ambient_Sounds_Play_Sound(582, 50, 99, 0, 0);
+ Ambient_Sounds_Play_Sound(kSfxDRUGOUT, 50, 99, 0, 0);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR04Drink);
break;
@@ -539,7 +539,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
*animation = 381;
_animationFrame++;
if (_animationFrame == 18) {
- Ambient_Sounds_Play_Sound(255, 99, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxBARSFX4, 99, 0, 0, 20);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
Actor_Change_Animation_Mode(kActorEarlyQ, 74);
@@ -641,16 +641,16 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
_animationFrame++;
}
if (_animationFrame == 1) {
- Ambient_Sounds_Play_Sound(555, 59, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxMALEHURT, 59, 0, 0, 20);
}
if (_animationFrame == 8) {
- Ambient_Sounds_Play_Sound(254, 47, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxBARSFX3, 47, 0, 0, 20);
}
if (_animationFrame == 11) {
- Ambient_Sounds_Play_Sound(560, 27, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxDROPGLAS, 27, 0, 0, 20);
}
if (_animationFrame == 14) {
- Ambient_Sounds_Play_Sound(206, 41, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxZUBLAND1, 41, 0, 0, 20);
}
break;
@@ -686,7 +686,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
*animation = 364;
_animationFrame++;
if (_animationFrame == 2) {
- Ambient_Sounds_Play_Sound(12, 60, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxLGCAL1, 60, 0, 0, 20);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(364)) {
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp
index c80b4da778..5491f2eef7 100644
--- a/engines/bladerunner/script/ai/free_slot_a.cpp
+++ b/engines/bladerunner/script/ai/free_slot_a.cpp
@@ -393,10 +393,10 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) {
} else {
snd = 9015;
}
- Sound_Play_Speech_Line(64, snd, 75, 0, 99);
+ Sound_Play_Speech_Line(kActorFreeSlotA, snd, 75, 0, 99);
}
if (_animationFrame == 3) {
- Ambient_Sounds_Play_Sound(438, 99, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxRATTY4, 99, 0, 0, 20);
Actor_Combat_AI_Hit_Attempt(kActorFreeSlotA);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(857)) {
@@ -416,7 +416,7 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) {
case 6:
if (_animationFrame == 1) {
- Ambient_Sounds_Play_Sound(437, 99, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxRATTY3, 99, 0, 0, 20);
}
*animation = 860;
_animationFrame++;
@@ -431,7 +431,7 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) {
*animation = 859;
_animationFrame++;
if (_animationFrame == 0) {
- Ambient_Sounds_Play_Sound(439, 99, 0, 0, 25);
+ Ambient_Sounds_Play_Sound(kSfxRATTY5, 99, 0, 0, 25);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859) - 1) { // bug? shuld not be '-1'
_animationFrame = Slice_Animation_Query_Number_Of_Frames(859) - 1;
diff --git a/engines/bladerunner/script/ai/free_slot_b.cpp b/engines/bladerunner/script/ai/free_slot_b.cpp
index 431b27a062..e7bdfc7f11 100644
--- a/engines/bladerunner/script/ai/free_slot_b.cpp
+++ b/engines/bladerunner/script/ai/free_slot_b.cpp
@@ -302,7 +302,7 @@ bool AIScriptFreeSlotB::UpdateAnimation(int *animation, int *frame) {
case 6:
if (_animationFrame == 1) {
- Ambient_Sounds_Play_Sound(437, 99, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxRATTY3, 99, 0, 0, 20);
}
*animation = 860;
_animationFrame++;
@@ -317,7 +317,7 @@ bool AIScriptFreeSlotB::UpdateAnimation(int *animation, int *frame) {
*animation = 859;
_animationFrame++;
if (_animationFrame == 1) {
- Ambient_Sounds_Play_Sound(439, 99, 0, 0, 25);
+ Ambient_Sounds_Play_Sound(kSfxRATTY5, 99, 0, 0, 25);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859)) {
_animationFrame = Slice_Animation_Query_Number_Of_Frames(859);
diff --git a/engines/bladerunner/script/ai/gaff.cpp b/engines/bladerunner/script/ai/gaff.cpp
index 57bdd8a2dc..bfcd163a0d 100644
--- a/engines/bladerunner/script/ai/gaff.cpp
+++ b/engines/bladerunner/script/ai/gaff.cpp
@@ -316,7 +316,7 @@ bool AIScriptGaff::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalGaffMA07ShootMcCoy:
Actor_Face_Actor(kActorGaff, kActorMcCoy, true);
Actor_Change_Animation_Mode(kActorGaff, kAnimationModeCombatAttack);
- Sound_Play(27, 100, 0, 0, 50);
+ Sound_Play(kSfxSMCAL3, 100, 0, 0, 50);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
Actor_Retired_Here(kActorMcCoy, 12, 12, true, -1);
return true;
diff --git a/engines/bladerunner/script/ai/general_doll.cpp b/engines/bladerunner/script/ai/general_doll.cpp
index 729bac22ed..7a62320153 100644
--- a/engines/bladerunner/script/ai/general_doll.cpp
+++ b/engines/bladerunner/script/ai/general_doll.cpp
@@ -156,7 +156,7 @@ bool AIScriptGeneralDoll::ShotAtAndHit() {
if (!Game_Flag_Query(kFlagGeneralDollShot)
&& Global_Variable_Query(kVariableGeneralDollShot) == 1
) {
- Sound_Play(121, 100, 0, 0, 50);
+ Sound_Play(kSfxSERVOD1, 100, 0, 0, 50);
Game_Flag_Set(kFlagGeneralDollShot);
Actor_Set_Goal_Number(kActorGeneralDoll, 104);
ChangeAnimationMode(kAnimationModeDie);
diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp
index 32a66e62d9..c7afdbc767 100644
--- a/engines/bladerunner/script/ai/generic_walker_a.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_a.cpp
@@ -160,7 +160,7 @@ bool AIScriptGenericWalkerA::ShotAtAndHit() {
AI_Movement_Track_Flush(kActorGenwalkerA);
_animationState = kGenericWalkerAStatesDie;
_animationFrame = 0;
- Sound_Play(203, 100, 0, 0, 50);
+ Sound_Play(kSfxPOTSPL5, 100, 0, 0, 50);
movingStart();
return true;
}
diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp
index 3bda0cfe55..acada61e42 100644
--- a/engines/bladerunner/script/ai/generic_walker_b.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_b.cpp
@@ -152,7 +152,7 @@ bool AIScriptGenericWalkerB::ShotAtAndHit() {
AI_Movement_Track_Flush(kActorGenwalkerB);
_animationState = kGenericWalkerBStatesDie;
_animationFrame = 0;
- Sound_Play(203, 100, 0, 0, 50);
+ Sound_Play(kSfxPOTSPL5, 100, 0, 0, 50);
movingStart();
return true;
}
diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp
index 99c07368b1..a70ebc09ff 100644
--- a/engines/bladerunner/script/ai/generic_walker_c.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_c.cpp
@@ -153,7 +153,7 @@ bool AIScriptGenericWalkerC::ShotAtAndHit() {
AI_Movement_Track_Flush(kActorGenwalkerC);
_animationState = kGenericWalkerCStatesDie;
_animationFrame = 0;
- Sound_Play(203, 100, 0, 0, 50);
+ Sound_Play(kSfxPOTSPL5, 100, 0, 0, 50);
movingStart();
return true;
}
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index 0a2df013bf..b5407198c7 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -160,7 +160,7 @@ void AIScriptGordo::CompletedMovementTrack() {
if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02GoToPodium) {
if (Player_Query_Current_Set() == kSetNR02) {
- Ambient_Sounds_Play_Sound(581, 58, 0, 0, 0);
+ Ambient_Sounds_Play_Sound(kSfxCOMEDY, 58, 0, 0, 0);
Actor_Face_Heading(kActorGordo, 0, false);
Loop_Actor_Travel_Stairs(kActorGordo, 4, true, kAnimationModeIdle);
Actor_Face_Heading(kActorGordo, 506, false);
@@ -544,8 +544,8 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Music_Stop(1);
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
Actor_Says(kActorGordo, 740, 17);
- Sound_Play(575, 50, 0, 0, 50);
- Sound_Play(319, 50, 0, 0, 50);
+ Sound_Play(kSfxRIMSHOT1, 50, 0, 0, 50);
+ Sound_Play(kSfxAUDLAFF1, 50, 0, 0, 50);
Actor_Says(kActorGordo, 750, 16);
Actor_Says(kActorGordo, 760, 15);
Actor_Says(kActorGordo, 770, 14);
@@ -557,8 +557,8 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorMcCoy, 3910, 16);
if (Global_Variable_Query(kVariableHollowayArrest) == 2) {
Actor_Says(kActorGordo, 870, 16);
- Sound_Play(576, 50, 0, 0, 50);
- Sound_Play(319, 50, 0, 0, 50);
+ Sound_Play(kSfxRIMSHOT2, 50, 0, 0, 50);
+ Sound_Play(kSfxAUDLAFF1, 50, 0, 0, 50);
Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayGoToNR02);
Actor_Says(kActorGordo, 880, 17);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitAtPodium);
@@ -569,8 +569,8 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
} else {
Actor_Says(kActorGordo, 790, 12);
Actor_Says(kActorMcCoy, 3890, 15);
- Sound_Play(577, 50, 0, 0, 50);
- Sound_Play(321, 50, 0, 0, 50);
+ Sound_Play(kSfxRIMSHOT3, 50, 0, 0, 50);
+ Sound_Play(kSfxAUDLAFF3, 50, 0, 0, 50);
Actor_Says(kActorGordo, 800, 15);
Actor_Says(kActorGordo, 810, 17);
Actor_Says(kActorMcCoy, 3895, 16);
@@ -579,8 +579,8 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorGordo, 830, 15);
Actor_Says(kActorMcCoy, 3905, 13);
Actor_Says(kActorGordo, 840, 13);
- Sound_Play(578, 50, 0, 0, 50);
- Sound_Play(321, 50, 0, 0, 50);
+ Sound_Play(kSfxRIMSHOT4, 50, 0, 0, 50);
+ Sound_Play(kSfxAUDLAFF3, 50, 0, 0, 50);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway1);
}
break;
diff --git a/engines/bladerunner/script/ai/hanoi.cpp b/engines/bladerunner/script/ai/hanoi.cpp
index 87003f8c54..6472c5a801 100644
--- a/engines/bladerunner/script/ai/hanoi.cpp
+++ b/engines/bladerunner/script/ai/hanoi.cpp
@@ -512,11 +512,11 @@ bool AIScriptHanoi::UpdateAnimation(int *animation, int *frame) {
_animationFrame++;
if (_animationFrame == 4) {
- Ambient_Sounds_Play_Sound(492, 77, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxSHOTCOK1, 77, 0, 0, 20);
}
if (_animationFrame == 6) {
- Ambient_Sounds_Play_Sound(493, 97, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxSHOTGUN1, 97, 0, 0, 20);
}
if (_animationFrame == 5) {
diff --git a/engines/bladerunner/script/ai/holloway.cpp b/engines/bladerunner/script/ai/holloway.cpp
index 425100338f..8efb3c933f 100644
--- a/engines/bladerunner/script/ai/holloway.cpp
+++ b/engines/bladerunner/script/ai/holloway.cpp
@@ -218,7 +218,7 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
_animationFrame++;
if (_animationFrame == 9) {
- Ambient_Sounds_Play_Sound(222, 90, 99, 0, 0);
+ Ambient_Sounds_Play_Sound(kSfxKICK1, 90, 99, 0, 0);
}
if (_animationFrame == 10) {
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index ec7bb30e37..0e0bb54934 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -557,10 +557,10 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
} else {
snd = 9015;
}
- Sound_Play_Speech_Line(7, snd, 75, 0, 99);
+ Sound_Play_Speech_Line(kActorIzo, snd, 75, 0, 99);
}
if (_animationFrame == 9) {
- Actor_Combat_AI_Hit_Attempt(7);
+ Actor_Combat_AI_Hit_Attempt(kActorIzo);
}
if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoWaitingAtRC03
&& _animationFrame == 6
diff --git a/engines/bladerunner/script/ai/luther.cpp b/engines/bladerunner/script/ai/luther.cpp
index f868953ccb..78ac56a03f 100644
--- a/engines/bladerunner/script/ai/luther.cpp
+++ b/engines/bladerunner/script/ai/luther.cpp
@@ -90,7 +90,7 @@ bool AIScriptLuther::Update() {
Actor_Set_Targetable(kActorLuther, false);
Scene_Loop_Set_Default(5); // UG16MainLoopNoComputerLight
Scene_Loop_Start_Special(kSceneLoopModeOnce, 4, true); // UG16SparkLoop
- Ambient_Sounds_Play_Sound(559, 50, 0, 0, 99);
+ Ambient_Sounds_Play_Sound(kSfxCOMPDWN4, 50, 0, 0, 99);
Ambient_Sounds_Remove_Looping_Sound(516, 1);
return false;
}
@@ -370,7 +370,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 12:
*animation = 359;
if (_animationFrame == 12) {
- Ambient_Sounds_Play_Sound(557, 59, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxHEADHIT2, 59, 0, 0, 20);
}
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame++;
diff --git a/engines/bladerunner/script/ai/maggie.cpp b/engines/bladerunner/script/ai/maggie.cpp
index c1ff0e29de..dc4bf9a3bc 100644
--- a/engines/bladerunner/script/ai/maggie.cpp
+++ b/engines/bladerunner/script/ai/maggie.cpp
@@ -354,7 +354,7 @@ bool AIScriptMaggie::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalMaggieKP05Explode:
AI_Movement_Track_Flush(kActorMaggie);
Actor_Face_Actor(kActorMcCoy, kActorMaggie, true);
- Sound_Play(494, 50, 0, 0, 100);
+ Sound_Play(kSfxDOGEXPL1, 50, 0, 0, 100);
Actor_Set_Goal_Number(kActorMaggie, kGoalMaggieDead);
Actor_Change_Animation_Mode(kActorMaggie, 51);
if (Actor_Query_Inch_Distance_From_Actor(kActorMcCoy, kActorMaggie) < 144) {
@@ -523,7 +523,7 @@ bool AIScriptMaggie::UpdateAnimation(int *animation, int *frame) {
case kMaggieStateHappyA:
*animation = 870;
if (_animationFrame == 1) {
- Sound_Play(Random_Query(263, 264), 50, 0, 0, 50);
+ Sound_Play(Random_Query(kSfxDOGBARK1, kSfxDOGBARK3), 50, 0, 0, 50);
}
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
@@ -614,7 +614,7 @@ bool AIScriptMaggie::ChangeAnimationMode(int mode) {
case 51:
_animationState = kMaggieStateExploding;
_animationFrame = 0;
- Sound_Play(272, 50, 0, 0, 50);
+ Sound_Play(kSfxDOGHURT1, 50, 0, 0, 50);
break;
case kAnimationModeFeeding:
@@ -662,7 +662,7 @@ bool AIScriptMaggie::ChangeAnimationMode(int mode) {
_animationState = kMaggieStateHappyB;
}
var_45F3F8 = Random_Query(2, 6);
- Sound_Play(276, 50, 0, 0, 50);
+ Sound_Play(kSfxDOGTAIL1, 50, 0, 0, 50);
break;
case 88:
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index 0fe9f84d21..2d99d4b1b8 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -32,7 +32,7 @@ AIScriptMcCoy::AIScriptMcCoy(BladeRunnerEngine *vm) : AIScriptBase(vm) {
_animationLoopFrameMax = 0;
_animationStateNextSpecial = 0;
_animationNextSpecial = 0;
- _nextSoundId = 0;
+ _nextSoundId = -1;
_NR10SteeleShooting = false;
_fallSpeed = 0.0f;
_fallHeightCurrent = 0.0f;
@@ -427,11 +427,11 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalMcCoyCallWithGuzza:
- Sound_Play(123, 50, 0, 0, 50);
+ Sound_Play(kSfxSPNBEEP9, 50, 0, 0, 50);
Delay(1000);
- Sound_Play(403, 30, 0, 0, 50);
+ Sound_Play(kSfxVIDFONE1, 30, 0, 0, 50);
Delay(1000);
- Sound_Play(123, 50, 0, 0, 50);
+ Sound_Play(kSfxSPNBEEP9, 50, 0, 0, 50);
Actor_Says(kActorGuzza, 1380, 3);
Actor_Says(kActorMcCoy, 6610, 13);
Actor_Says(kActorGuzza, 1390, 3);
@@ -461,7 +461,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorMcCoy, 6700, 17);
Actor_Says(kActorGuzza, 1480, 3);
Actor_Says(kActorMcCoy, 6705, 11);
- Sound_Play(123, 50, 0, 0, 50);
+ Sound_Play(kSfxSPNBEEP9, 50, 0, 0, 50);
return true;
case kGoalMcCoyUG15Fall:
@@ -779,7 +779,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
&& Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR11Shoot
&& _NR10SteeleShooting
) {
- _nextSoundId = 27;
+ _nextSoundId = kSfxSMCAL3;
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationState = 17;
@@ -1200,9 +1200,10 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
*animation = 47;
_animationFrame++;
if (_animationFrame == 6) {
- Ambient_Sounds_Play_Sound(Random_Query(593, 595), 39, 0, 0, 99);
+ // Play one of kSfxCHARMTL7, kSfxCHARMTL8, kSfxCHARMTL9
+ Ambient_Sounds_Play_Sound(Random_Query(kSfxCHARMTL7, kSfxCHARMTL9), 39, 0, 0, 99);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) { //why -1?
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) { //why -1? a bug?
_animationFrame = 0;
}
break;
@@ -1362,7 +1363,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
case kAnimationModeIdle:
if (Game_Flag_Query(kFlagMcCoyTiedDown)) {
if (_animationFrame <= 6) {
- Ambient_Sounds_Play_Sound(Random_Query(593, 595), 39, 0, 0, 99);
+ // Play one of kSfxCHARMTL7, kSfxCHARMTL8, kSfxCHARMTL9
+ Ambient_Sounds_Play_Sound(Random_Query(kSfxCHARMTL7, kSfxCHARMTL9), 39, 0, 0, 99);
}
_animationState = 57;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/moraji.cpp b/engines/bladerunner/script/ai/moraji.cpp
index 00234764bd..e7ae6691a8 100644
--- a/engines/bladerunner/script/ai/moraji.cpp
+++ b/engines/bladerunner/script/ai/moraji.cpp
@@ -153,7 +153,7 @@ bool AIScriptMoraji::GoalChanged(int currentGoalNumber, int newGoalNumber) {
// applies only when shot inside the Dermo Design Lab
Actor_Set_Targetable(kActorMoraji, false);
#if BLADERUNNER_ORIGINAL_BUGS
- Sound_Play(4, 100, 0, 0, 50); // Original code has female scream here (FEMHURT2)
+ Sound_Play(kSfxFEMHURT2, 100, 0, 0, 50); // Original code has female scream here (FEMHURT2)
#else
Sound_Play_Speech_Line(kActorMoraji, 9020, 50, 0, 50); // fix: Use Moraji's death SPCHSFX, also lower volume
#endif // BLADERUNNER_ORIGINAL_BUGS
@@ -315,7 +315,7 @@ bool AIScriptMoraji::UpdateAnimation(int *animation, int *frame) {
Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiScream);
}
if (_animationFrame == 6) {
- Ambient_Sounds_Play_Sound(488, 69, 0, 0, 20);
+ Ambient_Sounds_Play_Sound(kSfxCHAINBRK, 69, 0, 0, 20);
}
break;
diff --git a/engines/bladerunner/script/ai/mutant1.cpp b/engines/bladerunner/script/ai/mutant1.cpp
index bdd2548db4..51c9c705cd 100644
--- a/engines/bladerunner/script/ai/mutant1.cpp
+++ b/engines/bladerunner/script/ai/mutant1.cpp
@@ -474,7 +474,7 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
*animation = 899;
_animationFrame++;
if (_animationFrame == 1) {
- Ambient_Sounds_Play_Sound(371, 99, 0, 0, 25);
+ Ambient_Sounds_Play_Sound(kSfxHURT1M1, 99, 0, 0, 25);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(899)) {
Actor_Change_Animation_Mode(kActorMutant1, 0);
@@ -485,7 +485,7 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
*animation = 900;
_animationFrame++;
if (_animationFrame == 1) {
- Sound_Play(368, 100, 0, 0, 50);
+ Sound_Play(kSfxYELL1M1, 100, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(900)) {
Actor_Change_Animation_Mode(kActorMutant1, 88);
@@ -501,7 +501,7 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
*animation = 899;
_animationFrame++;
if (_animationFrame == 9) {
- Sound_Play(371, 100, 0, 0, 50);
+ Sound_Play(kSfxHURT1M1, 100, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(899)) {
Actor_Change_Animation_Mode(kActorMutant1, 0);
diff --git a/engines/bladerunner/script/ai/mutant2.cpp b/engines/bladerunner/script/ai/mutant2.cpp
index 512f207a77..e1e851a381 100644
--- a/engines/bladerunner/script/ai/mutant2.cpp
+++ b/engines/bladerunner/script/ai/mutant2.cpp
@@ -436,7 +436,7 @@ bool AIScriptMutant2::UpdateAnimation(int *animation, int *frame) {
*animation = 907;
_animationFrame++;
if (_animationFrame == 1) {
- Sound_Play(401, 100, 0, 0, 50);
+ Sound_Play(kSfxYELL1M2, 100, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
Actor_Change_Animation_Mode(kActorMutant2, 88);
@@ -453,7 +453,7 @@ bool AIScriptMutant2::UpdateAnimation(int *animation, int *frame) {
_animationFrame += _var1;
if (_animationFrame == 4) {
_var1 = -1;
- Sound_Play(399, 100, 0, 0, 50);
+ Sound_Play(kSfxHURT1M2, 100, 0, 0, 50);
} else {
if (!_animationFrame) {
Actor_Change_Animation_Mode(kActorMutant2, 0);
diff --git a/engines/bladerunner/script/ai/mutant3.cpp b/engines/bladerunner/script/ai/mutant3.cpp
index 990ed8c474..b612cba7bd 100644
--- a/engines/bladerunner/script/ai/mutant3.cpp
+++ b/engines/bladerunner/script/ai/mutant3.cpp
@@ -491,7 +491,7 @@ bool AIScriptMutant3::UpdateAnimation(int *animation, int *frame) {
*animation = 917;
_animationFrame += _var1;
if (_animationFrame == 3) {
- Sound_Play(400, 100, 0, 0, 50);
+ Sound_Play(kSfxHURT1M3, 100, 0, 0, 50);
_var1 = -1;
} else {
if (!_animationFrame) {
diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index 75c0718581..0e82ded8c0 100644
--- a/engines/bladerunner/script/ai/officer_grayford.cpp
+++ b/engines/bladerunner/script/ai/officer_grayford.cpp
@@ -973,7 +973,7 @@ bool AIScriptOfficerGrayford::UpdateAnimation(int *animation, int *frame) {
*animation = 616;
_animationFrame++;
if (_animationFrame == 11) {
- Ambient_Sounds_Play_Sound(556, 25, 0, 0, 25);
+ Ambient_Sounds_Play_Sound(kSfxHOLSTER1, 25, 0, 0, 25);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
*animation = 625;
diff --git a/engines/bladerunner/script/ai/photographer.cpp b/engines/bladerunner/script/ai/photographer.cpp
index 65460036ca..13c2269c4e 100644
--- a/engines/bladerunner/script/ai/photographer.cpp
+++ b/engines/bladerunner/script/ai/photographer.cpp
@@ -264,7 +264,7 @@ bool AIScriptPhotographer::UpdateAnimation(int *animation, int *frame) {
case 6:
*animation = 746;
if (_animationFrame == 11) {
- Ambient_Sounds_Play_Sound(463, 80, -20, -20, 20);
+ Ambient_Sounds_Play_Sound(kSfxCAMCOP1, 80, -20, -20, 20);
}
if (_var1) {
--_var1;
diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp
index 11ad906593..966a35c48e 100644
--- a/engines/bladerunner/script/ai/runciter.cpp
+++ b/engines/bladerunner/script/ai/runciter.cpp
@@ -118,7 +118,7 @@ void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatM
Actor_Says(kActorRunciter, 590, 13);
Actor_Says(kActorMcCoy, 4775, -1);
Actor_Says(kActorRunciter, 600, 17);
- Sound_Play(492, 100, 0, 100, 50);
+ Sound_Play(kSfxSHOTCOK1, 100, 0, 100, 50);
Actor_Says(kActorMcCoy, 4780, -1);
Actor_Says(kActorRunciter, 610, 18);
Actor_Says(kActorMcCoy, 4785, -1);
@@ -140,7 +140,7 @@ void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatM
Actor_Says(kActorRunciter, 480, 17);
Actor_Says(kActorMcCoy, 4735, -1);
Actor_Says(kActorRunciter, 490, 16);
- Sound_Play(492, 100, 0, 100, 50);
+ Sound_Play(kSfxSHOTCOK1, 100, 0, 100, 50);
Actor_Says(kActorMcCoy, 4740, -1);
Actor_Says(kActorRunciter, 500, 18);
Actor_Says(kActorRunciter, 510, 19);
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index fb34ae4ade..d931ac7fcc 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -26,7 +26,7 @@ namespace BladeRunner {
AIScriptSadik::AIScriptSadik(BladeRunnerEngine *vm) : AIScriptBase(vm) {
_flag = 0;
- _var1 = 0;
+ _nextSoundId = -1; // changed from original (0) to be more clear that this is an invalid sfx id
_var2 = 0;
_var3 = 0;
_var4 = 1;
@@ -39,7 +39,7 @@ void AIScriptSadik::Initialize() {
_animationNext = 0;
_flag = 0;
- _var1 = 0;
+ _nextSoundId = -1; // changed from original (0) to be more clear that this is an invalid sfx id
_var2 = 0;
_var3 = 0;
_var4 = 1;
@@ -61,9 +61,9 @@ bool AIScriptSadik::Update() {
return true;
}
- if (_var1 != 0) {
- Sound_Play(_var1, 100, 0, 0, 50);
- _var1 = 0;
+ if (_nextSoundId != -1) { // changed from original (0) to be more clear that this is an invalid sfx id
+ Sound_Play(_nextSoundId, 100, 0, 0, 50);
+ _nextSoundId = -1; // changed from original (0) to be more clear that this is an invalid sfx id
}
if (Global_Variable_Query(kVariableChapter) == 3
@@ -311,7 +311,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalSadikBB11TalkWithClovis:
- _var1 = 0;
+ _nextSoundId = -1; // changed from original (0) to be more clear that this is an invalid sfx id
return false;
case 200:
@@ -355,7 +355,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalSadikUG18PrepareShootMcCoy:
- Sound_Play(12, 100, 0, 0, 50);
+ Sound_Play(kSfxLGCAL1, 100, 0, 0, 50);
AI_Countdown_Timer_Start(kActorSadik, 0, 2);
return true;
@@ -363,7 +363,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
if (Player_Query_Current_Scene() == kSceneUG18) {
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatAttack);
- Sound_Play(12, 100, 0, 0, 50);
+ Sound_Play(kSfxLGCAL1, 100, 0, 0, 50);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1);
}
@@ -671,7 +671,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
} else {
snd = 9015;
}
- Sound_Play_Speech_Line(8, snd, 75, 0, 99);
+ Sound_Play_Speech_Line(kActorSadik, snd, 75, 0, 99);
}
if (_animationFrame == 7) {
Actor_Combat_AI_Hit_Attempt(kActorSadik);
@@ -793,7 +793,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
*animation = 345;
_animationFrame++;
if (_animationFrame == 23) {
- _var1 = 201;
+ _nextSoundId = kSfxMTLDOOR2;
}
if (_animationFrame >= 25) {
_animationFrame = 0;
@@ -808,7 +808,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame++;
if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KnockOutMcCoy) {
if (_animationFrame == 4) {
- _var1 = 221;
+ _nextSoundId = kSfxPUNCH1;
}
if (_animationFrame == 6) {
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeHit);
@@ -832,10 +832,10 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 4) {
if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KnockOutMcCoy) {
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
- _var1 = 222;
+ _nextSoundId = kSfxKICK1;
} else {
Actor_Change_Animation_Mode(kActorMcCoy, 68);
- _var1 = 223;
+ _nextSoundId = kSfxKICK2;
}
}
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 7e29a4f09c..f44efeb2e8 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -739,7 +739,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalSteeleShootIzo:
Actor_Force_Stop_Walking(kActorMcCoy);
- Sound_Play(27, 100, 0, 0, 50);
+ Sound_Play(kSfxSMCAL3, 100, 0, 0, 50);
Actor_Set_Goal_Number(kActorIzo, kGoalIzoDie);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
Actor_Face_Actor(kActorMcCoy, kActorSteele, true);
@@ -1111,7 +1111,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalSteeleNR01ShootGordo:
Player_Loses_Control();
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
- Sound_Play(27, 100, 0, 0, 50);
+ Sound_Play(kSfxSMCAL3, 100, 0, 0, 50);
Game_Flag_Reset(kFlagSteeleAimingAtGordo);
Actor_Set_Targetable(kActorSteele, false);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Die);
@@ -1142,7 +1142,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalSteeleNR01ShootMcCoy:
ADQ_Flush();
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
- Sound_Play(27, 100, 0, 0, 50);
+ Sound_Play(kSfxSMCAL3, 100, 0, 0, 50);
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
Actor_Retired_Here(kActorMcCoy, 12, 12, true, -1);
@@ -1182,7 +1182,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalSteeleNR01McCoyShotGun:
ADQ_Flush();
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAttack);
- Sound_Play(27, 100, 0, 0, 50);
+ Sound_Play(kSfxSMCAL3, 100, 0, 0, 50);
_animationState = 38;
_animationFrame = 0;
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01ReleaseHostage);
@@ -1747,11 +1747,11 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
} else {
snd = 9015;
}
- Sound_Play_Speech_Line(1, snd, 75, 0, 99);
+ Sound_Play_Speech_Line(kActorSteele, snd, 75, 0, 99);
}
if (_animationFrame == 4) {
- Actor_Combat_AI_Hit_Attempt(1);
+ Actor_Combat_AI_Hit_Attempt(kActorSteele);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
diff --git a/engines/bladerunner/script/ai/transient.cpp b/engines/bladerunner/script/ai/transient.cpp
index 9fb2e8705d..3edbbaa62d 100644
--- a/engines/bladerunner/script/ai/transient.cpp
+++ b/engines/bladerunner/script/ai/transient.cpp
@@ -89,13 +89,13 @@ void AIScriptTransient::TimerExpired(int timer) {
AI_Countdown_Timer_Start(kActorTransient, 0, Random_Query(20, 10));
switch (Random_Query(1, 3)) {
case 1:
- Sound_Play(356, 50, 0, 0, 50);
+ Sound_Play(kSfxBUMSNOR1, 50, 0, 0, 50);
break;
case 2:
- Sound_Play(357, 50, 0, 0, 50);
+ Sound_Play(kSfxBUMSNOR2, 50, 0, 0, 50);
break;
case 3:
- Sound_Play(358, 50, 0, 0, 50);
+ Sound_Play(kSfxBUMSNOR3, 50, 0, 0, 50);
break;
}
} else if (Actor_Query_Goal_Number(kActorTransient) != 599) {
diff --git a/engines/bladerunner/script/ai/tyrell_guard.cpp b/engines/bladerunner/script/ai/tyrell_guard.cpp
index a7b9e31db3..a0b95bb32d 100644
--- a/engines/bladerunner/script/ai/tyrell_guard.cpp
+++ b/engines/bladerunner/script/ai/tyrell_guard.cpp
@@ -118,7 +118,7 @@ bool AIScriptTyrellGuard::GoalChanged(int currentGoalNumber, int newGoalNumber)
Delay(1000);
Actor_Says(kActorTyrellGuard, 320, 14);
Actor_Change_Animation_Mode(kActorTyrellGuard, 50);
- Ambient_Sounds_Play_Sound(590, 100, 0, 0, 0);
+ Ambient_Sounds_Play_Sound(kSfxTBALARM, 100, 0, 0, 0);
Delay(1000);
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
@@ -132,7 +132,7 @@ bool AIScriptTyrellGuard::GoalChanged(int currentGoalNumber, int newGoalNumber)
case kGoalTyrellGuardArrestMcCoy:
Actor_Change_Animation_Mode(kActorTyrellGuard, 50);
- Ambient_Sounds_Play_Sound(590, 100, 0, 0, 0);
+ Ambient_Sounds_Play_Sound(kSfxTBALARM, 100, 0, 0, 0);
Delay(1000);
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp
index b80baa323b..aad4bfd109 100644
--- a/engines/bladerunner/script/ai/zuben.cpp
+++ b/engines/bladerunner/script/ai/zuben.cpp
@@ -172,7 +172,7 @@ void AIScriptZuben::CompletedMovementTrack() {
} else {
if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT07RunToFreeSlotA) {
Music_Stop(2);
- Sound_Play(574, 40, 100, 100, 50);
+ Sound_Play(kSfxDOORLOCK, 40, 100, 100, 50);
Delay(2000);
Game_Flag_Set(kFlagCT07toCT06);
Game_Flag_Set(kFlagZubenSpared);
@@ -872,7 +872,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
*animation = 405;
_animationFrame++;
if (_animationFrame == 7) {
- Sound_Play(207, 30, 0, 0, 50);
+ Sound_Play(kSfxZUBDEAD1, 30, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
#if BLADERUNNER_ORIGINAL_BUGS
@@ -888,7 +888,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
*animation = 393;
_animationFrame++;
if (_animationFrame == 7) {
- Sound_Play(207, 30, 0, 0, 50);
+ Sound_Play(kSfxZUBDEAD1, 30, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
#if BLADERUNNER_ORIGINAL_BUGS
@@ -1024,7 +1024,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
Overlay_Play("ct02over", 1, false, true, 0);
}
if (_animationFrame == 6) {
- Sound_Play(201, 40, 0, 0, 50);
+ Sound_Play(kSfxMTLDOOR2, 40, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
Actor_Set_Frame_Rate_FPS(kActorZuben, -2);
@@ -1038,7 +1038,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
*animation = 421;
_animationFrame++;
if (_animationFrame == 1) {
- Sound_Play(206, 80, 0, 0, 50);
+ Sound_Play(kSfxZUBLAND1, 80, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;