diff options
author | Matthew Hoops | 2010-06-02 15:26:35 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-06-02 15:26:35 +0000 |
commit | a8deacfc7eaf6b845d93b7a3f7343b55ee7ec097 (patch) | |
tree | 46f0af707c75bf08beaa0a6900a766cc6e1fdd43 /engines/mohawk/riven_scripts.cpp | |
parent | af3fec8c26d92005b507dca65d1d50f820feb0e7 (diff) | |
download | scummvm-rg350-a8deacfc7eaf6b845d93b7a3f7343b55ee7ec097.tar.gz scummvm-rg350-a8deacfc7eaf6b845d93b7a3f7343b55ee7ec097.tar.bz2 scummvm-rg350-a8deacfc7eaf6b845d93b7a3f7343b55ee7ec097.zip |
In Riven, if we get a change card opcode on a mouse down event, ignore the next mouse up event so we don't misinterpret that as an event in the next card; minor cleanup.
svn-id: r49393
Diffstat (limited to 'engines/mohawk/riven_scripts.cpp')
-rw-r--r-- | engines/mohawk/riven_scripts.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp index b175b3af52..d574a455c6 100644 --- a/engines/mohawk/riven_scripts.cpp +++ b/engines/mohawk/riven_scripts.cpp @@ -298,13 +298,10 @@ void RivenScript::processCommands(bool runCommands) { // Command 1: draw tBMP resource (tbmp_id, left, top, right, bottom, u0, u1, u2, u3) void RivenScript::drawBitmap(uint16 op, uint16 argc, uint16 *argv) { - if (argc < 5) { - // Copy the image to the whole screen, ignoring the rest of the parameters + if (argc < 5) // Copy the image to the whole screen, ignoring the rest of the parameters _vm->_gfx->copyImageToScreen(argv[0], 0, 0, 608, 392); - } else { - // Copy the image to a certain part of the screen + else // Copy the image to a certain part of the screen _vm->_gfx->copyImageToScreen(argv[0], argv[1], argv[2], argv[3], argv[4]); - } // Now, update the screen _vm->_gfx->updateScreen(); @@ -313,6 +310,12 @@ void RivenScript::drawBitmap(uint16 op, uint16 argc, uint16 *argv) { // Command 2: go to card (card id) void RivenScript::switchCard(uint16 op, uint16 argc, uint16 *argv) { _vm->changeToCard(argv[0]); + + // WORKAROUND: If we changed card on a mouse down event, + // we want to ignore the next mouse up event so we don't + // change card when lifting the mouse on the next card. + if (_scriptType == kMouseDownScript) + _vm->ignoreNextMouseUp(); } // Command 3: play an SLST from the script |