diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2023-10-10 23:48:46 -0700 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2023-10-10 23:48:46 -0700 |
| commit | f63b762c8dd677cfd127bf90f7eff0f82bad4533 (patch) | |
| tree | f0f2b438c85316314873ac484acf8f01996416cc /include/JSystem | |
| parent | 282de23ae645a4592acfedb2108de5c1ec03a16b (diff) | |
J3DUClipper halfway
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJoint.h | 4 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShape.h | 6 | ||||
| -rw-r--r-- | include/JSystem/J3DU/J3DUClipper.h | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index a0edeb22..f3c93e6c 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -124,8 +124,8 @@ public: J3DMaterial* getMesh() { return mMesh; } u16 getJntNo() const { return mJntNo; } - u8 getKind() const { return mKind; } - u8 getMtxType() const { return getKind() >> 4; } + u8 getKind() const { return mKind & 0x0F; } + u8 getMtxType() const { return mKind >> 4; } u8 getScaleCompensate() const { return mScaleCompensate; } void setCurrentMtxCalc(J3DMtxCalc* pMtxCalc) { mCurrentMtxCalc = pMtxCalc; } J3DTransformInfo& getTransformInfo() { return mTransformInfo; } diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index 1346f0ae..944fe20c 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -53,7 +53,7 @@ class J3DVertexData; class J3DDrawMtxData; enum J3DShpFlag { - J3DShpFlag_Visible = 0x0001, + J3DShpFlag_Hide = 0x0001, J3DShpFlag_SkinPosCpu = 0x0004, J3DShpFlag_SkinNrmCpu = 0x0008, J3DShpFlag_Hidden = 0x0010, @@ -95,8 +95,8 @@ public: void setVertexDataPointer(J3DVertexData* pVtxData) { mVertexData = pVtxData; } void* getVcdVatCmd() const { return mVcdVatCmd; } void setVcdVatCmd(void* pVatCmd) { mVcdVatCmd = (u8*)pVatCmd; } - void show() { offFlag(J3DShpFlag_Visible); } - void hide() { onFlag(J3DShpFlag_Visible); } + void show() { offFlag(J3DShpFlag_Hide); } + void hide() { onFlag(J3DShpFlag_Hide); } void setCurrentViewNoPtr(u32* pViewNoPtr) { mCurrentViewNo = pViewNoPtr; } void setCurrentMtx(J3DCurrentMtx& mtx) { mCurrentMtx = mtx; } void setScaleFlagArray(u8* pScaleFlagArray) { mScaleFlagArray = pScaleFlagArray; } diff --git a/include/JSystem/J3DU/J3DUClipper.h b/include/JSystem/J3DU/J3DUClipper.h index 84d8a108..8f5a9df3 100644 --- a/include/JSystem/J3DU/J3DUClipper.h +++ b/include/JSystem/J3DU/J3DUClipper.h @@ -4,6 +4,8 @@ #include "dolphin/mtx/mtxvec.h" #include "dolphin/types.h" +class J3DModel; + class J3DUClipper { public: J3DUClipper() { init(); } @@ -12,6 +14,7 @@ public: void calcViewFrustum(); u32 clip(const Mtx, Vec, f32); u32 clip(const Mtx, Vec*, Vec*); + u32 clipByBox(J3DModel*); void setFovy(f32 fovy) { mFovY = fovy; } void setAspect(f32 aspect) { mAspect = aspect; } @@ -21,10 +24,7 @@ public: f32 getFar() { return mFar; } private: - /* 0x04 */ Vec _04; - /* 0x10 */ Vec _10; - /* 0x1C */ Vec _1C; - /* 0x28 */ Vec _28; + /* 0x04 */ Vec mPlane[4]; /* 0x34 */ u8 _34[0x4C - 0x34]; /* 0x4C */ f32 mFovY; /* 0x50 */ f32 mAspect; |
