local.c

phantasmal_dgd_v1/src/host/win32/local.c · 290 B

From the archive phantasmal_dgd_v1.tar.gz

Download the archive   « Back to the archive contents

# include "dgd.h"

/*
 * NAME:	P->srandom()
 * DESCRIPTION:	set random seed
 */
void P_srandom(long seed)
{
    srand((unsigned int) seed);
}

/*
 * NAME:	P->random()
 * DESCRIPTION:	get random number
 */
long P_random(void)
{
    return (long) (rand() ^ (rand() << 9) ^ (rand() << 16));
}

Site Stats

Snippets: 1791
Codebases: 571