diff options
author | Marisa-Chan | 2014-03-07 08:16:17 +0700 |
---|---|---|
committer | Marisa-Chan | 2014-03-07 08:16:17 +0700 |
commit | 74fe47748e11cc58aee46e986d6670636c027e32 (patch) | |
tree | e16db1e7d6baae29d94a80f11cb8a6cf57bc8ce6 /engines/zvision/slot_control.cpp | |
parent | 84681a2439047b9c6a5fd0c89f9be383bd51ad7e (diff) | |
download | scummvm-rg350-74fe47748e11cc58aee46e986d6670636c027e32.tar.gz scummvm-rg350-74fe47748e11cc58aee46e986d6670636c027e32.tar.bz2 scummvm-rg350-74fe47748e11cc58aee46e986d6670636c027e32.zip |
ZVISION: Fix slot rendering for item-to-item click
Diffstat (limited to 'engines/zvision/slot_control.cpp')
-rw-r--r-- | engines/zvision/slot_control.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/engines/zvision/slot_control.cpp b/engines/zvision/slot_control.cpp index 418aa8fad2..111a7c63e8 100644 --- a/engines/zvision/slot_control.cpp +++ b/engines/zvision/slot_control.cpp @@ -168,11 +168,18 @@ bool SlotControl::process(uint32 deltaTimeInMillis) { if (_engine->canRender()) { int cur_item = _engine->getScriptManager()->getStateValue(_key); if (cur_item != _rendered_item) { - if (_rendered_item == 0) { - if (_bkg) - delete _bkg; + if (_rendered_item != 0 && cur_item == 0) { + _engine->getRenderManager()->blitSurfaceToBkg(*_bkg, _rectangle.left, _rectangle.top); + _rendered_item = cur_item; + } else { + if (_rendered_item == 0) { + if (_bkg) + delete _bkg; - _bkg = _engine->getRenderManager()->getBkgRect(_rectangle); + _bkg = _engine->getRenderManager()->getBkgRect(_rectangle); + } else { + _engine->getRenderManager()->blitSurfaceToBkg(*_bkg, _rectangle.left, _rectangle.top); + } char buf[16]; if (_engine->getGameId() == GID_NEMESIS) @@ -196,9 +203,6 @@ bool SlotControl::process(uint32 deltaTimeInMillis) { delete srf; _rendered_item = cur_item; - } else { - _engine->getRenderManager()->blitSurfaceToBkg(*_bkg, _rectangle.left, _rectangle.top); - _rendered_item = cur_item; } } } |