summaryrefslogtreecommitdiff
path: root/include/random.h
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-26 16:19:44 -0500
committerProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-26 16:19:44 -0500
commitcf84c5406bf9b08950722d90ba4eba3bd8606080 (patch)
tree0140b0b3cb4b1b0b523cd39a71fd775d911c65d0 /include/random.h
parent2d70a16fa09eb545b0e236313be6daaa6d17964a (diff)
parent4e7e4cf467e6243994d19971d7cbee33c2f7bd25 (diff)
merge
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
+