aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula
diff options
context:
space:
mode:
authorEugene Sandulenko2010-06-15 10:24:38 +0000
committerEugene Sandulenko2010-06-15 10:24:38 +0000
commit2e20a48f907c61352a1ae69573830dd346a1bc61 (patch)
treee5955ec867b9714389ae5a15af59d01c7a617a77 /engines/drascula
parent508256a71e3a194043f1c5e65699613ba2b441db (diff)
downloadscummvm-rg350-2e20a48f907c61352a1ae69573830dd346a1bc61.tar.gz
scummvm-rg350-2e20a48f907c61352a1ae69573830dd346a1bc61.tar.bz2
scummvm-rg350-2e20a48f907c61352a1ae69573830dd346a1bc61.zip
Drascula: improve responsivity during pauses and palette updates.
svn-id: r49722
Diffstat (limited to 'engines/drascula')
-rw-r--r--engines/drascula/drascula.cpp10
-rw-r--r--engines/drascula/palette.cpp4
2 files changed, 12 insertions, 2 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index d8aeee3c97..7e9f68a355 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -779,11 +779,17 @@ void DrasculaEngine::updateEvents() {
}
void DrasculaEngine::delay(int ms) {
- _system->delayMillis(ms * 2); // originally was 1
+ uint32 end = _system->getMillis() + ms * 2; // originally was 1
+
+ do {
+ _system->delayMillis(10);
+ updateEvents();
+ _system->updateScreen();
+ } while (_system->getMillis() < end);
}
void DrasculaEngine::pause(int duration) {
- _system->delayMillis(duration * 30); // was originally 2
+ delay(duration * 15);
}
int DrasculaEngine::getTime() {
diff --git a/engines/drascula/palette.cpp b/engines/drascula/palette.cpp
index 1e51deffd9..0f75bb7959 100644
--- a/engines/drascula/palette.cpp
+++ b/engines/drascula/palette.cpp
@@ -106,6 +106,8 @@ void DrasculaEngine::fadeToBlack(int fadeSpeed) {
pause(fadeSpeed);
setPalette((byte *)&palFade);
+
+ updateEvents();
}
}
@@ -124,6 +126,8 @@ void DrasculaEngine::fadeFromBlack(int fadeSpeed) {
pause(fadeSpeed);
setPalette((byte *)&palFade);
+
+ updateEvents();
}
}