aboutsummaryrefslogtreecommitdiff
path: root/engines/made/scriptfuncs.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-03-14 14:58:19 +0000
committerFilippos Karapetis2009-03-14 14:58:19 +0000
commit498a355a74822974733ade011875e3446f655e96 (patch)
tree560d5049e688aab9709c6d80dc8d76220f92ef17 /engines/made/scriptfuncs.cpp
parent092f2a37e3e8ef1283ee04281727ed113061ff27 (diff)
downloadscummvm-rg350-498a355a74822974733ade011875e3446f655e96.tar.gz
scummvm-rg350-498a355a74822974733ade011875e3446f655e96.tar.bz2
scummvm-rg350-498a355a74822974733ade011875e3446f655e96.zip
Reduced CPU usage of the MADE engine by about 10% (by profiling the code)
- Added delays in places where the screen gets updated - Moved event polling inside sfPollEvent() (cause that's where events are polled), instead of after each opcode svn-id: r39392
Diffstat (limited to 'engines/made/scriptfuncs.cpp')
-rw-r--r--engines/made/scriptfuncs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index 77e180628f..5b6ff37905 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -203,11 +203,12 @@ int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) {
}
int16 ScriptFunctions::sfPollEvent(int16 argc, int16 *argv) {
-
- _vm->_system->updateScreen();
+ _vm->handleEvents();
+ _vm->_screen->updateScreenAndWait(10);
int16 eventNum = _vm->_eventNum;
_vm->_eventNum = 0;
+
return eventNum;
}