BLADERUNNER: Added Klein actor

added more constants
fixed bug in checking actor scene
This commit is contained in:
Peter Kohaut 2018-03-07 22:27:28 +01:00
parent 568d026409
commit 001f58ce61
17 changed files with 701 additions and 235 deletions

View File

@ -444,6 +444,12 @@ enum Flags {
kFlagRC02FirstLeave = 4,
kFlagRC01toRC02 = 8,
kFlagRC02toRC01 = 9,
kFlagKleinTalkShellCasings = 12,
kFlagKleinTalkOfficersStatement = 13,
kFlagPS13toPS12 = 19,
kFlagPS13toPS05 = 21,
kFlagPS02toPS05 = 22,
kFlagPS06toPS05 = 23,
kFlagIntroPlayed = 24,
kFlagMA02toMA06 = 33,
kFlagMA06ToMA02 = 34,
@ -465,20 +471,35 @@ enum Flags {
kFlagMA05toMA04 = 63,
kFlagCT05toCT12 = 76,
kFlagWarehouseOpen = 94,
kFlagKleinTalkPaintTransfer = 104,
kFlagKleinTalkChromeDebris = 105,
kFlagKleinTalkClues = 111,
kFlagRC03toRC01 = 114,
kFlagRC01toRC03 = 115,
kFlagCT01toCT12 = 123,
kFlagPlayerHasShellCasings = 125,
kFlagPlayerHasOfficersStatement = 126,
kFlagPlayerHasPaintTransfer = 127,
kFlagPlayerHasChromeDebris = 128,
kFlagPS02toPS01 = 130,
kFlagPS02toPS07 = 131,
kFlagPS02toPS03 = 132,
kFlagPS02toPS09 = 133,
kFlagPS05toPS06 = 136,
kFlagKleinInsulted = 138,
kFlagRC02LucyDeskAvailable = 141,
kFlagChapter1Ending = 146,
kFlagChopstickWrapperTaken = 147,
kFlagCandyTaken = 148,
kFlagDogTaken = 149,
kFlagKleinInsultedTalk = 156,
kFlagGuzzaTalkZubenRetired = 159,
kFlagGuzzaTalkZubenEscaped = 160,
kFlagChromeDebrisTaken = 163,
kFlagRC01PoliceDone = 186,
kFlagShellCasingsTaken = 190,
kFlagBoughtHowieLeeFood = 192,
kFlagPS15toPS05 = 204,
kFlagSpinnerToCT01 = 248,
kFlagSpinnerToRC01 = 249,
kFlagSpinnerToMA01 = 250,
@ -501,6 +522,11 @@ enum Flags {
kFlagPhoneMessageFromClovis = 649,
kFlagPhoneMessageFromLucy = 650,
kFlagChapter2Intro = 678,
kFlagPS05TV0 = 688,
kFlagPS05TV1 = 689,
kFlagPS05TV2 = 690,
kFlagPS05TV3 = 691,
kFlagPS05TV4 = 692,
kFlagRC51Discovered = 709,
kFlagMA04WatchedTV = 711,
kFlagZubenBountyPaid = 723

View File

@ -54,6 +54,7 @@ MODULE_OBJS = \
script/ai/generic_walker_b.o \
script/ai/generic_walker_c.o \
script/ai/howie_lee.o \
script/ai/klein.o \
script/ai/leon.o \
script/ai/maggie.o \
script/ai/mccoy.o \

View File

@ -0,0 +1,440 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "bladerunner/script/ai_script.h"
namespace BladeRunner {
AIScriptKlein::AIScriptKlein(BladeRunnerEngine *vm) : AIScriptBase(vm) {
}
void AIScriptKlein::Initialize() {
_animationState = 0;
_animationFrame = 0;
_animationStateNext = 0;
Actor_Put_In_Set(kActorKlein, 66);
Actor_Set_At_XYZ(kActorKlein, 338.0f, 0.22f, -612.0f, 768);
Actor_Set_Goal_Number(kActorKlein, 0);
}
bool AIScriptKlein::Update() {
if (Global_Variable_Query(kVariableChapter) > 1 && Actor_Query_Goal_Number(kActorKlein) < 100) {
Actor_Set_Goal_Number(kActorKlein, 100);
return true;
}
if (Actor_Query_Goal_Number(kActorKlein) < 4 && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40) {
Actor_Set_Goal_Number(kActorKlein, 4);
}
if (Player_Query_Current_Scene() == kScenePS07 && Actor_Query_Goal_Number(kActorKlein) == 0) {
Actor_Set_Goal_Number(kActorKlein, 1);
return true;
}
if (Actor_Clue_Query(kActorMcCoy, kClueOfficersStatement) && !Game_Flag_Query(kFlagPlayerHasOfficersStatement)) {
Game_Flag_Set(kFlagPlayerHasOfficersStatement);
}
if (Actor_Clue_Query(kActorMcCoy, kCluePaintTransfer) && !Game_Flag_Query(kFlagPlayerHasPaintTransfer)) {
Game_Flag_Set(kFlagPlayerHasPaintTransfer);
}
if (Actor_Clue_Query(kActorMcCoy, kClueShellCasings) && !Game_Flag_Query(kFlagPlayerHasShellCasings)) {
Game_Flag_Set(kFlagPlayerHasShellCasings);
}
if (Actor_Clue_Query(kActorMcCoy, kClueChromeDebris) && !Game_Flag_Query(kFlagPlayerHasChromeDebris)) {
Game_Flag_Set(kFlagPlayerHasChromeDebris);
}
if (Player_Query_Current_Scene() == kScenePS07 && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 35 && !Game_Flag_Query(kFlagKleinInsulted)) {
AI_Countdown_Timer_Reset(kActorKlein, 2);
AI_Countdown_Timer_Start(kActorKlein, 2, 5);
Game_Flag_Set(kFlagKleinInsulted);
return true;
}
if (Actor_Query_Goal_Number(kActorKlein) == 7) {
if (Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) > 20 && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40) {
Actor_Modify_Friendliness_To_Other(kActorKlein, kActorMcCoy, 2);
}
AI_Movement_Track_Flush(kActorKlein);
Actor_Set_Goal_Number(kActorKlein, 0);
return true;
}
return false;
}
void AIScriptKlein::TimerExpired(int timer) {
if (timer == 2) {
if (Game_Flag_Query(kFlagKleinInsulted) && !Game_Flag_Query(kFlagKleinInsultedTalk) && Actor_Query_Is_In_Current_Set(kActorKlein)) {
Actor_Face_Actor(kActorKlein, kActorMcCoy, true);
Actor_Says(kActorKlein, 10, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 4120, kAnimationModeTalk);
Actor_Says(kActorKlein, 20, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 4125, kAnimationModeTalk);
Game_Flag_Set(kFlagKleinInsultedTalk);
Actor_Set_Goal_Number(kActorKlein, 4);
} else {
Actor_Says(kActorKlein, 10, kAnimationModeTalk);
Actor_Set_Goal_Number(kActorKlein, 4);
}
// return true;
}
//return false;
}
void AIScriptKlein::CompletedMovementTrack() {
if (Actor_Query_Goal_Number(kActorKlein) == 1) {
Actor_Set_Goal_Number(kActorKlein, 2);
return; // true;
}
if (Actor_Query_Goal_Number(kActorKlein) == 2) {
Actor_Set_Goal_Number(kActorKlein, 1);
return; // true;
}
if (Actor_Query_Goal_Number(kActorKlein) == 4) {
Actor_Set_Goal_Number(kActorKlein, 5);
// missing return?
}
if (Actor_Query_Goal_Number(kActorKlein) == 5) {
Actor_Set_Goal_Number(kActorKlein, 6);
// missing return?
}
if (Actor_Query_Goal_Number(kActorKlein) == 6) {
Actor_Set_Goal_Number(kActorKlein, 7);
return; // true;
}
if (Actor_Query_Goal_Number(kActorKlein) == 7) {
Actor_Set_Goal_Number(kActorKlein, 0);
return; // true;
}
// return false;
}
void AIScriptKlein::ReceivedClue(int clueId, int fromActorId) {
//return false;
}
void AIScriptKlein::ClickedByPlayer() {
//return false;
}
void AIScriptKlein::EnteredScene(int sceneId) {
// return false;
}
void AIScriptKlein::OtherAgentEnteredThisScene(int otherActorId) {
// return false;
}
void AIScriptKlein::OtherAgentExitedThisScene(int otherActorId) {
// return false;
}
void AIScriptKlein::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
// return false;
}
void AIScriptKlein::ShotAtAndMissed() {
// return false;
}
bool AIScriptKlein::ShotAtAndHit() {
return false;
}
void AIScriptKlein::Retired(int byActorId) {
// return false;
}
int AIScriptKlein::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
return 0;
}
bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
if (newGoalNumber == 1) {
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 73, Random_Query(3, 20));
AI_Movement_Track_Repeat(kActorKlein);
}
if (newGoalNumber == 2) {
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 74, Random_Query(10, 20));
AI_Movement_Track_Repeat(kActorKlein);
}
if (newGoalNumber == 3) {
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 31, 3);
AI_Movement_Track_Repeat(kActorKlein);
}
if (newGoalNumber == 4) {
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 32, 5);
AI_Movement_Track_Repeat(kActorKlein);
}
if (newGoalNumber == 5) {
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 35, 60);
AI_Movement_Track_Repeat(kActorKlein);
}
if (newGoalNumber == 6) {
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 32, 5);
AI_Movement_Track_Repeat(kActorKlein);
}
if (newGoalNumber == 100) {
AI_Movement_Track_Flush(kActorKlein);
Actor_Put_In_Set(kActorKlein, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorKlein, 35, 0);
}
return false;
}
bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
if (Actor_Query_Goal_Number(kActorKlein) == 1 || Actor_Query_Goal_Number(kActorKlein) == 2) {
*animation = 691;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(691)) {
_animationFrame = 0;
}
} else if (!Game_Flag_Query(196) && Actor_Query_Goal_Number(kActorKlein) == 3) {
*animation = 689;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(689)) {
_animationFrame = 0;
if (Random_Query(1, 10) == 1) {
Game_Flag_Set(196);
}
}
} else {
if (Game_Flag_Query(198) && Actor_Query_Goal_Number(kActorKlein) == 3) {
_animationFrame--;
if (_animationFrame < 0) {
_animationFrame = 0;
}
} else {
++_animationFrame;
}
*animation = 690;
if (_animationFrame <= 9) {
if (Game_Flag_Query(198)) {
Game_Flag_Reset(198);
}
}
if (_animationFrame == 14) {
if (Random_Query(1, 5) == 1) {
Game_Flag_Set(197);
}
}
if (_animationFrame == 15) {
if (Game_Flag_Query(197) == 1) {
Game_Flag_Reset(197);
Game_Flag_Set(198);
}
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(690)) {
_animationFrame = 0;
Game_Flag_Reset(196);
}
}
break;
case 1:
*animation = 688;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(688)) {
_animationFrame = 0;
}
break;
case 2:
*animation = 692;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(692)) {
_animationFrame = 0;
}
break;
case 3:
*animation = 693;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(693)) {
_animationState = 2;
_animationFrame = 0;
*animation = 692;
}
break;
case 4:
*animation = 694;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(694)) {
_animationState = 2;
_animationFrame = 0;
*animation = 692;
}
break;
case 5:
*animation = 695;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(695)) {
_animationState = 2;
_animationFrame = 0;
*animation = 692;
}
break;
case 6:
*animation = 696;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(696)) {
_animationState = 2;
_animationFrame = 0;
*animation = 692;
}
break;
case 7:
*animation = 697;
_animationFrame++;
if (_animationFrame>= Slice_Animation_Query_Number_Of_Frames(697)) {
_animationState = 2;
_animationFrame = 0;
*animation = 692;
}
break;
case 8:
_animationFrame = 0;
*animation = _animationNext;
_animationState = _animationStateNext;
break;
default:
*animation = 399;
break;
}
*frame = _animationFrame;
return true;
}
bool AIScriptKlein::ChangeAnimationMode(int mode) {
switch (mode)
{
case kAnimationModeIdle:
_animationState = 0;
_animationFrame = 0;
break;
case kAnimationModeWalk:
if (_animationState > 1) {
_animationState = 1;
_animationFrame = 0;
} else if (_animationState == 0) {
_animationState = 8;
_animationStateNext = 1;
_animationNext = 688;
}
break;
case kAnimationModeTalk:
if (_animationState > 0) {
_animationState = 2;
_animationFrame = 0;
} else {
_animationState = 8;
_animationStateNext = 2;
_animationNext = 692;
}
break;
case 12:
if (_animationState > 0) {
_animationState = 2;
_animationFrame = 0;
} else {
_animationState = 8;
_animationStateNext = 3;
_animationNext = 693;
}
break;
case 13:
if (_animationState > 0) {
_animationState = 2;
_animationFrame = 0;
} else {
_animationState = 8;
_animationStateNext = 4;
_animationNext = 694;
}
break;
case 14:
if (_animationState > 0) {
_animationState = 2;
_animationFrame = 0;
} else {
_animationState = 8;
_animationStateNext = 5;
_animationNext = 695;
}
break;
case 15:
if (_animationState > 0) {
_animationState = 2;
_animationFrame = 0;
} else {
_animationState = 8;
_animationStateNext = 6;
_animationNext = 696;
}
break;
case 16:
if (_animationState > 0) {
_animationState = 2;
_animationFrame = 0;
} else {
_animationState = 8;
_animationStateNext = 7;
_animationNext = 697;
}
break;
default:
break;
}
return true;
}
void AIScriptKlein::QueryAnimationState(int *animationState, int *animationFrame, int *animationStateNext, int *animationNext) {
*animationState = _animationState;
*animationFrame = _animationFrame;
*animationStateNext = _animationStateNext;
*animationNext = _animationNext;
}
void AIScriptKlein::SetAnimationState(int animationState, int animationFrame, int animationStateNext, int animationNext) {
_animationState = animationState;
_animationFrame = animationFrame;
_animationStateNext = animationStateNext;
_animationNext = animationNext;
}
bool AIScriptKlein::ReachedMovementTrackWaypoint(int waypointId) {
if (waypointId == 73 || waypointId == 74) {
Actor_Face_Heading(kActorKlein, 768, false);
}
if (waypointId == 31) {
Actor_Face_Heading(kActorKlein, 216, false);
}
return true;
}
void AIScriptKlein::FledCombat() {
// return false;
}
} // End of namespace BladeRunner

View File

@ -44,6 +44,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
_AIScripts[kActorZuben] = new AIScriptZuben(_vm);
_AIScripts[kActorOfficerLeary] = new AIScriptOfficerLeary(_vm);
_AIScripts[kActorHowieLee] = new AIScriptHowieLee(_vm);
_AIScripts[kActorKlein] = new AIScriptKlein(_vm);
_AIScripts[kActorLeon] = new AIScriptLeon(_vm);
_AIScripts[kActorMaggie] = new AIScriptMaggie(_vm);
_AIScripts[kActorGenwalkerA] = new AIScriptGenericWalkerA(_vm);

View File

@ -150,6 +150,9 @@ DECLARE_SCRIPT(HowieLee)
bool var_45DFB8;
END_SCRIPT
DECLARE_SCRIPT(Klein)
END_SCRIPT
DECLARE_SCRIPT(Leon)
int var_45EDAC;
float var_45EDA0_z;

View File

@ -496,60 +496,60 @@ void SceneScriptMA04::phoneCallWithClovis() {
}
void SceneScriptMA04::turnOnTV() {
Overlay_Play("MA04OVR2", 0, 1, 0, 0);
Overlay_Play("MA04OVR2", 0, true, false, 0);
switch (Global_Variable_Query(kVariableNextTvNews)) {
case 4:
ADQ_Add(kActorNewscaster, 230, 3);
ADQ_Add(kActorNewscaster, 240, 3);
case 0:
ADQ_Add(kActorNewscaster, 0, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 10, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 20, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 30, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 430, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 440, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 450, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 460, kAnimationModeTalk);
break;
case 3:
ADQ_Add(kActorNewscaster, 170, 3);
ADQ_Add(kActorNewscaster, 180, 3);
ADQ_Add(kActorNewscaster, 190, 3);
ADQ_Add(kActorNewscaster, 200, 3);
ADQ_Add(kActorNewscaster, 210, 3);
ADQ_Add(kActorNewscaster, 220, 3);
ADQ_Add(kActorGovernorKolvig, 80, 3);
ADQ_Add(kActorGovernorKolvig, 90, 3);
ADQ_Add(kActorGovernorKolvig, 100, 3);
ADQ_Add(kActorGovernorKolvig, 110, 3);
ADQ_Add(kActorGovernorKolvig, 120, 3);
ADQ_Add(kActorGovernorKolvig, 130, 3);
case 1:
ADQ_Add(kActorNewscaster, 40, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 50, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 60, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 70, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 80, kAnimationModeTalk);
break;
case 2:
if (Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy) <= Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy)) {
ADQ_Add(kActorNewscaster, 90, 3);
ADQ_Add(kActorNewscaster, 100, 3);
ADQ_Add(kActorNewscaster, 110, 3);
ADQ_Add(kActorGuzza, 1540, 3);
ADQ_Add(kActorGuzza, 1550, 3);
ADQ_Add(kActorGuzza, 1560, 3);
ADQ_Add(kActorNewscaster, 90, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 100, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 110, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1540, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1550, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1560, kAnimationModeTalk);
} else {
ADQ_Add(kActorNewscaster, 120, 3);
ADQ_Add(kActorNewscaster, 130, 3);
ADQ_Add(kActorNewscaster, 140, 3);
ADQ_Add(kActorNewscaster, 150, 3);
ADQ_Add(kActorGuzza, 1570, 3);
ADQ_Add(kActorGuzza, 1580, 3);
ADQ_Add(kActorGuzza, 1590, 3);
ADQ_Add(kActorNewscaster, 120, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 130, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 140, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 150, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1570, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1580, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1590, kAnimationModeTalk);
}
break;
case 1:
ADQ_Add(kActorNewscaster, 40, 3);
ADQ_Add(kActorNewscaster, 50, 3);
ADQ_Add(kActorNewscaster, 60, 3);
ADQ_Add(kActorNewscaster, 70, 3);
ADQ_Add(kActorNewscaster, 80, 3);
case 3:
ADQ_Add(kActorNewscaster, 170, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 180, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 190, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 200, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 210, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 220, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 80, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 90, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 100, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 110, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 120, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 130, kAnimationModeTalk);
break;
case 0:
ADQ_Add(kActorNewscaster, 0, 3);
ADQ_Add(kActorNewscaster, 10, 3);
ADQ_Add(kActorNewscaster, 20, 3);
ADQ_Add(kActorNewscaster, 30, 3);
ADQ_Add(kActorTyrell, 430, 3);
ADQ_Add(kActorTyrell, 440, 3);
ADQ_Add(kActorTyrell, 450, 3);
ADQ_Add(kActorTyrell, 460, 3);
case 4:
ADQ_Add(kActorNewscaster, 230, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 240, kAnimationModeTalk);
break;
}
}

View File

@ -36,7 +36,7 @@ void SceneScriptPS01::InitializeScene() {
Ambient_Sounds_Add_Sound(375, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0);
if (Game_Flag_Query(130)) {
if (Game_Flag_Query(kFlagPS02toPS01)) {
if (Game_Flag_Query(kFlagSpinnerToPS01)) {
Scene_Loop_Set_Default(1);
} else {
@ -253,9 +253,9 @@ void SceneScriptPS01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS01::PlayerWalkedIn() {
if (Game_Flag_Query(130)) {
if (Game_Flag_Query(kFlagPS02toPS01)) {
Actor_Set_At_XYZ(kActorMcCoy, 1920.0f, 16581.0f, -2653.0f, 150);
Game_Flag_Reset(130);
Game_Flag_Reset(kFlagPS02toPS01);
}
//return false;
}

View File

@ -49,39 +49,41 @@ bool SceneScriptPS02::MouseClick(int x, int y) {
bool SceneScriptPS02::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("E.DOOR01", objectName) || Object_Query_Click("E.D00R02", objectName)) {
if (Game_Flag_Query(130) ) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
if (Game_Flag_Query(kFlagPS02toPS01)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(61, kScenePS01);
Scene_Loop_Start_Special(1, 3, 1);
Set_Enter(kSetPS01, kScenePS01);
Scene_Loop_Start_Special(1, 3, true);
}
} else if (Game_Flag_Query(22) ) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
} else if (Game_Flag_Query(kFlagPS02toPS05)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(15, kScenePS05);
Scene_Loop_Start_Special(1, 3, 1);
Set_Enter(kSetPS05, kScenePS05);
Scene_Loop_Start_Special(1, 3, true);
}
} else if (Game_Flag_Query(131) ) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
} else if (Game_Flag_Query(kFlagPS02toPS07)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(66, kScenePS07);
Scene_Loop_Start_Special(1, 3, 1);
Set_Enter(kSetPS07, kScenePS07);
Scene_Loop_Start_Special(1, 3, true);
}
} else if (Game_Flag_Query(132) ) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
} else if (Game_Flag_Query(kFlagPS02toPS03)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(63, kScenePS03);
Scene_Loop_Start_Special(1, 3, 1);
Set_Enter(kSetPS03, kScenePS03);
Scene_Loop_Start_Special(1, 3, true);
}
} else if (Game_Flag_Query(kFlagPS02toPS09)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetPS09, kScenePS09);
Scene_Loop_Start_Special(1, 3, true);
}
} else if (Game_Flag_Query(133) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(67, kScenePS09);
Scene_Loop_Start_Special(1, 3, 1);
}
}
return false;
@ -118,25 +120,25 @@ void SceneScriptPS02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptPS02::PlayerWalkedIn() {
Game_Flag_Reset(718);
Actor_Face_XYZ(kActorMcCoy, 0, 0, 450.0f, true);
Actor_Face_XYZ(kActorMcCoy, 0.0f, 0.0f, 450.0f, true);
Player_Gains_Control();
sub_4018BC();
activateElevator();
Player_Loses_Control();
if (Game_Flag_Query(130) ) {
Set_Enter(61, kScenePS01);
Scene_Loop_Start_Special(1, 3, 1);
} else if (Game_Flag_Query(22) ) {
Set_Enter(15, kScenePS05);
Scene_Loop_Start_Special(1, 3, 1);
} else if (Game_Flag_Query(131) ) {
Set_Enter(66, kScenePS07);
Scene_Loop_Start_Special(1, 3, 1);
} else if (Game_Flag_Query(132) ) {
Set_Enter(63, kScenePS03);
Scene_Loop_Start_Special(1, 3, 1);
} else if (Game_Flag_Query(133) ) {
Set_Enter(67, kScenePS09);
Scene_Loop_Start_Special(1, 3, 1);
if (Game_Flag_Query(kFlagPS02toPS01) ) {
Set_Enter(kSetPS01, kScenePS01);
Scene_Loop_Start_Special(1, 3, true);
} else if (Game_Flag_Query(kFlagPS02toPS05) ) {
Set_Enter(kSetPS05, kScenePS05);
Scene_Loop_Start_Special(1, 3, true);
} else if (Game_Flag_Query(kFlagPS02toPS07) ) {
Set_Enter(kSetPS07, kScenePS07);
Scene_Loop_Start_Special(1, 3, true);
} else if (Game_Flag_Query(kFlagPS02toPS03) ) {
Set_Enter(kSetPS03, kScenePS03);
Scene_Loop_Start_Special(1, 3, true);
} else if (Game_Flag_Query(kFlagPS02toPS09) ) {
Set_Enter(kSetPS09, kScenePS09);
Scene_Loop_Start_Special(1, 3, true);
}
//return true;
}
@ -150,23 +152,23 @@ void SceneScriptPS02::PlayerWalkedOut() {
void SceneScriptPS02::DialogueQueueFlushed(int a1) {
}
void SceneScriptPS02::sub_4018BC() {
void SceneScriptPS02::activateElevator() {
Scene_Exits_Disable();
switch (Elevator_Activate(kElevatorPS)) {
case 7:
Game_Flag_Set(133);
Game_Flag_Set(kFlagPS02toPS09);
break;
case 6:
Game_Flag_Set(132);
Game_Flag_Set(kFlagPS02toPS03);
break;
case 5:
Game_Flag_Set(22);
Game_Flag_Set(kFlagPS02toPS05);
break;
case 4:
Game_Flag_Set(130);
Game_Flag_Set(kFlagPS02toPS01);
break;
case 3:
Game_Flag_Set(131);
Game_Flag_Set(kFlagPS02toPS07);
break;
default:
break;

View File

@ -34,7 +34,7 @@ void SceneScriptPS03::InitializeScene() {
Game_Flag_Reset(135);
} else {
Setup_Scene_Information(-569.54f, -354.62f, -1076.15f, 475);
Game_Flag_Reset(132);
Game_Flag_Reset(kFlagPS02toPS03);
}
Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2);
Scene_Exit_Add_2D_Exit(1, 449, 273, 508, 329, 0);

View File

@ -25,11 +25,11 @@
namespace BladeRunner {
void SceneScriptPS05::InitializeScene() {
if (Game_Flag_Query(21)) {
if (Game_Flag_Query(kFlagPS13toPS05)) {
Setup_Scene_Information(547.59f, 0.18f, -216.84f, 334);
} else if (Game_Flag_Query(22)) {
} else if (Game_Flag_Query(kFlagPS02toPS05)) {
Setup_Scene_Information(635.0f, 0.0f, -598.0f, 475);
} else {
} else { // kFlagPS06toPS05 || kFlagPS15toPS05
Setup_Scene_Information(630.72f, 0.38f, -469.26f, 400);
}
Scene_Exit_Add_2D_Exit(0, 218, 98, 280, 246, 3);
@ -97,26 +97,26 @@ bool SceneScriptPS05::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptPS05::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 2, 24, 1, false)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(101, kScenePS15);
Set_Enter(kSetPS15, kScenePS15);
}
return true;
}
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 635.0f, 0.0f, -598.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(62, kScenePS02);
Set_Enter(kSetPS02, kScenePS02);
}
return true;
}
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 742.52002f, 0.37f, -457.69f, 0, 1, false, 0)) {
Game_Flag_Set(136);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 742.52f, 0.37f, -457.69f, 0, 1, false, 0)) {
Game_Flag_Set(kFlagPS05toPS06);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(65, kScenePS06);
Set_Enter(kSetPS06, kScenePS06);
}
return true;
}
@ -142,16 +142,16 @@ void SceneScriptPS05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS05::PlayerWalkedIn() {
if (Game_Flag_Query(23)) {
if (Game_Flag_Query(kFlagPS06toPS05)) {
Actor_Set_At_XYZ(kActorMcCoy, 718.72f, 0.37f, -461.26f, 600);
} else if (Game_Flag_Query(22)) {
} else if (Game_Flag_Query(kFlagPS02toPS05)) {
selectNextTvNews();
turnOnTV();
}
Game_Flag_Reset(22);
Game_Flag_Reset(23);
Game_Flag_Reset(21);
Game_Flag_Reset(204);
Game_Flag_Reset(kFlagPS02toPS05);
Game_Flag_Reset(kFlagPS06toPS05);
Game_Flag_Reset(kFlagPS13toPS05);
Game_Flag_Reset(kFlagPS15toPS05);
}
void SceneScriptPS05::PlayerWalkedOut() {
@ -182,81 +182,79 @@ void SceneScriptPS05::selectNextTvNews() {
void SceneScriptPS05::turnOnTV() {
switch (Global_Variable_Query(kVariableNextTvNews)) {
case 4:
if (!Game_Flag_Query(692)) {
Overlay_Play("PS05OVER", 0, 1, 0, 0);
ADQ_Add(kActorNewscaster, 230, 3);
ADQ_Add(kActorNewscaster, 240, 3);
Game_Flag_Set(692);
}
break;
case 3:
if (!Game_Flag_Query(691)) {
Overlay_Play("PS05OVER", 0, 1, 0, 0);
ADQ_Add(kActorNewscaster, 170, 3);
ADQ_Add(kActorNewscaster, 180, 3);
ADQ_Add(kActorNewscaster, 190, 3);
ADQ_Add(kActorNewscaster, 200, 3);
ADQ_Add(kActorNewscaster, 210, 3);
ADQ_Add(kActorNewscaster, 220, 3);
ADQ_Add(kActorGovernorKolvig, 80, 3);
ADQ_Add(kActorGovernorKolvig, 90, 3);
ADQ_Add(kActorGovernorKolvig, 100, 3);
ADQ_Add(kActorGovernorKolvig, 110, 3);
ADQ_Add(kActorGovernorKolvig, 120, 3);
ADQ_Add(kActorGovernorKolvig, 130, 3);
Game_Flag_Set(691);
}
break;
case 2:
if (!Game_Flag_Query(690)) {
Overlay_Play("PS05OVER", 0, 1, 0, 0);
if (Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy) > Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy)) {
ADQ_Add(kActorNewscaster, 120, 3);
ADQ_Add(kActorNewscaster, 130, 3);
ADQ_Add(kActorNewscaster, 140, 3);
ADQ_Add(kActorNewscaster, 150, 3);
ADQ_Add(kActorGuzza, 1570, 3);
ADQ_Add(kActorGuzza, 1580, 3);
ADQ_Add(kActorGuzza, 1590, 3);
} else {
ADQ_Add(kActorNewscaster, 90, 3);
ADQ_Add(kActorNewscaster, 100, 3);
ADQ_Add(kActorNewscaster, 110, 3);
ADQ_Add(kActorGuzza, 1540, 3);
ADQ_Add(kActorGuzza, 1550, 3);
ADQ_Add(kActorGuzza, 1560, 3);
}
Game_Flag_Set(690);
case 0:
if (!Game_Flag_Query(kFlagPS05TV0)) {
Overlay_Play("PS05OVER", 0, true, false, 0);
ADQ_Add(kActorNewscaster, 0, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 10, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 20, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 30, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 430, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 440, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 450, kAnimationModeTalk);
ADQ_Add(kActorTyrell, 460, kAnimationModeTalk);
Game_Flag_Set(kFlagPS05TV0);
}
break;
case 1:
if (!Game_Flag_Query(689)) {
Overlay_Play("PS05OVER", 0, 1, 0, 0);
ADQ_Add(kActorNewscaster, 40, 3);
ADQ_Add(kActorNewscaster, 50, 3);
ADQ_Add(kActorNewscaster, 60, 3);
ADQ_Add(kActorNewscaster, 70, 3);
ADQ_Add(kActorNewscaster, 80, 3);
Game_Flag_Set(689);
if (!Game_Flag_Query(kFlagPS05TV1)) {
Overlay_Play("PS05OVER", 0, true, false, 0);
ADQ_Add(kActorNewscaster, 40, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 50, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 60, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 70, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 80, kAnimationModeTalk);
Game_Flag_Set(kFlagPS05TV1);
}
break;
case 0:
if (!Game_Flag_Query(688)) {
Overlay_Play("PS05OVER", 0, 1, 0, 0);
ADQ_Add(kActorNewscaster, 0, 3);
ADQ_Add(kActorNewscaster, 10, 3);
ADQ_Add(kActorNewscaster, 20, 3);
ADQ_Add(kActorNewscaster, 30, 3);
ADQ_Add(kActorTyrell, 430, 3);
ADQ_Add(kActorTyrell, 440, 3);
ADQ_Add(kActorTyrell, 450, 3);
ADQ_Add(kActorTyrell, 460, 3);
Game_Flag_Set(688);
case 2:
if (!Game_Flag_Query(kFlagPS05TV2)) {
Overlay_Play("PS05OVER", 0, true, false, 0);
if (Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy) > Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy)) {
ADQ_Add(kActorNewscaster, 120, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 130, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 140, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 150, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1570, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1580, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1590, kAnimationModeTalk);
} else {
ADQ_Add(kActorNewscaster, 90, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 100, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 110, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1540, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1550, kAnimationModeTalk);
ADQ_Add(kActorGuzza, 1560, kAnimationModeTalk);
}
Game_Flag_Set(kFlagPS05TV2);
}
break;
case 3:
if (!Game_Flag_Query(kFlagPS05TV3)) {
Overlay_Play("PS05OVER", 0, true, false, 0);
ADQ_Add(kActorNewscaster, 170, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 180, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 190, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 200, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 210, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 220, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 80, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 90, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 100, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 110, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 120, kAnimationModeTalk);
ADQ_Add(kActorGovernorKolvig, 130, kAnimationModeTalk);
Game_Flag_Set(kFlagPS05TV3);
}
break;
case 4:
if (!Game_Flag_Query(kFlagPS05TV4)) {
Overlay_Play("PS05OVER", 0, true, false, 0);
ADQ_Add(kActorNewscaster, 230, kAnimationModeTalk);
ADQ_Add(kActorNewscaster, 240, kAnimationModeTalk);
Game_Flag_Set(kFlagPS05TV4);
}
break;
default:
return;
}
}

View File

@ -103,10 +103,10 @@ bool SceneScriptPS06::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptPS06::ClickedOnExit(int exitId) {
if (exitId == 0) {
Game_Flag_Set(23);
Game_Flag_Set(kFlagPS06toPS05);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(15, kScenePS05);
Set_Enter(kSetPS05, kScenePS05);
return true;
}
return false;
@ -123,8 +123,8 @@ void SceneScriptPS06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS06::PlayerWalkedIn() {
if (Game_Flag_Query(136)) {
Game_Flag_Reset(136);
if (Game_Flag_Query(kFlagPS05toPS06)) {
Game_Flag_Reset(kFlagPS05toPS06);
}
}

View File

@ -27,7 +27,7 @@ namespace BladeRunner {
void SceneScriptPS07::InitializeScene() {
Setup_Scene_Information(609.07f, 0.22f, -598.67f, 768);
Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(false);
Ambient_Sounds_Add_Looping_Sound(141, 80, 0, 1);
Ambient_Sounds_Add_Sound(142, 5, 20, 5, 10, -70, 70, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(146, 5, 30, 5, 10, -70, 70, -101, -101, 0, 0);
@ -65,23 +65,23 @@ bool SceneScriptPS07::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptPS07::ClickedOnActor(int actorId) {
if (actorId == 30) {
if (actorId == kActorKlein) {
Actor_Face_Actor(kActorMcCoy, kActorKlein, true);
Actor_Set_Goal_Number(kActorKlein, 3);
if (!Game_Flag_Query(111)) {
if (!Game_Flag_Query(kFlagKleinTalkClues)) {
Actor_Says(kActorMcCoy, 4115, 13);
}
if (!Game_Flag_Query(111) && (Game_Flag_Query(125) || Game_Flag_Query(126) || Game_Flag_Query(127) || Game_Flag_Query(128))) {
if (!Game_Flag_Query(kFlagKleinTalkClues) && (Game_Flag_Query(kFlagPlayerHasShellCasings) || Game_Flag_Query(kFlagPlayerHasOfficersStatement) || Game_Flag_Query(kFlagPlayerHasPaintTransfer) || Game_Flag_Query(kFlagPlayerHasChromeDebris))) {
Actor_Face_Actor(kActorKlein, kActorMcCoy, true);
Actor_Says(kActorKlein, 30, 12);
Game_Flag_Set(111);
Game_Flag_Set(kFlagKleinTalkClues);
} else {
if (Game_Flag_Query(111)) {
if (Game_Flag_Query(kFlagKleinTalkClues)) {
Actor_Says(kActorMcCoy, 4130, 18);
}
}
if (Game_Flag_Query(125) && !Game_Flag_Query(12)) {
Game_Flag_Set(12);
if (Game_Flag_Query(kFlagPlayerHasShellCasings) && !Game_Flag_Query(kFlagKleinTalkShellCasings)) {
Game_Flag_Set(kFlagKleinTalkShellCasings);
Actor_Clue_Acquire(kActorMcCoy, kClueLabShellCasings, 0, kActorKlein);
Actor_Says(kActorKlein, 50, 16);
Actor_Says(kActorMcCoy, 4135, 13);
@ -93,15 +93,28 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
Actor_Set_Goal_Number(kActorKlein, 1);
return true;
}
if (Game_Flag_Query(126) && !Game_Flag_Query(13)) {
Game_Flag_Set(13);
if (Game_Flag_Query(kFlagPlayerHasOfficersStatement) && !Game_Flag_Query(kFlagKleinTalkOfficersStatement)) {
Game_Flag_Set(kFlagKleinTalkOfficersStatement);
Actor_Clue_Acquire(kActorMcCoy, kClueLabCorpses, 0, kActorKlein);
sub_401D60();
Actor_Says(kActorKlein, 100, 13);
Actor_Says(kActorMcCoy, 4145, 13);
Actor_Says(kActorKlein, 110, 12);
Actor_Says(kActorMcCoy, 4150, 13);
Actor_Says(kActorKlein, 120, 14);
Actor_Says(kActorMcCoy, 4155, 17);
Actor_Says(kActorKlein, 130, 15);
Actor_Says(kActorMcCoy, 4160, 13);
Actor_Says(kActorKlein, 140, 16);
Actor_Says(kActorMcCoy, 4165, 18);
Actor_Says(kActorKlein, 160, 13);
Actor_Says(kActorMcCoy, 4170, 19);
Actor_Says(kActorMcCoy, 4175, 19);
Actor_Modify_Friendliness_To_Other(kActorKlein, kActorMcCoy, 3);
Actor_Set_Goal_Number(kActorKlein, 1);
return true;
}
if (Game_Flag_Query(127) && !Game_Flag_Query(104)) {
Game_Flag_Set(104);
if (Game_Flag_Query(kFlagPlayerHasPaintTransfer) && !Game_Flag_Query(kFlagKleinTalkPaintTransfer)) {
Game_Flag_Set(kFlagKleinTalkPaintTransfer);
Actor_Clue_Acquire(kActorMcCoy, kClueLabPaintTransfer, 0, kActorKlein);
Actor_Says(kActorKlein, 170, 14);
Actor_Says(kActorMcCoy, 4180, 13);
@ -114,8 +127,8 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
Actor_Set_Goal_Number(kActorKlein, 1);
return true;
}
if (Game_Flag_Query(128) && !Game_Flag_Query(105)) {
Game_Flag_Set(105);
if (Game_Flag_Query(kFlagPlayerHasChromeDebris) && !Game_Flag_Query(kFlagKleinTalkChromeDebris)) {
Game_Flag_Set(kFlagKleinTalkChromeDebris);
Actor_Says(kActorKlein, 220, 12);
Actor_Says(kActorMcCoy, 4190, 13);
Actor_Says(kActorKlein, 230, 14);
@ -137,7 +150,7 @@ bool SceneScriptPS07::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptPS07::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 609.07f, 0.22f, -598.67f, 0, 0, false, 0)) {
Set_Enter(62, kScenePS02);
Set_Enter(kSetPS02, kScenePS02);
}
return true;
}
@ -156,12 +169,12 @@ void SceneScriptPS07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptPS07::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 561.07f, 0.34f, -606.67f, 6, 0, false, 0);
Game_Flag_Reset(131);
Game_Flag_Reset(kFlagPS02toPS07);
//return false;
}
void SceneScriptPS07::PlayerWalkedOut() {
if (!Game_Flag_Query(138) && Global_Variable_Query(kVariableChapter) == 1) {
if (!Game_Flag_Query(kFlagKleinInsulted) && Global_Variable_Query(kVariableChapter) == 1) {
Actor_Set_Goal_Number(kActorKlein, 0);
}
}
@ -169,21 +182,4 @@ void SceneScriptPS07::PlayerWalkedOut() {
void SceneScriptPS07::DialogueQueueFlushed(int a1) {
}
void SceneScriptPS07::sub_401D60() {
Actor_Says(kActorKlein, 100, 13);
Actor_Says(kActorMcCoy, 4145, 13);
Actor_Says(kActorKlein, 110, 12);
Actor_Says(kActorMcCoy, 4150, 13);
Actor_Says(kActorKlein, 120, 14);
Actor_Says(kActorMcCoy, 4155, 17);
Actor_Says(kActorKlein, 130, 15);
Actor_Says(kActorMcCoy, 4160, 13);
Actor_Says(kActorKlein, 140, 16);
Actor_Says(kActorMcCoy, 4165, 18);
Actor_Says(kActorKlein, 160, 13);
Actor_Says(kActorMcCoy, 4170, 19);
Actor_Says(kActorMcCoy, 4175, 19);
Actor_Modify_Friendliness_To_Other(kActorKlein, kActorMcCoy, 3);
}
} // End of namespace BladeRunner

View File

@ -215,8 +215,8 @@ void SceneScriptPS09::PlayerWalkedIn() {
Player_Gains_Control();
Game_Flag_Set(211);
}
if (Game_Flag_Query(133)) {
Game_Flag_Reset(133);
if (Game_Flag_Query(kFlagPS02toPS09)) {
Game_Flag_Reset(kFlagPS02toPS09);
//return true;
return;
}

View File

@ -216,16 +216,16 @@ bool SceneScriptPS13::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptPS13::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 10, 12, 1, false)) {
Game_Flag_Set(19);
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 10, 12, true, false)) {
Game_Flag_Set(kFlagPS13toPS12);
sub_40267C();
Set_Enter(14, kScenePS12);
Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS12);
}
return true;
}
if (exitId == 1) {
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 11, 12, 1, false)) {
Game_Flag_Set(21);
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 11, 12, true, false)) {
Game_Flag_Set(kFlagPS13toPS05);
Player_Set_Combat_Mode(false);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@ -237,7 +237,7 @@ bool SceneScriptPS13::ClickedOnExit(int exitId) {
Global_Variable_Reset(12);
Global_Variable_Reset(13);
Global_Variable_Reset(9);
Set_Enter(15, kScenePS05);
Set_Enter(kSetPS05, kScenePS05);
}
return true;
}

View File

@ -107,8 +107,8 @@ bool SceneScriptPS15::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -360.0f, -113.43f, 50.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(204);
Set_Enter(15, kScenePS05);
Game_Flag_Set(kFlagPS15toPS05);
Set_Enter(kSetPS05, kScenePS05);
}
return true;
}
@ -119,7 +119,7 @@ bool SceneScriptPS15::ClickedOnExit(int exitId) {
Sound_Play(155, 90, 0, 0, 50);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(14, kScenePS10);
Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS10);
}
return true;
}

View File

@ -357,7 +357,7 @@ DECLARE_SCRIPT(PS01)
END_SCRIPT
DECLARE_SCRIPT(PS02)
void sub_4018BC();
void activateElevator();
END_SCRIPT
DECLARE_SCRIPT(PS03)
@ -376,7 +376,6 @@ DECLARE_SCRIPT(PS06)
END_SCRIPT
DECLARE_SCRIPT(PS07)
void sub_401D60();
END_SCRIPT
// PS08 does not exits

View File

@ -330,7 +330,7 @@ int ScriptBase::Actor_Query_Which_Set_In(int actorId) {
bool ScriptBase::Actor_Query_Is_In_Current_Set(int actorId) {
int actorSetId = _vm->_actors[actorId]->getSetId();
return actorSetId >= 0 && _vm->_scene->getSetId();
return actorSetId >= 0 && actorSetId == _vm->_scene->getSetId();
}
bool ScriptBase::Actor_Query_In_Set(int actorId, int setId) {