aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/events.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-03-16 08:07:24 -0400
committerPaul Gilbert2015-03-16 08:07:24 -0400
commitb762bebf27ce7c231dd17fc05bc32f72911e6ed5 (patch)
tree7152067e080d1257a65c0750a6d923ad7f05f82b /engines/sherlock/events.cpp
parent02657f5a91bba15c7d494f71d0c975ece7178861 (diff)
downloadscummvm-rg350-b762bebf27ce7c231dd17fc05bc32f72911e6ed5.tar.gz
scummvm-rg350-b762bebf27ce7c231dd17fc05bc32f72911e6ed5.tar.bz2
scummvm-rg350-b762bebf27ce7c231dd17fc05bc32f72911e6ed5.zip
SHERLOCK: Implement sprite palette loading and fade out
Diffstat (limited to 'engines/sherlock/events.cpp')
-rw-r--r--engines/sherlock/events.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index fdcf61e46f..4a51c4a5fb 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -116,6 +116,15 @@ void EventsManager::pollEvents() {
}
/**
+ * Poll for events and introduce a small delay, to allow the system to
+ * yield to other running programs
+ */
+void EventsManager::pollEventsAndWait() {
+ pollEvents();
+ g_system->delayMillis(10);
+}
+
+/**
* Check whether it's time to display the next screen frame
*/
bool EventsManager::checkForNextFrameCounter() {
@@ -149,7 +158,7 @@ void EventsManager::clearEvents() {
}
/**
- * Delay for a given number of frames/cycles
+ * Delay for a given number of cycles, where each cycle is 1/60th of a second
*/
void EventsManager::delay(int cycles) {
uint32 totalMilli = cycles * 1000 / GAME_FRAME_RATE;