summaryrefslogtreecommitdiff
path: root/include/rng.h
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2017-02-02 16:30:08 -0800
committerYamaArashi <shadow962@live.com>2017-02-02 16:30:30 -0800
commit8f9ed6e585a361e957650b871fc56a0406c2dac8 (patch)
treefc4796bcad3363136dc7130e8c5ee814104a29d7 /include/rng.h
parent39299306e059d82516247aeacd04b680509eef8c (diff)
decompile rng
Diffstat (limited to 'include/rng.h')
-rw-r--r--include/rng.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/rng.h b/include/rng.h
new file mode 100644
index 000000000..ae98e575f
--- /dev/null
+++ b/include/rng.h
@@ -0,0 +1,18 @@
+#ifndef GUARD_RNG_H
+#define GUARD_RNG_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_RNG_H