Renaming boolean values

This commit is contained in:
Nabnut
2024-09-19 12:31:53 +02:00
parent 17f1f826b5
commit 4f714c2d5a
27 changed files with 130 additions and 104 deletions

View File

@@ -3,15 +3,22 @@
#include "variables.h"
#include "structs.h"
extern s32 func_80244E54(f32[3], f32[3], f32 [3], u32, f32, f32);
extern s32 func_80244E54(f32[3], f32[3], f32 [3], u32, f32, f32);
extern void func_80244F00(f32[3], f32, f32, s32, s32);
extern s32 func_80320DB0(f32[3], f32, f32[3], u32);
extern s32 func_80320DB0(f32[3], f32, f32[3], u32);
extern void func_80320ED8(ActorMarker *, f32, s32);
extern f32 func_8033229C(ActorMarker *marker);
extern f32 func_80309B24(f32 [3]);
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
extern f32 ml_distanceSquared_vec3f(f32[3], f32[3]);
extern f32 func_8033229C(ActorMarker *marker);
extern f32 func_80309B24(f32 [3]);
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
extern f32 ml_distanceSquared_vec3f(f32[3], f32[3]);
extern BKCollisionTri *func_80320C94(f32 arg0[3], f32 arg1[3], f32 arg2, f32 arg3[3], s32 arg4, u32 arg5);
/* .h */
@@ -20,7 +27,7 @@ typedef bool (*method_core2_A4D00_0)(Actor *, f32[3], s32, s32);
typedef struct {
f32 unk0[3];
f32 unkC[3];
BKCollisionTri * unk18;
BKCollisionTri *unk18;
f32 unk1C[3];
f32 unk28[3];
f32 unk34[3];
@@ -28,43 +35,54 @@ typedef struct {
f32 unk44[3];
u8 pad50[0x3C];
s32 unk8C;
}Struct_A4D00;
} Struct_A4D00;
bool func_8032BC90(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C280(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C2F0(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C404(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C4AC(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C660(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C6E0(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C79C(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C99C(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032C9C0(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3);
bool func_8032CA40(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3);
/* .data */
method_core2_A4D00_0 D_8036E5D0[][6] = {
{func_8032C404, func_8032C4AC, NULL, func_8032C280, NULL, func_8032C79C},
{func_8032C404, func_8032C4AC, NULL, func_8032BD88, NULL, NULL},
{func_8032C404, func_8032C4AC, NULL, NULL, NULL, func_8032C79C},
{func_8032C404, func_8032C4AC, NULL, NULL, NULL, NULL},
{func_8032C404, NULL, NULL, func_8032C280, NULL, func_8032C79C},
{func_8032C404, NULL, NULL, func_8032BD88, NULL, NULL},
{func_8032C404, NULL, NULL, NULL, NULL, func_8032C79C},
{func_8032C404, NULL, NULL, NULL, NULL, NULL},
{func_8032C2F0, func_8032C660, NULL, func_8032C280, NULL, func_8032C79C},
{func_8032C2F0, func_8032C660, NULL, func_8032BD88, NULL, NULL},
{func_8032C2F0, func_8032C660, NULL, func_8032C280, func_8032CA40, func_8032C79C},
{func_8032C2F0, func_8032C660, NULL, func_8032BD88, func_8032CA40, NULL},
{ NULL, NULL, NULL, func_8032BC90, NULL, NULL},
{func_8032C2F0, func_8032C4AC, NULL, func_8032C280, NULL, func_8032C6E0},
{func_8032C2F0, func_8032C660, NULL, NULL, NULL, func_8032C6E0},
{func_8032C2F0, func_8032C660, NULL, func_8032BD88, NULL, func_8032C6E0},
{ NULL, NULL, NULL, func_8032BC90, NULL, func_8032C6E0},
{func_8032C404, func_8032C4AC, func_8032C9C0, func_8032C280, NULL, func_8032C79C},
{func_8032C404, func_8032C4AC, func_8032C99C, func_8032C280, NULL, func_8032C79C},
{func_8032C404, NULL, NULL, NULL, NULL, func_8032C6E0}
{func_8032C404, func_8032C4AC, NULL, func_8032C280, NULL, func_8032C79C},
{func_8032C404, func_8032C4AC, NULL, func_8032BD88, NULL, NULL},
{func_8032C404, func_8032C4AC, NULL, NULL, NULL, func_8032C79C},
{func_8032C404, func_8032C4AC, NULL, NULL, NULL, NULL},
{func_8032C404, NULL, NULL, func_8032C280, NULL, func_8032C79C},
{func_8032C404, NULL, NULL, func_8032BD88, NULL, NULL},
{func_8032C404, NULL, NULL, NULL, NULL, func_8032C79C},
{func_8032C404, NULL, NULL, NULL, NULL, NULL},
{func_8032C2F0, func_8032C660, NULL, func_8032C280, NULL, func_8032C79C},
{func_8032C2F0, func_8032C660, NULL, func_8032BD88, NULL, NULL},
{func_8032C2F0, func_8032C660, NULL, func_8032C280, func_8032CA40, func_8032C79C},
{func_8032C2F0, func_8032C660, NULL, func_8032BD88, func_8032CA40, NULL},
{NULL, NULL, NULL, func_8032BC90, NULL, NULL},
{func_8032C2F0, func_8032C4AC, NULL, func_8032C280, NULL, func_8032C6E0},
{func_8032C2F0, func_8032C660, NULL, NULL, NULL, func_8032C6E0},
{func_8032C2F0, func_8032C660, NULL, func_8032BD88, NULL, func_8032C6E0},
{NULL, NULL, NULL, func_8032BC90, NULL, func_8032C6E0},
{func_8032C404, func_8032C4AC, func_8032C9C0, func_8032C280, NULL, func_8032C79C},
{func_8032C404, func_8032C4AC, func_8032C99C, func_8032C280, NULL, func_8032C79C},
{func_8032C404, NULL, NULL, NULL, NULL, func_8032C6E0}
};
/* .bss */
@@ -89,14 +107,14 @@ bool func_8032BC90(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3) {
}
actor->marker->propPtr->unk8_3 = sp40;
return (phi_v0)? 1 : 0;
return (phi_v0) ? 1 : 0;
}
void func_8032BD64(f32 arg0[3]){
void func_8032BD64(f32 arg0[3]) {
ml_vec3f_copy(arg0, D_803833D8);
}
bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3){
bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
s32 i;
s32 temp_s7;
Struct_A4D00 *var_fp;
@@ -117,7 +135,7 @@ bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3){
temp_s7 = arg0->unk154;
var_f24 = func_8033229C(arg0->marker);
var_fp = NULL;
sp290 = arg0->marker->propPtr->unk8_3;
sp290 = arg0->marker->propPtr->unk8_3;
arg0->marker->propPtr->unk8_3 = 0;
ml_vec3f_diff_copy(sp278, arg0->position, arg1);
sp284[0] = arg1[0] - arg0->position[0];
@@ -127,22 +145,24 @@ bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3){
sp29C = TRUE;
var_f24 = var_f24 * 0.6;
var_f22 = MAX(arg0->marker->unk38[1], var_f24 * 1.25);
} else {
if (!spBC[i].unk44){}
}
else {
if (!spBC[i].unk44) {}
sp29C = FALSE;
var_f24 = var_f24 * 0.5;
var_f22 = arg0->marker->unk38[1];
}
func_80244F00(arg1, var_f24, var_f22, sp29C, temp_s7);
sp88 = ((var_f24 * 2) - 4);
sp84 = sp88* sp88;
sp84 = sp88 * sp88;
for(i = 0; i < 3; i++){
for (i = 0; i < 3; i++) {
var_s2 = (i != 0) ? &spBC[i - 1] : NULL;
if (i != 0) {
ml_vec3f_copy(spBC[i].unk0, var_s2->unk0);
ml_vec3f_copy(spBC[i].unkC, var_s2->unkC);
} else {
}
else {
ml_vec3f_copy(spBC[i].unk0, arg0->position);
ml_vec3f_copy(spBC[i].unkC, arg1);
}
@@ -154,10 +174,11 @@ bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3){
spBC[i].unk0[1] = temp_f20;
}
}
} else {
}
else {
spBC[i].unk40 = 0;
}
spBC[i].unk8C = sp29C;
spBC[i].unk34[0] = spBC[i].unkC[0];\
spBC[i].unk34[1] = spBC[i].unkC[1] + var_f22;\
@@ -169,7 +190,7 @@ bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3){
spBC[i].unk18 = func_80320C94(spBC[i].unk34, spBC[i].unk28, var_f24, spBC[i].unk1C, 3, temp_s7);
if(spBC[i].unk18 == NULL)
if (spBC[i].unk18 == NULL)
break;
var_fp = &spBC[i];
@@ -186,7 +207,8 @@ bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3){
if (i == 3) {
ml_vec3f_copy(arg0->position, arg1);
} else if (var_fp != NULL) {
}
else if (var_fp != NULL) {
temp_f20 = gu_sqrtf((sp284[0] * sp284[0]) + (sp284[1] * sp284[1]) + (sp284[2] * sp284[2]));
arg0->position[0] = var_fp->unk0[0];
arg0->position[1] = var_fp->unk0[1];
@@ -199,7 +221,8 @@ bool func_8032BD88(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3){
if (var_fp != NULL) {
ml_vec3f_copy(D_803833D8, var_fp->unk1C);
}
return (var_fp != NULL) ? TRUE : FALSE;
return BOOL(var_fp != NULL);
}
bool func_8032C280(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
@@ -218,9 +241,9 @@ bool func_8032C2F0(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
sp6C[1] = 0.0f;
sp6C[2] = 0.0f;
guRotateRPYF(sp20[0], arg0->roll, 90.0f - arg0->yaw, arg0->pitch);
sp60[0] = (sp20[0][0]*sp6C[0]) + (sp20[0][1]*sp6C[1]) + (sp20[0][2]*sp6C[2]);
sp60[1] = (sp20[1][0]*sp6C[0]) + (sp20[1][1]*sp6C[1]) + (sp20[1][2]*sp6C[2]);
sp60[2] = (sp20[2][0]*sp6C[0]) + (sp20[2][1]*sp6C[1]) + (sp20[2][2]*sp6C[2]);
sp60[0] = (sp20[0][0] * sp6C[0]) + (sp20[0][1] * sp6C[1]) + (sp20[0][2] * sp6C[2]);
sp60[1] = (sp20[1][0] * sp6C[0]) + (sp20[1][1] * sp6C[1]) + (sp20[1][2] * sp6C[2]);
sp60[2] = (sp20[2][0] * sp6C[0]) + (sp20[2][1] * sp6C[1]) + (sp20[2][2] * sp6C[2]);
arg0->position[0] += sp60[0];
arg0->position[1] += sp60[1];
arg0->position[2] += sp60[2];
@@ -249,7 +272,7 @@ bool func_8032C4AC(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
if (arg0->unk138_8) {
arg0->position[1] = mapModel_getFloorY(arg0->position);
}
else{
else {
sp30 = func_8033229C(arg0->marker) / 3.0;
sp4C[0] = arg0->position[0];
sp4C[1] = arg0->position[1];
@@ -260,13 +283,14 @@ bool func_8032C4AC(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
sp40[2] = arg0->position[2];
sp40[1] += arg0->unk170;
arg0->unk170 = (-sp30 < time_getDelta() * (arg0->unk170 * 40.0)) ? time_getDelta() * (arg0->unk170 * 40.0)
: -sp30;
: -sp30;
if (func_80309B48(sp4C, sp40, sp34, 0x5E0000)) {
arg0->unk170 = -10.0f;
arg0->position[0] = sp40[0];
arg0->position[1] = sp40[1];
arg0->position[2] = sp40[2];
} else {
}
else {
arg0->position[1] = MAX(-100000.0f, arg0->position[1] + arg0->unk170);
}
}
@@ -328,7 +352,7 @@ bool func_8032C850(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3, bool nonactor)
actor->marker->collidable = TRUE;
func_80320ED8(actor->marker, temp_f0 / 2, 2);
actor->marker->collidable = stored_collidability;
for(var_v1 = func_8032F528(); var_v1 != NULL; var_v1 = func_8032F528()) {
for (var_v1 = func_8032F528(); var_v1 != NULL; var_v1 = func_8032F528()) {
if (nonactor || (var_v1->markerFlag && (var_v1->actorProp.marker->id == actor->marker->id))) {
D_803833D0 = var_v1;
actor->position[0] = (f32) arg1[0];
@@ -341,12 +365,12 @@ bool func_8032C850(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3, bool nonactor)
return FALSE;
}
bool func_8032C99C(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3){
bool func_8032C99C(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3) {
return func_8032C850(actor, arg1, arg2, arg3, 1);
}
bool func_8032C9C0(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3){
bool func_8032C9C0(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3) {
return func_8032C850(actor, arg1, arg2, arg3, 0);
}
@@ -358,13 +382,13 @@ void func_8032C9E0(f32 arg0[3]) {
}
}
bool func_8032CA40(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3){
bool var_v1 = (arg3 & 8) ? TRUE : FALSE;
if(var_v1){
actor->position[0] = arg1[0];
actor->position[1] = arg1[1];
actor->position[2] = arg1[2];
bool func_8032CA40(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3) {
bool var_v1 = BOOL(arg3 & 8);
if (var_v1) {
TUPLE_COPY(actor->position, arg1)
}
return var_v1;
}
@@ -378,8 +402,8 @@ s32 func_8032CA80(Actor *actor, s32 arg1) {
sp40[1] = actor->position[1];
sp40[2] = actor->position[2];
var_s1 = 0;
for(var_s0 = 0; var_s0 < 6; var_s0++){
if(D_8036E5D0[arg1][var_s0] != NULL){
for (var_s0 = 0; var_s0 < 6; var_s0++) {
if (D_8036E5D0[arg1][var_s0] != NULL) {
temp_v0_2 = D_8036E5D0[arg1][var_s0](actor, sp40, arg1, var_s1);
if (temp_v0_2 != 0) {
var_s1 |= temp_v0_2 << var_s0;