BLADERUNNER: Mainframe talkie restored

This commit is contained in:
Thanasis Antoniou 2019-05-13 00:10:27 +03:00
parent c52cd1ea4c
commit 618d48dde8
5 changed files with 32 additions and 17 deletions

View file

@ -1209,7 +1209,8 @@ bool Actor::hasClue(int clueId) const {
return _clues->isAcquired(clueId);
}
void Actor::copyClues(int actorId) {
bool Actor::copyClues(int actorId) {
bool newCluesAcquired = false;
Actor *otherActor = _vm->_actors[actorId];
for (int i = 0; i < (int)_vm->_gameInfo->getClueCount(); i++) {
if (hasClue(i) && !_clues->isPrivate(i) && otherActor->canAcquireClue(i) && !otherActor->hasClue(i)) {
@ -1218,8 +1219,10 @@ void Actor::copyClues(int actorId) {
fromActorId = _clues->getFromActorId(i);
}
otherActor->acquireClue(i, false, fromActorId);
newCluesAcquired = true;
}
}
return newCluesAcquired;
}
void Actor::acquireCluesByRelations() {

View file

@ -254,7 +254,7 @@ public:
void acquireClue(int clueId, bool unknownFlag, int fromActorId);
void loseClue(int clueId);
bool hasClue(int clueId) const;
void copyClues(int actorId);
bool copyClues(int actorId);
void acquireCluesByRelations();
int soundVolume() const;

View file

@ -53,7 +53,7 @@ bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("E.SCREEN03", objectName)
|| Object_Query_Click("E.MONITOR3", objectName)
) {
Actor_Says(kActorAnsweringMachine, 330, 3);
Actor_Says(kActorAnsweringMachine, 330, kAnimationModeTalk); // uploading clues
if (Actor_Clue_Query(kActorMcCoy, kClueCar)
&& !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1)
&& !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration2)
@ -85,15 +85,27 @@ bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
return true;
} else {
Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
Ambient_Sounds_Play_Sound(kSfxDATALOAD, 50, 0, 0, 99);
Delay(2000);
Actor_Says(kActorAnsweringMachine, 340, kAnimationModeTalk);
Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
Ambient_Sounds_Play_Sound(kSfxDATALOAD, 50, 0, 0, 99);
Delay(2000);
bool tranferedClues = false;
tranferedClues = Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
if (_vm->_cutContent && !tranferedClues) {
Actor_Says(kActorAnsweringMachine, 370, kAnimationModeTalk); // no clues transfered
} else {
Ambient_Sounds_Play_Sound(kSfxDATALOAD, 50, 0, 0, 99);
Delay(2000);
}
Actor_Says(kActorAnsweringMachine, 340, kAnimationModeTalk); // downloading clues
tranferedClues = Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
if (_vm->_cutContent && !tranferedClues) {
Actor_Says(kActorAnsweringMachine, 370, kAnimationModeTalk); // no clues transfered
} else {
Ambient_Sounds_Play_Sound(kSfxDATALOAD, 50, 0, 0, 99);
Delay(2000);
}
Ambient_Sounds_Play_Sound(kSfxBEEPNEAT, 80, 0, 0, 99);
Actor_Says(kActorAnsweringMachine, 350, kAnimationModeTalk);
Actor_Says(kActorAnsweringMachine, 350, kAnimationModeTalk); // db transfer complete
if (_vm->_cutContent && tranferedClues) {
Actor_Says(kActorAnsweringMachine, 360, kAnimationModeTalk); // new clues added
}
return true;
}
}

View file

@ -740,14 +740,14 @@ bool ScriptBase::Actor_Clue_Query(int actorId, int clueId) {
return _vm->_actors[actorId]->hasClue(clueId);
}
void ScriptBase::Actor_Clues_Transfer_New_To_Mainframe(int actorId) {
bool ScriptBase::Actor_Clues_Transfer_New_To_Mainframe(int actorId) {
debugC(kDebugScript, "Actor_Clues_Transfer_New_To_Mainframe(%d)", actorId);
_vm->_actors[actorId]->copyClues(kActorVoiceOver);
return _vm->_actors[actorId]->copyClues(kActorVoiceOver);
}
void ScriptBase::Actor_Clues_Transfer_New_From_Mainframe(int actorId) {
bool ScriptBase::Actor_Clues_Transfer_New_From_Mainframe(int actorId) {
debugC(kDebugScript, "Actor_Clues_Transfer_New_From_Mainframe(%d)", actorId);
_vm->_actors[kActorVoiceOver]->copyClues(actorId);
return _vm->_actors[kActorVoiceOver]->copyClues(actorId);
}
void ScriptBase::Actor_Set_Invisible(int actorId, bool isInvisible) {

View file

@ -117,8 +117,8 @@ protected:
void Actor_Clue_Acquire(int actorId, int clueId, bool unknownFlag, int fromActorId);
void Actor_Clue_Lose(int actorId, int clueId);
bool Actor_Clue_Query(int actorId, int clueId);
void Actor_Clues_Transfer_New_To_Mainframe(int actorId);
void Actor_Clues_Transfer_New_From_Mainframe(int actorId);
bool Actor_Clues_Transfer_New_To_Mainframe(int actorId);
bool Actor_Clues_Transfer_New_From_Mainframe(int actorId);
void Actor_Set_Invisible(int actorId, bool isInvisible);
void Actor_Set_Immunity_To_Obstacles(int actorId, bool isImmune);
void Item_Add_To_World(int itemId, int animationId, int setId, float x, float y, float z, signed int facing, int height, int width, bool isTargetable, bool isObstacle, bool isPoliceMazeEnemy, bool updateOnly);