summaryrefslogtreecommitdiff
path: root/include/random.h
diff options
context:
space:
mode:
authorgolem galvanize <golemgalvanize@github.com>2018-01-09 16:48:01 -0500
committergolem galvanize <golemgalvanize@github.com>2018-01-09 16:48:01 -0500
commitc7722a492017dbd8a5fb3bb216062eb62129daf5 (patch)
tree2a5c0ba6a6b9364aa93eb4a9a89b35153954ab63 /include/random.h
parent2d141bc612ffecc984f6b4238c2791ba8419a192 (diff)
parent85174ad6193d3d58b92deaaedf8c510440ed85ee (diff)
fixing 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
+