diff options
Diffstat (limited to 'engines/mohawk/riven_stacks/ospit.cpp')
-rw-r--r-- | engines/mohawk/riven_stacks/ospit.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/engines/mohawk/riven_stacks/ospit.cpp b/engines/mohawk/riven_stacks/ospit.cpp index 8da1698ad3..beecc05ab9 100644 --- a/engines/mohawk/riven_stacks/ospit.cpp +++ b/engines/mohawk/riven_stacks/ospit.cpp @@ -193,22 +193,19 @@ void OSpit::xogehnbookprevpage(const ArgumentArray &args) { uint32 &page = _vm->_vars["ogehnpage"]; // Keep turning pages while the mouse is pressed - bool firstPageTurn = true; - while (mouseIsDown() || firstPageTurn) { + while (keepTurningPages()) { // Check for the first page if (page == 1) return; - if (!pageTurn(kRivenTransitionWipeRight)) { - return; - } - // Update the page number page--; - firstPageTurn = false; + pageTurn(kRivenTransitionWipeRight); _vm->getCard()->drawPicture(page); _vm->doFrame(); + + waitForPageTurnSound(); } } @@ -217,22 +214,19 @@ void OSpit::xogehnbooknextpage(const ArgumentArray &args) { uint32 &page = _vm->_vars["ogehnpage"]; // Keep turning pages while the mouse is pressed - bool firstPageTurn = true; - while ((mouseIsDown() || firstPageTurn) && !_vm->hasGameEnded()) { + while (keepTurningPages()) { // Check for the last page if (page == 13) return; - if (!pageTurn(kRivenTransitionWipeLeft)) { - return; - } - // Update the page number page++; - firstPageTurn = false; + pageTurn(kRivenTransitionWipeLeft); _vm->getCard()->drawPicture(page); _vm->doFrame(); + + waitForPageTurnSound(); } } |