[Scummvm-git-logs] scummvm master -> bbed50ff27a1d4c656a8876f277fe1d8dcfb5f3f

bluegr bluegr at gmail.com
Tue Jun 18 07:28:42 CEST 2019


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:
bbed50ff27 SLUDGE: implement `random` built-in


Commit: bbed50ff27a1d4c656a8876f277fe1d8dcfb5f3f
    https://github.com/scummvm/scummvm/commit/bbed50ff27a1d4c656a8876f277fe1d8dcfb5f3f
Author: Sebastian Krzyszkowiak (dos at dosowisko.net)
Date: 2019-06-18T08:28:38+03:00

Commit Message:
SLUDGE: implement `random` built-in

Changed paths:
    engines/sludge/builtin.cpp


diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index 1030643..185ff1a 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;
 }
 





More information about the Scummvm-git-logs mailing list