diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-06-18 20:14:26 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-06-18 20:14:26 -0400 |
| commit | ede01ca07bb0b79f27369f82cda41e5cb13697a8 (patch) | |
| tree | f571e952d80852011c36d84898c5a153b91994ff /include/JSystem/J3DGraphBase | |
| parent | 264ee5d6e1cacf0c3bae2dd1a83fe15052d35b94 (diff) | |
daPy_lk_c::draw and linkDraw matched on retail with (void)0 assert, d_a_figure OK
Diffstat (limited to 'include/JSystem/J3DGraphBase')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DSys.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h index 58e9bac9..e43e022a 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/include/JSystem/J3DGraphBase/J3DSys.h @@ -1,6 +1,7 @@ #ifndef J3DSYS_H #define J3DSYS_H +#include "JSystem/JUtility/JUTAssert.h" #include "dolphin/gx/GX.h" #include "dolphin/types.h" @@ -53,13 +54,13 @@ public: void setDrawModeXlu() { mDrawMode = XLU; } - void* getVtxPos() const { return mVtxPos; } + void* getVtxPos() { return mVtxPos; } void setVtxPos(void* pVtxPos) { mVtxPos = pVtxPos; } - void* getVtxNrm() const { return mVtxNrm; } + void* getVtxNrm() { return mVtxNrm; } void setVtxNrm(void* pVtxNrm) { mVtxNrm = pVtxNrm; } - void* getVtxCol() const { return mVtxCol; } + void* getVtxCol() { return mVtxCol; } void setVtxCol(GXColor* pVtxCol) { mVtxCol = pVtxCol; } void setModel(J3DModel* pModel) { mModel = pModel; } @@ -69,7 +70,7 @@ public: void setMaterialMode(u32 mode) { mMaterialMode = mode; } void setCurrentMtxCalc(J3DMtxCalc * pCalc) { mCurrentMtxCalc = pCalc; } - J3DMtxCalc * getCurrentMtxCalc() const { return mCurrentMtxCalc; } + J3DMtxCalc * getCurrentMtxCalc() { return mCurrentMtxCalc; } void setTexture(J3DTexture* pTex) { mTexture = pTex; } J3DTexture* getTexture() { return mTexture; } @@ -92,14 +93,21 @@ public: // Type 0: Opa Buffer // Type 1: Xlu Buffer - void setDrawBuffer(J3DDrawBuffer* buffer, int type) { mDrawBuffer[type] = buffer; } + void setDrawBuffer(J3DDrawBuffer* buffer, int type) { + J3D_ASSERT(114, type >= 0 && type < 2, "Error : range over."); + J3D_ASSERT(115, buffer, "Error : null pointer."); + mDrawBuffer[type] = buffer; + } // Type 0: Opa Buffer // Type 1: Xlu Buffer - J3DDrawBuffer* getDrawBuffer(int type) { return mDrawBuffer[type]; } + J3DDrawBuffer* getDrawBuffer(int type) { + J3D_ASSERT(121, type >= 0 && type < 2, "Error : range over."); + return mDrawBuffer[type]; + } - Mtx& getModelDrawMtx(u16 no) const { return mModelDrawMtx[no]; } - J3DShapePacket* getShapePacket() const { return mShapePacket; } + Mtx& getModelDrawMtx(u16 no) { return mModelDrawMtx[no]; } + J3DShapePacket* getShapePacket() { return mShapePacket; } J3DModel* getModel() { return mModel; } Vec* getNBTScale() { return mNBTScale; } |
