Re: [AD] Pending patches request |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 2003-05-27 at 08:48, Eric Botcazou wrote:
> > Maybe it's time to add the "al_rand(int min, int max)" function to
> > Allegro?
>
> As a wrapper around rand()?
>
Seeing how apparently this is a problem even in the simple test program,
it would be a worthwhile addition. How can we expect Allegro users to
know about rand() not working properly under MacOSX?
But ideally, i'd like this function to return the same sequence of
numbers across different platforms. So e.g. I could give the seed to
someone, and if my program is run with it in DOS, Linux, OSX - it always
would produce the same numbers, like for a random level.
I'm sure there's someone who knows about an algorithm which could be
used, maybe a simple one like the one posted by Paul Pridham already
would do..
--
Elias Pschernig <elias@xxxxxxxxxx>