Skip to content

Commit

Permalink
DRASCULA: Fix animations speed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
criezy committed Apr 16, 2016
1 parent eef8371 commit 6dcaef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/drascula/drascula.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 6dcaef1

Please sign in to comment.