diff options
author | camthesaxman <cameronghall@cox.net> | 2017-12-05 12:27:33 -0600 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2017-12-05 12:27:33 -0600 |
commit | 00896cb3b5813cb843e5e1abd4cbc9ff0ad3a632 (patch) | |
tree | f4158fb4252bb1216e1de45f285cf2c1fdadb377 /src/rng.c | |
parent | fd75493bc6f4a3c91158d8158edbb4cf964d08bc (diff) |
rename rng.c to random.c and rom4.c to overworld.c
Diffstat (limited to 'src/rng.c')
-rw-r--r-- | src/rng.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/rng.c b/src/rng.c deleted file mode 100644 index ddd149018..000000000 --- a/src/rng.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "global.h" -#include "rng.h" - -// The number 1103515245 comes from the example implementation of rand and srand -// in the ISO C standard. - -EWRAM_DATA static u8 sUnknown = 0; -EWRAM_DATA static u32 sRandCount = 0; - -u16 Random(void) -{ - gRngValue = 1103515245 * gRngValue + 24691; - sRandCount++; - return gRngValue >> 16; -} - -void SeedRng(u16 seed) -{ - gRngValue = seed; - sUnknown = 0; -} - -void SeedRng2(u16 seed) -{ - gRng2Value = seed; -} - -u16 Random2(void) -{ - gRng2Value = 1103515245 * gRng2Value + 24691; - return gRng2Value >> 16; -} |