mirror of
https://github.com/n64decomp/mk64
synced 2026-07-08 04:55:16 -04:00
Identify some stuff in the Camera struct (#238)
Make a header file for all the camera stuff, refresh a lot of mips_to_c output Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
+34
-42
@@ -2815,19 +2815,16 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002CD48.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800224F0(void *, ?, ?); // extern
|
||||
? func_8003680C(f32, void *, s16, s32, s32); // extern
|
||||
s32 func_802B5224(s32, f32 *, s32, s32); // extern
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
? func_8003680C(f32, Player *, s16, s16, s32); /* extern */
|
||||
|
||||
void func_8002D028(void *arg0, s8 arg1) {
|
||||
void func_8002D028(Player *player, s8 arg1) {
|
||||
f32 sp54;
|
||||
f32 sp50;
|
||||
f32 sp4C;
|
||||
s16 sp46;
|
||||
s32 sp34;
|
||||
s16 *sp2C;
|
||||
f32 *temp_a1;
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
f32 temp_f2;
|
||||
@@ -2835,59 +2832,54 @@ void func_8002D028(void *arg0, s8 arg1) {
|
||||
s16 temp_v0;
|
||||
s16 temp_v1;
|
||||
s16 temp_v1_2;
|
||||
s32 temp_a3;
|
||||
s16 var_a2;
|
||||
s32 temp_f18;
|
||||
s32 temp_f8;
|
||||
s32 temp_t1;
|
||||
s32 phi_a2;
|
||||
s32 phi_a2_2;
|
||||
|
||||
temp_a3 = arg1 * 2;
|
||||
temp_v0 = D_80165270[arg1];
|
||||
temp_a1 = &sp4C;
|
||||
sp34 = temp_a3;
|
||||
sp34 = arg1 * 2;
|
||||
sp4C = D_80165210[temp_v0];
|
||||
sp50 = 0.0f;
|
||||
sp54 = D_80165230[temp_v0];
|
||||
temp_f0 = 8.0f * 182.0f;
|
||||
temp_v1 = -func_802B5224(arg0 + 0x14, temp_a1, arg1 << 0x18, temp_a3) - arg0->unk2E;
|
||||
temp_f8 = temp_f0;
|
||||
temp_f18 = -8.0f * 182.0f;
|
||||
phi_a2 = temp_v1;
|
||||
if (temp_f8 < temp_v1) {
|
||||
phi_a2 = temp_f8;
|
||||
temp_v1 = -func_802B5224(player->pos, &sp4C) - player->unk_02E;
|
||||
temp_f8 = (s32) temp_f0;
|
||||
var_a2 = temp_v1;
|
||||
temp_f18 = (s32) (-8.0f * 182.0f);
|
||||
if ((s16) temp_f8 < temp_v1) {
|
||||
var_a2 = (s16) temp_f8;
|
||||
}
|
||||
phi_a2_2 = phi_a2;
|
||||
if (phi_a2 < temp_f18) {
|
||||
phi_a2_2 = temp_f18;
|
||||
if (var_a2 < (s16) temp_f18) {
|
||||
var_a2 = (s16) temp_f18;
|
||||
}
|
||||
temp_v0_2 = &D_80165020[arg1];
|
||||
temp_v0_2 = sp34 + D_80165020;
|
||||
sp2C = temp_v0_2;
|
||||
temp_t1 = (*temp_v0_2 + ((phi_a2_2 * 0x35) / temp_f0)) / 2;
|
||||
sp46 = temp_t1;
|
||||
func_8003680C(182.0f, arg0, temp_t1, phi_a2_2, temp_a3);
|
||||
*temp_v0_2 = temp_t1;
|
||||
temp_f0_2 = sp54 - arg0->unk1C;
|
||||
temp_f2 = sp4C - arg0->unk14;
|
||||
temp_t1 = (s32) (*temp_v0_2 + (s16) (s32) ((f32) (var_a2 * 0x35) / temp_f0)) / 2;
|
||||
sp46 = (s16) temp_t1;
|
||||
func_8003680C(182.0f, player, (s16) temp_t1, var_a2, sp34);
|
||||
*temp_v0_2 = (s16) temp_t1;
|
||||
temp_f0_2 = sp54 - player->pos[2];
|
||||
temp_f2 = sp4C - player->pos[0];
|
||||
if (sqrtf((temp_f0_2 * temp_f0_2) + (temp_f2 * temp_f2)) <= 8.0f) {
|
||||
func_800224F0(arg0 + 0x2E, -0x8000, 0x16C);
|
||||
temp_v1_2 = arg0->unk2E;
|
||||
func_800224F0(&player->unk_02E, -0x8000, 0x016C);
|
||||
temp_v1_2 = player->unk_02E;
|
||||
if ((temp_v1_2 < -0x7F41) || (temp_v1_2 >= 0x7F42)) {
|
||||
arg0->unk0 = arg0->unk0 & 0xFDFF;
|
||||
player->unk_000 &= 0xFDFF;
|
||||
}
|
||||
arg0->unk8C = 0.0f;
|
||||
arg0->unk94 = 0.0f;
|
||||
arg0->unk104 = 0.0f;
|
||||
arg0->unk240 = 0;
|
||||
arg0->unk7C = 0;
|
||||
arg0->unk34 = 0.0f;
|
||||
arg0->unk38 = 0.0f;
|
||||
arg0->unk3C = 0.0f;
|
||||
arg0->unkC0 = 0;
|
||||
arg0->unk78 = 0;
|
||||
player->unk_08C = 0.0f;
|
||||
player->unk_094 = 0.0f;
|
||||
player->unk_104 = 0.0f;
|
||||
player->unk_240 = 0;
|
||||
player->unk_07C = 0;
|
||||
player->unk_034[0] = 0.0f;
|
||||
player->unk_034[1] = 0.0f;
|
||||
player->unk_034[2] = 0.0f;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_078 = 0;
|
||||
return;
|
||||
}
|
||||
arg0->unk8C = 1200.0f;
|
||||
player->unk_08C = 1200.0f;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002D028.s")
|
||||
|
||||
Reference in New Issue
Block a user