through sub_81515FC

This commit is contained in:
PikalaxALT
2017-10-28 16:09:31 -04:00
parent f57776c74c
commit 8613e8a54d
2 changed files with 31 additions and 84 deletions

View File

@@ -1,17 +1,5 @@
// Includes
#include "global.h"
// Static type declarations
// Static RAM declarations
// Static ROM declarations
// .rodata
// .text
s16 sub_8151534(s16 x, s16 y)
{
s32 result;
@@ -41,3 +29,34 @@ s32 sub_8151574(s32 x, s32 y)
result /= 256;
return result;
}
s16 sub_81515B0(s16 x, s16 y)
{
if (y == 0)
{
return 0;
}
return (x << 8) / y;
}
s16 sub_81515D4(u8 s, s16 x, s16 y)
{
if (y == 0)
{
return 0;
}
return (x << s) / y;
}
s32 sub_81515FC(s32 x, s32 y)
{
s64 _x;
if (y == 0)
{
return 0;
}
_x = x;
_x *= 256;
return _x / y;
}