diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/debugger.cpp | 103 |
1 files changed, 99 insertions, 4 deletions
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp index f0137c4376..eb188b3ede 100644 --- a/engines/bladerunner/debugger.cpp +++ b/engines/bladerunner/debugger.cpp @@ -323,21 +323,116 @@ bool Debugger::cmdSay(int argc, const char **argv) { return false; } +const struct SceneList { + int chapter; + const char *name; + int set; + int scene; +} sceneList[] = { + { 1, "CT01", 4, 13 }, { 1, "CT02", 27, 14 }, { 1, "CT03", 5, 15 }, { 1, "CT04", 5, 16 }, + { 1, "CT05", 28, 17 }, { 1, "CT06", 29, 18 }, { 1, "CT07", 30, 19 }, { 1, "CT12", 4, 24 }, + { 1, "MA01", 49, 48 }, { 1, "MA02", 10, 49 }, { 1, "MA04", 10, 50 }, { 1, "MA04", 50, 50 }, + { 1, "MA05", 51, 51 }, { 1, "MA06", 52, 52 }, { 1, "MA07", 53, 53 }, { 1, "PS01", 61, 65 }, + { 1, "PS02", 62, 66 }, { 1, "PS03", 63, 67 }, { 1, "PS04", 64, 68 }, { 1, "PS05", 15, 59 }, + { 1, "PS06", 65, 70 }, { 1, "PS07", 66, 71 }, { 1, "PS09", 67, 72 }, { 1, "PS10", 14, 73 }, + { 1, "PS11", 14, 74 }, { 1, "PS12", 14, 75 }, { 1, "PS13", 14, 76 }, { 1, "PS14", 68, 77 }, + { 1, "PS15", 101, 119 }, { 1, "RC01", 69, 78 }, { 1, "RC02", 16, 79 }, { 1, "RC51", 16, 107 }, + + { 3, "AR01", 0, 0 }, { 3, "AR02", 0, 1 }, { 3, "BB01", 20, 2 }, { 3, "BB02", 1, 3 }, + { 3, "BB03", 21, 4 }, { 3, "BB04", 1, 5 }, { 3, "BB05", 22, 6 }, { 3, "BB06", 1, 7 }, + { 3, "BB06", 2, 7 }, { 3, "BB07", 2, 8 }, { 3, "BB07", 3, 8 }, { 3, "BB08", 23, 9 }, + { 3, "BB10", 25, 11 }, { 3, "BB11", 26, 12 }, { 3, "BB12", 102, 120 }, { 3, "BB51", 1, 104 }, + { 3, "CT01", 4, 13 }, { 3, "CT02", 27, 14 }, { 3, "CT03", 5, 15 }, { 3, "CT04", 5, 16 }, + { 3, "CT05", 28, 17 }, { 3, "CT06", 29, 18 }, { 3, "CT08", 6, 20 }, { 3, "CT09", 31, 21 }, + { 3, "CT10", 32, 22 }, { 3, "CT11", 33, 23 }, { 3, "CT12", 4, 24 }, { 3, "CT51", 6, 105 }, + { 3, "DR01", 7, 25 }, { 3, "DR02", 7, 26 }, { 3, "DR03", 34, 27 }, { 3, "DR04", 7, 28 }, + { 3, "DR05", 35, 29 }, { 3, "DR06", 36, 30 }, { 3, "HC01", 8, 31 }, { 3, "HC02", 8, 32 }, + { 3, "HC03", 8, 33 }, { 3, "HC04", 8, 106 }, { 3, "HF01", 37, 34 }, { 3, "HF02", 38, 35 }, + { 3, "HF03", 39, 36 }, { 3, "HF04", 40, 37 }, { 3, "HF05", 41, 38 }, { 3, "HF06", 42, 39 }, + { 3, "MA01", 49, 48 }, { 3, "MA02", 10, 49 }, { 3, "MA04", 10, 50 }, { 3, "MA04", 50, 50 }, + { 3, "MA05", 51, 51 }, { 3, "MA06", 52, 52 }, { 3, "MA07", 53, 53 }, { 3, "NR01", 54, 54 }, + { 3, "NR02", 11, 55 }, { 3, "NR03", 55, 56 }, { 3, "NR04", 12, 57 }, { 3, "NR05", 13, 58 }, + { 3, "NR06", 56, 59 }, { 3, "NR07", 57, 60 }, { 3, "NR08", 13, 61 }, { 3, "NR09", 58, 62 }, + { 3, "NR10", 59, 63 }, { 3, "NR11", 60, 64 }, { 3, "PS01", 61, 65 }, { 3, "PS02", 62, 66 }, + { 3, "PS03", 63, 67 }, { 3, "PS04", 64, 68 }, { 3, "PS05", 15, 59 }, { 3, "PS06", 65, 70 }, + { 3, "PS07", 66, 71 }, { 3, "PS09", 67, 72 }, { 3, "PS10", 14, 73 }, { 3, "PS11", 14, 74 }, + { 3, "PS12", 14, 75 }, { 3, "PS13", 14, 76 }, { 3, "PS14", 68, 77 }, { 3, "PS15", 101, 119 }, + { 3, "RC01", 69, 78 }, { 3, "RC03", 70, 80 }, { 3, "RC04", 71, 81 }, { 3, "TB02", 17, 82 }, + { 3, "TB05", 72, 84 }, { 3, "TB06", 73, 85 }, { 3, "TB07", 18, 108 }, { 3, "UG01", 74, 86 }, + { 3, "UG02", 75, 87 }, { 3, "UG03", 76, 88 }, { 3, "UG04", 77, 89 }, { 3, "UG06", 79, 91 }, + { 3, "UG10", 83, 95 }, + + { 4, "AR01", 0, 0 }, { 4, "AR02", 0, 1 }, { 4, "BB01", 20, 2 }, { 4, "BB02", 1, 3 }, + { 4, "BB03", 21, 4 }, { 4, "BB04", 1, 5 }, { 4, "BB51", 1, 104 }, { 4, "CT01", 4, 13 }, + { 4, "CT02", 27, 14 }, { 4, "CT03", 5, 15 }, { 4, "CT04", 5, 16 }, { 4, "CT05", 28, 17 }, + { 4, "CT06", 29, 18 }, { 4, "CT08", 6, 20 }, { 4, "CT09", 31, 21 }, { 4, "CT10", 32, 22 }, + { 4, "CT11", 33, 23 }, { 4, "CT12", 4, 24 }, { 4, "CT51", 6, 105 }, { 4, "DR01", 7, 25 }, + { 4, "DR02", 7, 26 }, { 4, "DR03", 34, 27 }, { 4, "DR04", 7, 28 }, { 4, "DR05", 35, 29 }, + { 4, "DR06", 36, 30 }, { 4, "HC01", 8, 31 }, { 4, "HC02", 8, 32 }, { 4, "HC03", 8, 33 }, + { 4, "HC04", 8, 106 }, { 4, "HF01", 37, 34 }, { 4, "HF02", 38, 35 }, { 4, "HF03", 39, 36 }, + { 4, "HF04", 40, 37 }, { 4, "HF05", 41, 38 }, { 4, "HF06", 42, 39 }, { 4, "HF07", 43, 40 }, + { 4, "KP01", 44, 41 }, { 4, "KP02", 45, 42 }, { 4, "KP03", 46, 43 }, { 4, "KP04", 47, 44 }, + { 4, "KP05", 9, 45 }, { 4, "KP06", 9, 46 }, { 4, "KP07", 48, 47 }, { 4, "MA02", 10, 49 }, + { 4, "MA04", 10, 50 }, { 4, "MA04", 50, 50 }, { 4, "MA05", 51, 51 }, { 4, "MA06", 52, 52 }, + { 4, "MA07", 53, 53 }, { 4, "NR01", 54, 54 }, { 4, "NR02", 11, 55 }, { 4, "NR03", 55, 56 }, + { 4, "NR04", 12, 57 }, { 4, "NR05", 13, 58 }, { 4, "NR06", 56, 59 }, { 4, "NR07", 57, 60 }, + { 4, "NR08", 13, 61 }, { 4, "NR09", 58, 62 }, { 4, "NR10", 59, 63 }, { 4, "NR11", 60, 64 }, + { 4, "PS09", 67, 72 }, { 4, "PS14", 68, 77 }, { 4, "RC01", 69, 78 }, { 4, "RC02", 16, 89 }, + { 4, "RC03", 70, 80 }, { 4, "RC04", 71, 81 }, { 4, "RC51", 16, 107 }, { 4, "TB02", 17, 82 }, + { 4, "TB03", 17, 83 }, { 4, "TB07", 18, 108 }, { 4, "UG01", 74, 86 }, { 4, "UG02", 75, 87 }, + { 4, "UG03", 76, 88 }, { 4, "UG04", 77, 89 }, { 4, "UG05", 78, 90 }, { 4, "UG06", 79, 91 }, + { 4, "UG07", 80, 92 }, { 4, "UG08", 81, 93 }, { 4, "UG09", 82, 94 }, { 4, "UG10", 83, 95 }, + { 4, "UG12", 84, 96 }, { 4, "UG13", 85, 97 }, { 4, "UG14", 86, 98 }, { 4, "UG15", 87, 99 }, + { 4, "UG16", 16, 100 }, { 4, "UG17", 88, 101 }, { 4, "UG18", 89, 102 }, { 4, "UG19", 90, 103 }, + + { 0, NULL, 0, 0 } +}; + bool Debugger::cmdScene(int argc, const char **argv) { - if (argc != 1 && argc != 3) { + if (argc != 0 && argc > 3) { debugPrintf("Changes set and scene.\n"); - debugPrintf("Usage: %s [<setId> <sceneId>]\n", argv[0]); + debugPrintf("Usage: %s [<setId> <sceneId>] | [[<chapterId>] <sceneName>]\n", argv[0]); return true; } - if (argc == 3) { + // scene <setId> <sceneId> + if (argc == 3 && Common::isDigit(*argv[1]) && Common::isDigit(*argv[2])) { int setId = atoi(argv[1]); int sceneId = atoi(argv[2]); _vm->_settings->setNewSetAndScene(setId, sceneId); return false; + } else if (argc > 1) { + int chapterId; + Common::String sceneName; + + // <chapterId> <sceneName> + if (argc == 3) { + chapterId = atoi(argv[1]); + sceneName = argv[2]; + } else if (argc == 2) { // <sceneName> + chapterId = _vm->_settings->getChapter(); + sceneName = argv[1]; + } + + uint i; + for (i = 0; sceneList[i].chapter != 0; i++) { + if (sceneList[i].chapter == chapterId && sceneName.equalsIgnoreCase(sceneList[i].name)) + break; + } + + if (sceneList[i].chapter == 0) { + debugPrintf("Invalid scene name or chapter.\n"); + return true; + } else { + if (chapterId != _vm->_settings->getChapter()) + _vm->_settings->setChapter(chapterId); + } + + _vm->_settings->setNewSetAndScene(sceneList[i].set, sceneList[i].scene); + return false; } - debugPrintf("set = %i\nscene = %i\n", _vm->_scene->getSetId(), _vm->_scene->getSceneId()); + debugPrintf("chapter = %i\nset = %i\nscene = %i\n", _vm->_settings->getChapter(), _vm->_scene->getSetId(), _vm->_scene->getSceneId()); return true; } |