summaryrefslogtreecommitdiff
path: root/include/game.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xinclude/game.h45
1 files changed, 43 insertions, 2 deletions
diff --git a/include/game.h b/include/game.h
index 7382c34..93d8ae1 100755
--- a/include/game.h
+++ b/include/game.h
@@ -77,7 +77,6 @@ bool IsWideScreen();
#define GAMEMGR_GET_AFC(gmgr) (*((bool*)(((u32)(gmgr))+0xAFC)))
-
#define COND_COIN1 1
#define COND_COIN2 2
#define COND_COIN3 4
@@ -331,6 +330,48 @@ public:
};
+
+class mMtx {
+ Mtx data;
+
+ public:
+ mMtx(float _00, float _01, float _02, float _03,
+ float _10, float _11, float _12, float _13,
+ float _20, float _21, float _22, float _23);
+
+ float* operator[](int row) { return data[row]; }
+
+ operator MtxPtr() const { return (MtxPtr)this; }
+
+ /* Create New Ones */
+ void identity();
+
+ void translation(float x, float y, float z) { MTXTrans(data, x, y, z); }
+ void scale(float x, float y, float z) { MTXScale(data, x, y, z); }
+
+ void rotationX(s16 *amount);
+ void rotationY(s16 *amount);
+ void rotationZ(s16 *amount);
+
+ /* Applied Manipulations */
+ void applyTranslation(float x, float y, float z) { MTXTransApply(data, data, x, y, z); }
+ void applyScale(float x, float y, float z) { MTXScaleApply(data, data, x, y, z); }
+
+ void applyRotationX(s16 *amount);
+ void applyRotationY(s16 *amount);
+ void applyRotationZ(s16 *amount);
+
+ void applyRotationYXZ(s16 *x, s16 *y, s16 *z);
+ void applyRotationZYX(s16 *x, s16 *y, s16 *z);
+
+ /* Get Stuff */
+ void getTranslation(Vec *target);
+
+ void getUnknown(S16Vec *target);
+};
+
+
+
namespace nw4r {
namespace ut {
@@ -1271,7 +1312,7 @@ public:
class dActor_c : public dBase_c {
public:
LinkListEntry link_actor;
- Mtx matrix;
+ mMtx matrix;
Vec pos;
Vec last_pos;
Vec pos_delta;