summaryrefslogtreecommitdiff
path: root/include/random.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-02-11 20:12:40 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-02-11 20:12:40 -0500
commit590c4b500b9dd37d372a935865aa4df0ab0bf43c (patch)
tree5572d76c91e106e74e1401076f130fb902f6b67b /include/random.h
parentbc063b45d05716d1eab283f6d474bcdc601cafde (diff)
parent14a76793e596d612efd273169c4172922c270f13 (diff)
Merge branch 'master' into record_mixing
Diffstat (limited to 'include/random.h')
-rw-r--r--include/random.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/random.h b/include/random.h
new file mode 100644
index 000000000..79a9d71dc
--- /dev/null
+++ b/include/random.h
@@ -0,0 +1,18 @@
+#ifndef GUARD_RANDOM_H
+#define GUARD_RANDOM_H
+
+extern u32 gRngValue;
+extern u32 gRng2Value;
+
+//Returns a 16-bit pseudorandom number
+u16 Random(void);
+u16 Random2(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);
+void SeedRng2(u16 seed);
+
+#endif // GUARD_RANDOM_H