diff options
author | Eugene Sandulenko | 2016-07-01 17:55:23 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 8a7411fb9751cbfe1c7b3e0c7ee6ccf57a4efdc1 (patch) | |
tree | 1b8c2c9469c9ee3ed8a15f77fdd7e4cc6b247150 /engines/director/lingo | |
parent | 2d08b875241739bb6b003e294af4bcb19ca21743 (diff) | |
download | scummvm-rg350-8a7411fb9751cbfe1c7b3e0c7ee6ccf57a4efdc1.tar.gz scummvm-rg350-8a7411fb9751cbfe1c7b3e0c7ee6ccf57a4efdc1.tar.bz2 scummvm-rg350-8a7411fb9751cbfe1c7b3e0c7ee6ccf57a4efdc1.zip |
DIRECTOR: Lingo: Complete Rand() function implementation
Diffstat (limited to 'engines/director/lingo')
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 2286bb7ed2..311e774e0d 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -43,10 +43,12 @@ void Lingo::b_random() { Datum max = g_lingo->pop(); Datum res; - res.u.i = 5; + if (max.type != INT) + warning("Non-int type for rand: %d", max.type); + + res.u.i = g_lingo->_vm->_rnd.getRandomNumber(max.u.i); res.type = INT; - warning("b_random"); g_lingo->push(res); } |