aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r--engines/bladerunner/script/scene/ps05.cpp20
-rw-r--r--engines/bladerunner/script/script.cpp7
-rw-r--r--engines/bladerunner/script/script.h2
3 files changed, 14 insertions, 15 deletions
diff --git a/engines/bladerunner/script/scene/ps05.cpp b/engines/bladerunner/script/scene/ps05.cpp
index 59e8bbcbbb..656550e864 100644
--- a/engines/bladerunner/script/scene/ps05.cpp
+++ b/engines/bladerunner/script/scene/ps05.cpp
@@ -91,16 +91,6 @@ bool SceneScriptPS05::ClickedOnActor(int actorId) {
}
bool SceneScriptPS05::ClickedOnItem(int itemId, bool a2) {
- if (Game_Flag_Query(23)) {
- Actor_Set_At_XYZ(kActorMcCoy, 718.72f, 0.37f, -461.26f, 600);
- } else if (Game_Flag_Query(22)) {
- sub_401B34();
- sub_401C30();
- }
- Game_Flag_Reset(22);
- Game_Flag_Reset(23);
- Game_Flag_Reset(21);
- Game_Flag_Reset(204);
return false;
}
@@ -152,6 +142,16 @@ void SceneScriptPS05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS05::PlayerWalkedIn() {
+ if (Game_Flag_Query(23)) {
+ Actor_Set_At_XYZ(kActorMcCoy, 718.72f, 0.37f, -461.26f, 600);
+ } else if (Game_Flag_Query(22)) {
+ sub_401B34();
+ sub_401C30();
+ }
+ Game_Flag_Reset(22);
+ Game_Flag_Reset(23);
+ Game_Flag_Reset(21);
+ Game_Flag_Reset(204);
}
void SceneScriptPS05::PlayerWalkedOut() {
diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp
index 32528c9728..c4352706f5 100644
--- a/engines/bladerunner/script/script.cpp
+++ b/engines/bladerunner/script/script.cpp
@@ -33,6 +33,7 @@
#include "bladerunner/crimes_database.h"
#include "bladerunner/combat.h"
#include "bladerunner/dialogue_menu.h"
+#include "bladerunner/elevator.h"
#include "bladerunner/gameflags.h"
#include "bladerunner/gameinfo.h"
#include "bladerunner/items.h"
@@ -1087,10 +1088,8 @@ bool ScriptBase::Voight_Kampff_Activate(int a1, int a2){
return false;
}
-int ScriptBase::Elevator_Activate(int elevator) {
- //TODO
- warning("Elevator_Activate(%d)", elevator);
- return 0;
+int ScriptBase::Elevator_Activate(int elevatorId) {
+ return _vm->_elevator->activate(elevatorId);
}
void ScriptBase::View_Score_Board() {
diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h
index 93c955dedd..61cee3aa9b 100644
--- a/engines/bladerunner/script/script.h
+++ b/engines/bladerunner/script/script.h
@@ -630,7 +630,7 @@ protected:
int Spinner_Interface_Choose_Dest(int a1, int a2);
void ESPER_Flag_To_Activate();
bool Voight_Kampff_Activate(int a1, int a2);
- int Elevator_Activate(int elevator);
+ int Elevator_Activate(int elevatorId);
void View_Score_Board();
// Query_Score
void Set_Score(int a0, int a1);