summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2020-04-05 13:54:17 -0400
committerGitHub <noreply@github.com>2020-04-05 13:54:17 -0400
commitd975d809b8f65ce69b76804ea6d89e329bfd702b (patch)
tree05f633aaa4ba96763285943df7bab70bf10cceed /include
parentab669e16ebaa18fd60a367c9d50be2f2c9800c09 (diff)
parentfd38a9f2b7a98c25311a735846db1e8c04298120 (diff)
Merge pull request #51 from Thar0/z_view
Decompile z_view.c
Diffstat (limited to 'include')
-rw-r--r--include/functions.h51
-rw-r--r--include/z64.h46
2 files changed, 72 insertions, 25 deletions
diff --git a/include/functions.h b/include/functions.h
index b1c8fcbbf..9dcdad1af 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -1263,27 +1263,36 @@ u32 func_800AA148();
void func_800AA15C();
void func_800AA16C();
void func_800AA178(u32);
-// ? func_800AA190(?);
+void func_800AA190(UnkViewStruct* arg0, Viewport* viewport);
+View* func_800AA1F8(GraphicsContext* gfxCtx);
+void func_800AA250(View* view);
void func_800AA278(View*, GraphicsContext*);
-// ? func_800AA358(?);
-// ? func_800AA43C(?);
-void func_800AA460(View*, f32, f32, f32);
-// ? func_800AA4FC(?);
-// ? func_800AA550(?);
-void func_800AA76C(View*, f32, f32, f32);
-void func_800AA78C(View*, f32, f32, f32);
-void func_800AA7AC(View*, f32);
-// ? func_800AA7B8(?);
-// ? func_800AA814(?);
-// ? func_800AA890(?);
-// ? func_800AAA50(?);
-// ? func_800AAA9C(?);
-// ? func_800AB0A8(?);
-// ? func_800AB2C4(?);
-// ? func_800AB560(?);
-// ? func_800AB944(?);
+void func_800AA358(View* view, Vec3f* vec1, Vec3f* vec2, Vec3f* vec3);
+void func_800AA3F0(View* view, Vec3f* vec1, Vec3f* vec2, Vec3f* vec3);
+void func_800AA43C(View* view, f32 arg1);
+void func_800AA454(View* view, f32* arg1);
+void func_800AA460(View* view, f32 fieldOfView, f32 fogDistance, f32 zDepth);
+void func_800AA48C(View* view, f32* fieldOfView, f32* fogDistance, f32* zDepth);
+void func_800AA4A8(View* view, f32 fieldOfView, f32 fogDistance, f32 zDepth);
+void func_800AA4E0(View* view, f32* fieldOfView, f32* fogDistance, f32* zDepth);
+void func_800AA4FC(View* view, Viewport* viewport);
+void func_800AA52C(View* view, Viewport* viewport);
+void func_800AA550(View* view);
+void func_800AA76C(View* view, f32 arg1, f32 arg2, f32 arg3);
+void func_800AA78C(View* view, f32 arg1, f32 arg2, f32 arg3);
+void func_800AA7AC(View* view, f32 arg1);
+void func_800AA7B8(View* view);
+void func_800AA814(View* view);
+void func_800AA840(View* view, Vec3f vec1, Vec3f vec2, f32 arg3);
+s32 func_800AA890(View* view, Mtx* mtx);
+void func_800AAA50(View* view, s32 arg1);
+s32 func_800AAA9C(View* view);
+s32 func_800AB0A8(View* view);
+s32 func_800AB2C4(View* view);
+s32 func_800AB560(View* view);
+s32 func_800AB944(View* view);
// ? func_800AB9EC(?);
-void func_800ABE74(f32, f32, f32);
+s32 func_800ABE74(f32 eyeX, f32 eyeY, f32 eyeZ);
// ? func_800AC030(?);
// ? func_800AC2F4(?);
// ? func_800AC89C(?);
@@ -2344,7 +2353,7 @@ s16 sins(u16);
// ? func_80101AA4(?);
// ? func_80101B40(?);
// ? func_80101B90(?);
-// ? func_80101E34(?);
+void func_80101E34(MtxF*, f32, f32, f32, f32, f32, f32, f32, f32, f32);
// ? func_80101EB0(?);
// ? func_801021E4(?);
// ? osStopTimer(?);
@@ -2378,7 +2387,7 @@ void osDpSetStatus(u32 status);
// ? func_801041E0(?);
// ? func_801043B8(?);
// ? func_80104450(?);
-// ? func_801045A4(?);
+void func_801045A4(Mtx*, f32, f32, f32, f32, f32, f32, f32);
f32 cosf(f32);
s16 coss(u16);
void osViSetEvent(OSMesgQueue* mq, OSMesg m, u32 retraceCount);
diff --git a/include/z64.h b/include/z64.h
index ce839ef67..bb5569ffc 100644
--- a/include/z64.h
+++ b/include/z64.h
@@ -319,11 +319,49 @@ typedef struct {
} Input; // size = 0x18
typedef struct {
- /* 0x0000 */ char unk_00[0x28];
+ /* 0x0000 */ s16 unk_0;
+ /* 0x0002 */ s16 unk_2;
+ /* 0x0004 */ u16 unk_4;
+ /* 0x0004 */ u16 unk_6;
+ /* 0x0008 */ s16 unk_8;
+ /* 0x000A */ s16 unk_A;
+ /* 0x000C */ u16 unk_C;
+ /* 0x000E */ u16 unk_E;
+} UnkViewStruct; // size = 0x10, probably a viewport in disguise
+
+typedef struct {
+ /* 0x0000 */ s32 topY; // uly (upper left y)
+ /* 0x0004 */ s32 bottomY; // lry (lower right y)
+ /* 0x0008 */ s32 leftX; // ulx (upper left x)
+ /* 0x000C */ s32 rightX; // lrx (lower right x)
+} Viewport; // size = 0x10
+
+typedef struct {
+ /* 0x0000 */ s32 magic; // string literal "VIEW" / 0x56494557
+ /* 0x0004 */ GraphicsContext* gfxCtx;
+ /* 0x0008 */ Viewport viewport;
+ /* 0x0018 */ f32 fieldOfView; // fovy
+ /* 0x001C */ f32 fogDistance; // near
+ /* 0x0020 */ f32 zDepth; // far
+ /* 0x0024 */ f32 unk_24; // scale
/* 0x0028 */ Vec3f eye;
- /* 0x0034 */ char unk_34[0xEC];
- /* 0x0120 */ u32 unk_120;
- /* 0x0124 */ char unk_124[4];
+ /* 0x0034 */ Vec3f unk_34;
+ /* 0x0040 */ Vec3f unk_40;
+ /* 0x004C */ char unk_4C[0x04];
+ /* 0x0050 */ Viewport unk_50;
+ /* 0x0060 */ Mtx unk_60;
+ /* 0x00A0 */ MtxF unk_A0;
+ /* 0x00E0 */ Mtx* unk_E0;
+ /* 0x00E4 */ MtxF* unk_E4;
+ /* 0x00E8 */ Vec3f unk_E8;
+ /* 0x00F4 */ Vec3f unk_F4;
+ /* 0x0100 */ f32 unk_100;
+ /* 0x0104 */ Vec3f unk_104;
+ /* 0x0110 */ Vec3f unk_110;
+ /* 0x011C */ u16 unk_11C; // normal
+ /* 0x011E */ u16 unk_11E;
+ /* 0x0120 */ s32 unk_120;
+ /* 0x0124 */ s32 unk_124;
} View; // size = 0x128
typedef struct {