diff options
author | Sebastian Krzyszkowiak | 2019-06-18 01:43:11 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-06-18 08:28:38 +0300 |
commit | bbed50ff27a1d4c656a8876f277fe1d8dcfb5f3f (patch) | |
tree | e6969b7b09e50554658e08be4c2eb0bcfd853c3c /engines | |
parent | d9c84440f2ec79eca44a8b16a9788b1ead32a79a (diff) | |
download | scummvm-rg350-bbed50ff27a1d4c656a8876f277fe1d8dcfb5f3f.tar.gz scummvm-rg350-bbed50ff27a1d4c656a8876f277fe1d8dcfb5f3f.tar.bz2 scummvm-rg350-bbed50ff27a1d4c656a8876f277fe1d8dcfb5f3f.zip |
SLUDGE: implement `random` built-in
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sludge/builtin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp index 1030643788..185ff1a23c 100644 --- a/engines/sludge/builtin.cpp +++ b/engines/sludge/builtin.cpp @@ -698,7 +698,7 @@ builtIn(random) { trimStack(fun->stack); if (num <= 0) num = 1; - fun->reg.setVariable(SVT_INT, 0 /*rand() % num*/); //TODO:false value + fun->reg.setVariable(SVT_INT, g_sludge->getRandomSource()->getRandomNumber(num - 1)); return BR_CONTINUE; } |