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

aquadran noreply at scummvm.org
Wed Dec 1 21:57:15 UTC 2021


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:
c07779f57a ICB: User random from common


Commit: c07779f57abc02373293db9195bc78e56c651507
    https://github.com/scummvm/scummvm/commit/c07779f57abc02373293db9195bc78e56c651507
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-12-01T22:57:09+01:00

Commit Message:
ICB: User random from common

Changed paths:
    engines/icb/set_pc.cpp


diff --git a/engines/icb/set_pc.cpp b/engines/icb/set_pc.cpp
index 9e85b361f2..7292f7d283 100644
--- a/engines/icb/set_pc.cpp
+++ b/engines/icb/set_pc.cpp
@@ -25,9 +25,8 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_rand
-
 #include "common/memstream.h"
+#include "common/random.h"
 
 #include "image/jpeg.h"
 
@@ -48,7 +47,7 @@
 
 namespace ICB {
 
-#define RAND_16BIT (rand() + rand() + rand())
+#define RAND_16BIT (g_icb->getRandomSource()->getRandomNumber(32767) + g_icb->getRandomSource()->getRandomNumber(32767) + g_icb->getRandomSource()->getRandomNumber(32767))
 #define RAND_32BIT ((RAND_16BIT << 16) | (RAND_16BIT))
 #define RAND_BIT(bit) ((rands[(bit) >> 5]) & (1 << ((bit)&31)))
 




More information about the Scummvm-git-logs mailing list