diff options
author | Bastien Bouclet | 2010-11-29 21:01:57 +0000 |
---|---|---|
committer | Bastien Bouclet | 2010-11-29 21:01:57 +0000 |
commit | 1b50b62157297040ec067f0f251c8e380cc3b4c0 (patch) | |
tree | 5afaa0832ef05d6d56d63a66f41ef91d46a57644 | |
parent | 69ff712a48ff4badd3feeeddaf7ad462b03635a6 (diff) | |
download | scummvm-rg350-1b50b62157297040ec067f0f251c8e380cc3b4c0.tar.gz scummvm-rg350-1b50b62157297040ec067f0f251c8e380cc3b4c0.tar.bz2 scummvm-rg350-1b50b62157297040ec067f0f251c8e380cc3b4c0.zip |
MOHAWK: Minimal implementation of the maze runner. Selenitic is now completable.
svn-id: r54641
-rw-r--r-- | engines/mohawk/myst_scripts_selenitic.cpp | 652 | ||||
-rw-r--r-- | engines/mohawk/myst_scripts_selenitic.h | 9 |
2 files changed, 655 insertions, 6 deletions
diff --git a/engines/mohawk/myst_scripts_selenitic.cpp b/engines/mohawk/myst_scripts_selenitic.cpp index d84e4760d9..368bc7f14d 100644 --- a/engines/mohawk/myst_scripts_selenitic.cpp +++ b/engines/mohawk/myst_scripts_selenitic.cpp @@ -104,7 +104,7 @@ void MystScriptParser_Selenitic::setupOpcodes() { // TODO: Opcodes 47 to 99 Not Present // "Stack-Specific" Opcodes - SPECIFIC_OPCODE(100, opcode_100), + SPECIFIC_OPCODE(100, o_100_mazeRunnerMove), SPECIFIC_OPCODE(101, opcode_101), SPECIFIC_OPCODE(102, o_102_soundReceiverSigma), SPECIFIC_OPCODE(103, o_103_soundReceiverRight), @@ -167,6 +167,16 @@ uint16 MystScriptParser_Selenitic::getVar(uint16 var) { return selenitic_vars[5]; case 6: // Tunnel lights return selenitic_vars[6]; + case 7:// Maze runner display + if (_maze_runner_position == 288) { + return 0; + } else if (_maze_runner_position == 289) { + return 1; + } else if (!mazeRunnerForwardAllowed(_maze_runner_position)) { + return 2; + } else { + return 3; + } case 8: // Viewer return 0; case 9: // Sound receiver selected source @@ -193,6 +203,8 @@ uint16 MystScriptParser_Selenitic::getVar(uint16 var) { case 23: case 24: return 1; + case 25: // Maze runner direction + return _maze_runner_direction; case 26: return _sound_receiver_sigma_pressed; case 27: @@ -200,6 +212,12 @@ uint16 MystScriptParser_Selenitic::getVar(uint16 var) { return 0; case 30: return _maze_runner_door_opened; + case 31: // Maze runner forward allowed + return mazeRunnerForwardAllowed(_maze_runner_position) || _maze_runner_position == 288; + case 32: // Maze runner exit allowed + return _maze_runner_position != 288 && _maze_runner_position != 289; + case 33: // Maze runner at entry + return _maze_runner_position != 288; case 102: // Red page return !(game_globals[6] & 2) && (game_globals[2] != 8); case 103: // Blue page @@ -334,10 +352,31 @@ bool MystScriptParser_Selenitic::setVarValue(uint16 var, uint16 value) { return refresh; } -void MystScriptParser_Selenitic::opcode_100(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - varUnusedCheck(op, var); +void MystScriptParser_Selenitic::o_100_mazeRunnerMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + // uint16 oldPosition = _maze_runner_position; + uint16 move = var; - unknown(op, var, argc, argv); + uint16 videoToNext = _mazeRunnerVideos[_maze_runner_position][move]; + _maze_runner_position = _mazeRunnerMap[_maze_runner_position][move]; + + if (videoToNext) { + _maze_runner_compass->drawConditionalDataToScreen(8); + mazeRunnerUpdateCompass(); + } +} + +void MystScriptParser_Selenitic::mazeRunnerUpdateCompass() { + if (_maze_runner_position == 288 || _maze_runner_position == 289) { + _maze_runner_direction = 8; + } else { + _maze_runner_direction = _maze_runner_position % 8; + } + _maze_runner_compass->drawConditionalDataToScreen(_maze_runner_direction); +} + +bool MystScriptParser_Selenitic::mazeRunnerForwardAllowed(uint16 position) { + uint16 move = _mazeRunnerVideos[position][1]; + return move == 6 || move == 7; } void MystScriptParser_Selenitic::opcode_101(uint16 op, uint16 var, uint16 argc, uint16 *argv) { @@ -971,4 +1010,609 @@ void MystScriptParser_Selenitic::o_206_mazeRunnerLeft_init(uint16 op, uint16 var _maze_runner_left_button = static_cast<MystResourceType8 *>(_invokingResource); } +const uint16 MystScriptParser_Selenitic::_mazeRunnerMap[300][4] = { + {8, 7, 1, 288}, + {1, 0, 2, 288}, + {2, 1, 3, 288}, + {3, 2, 4, 288}, + {4, 3, 5, 288}, + {5, 4, 6, 288}, + {6, 5, 7, 288}, + {7, 6, 0, 288}, + {8, 15, 9, 0}, + {9, 8, 10, 0}, + {10, 9, 11, 0}, + {11, 10, 12, 0}, + {4, 11, 13, 0}, + {13, 12, 14, 0}, + {22, 13, 15, 0}, + {15, 14, 8, 0}, + {24, 23, 17, 14}, + {17, 16, 18, 14}, + {10, 17, 19, 14}, + {19, 18, 20, 14}, + {20, 19, 21, 14}, + {21, 20, 22, 14}, + {22, 21, 23, 14}, + {23, 22, 16, 14}, + {112, 31, 25, 16}, + {25, 24, 26, 16}, + {34, 25, 27, 16}, + {27, 26, 28, 16}, + {20, 27, 29, 16}, + {29, 28, 30, 16}, + {30, 29, 31, 16}, + {31, 30, 24, 16}, + {120, 39, 33, 26}, + {33, 32, 34, 26}, + {42, 33, 35, 26}, + {35, 34, 36, 26}, + {36, 35, 37, 26}, + {37, 36, 38, 26}, + {30, 37, 39, 26}, + {39, 38, 32, 26}, + {40, 47, 41, 34}, + {143, 40, 42, 34}, + {42, 41, 43, 34}, + {43, 42, 44, 34}, + {52, 43, 45, 34}, + {45, 44, 46, 34}, + {38, 45, 47, 34}, + {47, 46, 40, 34}, + {40, 55, 49, 44}, + {49, 48, 50, 44}, + {146, 49, 51, 44}, + {51, 50, 52, 44}, + {60, 51, 53, 44}, + {53, 52, 54, 44}, + {54, 53, 55, 44}, + {55, 54, 48, 44}, + {48, 63, 57, 52}, + {57, 56, 58, 52}, + {58, 57, 59, 52}, + {171, 58, 60, 52}, + {60, 59, 61, 52}, + {61, 60, 62, 52}, + {68, 61, 63, 52}, + {63, 62, 56, 52}, + {58, 71, 65, 62}, + {65, 64, 66, 62}, + {66, 65, 67, 62}, + {67, 66, 68, 62}, + {68, 67, 69, 62}, + {77, 68, 70, 62}, + {70, 69, 71, 62}, + {71, 70, 64, 62}, + {72, 79, 73, 69}, + {65, 72, 74, 69}, + {186, 73, 75, 69}, + {75, 74, 76, 69}, + {196, 75, 77, 69}, + {77, 76, 78, 69}, + {86, 77, 79, 69}, + {79, 78, 72, 69}, + {80, 87, 81, 78}, + {81, 80, 82, 78}, + {74, 81, 83, 78}, + {83, 82, 84, 78}, + {212, 83, 85, 78}, + {229, 84, 86, 78}, + {86, 85, 87, 78}, + {95, 86, 80, 78}, + {88, 95, 89, 87}, + {97, 88, 90, 87}, + {90, 89, 91, 87}, + {83, 90, 92, 87}, + {92, 91, 93, 87}, + {93, 92, 94, 87}, + {254, 93, 95, 87}, + {95, 94, 88, 87}, + {106, 103, 97, 89}, + {97, 96, 98, 89}, + {98, 97, 99, 89}, + {99, 98, 100, 89}, + {100, 99, 101, 89}, + {93, 100, 102, 89}, + {102, 101, 103, 89}, + {271, 102, 96, 89}, + {104, 111, 105, 96}, + {105, 104, 106, 96}, + {106, 105, 107, 96}, + {289, 106, 108, 96}, + {108, 107, 109, 96}, + {109, 108, 110, 96}, + {100, 109, 111, 96}, + {111, 110, 104, 96}, + {112, 119, 113, 24}, + {113, 112, 114, 24}, + {114, 113, 115, 24}, + {115, 114, 116, 24}, + {28, 115, 117, 24}, + {117, 116, 118, 24}, + {118, 117, 119, 24}, + {119, 118, 112, 24}, + {120, 127, 121, 32}, + {121, 120, 122, 32}, + {122, 121, 123, 32}, + {123, 122, 124, 32}, + {36, 123, 125, 32}, + {125, 124, 126, 32}, + {126, 125, 127, 32}, + {127, 126, 120, 32}, + {128, 135, 129, 136}, + {129, 128, 130, 136}, + {130, 129, 131, 136}, + {131, 130, 132, 136}, + {140, 131, 133, 136}, + {133, 132, 134, 136}, + {134, 133, 135, 136}, + {135, 134, 128, 136}, + {128, 143, 137, 41}, + {137, 136, 138, 41}, + {138, 137, 139, 41}, + {45, 138, 140, 41}, + {140, 139, 141, 41}, + {141, 140, 142, 41}, + {142, 141, 143, 41}, + {143, 142, 136, 41}, + {144, 151, 145, 50}, + {145, 144, 146, 50}, + {146, 145, 147, 50}, + {147, 146, 148, 50}, + {148, 147, 149, 50}, + {157, 148, 150, 50}, + {54, 149, 151, 50}, + {151, 150, 144, 50}, + {152, 159, 153, 149}, + {145, 152, 154, 149}, + {154, 153, 155, 149}, + {155, 154, 156, 149}, + {156, 155, 157, 149}, + {157, 156, 158, 149}, + {158, 157, 159, 149}, + {159, 158, 152, 149}, + {160, 167, 161, 168}, + {161, 160, 162, 168}, + {162, 161, 163, 168}, + {163, 162, 164, 168}, + {172, 163, 165, 168}, + {165, 164, 166, 168}, + {166, 165, 167, 168}, + {167, 166, 160, 168}, + {160, 175, 169, 59}, + {169, 168, 170, 59}, + {170, 169, 171, 59}, + {171, 170, 172, 59}, + {172, 171, 173, 59}, + {181, 172, 174, 59}, + {174, 173, 175, 59}, + {63, 174, 168, 59}, + {176, 183, 177, 173}, + {169, 176, 178, 173}, + {178, 177, 179, 173}, + {179, 178, 180, 173}, + {180, 179, 181, 173}, + {181, 180, 182, 173}, + {182, 181, 183, 173}, + {183, 182, 176, 173}, + {184, 191, 185, 74}, + {185, 184, 186, 74}, + {186, 185, 187, 74}, + {187, 186, 188, 74}, + {188, 187, 189, 74}, + {189, 188, 190, 74}, + {78, 189, 191, 74}, + {191, 190, 184, 74}, + {72, 199, 193, 76}, + {193, 192, 194, 76}, + {194, 193, 195, 76}, + {195, 194, 196, 76}, + {196, 195, 197, 76}, + {197, 196, 198, 76}, + {198, 197, 199, 76}, + {199, 198, 192, 76}, + {200, 207, 201, 212}, + {201, 200, 202, 212}, + {202, 201, 203, 212}, + {203, 202, 204, 212}, + {204, 203, 205, 212}, + {205, 204, 206, 212}, + {208, 205, 207, 212}, + {207, 206, 200, 212}, + {80, 215, 209, 84}, + {209, 208, 210, 84}, + {210, 209, 211, 84}, + {211, 210, 212, 84}, + {202, 211, 213, 84}, + {213, 212, 214, 84}, + {208, 213, 215, 84}, + {215, 214, 208, 84}, + {224, 223, 217, 228}, + {217, 216, 218, 228}, + {218, 217, 219, 228}, + {219, 218, 220, 228}, + {220, 219, 221, 228}, + {221, 220, 222, 228}, + {216, 221, 223, 228}, + {223, 222, 216, 228}, + {224, 231, 225, 85}, + {81, 224, 226, 85}, + {226, 225, 227, 85}, + {227, 226, 228, 85}, + {220, 227, 229, 85}, + {229, 228, 230, 85}, + {238, 229, 231, 85}, + {231, 230, 224, 85}, + {232, 239, 233, 230}, + {233, 232, 234, 230}, + {226, 233, 235, 230}, + {235, 234, 236, 230}, + {236, 235, 237, 230}, + {237, 236, 238, 230}, + {232, 237, 239, 230}, + {239, 238, 232, 230}, + {240, 247, 241, 252}, + {241, 240, 242, 252}, + {248, 241, 243, 252}, + {243, 242, 244, 252}, + {244, 243, 245, 252}, + {245, 244, 246, 252}, + {240, 245, 247, 252}, + {247, 246, 240, 252}, + {256, 255, 249, 94}, + {249, 248, 250, 94}, + {90, 249, 251, 94}, + {251, 250, 252, 94}, + {246, 251, 253, 94}, + {253, 252, 254, 94}, + {248, 253, 255, 94}, + {255, 254, 248, 94}, + {256, 263, 257, 248}, + {257, 256, 258, 248}, + {258, 257, 259, 248}, + {259, 258, 260, 248}, + {252, 259, 261, 248}, + {261, 260, 262, 248}, + {256, 261, 263, 248}, + {263, 262, 256, 248}, + {280, 271, 265, 103}, + {265, 264, 266, 103}, + {266, 265, 267, 103}, + {99, 266, 268, 103}, + {268, 267, 269, 103}, + {269, 268, 270, 103}, + {278, 269, 271, 103}, + {271, 270, 264, 103}, + {272, 279, 273, 270}, + {273, 272, 274, 270}, + {266, 273, 275, 270}, + {275, 274, 276, 270}, + {276, 275, 277, 270}, + {277, 276, 278, 270}, + {272, 277, 279, 270}, + {279, 278, 272, 270}, + {280, 287, 281, 264}, + {281, 280, 282, 264}, + {282, 281, 283, 264}, + {283, 282, 284, 264}, + {268, 283, 285, 264}, + {285, 284, 286, 264}, + {280, 285, 287, 264}, + {287, 286, 280, 264}, + {0, 288, 288, 288}, + {289, 289, 289, 107}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0} + }; + +const uint8 MystScriptParser_Selenitic::_mazeRunnerVideos[300][4] = { + {3, 6, 10, 17}, + {0, 5, 8, 17}, + {0, 4, 8, 17}, + {0, 4, 8, 17}, + {0, 4, 8, 17}, + {0, 4, 8, 17}, + {0, 4, 8, 17}, + {0, 4, 9, 17}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {12, 6, 10, 19}, + {0, 5, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {14, 6, 10, 20}, + {0, 5, 9, 20}, + {13, 6, 10, 20}, + {0, 5, 9, 20}, + {12, 6, 10, 20}, + {0, 5, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 9, 20}, + {12, 6, 10, 21}, + {0, 5, 9, 21}, + {3, 6, 10, 21}, + {0, 5, 8, 21}, + {12, 4, 8, 21}, + {0, 4, 9, 21}, + {13, 6, 10, 21}, + {0, 5, 9, 21}, + {0, 4, 9, 19}, + {16, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 9, 19}, + {12, 6, 10, 19}, + {0, 5, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {3, 6, 10, 20}, + {0, 5, 9, 20}, + {13, 6, 10, 20}, + {0, 5, 9, 20}, + {14, 6, 10, 20}, + {0, 5, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 9, 20}, + {14, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 9, 22}, + {3, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 9, 22}, + {16, 6, 10, 22}, + {0, 5, 9, 22}, + {15, 6, 10, 24}, + {0, 5, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 9, 24}, + {14, 6, 10, 24}, + {0, 5, 8, 24}, + {0, 4, 9, 24}, + {0, 4, 9, 22}, + {14, 6, 11, 22}, + {12, 7, 10, 22}, + {0, 5, 9, 22}, + {13, 6, 10, 22}, + {0, 5, 9, 22}, + {3, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 5, 8, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 9, 19}, + {14, 6, 11, 19}, + {3, 7, 10, 19}, + {0, 5, 9, 19}, + {14, 6, 10, 19}, + {0, 4, 9, 22}, + {3, 6, 10, 22}, + {0, 5, 9, 22}, + {14, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 9, 22}, + {3, 6, 10, 22}, + {0, 5, 8, 22}, + {15, 7, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 9, 19}, + {14, 6, 11, 19}, + {0, 4, 8, 23}, + {0, 4, 8, 23}, + {0, 4, 9, 23}, + {2, 6, 10, 23}, + {0, 5, 8, 23}, + {0, 4, 9, 23}, + {16, 6, 10, 23}, + {0, 5, 8, 23}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 9, 22}, + {14, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 9, 20}, + {12, 6, 10, 20}, + {0, 5, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {3, 6, 10, 24}, + {0, 5, 8, 24}, + {0, 4, 9, 24}, + {15, 6, 10, 24}, + {0, 5, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 9, 24}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 9, 21}, + {3, 6, 11, 21}, + {13, 7, 10, 21}, + {0, 5, 8, 21}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 9, 22}, + {14, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {14, 7, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 9, 19}, + {3, 6, 11, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 9, 20}, + {12, 6, 10, 20}, + {0, 5, 8, 20}, + {13, 6, 10, 21}, + {0, 5, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 9, 21}, + {0, 4, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 8, 24}, + {0, 4, 9, 24}, + {15, 6, 10, 24}, + {0, 5, 8, 24}, + {14, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 9, 22}, + {16, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 9, 22}, + {12, 6, 10, 20}, + {0, 5, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 8, 20}, + {0, 4, 9, 20}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 9, 19}, + {12, 6, 10, 19}, + {0, 5, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 23}, + {0, 4, 9, 23}, + {16, 6, 10, 23}, + {0, 5, 8, 23}, + {0, 4, 8, 23}, + {0, 4, 8, 23}, + {0, 4, 8, 23}, + {0, 4, 8, 23}, + {14, 6, 10, 19}, + {0, 5, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 9, 19}, + {15, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 9, 22}, + {14, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 8, 22}, + {0, 4, 8, 22}, + {3, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 9, 22}, + {14, 6, 10, 22}, + {0, 5, 8, 22}, + {0, 4, 9, 22}, + {13, 6, 10, 22}, + {0, 5, 9, 22}, + {0, 4, 8, 21}, + {0, 4, 9, 21}, + {12, 6, 10, 21}, + {0, 5, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 21}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 9, 19}, + {3, 6, 10, 19}, + {0, 5, 8, 19}, + {0, 4, 8, 19}, + {0, 4, 8, 19}, + {1, 0, 0, 0}, + {0, 0, 0, 18}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0} + }; } // End of namespace Mohawk diff --git a/engines/mohawk/myst_scripts_selenitic.h b/engines/mohawk/myst_scripts_selenitic.h index feb5eadb27..3b7645ce6c 100644 --- a/engines/mohawk/myst_scripts_selenitic.h +++ b/engines/mohawk/myst_scripts_selenitic.h @@ -52,7 +52,7 @@ private: void toggleVar(uint16 var); bool setVarValue(uint16 var, uint16 value); - DECLARE_OPCODE(opcode_100); + DECLARE_OPCODE(o_100_mazeRunnerMove); DECLARE_OPCODE(opcode_101); DECLARE_OPCODE(o_102_soundReceiverSigma); DECLARE_OPCODE(o_103_soundReceiverRight); @@ -93,7 +93,11 @@ private: MystResourceType8 *_sound_receiver_angle_4; // 152 MystResourceType8 *_sound_receiver_sigma_button; // 156 + static const uint16 _mazeRunnerMap[300][4]; + static const uint8 _mazeRunnerVideos[300][4]; + uint16 _maze_runner_position; // 56 + uint16 _maze_runner_direction; // 58 MystResourceType8 *_maze_runner_window; // 68 MystResourceType8 *_maze_runner_compass; // 72 MystResourceType8 *_maze_runner_light; // 76 @@ -122,7 +126,8 @@ private: MystResourceType10 *soundLockSliderFromVar(uint16 var); void soundLockCheckSolution(MystResourceType10 *slider, uint16 value, uint16 solution, bool &solved); - void redrawResource(MystResource *_resource); + bool mazeRunnerForwardAllowed(uint16 position); + void mazeRunnerUpdateCompass(); }; } |