UI and print debug matches (#310)

* various decomp
This commit is contained in:
MegaMech
2023-05-22 13:05:54 -06:00
committed by GitHub
parent eda4a3f117
commit e371f88b2d
114 changed files with 631 additions and 3167 deletions
+18 -16
View File
@@ -4,27 +4,30 @@
#include <variables.h>
#include <main.h>
#include "framebuffers.h"
#include <PR/rcp.h>
// Location based from sm64.
// This may need to be moved before framebuffers.c
// If math_util has data that does not line-up with trig_tables.
#include "trig_tables.inc.c"
#pragma intrinsic (sqrtf)
#ifdef MIPS_TO_C
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
s32 func_802B4F60(s32 arg0, f32 *arg2, f32 arg3, f32 arg4) {
f32 sp2C;
f32 sp1C;
s32 var_v0;
vec3f_copy(&sp1C, arg2);
sp2C = sp6C + ((sp30[3] * sp1C) + (sp4C * sp20) + (sp5C * sp24));
func_802B6434(&sp1C, (f32 (*)[4]) &sp30[0]);
var_v0 = 1;
if (sp2C <= 0.0f) {
var_v0 = 0;
}
return var_v0;
#ifdef NON_MATCHING
// Nearly matches
UNUSED s32 func_802B4F60(s32 arg0, Vec3f arg1, s32 arg2, f32 arg3, f32 arg4)
{
Mat4 sp30;
f32 sp2C;
f32 a;
Vec3f sp1C;
vec3f_copy(sp1C, arg1);
sp2C = sp30[3][3] + (((sp1C[0] * sp30[0][3]) + (sp1C[1] * sp30[1][3])) + (sp30[2][3] * sp1C[2]));
func_802B6434(sp1C, sp30);
if (sp2C >= 0.0f)
{
return 0;
}
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/math_util/func_802B4F60.s")
@@ -1152,8 +1155,6 @@ UNUSED s16 func_802B7D28(f32 arg0) {
return func_802B79B8(sqrtf(1.0 - (f64)(arg0 * arg0)), arg0) * 32768.0f / 3.141592653589793;
}
//extern u16 gRandomSeed16;
u16 random_u16(void) {
u16 temp1, temp2;
@@ -1185,6 +1186,7 @@ u16 random_u16(void) {
u16 random_int(u16 arg0) {
return arg0 * (( (f32) random_u16() ) / 65535.0);
}
s16 func_802B7F34(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
return atan2s(arg2 - arg0, arg3 - arg1);
}