[Scummvm-git-logs] scummvm master -> b5fcdb561bf5a3a72b4b3cdec3a54c31db7d8350
rvanlaar
noreply at scummvm.org
Wed Mar 9 16:36:07 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:
b5fcdb561b DIRECTOR: LINGO: improve framerate handling
Commit: b5fcdb561bf5a3a72b4b3cdec3a54c31db7d8350
https://github.com/scummvm/scummvm/commit/b5fcdb561bf5a3a72b4b3cdec3a54c31db7d8350
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-03-09T17:35:59+01:00
Commit Message:
DIRECTOR: LINGO: improve framerate handling
The framerate can be set to 1, 2 and 3 via the tempo channel.
These are the actual framerates, meaning 1 fps is 1 fps.
Changed paths:
engines/director/cast.cpp
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index f81802abadf..9e4d84803f9 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -226,7 +226,26 @@ bool Cast::loadConfig() {
// v3 and below use this, override for v4 and over
// 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 readRate = stream->readByte();
+ byte currentFrameRate;
+ if (readRate <= 0xF)
+ currentFrameRate = frameRates[readRate];
+ switch (readRate) {
+ // rate when set via the tempo channel
+ // these rates are the actual framerates
+ case 212:
+ currentFrameRate = 1;
+ break;
+ case 242:
+ currentFrameRate = 2;
+ break;
+ case 252:
+ currentFrameRate = 3;
+ break;
+ default:
+ warning("BUILDBOT: Cast::loadConfig: unhandled framerate: %i", readRate);
+ currentFrameRate = readRate;
+ }
byte lightswitch = stream->readByte();
uint16 unk1 = stream->readUint16();
More information about the Scummvm-git-logs
mailing list