diff options
author | Robert Špalek | 2009-11-01 23:04:56 +0000 |
---|---|---|
committer | Robert Špalek | 2009-11-01 23:04:56 +0000 |
commit | f77446a500046ae156e07ea7cdbebbf23c5877b3 (patch) | |
tree | 91ef27e361d8e1e378f650e00a7f6784ba0fd73a /engines/draci/script.cpp | |
parent | 8a7c5dbc6fdf54d1dce1c1d279ccbe3c2b7f2189 (diff) | |
download | scummvm-rg350-f77446a500046ae156e07ea7cdbebbf23c5877b3.tar.gz scummvm-rg350-f77446a500046ae156e07ea7cdbebbf23c5877b3.tar.bz2 scummvm-rg350-f77446a500046ae156e07ea7cdbebbf23c5877b3.zip |
Commented on loop() before refactoring.
svn-id: r45604
Diffstat (limited to 'engines/draci/script.cpp')
-rw-r--r-- | engines/draci/script.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp index f7ec7578fb..f938737728 100644 --- a/engines/draci/script.cpp +++ b/engines/draci/script.cpp @@ -357,6 +357,8 @@ void Script::play(Common::Queue<int> ¶ms) { return; } + // Runs just one phase of the loop and exits. Used when waiting for a + // particular animation phase to come. _vm->_game->setLoopSubstatus(kSubstatusStrange); _vm->_game->setExitLoop(true); _vm->_game->loop(); @@ -469,6 +471,7 @@ void Script::startPlay(Common::Queue<int> ¶ms) { _vm->_anims->play(animID); } + // Runs an inner loop until the animation ends. _vm->_game->loop(); _vm->_game->setExitLoop(false); _vm->_anims->stop(animID); @@ -675,6 +678,7 @@ void Script::walkOnPlay(Common::Queue<int> ¶ms) { SightDirection dir = static_cast<SightDirection> (params.pop()); // HACK: This should be an onDest action when hero walking is properly implemented + // For now, we just go throught the loop-body once to redraw the screen. _vm->_game->setExitLoop(true); _vm->_game->walkHero(x, y, dir); @@ -776,7 +780,7 @@ void Script::talk(Common::Queue<int> ¶ms) { // "exit immediately" state _vm->_game->setExitLoop(false); - // Call the game loop to enable interactivity until the text expires + // Call the game loop to enable interactivity until the text expires. _vm->_game->loop(); // Delete the text @@ -871,6 +875,10 @@ void Script::fadePalette(Common::Queue<int> ¶ms) { params.pop(); // unused first and last params.pop(); int phases = params.pop(); + + // Let the palette fade in the background while the game continues. + // Since we don't set substatus to kSubstatusFade, the outer loop will + // just continue rather than exit. _vm->_game->initializeFading(phases); } @@ -880,6 +888,7 @@ void Script::fadePalettePlay(Common::Queue<int> ¶ms) { int phases = params.pop(); _vm->_game->initializeFading(phases); + // Call the game loop to enable interactivity until the fading is done. _vm->_game->setLoopSubstatus(kSubstatusFade); _vm->_game->loop(); _vm->_game->setExitLoop(false); |