diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-12-23 12:57:46 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-12-23 12:57:46 -0500 |
commit | fdd7e7cb848747a1e0ace8a63d29aaa22dfd1140 (patch) | |
tree | 6ddaed4de52bfcc517d573a8f30c5bd0a1650782 /include/random.h | |
parent | bb8f652504f886af296ffcaac57bf76cdc893c97 (diff) | |
parent | 1c1ce902515ccb3ccecde29611711c9b1a3ce955 (diff) |
Merge branch 'master' into cable_car
Diffstat (limited to 'include/random.h')
-rw-r--r-- | include/random.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/random.h b/include/random.h new file mode 100644 index 000000000..a928a97b5 --- /dev/null +++ b/include/random.h @@ -0,0 +1,16 @@ +#ifndef GUARD_RANDOM_H +#define GUARD_RANDOM_H + +extern u32 gRngValue; + +//Returns a 16-bit pseudorandom number +u16 Random(void); + +//Returns a 32-bit pseudorandom number +#define Random32() (Random() | (Random() << 16)) + +//Sets the initial seed value of the pseudorandom number generator +void SeedRng(u16 seed); + +#endif // GUARD_RANDOM_H + |