mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-06 02:58:21 -04:00
12 lines
187 B
C
12 lines
187 B
C
#include "MSL_C/rand.h"
|
|
|
|
static u32 next = 1;
|
|
|
|
void srand(u32 seed){
|
|
next = seed;
|
|
}
|
|
|
|
int rand(){
|
|
next = next * 1103515245 + 12345;
|
|
return ((next >> 16) & 0x7fff);
|
|
} |