From 6dcaef191cfd421f7909da0b2432b64f7d4a6440 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 16 Apr 2016 18:58:06 +0100 Subject: [PATCH] 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. --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index f20f0202bd6f..d7b1fd6acd37 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) {