delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/01/17:41:54

From: "Tom Morton" <tmorton AT yikesstation DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Saving random seed, and Allegro
Date: Wed, 1 Sep 1999 11:40:16 +0100
Organization: Yikes Station Ltd.
Lines: 46
Message-ID: <7qivbf$pts$2@news6.svr.pol.co.uk>
References: <7qhljj$245$3 AT news6 DOT svr DOT pol DOT co DOT uk> <37CC9150 DOT 2BFD0245 AT hmc DOT edu> <7qibto$oqr$1 AT solomon DOT cs DOT rose-hulman DOT edu>
NNTP-Posting-Host: modem-2.lutetium.dialup.pol.co.uk
X-Trace: news6.svr.pol.co.uk 936181935 26556 62.136.35.2 (1 Sep 1999 10:32:15 GMT)
NNTP-Posting-Date: 1 Sep 1999 10:32:15 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick <die DOT spammers AT pineight DOT 8m DOT com> wrote in message
news:7qibto$oqr$1 AT solomon DOT cs DOT rose-hulman DOT edu...
>
> Nate Eldredge <neldredge AT hmc DOT edu> wrote in message
> news:37CC9150 DOT 2BFD0245 AT hmc DOT edu...
> > Tom Morton wrote:
> > >
> > > Hello fellow human beings,
> > >
> > > I'm writing a game with allegro and djgpp and it requires a random
> > > number generator that can have it's seed saved and changed. Until
> > > now I have been using the rand() and srand() functions but I need
> > > to be able to store the state of the random number generator.
>
> Easy. Use this pseudorandom number function (adapted
> from the ANSI standard for C rand() ) and two accessors:
>
> /**** cut ****/

<SNIP>

Thanks! That was a quick response. Any chance of this kind of thing
becoming standard in allegro. It seems very relevent to what is
essentially a game library.

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

BTW i think I have found an odd allegro bug:

Using the rotate_sprite() function works fine when compiled on my Intel Celeron
system and run on either of my systems.
However, when compiled on my other system (AMD K6, S3 graphics card) the
sprite seems to be inverted. This happens even when the K6-compiled
program is run on the celeron. Very strange. The machines both share
the same version of djgpp (v2.81) and allegro (v3.11). The resolution
is 640x480 at 16bpp. Any ideas what's going on?


--
Yikes Station: Frontier Elite 2 Website
http://www.yikesstation.freeserve.co.uk/frontier/yikes.htm

Tom 'Moretom' Morton


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019