Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

src/rand.c File Reference


Detailed Description

Random number generator.

Definition in file rand.c.

#include "crogue.h"

Go to the source code of this file.

Functions

uchar xrandom (uint range)
uchar rrandom (range r)
sint nrandom (sint max, sint min)
void lsrand (unsigned long s)
unsigned long lrand (void)
void feed_entropy (unsigned long entropy)

Variables

unsigned long seed


Function Documentation

void feed_entropy unsigned long  entropy  ) 
 

Definition at line 68 of file rand.c.

References lrand(), and seed.

Referenced by read_char().

unsigned long lrand void   ) 
 

Definition at line 57 of file rand.c.

References seed.

Referenced by calculate_hit(), deref_jump_table(), feed_entropy(), nrandom(), place_shop(), random_plus(), rrandom(), and timepass().

void lsrand unsigned long  s  ) 
 

Definition at line 50 of file rand.c.

References seed.

Referenced by initialize().

sint nrandom sint  max,
sint  min
 

Definition at line 40 of file rand.c.

References lrand(), and sint.

Referenced by bigmap_place_corridor(), bigmap_postpass(), cb_cave_partial(), place_items(), plr_attack(), rand_feature(), randitem(), throw_item(), and xrandom().

uchar rrandom range  r  ) 
 

Definition at line 34 of file rand.c.

References lrand(), range::max, range::min, and uchar.

Referenced by monst_attack_monst(), monst_attack_plr(), and place_items().

uchar xrandom uint  range  ) 
 

Definition at line 28 of file rand.c.

References nrandom(), and uchar.


Variable Documentation

unsigned long seed [static]
 

Definition at line 46 of file rand.c.

Referenced by feed_entropy(), lrand(), and lsrand().


Generated on Thu May 20 13:12:13 2004 for CalcRogue by doxygen 1.3.6