[Scummvm-git-logs] scummvm branch-2-7 -> 8b216fbbf7a4090b346b98509b0fe8bd1a8662ae
sev-
noreply at scummvm.org
Thu Feb 2 20:07:35 UTC 2023
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:
8b216fbbf7 DIRECTOR: LINGO: Allow floats be as arguments in b_sound
Commit: 8b216fbbf7a4090b346b98509b0fe8bd1a8662ae
https://github.com/scummvm/scummvm/commit/8b216fbbf7a4090b346b98509b0fe8bd1a8662ae
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-02T21:07:25+01:00
Commit Message:
DIRECTOR: LINGO: Allow floats be as arguments in b_sound
Used in 'pepperon-win-fr', --start-movie=W4_ZC_3.DIR
sound(#fadeOut, 1, 1.5 * 60)
Changed paths:
engines/director/lingo/lingo-builtins.cpp
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 1cf038cd857..36e9ad20a46 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -2945,8 +2945,8 @@ void LB::b_sound(int nargs) {
soundManager->stopSound(firstArg.u.i);
} else if (verb.u.s->equalsIgnoreCase("fadeIn")) {
if (nargs > 2) {
- TYPECHECK(secondArg, INT);
- ticks = secondArg.u.i;
+ TYPECHECK2(secondArg, INT, FLOAT);
+ ticks = secondArg.asInt();
} else {
ticks = 15 * (60 / score->_currentFrameRate);
}
@@ -2957,14 +2957,14 @@ void LB::b_sound(int nargs) {
return;
} else if (verb.u.s->equalsIgnoreCase("fadeOut")) {
if (nargs > 2) {
- TYPECHECK(secondArg, INT);
- ticks = secondArg.u.i;
+ TYPECHECK2(secondArg, INT, FLOAT);
+ ticks = secondArg.asInt();
} else {
ticks = 15 * (60 / score->_currentFrameRate);
}
- TYPECHECK(firstArg, INT);
- soundManager->registerFade(firstArg.u.i, false, ticks);
+ TYPECHECK2(firstArg, INT, FLOAT);
+ soundManager->registerFade(firstArg.asInt(), false, ticks);
score->_activeFade = firstArg.u.i;
return;
} else if (verb.u.s->equalsIgnoreCase("playFile")) {
More information about the Scummvm-git-logs
mailing list