diff options
Diffstat (limited to 'engines/bladerunner/script/scene')
-rw-r--r-- | engines/bladerunner/script/scene/ps10.cpp | 463 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps11.cpp | 226 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps12.cpp | 544 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps13.cpp | 134 |
4 files changed, 770 insertions, 597 deletions
diff --git a/engines/bladerunner/script/scene/ps10.cpp b/engines/bladerunner/script/scene/ps10.cpp index b8923ac3a3..e2d7f8f2bd 100644 --- a/engines/bladerunner/script/scene/ps10.cpp +++ b/engines/bladerunner/script/scene/ps10.cpp @@ -29,58 +29,58 @@ int SceneScriptPS10::getPoliceMazePS10TargetCount() { return kPoliceMazePS10TargetCount; } -static const int *getPoliceMazePS10TrackData1() { // Enemy (kItemPS10Target1, kItemPS10Target2) +static const int *getPoliceMazePS10TrackData1() { // Enemy (kItemPS10Target1, kItemPS10Target2) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + 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 + kPMTITargetSet, kItemPS10Target1, 0, // remove target-able here + kPMTITargetSet, kItemPS10Target2, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIObstacleReset, kItemPS10Target1, - kPMTIObstacleReset, kItemPS10Target2, - kPMTIFacing, 989, - kPMTIPosition, 0, - kPMTITargetSet, kItemPS10Target1, 1, - kPMTITargetSet, kItemPS10Target2, 1, - kPMTIEnemyReset, kItemPS10Target1, + kPMTIObstacleReset, kItemPS10Target1, + kPMTIObstacleReset, kItemPS10Target2, + kPMTIFacing, 989, + kPMTIPosition, 0, + kPMTITargetSet, kItemPS10Target1, 1, + kPMTITargetSet, kItemPS10Target2, 1, + kPMTIEnemyReset, kItemPS10Target1, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTIEnemyReset, kItemPS10Target2, // both targets should clear their enemy flag here + kPMTIEnemyReset, kItemPS10Target2, // both targets should clear their enemy flag here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIWaitRandom, 3000, 5000, - kPMTIObstacleSet, kItemPS10Target1, - kPMTIPlaySound, 159, 100, // UPTARG3 - kPMTIMove, 14, - kPMTIWait, 1000, - kPMTIRotate, 740, 80, - kPMTIEnemySet, kItemPS10Target1, // Target becomes enemy after rotating + kPMTIWaitRandom, 3000, 5000, + kPMTIObstacleSet, kItemPS10Target1, + kPMTIPlaySound, 159, 100, // UPTARG3 + kPMTIMove, 14, + kPMTIWait, 1000, + kPMTIRotate, 740, 80, + kPMTIEnemySet, kItemPS10Target1, // Target becomes enemy after rotating #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTIEnemySet, kItemPS10Target2, // both targets should set their enemy flag here + 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, // kItemPS10Target2 continues the route of this item - kPMTIObstacleReset, kItemPS10Target1, // kItemPS10Target1 becomes invisible + kPMTIWait, 0, + kPMTIRotate, 488, 80, + kPMTIWait, 1000, + kPMTIShoot, 27, 33, + kPMTIWait, 0, + kPMTIRotate, 740, 80, + 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 + 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, + kPMTIObstacleSet, kItemPS10Target2, // kItemPS10Target2 becomes visible in kItemPS10Target1's place + kPMTIPausedSet, kItemPS10Target1, + kPMTIPosition, 0, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS10TrackData2() { // Enemy (kItemPS10Target1, kItemPS10Target2) +static const int *getPoliceMazePS10TrackData2() { // Enemy (kItemPS10Target1, kItemPS10Target2) static int trackData[] = { kPMTIFacing, 740, kPMTIPosition, 0, @@ -90,8 +90,7 @@ static const int *getPoliceMazePS10TrackData2() { // Enemy (kItemPS10Target1, kI 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 + kPMTITargetSet, kItemPS10Target2, 0, // remove target-able here - only for Target1 item #endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset, kItemPS10Target5, kPMTIPausedSet, kItemPS10Target2, @@ -101,280 +100,282 @@ static const int *getPoliceMazePS10TrackData2() { // Enemy (kItemPS10Target1, kI return trackData; } -static const int *getPoliceMazePS10TrackData3() { // Enemy (kItemPS10Target3) +// NOTE Track 3 is used only once as is; it's activated when entering the room +static const int *getPoliceMazePS10TrackData3() { // Enemy (kItemPS10Target3) - Starts activated static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target3, 0, // remove target-able here + 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, // UPTARG3 - kPMTITargetSet, kItemPS10Target3, 1, - kPMTIEnemyReset, kItemPS10Target3, - kPMTIMove, 5, - kPMTIWait, 1000, - kPMTIEnemySet, kItemPS10Target3, - kPMTIRotate, 233, 80, - kPMTIWait, 0, - kPMTIRotate, 491, 80, - kPMTIWait, 500, - kPMTIShoot, 27, 33, - kPMTIWait, 500, - kPMTIRotate, 233, 80, - kPMTIWait, 0, - kPMTIRotate, 993, 80, - kPMTIPlaySound, 34, 33, // TARGUP6 - kPMTIMove, 0, - kPMTIObstacleReset, kItemPS10Target3, + kPMTIObstacleReset, kItemPS10Target3, + kPMTIFacing, 993, + kPMTIPosition, 0, + kPMTIWaitRandom, 3000, 5000, + kPMTIObstacleSet, kItemPS10Target3, + kPMTIPlaySound, 159, 100, // UPTARG3 + kPMTITargetSet, kItemPS10Target3, 1, + kPMTIEnemyReset, kItemPS10Target3, + kPMTIMove, 5, + kPMTIWait, 1000, + kPMTIEnemySet, kItemPS10Target3, + kPMTIRotate, 233, 80, + kPMTIWait, 0, + kPMTIRotate, 491, 80, + kPMTIWait, 500, + kPMTIShoot, 27, 33, + kPMTIWait, 500, + kPMTIRotate, 233, 80, + kPMTIWait, 0, + kPMTIRotate, 993, 80, + kPMTIPlaySound, 34, 33, // TARGUP6 + kPMTIMove, 0, + kPMTIObstacleReset, kItemPS10Target3, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target3, 0, // remove target-able here - kPMTIPausedSet, kItemPS10Target3, + kPMTITargetSet, kItemPS10Target3, 0, // remove target-able here + kPMTIPausedSet, kItemPS10Target3, #endif // BLADERUNNER_ORIGINAL_BUGS kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS10TrackData4() { // Innocent (kItemPS10Target4) +static const int *getPoliceMazePS10TrackData4() { // Innocent (kItemPS10Target4) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target4, 0, // remove target-able here + 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, // UPTARG3 - kPMTITargetSet, kItemPS10Target4, 1, - kPMTIEnemyReset, kItemPS10Target4, - kPMTIMove, 34, - kPMTIWait, 500, - kPMTIRotate, 491, 80, - kPMTIMove, 0, + kPMTIObstacleReset, kItemPS10Target4, + kPMTIFacing, 993, + kPMTIPosition, 0, + kPMTIWaitRandom, 3000, 6000, + kPMTIObstacleSet, kItemPS10Target4, + kPMTIPlaySound, 159, 100, // UPTARG3 + kPMTITargetSet, kItemPS10Target4, 1, + kPMTIEnemyReset, kItemPS10Target4, + kPMTIMove, 34, + kPMTIWait, 500, + kPMTIRotate, 491, 80, + kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPS10Target4, + kPMTIObstacleReset, kItemPS10Target4, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target4, 0, // remove target-able here + kPMTITargetSet, kItemPS10Target4, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIPausedReset, kItemPS10Target8, - kPMTIPausedSet, kItemPS10Target4, + kPMTIPausedReset, kItemPS10Target8, + kPMTIPausedSet, kItemPS10Target4, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS10TrackData5() { // Innocent (kItemPS10Target5) +static const int *getPoliceMazePS10TrackData5() { // Innocent (kItemPS10Target5) - Starts activated static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target5, 0, // remove target-able here + 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, // UPTARG3 - kPMTITargetSet, kItemPS10Target5, 1, - kPMTIEnemyReset, kItemPS10Target5, - kPMTIMove, 5, - kPMTIWait, 1000, - kPMTIRotate, 512, 100, - kPMTIWait, 2000, - kPMTIRotate, 0, -100, - kPMTIPlaySound, 34, 33, // TARGUP6 - kPMTIMove, 0, + kPMTIObstacleReset, kItemPS10Target5, + kPMTIFacing, 0, + kPMTIPosition, 0, + kPMTIWaitRandom, 4000, 6000, + kPMTIObstacleSet, kItemPS10Target5, + kPMTIPlaySound, 159, 100, // UPTARG3 + kPMTITargetSet, kItemPS10Target5, 1, + kPMTIEnemyReset, kItemPS10Target5, + kPMTIMove, 5, + kPMTIWait, 1000, + kPMTIRotate, 512, 100, + kPMTIWait, 2000, + kPMTIRotate, 0, -100, + kPMTIPlaySound, 34, 33, // TARGUP6 + kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPS10Target5, + kPMTIObstacleReset, kItemPS10Target5, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target5, 0, // remove target-able here + kPMTITargetSet, kItemPS10Target5, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIPausedReset, kItemPS10Target1, - kPMTIPausedSet, kItemPS10Target5, + kPMTIPausedReset, kItemPS10Target1, + kPMTIPausedSet, kItemPS10Target5, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS10TrackData6() { // Enemy (kItemPS10Target6) +// NOTE Track 6 is used only once as is; it's activated when entering the room +static const int *getPoliceMazePS10TrackData6() { // Enemy (kItemPS10Target6) - Starts activated static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target6, 0, // remove target-able here + 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, // UPTARG3 - kPMTITargetSet, kItemPS10Target6, 1, - kPMTIEnemyReset, kItemPS10Target6, - kPMTIMove, 7, - kPMTIWait, 500, - kPMTIEnemySet, kItemPS10Target6, - kPMTIRotate, 750, 80, - kPMTIWait, 0, - kPMTIRotate, 500, 80, - kPMTIWait, 1000, - kPMTIShoot, 27, 33, // SMCAL3 - kPMTIWait, 0, - kPMTIRotate, 750, 80, - kPMTIWait, 0, - kPMTIRotate, 999, 80, - kPMTIPlaySound, 34, 33, // TARGUP6 - kPMTIMove, 0, - kPMTIObstacleReset, kItemPS10Target6, + kPMTIObstacleReset, kItemPS10Target6, + kPMTIFacing, 999, + kPMTIPosition, 0, + kPMTIWaitRandom, 4000, 6000, + kPMTIObstacleSet, kItemPS10Target6, + kPMTIPlaySound, 159, 100, // UPTARG3 + kPMTITargetSet, kItemPS10Target6, 1, + kPMTIEnemyReset, kItemPS10Target6, + kPMTIMove, 7, + kPMTIWait, 500, + kPMTIEnemySet, kItemPS10Target6, + kPMTIRotate, 750, 80, + kPMTIWait, 0, + kPMTIRotate, 500, 80, + kPMTIWait, 1000, + kPMTIShoot, 27, 33, // SMCAL3 + kPMTIWait, 0, + kPMTIRotate, 750, 80, + kPMTIWait, 0, + kPMTIRotate, 999, 80, + kPMTIPlaySound, 34, 33, // TARGUP6 + kPMTIMove, 0, + kPMTIObstacleReset, kItemPS10Target6, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target6, 0, // remove target-able here + kPMTITargetSet, kItemPS10Target6, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIPausedReset, kItemPS10Target7, - kPMTIPausedReset, kItemPS10Target9, - kPMTIPausedSet, kItemPS10Target6, + kPMTIPausedReset, kItemPS10Target7, + kPMTIPausedReset, kItemPS10Target9, + kPMTIPausedSet, kItemPS10Target6, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS10TrackData7() { // Innocent (kItemPS10Target7) +static const int *getPoliceMazePS10TrackData7() { // Innocent (kItemPS10Target7) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target7, 0, // remove target-able here + kPMTITargetSet, kItemPS10Target7, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIObstacleReset, kItemPS10Target7, - kPMTIFacing, 264, - kPMTIPosition, 0, - kPMTIWaitRandom, 3000, 6000, - kPMTITargetSet, kItemPS10Target7, 1, - kPMTIEnemyReset, kItemPS10Target7, - kPMTIObstacleSet, kItemPS10Target7, - kPMTIMove, 89, - kPMTIWaitRandom, 4000, 8000, - kPMTIFacing, 776, - kPMTIMove, 0, + kPMTIObstacleReset, kItemPS10Target7, + kPMTIFacing, 264, + kPMTIPosition, 0, + kPMTIWaitRandom, 3000, 6000, + kPMTITargetSet, kItemPS10Target7, 1, + kPMTIEnemyReset, kItemPS10Target7, + kPMTIObstacleSet, kItemPS10Target7, + kPMTIMove, 89, + kPMTIWaitRandom, 4000, 8000, + kPMTIFacing, 776, + kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPS10Target7, + kPMTIObstacleReset, kItemPS10Target7, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target7, 0, // remove target-able here + kPMTITargetSet, kItemPS10Target7, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIPausedSet, kItemPS10Target7, + kPMTIPausedSet, kItemPS10Target7, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS10TrackData8() { // Enemy (kItemPS10Target8) +static const int *getPoliceMazePS10TrackData8() { // Enemy (kItemPS10Target8) - Starts activated static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target8, 0, // remove target-able here + 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, // UPTARG3 - kPMTITargetSet, kItemPS10Target8, 1, - kPMTIEnemyReset, kItemPS10Target8, - kPMTIMove, 34, - kPMTIWait, 500, - kPMTIEnemySet, kItemPS10Target8, - kPMTIRotate, 491, 80, - kPMTIMove, 20, - kPMTIWait, 0, - kPMTIShoot, 27, 33, - kPMTIMove, 0, - kPMTIObstacleReset, kItemPS10Target8, + kPMTIObstacleReset, kItemPS10Target8, + kPMTIFacing, 993, + kPMTIPosition, 0, + kPMTIWaitRandom, 4000, 6000, + kPMTIObstacleSet, kItemPS10Target8, + kPMTIPlaySound, 159, 100, // UPTARG3 + kPMTITargetSet, kItemPS10Target8, 1, + kPMTIEnemyReset, kItemPS10Target8, + kPMTIMove, 34, + kPMTIWait, 500, + kPMTIEnemySet, kItemPS10Target8, + kPMTIRotate, 491, 80, + kPMTIMove, 20, + kPMTIWait, 0, + kPMTIShoot, 27, 33, + kPMTIMove, 0, + kPMTIObstacleReset, kItemPS10Target8, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS10Target8, 0, // remove target-able here + kPMTITargetSet, kItemPS10Target8, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIPausedReset, kItemPS10Target4, - kPMTIPausedSet, kItemPS10Target8, + kPMTIPausedReset, kItemPS10Target4, + kPMTIPausedSet, kItemPS10Target8, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS10TrackData9() { // Enemy (kItemPS10Target9) +static const int *getPoliceMazePS10TrackData9() { // Enemy (kItemPS10Target9) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPS10Target9, - kPMTIFacing, 738, - kPMTIPosition, 0, - kPMTIWaitRandom, 2000, 5000, - kPMTITargetSet, kItemPS10Target9, 1, - kPMTIEnemySet, kItemPS10Target9, - kPMTIObstacleSet, kItemPS10Target9, - kPMTIPlaySound, 0, 33, // CROSLOCK - kPMTIMove, 23, - kPMTIPlaySound, 0, 33, // CROSLOCK - kPMTIWait, 200, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIRotate, 498, 100, - kPMTIPlaySound, 0, 33, // CROSLOCK - kPMTIWait, 100, - kPMTIShoot, 27, 33, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIMove, 35, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIWait, 100, - kPMTIShoot, 27, 33, - kPMTIPlaySound, 0, 33, // CROSLOCK - kPMTIMove, 23, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIWait, 100, - kPMTIShoot, 27, 33, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIRotate, 758, 100, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIMove, 89, - kPMTIPlaySound, 0, 33, // CROSLOCK - kPMTIWaitRandom, 4000, 6000, + kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, + kPMTIObstacleReset, kItemPS10Target9, + kPMTIFacing, 738, + kPMTIPosition, 0, + kPMTIWaitRandom, 2000, 5000, + kPMTITargetSet, kItemPS10Target9, 1, + kPMTIEnemySet, kItemPS10Target9, + kPMTIObstacleSet, kItemPS10Target9, + kPMTIPlaySound, 0, 33, // CROSLOCK + kPMTIMove, 23, + kPMTIPlaySound, 0, 33, // CROSLOCK + kPMTIWait, 200, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIRotate, 498, 100, + kPMTIPlaySound, 0, 33, // CROSLOCK + kPMTIWait, 100, + kPMTIShoot, 27, 33, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIMove, 35, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIWait, 100, + kPMTIShoot, 27, 33, + kPMTIPlaySound, 0, 33, // CROSLOCK + kPMTIMove, 23, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIWait, 100, + kPMTIShoot, 27, 33, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIRotate, 758, 100, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIMove, 89, + kPMTIPlaySound, 0, 33, // CROSLOCK + kPMTIWaitRandom, 4000, 6000, #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) + 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, // TARGUP4 - kPMTIMove, 69, - kPMTIWait, 100, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIRotate, 498, 100, - kPMTIWait, 100, - kPMTIShoot, 27, 33, - kPMTIPlaySound, 0, 33, // CROSLOCK - kPMTIRotate, 216, 100, - kPMTIPlaySound, 32, 33, // TARGUP4 - kPMTIMove, 0, - kPMTIObstacleReset, kItemPS10Target9, - kPMTIPausedSet, kItemPS10Target9, + kPMTIFacing, 216, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIMove, 69, + kPMTIWait, 100, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIRotate, 498, 100, + kPMTIWait, 100, + kPMTIShoot, 27, 33, + kPMTIPlaySound, 0, 33, // CROSLOCK + kPMTIRotate, 216, 100, + kPMTIPlaySound, 32, 33, // TARGUP4 + kPMTIMove, 0, + kPMTIObstacleReset, kItemPS10Target9, + kPMTIPausedSet, kItemPS10Target9, kPMTIRestart }; return trackData; diff --git a/engines/bladerunner/script/scene/ps11.cpp b/engines/bladerunner/script/scene/ps11.cpp index a8a9a39264..f5f1e7a311 100644 --- a/engines/bladerunner/script/scene/ps11.cpp +++ b/engines/bladerunner/script/scene/ps11.cpp @@ -44,7 +44,7 @@ void SceneScriptPS11::InitializeScene() { Scene_Exit_Add_2D_Exit(1, 0, 0, 20, 479, 3); } -static const int *getPoliceMazePS11TrackData9() { // Enemy (kItemPS11Target1) +static const int *getPoliceMazePS11TrackData9() { // Enemy (kItemPS11Target1) - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, @@ -81,45 +81,45 @@ static const int *getPoliceMazePS11TrackData9() { // Enemy (kItemPS11Target1) static const int *getPoliceMazePS11TrackData10() { // Enemy (kItemPS11Target2, kItemPS11Target3) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, + 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 + 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, - kPMTITargetSet, kItemPS11Target3, 1, - kPMTIFacing, 860, - kPMTIPosition, 0, - kPMTIWaitRandom, 3000, 6000, - kPMTIEnemyReset, kItemPS11Target2, + kPMTIObstacleReset, kItemPS11Target2, + kPMTIObstacleReset, kItemPS11Target3, + kPMTITargetSet, kItemPS11Target2, 1, + kPMTITargetSet, kItemPS11Target3, 1, + kPMTIFacing, 860, + kPMTIPosition, 0, + kPMTIWaitRandom, 3000, 6000, + kPMTIEnemyReset, kItemPS11Target2, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTIEnemyReset, kItemPS11Target3, // both targets should clear their enemy flag here + 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, + 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 + kPMTITargetSet, kItemPS11Target2, 0, // remove target-able here - only for kItemPS11Target2 item #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIObstacleSet, kItemPS11Target3, - kPMTIPausedSet, kItemPS11Target2, - kPMTIPosition, 0, + kPMTIObstacleSet, kItemPS11Target3, + kPMTIPausedSet, kItemPS11Target2, + kPMTIPosition, 0, kPMTIRestart }; return trackData; } // TODO - into look possible bug -static const int *getPoliceMazePS11TrackData11() { // Innocent (kItemPS11Target2, kItemPS11Target3) +static const int *getPoliceMazePS11TrackData11() { // Enemy (kItemPS11Target2, kItemPS11Target3) static int trackData[] = { kPMTIFacing, 860, kPMTIPosition, 0, @@ -150,48 +150,48 @@ static const int *getPoliceMazePS11TrackData11() { // Innocent (kItemPS11Target static const int *getPoliceMazePS11TrackData12() { // Innocent (kItemPS11Target4) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, + kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS11Target4, 0, // remove target-able here + kPMTITargetSet, kItemPS11Target4, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIObstacleReset, kItemPS11Target4, - kPMTIFacing, 725, - kPMTIPosition, 0, - kPMTIWait, 2000, - kPMTITargetSet, kItemPS11Target4, 1, - kPMTIEnemyReset, kItemPS11Target4, - kPMTIObstacleSet, kItemPS11Target4, - kPMTIMove, 82, + kPMTIObstacleReset, kItemPS11Target4, + kPMTIFacing, 725, + kPMTIPosition, 0, + kPMTIWait, 2000, + kPMTITargetSet, kItemPS11Target4, 1, + kPMTIEnemyReset, kItemPS11Target4, + kPMTIObstacleSet, kItemPS11Target4, + kPMTIMove, 82, #if BLADERUNNER_ORIGINAL_BUGS kPMTILeave, #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIWait, 1000, - kPMTIRotate, 570, 80, - kPMTIWait, 0, - kPMTIRotate, 462, 80, - kPMTIWait, 0, - kPMTIRotate, 213, 80, - kPMTIWait, 1000, - kPMTIMove, 0, - kPMTIRotate, 725, 80, - kPMTIMove, 99, - kPMTIObstacleReset, kItemPS11Target4, + kPMTIWait, 1000, + kPMTIRotate, 570, 80, + kPMTIWait, 0, + kPMTIRotate, 462, 80, + kPMTIWait, 0, + kPMTIRotate, 213, 80, + kPMTIWait, 1000, + kPMTIMove, 0, + kPMTIRotate, 725, 80, + kPMTIMove, 99, + kPMTIObstacleReset, kItemPS11Target4, #if BLADERUNNER_ORIGINAL_BUGS #else kPMTILeave, // Do the leave instruction here, before becoming un-target-able - kPMTITargetSet, kItemPS11Target4, 0, // remove target-able here + kPMTITargetSet, kItemPS11Target4, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIPausedReset, kItemPS11Target16, - kPMTIPausedSet, kItemPS11Target4, - kPMTIPosition, 0, + kPMTIPausedReset, kItemPS11Target16, + kPMTIPausedSet, kItemPS11Target4, + kPMTIPosition, 0, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS11TrackData13() { // Enemy (kItemPS11Target5) +static const int *getPoliceMazePS11TrackData13() { // Enemy (kItemPS11Target5) - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, @@ -281,42 +281,42 @@ static const int *getPoliceMazePS11TrackData14() { // Enemy (kItemPS11Target6) static const int *getPoliceMazePS11TrackData15() { // Innocent (kItemPS11Target7, kItemPS11Target8) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, + 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 + 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, - kPMTITargetSet, kItemPS11Target8, 1, - kPMTIFacing, 860, - kPMTIPosition, 0, - kPMTIWaitRandom, 3000, 7000, - kPMTIObstacleSet, kItemPS11Target7, - kPMTIPlaySound, 29, 33, // TARGUP1 - kPMTIEnemyReset, kItemPS11Target7, + kPMTIObstacleReset, kItemPS11Target7, + kPMTIObstacleReset, kItemPS11Target8, + kPMTITargetSet, kItemPS11Target7, 1, + kPMTITargetSet, kItemPS11Target8, 1, + kPMTIFacing, 860, + kPMTIPosition, 0, + kPMTIWaitRandom, 3000, 7000, + kPMTIObstacleSet, kItemPS11Target7, + kPMTIPlaySound, 29, 33, // TARGUP1 + kPMTIEnemyReset, kItemPS11Target7, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTIEnemyReset, kItemPS11Target8, // both targets should clear their enemy flag here + kPMTIEnemyReset, kItemPS11Target8, // both targets should clear their enemy flag here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIMove, 14, + kPMTIMove, 14, #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, + kPMTIWait, 1000, + kPMTIPausedReset, kItemPS11Target8, + kPMTIObstacleReset, kItemPS11Target7, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTITargetSet, kItemPS11Target7, 0, // remove target-able here + kPMTITargetSet, kItemPS11Target7, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIObstacleSet, kItemPS11Target8, - kPMTIPausedSet, kItemPS11Target7, - kPMTIPosition, 0, + kPMTIObstacleSet, kItemPS11Target8, + kPMTIPausedSet, kItemPS11Target7, + kPMTIPosition, 0, kPMTIRestart }; return trackData; @@ -408,54 +408,54 @@ static const int *getPoliceMazePS11TrackData17() { // Enemy (kItemPS11Target9) static const int *getPoliceMazePS11TrackData18() { // Enemy (kItemPS11Target10, kItemPS11Target11) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, + 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 + kPMTITargetSet, kItemPS11Target10, 0, // remove target-able here + kPMTITargetSet, kItemPS11Target11, 0, // remove target-able here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIObstacleReset, kItemPS11Target10, - kPMTIObstacleReset, kItemPS11Target11, - kPMTIFacing, 900, - kPMTIPosition, 0, - kPMTITargetSet, kItemPS11Target10, 1, - kPMTITargetSet, kItemPS11Target11, 1, - kPMTIEnemyReset, kItemPS11Target10, + kPMTIObstacleReset, kItemPS11Target10, + kPMTIObstacleReset, kItemPS11Target11, + kPMTIFacing, 900, + kPMTIPosition, 0, + kPMTITargetSet, kItemPS11Target10, 1, + kPMTITargetSet, kItemPS11Target11, 1, + kPMTIEnemyReset, kItemPS11Target10, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTIEnemyReset, kItemPS11Target11, // both targets should clear their enemy flag here + kPMTIEnemyReset, kItemPS11Target11, // both targets should clear their enemy flag here #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIWaitRandom, 4000, 6000, - kPMTIObstacleSet, kItemPS11Target10, - kPMTIMove, 5, - kPMTIPlaySound, 19, 33, // RICO3 + kPMTIWaitRandom, 4000, 6000, + kPMTIObstacleSet, kItemPS11Target10, + kPMTIMove, 5, + kPMTIPlaySound, 19, 33, // RICO3 #if BLADERUNNER_ORIGINAL_BUGS - kPMTIPlaySound, 3, 33, // FEMHURT1 + kPMTIPlaySound, 3, 33, // FEMHURT1 #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIWait, 1000, + kPMTIWait, 1000, #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, + kPMTIRotate, 700, 80, + kPMTIEnemySet, kItemPS11Target10, #if BLADERUNNER_ORIGINAL_BUGS #else - kPMTIEnemySet, kItemPS11Target11, // both targets should set their enemy flag here + 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, + 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 + kPMTITargetSet, kItemPS11Target10, 0, // remove target-able here only for kItemPS11Target10 #endif // BLADERUNNER_ORIGINAL_BUGS - kPMTIObstacleSet, kItemPS11Target11, - kPMTIPausedSet, kItemPS11Target10, - kPMTIPosition, 0, + kPMTIObstacleSet, kItemPS11Target11, + kPMTIPausedSet, kItemPS11Target10, + kPMTIPosition, 0, kPMTIRestart }; return trackData; @@ -491,7 +491,7 @@ static const int *getPoliceMazePS11TrackData19() { // Enemy (kItemPS11Target10, return trackData; } -static const int *getPoliceMazePS11TrackData20() { // Enemy (kItemPS11Target12) +static const int *getPoliceMazePS11TrackData20() { // Enemy (kItemPS11Target12) - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, @@ -592,7 +592,7 @@ static const int *getPoliceMazePS11TrackData22() { // Enemy (kItemPS11Target14) return trackData; } -static const int *getPoliceMazePS11TrackData23() { // Innocent (kItemPS11Target15) +static const int *getPoliceMazePS11TrackData23() { // Innocent (kItemPS11Target15) - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, kPMTIVariableInc, kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount, @@ -768,13 +768,13 @@ bool SceneScriptPS11::ClickedOnItem(int itemId, bool combatMode) { #if BLADERUNNER_ORIGINAL_BUGS Item_Spin_In_World(itemId); -#endif +#endif // BLADERUNNER_ORIGINAL_BUGS 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 + if (Item_Query_Visible(kItemPS11Target2)) { // without this check, the wrong target might get the spinning while the visible stays put Item_Spin_In_World(kItemPS11Target2); } else { Item_Spin_In_World(kItemPS11Target3); @@ -787,7 +787,7 @@ bool SceneScriptPS11::ClickedOnItem(int itemId, bool combatMode) { 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 + if (Item_Query_Visible(kItemPS11Target7)) { // without this check, the wrong target might get the spinning while the visible stays put Item_Spin_In_World(kItemPS11Target7); } else { Item_Spin_In_World(kItemPS11Target8); @@ -800,7 +800,7 @@ bool SceneScriptPS11::ClickedOnItem(int itemId, bool combatMode) { 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 + if (Item_Query_Visible(kItemPS11Target10)) { // without this check, the wrong target might get the spinning while the visible stays put Item_Spin_In_World(kItemPS11Target10); } else { Item_Spin_In_World(kItemPS11Target11); @@ -823,7 +823,7 @@ bool SceneScriptPS11::ClickedOnItem(int itemId, bool combatMode) { #if BLADERUNNER_ORIGINAL_BUGS #else Item_Spin_In_World(itemId); -#endif +#endif // BLADERUNNER_ORIGINAL_BUGS Item_Flag_As_Non_Target(itemId); break; } diff --git a/engines/bladerunner/script/scene/ps12.cpp b/engines/bladerunner/script/scene/ps12.cpp index bb912751df..81f76a96ad 100644 --- a/engines/bladerunner/script/scene/ps12.cpp +++ b/engines/bladerunner/script/scene/ps12.cpp @@ -44,10 +44,14 @@ void SceneScriptPS12::InitializeScene() { Scene_Exit_Add_2D_Exit(1, 0, 5, 110, 196, 3); } -static const int *getPoliceMazePS12TrackData29() { +static const int *getPoliceMazePS12TrackData29() { // Enemy (kItemPS12Target1) - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target1, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target1, kPMTIFacing, 200, kPMTIPosition, 0, @@ -62,6 +66,10 @@ static const int *getPoliceMazePS12TrackData29() { kPMTIPlaySound, 34, 33, kPMTIMove, 0, kPMTIObstacleReset, kItemPS12Target1, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target1, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of2, kItemPS12Target16, kItemPS12Target14, kPMTIPausedSet, kItemPS12Target1, kPMTIRestart @@ -69,10 +77,14 @@ static const int *getPoliceMazePS12TrackData29() { return trackData; } -static const int *getPoliceMazePS12TrackData30() { +static const int *getPoliceMazePS12TrackData30() { // Enemy (kItemPS12Target2) - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target2, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target2, kPMTIFacing, 67, kPMTIPosition, 0, @@ -89,22 +101,31 @@ static const int *getPoliceMazePS12TrackData30() { kPMTIObstacleReset, kItemPS12Target2, kPMTIPausedReset1of2, kItemPS12Target13, kItemPS12Target11, kPMTIPausedSet, kItemPS12Target2, - kPMTITargetSet, kItemPS12Target2, 0, + kPMTITargetSet, kItemPS12Target2, 0, // remove target-able here (original code) kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS12TrackData31() { +static const int *getPoliceMazePS12TrackData31() { // Innocent (kItemPS12Target3) static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS kPMTITargetSet, kItemPS12Target3, 1, kPMTIEnemyReset, kItemPS12Target3, +#else + kPMTITargetSet, kItemPS12Target3, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target3, kPMTIFacing, 480, kPMTIPosition, 0, kPMTIWaitRandom, 3000, 10000, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target3, 1, + kPMTIEnemyReset, kItemPS12Target3, +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleSet, kItemPS12Target3, kPMTIMove, 5, kPMTIPlaySound, 29, 33, @@ -116,6 +137,10 @@ static const int *getPoliceMazePS12TrackData31() { kPMTIPlaySound, 29, 33, kPMTILeave, kPMTIObstacleReset, kItemPS12Target3, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target3, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of3, kItemPS12Target12, kItemPS12Target4, kItemPS12Target5, kPMTIPausedSet, kItemPS12Target3, kPMTIRestart @@ -123,10 +148,14 @@ static const int *getPoliceMazePS12TrackData31() { return trackData; } -static const int *getPoliceMazePS12TrackData32() { +static const int *getPoliceMazePS12TrackData32() { // Enemy (kItemPS12Target4) static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target4, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target4, kPMTIFacing, 1010, kPMTIPosition, 0, @@ -143,6 +172,10 @@ static const int *getPoliceMazePS12TrackData32() { kPMTIWait, 500, kPMTIMove, 0, kPMTIObstacleReset, kItemPS12Target4, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target4, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of3, kItemPS12Target5, kItemPS12Target3, kItemPS12Target12, kPMTIPausedSet, kItemPS12Target4, kPMTIRestart @@ -150,10 +183,14 @@ static const int *getPoliceMazePS12TrackData32() { return trackData; } -static const int *getPoliceMazePS12TrackData33() { +static const int *getPoliceMazePS12TrackData33() { // Innocent (kItemPS12Target5) static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target5, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target5, kPMTIFacing, 540, kPMTIPosition, 0, @@ -172,6 +209,10 @@ static const int *getPoliceMazePS12TrackData33() { kPMTIMove, 0, kPMTILeave, kPMTIObstacleReset, kItemPS12Target5, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target5, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of3, kItemPS12Target12, kItemPS12Target3, kItemPS12Target4, kPMTIPausedSet, kItemPS12Target5, kPMTIRestart @@ -179,178 +220,225 @@ static const int *getPoliceMazePS12TrackData33() { return trackData; } -static const int *getPoliceMazePS12TrackData34() { +static const int *getPoliceMazePS12TrackData34() { // Enemy (kItemPS12Target6, kItemPS12Target7, kItemPS12Target8) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIObstacleReset, kItemPS12Target6, - kPMTIObstacleReset, kItemPS12Target7, - kPMTIObstacleReset, kItemPS12Target8, - kPMTIFacing, 469, - kPMTIPosition, 0, - kPMTITargetSet, kItemPS12Target6, 1, - kPMTITargetSet, kItemPS12Target7, 1, - kPMTITargetSet, kItemPS12Target8, 1, - kPMTIWaitRandom, 3000, 10000, - kPMTIObstacleSet, kItemPS12Target6, - kPMTIEnemySet, kItemPS12Target6, - kPMTIEnemySet, kItemPS12Target7, - kPMTIEnemySet, kItemPS12Target8, - kPMTIMove, 5, - kPMTIPlaySound, 29, 33, - kPMTIWait, 1000, - kPMTIRotate, 376, 80, - kPMTIWait, 0, - kPMTIRotate, 168, 80, - kPMTIPlaySound, 29, 33, - kPMTIMove, 9, - kPMTIRotate, 33, 80, - kPMTIWait, 0, - kPMTIRotate, 15, 80, - kPMTIPlaySound, 29, 33, - kPMTIWait, 500, - kPMTIShoot, 27, 33, - kPMTIMove, 5, - kPMTIPlaySound, 29, 33, - kPMTIRotate, 168, 80, - kPMTIWait, 0, - kPMTIRotate, 376, 80, - kPMTIWait, 0, - kPMTIRotate, 469, 80, - kPMTIPlaySound, 29, 33, - kPMTIWait, 500, - kPMTITargetSet, kItemPS12Target6, 1, - kPMTITargetSet, kItemPS12Target7, 1, - kPMTITargetSet, kItemPS12Target8, 1, - kPMTIEnemySet, kItemPS12Target6, - kPMTIEnemySet, kItemPS12Target7, - kPMTIEnemySet, kItemPS12Target8, - kPMTIRotate, 376, 80, - kPMTIWait, 0, - kPMTIRotate, 168, 80, - kPMTIMove, 9, - kPMTIRotate, 33, 80, - kPMTIWait, 0, - kPMTIRotate, 15, 80, - kPMTIPlaySound, 29, 33, - kPMTIWait, 500, - kPMTIShoot, 27, 33, - kPMTIMove, 5, - kPMTIPlaySound, 29, 33, - kPMTIWait, 0, - kPMTIRotate, 469, 80, - kPMTIWait, 500, - kPMTIRotate, 198, 80, - kPMTIPlaySound, 29, 33, - kPMTIWait, 0, - kPMTIMove, 19, - kPMTIPlaySound, 29, 33, - kPMTIWait, 0, - kPMTIObstacleReset, kItemPS12Target6, - kPMTIPausedReset, kItemPS12Target7, - kPMTIPausedSet, kItemPS12Target6, - kPMTIPosition, 0, + kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target6, 0, // remove target-able here + kPMTITargetSet, kItemPS12Target7, 0, // remove target-able here + kPMTITargetSet, kItemPS12Target8, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIObstacleReset, kItemPS12Target6, + kPMTIObstacleReset, kItemPS12Target7, + kPMTIObstacleReset, kItemPS12Target8, + kPMTIFacing, 469, + kPMTIPosition, 0, + kPMTITargetSet, kItemPS12Target6, 1, + kPMTITargetSet, kItemPS12Target7, 1, + kPMTITargetSet, kItemPS12Target8, 1, + kPMTIWaitRandom, 3000, 10000, + kPMTIObstacleSet, kItemPS12Target6, + kPMTIEnemySet, kItemPS12Target6, + kPMTIEnemySet, kItemPS12Target7, + kPMTIEnemySet, kItemPS12Target8, + kPMTIMove, 5, + kPMTIPlaySound, 29, 33, + kPMTIWait, 1000, + kPMTIRotate, 376, 80, + kPMTIWait, 0, + kPMTIRotate, 168, 80, + kPMTIPlaySound, 29, 33, + kPMTIMove, 9, + kPMTIRotate, 33, 80, + kPMTIWait, 0, + kPMTIRotate, 15, 80, + kPMTIPlaySound, 29, 33, + kPMTIWait, 500, + kPMTIShoot, 27, 33, + kPMTIMove, 5, + kPMTIPlaySound, 29, 33, + kPMTIRotate, 168, 80, + kPMTIWait, 0, + kPMTIRotate, 376, 80, + kPMTIWait, 0, + kPMTIRotate, 469, 80, + kPMTIPlaySound, 29, 33, + kPMTIWait, 500, +#if BLADERUNNER_ORIGINAL_BUGS + kPMTITargetSet, kItemPS12Target6, 1, // TODO MAZE A bug? intended? Set as target again (multiple credits issue?) + kPMTITargetSet, kItemPS12Target7, 1, // TODO MAZE A bug? intended? Set as target again (multiple credits issue?) + kPMTITargetSet, kItemPS12Target8, 1, // TODO MAZE A bug? intended? Set as target again (multiple credits issue?) + kPMTIEnemySet, kItemPS12Target6, // TODO MAZE A bug? intended? Set as target again (multiple credits issue?) + kPMTIEnemySet, kItemPS12Target7, // TODO MAZE A bug? intended? Set as target again (multiple credits issue?) + kPMTIEnemySet, kItemPS12Target8, // TODO MAZE A bug? intended? Set as target again (multiple credits issue?) +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIRotate, 376, 80, + kPMTIWait, 0, + kPMTIRotate, 168, 80, + kPMTIMove, 9, + kPMTIRotate, 33, 80, + kPMTIWait, 0, + kPMTIRotate, 15, 80, + kPMTIPlaySound, 29, 33, + kPMTIWait, 500, + kPMTIShoot, 27, 33, + kPMTIMove, 5, + kPMTIPlaySound, 29, 33, + kPMTIWait, 0, + kPMTIRotate, 469, 80, + kPMTIWait, 500, + kPMTIRotate, 198, 80, + kPMTIPlaySound, 29, 33, + kPMTIWait, 0, + kPMTIMove, 19, + kPMTIPlaySound, 29, 33, + kPMTIWait, 0, + kPMTIObstacleReset, kItemPS12Target6, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target6, 0, // remove target-able here - only for this item +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIPausedReset, kItemPS12Target7, + kPMTIPausedSet, kItemPS12Target6, + kPMTIPosition, 0, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS12TrackData35() { +static const int *getPoliceMazePS12TrackData35() { // Enemy (kItemPS12Target6, kItemPS12Target7, kItemPS12Target8) static int trackData[] = { - kPMTIObstacleSet, kItemPS12Target7, - kPMTIFacing, 198, - kPMTIPosition, 0, - kPMTIRotate, 469, 80, - kPMTIMove, 9, - kPMTIWait, 0, - kPMTIObstacleReset, kItemPS12Target7, - kPMTIPausedReset, kItemPS12Target8, - kPMTIPausedSet, kItemPS12Target7, - kPMTIFacing, 198, - kPMTIObstacleSet, kItemPS12Target7, - kPMTIPosition, 0, + kPMTIObstacleSet, kItemPS12Target7, + kPMTIFacing, 198, + kPMTIPosition, 0, + kPMTIRotate, 469, 80, + kPMTIMove, 9, + kPMTIWait, 0, +#if BLADERUNNER_ORIGINAL_BUGS + kPMTIObstacleReset, kItemPS12Target7, + kPMTIPausedReset, kItemPS12Target8, + kPMTIPausedSet, kItemPS12Target7, + kPMTIFacing, 198, + kPMTIObstacleSet, kItemPS12Target7, // this is a bad idea, since kItemPS12Target7 role has ended +#else + // prevent target from blinking midway (at the hand-off of kItemPS12Target7 to kItemPS12Target8 + // adopt the better instruction sequence logic from PS10 similar case (kItemPS10Target1 - kItemPS10Target2) + kPMTIPausedReset, kItemPS12Target8, // kItemPS12Target8 continues the route of this item + kPMTIObstacleReset, kItemPS12Target7, // kItemPS12Target7 becomes invisible + kPMTITargetSet, kItemPS12Target7, 0, // remove target-able here - only for this item + kPMTIObstacleSet, kItemPS12Target8, // kItemPS12Target8 becomes visible in kItemPS12Target7's place + kPMTIPausedSet, kItemPS12Target7, + kPMTIFacing, 198, +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIPosition, 0, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS12TrackData36() { +static const int *getPoliceMazePS12TrackData36() { // Enemy (kItemPS12Target6, kItemPS12Target7, kItemPS12Target8) static int trackData[] = { - kPMTIObstacleSet, kItemPS12Target8, - kPMTIFacing, 469, - kPMTIPosition, 0, - kPMTIObstacleSet, kItemPS12Target8, - kPMTIMove, 9, - kPMTIPlaySound, 29, 33, - kPMTIWait, 1000, - kPMTIObstacleReset, kItemPS12Target6, - kPMTIObstacleReset, kItemPS12Target7, - kPMTIObstacleReset, kItemPS12Target8, - kPMTIPausedReset, kItemPS12Target9, - kPMTIPausedSet, kItemPS12Target8, - kPMTIFacing, 469, - kPMTIObstacleSet, kItemPS12Target8, - kPMTIPosition, 0, + kPMTIObstacleSet, kItemPS12Target8, + kPMTIFacing, 469, + kPMTIPosition, 0, + kPMTIObstacleSet, kItemPS12Target8, + kPMTIMove, 9, + kPMTIPlaySound, 29, 33, + kPMTIWait, 1000, + kPMTIObstacleReset, kItemPS12Target6, + kPMTIObstacleReset, kItemPS12Target7, + kPMTIObstacleReset, kItemPS12Target8, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target8, 0, // remove target-able here - only for this item +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIPausedReset, kItemPS12Target9, + kPMTIPausedSet, kItemPS12Target8, + kPMTIFacing, 469, + kPMTIObstacleSet, kItemPS12Target8, + kPMTIPosition, 0, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS12TrackData37() { +static const int *getPoliceMazePS12TrackData37() { // Innocent (kItemPS12Target9) - Starts activated static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIObstacleReset, kItemPS12Target9, - kPMTIWaitRandom, 3000, 6000, - kPMTIPausedReset, kItemPS12Target10, - kPMTIFacing, 1010, - kPMTIPosition, 0, - kPMTIWait, 2000, - kPMTIObstacleSet, kItemPS12Target9, - kPMTIPlaySound, 33, 33, - kPMTITargetSet, kItemPS12Target9, 1, - kPMTIEnemyReset, kItemPS12Target9, - kPMTIMove, 9, - kPMTIWait, 3000, - kPMTIPlaySound, 34, 33, - kPMTIMove, 0, + kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target9, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIObstacleReset, kItemPS12Target9, + kPMTIWaitRandom, 3000, 6000, + kPMTIPausedReset, kItemPS12Target10, // TODO MAZE A bug? intended? Why is kItemPS12Target10 unpaused so early? + kPMTIFacing, 1010, + kPMTIPosition, 0, + kPMTIWait, 2000, + kPMTIObstacleSet, kItemPS12Target9, + kPMTIPlaySound, 33, 33, + kPMTITargetSet, kItemPS12Target9, 1, + kPMTIEnemyReset, kItemPS12Target9, + kPMTIMove, 9, + kPMTIWait, 3000, + kPMTIPlaySound, 34, 33, + kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPS12Target9, - kPMTIPausedSet, kItemPS12Target9, - kPMTIPosition, 0, + kPMTIObstacleReset, kItemPS12Target9, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target9, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIPausedSet, kItemPS12Target9, + kPMTIPosition, 0, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS12TrackData38() { +static const int *getPoliceMazePS12TrackData38() { // Enemy (kItemPS12Target10) static int trackData[] = { - kPMTIObstacleReset, kItemPS12Target10, - kPMTIFacing, 990, - kPMTIPosition, 0, - kPMTIWait, 3000, - kPMTIObstacleSet, kItemPS12Target10, - kPMTIPlaySound, 33, 33, - kPMTITargetSet, kItemPS12Target10, 1, - kPMTIEnemySet, kItemPS12Target10, - kPMTIMove, 9, - kPMTIWait, 1000, - kPMTIShoot, 12, 33, - kPMTIPlaySound, 34, 33, - kPMTIMove, 0, - kPMTIObstacleReset, kItemPS12Target10, - kPMTIPausedReset, kItemPS12Target6, - kPMTIPausedSet, kItemPS12Target10, - kPMTIPosition, 0, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target10, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIObstacleReset, kItemPS12Target10, + kPMTIFacing, 990, + kPMTIPosition, 0, + kPMTIWait, 3000, + kPMTIObstacleSet, kItemPS12Target10, + kPMTIPlaySound, 33, 33, + kPMTITargetSet, kItemPS12Target10, 1, + kPMTIEnemySet, kItemPS12Target10, + kPMTIMove, 9, + kPMTIWait, 1000, + kPMTIShoot, 12, 33, + kPMTIPlaySound, 34, 33, + kPMTIMove, 0, + kPMTIObstacleReset, kItemPS12Target10, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target10, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIPausedReset, kItemPS12Target6, + kPMTIPausedSet, kItemPS12Target10, + kPMTIPosition, 0, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS12TrackData39() { +static const int *getPoliceMazePS12TrackData39() { // Enemy (kItemPS12Target11) static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target11, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target11, kPMTIFacing, 513, kPMTIPosition, 0, @@ -368,6 +456,10 @@ static const int *getPoliceMazePS12TrackData39() { kPMTIPlaySound, 34, 33, kPMTIMove, 0, kPMTIObstacleReset, kItemPS12Target11, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target11, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of2, kItemPS12Target13, kItemPS12Target2, kPMTIPausedSet, kItemPS12Target11, kPMTIRestart @@ -375,10 +467,14 @@ static const int *getPoliceMazePS12TrackData39() { return trackData; } -static const int *getPoliceMazePS12TrackData40() { +static const int *getPoliceMazePS12TrackData40() { // Enemy (kItemPS12Target12) - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target12, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target12, kPMTIFacing, 480, kPMTIPosition, 0, @@ -396,6 +492,10 @@ static const int *getPoliceMazePS12TrackData40() { kPMTIShoot, 27, 33, kPMTIMove, 0, kPMTIObstacleReset, kItemPS12Target12, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target12, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of3, kItemPS12Target3, kItemPS12Target4, kItemPS12Target5, kPMTIPausedSet, kItemPS12Target12, kPMTIRestart @@ -403,10 +503,14 @@ static const int *getPoliceMazePS12TrackData40() { return trackData; } -static const int *getPoliceMazePS12TrackData41() { +static const int *getPoliceMazePS12TrackData41() { // Innocent (kItemPS12Target13) static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target13, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target13, kPMTIFacing, 513, kPMTIPosition, 0, @@ -424,6 +528,10 @@ static const int *getPoliceMazePS12TrackData41() { kPMTIPlaySound, 34, 33, kPMTILeave, kPMTIObstacleReset, kItemPS12Target13, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target13, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of2, kItemPS12Target11, kItemPS12Target2, kPMTIPausedSet, kItemPS12Target13, kPMTIRestart @@ -431,8 +539,12 @@ static const int *getPoliceMazePS12TrackData41() { return trackData; } -static const int *getPoliceMazePS12TrackData42() { +static const int *getPoliceMazePS12TrackData42() { // Enemy (kItemPS12Target14) static int trackData[] = { +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target14, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target14, kPMTIFacing, 109, kPMTIPosition, 0, @@ -447,6 +559,10 @@ static const int *getPoliceMazePS12TrackData42() { kPMTIShoot, 27, 33, kPMTIMove, 0, kPMTIObstacleReset, kItemPS12Target14, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target14, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of2, kItemPS12Target16, kItemPS12Target1, kPMTIPausedSet, kItemPS12Target14, kPMTIRestart @@ -454,40 +570,52 @@ static const int *getPoliceMazePS12TrackData42() { return trackData; } -static const int *getPoliceMazePS12TrackData43() { +static const int *getPoliceMazePS12TrackData43() { // Innocent (kItemPS12Target15) - Starts activated static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIObstacleReset, kItemPS12Target15, - kPMTIFacing, 540, - kPMTIPosition, 0, - kPMTIWaitRandom, 5000, 7000, - kPMTIObstacleSet, kItemPS12Target15, - kPMTIPlaySound, 33, 33, - kPMTITargetSet, kItemPS12Target15, 1, - kPMTIEnemyReset, kItemPS12Target15, - kPMTIMove, 9, - kPMTIWait, 2000, - kPMTIRotate, 284, 80, - kPMTIWait, 0, - kPMTIRotate, 28, 80, - kPMTIPlaySound, 29, 33, - kPMTIWait, 2000, - kPMTIPlaySound, 34, 33, - kPMTIMove, 0, + kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target15, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIObstacleReset, kItemPS12Target15, + kPMTIFacing, 540, + kPMTIPosition, 0, + kPMTIWaitRandom, 5000, 7000, + kPMTIObstacleSet, kItemPS12Target15, + kPMTIPlaySound, 33, 33, + kPMTITargetSet, kItemPS12Target15, 1, + kPMTIEnemyReset, kItemPS12Target15, + kPMTIMove, 9, + kPMTIWait, 2000, + kPMTIRotate, 284, 80, + kPMTIWait, 0, + kPMTIRotate, 28, 80, + kPMTIPlaySound, 29, 33, + kPMTIWait, 2000, + kPMTIPlaySound, 34, 33, + kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPS12Target15, - kPMTIPausedReset, kItemPS12Target17, - kPMTIPausedSet, kItemPS12Target15, + kPMTIObstacleReset, kItemPS12Target15, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target15, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIPausedReset, kItemPS12Target17, + kPMTIPausedSet, kItemPS12Target15, kPMTIRestart }; return trackData; } -static const int *getPoliceMazePS12TrackData44() { +static const int *getPoliceMazePS12TrackData44() { // Innocent (kItemPS12Target16) static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target16, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIObstacleReset, kItemPS12Target16, kPMTIFacing, 109, kPMTIPosition, 0, @@ -502,6 +630,10 @@ static const int *getPoliceMazePS12TrackData44() { kPMTIMove, 0, kPMTILeave, kPMTIObstacleReset, kItemPS12Target16, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target16, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS kPMTIPausedReset1of2, kItemPS12Target14, kItemPS12Target1, kPMTIPausedSet, kItemPS12Target16, kPMTIRestart @@ -509,30 +641,38 @@ static const int *getPoliceMazePS12TrackData44() { return trackData; } -static const int *getPoliceMazePS12TrackData45() { +static const int *getPoliceMazePS12TrackData45() { // Enemy (kItemPS12Target17) static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, - kPMTIObstacleReset, kItemPS12Target17, - kPMTIFacing, 540, - kPMTIPosition, 0, - kPMTIWaitRandom, 3000, 10000, - kPMTIObstacleSet, kItemPS12Target17, - kPMTIPlaySound, 33, 33, - kPMTITargetSet, kItemPS12Target17, 1, - kPMTIMove, 9, - kPMTIWait, 1000, - kPMTIEnemySet, kItemPS12Target17, - kPMTIRotate, 284, 80, - kPMTIWait, 0, - kPMTIRotate, 28, 80, - kPMTIWait, 1000, - kPMTIShoot, 27, 33, - kPMTIPlaySound, 34, 33, - kPMTIMove, 0, - kPMTIObstacleReset, kItemPS12Target17, - kPMTIPausedReset, kItemPS12Target15, - kPMTIPausedSet, kItemPS12Target17, + kPMTIActivate, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target17, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIObstacleReset, kItemPS12Target17, + kPMTIFacing, 540, + kPMTIPosition, 0, + kPMTIWaitRandom, 3000, 10000, + kPMTIObstacleSet, kItemPS12Target17, + kPMTIPlaySound, 33, 33, + kPMTITargetSet, kItemPS12Target17, 1, + kPMTIMove, 9, + kPMTIWait, 1000, + kPMTIEnemySet, kItemPS12Target17, + kPMTIRotate, 284, 80, + kPMTIWait, 0, + kPMTIRotate, 28, 80, + kPMTIWait, 1000, + kPMTIShoot, 27, 33, + kPMTIPlaySound, 34, 33, + kPMTIMove, 0, + kPMTIObstacleReset, kItemPS12Target17, +#if BLADERUNNER_ORIGINAL_BUGS +#else + kPMTITargetSet, kItemPS12Target17, 0, // remove target-able here +#endif // BLADERUNNER_ORIGINAL_BUGS + kPMTIPausedReset, kItemPS12Target15, + kPMTIPausedSet, kItemPS12Target17, kPMTIRestart }; return trackData; @@ -648,11 +788,23 @@ bool SceneScriptPS12::ClickedOnItem(int itemId, bool a2) { Sound_Play(2, 12, 0, 0, 50); // SPINNY1 break; } +#if BLADERUNNER_ORIGINAL_BUGS Item_Spin_In_World(itemId); +#endif // BLADERUNNER_ORIGINAL_BUGS switch (itemId) { case kItemPS12Target6: // fall-through case kItemPS12Target7: // fall-through case kItemPS12Target8: +#if BLADERUNNER_ORIGINAL_BUGS +#else + if (Item_Query_Visible(kItemPS12Target6)) { // without this check, the wrong target might get the spinning while the visible stays put + Item_Spin_In_World(kItemPS12Target6); + } else if (Item_Query_Visible(kItemPS12Target7)) { + Item_Spin_In_World(kItemPS12Target7); + } else { + Item_Spin_In_World(kItemPS12Target8); + } +#endif // BLADERUNNER_ORIGINAL_BUGS Item_Flag_As_Non_Target(kItemPS12Target6); Item_Flag_As_Non_Target(kItemPS12Target7); Item_Flag_As_Non_Target(kItemPS12Target8); @@ -672,6 +824,10 @@ bool SceneScriptPS12::ClickedOnItem(int itemId, bool a2) { case kItemPS12Target16: // fall-through case kItemPS12Target17: // fall-through default: +#if BLADERUNNER_ORIGINAL_BUGS +#else + Item_Spin_In_World(itemId); +#endif // BLADERUNNER_ORIGINAL_BUGS Item_Flag_As_Non_Target(itemId); break; } diff --git a/engines/bladerunner/script/scene/ps13.cpp b/engines/bladerunner/script/scene/ps13.cpp index 7454d42a87..ecd46cf259 100644 --- a/engines/bladerunner/script/scene/ps13.cpp +++ b/engines/bladerunner/script/scene/ps13.cpp @@ -63,7 +63,7 @@ void SceneScriptPS13::InitializeScene() { Ambient_Sounds_Add_Sound(308, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); } -static const int *getPoliceMazePS13TrackData46() { +static const int *getPoliceMazePS13TrackData46() { // - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, kPMTIVariableInc, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, @@ -89,7 +89,7 @@ static const int *getPoliceMazePS13TrackData46() { return trackData; } -static const int *getPoliceMazePS13TrackData47() { +static const int *getPoliceMazePS13TrackData47() { // - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, kPMTIVariableInc, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, @@ -113,7 +113,7 @@ static const int *getPoliceMazePS13TrackData47() { return trackData; } -static const int *getPoliceMazePS13TrackData48() { +static const int *getPoliceMazePS13TrackData48() { // - Starts activated static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, kPMTIVariableInc, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, @@ -297,27 +297,27 @@ static const int *getPoliceMazePS13TrackData54() { static const int *getPoliceMazePS13TrackData55() { static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, - kPMTIObstacleReset, kItemPS13Target10, - kPMTIObstacleReset, kItemPS13Target11, - kPMTIObstacleReset, kItemPS13Target12, - kPMTITargetSet, kItemPS13Target10, 1, - kPMTITargetSet, kItemPS13Target11, 1, - kPMTITargetSet, kItemPS13Target12, 1, - kPMTIFacing, 327, - kPMTIPosition, 0, - kPMTIWaitRandom, 1000, 1000, - kPMTIPlaySound, 33, 33, - kPMTIEnemyReset, kItemPS13Target10, - kPMTIObstacleSet, kItemPS13Target10, - kPMTIMove, 14, - kPMTIWait, 1000, - kPMTIPausedReset, kItemPS13Target11, - kPMTIObstacleReset, kItemPS13Target10, - kPMTIObstacleSet, kItemPS13Target11, - kPMTIPausedSet, kItemPS13Target10, - kPMTIPosition, 0, + kPMTIActivate, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, + kPMTIObstacleReset, kItemPS13Target10, + kPMTIObstacleReset, kItemPS13Target11, + kPMTIObstacleReset, kItemPS13Target12, + kPMTITargetSet, kItemPS13Target10, 1, + kPMTITargetSet, kItemPS13Target11, 1, + kPMTITargetSet, kItemPS13Target12, 1, + kPMTIFacing, 327, + kPMTIPosition, 0, + kPMTIWaitRandom, 1000, 1000, + kPMTIPlaySound, 33, 33, + kPMTIEnemyReset, kItemPS13Target10, + kPMTIObstacleSet, kItemPS13Target10, + kPMTIMove, 14, + kPMTIWait, 1000, + kPMTIPausedReset, kItemPS13Target11, + kPMTIObstacleReset, kItemPS13Target10, + kPMTIObstacleSet, kItemPS13Target11, + kPMTIPausedSet, kItemPS13Target10, + kPMTIPosition, 0, kPMTIRestart }; return trackData; @@ -325,17 +325,17 @@ static const int *getPoliceMazePS13TrackData55() { static const int *getPoliceMazePS13TrackData56() { static int trackData[] = { - kPMTIFacing, 327, - kPMTIPosition, 0, - kPMTIObstacleSet, kItemPS13Target11, - kPMTIEnemyReset, kItemPS13Target11, - kPMTIMove, 14, - kPMTIWait, 1000, - kPMTIPausedReset, kItemPS13Target12, - kPMTIObstacleReset, kItemPS13Target11, - kPMTIObstacleSet, kItemPS13Target12, - kPMTIPausedSet, kItemPS13Target11, - kPMTIPosition, 0, + kPMTIFacing, 327, + kPMTIPosition, 0, + kPMTIObstacleSet, kItemPS13Target11, + kPMTIEnemyReset, kItemPS13Target11, + kPMTIMove, 14, + kPMTIWait, 1000, + kPMTIPausedReset, kItemPS13Target12, + kPMTIObstacleReset, kItemPS13Target11, + kPMTIObstacleSet, kItemPS13Target12, + kPMTIPausedSet, kItemPS13Target11, + kPMTIPosition, 0, kPMTIRestart }; return trackData; @@ -363,33 +363,33 @@ static const int *getPoliceMazePS13TrackData57() { return trackData; } -static const int *getPoliceMazePS13TrackData58() { +static const int *getPoliceMazePS13TrackData58() { // - Starts activated static int trackData[] = { - kPMTIActivate, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, - kPMTIVariableInc, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, - kPMTIObstacleReset, kItemPS13Target13, - kPMTIFacing, 922, - kPMTIPosition, 0, - kPMTIWaitRandom, 3000, 3000, - kPMTIObstacleSet, kItemPS13Target13, - kPMTIPlaySound, 33, 33, - kPMTITargetSet, kItemPS13Target13, 1, - kPMTIEnemyReset, kItemPS13Target13, - kPMTIMove, 9, - kPMTIWait, 200, - kPMTIMove, 0, + kPMTIActivate, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, + kPMTIVariableInc, kVariablePoliceMazePS13TargetCounter, kPoliceMazePS13TargetCount, + kPMTIObstacleReset, kItemPS13Target13, + kPMTIFacing, 922, + kPMTIPosition, 0, + kPMTIWaitRandom, 3000, 3000, + kPMTIObstacleSet, kItemPS13Target13, + kPMTIPlaySound, 33, 33, + kPMTITargetSet, kItemPS13Target13, 1, + kPMTIEnemyReset, kItemPS13Target13, + kPMTIMove, 9, + kPMTIWait, 200, + kPMTIMove, 0, kPMTILeave, - kPMTITargetSet, kItemPS13Target13, 1, - kPMTIEnemyReset, kItemPS13Target13, - kPMTIWait, 200, - kPMTIMove, 9, - kPMTIWait, 200, - kPMTIMove, 0, + kPMTITargetSet, kItemPS13Target13, 1, + kPMTIEnemyReset, kItemPS13Target13, + kPMTIWait, 200, + kPMTIMove, 9, + kPMTIWait, 200, + kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPS13Target13, - kPMTIPausedReset, kItemPS13Target4, - kPMTIPausedSet, kItemPS13Target13, - kPMTIPosition, 0, + kPMTIObstacleReset, kItemPS13Target13, + kPMTIPausedReset, kItemPS13Target4, + kPMTIPausedSet, kItemPS13Target13, + kPMTIPosition, 0, kPMTIRestart }; return trackData; @@ -550,11 +550,23 @@ bool SceneScriptPS13::ClickedOnItem(int itemId, bool a2) { Sound_Play(2, 12, 0, 0, 50); // SPINNY1 break; } +#if BLADERUNNER_ORIGINAL_BUGS Item_Spin_In_World(itemId); +#endif // BLADERUNNER_ORIGINAL_BUGS switch (itemId) { case kItemPS13Target10: // fall-through case kItemPS13Target11: // fall-through case kItemPS13Target12: +#if BLADERUNNER_ORIGINAL_BUGS +#else + if (Item_Query_Visible(kItemPS13Target10)) { // without this check, the wrong target might get the spinning while the visible stays put + Item_Spin_In_World(kItemPS13Target10); + } else if (Item_Query_Visible(kItemPS13Target11)) { + Item_Spin_In_World(kItemPS13Target11); + } else { + Item_Spin_In_World(kItemPS13Target12); + } +#endif // BLADERUNNER_ORIGINAL_BUGS Item_Flag_As_Non_Target(kItemPS13Target10); Item_Flag_As_Non_Target(kItemPS13Target11); Item_Flag_As_Non_Target(kItemPS13Target12); @@ -572,6 +584,10 @@ bool SceneScriptPS13::ClickedOnItem(int itemId, bool a2) { case kItemPS13Target14: // fall-through case kItemPS13Target15: // fall-through default: +#if BLADERUNNER_ORIGINAL_BUGS +#else + Item_Spin_In_World(itemId); +#endif // BLADERUNNER_ORIGINAL_BUGS Item_Flag_As_Non_Target(itemId); break; } |