summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsceptillion <33798691+sceptillion@users.noreply.github.com>2017-12-11 00:56:09 -0800
committersceptillion <33798691+sceptillion@users.noreply.github.com>2017-12-11 00:56:09 -0800
commit66219cd4afaa5bca25fa722b9194b5c55341a0f6 (patch)
treeddee139e313dedfe675c8f86126f177192981eaa /src
parentfdf832bec16cbdcb07afc4a62bb74314202fadf6 (diff)
create random.h
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
-rw-r--r--src/random.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 212822e..a74a9b6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "random.h"
extern char ewram_start[];
@@ -26,7 +27,6 @@ extern char unk_code[];
extern void sub_800CDA8(int);
extern void sub_800B540(void);
extern void sub_800CF0C(void);
-extern void SeedRng(u8 *);
extern void sub_8004D78(void);
extern void nullsub_9(void);
extern void nullsub_6(void);
diff --git a/src/random.c b/src/random.c
index 5db7394..cfc976c 100644
--- a/src/random.c
+++ b/src/random.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "random.h"
extern s32 gRngState;
@@ -26,6 +27,7 @@ s32 RandomCapped(s32 cap)
return (((Random() & 0xFFFF) * cap) >> 16) & 0xFFFF;
}
+// Returns a random number between a and b.
s32 RandomRange(s32 a, s32 b)
{
if (a == b)