cleaning camera, kart_dma, menu, math_util (#436)

* cleaning camera.h

* cleaning math_utils.h and remove space

* cleaning kart_dma

* cleaning menu.h
This commit is contained in:
coco875
2023-09-23 06:00:30 +02:00
committed by GitHub
parent 3a4b8c5a34
commit 2f583fdb42
28 changed files with 287 additions and 325 deletions
+19 -19
View File
@@ -310,16 +310,16 @@ void func_8001CCEC(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *a
move_f32_towards(&D_80164A38[index], 20.0f, 0.1f);
move_f32_towards(&D_80164A48[index], 1.5f, 0.1f);
D_80164A78[index] += 0.1;
if (D_80164A78[index] >= 1)
if (D_80164A78[index] >= 1)
D_80164A78[index] = 1;
} else {
move_f32_towards(&D_80164A38[index], 0, 0.1f);
move_f32_towards(&D_80164A48[index], 0, 0.1f);
D_80164A78[index] -= 0.1;
if (D_800DDB30[gActiveScreenMode] >= D_80164A78[index])
if (D_800DDB30[gActiveScreenMode] >= D_80164A78[index])
D_80164A78[index] = D_800DDB30[gActiveScreenMode];
}
if ((player->unk_0CA & 0x100) == 0x100) {
switch(gActiveScreenMode) {
@@ -364,7 +364,7 @@ void func_8001CCEC(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *a
arg2[0] += (x - camera->lookAt[0]) * D_80164A78[index];
arg2[2] += ((z - camera->lookAt[2]) * D_80164A78[index]);
if ((((player->unk_094 / 18) * 216) <= 5.0f) && ((player->unk_0BC & 2) == 2)) {
arg2[1] += ((y - camera->lookAt[1]) * 0.02);
} else {
@@ -383,7 +383,7 @@ void func_8001CCEC(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *a
*arg3 = camera->pos[0] + ((x - camera->pos[0]) * D_80164A78[index]);
*arg5 = camera->pos[2] + ((z - camera->pos[2]) * D_80164A78[index]);
if ((((player->unk_094 / 18) * 216) <= 5.0f) && ((player->unk_0BC & 2) == 2)) {
*arg4 = camera->pos[1] + (((y - camera->pos[1]) * 0.01));
} else {
@@ -541,19 +541,19 @@ void func_8001D944(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *a
move_f32_towards(&D_80164A38[index], 20.0f, 0.1f);
move_f32_towards(&D_80164A48[index], 1.5f, 0.1f);
D_80164A78[index] += 0.1;
if (D_80164A78[index] >= 1)
if (D_80164A78[index] >= 1)
D_80164A78[index] = 1;
} else {
move_f32_towards(&D_80164A38[index], 0, 0.1f);
move_f32_towards(&D_80164A48[index], 0, 0.1f);
D_80164A78[index] -= 0.1;
if (D_800DDB30[gActiveScreenMode] >= D_80164A78[index])
if (D_800DDB30[gActiveScreenMode] >= D_80164A78[index])
D_80164A78[index] = D_800DDB30[gActiveScreenMode];
}
if ((player->unk_0CA & 0x100) == 0x100) {
move_f32_towards(&D_80164A90[index], 15, 0.02f);
move_f32_towards(&D_80164AA0[index], 20, 0.02f);
} else {
@@ -581,7 +581,7 @@ void func_8001D944(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *a
arg2[0] += (x - camera->lookAt[0]) * D_80164A78[index];
arg2[2] += ((z - camera->lookAt[2]) * D_80164A78[index]);
if ((((player->unk_094 / 18) * 216) <= 5.0f) && ((player->unk_0BC & 2) == 2)) {
arg2[1] += ((y - camera->lookAt[1]) * 0.02);
} else {
@@ -600,7 +600,7 @@ void func_8001D944(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *a
*arg3 = camera->pos[0] + ((x - camera->pos[0]) * D_80164A78[index]);
*arg5 = camera->pos[2] + ((z - camera->pos[2]) * D_80164A78[index]);
if ((((player->unk_094 / 18) * 216) <= 5.0f) && ((player->unk_0BC & 2) == 2)) {
*arg4 = camera->pos[1] + (((y - camera->pos[1]) * 0.01));
} else {
@@ -733,9 +733,9 @@ void func_8001E45C(Camera *camera, Player *player, s8 arg2) {
var_a3 = (player->unk_078 / 2) + 0xA5;
}
}
if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) ||
((player->unk_0BC & 0x4000) == 0x4000) || ((player->unk_0BC & 0x80000) == 0x80000) ||
((player->unk_0BC & 0x800000) == 0x800000) || (((player->unk_0BC & 0x20) == 0x20) && (player->unk_078 != 0)) ||
if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) ||
((player->unk_0BC & 0x4000) == 0x4000) || ((player->unk_0BC & 0x80000) == 0x80000) ||
((player->unk_0BC & 0x800000) == 0x800000) || (((player->unk_0BC & 0x20) == 0x20) && (player->unk_078 != 0)) ||
(player->unk_110.unk3C[0] <= 0.0f) || (player->unk_110.unk3C[1] <= 0.0f) || ((player->unk_0BC & 0x20000) == 0x20000)) {
func_8001CCEC(player, camera, sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2);
} else {
@@ -862,9 +862,9 @@ void func_8001EA0C(Camera *camera, Player *player, s8 arg2) {
var_a3 = (player->unk_078 / 2) + 0xA5;
}
}
if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) ||
((player->unk_0BC & 0x4000) == 0x4000) || ((player->unk_0BC & 0x80000) == 0x80000) ||
((player->unk_0BC & 0x800000) == 0x800000) || (((player->unk_0BC & 0x20) == 0x20) && (player->unk_078 != 0)) ||
if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) ||
((player->unk_0BC & 0x4000) == 0x4000) || ((player->unk_0BC & 0x80000) == 0x80000) ||
((player->unk_0BC & 0x800000) == 0x800000) || (((player->unk_0BC & 0x20) == 0x20) && (player->unk_078 != 0)) ||
(player->unk_110.unk3C[0] <= 0.0f) || (player->unk_110.unk3C[1] <= 0.0f) || ((player->unk_0BC & 0x20000) == 0x20000)) {
func_8001D944(player, camera, sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2);
} else {