diff options
author | Bastien Bouclet | 2011-08-14 09:16:30 +0200 |
---|---|---|
committer | Bastien Bouclet | 2011-08-14 09:18:20 +0200 |
commit | ef1f5d48fa028769be8911a8cb997f3add1add21 (patch) | |
tree | 32d72a0127465559148f4c4e546609bb2bde8212 /engines/mohawk | |
parent | df381055c44452baf02a7384d50429d8717c432f (diff) | |
download | scummvm-rg350-ef1f5d48fa028769be8911a8cb997f3add1add21.tar.gz scummvm-rg350-ef1f5d48fa028769be8911a8cb997f3add1add21.tar.bz2 scummvm-rg350-ef1f5d48fa028769be8911a8cb997f3add1add21.zip |
MOHAWK: Implement remaining Myst demo sneak preview opcodes
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/myst_stacks/preview.cpp | 49 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/preview.h | 8 |
2 files changed, 23 insertions, 34 deletions
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp index 0e720c6112..1b72c85d96 100644 --- a/engines/mohawk/myst_stacks/preview.cpp +++ b/engines/mohawk/myst_stacks/preview.cpp @@ -54,10 +54,10 @@ Preview::~Preview() { void Preview::setupOpcodes() { // "Stack-Specific" Opcodes - OVERRIDE_OPCODE(196, opcode_196); - OVERRIDE_OPCODE(197, opcode_197); - OVERRIDE_OPCODE(198, opcode_198); - OVERRIDE_OPCODE(199, opcode_199); + OVERRIDE_OPCODE(196, o_fadeToBlack); + OVERRIDE_OPCODE(197, o_fadeFromBlack); + OVERRIDE_OPCODE(198, o_stayHere); + OVERRIDE_OPCODE(199, o_speechStop); // "Init" Opcodes OPCODE(298, o_speech_init); @@ -78,40 +78,29 @@ void Preview::runPersistentScripts() { speech_run(); } -void Preview::opcode_196(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - varUnusedCheck(op, var); - - // Used on Card ... - // TODO: Finish Implementation... - // Voice Over and Card Advance? +void Preview::o_fadeToBlack(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Fade to black", op); + _vm->_gfx->fadeToBlack(); } -void Preview::opcode_197(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - varUnusedCheck(op, var); - - // Used on Card ... - // TODO: Finish Implementation... - // Voice Over and Card Advance? +void Preview::o_fadeFromBlack(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Fade from black", op); + _vm->_gfx->fadeFromBlack(); } -// TODO: Merge with Opcode 42? -void Preview::opcode_198(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - varUnusedCheck(op, var); +void Preview::o_stayHere(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Stay here dialog", op); - if (argc == 0) { - // Nuh-uh! No leaving the library in the demo! - GUI::MessageDialog dialog("You can't leave the library in the demo."); - dialog.runModal(); - } else - unknown(op, var, argc, argv); + // Nuh-uh! No leaving the library in the demo! + GUI::MessageDialog dialog("You can't leave the library in the demo."); + dialog.runModal(); } -void Preview::opcode_199(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - varUnusedCheck(op, var); +void Preview::o_speechStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Speech stop", op); - // Used on Card ... - // TODO: Finish Implementation... - // Voice Over and Card Advance? + _speechRunning = false; + _globals.currentAge = 2; } void Preview::speechUpdateCue() { diff --git a/engines/mohawk/myst_stacks/preview.h b/engines/mohawk/myst_stacks/preview.h index a884be8d4d..1e4ff3efb4 100644 --- a/engines/mohawk/myst_stacks/preview.h +++ b/engines/mohawk/myst_stacks/preview.h @@ -46,10 +46,10 @@ public: private: void setupOpcodes(); - DECLARE_OPCODE(opcode_196); - DECLARE_OPCODE(opcode_197); - DECLARE_OPCODE(opcode_198); - DECLARE_OPCODE(opcode_199); + DECLARE_OPCODE(o_fadeToBlack); + DECLARE_OPCODE(o_fadeFromBlack); + DECLARE_OPCODE(o_stayHere); + DECLARE_OPCODE(o_speechStop); DECLARE_OPCODE(o_speech_init); DECLARE_OPCODE(o_library_init); |