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