Skip to content

Commit

Permalink
ACCESS: Added a temporary frame delay and screen update
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 12, 2014
1 parent 94eda10 commit 9107cc1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engines/access/events.cpp
Expand Up @@ -148,7 +148,15 @@ void EventsManager::checkForNextFrameCounter() {

// Signal the ScummVM debugger
_vm->_debugger->onFrame();

// TODO: Refactor for dirty rects
_vm->_screen->updateScreen();
}
}

void EventsManager::delay(int time) {
g_system->delayMillis(time);
}


} // End of namespace Access
2 changes: 2 additions & 0 deletions engines/access/events.h
Expand Up @@ -88,6 +88,8 @@ class EventsManager {
bool isCursorVisible();

void pollEvents();

void delay(int time);
};

} // End of namespace Access
Expand Down
4 changes: 4 additions & 0 deletions engines/access/room.cpp
Expand Up @@ -84,6 +84,10 @@ void Room::doRoom() {
_vm->_screen->fadeIn();
}

// TODO: Game loop doesn't seem to have any delay. For now,
// introduce a slight delay here
_vm->_events->delay(50);

// Handle any events
_vm->_events->pollEvents();

Expand Down
2 changes: 2 additions & 0 deletions engines/access/screen.cpp
Expand Up @@ -64,6 +64,8 @@ void Screen::setPanel(int num) {
}

void Screen::updateScreen() {
g_system->copyRectToScreen((byte *)getPixels(), this->pitch, 0, 0,
this->w, this->h);
g_system->updateScreen();
}

Expand Down

0 comments on commit 9107cc1

Please sign in to comment.