mirror of
https://github.com/pret/pokediamond.git
synced 2026-04-25 07:26:54 -05:00
14 lines
257 B
C
14 lines
257 B
C
#include "code32.h"
|
|
#include "stdlib.h"
|
|
|
|
static unsigned long int random_next = 1;
|
|
|
|
int rand(void) {
|
|
random_next = random_next * 1103515245 + 12345;
|
|
return ((random_next >> 16) & 0x7fff);
|
|
}
|
|
|
|
void srand(unsigned int seed) {
|
|
random_next = seed;
|
|
}
|