diff options
author | Torbjörn Andersson | 2006-04-18 00:20:07 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-04-18 00:20:07 +0000 |
commit | e22f1c64c51f35a2eef869f03c10e38fb3cf635e (patch) | |
tree | d0b6073ef5d546005831dd6a49116adad132a7eb /engines/sword1 | |
parent | b4c8b498debb05967547ce82ffc3680cca3fda57 (diff) | |
download | scummvm-rg350-e22f1c64c51f35a2eef869f03c10e38fb3cf635e.tar.gz scummvm-rg350-e22f1c64c51f35a2eef869f03c10e38fb3cf635e.tar.bz2 scummvm-rg350-e22f1c64c51f35a2eef869f03c10e38fb3cf635e.zip |
Call updateScreen() from delay functions for smoother mouse cursor movement.
svn-id: r21996
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/control.cpp | 5 | ||||
-rw-r--r-- | engines/sword1/credits.cpp | 6 | ||||
-rw-r--r-- | engines/sword1/sword1.cpp | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index aa6b216b35..c5cb0ec4cd 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -206,7 +206,6 @@ void Control::askForCd(void) { renderText(textA, 320, 220, TEXT_CENTER); renderText(_lStrings[STR_INSERT_CD_B], 320, 240, TEXT_CENTER); _system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480); - _system->updateScreen(); } delay(300); if (_keyPressed) { @@ -215,7 +214,6 @@ void Control::askForCd(void) { memset(_screenBuf, 0, 640 * 480); renderText(_lStrings[STR_INCORRECT_CD], 320, 230, TEXT_CENTER); _system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480); - _system->updateScreen(); delay(2000); refreshText = true; } else { @@ -314,7 +312,6 @@ uint8 Control::runPanel(void) { fullRefresh = false; _system->copyRectToScreen(_screenBuf, SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, 480); } - _system->updateScreen(); delay(1000 / 12); newMode = getClicks(mode, &retVal); } while ((newMode != BUTTON_DONE) && (retVal == 0) && (!SwordEngine::_systemVars.engineQuit)); @@ -629,7 +626,6 @@ bool Control::getConfirm(const uint8 *title) { do { buttons[0]->draw(); buttons[1]->draw(); - _system->updateScreen(); delay(1000 / 12); if (_keyPressed == 27) retVal = 2; @@ -1103,6 +1099,7 @@ void Control::delay(uint32 msecs) { _keyPressed = _keyRepeat; } + _system->updateScreen(); _system->delayMillis(10); } while (_system->getMillis() < endTime); } diff --git a/engines/sword1/credits.cpp b/engines/sword1/credits.cpp index e5bda89e10..7a3b6f077b 100644 --- a/engines/sword1/credits.cpp +++ b/engines/sword1/credits.cpp @@ -111,7 +111,6 @@ void CreditsPlayer::play(void) { memset(screenBuf, 0, CREDITS_X * BUFSIZE_Y); _system->copyRectToScreen(screenBuf, 640, 0, 0, 640, 480); _system->setPalette(_palette, 0, _palLen); - _system->updateScreen(); // everything's initialized, time to render and show the credits. Audio::SoundHandle bgSound; @@ -173,7 +172,6 @@ void CreditsPlayer::play(void) { uint8 *revoPal = credFile.fetchFile(REVO_PAL, &_palLen); _palLen /= 3; while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEUP_TIME) && !SwordEngine::_systemVars.engineQuit) { - _system->updateScreen(); delay(100); } memset(_palette, 0, 256 * 4); @@ -183,7 +181,6 @@ void CreditsPlayer::play(void) { fadePalette(revoPal, true, _palLen); while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEDOWN_TIME) && !SwordEngine::_systemVars.engineQuit) { - _system->updateScreen(); delay(100); } fadePalette(revoPal, false, _palLen); @@ -203,7 +200,6 @@ void CreditsPlayer::fadePalette(uint8 *srcPal, bool fadeup, uint16 len) { for (uint16 cnt = 0; cnt < len * 3; cnt++) _palette[(cnt / 3) * 4 + (cnt % 3)] = (srcPal[cnt] * fadeStep) / 12; _system->setPalette(_palette, 0, 256); - _system->updateScreen(); relDelay += 1000 / 12; delay(relDelay - _system->getMillis()); } @@ -288,6 +284,8 @@ void CreditsPlayer::delay(int msecs) { } } + _system->updateScreen(); + if (msecs > 0) _system->delayMillis(10); diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 6f11859a92..b88713eda1 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -618,6 +618,8 @@ void SwordEngine::delay(int32 amount) { //copied and mutilated from sky.cpp } } + _system->updateScreen(); + if (amount > 0) _system->delayMillis(10); |