summaryrefslogtreecommitdiff
path: root/include/random.h
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2017-12-05 12:42:30 -0600
committercamthesaxman <cameronghall@cox.net>2017-12-05 12:42:30 -0600
commit19fbf024ff7e5bedc0f297a44c7df298a9bd0ef4 (patch)
treee9a928ac0d8eaaca476d8704b95fbf5f6838d994 /include/random.h
parentcaa13f877797edbb7a1e13bf00b537bafbd4315a (diff)
parent00896cb3b5813cb843e5e1abd4cbc9ff0ad3a632 (diff)
fix merge conflicts
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