[ scummvm-Patches-902111 ] Change remaining random function calls to use RandomSource

SourceForge.net noreply at sourceforge.net
Sun Feb 22 13:49:17 CET 2004


Patches item #902111, was opened at 2004-02-22 12:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=902111&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Damien Guard (damienguard)
Assigned to: Nobody/Anonymous (nobody)
Summary: Change remaining random function calls to use RandomSource

Initial Comment:
As per the TODO I have replaced the two calls that use
random numbers that do not currently use RandomSource
with calls to RandomSource.

This is in the ADLIB and FMOPL code.  As neither of
these modules have any reference to the main vm
instance of RandomSource I have given them each their
own static instance of it.  Given the compact nature of
RandomSource this should fine.

The white noise code gen in fmopl that used the rand()
function specified no upper value so would be up to
RAND_MAX which is at least 32767.  Given that it is
going into an unsigned int, I made it 32767.  

I have tested a few games in adlib mode, seems to work
fine although I'm not sure how to fully regression test
this.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=902111&group_id=37116




More information about the Scummvm-tracker mailing list