Actor decomp (#183)

* Actor decomp
This commit is contained in:
MegaMech
2022-04-26 16:48:36 -06:00
committed by GitHub
parent 626513f90a
commit 2f8a1bfcb6
57 changed files with 1869 additions and 5545 deletions
+17 -20
View File
@@ -10,6 +10,7 @@
#include "main.h"
#include "memory.h"
#include "variables.h"
#include <actor_types.h>
//#include "segment_symbols.h"
//#include "segments.h"
@@ -2478,25 +2479,21 @@ f32 func_802ABE30(f32 arg0, f32 arg1, f32 arg2, u16 arg3) {
return ((tile->height * arg0) + (tile->rotation * arg2) + tile->height2) / -tile->gravity;
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802ABE30(f32, f32, s32, u16); // extern
f32 func_802ABE30(f32, f32, f32, u16); // extern
f32 func_802ABEAC(void *arg0, void *arg1) {
if (arg0->unk4 == 1) {
return func_802ABE30(arg1->unk0, arg1->unk4, arg1->unk8, arg0->unkA);
f32 func_802ABEAC(UnkActorInner *arg0, Vec3f arg1) {
if (arg0->unk34 == 1) {
return func_802ABE30(arg1[0], arg1[1], arg1[2], arg0->unk3A);
}
if (arg0->unk0 == 1) {
return func_802ABE30(arg1->unk0, arg1->unk4, arg1->unk8, arg0->unk6);
if (arg0->unk30 == 1) {
return func_802ABE30(arg1[0], arg1[1], arg1[2], arg0->unk36);
}
if (arg0->unk2 == 1) {
return func_802ABE30(arg1->unk0, arg1->unk4, arg1->unk8, arg0->unk8);
if (arg0->unk32 == 1) {
return func_802ABE30(arg1[0], arg1[1], arg1[2], arg0->unk38);
}
return arg1->unk4;
return arg1[1];
}
#else
GLOBAL_ASM("asm/non_matchings/memory/func_802ABEAC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
@@ -4500,7 +4497,7 @@ s32 func_802AFA34(Player *player, kartBoundingBoxCorner *corner, f32 cornerX, f3
}
if (func_802AD278(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, (s32) corner->surfaceMapIndex, cornerX, cornerY, cornerZ) == 1) {
temp_f0 = func_802ABE30(temp_f22, temp_f24, temp_f26, corner->surfaceMapIndex);
temp_f2 = player->posY;
temp_f2 = player->pos[1];
if (!(temp_f2 < temp_f0) && !((2.0f * temp_f20) < (temp_f2 - temp_f0))) {
corner->cornerGroundY = temp_f0;
func_802AF9F0(temp_f0, &sp11C, sp108, corner);
@@ -4512,7 +4509,7 @@ s32 func_802AFA34(Player *player, kartBoundingBoxCorner *corner, f32 cornerX, f3
}
if (func_802AC760(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, (s32) corner->surfaceMapIndex, cornerX, cornerY, cornerZ) == 1) {
temp_f0_2 = func_802ABE30(temp_f22, temp_f24, temp_f26, corner->surfaceMapIndex);
temp_f2_2 = player->posY;
temp_f2_2 = player->pos[1];
if (!(temp_f2_2 < temp_f0_2) && !((2.0f * temp_f20) < (temp_f2_2 - temp_f0_2))) {
corner->cornerGroundY = temp_f0_2;
func_802AF9F0(temp_f0_2, &sp128, sp10C, corner);
@@ -4524,7 +4521,7 @@ s32 func_802AFA34(Player *player, kartBoundingBoxCorner *corner, f32 cornerX, f3
}
if (func_802ACBA4(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, (s32) corner->surfaceMapIndex, cornerX, cornerY, cornerZ) == 1) {
temp_f0_3 = func_802ABE30(temp_f22, temp_f24, temp_f26, corner->surfaceMapIndex);
temp_f2_3 = player->posY;
temp_f2_3 = player->pos[1];
if (!(temp_f2_3 < temp_f0_3) && !((2.0f * temp_f20) < (temp_f2_3 - temp_f0_3))) {
corner->cornerGroundY = temp_f0_3;
func_802AF9F0(temp_f0_3, &sp110, sp104, corner);
@@ -4570,7 +4567,7 @@ loop_34:
if ((temp_v1_3 & 0x4000) != 0) {
if ((corner->surfaceMapIndex != temp_s0) && (func_802AC760(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, (s32) temp_s0, cornerX, cornerY, cornerZ) == 1)) {
temp_f0_4 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
temp_f2_4 = player->posY;
temp_f2_4 = player->pos[1];
if (!(temp_f2_4 < temp_f0_4) && !((phi_f30 * temp_f20) < (temp_f2_4 - temp_f0_4))) {
spD4 = temp_f0_4;
func_802AF9F0(temp_f0_4, &sp128, sp10C, corner);
@@ -4591,7 +4588,7 @@ loop_34:
if ((temp_v1_3 & 0x8000) != 0) {
if ((temp_v0_4->gravity != 0.0f) && (corner->surfaceMapIndex != temp_s0) && (func_802AD278(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, (s32) temp_s0, cornerX, cornerY, cornerZ) == 1)) {
temp_f0_5 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
temp_f2_5 = player->posY;
temp_f2_5 = player->pos[1];
if (!(temp_f2_5 < temp_f0_5) && !((phi_f30 * temp_f20) < (temp_f2_5 - temp_f0_5))) {
corner->cornerGroundY = temp_f0_5;
func_802AF9F0(temp_f0_5, &sp11C, sp108, corner);
@@ -4606,7 +4603,7 @@ loop_34:
}
if ((temp_v0_4->gravity != 0.0f) && (corner->surfaceMapIndex != temp_s0) && (func_802ACBA4(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, (s32) temp_s0, cornerX, cornerY, cornerZ) == 1)) {
temp_f0_6 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
temp_f2_6 = player->posY;
temp_f2_6 = player->pos[1];
if (!(temp_f2_6 < temp_f0_6) && !((phi_f30 * temp_f20) < (temp_f2_6 - temp_f0_6))) {
corner->cornerGroundY = temp_f0_6;
func_802AF9F0(temp_f0_6, &sp110, sp104, corner);