aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2016-04-16 18:58:06 +0100
committerThierry Crozat2016-04-16 18:59:27 +0100
commit6dcaef191cfd421f7909da0b2432b64f7d4a6440 (patch)
treee82080d36c9158a327c89785da216e2f7d7456a1
parenteef83714322b98fbe02249478ad66b88fd4c1fe2 (diff)
downloadscummvm-rg350-6dcaef191cfd421f7909da0b2432b64f7d4a6440.tar.gz
scummvm-rg350-6dcaef191cfd421f7909da0b2432b64f7d4a6440.tar.bz2
scummvm-rg350-6dcaef191cfd421f7909da0b2432b64f7d4a6440.zip
DRASCULA: Fix animations speed
To time animations the original engine uses interrupt to get the Real Time Clock and divides the number of clock ticks by 0.182. Since there is approximately 18.2 ticks per second, this means it uses values in 1/100th of a second. In ScummVM we were using getMillis() / 20, so the animations was two times slower than in the original. This might fix bug #7115 Drascula: FPS are incorrect or some frames are dropped. Note that for the walk animation we are still not exactly using the timing of the original. The original engines keeps each walk frames for 5.7 times 1/100th of a second (i.e. 17.54 FPS). In ScummVM getTime returns an integer value and as a result each walk frame is now kept for 6 times 1/100th of a second (i.e. 16.67 FPS, which i better than the 8.33 FPS we were getting before this commit). as our getTime returns integer values and thus we use frames for 6 of 1/100th of a second while the original is slightly faster as it kept frames for 5.7 times 1/100th of a second.
-rw-r--r--engines/drascula/drascula.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index f20f0202bd..d7b1fd6acd 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -891,7 +891,7 @@ void DrasculaEngine::pause(int duration) {
}
int DrasculaEngine::getTime() {
- return _system->getMillis() / 20; // originally was 1
+ return _system->getMillis() / 10;
}
void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) {