aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-builtins.cpp
diff options
context:
space:
mode:
authorRoland van Laar2019-12-22 17:08:09 +0100
committerEugene Sandulenko2019-12-22 21:03:16 +0100
commitb5ff682fd28c6440a9a9d5c1e38e07cb00def73a (patch)
tree87a6afd3cd646a9b9f5babd69af18695df69bab7 /engines/director/lingo/lingo-builtins.cpp
parenta9e07c314fb05342c23ac2de21c20449f0709f1e (diff)
downloadscummvm-rg350-b5ff682fd28c6440a9a9d5c1e38e07cb00def73a.tar.gz
scummvm-rg350-b5ff682fd28c6440a9a9d5c1e38e07cb00def73a.tar.bz2
scummvm-rg350-b5ff682fd28c6440a9a9d5c1e38e07cb00def73a.zip
DIRECTOR: Fix calling of Beep
- Converts beep called with zero args to beep(1) - Beep arg starts counting at 1.
Diffstat (limited to 'engines/director/lingo/lingo-builtins.cpp')
-rw-r--r--engines/director/lingo/lingo-builtins.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index dc2f88fe24..d1056fe397 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -1542,8 +1542,12 @@ void Lingo::b_union(int nargs) {
// Sound
///////////////////
void Lingo::b_beep(int nargs) {
- Datum d = g_lingo->pop();
- g_lingo->func_beep(d.u.i);
+ int repeat = 1;
+ if (nargs == 1) {
+ Datum d = g_lingo->pop();
+ repeat = d.u.i;
+ }
+ g_lingo->func_beep(repeat);
}
void Lingo::b_mci(int nargs) {