Merge branch 'mr-origin-69'

This commit is contained in:
Banjo Kazooie
2024-09-13 20:26:40 -05:00
80 changed files with 806 additions and 660 deletions

View File

@@ -2,18 +2,16 @@
#include "functions.h"
#include "variables.h"
#include "ml/mtx.h"
#include <core1/viewport.h>
typedef struct {
u8 pad0[0xC];
f32 unkC[3];
}Struct_core2_72060_0;
extern f32 viewport_get_yaw();
extern int func_8024DD34(f32, f32, f32);
extern void func_80251B5C(f32, f32, f32);
extern void func_80252A38(f32, f32, f32);
extern f32 vtxList_getGlobalNorm(BKVertexList *);
extern bool func_8024DB50(f32[3], f32);
struct4Cs *D_80369280 = NULL;
@@ -164,12 +162,12 @@ void func_802F919C(void) {
} else {
var_f20 = 70.0f;
}
ml_vec3f_yaw_rotate_copy(sp4C, sp4C, viewport_get_yaw() + randf2(-var_f20, var_f20));
ml_vec3f_yaw_rotate_copy(sp4C, sp4C, viewport_getYaw() + randf2(-var_f20, var_f20));
sp4C[0] += D_80381040[0];
sp4C[1] += D_80381040[1];
sp4C[2] += D_80381040[2];
if (sp58 < 650.0) {
for(sp44 = 0; sp44 < 5 && func_8024DD34(sp4C[0], sp4C[1] - 10.0f, sp4C[2]) ; sp44++){
for(sp44 = 0; sp44 < 5 && viewport_isPointPlane_3f(sp4C[0], sp4C[1] - 10.0f, sp4C[2]) ; sp44++){
sp4C[1] += 200.0f;
}
}
@@ -198,8 +196,8 @@ void func_802F962C(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
void *phi_s0_2;
if ((D_80369280 != NULL) && (D_80369284 != 0)) {
viewport_get_position_vec3f(D_80381050);
viewport_get_rotation_vec3f(D_80381060);
viewport_getPosition_vec3f(D_80381050);
viewport_getRotation_vec3f(D_80381060);
D_80381090 = (Gfx*)((s32)D_80369288 + D_80369288->gfx_list_offset_C + sizeof(BKGfxList));
temp_s3 = (BKVertexList *)((s32)D_80369288 + D_80369288->vtx_list_offset_10);
D_8038108C = vtxList_getGlobalNorm(temp_s3);
@@ -229,7 +227,7 @@ bool func_802F989C(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
if( ((-17000.0f < D_80381070[0]) &&(D_80381070[0] < 17000.0f))
&& (arg2[1] > -200.0f)
&& ((-17000.0f < D_80381070[2]) && (D_80381070[2] < 17000.0f))
&& func_8024DB50(arg2, D_8038108C)
&& viewport_func_8024DB50(arg2, D_8038108C)
) {
func_80251B5C(D_80381070[0], D_80381070[1], D_80381070[2]);
mlMtxApply(*mtx);