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:
Tyler McGavran
2022-07-06 20:36:27 -04:00
committed by GitHub
parent bf106ede73
commit f2eef3b82e
27 changed files with 2541 additions and 3181 deletions
+36 -36
View File
@@ -551,7 +551,7 @@ void func_802979F8(struct Actor *arg0, f32 arg1) {
void func_80297A50(Camera *camera, Mat4 arg1, struct Actor *arg2) {
u16 temp_t0;
f32 temp = func_802B80D0(camera->pos, arg2->unk18, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B95F8);
f32 temp = func_802B80D0(camera->pos, arg2->unk18, camera->rot[1], 0, D_80150130[camera - camera1], D_802B95F8);
if (temp < 0.0f) { return; }
@@ -780,7 +780,7 @@ void func_80298328(Camera *arg0, Mat4 arg1, struct PiranhaPlant *arg2) {
if (temp & 0x800) { return; }
temp_f0 = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], D_802B9624);
temp_f0 = func_802B80D0(arg0->pos, arg2->pos, arg0->rot[1], 0, D_80150130[arg0 - camera1], D_802B9624);
if (temp_f0 < 0.0f) {
@@ -941,7 +941,7 @@ loop_2:
sp88 = (f32) phi_v0 * gCourseDirection;
sp8C = (f32) phi_s1->unk2;
sp90 = (f32) phi_s1->unk4;
temp_f0 = func_802B80D0(camera, &sp88, (u16) camera->rotX2, 0.0f, D_80150130[(s32) (camera - camera1) / 184], D_802B9630);
temp_f0 = func_802B80D0(camera, &sp88, (u16) camera->rot2, 0.0f, D_80150130[(s32) (camera - camera1) / 184], D_802B9630);
phi_s5_2 = phi_s5_3;
phi_s5_2 = phi_s5_3;
if (temp_f0 > 0.0f) {
@@ -1163,7 +1163,7 @@ loop_5:
spD8 = (f32) phi_s1->unk2;
spDC = (f32) phi_s1->unk_04;
temp_t0 = temp_s0 & 0xF;
if (func_802B80D0(camera, temp_a1, (u16) camera->rotX2, 0.0f, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), phi_f22) < 0.0f) {
if (func_802B80D0(camera, temp_a1, (u16) camera->rot2, 0.0f, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), phi_f22) < 0.0f) {
goto block_29;
}
if (temp_t0 == 6) {
@@ -1231,7 +1231,7 @@ void func_80299144(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B9658);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B9658);
if (temp_f0 < 0.0f) { return; }
@@ -1254,7 +1254,7 @@ void func_8029930C(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B9660);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B9660);
if (temp_f0 < 0.0f) { return; }
@@ -1277,7 +1277,7 @@ void func_802994D4(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B9668);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B9668);
if (temp_f0 < 0.0f) { return; }
@@ -1300,7 +1300,7 @@ void func_8029969C(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B9670);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B9670);
if (temp_f0 < 0.0f) { return; }
@@ -1323,7 +1323,7 @@ void func_80299864(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B9674);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B9674);
if (temp_f0 < 0.0f) { return; }
@@ -1346,7 +1346,7 @@ void func_80299A2C(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B967C);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B967C);
if (temp_f0 < 0.0f) { return; }
@@ -1369,7 +1369,7 @@ void func_80299BF4(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B9684);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B9684);
if (temp_f0 < 0.0f) { return; }
@@ -1392,7 +1392,7 @@ void func_80299DBC(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B968C);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B968C);
if (temp_f0 < 0.0f) { return; }
@@ -1414,7 +1414,7 @@ void func_80299EDC(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B9694);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B9694);
if (temp_f0 < 0.0f) { return; }
@@ -1436,7 +1436,7 @@ void func_80299FFC(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B969C);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B969C);
if (temp_f0 < 0.0f) { return; }
@@ -1458,7 +1458,7 @@ void func_8029A11C(Camera *camera, Mat4 arg1, struct Actor *arg2) {
if ((temp_v0 & 0x800) != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B96A4);
temp_f0 = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B96A4);
if (temp_f0 < 0.0f) { return; }
@@ -1505,7 +1505,7 @@ void func_8029A3AC(Camera *camera, Mat4 arg1, struct ShellActor *shell) {
};
uintptr_t phi_t3;
f32 temp_f0 = func_802B80D0(camera->pos, shell->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B96AC);
f32 temp_f0 = func_802B80D0(camera->pos, shell->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B96AC);
if (temp_f0 < 0.0f) {
func_80297230(camera, (struct Actor *)shell);
return;
@@ -1573,7 +1573,7 @@ void func_8029A8F4(Camera *arg0, Mat4 arg1, struct BananaActor *arg2) {
Vec3s sp7C;
Mat4 sp3C;
f32 temp = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], D_802B96B4);
f32 temp = func_802B80D0(arg0->pos, arg2->pos, arg0->rot[1], 0, D_80150130[arg0 - camera1], D_802B96B4);
if (temp < 0.0f) {
func_80297230(arg0, arg2);
return;
@@ -1667,7 +1667,7 @@ extern f32 D_802B96B8;
void func_8029AC18(Camera *camera, Mat4 arg1, struct Actor *arg2) {
f32 temp;
temp = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B96B8);
temp = func_802B80D0(camera->pos, arg2->pos, camera->rot[1], 0, D_80150130[camera - camera1], D_802B96B8);
if (temp < 0.0f) { return; }
arg1[3][0] = arg2->pos[0]; // unk30
@@ -1718,7 +1718,7 @@ void func_8029AE1C(Camera *arg0, struct PaddleWheelBoat *boat, Mat4 arg2, u16 ar
f32 temp;
if ((arg3 > 20) && (arg3 < 25)) { return; }
temp = func_802B80D0(arg0->pos, boat->pos, arg0->rotX[1], 90000.0f, D_80150130[arg0 - camera1], D_802B96DC);
temp = func_802B80D0(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, D_80150130[arg0 - camera1], D_802B96DC);
if (temp < 0.0f) { return; }
@@ -1748,7 +1748,7 @@ void func_8029B06C(Camera *arg0, struct Actor *arg1) {
s32 pad[6];
Mat4 spD8;
s32 pad2[32];
f32 temp_f0 = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 2500.0f, D_80150130[arg0 - camera1], D_802B96E0);
f32 temp_f0 = func_802B80D0(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, D_80150130[arg0 - camera1], D_802B96E0);
if (temp_f0 < 0.0f) { return; }
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
@@ -1791,7 +1791,7 @@ void func_8029B2E4(Camera *arg0, struct Actor *arg1) {
s32 pad2[32];
f32 temp_f0;
temp_f0 = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 2500.0f, D_80150130[arg0 - camera1], D_802B96F0);
temp_f0 = func_802B80D0(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, D_80150130[arg0 - camera1], D_802B96F0);
if (temp_f0 < 0.0f) { return; }
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
@@ -1821,7 +1821,7 @@ void func_8029B4E0(Camera *arg0, struct Actor *arg1) {
s32 pad[6];
Mat4 spC8;
s32 pad2[32];
f32 temp_f0 = func_802B80D0(arg0->pos,arg1->pos, arg0->rotX[1], 2500.0f, D_80150130[arg0 - camera1], D_802B9700);
f32 temp_f0 = func_802B80D0(arg0->pos,arg1->pos, arg0->rot[1], 2500.0f, D_80150130[arg0 - camera1], D_802B9700);
if (!(temp_f0 < 0.0f)) {
@@ -1854,7 +1854,7 @@ void func_8029B6EC(Camera *camera, struct Actor* arg1) {
s32 pad[6];
Mat4 spC8;
s32 pad2[32];
f32 temp_f0 = func_802B80D0(camera->pos, arg1->pos, camera->rotX[1], 2500.0f, D_80150130[camera - camera1], D_802B9710);
f32 temp_f0 = func_802B80D0(camera->pos, arg1->pos, camera->rot[1], 2500.0f, D_80150130[camera - camera1], D_802B9710);
if (!(temp_f0 < 0.0f)) {
@@ -1889,7 +1889,7 @@ void func_8029B8E8(Camera *camera, struct TrainCar *actor) {
Mat4 spE0;
Mat4 spA0;
f32 temp_f0 = func_802B80D0(camera->pos, actor->pos, camera->rotX[1], 2500.0f, D_80150130[camera - camera1], D_802B9720);
f32 temp_f0 = func_802B80D0(camera->pos, actor->pos, camera->rot[1], 2500.0f, D_80150130[camera - camera1], D_802B9720);
if (temp_f0 < 0.0f) { return; }
@@ -2004,7 +2004,7 @@ void func_8029BFB0(Camera *camera, struct TrainCar *actor) {
Mat4 spE0;
Mat4 spA0;
f32 temp_f0 = func_802B80D0(camera->pos, actor->pos, camera->rotX[1], 625.0f, D_80150130[camera - camera1], D_802B9730);
f32 temp_f0 = func_802B80D0(camera->pos, actor->pos, camera->rot[1], 625.0f, D_80150130[camera - camera1], D_802B9730);
if (temp_f0 < 0.0f) { return; }
@@ -2074,7 +2074,7 @@ void func_8029C3CC(Camera *camera, struct TrainCar *actor) {
Mat4 spE0;
Mat4 spA0;
f32 temp_f0 = func_802B80D0(camera->pos, actor->pos, camera->rotX[1], 2025.0f, D_80150130[camera - camera1], D_802B9740);
f32 temp_f0 = func_802B80D0(camera->pos, actor->pos, camera->rot[1], 2025.0f, D_80150130[camera - camera1], D_802B9740);
if (temp_f0 < 0.0f) { return; }
@@ -2192,7 +2192,7 @@ void func_8029CA90(Camera *camera, struct FallingRock *rock) {
if (rock->respawnTimer != 0) { return; }
temp_f0 = func_802B80D0(camera->pos, rock->pos, camera->rotX[1], 400.0f, D_80150130[camera - camera1], D_802B9750);
temp_f0 = func_802B80D0(camera->pos, rock->pos, camera->rot[1], 400.0f, D_80150130[camera - camera1], D_802B9750);
if (temp_f0 < 0.0f) { return; }
@@ -4423,7 +4423,7 @@ void func_802A171C(Camera *camera, struct Actor *actor) {
temp_a1 = actor->pos;
sp38 = temp_a1;
if (func_802B80D0(temp_a1, (u16) camera->rotX2, 0x451C4000, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B99E0) < 0.0f) {
if (func_802B80D0(temp_a1, (u16) camera->rot2, 0x451C4000, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B99E0) < 0.0f) {
func_80297230(camera, actor);
return;
}
@@ -4713,7 +4713,7 @@ void func_802A1EA0(Camera *camera, struct ItemBox *item_box) {
temp_a1 = item_box->pos;
sp38 = temp_a1;
temp_f0 = func_802B80D0(temp_a1, (u16) camera->rotX2, 0, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B9A00);
temp_f0 = func_802B80D0(temp_a1, (u16) camera->rot2, 0, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B9A00);
if (!(temp_f0 < 0.0f) && !(D_802B9A04 < temp_f0)) {
temp_a0 = item_box->state;
phi_a0 = temp_a0;
@@ -4949,7 +4949,7 @@ GLOBAL_ASM("asm/non_matchings/actors/func_802A1EA0.s")
void func_802A269C(Camera *arg0, struct Actor *arg1) {
Mat4 sp38;
f32 unk = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], D_802B9A28);
f32 unk = func_802B80D0(arg0->pos, arg1->pos, arg0->rot[1], 0, D_80150130[arg0 - camera1], D_802B9A28);
if (!(unk < 0.0f)) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
@@ -4970,7 +4970,7 @@ void func_802A27A0(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3
f32 temp_f0;
if (D_800DC50C != CREDITS_SEQUENCE) {
temp_f0 = func_802B80D0(arg0->pos, egg->pos, arg0->rotX[1], 200.0f, D_80150130[arg0 - camera1], D_802B9A2C);
temp_f0 = func_802B80D0(arg0->pos, egg->pos, arg0->rot[1], 200.0f, D_80150130[arg0 - camera1], D_802B9A2C);
if (temp_f0 < 0.0f) {
return;
}
@@ -5014,7 +5014,7 @@ void func_802A29BC(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
s16 temp = arg2->flags;
if (temp & 0x800) { return; }
unk = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], 16000000.0f);
unk = func_802B80D0(arg0->pos, arg2->pos, arg0->rot[1], 0, D_80150130[arg0 - camera1], 16000000.0f);
if (!(unk < 0.0f)) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
@@ -5031,7 +5031,7 @@ s16 D_802B885C[] = {0, 0, 0};
void func_802A2AD0(Camera *arg0, struct Actor *arg1) {
Vec3s sp80 = {0, 0, 0};
Mat4 sp40;
f32 unk = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 0.0f, D_80150130[arg0 - camera1], 4000000.0f);
f32 unk = func_802B80D0(arg0->pos, arg1->pos, arg0->rot[1], 0.0f, D_80150130[arg0 - camera1], 4000000.0f);
if (unk < 0.0f) { return; }
func_802B5F74(sp40, arg1->pos, arg1->rot);
@@ -5063,7 +5063,7 @@ void func_802A2C78(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
return;
}
temp_f0 = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0.0f, D_80150130[arg0 - camera1], 4000000.0f);
temp_f0 = func_802B80D0(arg0->pos, arg2->pos, arg0->rot[1], 0.0f, D_80150130[arg0 - camera1], 4000000.0f);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) {
@@ -5137,8 +5137,8 @@ void func_802A3008(struct UnkStruct_800DC5EC *arg0) {
struct Actor *phi_s0;
Vec3f sp4C = {0.0f, 5.0f, 10.0f};
f32 sp48 = sins(temp_s1->rotX[1] - 0x8000); // unk26;
f32 temp_f0 = coss(temp_s1->rotX[1] - 0x8000);
f32 sp48 = sins(temp_s1->rot[1] - 0x8000); // unk26;
f32 temp_f0 = coss(temp_s1->rot[1] - 0x8000);
D_801502C0[0][0] = temp_f0;
+757 -904
View File
File diff suppressed because it is too large Load Diff
+55
View File
@@ -0,0 +1,55 @@
#ifndef CAMERA_H
#define CAMERA_H
#include "common_structs.h"
typedef struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ Vec3f lookAt;
// This is expected to be a normalized vector, indicates what direction is "up" for the camera
/* 0x18 */ Vec3f up;
// I think these are the "nautical angles" between pos and lookAt
// rot[0] = pitch, rot[1] = yaw, rot[2] = roll?
/* 0x24 */ Vec3s rot;
/* 0x2A */ s16 rotZ;
/* 0x2C */ s16 unk_2C;
/* 0x2E */ s16 unk_2E;
/* 0x30 */ Vec3f unk_30;
/* 0x3C */ Vec3f unk_3C;
/* 0x48 */ s32 unk_48;
/* 0x4C */ s32 unk_4C;
/* 0x50 */ s32 unk_50;
/* 0x54 */ UnkActorInner unk_54;
// When you hit a wall (or another driver) the camera's pos and lookAt bounce up and down. This is the velocity(?) of that bouncing
/* 0x94 */ f32 unk_94;
/* 0x98 */ s16 unk_98;
/* 0x9A */ s16 unk_9A;
// Timer for wall-hit bounce. Counts up instead of down
/* 0x9C */ s16 unk_9C;
/* 0x9E */ s16 pad_9E;
/* 0xA0 */ f32 unk_A0;
/* 0xA4 */ s32 unk_A4;
/* 0xA8 */ s32 unk_A8;
/* 0xAC */ s16 unk_AC;
// Id of the player the camera is following.
/* 0xAE */ s16 playerId;
// Seems related to camera movement during drifting
/* 0xB0 */ s16 unk_B0;
/* 0xB2 */ s16 unk_B2;
/* 0xB4 */ f32 unk_B4;
} Camera; /* size = 0xB8 */
void func_8001CA10(Camera*);
void func_8001CA24(Player*, f32);
extern Camera cameras[];
extern Camera *camera1;
extern Camera *camera2;
extern Camera *camera3;
extern Camera *camera4;
extern Player *gPlayerTwo;
extern Player *gPlayerThree;
extern Player *gPlayerFour;
#endif
+29 -33
View File
@@ -1,48 +1,44 @@
#include <ultra64.h>
#include <macros.h>
#include <common_structs.h>
extern Camera cameras[];
extern u16 atan2s(f32, f32);
void func_80281610(void) {
Camera *camera = &cameras[0];
//f32 sp1C;
f32 temp_f12;
f32 temp;
f32 temp_f14;
func_80283648(camera);
temp_f12 = camera->unk - camera->pos[0];
temp = camera->unk1 - camera->pos[1];
temp_f14 = camera->unk2 - camera->pos[2];
camera->rotX[1] = atan2s(temp_f12, temp_f14);
camera->rotX[0] = atan2s(sqrtf((temp_f12 * temp_f12) + (temp_f14 * temp_f14)), temp);
camera->rotX[2] = 0;
}
#include "camera.h"
#include "math_util.h"
// guPerspective params
extern f32 D_80150148, D_8015014C, D_80150150;
extern f32 D_80150130[];
// rodata
extern const f32 D_80286B90, D_80286B94, D_80286B98, D_80286B9C, D_80286BA0;
void func_80281610(void) {
Camera *camera;
f32 x_dist;
f32 y_dist;
f32 z_dist;
camera = &cameras[0];
func_80283648(camera);
x_dist = camera->lookAt[0] - camera->pos[0];
y_dist = camera->lookAt[1] - camera->pos[1];
z_dist = camera->lookAt[2] - camera->pos[2];
camera->rot[1] = atan2s(x_dist, z_dist);
camera->rot[0] = atan2s(sqrtf((x_dist * x_dist) + (z_dist * z_dist)), y_dist);
camera->rot[2] = 0;
}
// GP Ending sequence camera settings?
void func_802816B8(void) {
cameras[0].pos[0] = D_80286B90;
cameras[0].pos[0] = -3133.0f;
cameras[0].pos[1] = 19.0f;
cameras[0].pos[2] = D_80286B94;
cameras[0].unk = D_80286B98;
cameras[0].unk1 = 21.0f;
cameras[0].unk2 = -528.0f;
cameras[0].angleX = 0.0f;
cameras[0].angleY = 1.0f;
cameras[0].angleZ = 0.0f;
cameras[0].pos[2] = -467.0f;
cameras[0].lookAt[0] = -3478.0f;
cameras[0].lookAt[1] = 21.0f;
cameras[0].lookAt[2] = -528.0f;
cameras[0].up[0] = 0.0f;
cameras[0].up[1] = 1.0f;
cameras[0].up[2] = 0.0f;
D_80150130[0] = 40.0f;
D_80150148 = D_80286B9C;
D_80150148 = 1.33333333f;
D_80150150 = 3.0f;
D_8015014C = D_80286BA0;
D_8015014C = 6800.0f;
func_80283430();
}
+1317 -1617
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -41,7 +41,8 @@ f32 func_80010FA0(f32, f32, f32, s32);
s32 process_path_data(struct TrackWayPoint*, struct TrackWayPoint*);
f32 func_80013C74(s16, s16);
f32 func_800145A8(s16, f32, s16);
void func_8001968C(void);
void func_80014D30(s32, s32);
void func_8001968C();
/* This is where I'd put my static data, if I had any */
// Might belong in menus.h?
+9 -19
View File
@@ -963,32 +963,25 @@ void func_80022180(Mtx *arg0, Mat4 arg1) {
arg0->m[3][3] = ((s32) (arg1[3][2] * someMultiplier) << 0x10) | ((s32) (arg1[3][3] * someMultiplier) & 0xFFFF);
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800224F0(s16 *arg0, s16 arg1, s16 arg2) {
s32 func_800224F0(s16 *arg0, s16 arg1, s16 arg2) {
s16 temp_v0;
s16 temp_v0_2;
s16 temp_v0_3;
s16 phi_a2;
temp_v0 = arg1 - *arg0;
phi_a2 = arg2;
if (arg2 < 0) {
phi_a2 = arg2 * -1;
arg2 *= -1;
}
if (temp_v0 > 0) {
temp_v0_2 = temp_v0 - phi_a2;
if (temp_v0_2 >= 0) {
*arg0 = arg1 - temp_v0_2;
temp_v0 -= arg2;
if (temp_v0 >= 0) {
*arg0 = arg1 - temp_v0;
} else {
goto block_8;
*arg0 = arg1;
}
} else {
temp_v0_3 = temp_v0 + phi_a2;
if (temp_v0_3 <= 0) {
*arg0 = arg1 - temp_v0_3;
temp_v0 += arg2;
if (temp_v0 <= 0) {
*arg0 = arg1 - temp_v0;
} else {
block_8:
*arg0 = arg1;
}
}
@@ -997,9 +990,6 @@ block_8:
}
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800224F0.s")
#endif
void move_s32_towards(s32 *startingValue, s32 targetValue, f32 somePercent) {
*startingValue -= ((*startingValue - targetValue) * somePercent);
+1
View File
@@ -19,6 +19,7 @@ void func_80021DA8();
void func_80021F84(Mat4, f32);
void func_80021FF8(Mtx*, Mat4);
void func_80022180(Mtx*, Mat4);
s32 func_800224F0(s16*, s16, s16);
void move_s32_towards(s32*, s32, f32);
void move_f32_towards(f32*, f32, f32);
void move_s16_towards(s16*, s16, f32);
+34 -42
View File
@@ -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")
+15 -16
View File
@@ -5,12 +5,11 @@
#include "main.h"
#include "types.h"
#include "camera.h"
#include "code_80281780.h"
extern Gfx *gDisplayListHead;
extern Camera cameras[];//, *camera1, *camera2, *camera3, *camera4;
extern f32 D_80150148, D_8015014C, D_80150150;
extern f32 D_80150130[4];
extern s16 gCreditsCourseId;
@@ -54,7 +53,7 @@ void func_80280038(void) {
guPerspective(&gGfxPool->mtxPool[1], &sp44[37], D_80150130[0], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp44[37]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[7]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
gCurrentCourseId = gCreditsCourseId;
mtxf_identity(&sp44);
@@ -99,12 +98,12 @@ void func_802802AC(void) {
D_802874FC = 0;
func_80283648(camera);
temp_f12 = camera->unk - camera->pos[0];
temp = camera->unk1 - camera->pos[1];
temp_f14 = camera->unk2 - camera->pos[2];
camera->rotX[1] = atan2s(temp_f12, temp_f14);
camera->rotX[0] = atan2s(sqrtf((temp_f12 * temp_f12) + (temp_f14 * temp_f14)), temp);
camera->rotX[2] = 0;
temp_f12 = camera->lookAt[0] - camera->pos[0];
temp = camera->lookAt[1] - camera->pos[1];
temp_f14 = camera->lookAt[2] - camera->pos[2];
camera->rot[1] = atan2s(temp_f12, temp_f14);
camera->rot[0] = atan2s(sqrtf((temp_f12 * temp_f12) + (temp_f14 * temp_f14)), temp);
camera->rot[2] = 0;
if (D_802874A0 != 0) {
D_800DC5E4++;
} else {
@@ -124,7 +123,7 @@ void func_80280420(void) {
D_800DC518 = 1;
func_802A4D18();
func_802A74BC();
camera->unk30 = 60.0f;
camera->unk_B4 = 60.0f;
D_80150130[0] = 60.0f;
D_800DC5EC->screenWidth = 320;
D_800DC5EC->screenHeight = 240;
@@ -152,12 +151,12 @@ void func_80280420(void) {
camera->pos[0] = 1400.0f;
camera->pos[1] = 300.0f;
camera->pos[2] = 1400.0f;
camera->unk = 0.0f;
camera->unk1 = 0.0f;
camera->unk2 = 0.0f;
camera->angleX = 0.0f;
camera->angleY = 1.0f;
camera->angleZ = 0.0f;
camera->lookAt[0] = 0.0f;
camera->lookAt[1] = 0.0f;
camera->lookAt[2] = 0.0f;
camera->up[0] = 0.0f;
camera->up[1] = 1.0f;
camera->up[2] = 0.0f;
func_80283430();
func_80003040();
func_8006E9C0();
+1 -1
View File
@@ -97,7 +97,7 @@ void load_ending_sequence_royalraceway(void) {
D_80287554 = 0;
func_802A4D18();
func_802A74BC();
camera->unk30 = 60.0f;
camera->unk_B4 = 60.0f;
D_80150130[0] = 60.0f;
D_800DC5EC->screenWidth = SCREEN_WIDTH;
D_800DC5EC->screenHeight = SCREEN_HEIGHT;
+1 -3
View File
@@ -21,8 +21,6 @@ extern u16 gIsInQuitToMenuTransition;
extern Gfx D_00284F70[];
extern Gfx D_00284EE0[];
extern Camera cameras[];
extern f32 D_80150148, D_8015014C, D_80150150;
extern f32 D_80150130[];
@@ -66,7 +64,7 @@ void func_80281D00(void) {
guPerspective((Mtx*) &gGfxPool->mtxPool[1], &sp64[39], D_80150130[0], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp64[39]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt((Mtx*) &gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt((Mtx*) &gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[7]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
mtxf_identity(&sp64[6]);
func_802B4FF8(&sp64[6], 0);
+1 -1
View File
@@ -611,7 +611,7 @@ void func_8000142C(void) {
D_800DC514 = 0;
}
temp_v0 = camera1->rotX[1];
temp_v0 = camera1->rot[1];
D_801625E8 = D_800DC5EC->pathCounter;
if (temp_v0 < 0x2000) {
func_80057A50(40, 100, "SOUTH ", D_801625E8);
+1
View File
@@ -49,6 +49,7 @@ s16 func_802B7D28(f32);
u16 random_u16();
u16 random_int(u16);
s16 func_802B7F34(f32, f32, f32, f32);
void func_802B7F7C(Vec3f, Vec3f, Vec3s);
f32 sins(u16);
f32 coss(u16);
+1 -1
View File
@@ -451,7 +451,7 @@ s32 func_80041980(Vec3f arg0, Camera *arg1, u16 arg2) {
s32 ret;
ret = 0;
temp_t9 = (func_80041770(arg1->pos[0], arg0[0], arg1->pos[2], arg0[2]) + (arg2 / 2)) - arg1->rotX[1];
temp_t9 = (func_80041770(arg1->pos[0], arg0[0], arg1->pos[2], arg0[2]) + (arg2 / 2)) - arg1->rot[1];
if ((temp_t9 >= 0) && (arg2 >= temp_t9)) {
ret = 1;
}
+1 -5
View File
@@ -5,6 +5,7 @@
#include <config.h>
#include <defines.h>
#include "waypoints.h"
#include "camera.h"
extern Player *gPlayerTwo;
extern Player *gPlayerThree;
@@ -12,11 +13,6 @@ extern Player *gPlayerFour;
extern Player *gPlayerOneCopy;
extern Player *gPlayerTwoCopy;
extern struct Camera *camera1;
extern struct Camera *camera2;
extern struct Camera *camera3;
extern struct Camera *camera4;
extern struct Controller gControllers[];
extern struct Controller *gControllerOne;
extern struct Controller *gControllerThree;
+3 -3
View File
@@ -34,13 +34,13 @@ extern s32 D_802B87CC;
void func_802A7658(s32, s32, s32, s32, u16*, u16*);
s32 func_80290C20(Camera *camera) {
if (camera->unk14 == 0) {
if (camera->unk_54.unk34 == 0) {
return 1;
}
if ((camera->unk13 == 1) && (camera->collisionY < 3.0f)) {
if ((camera->unk_54.unk30 == 1) && (camera->unk_54.unk3C < 3.0f)) {
return 1;
}
if ((camera->unk13_and_a_half == 1) && (camera->collisionZ < 3.0f)) {
if ((camera->unk_54.unk32 == 1) && (camera->unk_54.unk40 < 3.0f)) {
return 1;
}
return 0;
+11 -10
View File
@@ -6,6 +6,7 @@
#include <common_structs.h>
#include <variables.h>
#include <config.h>
#include "camera.h"
void func_802A41D4();
@@ -988,8 +989,8 @@ void func_802A59A4(void) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2],
camera->unk, camera->unk1, camera->unk2, camera->angleX,
camera->angleY, camera->angleZ);
camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0],
camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[7]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
mtxf_identity(sp5C);
@@ -1036,7 +1037,7 @@ void func_802A5CB4(void) {
guPerspective(&gGfxPool->mtxPool[1], &sp9A[17], D_80150130[0], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp9A[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
@@ -1085,7 +1086,7 @@ void func_802A5FAC(void) {
guPerspective(&gGfxPool->mtxPool[2], &sp9A[17], D_80150130[1], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp9A[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[8], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[8], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
//D_801647A8, D_801647AC, D_801647B0, D_801647B4, D_801647B8, D_801647BC, D_801647C0, D_801647C4, D_801647C8);
@@ -1133,7 +1134,7 @@ void func_802A62A4(void) {
guPerspective(&gGfxPool->mtxPool[1], &sp9A[17], D_80150130[0], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp9A[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
@@ -1181,7 +1182,7 @@ void func_802A65B8(void) {
guPerspective(&gGfxPool->mtxPool[2], &sp9A[17], D_80150130[1], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp9A[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[8], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[8], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[8]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
@@ -1227,7 +1228,7 @@ void func_802A68CC(void) {
guPerspective(&gGfxPool->mtxPool[1], &sp9A[17], D_80150130[0], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp9A[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[7], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[7]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
@@ -1274,7 +1275,7 @@ void func_802A6BB0(void) {
gDPHalf1(gDisplayListHead++, sp9A[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[8], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[8], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[8]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
mtxf_identity(sp58);
@@ -1318,7 +1319,7 @@ void func_802A6E94(void) {
guPerspective(&gGfxPool->mtxPool[3], &sp9A[17], D_80150130[2], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp9A[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[9], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[9], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[9]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
@@ -1373,7 +1374,7 @@ void func_802A7178(void) {
guPerspective(&gGfxPool->mtxPool[4], &sp92[17], D_80150130[3], D_80150148, D_80150150, D_8015014C, 1.0f);
gDPHalf1(gDisplayListHead++, sp92[17]);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[4]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(&gGfxPool->mtxPool[10], camera->pos[0], camera->pos[1], camera->pos[2], camera->unk, camera->unk1, camera->unk2, camera->angleX, camera->angleY, camera->angleZ);
guLookAt(&gGfxPool->mtxPool[10], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
if (D_800DC5C8 == 0) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[10]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
mtxf_identity(sp50);