summaryrefslogtreecommitdiff
path: root/include/random.h
diff options
context:
space:
mode:
authorsceptillion <33798691+sceptillion@users.noreply.github.com>2017-12-17 13:22:46 -0800
committersceptillion <33798691+sceptillion@users.noreply.github.com>2017-12-17 13:22:46 -0800
commitb849ce93dbafac8e4961b531ab40585c0fdd103a (patch)
tree1cfd5cf3b7223a8e91dd0a0d4e6e112bd3458d8b /include/random.h
parent3ddda066d91cbbd377584acacaea62a9deba8873 (diff)
decompile main
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