aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2017-08-10 20:51:27 +0200
committerBastien Bouclet2017-08-10 20:52:23 +0200
commitfb26a42aad0ec1c5b6d1fb141446ec158995995d (patch)
tree1e7ebe56ee3757e233c847c38696d287227bea6f /engines
parent22ed7eb399bdef15e296007c1f51de5fb9d5558e (diff)
downloadscummvm-rg350-fb26a42aad0ec1c5b6d1fb141446ec158995995d.tar.gz
scummvm-rg350-fb26a42aad0ec1c5b6d1fb141446ec158995995d.tar.bz2
scummvm-rg350-fb26a42aad0ec1c5b6d1fb141446ec158995995d.zip
MOHAWK: Myst: Restore the backbuffer after toggling off fireplace buttons
Fixes #10064
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 1ee8420472..dbc4ff55b8 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -843,6 +843,7 @@ void Myst::o_fireplaceToggleButton(uint16 var, const ArgumentsArray &args) {
// Used on Myst Card 4162 (Fireplace Grid)
uint16 bitmask = args[0];
uint16 line = _fireplaceLines[var - 17];
+ Common::Rect buttonRect = getInvokingResource<MystArea>()->getRect();
// The animations are too slow when playing each animation image at 60fps.
// Only play every second image.
@@ -850,14 +851,15 @@ void Myst::o_fireplaceToggleButton(uint16 var, const ArgumentsArray &args) {
if (line & bitmask) {
// Unset button
for (uint i = 4795; i >= 4779; i -= 2) {
- _vm->_gfx->copyImageToScreen(i, getInvokingResource<MystArea>()->getRect());
+ _vm->_gfx->copyImageToScreen(i, buttonRect);
_vm->doFrame();
}
+ _vm->_gfx->copyBackBufferToScreen(buttonRect);
_fireplaceLines[var - 17] &= ~bitmask;
} else {
// Set button
for (uint i = 4779; i <= 4795; i += 2) {
- _vm->_gfx->copyImageToScreen(i, getInvokingResource<MystArea>()->getRect());
+ _vm->_gfx->copyImageToScreen(i, buttonRect);
_vm->doFrame();
}
_fireplaceLines[var - 17] |= bitmask;