Skip to content

Commit

Permalink
ACCESS: Fix fading in screen after cancelling Inventory screen
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jan 17, 2016
1 parent 4296481 commit 362c997
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions engines/access/inventory.cpp
Expand Up @@ -183,6 +183,7 @@ int InventoryManager::newDisplayInv() {
_invModeFlag = false;
events.debounceLeft();
_vm->_timers.restoreTimers();
_vm->_startup = 1;

int result = 0;
if (!_invRefreshFlag) {
Expand Down
6 changes: 3 additions & 3 deletions engines/access/room.cpp
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion engines/access/screen.cpp
Expand Up @@ -62,6 +62,7 @@ Screen::Screen(AccessEngine *vm) : _vm(vm) {
_startCycle = 0;
_cycleStart = 0;
_endCycle = 0;
_fadeIn = false;
}

void Screen::clearScreen() {
Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions engines/access/screen.h
Expand Up @@ -85,6 +85,7 @@ class Screen : public ASurface {
int _bufferBytesWide;
int _vWindowLinesTall;
bool _screenChangeFlag;
bool _fadeIn;
public:
virtual void copyBlock(ASurface *src, const Common::Rect &bounds);

Expand Down

0 comments on commit 362c997

Please sign in to comment.