aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/scene
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/script/scene')
-rw-r--r--engines/bladerunner/script/scene/ps10.cpp262
-rw-r--r--engines/bladerunner/script/scene/ps11.cpp386
-rw-r--r--engines/bladerunner/script/scene/ps12.cpp146
-rw-r--r--engines/bladerunner/script/scene/ps13.cpp124
4 files changed, 563 insertions, 355 deletions
diff --git a/engines/bladerunner/script/scene/ps10.cpp b/engines/bladerunner/script/scene/ps10.cpp
index f3ab121d39..b8923ac3a3 100644
--- a/engines/bladerunner/script/scene/ps10.cpp
+++ b/engines/bladerunner/script/scene/ps10.cpp
@@ -25,11 +25,19 @@
namespace BladeRunner {
static int kPoliceMazePS10TargetCount = 20;
+int SceneScriptPS10::getPoliceMazePS10TargetCount() {
+ return kPoliceMazePS10TargetCount;
+}
-static const int *getPoliceMazePS10TrackData1() {
+static const int *getPoliceMazePS10TrackData1() { // Enemy (kItemPS10Target1, kItemPS10Target2)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target1, 0, // remove target-able here
+ kPMTITargetSet, kItemPS10Target2, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS10Target1,
kPMTIObstacleReset, kItemPS10Target2,
kPMTIFacing, 989,
@@ -37,22 +45,34 @@ static const int *getPoliceMazePS10TrackData1() {
kPMTITargetSet, kItemPS10Target1, 1,
kPMTITargetSet, kItemPS10Target2, 1,
kPMTIEnemyReset, kItemPS10Target1,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTIEnemyReset, kItemPS10Target2, // both targets should clear their enemy flag here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWaitRandom, 3000, 5000,
kPMTIObstacleSet, kItemPS10Target1,
- kPMTIPlaySound, 159, 100,
+ kPMTIPlaySound, 159, 100, // UPTARG3
kPMTIMove, 14,
kPMTIWait, 1000,
kPMTIRotate, 740, 80,
- kPMTIEnemySet, kItemPS10Target1,
+ kPMTIEnemySet, kItemPS10Target1, // Target becomes enemy after rotating
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTIEnemySet, kItemPS10Target2, // both targets should set their enemy flag here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWait, 0,
kPMTIRotate, 488, 80,
kPMTIWait, 1000,
kPMTIShoot, 27, 33,
kPMTIWait, 0,
kPMTIRotate, 740, 80,
- kPMTIPausedReset, kItemPS10Target2,
- kPMTIObstacleReset, kItemPS10Target1,
- kPMTIObstacleSet, kItemPS10Target2,
+ kPMTIPausedReset, kItemPS10Target2, // kItemPS10Target2 continues the route of this item
+ kPMTIObstacleReset, kItemPS10Target1, // kItemPS10Target1 becomes invisible
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target1, 0, // remove target-able here - only for Target1 item
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ kPMTIObstacleSet, kItemPS10Target2, // kItemPS10Target2 becomes visible in kItemPS10Target1's place
kPMTIPausedSet, kItemPS10Target1,
kPMTIPosition, 0,
kPMTIRestart
@@ -60,32 +80,41 @@ static const int *getPoliceMazePS10TrackData1() {
return trackData;
}
-static const int *getPoliceMazePS10TrackData2() {
+static const int *getPoliceMazePS10TrackData2() { // Enemy (kItemPS10Target1, kItemPS10Target2)
static int trackData[] = {
- kPMTIFacing, 740,
- kPMTIPosition, 0,
- kPMTIEnemySet, kItemPS10Target2,
- kPMTIMove, 69,
- kPMTIWait, 500,
- kPMTIObstacleReset, kItemPS10Target2,
- kPMTIPausedReset, kItemPS10Target5,
- kPMTIPausedSet, kItemPS10Target2,
- kPMTIPosition, 0,
+ kPMTIFacing, 740,
+ kPMTIPosition, 0,
+ kPMTIEnemySet, kItemPS10Target2,
+ kPMTIMove, 69,
+ kPMTIWait, 500,
+ kPMTIObstacleReset, kItemPS10Target2,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target2, 0, // remove target-able here - only for Target1 item
+// kPMTIPausedReset1of2, kItemPS10Target3, kItemPS10Target6, // re-use track 3 or 6
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ kPMTIPausedReset, kItemPS10Target5,
+ kPMTIPausedSet, kItemPS10Target2,
+ kPMTIPosition, 0,
kPMTIRestart
};
return trackData;
}
-static const int *getPoliceMazePS10TrackData3() {
+static const int *getPoliceMazePS10TrackData3() { // Enemy (kItemPS10Target3)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target3, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS10Target3,
kPMTIFacing, 993,
kPMTIPosition, 0,
kPMTIWaitRandom, 3000, 5000,
kPMTIObstacleSet, kItemPS10Target3,
- kPMTIPlaySound, 159, 100,
+ kPMTIPlaySound, 159, 100, // UPTARG3
kPMTITargetSet, kItemPS10Target3, 1,
kPMTIEnemyReset, kItemPS10Target3,
kPMTIMove, 5,
@@ -100,24 +129,33 @@ static const int *getPoliceMazePS10TrackData3() {
kPMTIRotate, 233, 80,
kPMTIWait, 0,
kPMTIRotate, 993, 80,
- kPMTIPlaySound, 34, 33,
+ kPMTIPlaySound, 34, 33, // TARGUP6
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS10Target3,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target3, 0, // remove target-able here
+ kPMTIPausedSet, kItemPS10Target3,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIRestart
};
return trackData;
}
-static const int *getPoliceMazePS10TrackData4() {
+static const int *getPoliceMazePS10TrackData4() { // Innocent (kItemPS10Target4)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target4, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS10Target4,
kPMTIFacing, 993,
kPMTIPosition, 0,
kPMTIWaitRandom, 3000, 6000,
kPMTIObstacleSet, kItemPS10Target4,
- kPMTIPlaySound, 159, 100,
+ kPMTIPlaySound, 159, 100, // UPTARG3
kPMTITargetSet, kItemPS10Target4, 1,
kPMTIEnemyReset, kItemPS10Target4,
kPMTIMove, 34,
@@ -126,6 +164,10 @@ static const int *getPoliceMazePS10TrackData4() {
kPMTIMove, 0,
kPMTILeave,
kPMTIObstacleReset, kItemPS10Target4,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target4, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset, kItemPS10Target8,
kPMTIPausedSet, kItemPS10Target4,
kPMTIRestart
@@ -133,16 +175,20 @@ static const int *getPoliceMazePS10TrackData4() {
return trackData;
}
-static const int *getPoliceMazePS10TrackData5() {
+static const int *getPoliceMazePS10TrackData5() { // Innocent (kItemPS10Target5)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target5, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS10Target5,
kPMTIFacing, 0,
kPMTIPosition, 0,
kPMTIWaitRandom, 4000, 6000,
kPMTIObstacleSet, kItemPS10Target5,
- kPMTIPlaySound, 159, 100,
+ kPMTIPlaySound, 159, 100, // UPTARG3
kPMTITargetSet, kItemPS10Target5, 1,
kPMTIEnemyReset, kItemPS10Target5,
kPMTIMove, 5,
@@ -150,10 +196,14 @@ static const int *getPoliceMazePS10TrackData5() {
kPMTIRotate, 512, 100,
kPMTIWait, 2000,
kPMTIRotate, 0, -100,
- kPMTIPlaySound, 34, 33,
+ kPMTIPlaySound, 34, 33, // TARGUP6
kPMTIMove, 0,
kPMTILeave,
kPMTIObstacleReset, kItemPS10Target5,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target5, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset, kItemPS10Target1,
kPMTIPausedSet, kItemPS10Target5,
kPMTIRestart
@@ -161,16 +211,20 @@ static const int *getPoliceMazePS10TrackData5() {
return trackData;
}
-static const int *getPoliceMazePS10TrackData6() {
+static const int *getPoliceMazePS10TrackData6() { // Enemy (kItemPS10Target6)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target6, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS10Target6,
kPMTIFacing, 999,
kPMTIPosition, 0,
kPMTIWaitRandom, 4000, 6000,
kPMTIObstacleSet, kItemPS10Target6,
- kPMTIPlaySound, 159, 100,
+ kPMTIPlaySound, 159, 100, // UPTARG3
kPMTITargetSet, kItemPS10Target6, 1,
kPMTIEnemyReset, kItemPS10Target6,
kPMTIMove, 7,
@@ -180,14 +234,18 @@ static const int *getPoliceMazePS10TrackData6() {
kPMTIWait, 0,
kPMTIRotate, 500, 80,
kPMTIWait, 1000,
- kPMTIShoot, 27, 33,
+ kPMTIShoot, 27, 33, // SMCAL3
kPMTIWait, 0,
kPMTIRotate, 750, 80,
kPMTIWait, 0,
kPMTIRotate, 999, 80,
- kPMTIPlaySound, 34, 33,
+ kPMTIPlaySound, 34, 33, // TARGUP6
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS10Target6,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target6, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset, kItemPS10Target7,
kPMTIPausedReset, kItemPS10Target9,
kPMTIPausedSet, kItemPS10Target6,
@@ -196,10 +254,14 @@ static const int *getPoliceMazePS10TrackData6() {
return trackData;
}
-static const int *getPoliceMazePS10TrackData7() {
+static const int *getPoliceMazePS10TrackData7() { // Innocent (kItemPS10Target7)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target7, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS10Target7,
kPMTIFacing, 264,
kPMTIPosition, 0,
@@ -213,22 +275,30 @@ static const int *getPoliceMazePS10TrackData7() {
kPMTIMove, 0,
kPMTILeave,
kPMTIObstacleReset, kItemPS10Target7,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target7, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedSet, kItemPS10Target7,
kPMTIRestart
};
return trackData;
}
-static const int *getPoliceMazePS10TrackData8() {
+static const int *getPoliceMazePS10TrackData8() { // Enemy (kItemPS10Target8)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target8, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS10Target8,
kPMTIFacing, 993,
kPMTIPosition, 0,
kPMTIWaitRandom, 4000, 6000,
kPMTIObstacleSet, kItemPS10Target8,
- kPMTIPlaySound, 159, 100,
+ kPMTIPlaySound, 159, 100, // UPTARG3
kPMTITargetSet, kItemPS10Target8, 1,
kPMTIEnemyReset, kItemPS10Target8,
kPMTIMove, 34,
@@ -240,6 +310,10 @@ static const int *getPoliceMazePS10TrackData8() {
kPMTIShoot, 27, 33,
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS10Target8,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS10Target8, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset, kItemPS10Target4,
kPMTIPausedSet, kItemPS10Target8,
kPMTIRestart
@@ -247,7 +321,7 @@ static const int *getPoliceMazePS10TrackData8() {
return trackData;
}
-static const int *getPoliceMazePS10TrackData9() {
+static const int *getPoliceMazePS10TrackData9() { // Enemy (kItemPS10Target9)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount,
@@ -258,44 +332,46 @@ static const int *getPoliceMazePS10TrackData9() {
kPMTITargetSet, kItemPS10Target9, 1,
kPMTIEnemySet, kItemPS10Target9,
kPMTIObstacleSet, kItemPS10Target9,
- kPMTIPlaySound, 0, 33,
+ kPMTIPlaySound, 0, 33, // CROSLOCK
kPMTIMove, 23,
- kPMTIPlaySound, 0, 33,
+ kPMTIPlaySound, 0, 33, // CROSLOCK
kPMTIWait, 200,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIRotate, 498, 100,
- kPMTIPlaySound, 0, 33,
+ kPMTIPlaySound, 0, 33, // CROSLOCK
kPMTIWait, 100,
kPMTIShoot, 27, 33,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIMove, 35,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIWait, 100,
kPMTIShoot, 27, 33,
- kPMTIPlaySound, 0, 33,
+ kPMTIPlaySound, 0, 33, // CROSLOCK
kPMTIMove, 23,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIWait, 100,
kPMTIShoot, 27, 33,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIRotate, 758, 100,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIMove, 89,
- kPMTIPlaySound, 0, 33,
+ kPMTIPlaySound, 0, 33, // CROSLOCK
kPMTIWaitRandom, 4000, 6000,
- kPMTITargetSet, kItemPS10Target9, 1,
+#if BLADERUNNER_ORIGINAL_BUGS
+ kPMTITargetSet, kItemPS10Target9, 1, // TODO MAZE A bug? intended? why reset the target-able status (even if shot) here? (would result to re-credit another point if shot again now)
kPMTIEnemySet, kItemPS10Target9,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIFacing, 216,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIMove, 69,
kPMTIWait, 100,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIRotate, 498, 100,
kPMTIWait, 100,
kPMTIShoot, 27, 33,
- kPMTIPlaySound, 0, 33,
+ kPMTIPlaySound, 0, 33, // CROSLOCK
kPMTIRotate, 216, 100,
- kPMTIPlaySound, 32, 33,
+ kPMTIPlaySound, 32, 33, // TARGUP4
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS10Target9,
kPMTIPausedSet, kItemPS10Target9,
@@ -359,15 +435,22 @@ void SceneScriptPS10::SceneLoaded() {
Unobstacle_Object("E.SM.WIRE01", true);
if (!Query_System_Currently_Loading_Game()) {
- Item_Add_To_World(kItemPS10Target1, 443, kSetPS10_PS11_PS12_PS13, -240.0f, -80.74f, 145.0f, 989, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target2, 443, kSetPS10_PS11_PS12_PS13, -240.0f, -8.74f, 145.0f, 740, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target3, 445, kSetPS10_PS11_PS12_PS13, -165.0f, 111.53f, -10.0f, 993, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target4, 447, kSetPS10_PS11_PS12_PS13, -125.0f, 160.0f, -10.0f, 993, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target5, 441, kSetPS10_PS11_PS12_PS13, -246.71f, 205.51f, -20.0f, 0, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target6, 445, kSetPS10_PS11_PS12_PS13, -27.69f, -86.92f, 434.0f, 999, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target7, 441, kSetPS10_PS11_PS12_PS13, -347.15f, 7.68f, -20.0f, 264, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target8, 449, kSetPS10_PS11_PS12_PS13, -51.0f, 160.0f, -10.0f, 993, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS10Target9, 445, kSetPS10_PS11_PS12_PS13, 39.0f, 9.16f, -20.0f, 738, 72, 36, true, false, false, true);
+ bool targetStateMZ = true;
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+// every maze target begins as NON-targetable
+ targetStateMZ = false;
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ Item_Add_To_World(kItemPS10Target1, 443, kSetPS10_PS11_PS12_PS13, -240.0f, -80.74f, 145.0f, 989, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target2, 443, kSetPS10_PS11_PS12_PS13, -240.0f, -8.74f, 145.0f, 740, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target3, 445, kSetPS10_PS11_PS12_PS13, -165.0f, 111.53f, -10.0f, 993, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target4, 447, kSetPS10_PS11_PS12_PS13, -125.0f, 160.0f, -10.0f, 993, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target5, 441, kSetPS10_PS11_PS12_PS13, -246.71f, 205.51f, -20.0f, 0, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target6, 445, kSetPS10_PS11_PS12_PS13, -27.69f, -86.92f, 434.0f, 999, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target7, 441, kSetPS10_PS11_PS12_PS13, -347.15f, 7.68f, -20.0f, 264, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target8, 449, kSetPS10_PS11_PS12_PS13, -51.0f, 160.0f, -10.0f, 993, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS10Target9, 445, kSetPS10_PS11_PS12_PS13, 39.0f, 9.16f, -20.0f, 738, 72, 36, targetStateMZ, false, false, true);
+
}
Police_Maze_Target_Track_Add(kItemPS10Target1, -240.0f, -80.74f, 145.0f, -240.0f, -8.74f, 145.0f, 15, getPoliceMazePS10TrackData1(), false);
@@ -407,49 +490,48 @@ bool SceneScriptPS10::ClickedOnItem(int itemId, bool combatMode) {
if (Player_Query_Combat_Mode()) {
switch (itemId) {
case kItemPS10Target4:
- Sound_Play(4, 50, 0, 0, 50);
- break;
- case kItemPS10Target5:
- Sound_Play(555, 50, 0, 0, 50);
+ Sound_Play(4, 50, 0, 0, 50); // FEMHURT2
break;
+ case kItemPS10Target5: // fall-through
case kItemPS10Target7:
- Sound_Play(555, 50, 0, 0, 50);
+ Sound_Play(555, 50, 0, 0, 50); // MALEHURT
break;
default:
- Sound_Play(2, 12, 0, 0, 50);
+ Sound_Play(2, 12, 0, 0, 50); // SPINNY1
break;
}
+
+#if BLADERUNNER_ORIGINAL_BUGS
Item_Spin_In_World(itemId);
- if (itemId == kItemPS10Target1) {
- Item_Flag_As_Non_Target(kItemPS10Target1);
- Item_Flag_As_Non_Target(kItemPS10Target2);
- }
- if (itemId == kItemPS10Target2) {
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ switch (itemId) {
+ case kItemPS10Target1: // fall through // treated the same as kItemPS10Target2 (In the original code they are the same target in different tracks)
+ case kItemPS10Target2:
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ if (Item_Query_Visible(kItemPS10Target1)) { // without this check, target2 seems to get the spinning while the visible target1 stays put
+ Item_Spin_In_World(kItemPS10Target1);
+ } else {
+ Item_Spin_In_World(kItemPS10Target2);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
Item_Flag_As_Non_Target(kItemPS10Target1);
Item_Flag_As_Non_Target(kItemPS10Target2);
- }
- if (itemId == kItemPS10Target3) {
- Item_Flag_As_Non_Target(kItemPS10Target3);
- }
- if (itemId == kItemPS10Target4) {
- Item_Flag_As_Non_Target(kItemPS10Target4);
- }
- if (itemId == kItemPS10Target5) {
- Item_Flag_As_Non_Target(kItemPS10Target5);
- }
- if (itemId == kItemPS10Target6) {
- Item_Flag_As_Non_Target(kItemPS10Target6);
- }
- if (itemId == kItemPS10Target7) {
- Item_Flag_As_Non_Target(kItemPS10Target7);
- }
- if (itemId == kItemPS10Target8) {
- Item_Flag_As_Non_Target(kItemPS10Target8);
- }
- if (itemId == kItemPS10Target9) {
- Item_Flag_As_Non_Target(kItemPS10Target9);
- } else {
+ break;
+ case kItemPS10Target3: // fall through
+ case kItemPS10Target4: // fall through
+ case kItemPS10Target5: // fall through
+ case kItemPS10Target6: // fall through
+ case kItemPS10Target7: // fall through
+ case kItemPS10Target8: // fall through
+ case kItemPS10Target9: // fall through
+ default:
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ Item_Spin_In_World(itemId);
+#endif // BLADERUNNER_ORIGINAL_BUGS
Item_Flag_As_Non_Target(itemId);
+ break;
}
return true;
}
diff --git a/engines/bladerunner/script/scene/ps11.cpp b/engines/bladerunner/script/scene/ps11.cpp
index 5d70167a89..a8a9a39264 100644
--- a/engines/bladerunner/script/scene/ps11.cpp
+++ b/engines/bladerunner/script/scene/ps11.cpp
@@ -25,6 +25,10 @@
namespace BladeRunner {
static int kPoliceMazePS11TargetCount = 20;
+int SceneScriptPS11::getPoliceMazePS11TargetCount() {
+ return kPoliceMazePS11TargetCount;
+}
+
void SceneScriptPS11::InitializeScene() {
if (Game_Flag_Query(kFlagPS10toPS11)) {
@@ -40,10 +44,15 @@ void SceneScriptPS11::InitializeScene() {
Scene_Exit_Add_2D_Exit(1, 0, 0, 20, 479, 3);
}
-static const int *getPoliceMazePS11TrackData9() {
+static const int *getPoliceMazePS11TrackData9() { // Enemy (kItemPS11Target1)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target1, 0, // remove target-able here
+ kPMTIEnemyReset, kItemPS11Target1,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target1,
kPMTIFacing, 50,
kPMTIPosition, 0,
@@ -59,6 +68,10 @@ static const int *getPoliceMazePS11TrackData9() {
kPMTIMove, 0,
kPMTIWait, 500,
kPMTIObstacleReset, kItemPS11Target1,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target1, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target7, kItemPS11Target2,
kPMTIPausedSet, kItemPS11Target1,
kPMTIRestart
@@ -66,10 +79,15 @@ static const int *getPoliceMazePS11TrackData9() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData10() {
+static const int *getPoliceMazePS11TrackData10() { // Enemy (kItemPS11Target2, kItemPS11Target3)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target2, 0, // remove target-able here
+ kPMTITargetSet, kItemPS11Target3, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target2,
kPMTIObstacleReset, kItemPS11Target3,
kPMTITargetSet, kItemPS11Target2, 1,
@@ -78,12 +96,20 @@ static const int *getPoliceMazePS11TrackData10() {
kPMTIPosition, 0,
kPMTIWaitRandom, 3000, 6000,
kPMTIEnemyReset, kItemPS11Target2,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTIEnemyReset, kItemPS11Target3, // both targets should clear their enemy flag here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleSet, kItemPS11Target2,
kPMTIPlaySound, 33, 33,
kPMTIMove, 14,
kPMTIWait, 500,
kPMTIPausedReset, kItemPS11Target3,
kPMTIObstacleReset, kItemPS11Target2,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target2, 0, // remove target-able here - only for kItemPS11Target2 item
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleSet, kItemPS11Target3,
kPMTIPausedSet, kItemPS11Target2,
kPMTIPosition, 0,
@@ -92,15 +118,15 @@ static const int *getPoliceMazePS11TrackData10() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData11() {
+// TODO - into look possible bug
+static const int *getPoliceMazePS11TrackData11() { // Innocent (kItemPS11Target2, kItemPS11Target3)
static int trackData[] = {
kPMTIFacing, 860,
kPMTIPosition, 0,
- kPMTIEnemyReset, kItemPS11Target3,
- kPMTIObstacleSet, kItemPS11Target3,
+ kPMTIEnemyReset, kItemPS11Target3, // [redundant after bug fix] target 2-3 still is not revealed as enemy
kPMTIMove, 25,
kPMTIWait, 500,
- kPMTIEnemySet, kItemPS11Target3,
+ kPMTIEnemySet, kItemPS11Target3, // no need to set target 2 as enemy too, since it's gone
kPMTIPlaySound, 32, 33,
kPMTIRotate, 644, 80,
kPMTIWait, 0,
@@ -109,7 +135,11 @@ static const int *getPoliceMazePS11TrackData11() {
kPMTIShoot, 12, 33,
kPMTIMove, 79,
kPMTIObstacleReset, kItemPS11Target3,
- kPMTIPausedReset1of2, kItemPS11Target7, kItemPS10Target9,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target3, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ kPMTIPausedReset1of2, kItemPS11Target7, kItemPS11Target1,
kPMTIPausedSet, kItemPS11Target3,
kPMTIPosition, 0,
kPMTIFacing, 860,
@@ -118,10 +148,14 @@ static const int *getPoliceMazePS11TrackData11() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData12() {
+static const int *getPoliceMazePS11TrackData12() { // Innocent (kItemPS11Target4)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target4, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target4,
kPMTIFacing, 725,
kPMTIPosition, 0,
@@ -130,7 +164,9 @@ static const int *getPoliceMazePS11TrackData12() {
kPMTIEnemyReset, kItemPS11Target4,
kPMTIObstacleSet, kItemPS11Target4,
kPMTIMove, 82,
+#if BLADERUNNER_ORIGINAL_BUGS
kPMTILeave,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWait, 1000,
kPMTIRotate, 570, 80,
kPMTIWait, 0,
@@ -142,7 +178,12 @@ static const int *getPoliceMazePS11TrackData12() {
kPMTIRotate, 725, 80,
kPMTIMove, 99,
kPMTIObstacleReset, kItemPS11Target4,
- kPMTIPausedReset, 27,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTILeave, // Do the leave instruction here, before becoming un-target-able
+ kPMTITargetSet, kItemPS11Target4, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ kPMTIPausedReset, kItemPS11Target16,
kPMTIPausedSet, kItemPS11Target4,
kPMTIPosition, 0,
kPMTIRestart
@@ -150,10 +191,15 @@ static const int *getPoliceMazePS11TrackData12() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData13() {
+static const int *getPoliceMazePS11TrackData13() { // Enemy (kItemPS11Target5)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target5, 0, // remove target-able here
+ kPMTIEnemyReset, kItemPS11Target5,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target5,
kPMTIFacing, 340,
kPMTIPosition, 0,
@@ -184,6 +230,10 @@ static const int *getPoliceMazePS11TrackData13() {
kPMTIPlaySound, 34, 33,
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS11Target5,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target5, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target6, kItemPS11Target10,
kPMTIPausedSet, kItemPS11Target5,
kPMTIRestart
@@ -191,10 +241,14 @@ static const int *getPoliceMazePS11TrackData13() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData14() {
+static const int *getPoliceMazePS11TrackData14() { // Enemy (kItemPS11Target6)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target6, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target6,
kPMTITargetSet, kItemPS11Target6, 1,
kPMTIEnemyReset, kItemPS11Target6,
@@ -214,6 +268,10 @@ static const int *getPoliceMazePS11TrackData14() {
kPMTIPlaySound, 34, 33,
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS11Target6,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target6, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target10, kItemPS11Target5,
kPMTIPausedSet, kItemPS11Target6,
kPMTIRestart
@@ -221,10 +279,15 @@ static const int *getPoliceMazePS11TrackData14() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData15() {
+static const int *getPoliceMazePS11TrackData15() { // Innocent (kItemPS11Target7, kItemPS11Target8)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target7, 0, // remove target-able here
+ kPMTITargetSet, kItemPS11Target8, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target7,
kPMTIObstacleReset, kItemPS11Target8,
kPMTITargetSet, kItemPS11Target7, 1,
@@ -233,13 +296,24 @@ static const int *getPoliceMazePS11TrackData15() {
kPMTIPosition, 0,
kPMTIWaitRandom, 3000, 7000,
kPMTIObstacleSet, kItemPS11Target7,
- kPMTIPlaySound, 29, 33,
+ kPMTIPlaySound, 29, 33, // TARGUP1
kPMTIEnemyReset, kItemPS11Target7,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTIEnemyReset, kItemPS11Target8, // both targets should clear their enemy flag here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIMove, 14,
- kPMTILeave,
+
+#if BLADERUNNER_ORIGINAL_BUGS
+ kPMTILeave, // TODO MAZE A bug? intended? - Why do a LEAVE here is its track is continued with kItemPS11Target8? (would result to re-credit another point with the later leave instruction for kItemPS11Target8)
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWait, 1000,
kPMTIPausedReset, kItemPS11Target8,
kPMTIObstacleReset, kItemPS11Target7,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target7, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleSet, kItemPS11Target8,
kPMTIPausedSet, kItemPS11Target7,
kPMTIPosition, 0,
@@ -248,7 +322,7 @@ static const int *getPoliceMazePS11TrackData15() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData16() {
+static const int *getPoliceMazePS11TrackData16() { // Innocent (kItemPS11Target7, kItemPS11Target8)
static int trackData[] = {
kPMTIFacing, 860,
kPMTIPosition, 0,
@@ -264,6 +338,10 @@ static const int *getPoliceMazePS11TrackData16() {
kPMTIMove, 79,
kPMTILeave,
kPMTIObstacleReset, kItemPS11Target8,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target8, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target2, kItemPS11Target1,
kPMTIPausedSet, kItemPS11Target8,
kPMTIPosition, 0,
@@ -273,32 +351,53 @@ static const int *getPoliceMazePS11TrackData16() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData17() {
+static const int *getPoliceMazePS11TrackData17() { // Enemy (kItemPS11Target9)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target9, 0, // remove target-able here
+ kPMTIObstacleReset, kItemPS11Target9,
+ kPMTIEnemyReset, kItemPS11Target9,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIFacing, 310,
kPMTIPosition, 0,
+#if BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleSet, kItemPS11Target9,
kPMTITargetSet, kItemPS11Target9, 1,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIEnemySet, kItemPS11Target9,
kPMTIWaitRandom, 4000, 8000,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTIObstacleSet, kItemPS11Target9,
+ kPMTITargetSet, kItemPS11Target9, 1,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPlaySound, 32, 33,
kPMTIMove, 10,
kPMTIWait, 0,
kPMTIShoot, 27, 33,
kPMTIMove, 0,
- kPMTITargetSet, kItemPS11Target9, 1,
+#if BLADERUNNER_ORIGINAL_BUGS
+ kPMTITargetSet, kItemPS11Target9, 1, // TODO MAZE A bug? intended? Reseting the target-able status would result in multiple credits same target
kPMTIEnemySet, kItemPS11Target9,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIMove, 24,
- kPMTITargetSet, kItemPS11Target9, 1,
+#if BLADERUNNER_ORIGINAL_BUGS
+ kPMTITargetSet, kItemPS11Target9, 1, // TODO MAZE A bug? intended? Reseting the target-able status would result in multiple credits same target
kPMTIEnemySet, kItemPS11Target9,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIMove, 10,
kPMTIWait, 0,
kPMTIShoot, 27, 33,
kPMTIMove, 24,
kPMTIWait, 1000,
kPMTIObstacleReset, kItemPS11Target9,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target9, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target15, kItemPS11Target14,
kPMTIPausedSet, kItemPS11Target9,
kPMTIPosition, 0,
@@ -307,10 +406,15 @@ static const int *getPoliceMazePS11TrackData17() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData18() {
+static const int *getPoliceMazePS11TrackData18() { // Enemy (kItemPS11Target10, kItemPS11Target11)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target10, 0, // remove target-able here
+ kPMTITargetSet, kItemPS11Target11, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target10,
kPMTIObstacleReset, kItemPS11Target11,
kPMTIFacing, 900,
@@ -318,21 +422,37 @@ static const int *getPoliceMazePS11TrackData18() {
kPMTITargetSet, kItemPS11Target10, 1,
kPMTITargetSet, kItemPS11Target11, 1,
kPMTIEnemyReset, kItemPS11Target10,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTIEnemyReset, kItemPS11Target11, // both targets should clear their enemy flag here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWaitRandom, 4000, 6000,
kPMTIObstacleSet, kItemPS11Target10,
kPMTIMove, 5,
- kPMTIPlaySound, kItemPS11Target11, 33,
- kPMTIPlaySound, 3, 33,
+ kPMTIPlaySound, 19, 33, // RICO3
+#if BLADERUNNER_ORIGINAL_BUGS
+ kPMTIPlaySound, 3, 33, // FEMHURT1
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWait, 1000,
- kPMTILeave,
+#if BLADERUNNER_ORIGINAL_BUGS
+ kPMTILeave, // TODO MAZE A bug? intended? this target track is not for an innocent target, why credit a point here while the target is not revealed?
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIRotate, 700, 80,
kPMTIEnemySet, kItemPS11Target10,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTIEnemySet, kItemPS11Target11, // both targets should set their enemy flag here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWait, 0,
kPMTIRotate, 512, 200,
kPMTIWait, 1000,
kPMTIShoot, 12, 33,
kPMTIPausedReset, kItemPS11Target11,
kPMTIObstacleReset, kItemPS11Target10,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target10, 0, // remove target-able here only for kItemPS11Target10
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleSet, kItemPS11Target11,
kPMTIPausedSet, kItemPS11Target10,
kPMTIPosition, 0,
@@ -341,15 +461,17 @@ static const int *getPoliceMazePS11TrackData18() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData19() {
+static const int *getPoliceMazePS11TrackData19() { // Enemy (kItemPS11Target10, kItemPS11Target11)
static int trackData[] = {
kPMTIFacing, 512,
kPMTIPosition, 0,
kPMTIEnemySet, kItemPS11Target11,
kPMTIMove, 8,
kPMTIWait, 4000,
- kPMTITargetSet, kItemPS11Target11, 1,
+#if BLADERUNNER_ORIGINAL_BUGS
+ kPMTITargetSet, kItemPS11Target11, 1, // TODO MAZE A bug? intended?
kPMTIEnemySet, kItemPS11Target11,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIMove, 2,
kPMTIPlaySound, 32, 33,
kPMTIWait, 1000,
@@ -357,6 +479,10 @@ static const int *getPoliceMazePS11TrackData19() {
kPMTIMove, kItemPS11Target11,
kPMTIWait, 500,
kPMTIObstacleReset, kItemPS11Target11,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target11, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target5, kItemPS11Target6,
kPMTIPausedSet, kItemPS11Target11,
kPMTIPosition, 0,
@@ -365,10 +491,14 @@ static const int *getPoliceMazePS11TrackData19() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData20() {
+static const int *getPoliceMazePS11TrackData20() { // Enemy (kItemPS11Target12)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target12, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target12,
kPMTIFacing, 280,
kPMTIPosition, 0,
@@ -382,6 +512,10 @@ static const int *getPoliceMazePS11TrackData20() {
kPMTIShoot, 27, 33,
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS11Target12,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target12, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target13, kItemPS11Target4,
kPMTIPausedSet, kItemPS11Target12,
kPMTIPosition, 0,
@@ -390,10 +524,14 @@ static const int *getPoliceMazePS11TrackData20() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData21() {
+static const int *getPoliceMazePS11TrackData21() { // Innocent (kItemPS11Target13)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target13, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target13,
kPMTIFacing, 280,
kPMTIPosition, 0,
@@ -402,10 +540,17 @@ static const int *getPoliceMazePS11TrackData21() {
kPMTIEnemyReset, kItemPS11Target13,
kPMTIObstacleSet, kItemPS11Target13,
kPMTIMove, 5,
+#if BLADERUNNER_ORIGINAL_BUGS
kPMTILeave,
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIWait, 1000,
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS11Target13,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTILeave, // Do the leave instruction here instead
+ kPMTITargetSet, kItemPS11Target13, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target12, kItemPS11Target4,
kPMTIPausedSet, kItemPS11Target13,
kPMTIPosition, 0,
@@ -414,10 +559,14 @@ static const int *getPoliceMazePS11TrackData21() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData22() {
+static const int *getPoliceMazePS11TrackData22() { // Enemy (kItemPS11Target14)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target14, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target14,
kPMTIFacing, 255,
kPMTIPosition, 0,
@@ -431,6 +580,10 @@ static const int *getPoliceMazePS11TrackData22() {
kPMTIShoot, 12, 33,
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS11Target14,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target14, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, 23, kItemPS11Target9,
kPMTIPausedSet, kItemPS11Target14,
kPMTIPosition, 0,
@@ -439,10 +592,14 @@ static const int *getPoliceMazePS11TrackData22() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData23() {
+static const int *getPoliceMazePS11TrackData23() { // Innocent (kItemPS11Target15)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target15, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target15,
kPMTIFacing, 310,
kPMTIPosition, 0,
@@ -456,6 +613,10 @@ static const int *getPoliceMazePS11TrackData23() {
kPMTIMove, 0,
kPMTILeave,
kPMTIObstacleReset, kItemPS11Target15,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target15, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target14, kItemPS11Target9,
kPMTIPausedSet, kItemPS11Target15,
kPMTIPosition, 0,
@@ -464,10 +625,14 @@ static const int *getPoliceMazePS11TrackData23() {
return trackData;
}
-static const int *getPoliceMazePS11TrackData27() {
+static const int *getPoliceMazePS11TrackData27() { // Enemy (kItemPS11Target16)
static int trackData[] = {
kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target16, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIObstacleReset, kItemPS11Target16,
kPMTIFacing, 346,
kPMTIPosition, 0,
@@ -480,6 +645,10 @@ static const int *getPoliceMazePS11TrackData27() {
kPMTIShoot, 12, 33,
kPMTIMove, 0,
kPMTIObstacleReset, kItemPS11Target16,
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ kPMTITargetSet, kItemPS11Target16, 0, // remove target-able here
+#endif // BLADERUNNER_ORIGINAL_BUGS
kPMTIPausedReset1of2, kItemPS11Target13, kItemPS11Target12,
kPMTIPausedSet, kItemPS11Target16,
kPMTIPosition, 0,
@@ -509,22 +678,28 @@ void SceneScriptPS11::SceneLoaded() {
Unclickable_Object("PARKMETR16");
if (!Query_System_Currently_Loading_Game()) {
- Item_Add_To_World(kItemPS11Target1, 449, kSetPS10_PS11_PS12_PS13, -450.0f, -7.5f, 335.0f, 50, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target2, 449, kSetPS10_PS11_PS12_PS13, -740.0f, 27.0f, -30.0f, 860, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target3, 449, kSetPS10_PS11_PS12_PS13, -740.0f, 99.0f, -30.0f, 860, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target4, 441, kSetPS10_PS11_PS12_PS13, -400.0f, -9.23f, -75.0f, 725, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target5, 443, kSetPS10_PS11_PS12_PS13, -803.72f, -72.7f, 60.22f, 340, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target6, 443, kSetPS10_PS11_PS12_PS13, -853.0f, -70.0f, 195.0f, 900, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target7, 447, kSetPS10_PS11_PS12_PS13, -740.0f, 27.0f, -30.0f, 860, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target8, 447, kSetPS10_PS11_PS12_PS13, -740.0f, 99.0f, -30.0f, 860, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target9, 445, kSetPS10_PS11_PS12_PS13, -888.0f, 155.0f, 100.0f, 310, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target10, 443, kSetPS10_PS11_PS12_PS13, -430.0f, 164.0f, 11.0f, 900, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target11, 443, kSetPS10_PS11_PS12_PS13, -430.0f, -0.86f, 11.0f, 512, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target12, 443, kSetPS10_PS11_PS12_PS13, -891.0f, 3.1f, 90.0f, 280, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target13, 447, kSetPS10_PS11_PS12_PS13, -891.0f, 3.1f, 90.0f, 280, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target14, 445, kSetPS10_PS11_PS12_PS13, -891.0f, 171.0f, 190.0f, 255, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target15, 441, kSetPS10_PS11_PS12_PS13, -888.0f, 155.0f, 30.0f, 310, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS11Target16, 445, kSetPS10_PS11_PS12_PS13, -800.0f, -9.23f, -75.0f, 346, 72, 36, true, false, false, true);
+ bool targetStateMZ = true;
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+// every maze target begins as NON-targetable
+ targetStateMZ = false;
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ Item_Add_To_World(kItemPS11Target1, 449, kSetPS10_PS11_PS12_PS13, -450.0f, -7.5f, 335.0f, 50, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target2, 449, kSetPS10_PS11_PS12_PS13, -740.0f, 27.0f, -30.0f, 860, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target3, 449, kSetPS10_PS11_PS12_PS13, -740.0f, 99.0f, -30.0f, 860, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target4, 441, kSetPS10_PS11_PS12_PS13, -400.0f, -9.23f, -75.0f, 725, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target5, 443, kSetPS10_PS11_PS12_PS13, -803.72f, -72.7f, 60.22f, 340, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target6, 443, kSetPS10_PS11_PS12_PS13, -853.0f, -70.0f, 195.0f, 900, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target7, 447, kSetPS10_PS11_PS12_PS13, -740.0f, 27.0f, -30.0f, 860, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target8, 447, kSetPS10_PS11_PS12_PS13, -740.0f, 99.0f, -30.0f, 860, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target9, 445, kSetPS10_PS11_PS12_PS13, -888.0f, 155.0f, 100.0f, 310, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target10, 443, kSetPS10_PS11_PS12_PS13, -430.0f, 164.0f, 11.0f, 900, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target11, 443, kSetPS10_PS11_PS12_PS13, -430.0f, -0.86f, 11.0f, 512, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target12, 443, kSetPS10_PS11_PS12_PS13, -891.0f, 3.1f, 90.0f, 280, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target13, 447, kSetPS10_PS11_PS12_PS13, -891.0f, 3.1f, 90.0f, 280, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target14, 445, kSetPS10_PS11_PS12_PS13, -891.0f, 171.0f, 190.0f, 255, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target15, 441, kSetPS10_PS11_PS12_PS13, -888.0f, 155.0f, 30.0f, 310, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS11Target16, 445, kSetPS10_PS11_PS12_PS13, -800.0f, -9.23f, -75.0f, 346, 72, 36, targetStateMZ, false, false, true);
}
Police_Maze_Target_Track_Add(kItemPS11Target1, -450.0f, -7.5f, 335.0f, -450.0f, -7.5f, 295.0f, 8, getPoliceMazePS11TrackData9(), true);
@@ -577,79 +752,80 @@ bool SceneScriptPS11::ClickedOnActor(int actorId) {
bool SceneScriptPS11::ClickedOnItem(int itemId, bool combatMode) {
if (Player_Query_Combat_Mode()) {
switch (itemId) {
- case kItemPS11Target4:
- Sound_Play(555, 50, 0, 0, 50);
- break;
- case kItemPS11Target7:
- Sound_Play(4, 50, 0, 0, 50);
- break;
- case kItemPS11Target8:
- Sound_Play(4, 50, 0, 0, 50);
+ case kItemPS11Target4: // fall-through
+ case kItemPS11Target15:
+ Sound_Play(555, 50, 0, 0, 50); // MALEHURT
break;
+ case kItemPS11Target7: // fall-through
+ case kItemPS11Target8: // fall-through
case kItemPS11Target13:
- Sound_Play(4, 50, 0, 0, 50);
- break;
- case kItemPS11Target15:
- Sound_Play(555, 50, 0, 0, 50);
+ Sound_Play(4, 50, 0, 0, 50); // FEMHURT2
break;
default:
- Sound_Play(2, 12, 0, 0, 50);
+ Sound_Play(2, 12, 0, 0, 50); // SPINNY1
break;
}
+
+#if BLADERUNNER_ORIGINAL_BUGS
Item_Spin_In_World(itemId);
- if (itemId == kItemPS11Target1) {
- Item_Flag_As_Non_Target(kItemPS11Target1);
- }
- if (itemId == kItemPS11Target2) {
- Item_Flag_As_Non_Target(kItemPS11Target2);
- Item_Flag_As_Non_Target(kItemPS11Target3);
- }
- if (itemId == kItemPS11Target3) {
+#endif
+ switch (itemId) {
+ case kItemPS11Target2: // fall through
+ case kItemPS11Target3:
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ if (Item_Query_Visible(kItemPS11Target2)) { // without this check, target2 seems to get the spinning while the visible target1 stays put
+ Item_Spin_In_World(kItemPS11Target2);
+ } else {
+ Item_Spin_In_World(kItemPS11Target3);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
Item_Flag_As_Non_Target(kItemPS11Target2);
Item_Flag_As_Non_Target(kItemPS11Target3);
- }
- if (itemId == kItemPS11Target4) {
- Item_Flag_As_Non_Target(kItemPS11Target4);
- }
- if (itemId == kItemPS11Target5) {
- Item_Flag_As_Non_Target(kItemPS11Target5);
- }
- if (itemId == kItemPS11Target6) {
- Item_Flag_As_Non_Target(kItemPS11Target6);
- }
- if (itemId == kItemPS11Target7) {
- Item_Flag_As_Non_Target(kItemPS11Target7);
- Item_Flag_As_Non_Target(kItemPS11Target8);
- }
- if (itemId == kItemPS11Target8) {
+ break;
+ case kItemPS11Target7: // fall through
+ case kItemPS11Target8:
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ if (Item_Query_Visible(kItemPS11Target7)) { // without this check, target2 seems to get the spinning while the visible target1 stays put
+ Item_Spin_In_World(kItemPS11Target7);
+ } else {
+ Item_Spin_In_World(kItemPS11Target8);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
Item_Flag_As_Non_Target(kItemPS11Target7);
Item_Flag_As_Non_Target(kItemPS11Target8);
- }
- if (itemId == kItemPS11Target9) {
- Item_Flag_As_Non_Target(kItemPS11Target9);
- }
- if (itemId == kItemPS11Target10) {
- Item_Flag_As_Non_Target(kItemPS11Target10);
- Item_Flag_As_Non_Target(kItemPS11Target11);
- }
- if (itemId == kItemPS11Target11) {
+ break;
+ case kItemPS11Target10: // fall through
+ case kItemPS11Target11:
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ if (Item_Query_Visible(kItemPS11Target10)) { // without this check, target2 seems to get the spinning while the visible target1 stays put
+ Item_Spin_In_World(kItemPS11Target10);
+ } else {
+ Item_Spin_In_World(kItemPS11Target11);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
Item_Flag_As_Non_Target(kItemPS11Target10);
Item_Flag_As_Non_Target(kItemPS11Target11);
- }
- if (itemId == kItemPS11Target12) {
- Item_Flag_As_Non_Target(kItemPS11Target12);
- }
- if (itemId == kItemPS11Target13) {
- Item_Flag_As_Non_Target(kItemPS11Target13);
- }
- if (itemId == kItemPS11Target14) {
- Item_Flag_As_Non_Target(kItemPS11Target14);
- }
- if (itemId == kItemPS11Target15) {
- Item_Flag_As_Non_Target(kItemPS11Target15);
- }
- if (itemId == kItemPS11Target16) {
- Item_Flag_As_Non_Target(kItemPS11Target16);
+ break;
+ case kItemPS11Target1: // fall through
+ case kItemPS11Target4: // fall through
+ case kItemPS11Target5: // fall through
+ case kItemPS11Target6: // fall through
+ case kItemPS11Target9: // fall through
+ case kItemPS11Target12: // fall through
+ case kItemPS11Target13: // fall through
+ case kItemPS11Target14: // fall through
+ case kItemPS11Target15: // fall through
+ case kItemPS11Target16: // fall through
+ default:
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ Item_Spin_In_World(itemId);
+#endif
+ Item_Flag_As_Non_Target(itemId);
+ break;
}
return true;
}
diff --git a/engines/bladerunner/script/scene/ps12.cpp b/engines/bladerunner/script/scene/ps12.cpp
index a576de23c1..bb912751df 100644
--- a/engines/bladerunner/script/scene/ps12.cpp
+++ b/engines/bladerunner/script/scene/ps12.cpp
@@ -25,6 +25,10 @@
namespace BladeRunner {
static int kPoliceMazePS12TargetCount = 20;
+int SceneScriptPS12::getPoliceMazePS12TargetCount() {
+ return kPoliceMazePS12TargetCount;
+}
+
void SceneScriptPS12::InitializeScene() {
Police_Maze_Set_Pause_State(true);
@@ -555,23 +559,29 @@ void SceneScriptPS12::SceneLoaded() {
Unclickable_Object("PARKMETR16");
if (!Query_System_Currently_Loading_Game()) {
- Item_Add_To_World(kItemPS12Target1, 449, kSetPS10_PS11_PS12_PS13, -691.8f, -9.06f, 587.67f, 200, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target2, 445, kSetPS10_PS11_PS12_PS13, -679.6f, -45.4f, 721.05f, 67, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target3, 447, kSetPS10_PS11_PS12_PS13, -414.04f, -8.98f, 711.91f, 480, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target4, 443, kSetPS10_PS11_PS12_PS13, -440.0f, -8.97f, 1137.0f, 1010, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target5, 441, kSetPS10_PS11_PS12_PS13, -764.92f, -0.84f, 950.22f, 540, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target6, 449, kSetPS10_PS11_PS12_PS13, -696.0f, -5.7f, 1185.0f, 469, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target7, 449, kSetPS10_PS11_PS12_PS13, -635.0f, -5.7f, 1165.0f, 198, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target8, 449, kSetPS10_PS11_PS12_PS13, -620.0f, -8.63f, 1366.0f, 469, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target9, 447, kSetPS10_PS11_PS12_PS13, -584.0f, -79.4f, 775.0f, 1010, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target10, 445, kSetPS10_PS11_PS12_PS13, -578.0f, -79.4f, 810.0f, 990, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target11, 443, kSetPS10_PS11_PS12_PS13, -400.0f, -12.0f, 1110.0f, 513, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target12, 449, kSetPS10_PS11_PS12_PS13, -414.04f, -8.98f, 711.91f, 480, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target13, 447, kSetPS10_PS11_PS12_PS13, -400.0f, -12.0f, 1110.0f, 513, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target14, 449, kSetPS10_PS11_PS12_PS13, -731.0f, 93.66f, 788.0f, 109, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target15, 441, kSetPS10_PS11_PS12_PS13, -580.0f, -80.0f, 925.0f, 540, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target16, 441, kSetPS10_PS11_PS12_PS13, -731.0f, 93.66f, 788.0f, 109, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS12Target17, 443, kSetPS10_PS11_PS12_PS13, -580.0f, -80.0f, 925.0f, 540, 72, 36, true, false, false, true);
+ bool targetStateMZ = true;
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+// every maze target begins as NON-targetable
+ targetStateMZ = false;
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ Item_Add_To_World(kItemPS12Target1, 449, kSetPS10_PS11_PS12_PS13, -691.8f, -9.06f, 587.67f, 200, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target2, 445, kSetPS10_PS11_PS12_PS13, -679.6f, -45.4f, 721.05f, 67, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target3, 447, kSetPS10_PS11_PS12_PS13, -414.04f, -8.98f, 711.91f, 480, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target4, 443, kSetPS10_PS11_PS12_PS13, -440.0f, -8.97f, 1137.0f, 1010, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target5, 441, kSetPS10_PS11_PS12_PS13, -764.92f, -0.84f, 950.22f, 540, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target6, 449, kSetPS10_PS11_PS12_PS13, -696.0f, -5.7f, 1185.0f, 469, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target7, 449, kSetPS10_PS11_PS12_PS13, -635.0f, -5.7f, 1165.0f, 198, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target8, 449, kSetPS10_PS11_PS12_PS13, -620.0f, -8.63f, 1366.0f, 469, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target9, 447, kSetPS10_PS11_PS12_PS13, -584.0f, -79.4f, 775.0f, 1010, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target10, 445, kSetPS10_PS11_PS12_PS13, -578.0f, -79.4f, 810.0f, 990, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target11, 443, kSetPS10_PS11_PS12_PS13, -400.0f, -12.0f, 1110.0f, 513, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target12, 449, kSetPS10_PS11_PS12_PS13, -414.04f, -8.98f, 711.91f, 480, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target13, 447, kSetPS10_PS11_PS12_PS13, -400.0f, -12.0f, 1110.0f, 513, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target14, 449, kSetPS10_PS11_PS12_PS13, -731.0f, 93.66f, 788.0f, 109, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target15, 441, kSetPS10_PS11_PS12_PS13, -580.0f, -80.0f, 925.0f, 540, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target16, 441, kSetPS10_PS11_PS12_PS13, -731.0f, 93.66f, 788.0f, 109, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS12Target17, 443, kSetPS10_PS11_PS12_PS13, -580.0f, -80.0f, 925.0f, 540, 72, 36, targetStateMZ, false, false, true);
}
Police_Maze_Target_Track_Add(kItemPS12Target1, -691.8f, -9.06f, 587.67f, -649.11f, -9.06f, 587.71f, 6, getPoliceMazePS12TrackData29(), true);
Police_Maze_Target_Track_Add(kItemPS12Target2, -679.6f, -45.4f, 721.05f, -679.6f, -1.4f, 721.05f, 6, getPoliceMazePS12TrackData30(), true);
@@ -624,86 +634,46 @@ bool SceneScriptPS12::ClickedOnActor(int actorId) {
bool SceneScriptPS12::ClickedOnItem(int itemId, bool a2) {
if (Player_Query_Combat_Mode()) {
switch (itemId) {
- case kItemPS12Target3:
- Sound_Play(4, 50, 0, 0, 50);
- break;
- case kItemPS12Target5:
- Sound_Play(555, 50, 0, 0, 50);
- break;
- case kItemPS12Target9:
- Sound_Play(4, 50, 0, 0, 50);
+ case kItemPS12Target3: // fall through
+ case kItemPS12Target9: // fall through
+ case kItemPS12Target13: // fall through
+ Sound_Play(4, 50, 0, 0, 50); // FEMHURT2
break;
- case kItemPS12Target13:
- Sound_Play(4, 50, 0, 0, 50);
- break;
- case kItemPS12Target15:
- Sound_Play(555, 50, 0, 0, 50);
- break;
- case kItemPS12Target16:
- Sound_Play(555, 50, 0, 0, 50);
+ case kItemPS12Target5: // fall through
+ case kItemPS12Target15: // fall through
+ case kItemPS12Target16: // fall through
+ Sound_Play(555, 50, 0, 0, 50); // MALEHURT
break;
default:
- Sound_Play(2, 12, 0, 0, 50);
+ Sound_Play(2, 12, 0, 0, 50); // SPINNY1
break;
}
Item_Spin_In_World(itemId);
- Item_Flag_As_Non_Target(itemId);
- if (itemId == kItemPS12Target1) {
- Item_Flag_As_Non_Target(kItemPS12Target1);
- }
- if (itemId == kItemPS12Target2) {
- Item_Flag_As_Non_Target(kItemPS12Target2);
- }
- if (itemId == kItemPS12Target3) {
- Item_Flag_As_Non_Target(kItemPS12Target3);
- }
- if (itemId == kItemPS12Target4) {
- Item_Flag_As_Non_Target(kItemPS12Target4);
- }
- if (itemId == kItemPS12Target5) {
- Item_Flag_As_Non_Target(kItemPS12Target5);
- }
- if (itemId == kItemPS12Target6) {
- Item_Flag_As_Non_Target(kItemPS12Target6);
- Item_Flag_As_Non_Target(kItemPS12Target7);
- Item_Flag_As_Non_Target(kItemPS12Target8);
- }
- if (itemId == kItemPS12Target7) {
- Item_Flag_As_Non_Target(kItemPS12Target6);
- Item_Flag_As_Non_Target(kItemPS12Target7);
- Item_Flag_As_Non_Target(kItemPS12Target8);
- }
- if (itemId == kItemPS12Target8) {
+ switch (itemId) {
+ case kItemPS12Target6: // fall-through
+ case kItemPS12Target7: // fall-through
+ case kItemPS12Target8:
Item_Flag_As_Non_Target(kItemPS12Target6);
Item_Flag_As_Non_Target(kItemPS12Target7);
Item_Flag_As_Non_Target(kItemPS12Target8);
- }
- if (itemId == kItemPS12Target9) {
- Item_Flag_As_Non_Target(kItemPS12Target9);
- }
- if (itemId == kItemPS12Target10) {
- Item_Flag_As_Non_Target(kItemPS12Target10);
- }
- if (itemId == kItemPS12Target11) {
- Item_Flag_As_Non_Target(kItemPS12Target11);
- }
- if (itemId == kItemPS12Target12) {
- Item_Flag_As_Non_Target(kItemPS12Target12);
- }
- if (itemId == kItemPS12Target13) {
- Item_Flag_As_Non_Target(kItemPS12Target13);
- }
- if (itemId == kItemPS12Target14) {
- Item_Flag_As_Non_Target(kItemPS12Target14);
- }
- if (itemId == kItemPS12Target15) {
- Item_Flag_As_Non_Target(kItemPS12Target15);
- }
- if (itemId == kItemPS12Target16) {
- Item_Flag_As_Non_Target(kItemPS12Target16);
- }
- if (itemId == kItemPS12Target17) {
- Item_Flag_As_Non_Target(kItemPS12Target17);
+ break;
+ case kItemPS12Target1: // fall-through
+ case kItemPS12Target2: // fall-through
+ case kItemPS12Target3: // fall-through
+ case kItemPS12Target4: // fall-through
+ case kItemPS12Target5: // fall-through
+ case kItemPS12Target9: // fall-through
+ case kItemPS12Target10: // fall-through
+ case kItemPS12Target11: // fall-through
+ case kItemPS12Target12: // fall-through
+ case kItemPS12Target13: // fall-through
+ case kItemPS12Target14: // fall-through
+ case kItemPS12Target15: // fall-through
+ case kItemPS12Target16: // fall-through
+ case kItemPS12Target17: // fall-through
+ default:
+ Item_Flag_As_Non_Target(itemId);
+ break;
}
return true;
}
diff --git a/engines/bladerunner/script/scene/ps13.cpp b/engines/bladerunner/script/scene/ps13.cpp
index 26cf31b3ba..7454d42a87 100644
--- a/engines/bladerunner/script/scene/ps13.cpp
+++ b/engines/bladerunner/script/scene/ps13.cpp
@@ -26,6 +26,10 @@ namespace BladeRunner {
static int kPoliceMazePS13TargetCount = 20;
+int SceneScriptPS13::getPoliceMazePS13TargetCount() {
+ return kPoliceMazePS13TargetCount;
+}
+
void SceneScriptPS13::InitializeScene() {
Police_Maze_Set_Pause_State(true);
if (Game_Flag_Query(kFlagPS12toPS13)) {
@@ -479,21 +483,27 @@ void SceneScriptPS13::SceneLoaded() {
Unclickable_Object("PARKMETR16");
if (!Query_System_Currently_Loading_Game()) {
- Item_Add_To_World(kItemPS13Target1, 443, kSetPS10_PS11_PS12_PS13, -372.0f, -9.0f, 1509.0f, 960, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target2, 443, kSetPS10_PS11_PS12_PS13, 291.61f, -0.66f, 1610.3f, 823, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target3, 447, kSetPS10_PS11_PS12_PS13, -25.0f, 102.0f, 1625.0f, 823, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target4, 449, kSetPS10_PS11_PS12_PS13, -45.51f, -8.8f, 1676.0f, 922, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target5, 447, kSetPS10_PS11_PS12_PS13, 291.61f, -0.66f, 1610.3f, 823, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target6, 443, kSetPS10_PS11_PS12_PS13, -24.0f, 102.0f, 1625.0f, 823, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target7, 449, kSetPS10_PS11_PS12_PS13, 180.0f, -72.7f, 1605.0f, 305, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target8, 443, kSetPS10_PS11_PS12_PS13, 127.79f, 14.56f, 1703.03f, 356, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target9, 443, kSetPS10_PS11_PS12_PS13, 136.37f, -6.84f, 1425.43f, 512, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target10, 441, kSetPS10_PS11_PS12_PS13, 77.83f, -79.8f, 1520.5f, 327, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target11, 441, kSetPS10_PS11_PS12_PS13, 77.83f, -7.8f, 1520.5f, 327, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target12, 443, kSetPS10_PS11_PS12_PS13, -88.0f, -8.8f, 1520.5f, 327, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target13, 447, kSetPS10_PS11_PS12_PS13, -45.51f, -8.8f, 1676.0f, 922, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target14, 445, kSetPS10_PS11_PS12_PS13, -300.0f, -79.75f, 1543.0f, 465, 72, 36, true, false, false, true);
- Item_Add_To_World(kItemPS13Target15, 449, kSetPS10_PS11_PS12_PS13, -325.0f, -7.75f, 1543.0f, 465, 72, 36, true, false, false, true);
+ bool targetStateMZ = true;
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+// every maze target begins as NON-targetable
+ targetStateMZ = false;
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ Item_Add_To_World(kItemPS13Target1, 443, kSetPS10_PS11_PS12_PS13, -372.0f, -9.0f, 1509.0f, 960, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target2, 443, kSetPS10_PS11_PS12_PS13, 291.61f, -0.66f, 1610.3f, 823, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target3, 447, kSetPS10_PS11_PS12_PS13, -25.0f, 102.0f, 1625.0f, 823, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target4, 449, kSetPS10_PS11_PS12_PS13, -45.51f, -8.8f, 1676.0f, 922, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target5, 447, kSetPS10_PS11_PS12_PS13, 291.61f, -0.66f, 1610.3f, 823, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target6, 443, kSetPS10_PS11_PS12_PS13, -24.0f, 102.0f, 1625.0f, 823, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target7, 449, kSetPS10_PS11_PS12_PS13, 180.0f, -72.7f, 1605.0f, 305, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target8, 443, kSetPS10_PS11_PS12_PS13, 127.79f, 14.56f, 1703.03f, 356, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target9, 443, kSetPS10_PS11_PS12_PS13, 136.37f, -6.84f, 1425.43f, 512, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target10, 441, kSetPS10_PS11_PS12_PS13, 77.83f, -79.8f, 1520.5f, 327, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target11, 441, kSetPS10_PS11_PS12_PS13, 77.83f, -7.8f, 1520.5f, 327, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target12, 443, kSetPS10_PS11_PS12_PS13, -88.0f, -8.8f, 1520.5f, 327, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target13, 447, kSetPS10_PS11_PS12_PS13, -45.51f, -8.8f, 1676.0f, 922, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target14, 445, kSetPS10_PS11_PS12_PS13, -300.0f, -79.75f, 1543.0f, 465, 72, 36, targetStateMZ, false, false, true);
+ Item_Add_To_World(kItemPS13Target15, 449, kSetPS10_PS11_PS12_PS13, -325.0f, -7.75f, 1543.0f, 465, 72, 36, targetStateMZ, false, false, true);
}
Police_Maze_Target_Track_Add(kItemPS13Target1, -372.0f, -9.0f, 1509.0f, -345.0f, -9.0f, 1509.0f, 6, getPoliceMazePS13TrackData46(), true);
@@ -528,74 +538,42 @@ bool SceneScriptPS13::ClickedOnActor(int actorId) {
bool SceneScriptPS13::ClickedOnItem(int itemId, bool a2) {
if (Player_Query_Combat_Mode()) {
switch (itemId) {
- case kItemPS13Target3:
- Sound_Play(4, 50, 0, 0, 50);
- break;
+ case kItemPS13Target3: // fall-through
case kItemPS13Target5:
- Sound_Play(4, 50, 0, 0, 50);
- break;
- case kItemPS13Target10:
- Sound_Play(555, 50, 0, 0, 50);
+ Sound_Play(4, 50, 0, 0, 50); // FEMHURT2
break;
+ case kItemPS13Target10: // fall-through
case kItemPS13Target11:
- Sound_Play(555, 50, 0, 0, 50);
+ Sound_Play(555, 50, 0, 0, 50); // MALEHURT
break;
default:
- Sound_Play(2, 12, 0, 0, 50);
+ Sound_Play(2, 12, 0, 0, 50); // SPINNY1
break;
}
Item_Spin_In_World(itemId);
- Item_Flag_As_Non_Target(itemId);
- if (itemId == kItemPS13Target1) {
- Item_Flag_As_Non_Target(kItemPS13Target1);
- }
- if (itemId == kItemPS13Target2) {
- Item_Flag_As_Non_Target(kItemPS13Target2);
- }
- if (itemId == kItemPS13Target3) {
- Item_Flag_As_Non_Target(kItemPS13Target3);
- }
- if (itemId == kItemPS13Target4) {
- Item_Flag_As_Non_Target(kItemPS13Target4);
- }
- if (itemId == kItemPS13Target5) {
- Item_Flag_As_Non_Target(kItemPS13Target5);
- }
- if (itemId == kItemPS13Target6) {
- Item_Flag_As_Non_Target(kItemPS13Target6);
- }
- if (itemId == kItemPS13Target7) {
- Item_Flag_As_Non_Target(kItemPS13Target7);
- }
- if (itemId == kItemPS13Target8) {
- Item_Flag_As_Non_Target(kItemPS13Target8);
- }
- if (itemId == kItemPS13Target9) {
- Item_Flag_As_Non_Target(kItemPS13Target9);
- }
- if (itemId == kItemPS13Target10) {
- Item_Flag_As_Non_Target(kItemPS13Target10);
- Item_Flag_As_Non_Target(kItemPS13Target11);
- Item_Flag_As_Non_Target(kItemPS13Target12);
- }
- if (itemId == kItemPS13Target11) {
- Item_Flag_As_Non_Target(kItemPS13Target10);
- Item_Flag_As_Non_Target(kItemPS13Target11);
- Item_Flag_As_Non_Target(kItemPS13Target12);
- }
- if (itemId == kItemPS13Target12) {
+ switch (itemId) {
+ case kItemPS13Target10: // fall-through
+ case kItemPS13Target11: // fall-through
+ case kItemPS13Target12:
Item_Flag_As_Non_Target(kItemPS13Target10);
Item_Flag_As_Non_Target(kItemPS13Target11);
Item_Flag_As_Non_Target(kItemPS13Target12);
- }
- if (itemId == kItemPS13Target13) {
- Item_Flag_As_Non_Target(kItemPS13Target13);
- }
- if (itemId == kItemPS13Target14) {
- Item_Flag_As_Non_Target(kItemPS13Target14);
- }
- if (itemId == kItemPS13Target15) {
- Item_Flag_As_Non_Target(kItemPS13Target15);
+ break;
+ case kItemPS13Target1: // fall-through
+ case kItemPS13Target2: // fall-through
+ case kItemPS13Target3: // fall-through
+ case kItemPS13Target4: // fall-through
+ case kItemPS13Target5: // fall-through
+ case kItemPS13Target6: // fall-through
+ case kItemPS13Target7: // fall-through
+ case kItemPS13Target8: // fall-through
+ case kItemPS13Target9: // fall-through
+ case kItemPS13Target13: // fall-through
+ case kItemPS13Target14: // fall-through
+ case kItemPS13Target15: // fall-through
+ default:
+ Item_Flag_As_Non_Target(itemId);
+ break;
}
return true;
}
@@ -621,6 +599,8 @@ bool SceneScriptPS13::ClickedOnExit(int exitId) {
removeTargets();
Global_Variable_Decrement(kVariablePoliceMazeScore, kPoliceMazePS13TargetCount - Global_Variable_Query(kVariablePoliceMazePS13TargetCounter));
Set_Score(kActorMcCoy, Global_Variable_Query(kVariablePoliceMazeScore));
+// Common::String scoreString = Common::String::format("Final: %03d", Global_Variable_Query(kVariablePoliceMazeScore));
+// Set_Subtitle_Text_On_Screen(scoreString);
Global_Variable_Reset(kVariablePoliceMazePS10TargetCounter);
Global_Variable_Reset(kVariablePoliceMazePS11TargetCounter);
Global_Variable_Reset(kVariablePoliceMazePS12TargetCounter);