sin_abs_4096 -> sin_4096

This commit is contained in:
Kermalis
2024-11-06 12:54:01 -05:00
parent 5623e4e028
commit e6f00864bd
9 changed files with 11 additions and 11 deletions

View File

@@ -1297,7 +1297,7 @@ _080467BE:
adds r0, r7
str r0, [r2, 0x4]
ldr r0, [sp, 0x10]
bl sin_abs_4096
bl sin_4096
lsls r1, r0, 1
adds r1, r0
lsls r1, 2
@@ -1809,7 +1809,7 @@ _08046BAA:
adds r0, r4, 0
bl IncreaseEntityPixelPos
mov r0, r10
bl sin_abs_4096
bl sin_4096
add r2, sp, 0x20
adds r2, r5
lsls r1, r0, 1

View File

@@ -755,7 +755,7 @@ _08047726:
adds r0, 0xFF
_08047732:
asrs r0, 8
bl sin_abs_4096
bl sin_4096
ldr r2, [sp, 0x30]
adds r1, r0, 0
muls r1, r2

View File

@@ -485,7 +485,7 @@ _0807D8B0:
adds r0, r4, 0
bl IncreaseEntityPixelPos
mov r0, r10
bl sin_abs_4096
bl sin_4096
add r2, sp, 0x20
adds r2, r5
lsls r1, r0, 1

View File

@@ -2173,7 +2173,7 @@ _0807F794:
cmp r0, 0
beq _0807F7E6
ldr r0, [sp, 0x100]
bl sin_abs_4096
bl sin_4096
lsls r0, 5
mov r3, r8
str r0, [r3, 0x1C]

View File

@@ -22,7 +22,7 @@ typedef u32 u24_8;
* This function computes the cosine of of `x` using a lookup table. The period of
* the function is `4096`, and the range is `[-256, 256]`.
*
* @note Mathematically, `cos(abs(t)) = cos(t)`, unlike the case in `sin_abs_4096()` above.
* @note Mathematically, `cos(abs(t)) = cos(t)`, unlike the case in `sin_4096()` above.
*
* @param[in] x The value to get the cosine of.
*
@@ -38,7 +38,7 @@ s32 cos_4096(s32 x);
*
* @return `floor(256 * sin(pi * abs(x) / 2048))` as a signed 32-bit integer.
*/
s32 sin_abs_4096(s32 x);
s32 sin_4096(s32 x);
/**
* This function multiplies two signed 24.8 fixed-point numbers.

View File

@@ -536,7 +536,7 @@ void sub_8005838(s32 *a0, u8 kind)
k = iVar11;
j = iVar11;
for (sp10 = 0; sp10 < 0x400; sp10 += spC) {
s32 tmp1 = sin_abs_4096(sp10) * val3 / 256;
s32 tmp1 = sin_4096(sp10) * val3 / 256;
sp14 = (val2 + tmp1) / 256;
r8 = (val2 - tmp1) / 256;

View File

@@ -200,7 +200,7 @@ void sub_807D068(Entity *pokemon, Position *pos)
pixelY += incrementY;
local_34.x = pixelX;
local_34.y = pixelY;
pokemon->unk1C = sin_abs_4096(iVar8) * 0xc;
pokemon->unk1C = sin_4096(iVar8) * 0xc;
sub_804535C(pokemon, &local_34);
if (sub_8045888(pokemon)) {
sub_803E46C(0x1a);

View File

@@ -2642,7 +2642,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32
s32 r2;
if (a3 != 0) {
r3 = sin_abs_4096(r9 / 256) * var_3C;
r3 = sin_4096(r9 / 256) * var_3C;
}
else {
r3 = 0;

View File

@@ -28,7 +28,7 @@ UNUSED u32 fast_mod_3(s32 x)
return x % 3;
}
s32 sin_abs_4096(s32 x)
s32 sin_4096(s32 x)
{
switch (x & 0xc00) {
case 0x000: