diff options
author | Filippos Karapetis | 2009-03-14 14:58:19 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-03-14 14:58:19 +0000 |
commit | 498a355a74822974733ade011875e3446f655e96 (patch) | |
tree | 560d5049e688aab9709c6d80dc8d76220f92ef17 /engines/made/screen.cpp | |
parent | 092f2a37e3e8ef1283ee04281727ed113061ff27 (diff) | |
download | scummvm-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/screen.cpp')
-rw-r--r-- | engines/made/screen.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 79d43dad61..6fb7804753 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -358,9 +358,7 @@ void Screen::updateSprites() { drawSpriteChannels(_workScreenDrawCtx, 1, 2); _vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); - - _vm->_system->updateScreen(); - + _vm->_screen->updateScreenAndWait(10); } void Screen::clearChannels() { @@ -626,14 +624,13 @@ void Screen::show() { _fx->run(_visualEffectNum, _workScreen, _palette, _newPalette, _paletteColorCount); _visualEffectNum = 0; - _vm->_system->updateScreen(); - if (!_paletteInitialized) { memcpy(_newPalette, _palette, _paletteColorCount * 3); _oldPaletteColorCount = _paletteColorCount; _paletteInitialized = true; } + updateScreenAndWait(10); } void Screen::flash(int flashCount) { |