[Scummvm-git-logs] scummvm branch-2-5 -> 20b86b59fd17e7d761b99e29b91e5381c3ee095c
antoniou79
noreply at scummvm.org
Sun Nov 14 19:08:24 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a7fcc38af7 BLADERUNNER: Fix broken Leary talk animations
20b86b59fd BLADERUNNER: RC - Move line about real dogs
Commit: a7fcc38af7939890fa8117ba2ffd2ced0b25955a
https://github.com/scummvm/scummvm/commit/a7fcc38af7939890fa8117ba2ffd2ced0b25955a
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2021-11-14T20:36:14+02:00
Commit Message:
BLADERUNNER: Fix broken Leary talk animations
Should fix bug #13072
The code for Leary's AI script ChangeAnimationMode() was re-checked against the c file produced from our dissassembly of the AI-ACT1-23 dll.
Changed paths:
engines/bladerunner/script/ai/officer_leary.cpp
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index 3d9017d304..dc0747950d 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -1215,15 +1215,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case kAnimationModeTalk:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 11;
_animationNext = kModelAnimationOfficerLearyCalmExplainTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- }
- else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 11;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1278,14 +1277,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 12:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 12;
_animationNext = kModelAnimationOfficerLearyIndicateTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 12;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1293,14 +1292,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 13:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 13;
_animationNext = kModelAnimationOfficerLearyLongerExplainTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 13;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1308,14 +1307,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 14:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 14;
_animationNext = kModelAnimationOfficerLearyWarnOrThreatenTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 14;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1323,14 +1322,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 15:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 15;
_animationNext = kModelAnimationOfficerLearyUpsetOrCommandTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 15;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1338,14 +1337,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 16:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 16;
_animationNext = kModelAnimationOfficerLearyMoreUpsetTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 16;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1353,14 +1352,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 17:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 17;
_animationNext = kModelAnimationOfficerLearyUrgeOrQuestionTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 17;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1368,14 +1367,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 18:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 18;
_animationNext = kModelAnimationOfficerLearyHandsOnWaistTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 18;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1383,14 +1382,14 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 19:
- if (_animationState == 1) {
+ if (_animationState == 0 || _animationState == 1) {
_animationState = 2;
_animationStateNext = 19;
_animationNext = kModelAnimationOfficerLearyScratchHeadApologyTalk;
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- } else if (_animationState > 19) {
+ } else if (_animationState < 11 || _animationState > 19) {
_animationState = 19;
_animationFrame = 0;
_idleModeRequestedWhileInTalkingState = false;
@@ -1398,7 +1397,15 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 21:
- if (_animationState == 24) {
+ // NOTE
+ // Based on the exported c file from the IDB:
+ // The *else* clause here essentially was:
+ // if (_animationState < 21 || _animationState > 24 || (_animationState != 21 && _animationState != 24)) { }
+ // which can essentially be reduced to:
+ // if (_animationState != 21 && _animationState != 24) { }
+ // TODO maybe check dissasm code again to make sure that this is the actual intent,
+ // since it seems that the final sub-clause overrides the previous two sub-clauses.
+ if (_animationState == 21 || _animationState == 24) {
if (Random_Query(0, 1)) {
_animationState = 25;
} else {
@@ -1453,7 +1460,15 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case kAnimationModeDie:
- if (_animationState == 24) {
+ // NOTE
+ // Based on the exported c file from the IDB:
+ // The *else* clause here essentially was:
+ // if (_animationState < 21 || _animationState > 24 || (_animationState != 21 && _animationState != 22 && _animationState != 24)) { }
+ // which can essentially be reduced to:
+ // if (_animationState != 21 && _animationState != 22 && _animationState != 24) { }
+ // TODO maybe check dissasm code again to make sure that this is the actual intent,
+ // since it seems that the final sub-clause overrides the previous two sub-clauses.
+ if (_animationState == 21 || _animationState == 22 || _animationState == 24) {
_animationState = 28;
_animationFrame = 0;
} else {
Commit: 20b86b59fd17e7d761b99e29b91e5381c3ee095c
https://github.com/scummvm/scummvm/commit/20b86b59fd17e7d761b99e29b91e5381c3ee095c
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2021-11-14T21:06:34+02:00
Commit Message:
BLADERUNNER: RC - Move line about real dogs
Use it as banter talk (low random chance) with photographer
Changed paths:
engines/bladerunner/script/ai/photographer.cpp
engines/bladerunner/script/scene/tb06.cpp
diff --git a/engines/bladerunner/script/ai/photographer.cpp b/engines/bladerunner/script/ai/photographer.cpp
index c59379ae4c..aec3e20e6c 100644
--- a/engines/bladerunner/script/ai/photographer.cpp
+++ b/engines/bladerunner/script/ai/photographer.cpp
@@ -102,8 +102,13 @@ void AIScriptPhotographer::ClickedByPlayer() {
AI_Movement_Track_Pause(kActorPhotographer);
Actor_Face_Actor(kActorMcCoy, kActorPhotographer, true);
Actor_Face_Actor(kActorPhotographer, kActorMcCoy, true);
- Actor_Says(kActorMcCoy, 5310, 11);
- Actor_Says(kActorPhotographer, 40, kAnimationModeTalk);
+ if (_vm->_cutContent && Random_Query(1, 10) < 3) {
+ Actor_Says(kActorMcCoy, 8516, 14); // Any idea if they were real dogs? (gets no answer)
+ Actor_Says(kActorPhotographer, 60, kAnimationModeTalk);
+ } else {
+ Actor_Says(kActorMcCoy, 5310, 11);
+ Actor_Says(kActorPhotographer, 40, kAnimationModeTalk);
+ }
AI_Movement_Track_Unpause(kActorPhotographer);
}
}
diff --git a/engines/bladerunner/script/scene/tb06.cpp b/engines/bladerunner/script/scene/tb06.cpp
index 55e2b24fbc..764f044b5a 100644
--- a/engines/bladerunner/script/scene/tb06.cpp
+++ b/engines/bladerunner/script/scene/tb06.cpp
@@ -135,9 +135,6 @@ bool SceneScriptTB06::ClickedOnItem(int itemId, bool a2) {
Actor_Voice_Over(2380, kActorVoiceOver);
Actor_Voice_Over(2390, kActorVoiceOver);
Actor_Voice_Over(2400, kActorVoiceOver);
- if (_vm->_cutContent) {
- Actor_Says_With_Pause(kActorMcCoy, 8516, 0.70f, kAnimationModeTalk); // Any idea if they were real dogs? (gets no answer)
- }
return true;
}
}
More information about the Scummvm-git-logs
mailing list