[Scummvm-git-logs] scummvm master -> 9142f4454fe57126efff46f51b26e0f42f8fe007

rvanlaar noreply at scummvm.org
Wed Mar 9 17:05:25 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:
9142f4454f DIRECTOR: LINGO: Fix else statement


Commit: 9142f4454fe57126efff46f51b26e0f42f8fe007
    https://github.com/scummvm/scummvm/commit/9142f4454fe57126efff46f51b26e0f42f8fe007
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-03-09T18:04:24+01:00

Commit Message:
DIRECTOR: LINGO: Fix else statement

An else statement was missing to the if. All proper framerates < 16 were
generating warnings in buildbot.

Changed paths:
    engines/director/cast.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 9e4d84803f9..2b1ff675166 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -228,23 +228,25 @@ bool Cast::loadConfig() {
 	Common::Array<int> frameRates = { 3, 4, 4, 4, 5, 5, 6, 6, 7, 8, 10, 12, 15, 20, 30, 60 };
 	byte readRate = stream->readByte();
 	byte currentFrameRate;
-	if (readRate <= 0xF)
+	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;
+	} else {
+		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();




More information about the Scummvm-git-logs mailing list