diff options
author | Thanasis Antoniou | 2019-03-18 17:04:03 +0200 |
---|---|---|
committer | Thanasis Antoniou | 2019-03-18 17:07:10 +0200 |
commit | 717705f7c947285773b12d055b4014a79453551c (patch) | |
tree | 6800a88cd82f6a8a401dd760e883f35fedca9691 /engines/bladerunner/script/scene/ps11.cpp | |
parent | f73584f0e5b43f24db4b66cdd07acc7f5c9f617b (diff) | |
download | scummvm-rg350-717705f7c947285773b12d055b4014a79453551c.tar.gz scummvm-rg350-717705f7c947285773b12d055b4014a79453551c.tar.bz2 scummvm-rg350-717705f7c947285773b12d055b4014a79453551c.zip |
BLADERUNNER: Fixes and cleanup for Police Maze A
Only fixes for rooms PS10, PS11. A few cases may need revising.
There are a few cases that a target may reset after being shot and they seem buggy but they could also be intended. So, that's for a second pass to decide.
Diffstat (limited to 'engines/bladerunner/script/scene/ps11.cpp')
-rw-r--r-- | engines/bladerunner/script/scene/ps11.cpp | 386 |
1 files changed, 281 insertions, 105 deletions
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; } |