match m409dll, implement some cosd/sind

This commit is contained in:
CreateSource 2024-07-27 12:48:18 -04:00
parent 13012f05ca
commit 9dfae92fe2
14 changed files with 1501 additions and 203 deletions

View file

@ -2,6 +2,7 @@
#include "rel_sqrt_consts.h"
#include "math.h"
#include "ext_math.h"
#include "game/hsfman.h"
#include "game/objsub.h"
#include "game/audio.h"
@ -154,15 +155,15 @@ s8 fn_1_524(void) {
if (var_f30 > 1.0f) {
var_f30 = 1.0f;
}
temp_f31 = cos((M_PI * (-45.0f + (135.0f * var_f30))) / 180.0);
temp_f31 = cosd(-45.0f + (135.0f * var_f30));
Hu3DTexScrollPosSet(lbl_1_bss_24.unk12, lbl_1_bss_24.unk14, 0.0f, 0.0f);
lbl_1_bss_24.unk14 -= 0.01f * temp_f31;
Hu3DTexScrollPosMoveSet(lbl_1_bss_24.unkC, -0.0001f - (0.005f * temp_f31), 0.0f, 0.0f);
Hu3DTexScrollPosMoveSet(lbl_1_bss_24.unkE, -0.0002f - (0.005f * temp_f31), 0.0f, 0.0f);
Hu3DTexScrollPosMoveSet(lbl_1_bss_24.unk10, -0.0003f - (0.005f * temp_f31), 0.0f, 0.0f);
sp8.x = -(sin((M_PI * CRot.y) / 180.0) * cos((M_PI * CRot.x) / 180.0));
sp8.x = -(sin((M_PI * CRot.y) / 180.0) * cosd(CRot.x));
sp8.y = sin((M_PI * CRot.x) / 180.0);
sp8.z = -(cos((M_PI * CRot.y) / 180.0) * cos((M_PI * CRot.x) / 180.0));
sp8.z = -(cosd(CRot.y) * cosd(CRot.x));
HuAudFXListnerUpdate(&Hu3DCamera->pos, &sp8);
return var_r30;
}
@ -916,7 +917,7 @@ void fn_1_44F0(s16 arg0, f32 arg8, f32 arg9, f32 argA, s8 arg1, s16 arg2) {
temp_f31 = (((rand8() << 8) | rand8()) % 361);
var_r31->unk0.x = (2.0 + (3.0 * sin((M_PI * temp_f31) / 180.0)));
var_r31->unk0.y = (0.1f * ((((rand8() << 8) | rand8()) % 31) + 40));
var_r31->unk0.z = (3.5 * cos((M_PI * temp_f31) / 180.0));
var_r31->unk0.z = (3.5 * cosd(temp_f31));
var_r31->unk28 = 0;
var_r31->unk2A = ((((rand8() << 8) | rand8()) % 3) + 2);
var_r31->unk18 = (f32)spA.r;
@ -973,7 +974,7 @@ void fn_1_4FFC(s16 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4) {
temp_r31->unk4C = -1;
temp_f31 = ((((rand8() << 8) | rand8()) % 81) - 40);
temp_r31->unk0.x = (13.0 * cos((M_PI * temp_f31) / 180.0));
temp_r31->unk0.x = (13.0 * cosd(temp_f31));
temp_r31->unk0.y = 0.1f * ((((rand8() << 8) | rand8()) % 21) + 20);
temp_r31->unk0.z = (9.0 * sin((M_PI * temp_f31) / 180.0));
temp_r31->unkC.x = (0.05f * temp_r31->unk0.x);