From e501678f5d386753f7a24aba3295f2252dcf7eee Mon Sep 17 00:00:00 2001 From: Rainchus Date: Sun, 15 Sep 2024 11:32:49 -0500 Subject: [PATCH] match and link m420dll/rand.c --- configure.py | 2 +- src/REL/m420dll/rand.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/REL/m420dll/rand.c diff --git a/configure.py b/configure.py index b71c3445..68cdb5a6 100644 --- a/configure.py +++ b/configure.py @@ -955,7 +955,7 @@ config.libs = [ Object(NonMatching, "REL/m420dll/main.c"), Object(NonMatching, "REL/m420dll/player.c"), Object(NonMatching, "REL/m420dll/map.c"), - Object(NonMatching, "REL/m420dll/rand.c"), + Object(Matching, "REL/m420dll/rand.c"), }, ), Rel( diff --git a/src/REL/m420dll/rand.c b/src/REL/m420dll/rand.c new file mode 100644 index 00000000..883af017 --- /dev/null +++ b/src/REL/m420dll/rand.c @@ -0,0 +1,11 @@ +#include "dolphin/types.h" + +u32 lbl_1_bss_A48; + +void fn_1_8934 (u32 seed) { + lbl_1_bss_A48 = seed; +} + +s32 fn_1_8944(void) { + return (lbl_1_bss_A48 = (lbl_1_bss_A48 * 0x41C64E6D) + 0x3039) / 65536 & 0x7FFF; +} \ No newline at end of file