From b762bebf27ce7c231dd17fc05bc32f72911e6ed5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 16 Mar 2015 08:07:24 -0400 Subject: SHERLOCK: Implement sprite palette loading and fade out --- engines/sherlock/events.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/sherlock/events.cpp') 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 @@ -115,6 +115,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 */ @@ -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; -- cgit v1.2.3