diff options
author | antoniou79 | 2019-08-16 19:19:10 +0300 |
---|---|---|
committer | antoniou79 | 2019-08-16 19:20:13 +0300 |
commit | 94858f738e199895d2551fd89b87460eb14ed4d2 (patch) | |
tree | 53bad8c4325ea66fc71a9ebcd5265b4a7bdf748e /engines/bladerunner/script | |
parent | 878675cbd0487b2064abdd452006fdcfb8d6896d (diff) | |
download | scummvm-rg350-94858f738e199895d2551fd89b87460eb14ed4d2.tar.gz scummvm-rg350-94858f738e199895d2551fd89b87460eb14ed4d2.tar.bz2 scummvm-rg350-94858f738e199895d2551fd89b87460eb14ed4d2.zip |
BLADERUNNER: Added cut generic walker models
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r-- | engines/bladerunner/script/ai/free_slot_a.cpp | 3 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/free_slot_b.cpp | 3 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/generic_walker_a.cpp | 71 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/generic_walker_b.cpp | 47 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/generic_walker_c.cpp | 48 | ||||
-rw-r--r-- | engines/bladerunner/script/init_script.cpp | 8 |
6 files changed, 149 insertions, 31 deletions
diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp index eaee3e1bfb..441100bf7d 100644 --- a/engines/bladerunner/script/ai/free_slot_a.cpp +++ b/engines/bladerunner/script/ai/free_slot_a.cpp @@ -466,7 +466,8 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) { break; case 5: - // a bug? This is an animation for Maggie (exploding) + // This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers) + // probably for debug purposes *animation = 874; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874) - 1) { diff --git a/engines/bladerunner/script/ai/free_slot_b.cpp b/engines/bladerunner/script/ai/free_slot_b.cpp index 1124d283ec..c3014b83e3 100644 --- a/engines/bladerunner/script/ai/free_slot_b.cpp +++ b/engines/bladerunner/script/ai/free_slot_b.cpp @@ -329,7 +329,8 @@ bool AIScriptFreeSlotB::UpdateAnimation(int *animation, int *frame) { break; case 5: - // a bug? This is an animation for Maggie (exploding) + // This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers) + // probably for debug purposes *animation = 874; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874) - 1) { diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp index 6cb363991e..d1e0d0469e 100644 --- a/engines/bladerunner/script/ai/generic_walker_a.cpp +++ b/engines/bladerunner/script/ai/generic_walker_a.cpp @@ -140,7 +140,7 @@ void AIScriptGenericWalkerA::ClickedByPlayer() { Actor_Says(kActorMcCoy, 1085, 3); break; case 9: - Actor_Says(kActorMcCoy, 365, 3); + Actor_Says(kActorMcCoy, 365, 3); // Re-used line, same as case 1 break; case 10: Actor_Says(kActorMcCoy, 7415, 3); @@ -220,45 +220,77 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) { case kGenericWalkerAStatesIdle: switch (Global_Variable_Query(kVariableGenericWalkerAModel)) { case 0: - *animation = 426; + *animation = 426; // Hatted Person with umbrella still break; case 1: - *animation = 430; + *animation = 430; // Hooded person with umbrella still break; case 2: - *animation = 437; + *animation = 437; // Hatted lady with wooden umbrella still (different from 436 model!) break; case 3: - *animation = 431; + *animation = 431; // Person with glasses and beard still break; case 4: - *animation = 427; + *animation = 427; // Hatted Person without umbrella still break; case 5: - *animation = 433; + *animation = 433; // Punk person with glasses still + break; + case 6: + *animation = 434; // Hatted child walking // frame 11 could be used for still + _animationFrame = 11; + break; + case 7: + *animation = 435; // Child walking // frame 5 could be used for still + _animationFrame = 5; + break; + case 8: + *animation = 422; // Hatted person walking fast // frame 1 could be used for still + _animationFrame = 1; + break; + case 9: + *animation = 423; // Hatted person walking lowered face // frame 6 could be used for still + _animationFrame = 6; break; } - _animationFrame = 0; + if (!_vm->_cutContent + || Global_Variable_Query(kVariableGenericWalkerAModel) < 6 + ) { + _animationFrame = 0; + } break; case kGenericWalkerAStatesWalk: switch (Global_Variable_Query(kVariableGenericWalkerAModel)) { case 0: - *animation = 424; + *animation = 424; // Hatted person with umbrella walking break; case 1: - *animation = 428; + *animation = 428; // Hooded person with umbrella walking break; case 2: - *animation = 436; + *animation = 436; // Hatted person with wooden umbrella walking break; case 3: - *animation = 429; + *animation = 429; // Person with glasses and beard walking break; case 4: - *animation = 425; + *animation = 425; // Hatted Person without umbrella - walking small steps break; case 5: - *animation = 432; + *animation = 432; // Punk person with glasses walking + break; + case 6: + *animation = 434; // Hatted child walking + break; + case 7: + *animation = 435; // Child walking + break; + case 8: + *animation = 422; // Hatted person walking fast + break; + case 9: + *animation = 423; // Hatted person walking lowered face break; } ++_animationFrame; @@ -267,6 +299,8 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) { } break; case kGenericWalkerAStatesDie: + // This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers) + // probably for debug purposes *animation = 874; ++_animationFrame; if (++_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874)) @@ -373,10 +407,15 @@ bool AIScriptGenericWalkerA::prepareWalker() { int model = 0; do { if (isInside) { - model = Random_Query(3, 5); + model = Random_Query(3, 5); // 0, 1, 2 models have umbrellas so they should be in outdoors locations } else { - model = Random_Query(0, 5); + if (_vm->_cutContent) { + model = Random_Query(0, 9); + } else { + model = Random_Query(0, 5); + } } + // this while loop ensures choosing a different model for Walker A than the Walker B or Walker C } while (model == Global_Variable_Query(kVariableGenericWalkerBModel) || model == Global_Variable_Query(kVariableGenericWalkerCModel)); Global_Variable_Set(kVariableGenericWalkerAModel, model); diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp index 8bd17fa92d..4f8d4d3d60 100644 --- a/engines/bladerunner/script/ai/generic_walker_b.cpp +++ b/engines/bladerunner/script/ai/generic_walker_b.cpp @@ -115,7 +115,7 @@ void AIScriptGenericWalkerB::ClickedByPlayer() { Actor_Says(kActorMcCoy, 1085, 3); break; case 9: - Actor_Says(kActorMcCoy, 365, 3); + Actor_Says(kActorMcCoy, 365, 3); // Re-used line, same as case 1 break; case 10: Actor_Says(kActorMcCoy, 7415, 3); @@ -201,8 +201,28 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) { case 5: *animation = 433; break; + case 6: + *animation = 434; // Hatted child walking // frame 11 could be used for still + _animationFrame = 11; + break; + case 7: + *animation = 435; // Child walking // frame 5 could be used for still + _animationFrame = 5; + break; + case 8: + *animation = 422; // Hatted person walking fast // frame 1 could be used for still + _animationFrame = 1; + break; + case 9: + *animation = 423; // Hatted person walking lowered face // frame 6 could be used for still + _animationFrame = 6; + break; + } + if (!_vm->_cutContent + || Global_Variable_Query(kVariableGenericWalkerAModel) < 6 + ) { + _animationFrame = 0; } - _animationFrame = 0; break; case kGenericWalkerBStatesWalk: switch (Global_Variable_Query(kVariableGenericWalkerBModel)) { @@ -224,6 +244,18 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) { case 5: *animation = 432; break; + case 6: + *animation = 434; // Hatted child walking + break; + case 7: + *animation = 435; // Child walking + break; + case 8: + *animation = 422; // Hatted person walking fast + break; + case 9: + *animation = 423; // Hatted person walking lowered face + break; } ++_animationFrame; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) { @@ -231,6 +263,8 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) { } break; case kGenericWalkerBStatesDie: + // This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers) + // probably for debug purposes *animation = 874; ++_animationFrame; if (++_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874)) @@ -326,10 +360,15 @@ bool AIScriptGenericWalkerB::prepareWalker() { int model = 0; do { if (isInside) { - model = Random_Query(3, 5); + model = Random_Query(3, 5); // 0, 1, 2 models have umbrellas so they should be in outdoors locations } else { - model = Random_Query(0, 5); + if (_vm->_cutContent) { + model = Random_Query(0, 9); + } else { + model = Random_Query(0, 5); + } } + // this while loop ensures choosing a different model for Walker B than the Walker A or Walker C } while (model == Global_Variable_Query(kVariableGenericWalkerAModel) || model == Global_Variable_Query(kVariableGenericWalkerCModel)); Global_Variable_Set(kVariableGenericWalkerBModel, model); diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp index 159c57a319..b92cf71622 100644 --- a/engines/bladerunner/script/ai/generic_walker_c.cpp +++ b/engines/bladerunner/script/ai/generic_walker_c.cpp @@ -116,7 +116,7 @@ void AIScriptGenericWalkerC::ClickedByPlayer() { Actor_Says(kActorMcCoy, 1085, 3); break; case 9: - Actor_Says(kActorMcCoy, 365, 3); + Actor_Says(kActorMcCoy, 365, 3); // Re-used line, same as case 1 break; case 10: Actor_Says(kActorMcCoy, 7415, 3); @@ -202,8 +202,28 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) { case 5: *animation = 433; break; + case 6: + *animation = 434; // Hatted child walking // frame 11 could be used for still + _animationFrame = 11; + break; + case 7: + *animation = 435; // Child walking // frame 5 could be used for still + _animationFrame = 5; + break; + case 8: + *animation = 422; // Hatted person walking fast // frame 1 could be used for still + _animationFrame = 1; + break; + case 9: + *animation = 423; // Hatted person walking lowered face // frame 6 could be used for still + _animationFrame = 6; + break; + } + if (!_vm->_cutContent + || Global_Variable_Query(kVariableGenericWalkerAModel) < 6 + ) { + _animationFrame = 0; } - _animationFrame = 0; break; case kGenericWalkerCStatesWalk: switch (Global_Variable_Query(kVariableGenericWalkerCModel)) { @@ -225,6 +245,18 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) { case 5: *animation = 432; break; + case 6: + *animation = 434; // Hatted child walking + break; + case 7: + *animation = 435; // Child walking + break; + case 8: + *animation = 422; // Hatted person walking fast + break; + case 9: + *animation = 423; // Hatted person walking lowered face + break; } ++_animationFrame; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) { @@ -232,6 +264,8 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) { } break; case kGenericWalkerCStatesDie: + // This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers) + // probably for debug purposes *animation = 874; ++_animationFrame; if (++_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874)) @@ -327,11 +361,15 @@ bool AIScriptGenericWalkerC::prepareWalker() { int model = 0; do { if (isInside) { - model = Random_Query(3, 5); + model = Random_Query(3, 5); // 0, 1, 2 models have umbrellas so they should be in outdoors locations } else { - model = Random_Query(0, 5); + if (_vm->_cutContent) { + model = Random_Query(0, 9); + } else { + model = Random_Query(0, 5); + } } - // Here is probably bug in original code, because it not using kVariableGenericWalkerBModel but kVariableGenericWalkerCModel + // this while loop ensures choosing a different model for Walker C than the Walker A or Walker B } while (model == Global_Variable_Query(kVariableGenericWalkerAModel) || model == Global_Variable_Query(kVariableGenericWalkerBModel)); diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp index 12cbe9349b..c62466acfc 100644 --- a/engines/bladerunner/script/init_script.cpp +++ b/engines/bladerunner/script/init_script.cpp @@ -1880,7 +1880,7 @@ void InitScript::Init_World_Waypoints() { World_Waypoint_Set(196, kSetBB05, 39.41f, -60.31f, 308.35f); World_Waypoint_Set(197, kSetBB05, 99.41f, -60.31f, 220.35f); World_Waypoint_Set(198, kSetBB05, 267.41f, -60.31f, 180.35f); - // 199 - UNUSED? + // 199 - UNUSED World_Waypoint_Set(200, kSetBB06_BB07, -44.46f, -0.04f, 177.4f); World_Waypoint_Set(201, kSetBB06_BB07, 137.0f, -0.04f, 17.0f); World_Waypoint_Set(202, kSetRC03, -610.0f, -4.01f, 237.11f); @@ -2092,7 +2092,7 @@ void InitScript::Init_World_Waypoints() { World_Waypoint_Set(407, kSetUG10, 0.0f, 81.02f, -512.0f); World_Waypoint_Set(408, kSetUG10, 0.0f, 1.15f, 400.0f); World_Waypoint_Set(409, kSetUG04, -48.0f, -1.74f, -983.0f); - // 410 - UNUSED? + // 410 - UNUSED World_Waypoint_Set(411, kSetUG05, 80.0f, -16.72f, -4.0f); World_Waypoint_Set(412, kSetUG05, -48.0f, -11.0f, -352.0f); World_Waypoint_Set(413, kSetUG06, -109.0f, 0.0f, 285.0f); @@ -2206,7 +2206,7 @@ void InitScript::Init_World_Waypoints() { World_Waypoint_Set(521, kSetHF04, 482.02f, -0.31f, -661.24f); World_Waypoint_Set(522, kSetHF04, 1183.98f, -0.31f, -176.25f); World_Waypoint_Set(523, kSetHF04, -45.0f, -0.34f, -351.0f); - // 524 - UNUSED? + // 524 - UNUSED // 525 - kSetKP02 - Free Slot A (Rat) AI script // 526 - kSetKP02 - Free Slot A (Rat) AI script // 527 - kSetKP02 - Free Slot B (Rat) AI script @@ -2234,7 +2234,7 @@ void InitScript::Init_World_Waypoints() { World_Waypoint_Set(549, kSetNR04, -15.0f, 0.0f, 338.0f); World_Waypoint_Set(550, kSetKP05_KP06, -785.31f, 0.0f, -237.05f); World_Waypoint_Set(551, kSetKP05_KP06, -737.31f, 0.0f, -145.05f); - // 552 - UNUSED? + // 552 - UNUSED // 553 - kSetRC03 - Izo AI script } |