summaryrefslogtreecommitdiff
path: root/include/random.h
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2017-11-26 02:24:41 -0600
committercamthesaxman <cameronghall@cox.net>2017-11-26 02:24:41 -0600
commit48c6d764e00285378d3f24d954855c6bde613bc0 (patch)
tree82f907925cb280cfeccfc0eeb66595e87cea6f5b /include/random.h
parent4e1098beb6a84a46f0ac2bff37013a3f675f6750 (diff)
parentd373f41c2cbd2dc71ca2287b179c7c8777b9eb02 (diff)
fix merge conflicts
Diffstat (limited to 'include/random.h')
-rw-r--r--include/random.h16
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
+