summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/GScamera.h62
-rw-r--r--include/GSnull.h8
-rw-r--r--include/SDK/mtx.h46
-rw-r--r--include/code_80223694.h18
-rw-r--r--include/gUnkClass12.h24
-rw-r--r--include/gUnkClass13.h21
6 files changed, 141 insertions, 38 deletions
diff --git a/include/GScamera.h b/include/GScamera.h
new file mode 100644
index 0000000..2b73c27
--- /dev/null
+++ b/include/GScamera.h
@@ -0,0 +1,62 @@
+#ifndef POKEREVO_GSCAMERA_H
+#define POKEREVO_GSCAMERA_H
+
+#include "GSnull.h"
+#include "code_801DD5C8.h"
+
+class GScamera : public GSnull
+{
+ u32 unk104; // flags
+ gUnkClass10* unk108;
+ Mtx44 unk10C; // orthographic projection matrix. TODO: this could be a C++ wrapper for Mtx44
+
+ // TODO: Is unk14C~unk164 an array of floats initialized to 0s with an initializer list?
+ // NOTE: This hack is only needed because GScamera's constructors write 0 to unk14C~unk164
+ // as if they were s32's, yet other functions treat them as floats
+ union s32float
+ {
+ s32 i;
+ float f;
+ };
+
+ s32float unk14C;
+ s32float unk150;
+ s32float unk154;
+ s32float unk158;
+ s32float unk15C;
+ s32float unk160;
+ s32float unk164;
+
+ // view volume coordinates for the orthographic projection matrix
+ float unk168; // top
+ float unk16C; // bottom
+ float unk170; // left
+ float unk174; // right
+
+ float unk178;
+
+ Vec unk17C;
+ Vec unk188;
+ Vec unk194;
+ Vec unk1A0;
+ Point3d unk1AC; // camera position
+ Vec unk1B8; // camera up vector
+ Point3d unk1C4; // target posiiton
+ GScamera* unk1D0;
+ Mtx unk1D4; // viewing matrix
+ Mtx unk204; // inverse of the viewing matrix
+ Mtx unk234; // inverse-transpose of the viewing matrix
+public:
+ GScamera(); // 801DDF78
+ GScamera(void* p1, gUnkClass10* p2); // 801DE084
+ void func_801DE1F8();
+ void func_801DE524();
+ friend void func_801DEA3C(Mtx p1, GScamera* p2, Mtx p3, BOOL p4);
+ void lbl_801DEEF8(gUnkClass12* p1, u32 p2, float p3);
+ virtual ~GScamera(); // 801DE19C
+ virtual void func1(float p1); // 801DECBC
+ virtual void func2(BOOL p1); // 801DED3C
+ virtual void func3(); // 801DE5F8
+};
+
+#endif //POKEREVO_GSCAMERA_H
diff --git a/include/GSnull.h b/include/GSnull.h
index 21fc2b4..e152cd8 100644
--- a/include/GSnull.h
+++ b/include/GSnull.h
@@ -7,7 +7,6 @@ extern "C" {
#include "GSblendObject.h"
-// TODO: namespace?
struct gUnkClass11
{
Vec unk0;
@@ -36,10 +35,9 @@ protected:
u8 unk12[0xBE];
Mtx unkD0;
public:
- // 801F1AE8
- GSnull(u8 p1);
- // 801F1BC8
- GSnull(void* p1, gUnkClass10* p2); // TODO: p1 type
+
+ GSnull(u8 p1); // 801F1AE8
+ GSnull(void* p1, gUnkClass10* p2); // 801F1BC8 // TODO: p1 type
virtual ~GSnull(); // 801F1F24
virtual void func1(float p1); // 801F3960
virtual void func2(BOOL p1); // 801F39E8
diff --git a/include/SDK/mtx.h b/include/SDK/mtx.h
index 9bff30f..2a0845e 100644
--- a/include/SDK/mtx.h
+++ b/include/SDK/mtx.h
@@ -24,60 +24,40 @@ typedef struct Quaternion
} Quaternion;
void PSMTXTranspose(const Mtx src, Mtx xPose);
-#define MTXTranspose PSMTXTranspose
-
void PSMTXCopy(const Mtx src, Mtx dest);
-#define MTXCopy PSMTXCopy
-
void C_MTXLookAt(Mtx m, const Point3d* camPos, const Vec* camUp, const Point3d* target);
-#define MTXLookAt C_MTXLookAt
-
-void PSVECAdd(const Vec* a, const Vec* b, Vec* ab);
-#define VECAdd PSVECAdd
-
void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dest);
-#define MTXMultVecSR PSMTXMultVecSR
-
void PSMTXMultVec(const Mtx m, const Vec* src, Vec* dest);
-#define MTXMultVec PSMTXMultVec
-
u32 PSMTXInverse(const Mtx src, Mtx inv);
-#define MTXInverse PSMTXInverse
-
+void PSMTXConcat(const Mtx a, const Mtx b, Mtx ab);
+void PSMTXQuat(Mtx m, const Quaternion* q);
+void C_QUATRotAxisRad(Quaternion* r, const Vec* axis, float rad);
+void PSMTXScale(Mtx m, float xS, float yS, float zS);
+void PSMTXIdentity(Mtx m);
+void PSVECAdd(const Vec* a, const Vec* b, Vec* ab);
void PSVECCrossProduct(const Vec* a, const Vec* b, Vec* axb);
void PSVECNormalize(const Vec* src, Vec* unit);
void PSVECSubtract(const Vec* a, const Vec* b, Vec* a_b);
-
-
-
+#define MTXTranspose PSMTXTranspose
+#define MTXCopy PSMTXCopy
+#define MTXLookAt C_MTXLookAt
+#define VECAdd PSVECAdd
+#define MTXMultVecSR PSMTXMultVecSR
+#define MTXMultVec PSMTXMultVec
+#define MTXInverse PSMTXInverse
#define MTXConcat PSMTXConcat
-void PSMTXConcat(const Mtx a, const Mtx b, Mtx ab);
-
#define MTXQuat PSMTXQuat
-void PSMTXQuat(Mtx m, const Quaternion* q);
-
#define QUATRotAxisRad C_QUATRotAxisRad
-void C_QUATRotAxisRad(Quaternion* r, const Vec* axis, float rad);
-
-void PSMTXScale(Mtx m, float xS, float yS, float zS);
-
-
-
#define VECSubtract PSVECSubtract
#define VECCrossProduct PSVECCrossProduct
#define VECNormalize PSVECNormalize
-
-
#define MTXIdentity PSMTXIdentity
#define MTXScale PSMTXScale
#define MTXCopy PSMTXCopy
-void PSMTXIdentity(Mtx m);
-
#ifdef __cplusplus
}
#endif
-
#endif //POKEREVO_MTX_H
diff --git a/include/code_80223694.h b/include/code_80223694.h
new file mode 100644
index 0000000..bc8cde1
--- /dev/null
+++ b/include/code_80223694.h
@@ -0,0 +1,18 @@
+#ifndef POKEREVO_CODE_80223694_H
+#define POKEREVO_CODE_80223694_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <SDK/mtx.h>
+
+void func_80223694(Mtx44 m, float t, float b, float l, float r, float n, float f); // C_MTXFrustum
+void func_80223698(Mtx44 m, float t, float b, float l, float r, float n, float f); // C_MTXOrtho
+void func_8022369C(Mtx44 m, float fovy, float aspect, float n, float f); // C_MTXPerspective
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_CODE_80223694_H
diff --git a/include/gUnkClass12.h b/include/gUnkClass12.h
new file mode 100644
index 0000000..53b57db
--- /dev/null
+++ b/include/gUnkClass12.h
@@ -0,0 +1,24 @@
+#ifndef POKEREVO_GUNKCLASS12_H
+#define POKEREVO_GUNKCLASS12_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// TODO: same as gUnkClass9?
+// NOTE: It may be possible to use RTTI data to determine the name of this class
+struct gUnkClass12
+{
+ u8 unk0; // pad
+ u8 unk1;
+};
+
+// TODO: convert to member functions
+void func_801E1278(gUnkClass12*, Vec*, float);
+void func_801E10C0(gUnkClass12*, float*, float);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_GUNKCLASS12_H
diff --git a/include/gUnkClass13.h b/include/gUnkClass13.h
new file mode 100644
index 0000000..bafb84c
--- /dev/null
+++ b/include/gUnkClass13.h
@@ -0,0 +1,21 @@
+#ifndef POKEREVO_GUNKCLASS13_H
+#define POKEREVO_GUNKCLASS13_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct gUnkClass13
+{
+ u8 unk0[0x7A]; //pad
+ u8 unk7A;
+};
+
+// TODO: determine defining module for this global variable
+extern gUnkClass13* lbl_8063F788;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_GUNKCLASS13_H