[Scummvm-git-logs] scummvm master -> 00e6cf04119e7a30f031865901c7311d3a0ec6c0
rvanlaar
noreply at scummvm.org
Sun Mar 6 20:52:15 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
00e6cf0411 DIRECTOR: Improve framerate loading D2 and D3
Commit: 00e6cf04119e7a30f031865901c7311d3a0ec6c0
https://github.com/scummvm/scummvm/commit/00e6cf04119e7a30f031865901c7311d3a0ec6c0
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-03-06T21:51:56+01:00
Commit Message:
DIRECTOR: Improve framerate loading D2 and D3
D2 and D3 have 16 distinct framerates, 0x0 to 0xF.
Framerates are integer values. They are rounded down towards their
nearest integer.
The following table is included for completeness.
The information was gathered by creating a D3 movie with an `on stepMovie` handler that counts every frame.
The setting is the setting on the slider in the D3 panel.
It was timed with clicking 'play' in D3 and start on a stopwatch at the
same time. The same for stopping the movie and the stopwatch.
FPS was calculated by dividing the amount of frames given by Director
and the time on the stopwatch.
setting time frames fps
3 60.18 226 3.755
4 30.04 121 4.028
4.1 30.09 131 4.354
4.2 30.29 141 4.65
5 30.38 153 5.036
5.1 30.09 165 5.483
6 30.20 182 6.026
6.1 30.06 201 6.687
7 30.04 228 7.590
8 30.24 260 8.598
10 30.15 302 10.017
12 30.16 364 12.069
15 30.17 454 15.048
20 30.10 602 20.0
30 30.05 904 30.08
60 30.07 1811 60.226
Changed paths:
engines/director/cast.cpp
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 324f77d4aac..f81802abadf 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -224,7 +224,9 @@ bool Cast::loadConfig() {
_castArrayEnd = stream->readUint16();
// v3 and below use this, override for v4 and over
- byte currentFrameRate = stream->readByte();
+ // actual framerates are, on average: { 3.75, 4, 4.35, 4.65, 5, 5.5, 6, 6.6, 7.5, 8.5, 10, 12, 20, 30, 60 }
+ Common::Array<int> frameRates = { 3, 4, 4, 4, 5, 5, 6, 6, 7, 8, 10, 12, 15, 20, 30, 60 };
+ byte currentFrameRate = frameRates[stream->readByte()];
byte lightswitch = stream->readByte();
uint16 unk1 = stream->readUint16();
More information about the Scummvm-git-logs
mailing list