From 820d38e548e6dd3db7d54b7618f74075db34ab98 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 3 Jul 2020 18:35:00 -0500 Subject: [PATCH] Named some rng functions, also fixed s64/u64 types. --- include/types.h | 20 ++++++++++---------- src/mips2/unknown_070110.c | 9 +++++++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/include/types.h b/include/types.h index 9cec5770..f3fbbfa0 100644 --- a/include/types.h +++ b/include/types.h @@ -1,16 +1,16 @@ #ifndef _TYPES_H_ #define _TYPES_H_ -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned int u32; -typedef unsigned long u64; -typedef signed char s8; -typedef signed short s16; -typedef signed int s32; -typedef signed long s64; -typedef float f32; -typedef double f64; +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +typedef signed char s8; +typedef signed short s16; +typedef signed int s32; +typedef signed long long s64; +typedef float f32; +typedef double f64; #ifndef NULL #define NULL 0 diff --git a/src/mips2/unknown_070110.c b/src/mips2/unknown_070110.c index 6fd1c852..148fd9b8 100644 --- a/src/mips2/unknown_070110.c +++ b/src/mips2/unknown_070110.c @@ -34,10 +34,15 @@ s32 get_rng_seed(void) { return D_800DD434; } +/* + * func_8006F94C(start, end) = Gets a random number within a range. + * Start is inclusive, end is exclusive; also changes the RNG seed. + * + * func_8006F94C(0, 5) will return a number from 0 to 4. + * func_8006F94C(20, 30) will return a number from 20 to 29. +*/ GLOBAL_ASM("asm/non_matchings/unknown_070110/func_8006F94C.s") - - GLOBAL_ASM("asm/non_matchings/unknown_070110/func_8006F9B8.s") GLOBAL_ASM("asm/non_matchings/unknown_070110/func_8006FB60.s") GLOBAL_ASM("asm/non_matchings/unknown_070110/func_8006FC30.s")