diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-10-28 15:58:07 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-10-28 15:58:07 -0400 |
commit | f57776c74cded4b10f974828c991c095faaa6d67 (patch) | |
tree | 4fd7258b93a61faf42febe5ca70e750d88d982d8 /src/math_util.c | |
parent | 5ea2f463d71d0bc2663e70a553557de0ccf40eef (diff) |
through sub_8151574
Diffstat (limited to 'src/math_util.c')
-rw-r--r-- | src/math_util.c | 43 |
1 files changed, 43 insertions, 0 deletions
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; +} |