diff options
author | Paul Gilbert | 2016-01-17 10:52:46 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-01-17 10:52:46 -0500 |
commit | 362c99797c0f04a215618b8dae46159597a1d835 (patch) | |
tree | 5d5832313bbc027eeb4e7268cb0d29a6587c6df5 /engines/access | |
parent | 429648188f431f820640d29005a8d6f87bc97771 (diff) | |
download | scummvm-rg350-362c99797c0f04a215618b8dae46159597a1d835.tar.gz scummvm-rg350-362c99797c0f04a215618b8dae46159597a1d835.tar.bz2 scummvm-rg350-362c99797c0f04a215618b8dae46159597a1d835.zip |
ACCESS: Fix fading in screen after cancelling Inventory screen
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/inventory.cpp | 1 | ||||
-rw-r--r-- | engines/access/room.cpp | 6 | ||||
-rw-r--r-- | engines/access/screen.cpp | 4 | ||||
-rw-r--r-- | engines/access/screen.h | 1 |
4 files changed, 8 insertions, 4 deletions
diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index 6d1b6d8d0f..0a962aa69a 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -183,6 +183,7 @@ int InventoryManager::newDisplayInv() { _invModeFlag = false; events.debounceLeft(); _vm->_timers.restoreTimers(); + _vm->_startup = 1; int result = 0; if (!_invRefreshFlag) { diff --git a/engines/access/room.cpp b/engines/access/room.cpp index f54b6170bc..c48c7ce54f 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -172,14 +172,14 @@ void Room::doRoom() { reloadFlag = false; _vm->_startup = 8; _function = FN_NONE; - bool fadeIn = true; + _vm->_screen->_fadeIn = false; while (!_vm->shouldQuit()) { _vm->_images.clear(); - if (_vm->_startup == -1 && !fadeIn) { + if (_vm->_screen->_fadeIn) { _vm->_events->showCursor(); _vm->_screen->fadeIn(); - fadeIn = true; + _vm->_screen->_fadeIn = false; } // Poll for events diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp index 98e188c0ca..aa15abd59a 100644 --- a/engines/access/screen.cpp +++ b/engines/access/screen.cpp @@ -62,6 +62,7 @@ Screen::Screen(AccessEngine *vm) : _vm(vm) { _startCycle = 0; _cycleStart = 0; _endCycle = 0; + _fadeIn = false; } void Screen::clearScreen() { @@ -90,7 +91,8 @@ void Screen::setPanel(int num) { void Screen::updateScreen() { if (_vm->_startup >= 0) { - --_vm->_startup; + if (--_vm->_startup == -1) + _fadeIn = true; return; } diff --git a/engines/access/screen.h b/engines/access/screen.h index 5cb85471c6..6fa0fe3812 100644 --- a/engines/access/screen.h +++ b/engines/access/screen.h @@ -85,6 +85,7 @@ public: int _bufferBytesWide; int _vWindowLinesTall; bool _screenChangeFlag; + bool _fadeIn; public: virtual void copyBlock(ASurface *src, const Common::Rect &bounds); |