From f57776c74cded4b10f974828c991c095faaa6d67 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 28 Oct 2017 15:58:07 -0400 Subject: through sub_8151574 --- src/math_util.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/math_util.c (limited to 'src') diff --git a/src/math_util.c b/src/math_util.c new file mode 100644 index 000000000..f249d0a51 --- /dev/null +++ b/src/math_util.c @@ -0,0 +1,43 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +// Static ROM declarations + +// .rodata + +// .text + +s16 sub_8151534(s16 x, s16 y) +{ + s32 result; + + result = x; + result *= y; + result /= 256; + return result; +} + +s16 sub_8151550(u8 s, s16 x, s16 y) +{ + s32 result; + + result = x; + result *= y; + result /= (1 << s); + return result; +} + +s32 sub_8151574(s32 x, s32 y) +{ + s64 result; + + result = x; + result *= y; + result /= 256; + return result; +} -- cgit v1.2.3