summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DAnimation.h20
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DCluster.h7
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DShapeTable.h1
-rw-r--r--include/JSystem/J3DGraphBase/J3DMatBlock.h343
-rw-r--r--include/JSystem/J3DGraphBase/J3DShapeMtx.h7
-rw-r--r--include/JSystem/J3DGraphBase/J3DSys.h5
-rw-r--r--include/JSystem/J3DGraphBase/J3DTexture.h6
-rw-r--r--include/JSystem/JUtility/JUTAssert.h4
-rw-r--r--include/d/actor/d_a_obj_movebox.h9
-rw-r--r--include/d/actor/d_a_player_main.h8
-rw-r--r--include/d/actor/d_a_salvage.h8
-rw-r--r--include/d/d_attention.h6
-rw-r--r--include/d/d_com_inf_game.h12
-rw-r--r--include/d/d_map.h63
-rw-r--r--include/m_Do/m_Do_MemCard.h3
15 files changed, 279 insertions, 223 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
index b75788d3..c25b7996 100644
--- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h
+++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
@@ -424,7 +424,10 @@ public:
calcTransform(getFrame(), idx, pSRTInfo);
}
- u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; }
+ u16 getUpdateMaterialID(u16 idx) const {
+ J3D_ASSERT(1029, idx < mTrackNum / 3, "Error : range over.");
+ return mUpdateMaterialID[idx];
+ }
u16 getUpdateMaterialNum() const { return mTrackNum / 3; }
JUTNameTab * getUpdateMaterialName() { return &mUpdateMaterialName; }
u16 getUpdateTexMtxID(u16 idx) const {
@@ -515,7 +518,10 @@ public:
void searchUpdateMaterialID(J3DMaterialTable*);
void searchUpdateMaterialID(J3DModelData*);
- u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; }
+ u16 getUpdateMaterialID(u16 idx) const {
+ J3D_ASSERT(2288, idx < mUpdateMaterialNum, "Error : range over.");
+ return mUpdateMaterialID[idx];
+ }
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
JUTNameTab * getUpdateMaterialName() { return &mUpdateMaterialName; }
@@ -570,8 +576,14 @@ public:
u16 getCRegUpdateMaterialNum() const { return mCRegUpdateMaterialNum; }
u16 getKRegUpdateMaterialNum() const { return mKRegUpdateMaterialNum; }
- u16 getCRegUpdateMaterialID(u16 idx) const { return mCRegUpdateMaterialID[idx]; }
- u16 getKRegUpdateMaterialID(u16 idx) const { return mKRegUpdateMaterialID[idx]; }
+ u16 getCRegUpdateMaterialID(u16 idx) const {
+ J3D_ASSERT(2100, idx < mCRegUpdateMaterialNum, "Error : range over.");
+ return mCRegUpdateMaterialID[idx];
+ }
+ u16 getKRegUpdateMaterialID(u16 idx) const {
+ J3D_ASSERT(2140, idx < mKRegUpdateMaterialNum, "Error : range over.");
+ return mKRegUpdateMaterialID[idx];
+ }
JUTNameTab * getCRegUpdateMaterialName() { return &mCRegUpdateMaterialName; }
JUTNameTab * getKRegUpdateMaterialName() { return &mKRegUpdateMaterialName; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DCluster.h b/include/JSystem/J3DGraphAnimator/J3DCluster.h
index 00038a87..1720e073 100644
--- a/include/JSystem/J3DGraphAnimator/J3DCluster.h
+++ b/include/JSystem/J3DGraphAnimator/J3DCluster.h
@@ -71,10 +71,13 @@ public:
u16 getClusterNum() const { return mClusterNum; }
u16 getClusterKeyNum() const { return mClusterKeyNum; }
J3DCluster* getClusterPointer(u16 index) {
- J3D_ASSERT(186, (index < mClusterNum),"Error : range over.");
+ J3D_ASSERT(186, (index < mClusterNum), "Error : range over.");
return &mClusterPointer[index];
}
- J3DClusterKey* getClusterKeyPointer(u16 i) { return &mClusterKeyPointer[i]; }
+ J3DClusterKey* getClusterKeyPointer(u16 i) {
+ J3D_ASSERT(199, (i < mClusterKeyNum), "Error : range over.");
+ return &mClusterKeyPointer[i];
+ }
f32* getVtxPos() { return mVtxPos; }
f32* getVtxNrm() { return mVtxNrm; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DShapeTable.h b/include/JSystem/J3DGraphAnimator/J3DShapeTable.h
index 55c7cab7..426866af 100644
--- a/include/JSystem/J3DGraphAnimator/J3DShapeTable.h
+++ b/include/JSystem/J3DGraphAnimator/J3DShapeTable.h
@@ -6,6 +6,7 @@
class JUTNameTab;
+// TODO: This class doesn't seem to exist in the debug maps, probably copied from TP. Remove?
class J3DShapeTable {
public:
inline void clear() {
diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h
index 67434e80..41a98e0b 100644
--- a/include/JSystem/J3DGraphBase/J3DMatBlock.h
+++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h
@@ -82,10 +82,10 @@ public:
virtual void setTexGenNum(u32 const* pNum) { mTexGenNum = *pNum; }
virtual void setTexGenNum(u32 num) { mTexGenNum = num; }
virtual u32 getTexGenNum() const { return mTexGenNum; }
- virtual void setTexCoord(u32 i, J3DTexCoord const* pCoord) { mTexCoord[i] = *pCoord; }
- virtual J3DTexCoord* getTexCoord(u32 i) { return &mTexCoord[i]; }
- virtual void setTexMtx(u32 i, J3DTexMtx* pMtx) { mTexMtx[i] = pMtx; }
- virtual J3DTexMtx* getTexMtx(u32 i) { return mTexMtx[i]; }
+ virtual void setTexCoord(u32 idx, J3DTexCoord const* pCoord) { mTexCoord[idx] = *pCoord; }
+ virtual J3DTexCoord* getTexCoord(u32 idx) { return &mTexCoord[idx]; }
+ virtual void setTexMtx(u32 idx, J3DTexMtx* pMtx) { mTexMtx[idx] = pMtx; }
+ virtual J3DTexMtx* getTexMtx(u32 idx) { return mTexMtx[idx]; }
virtual u32 getTexMtxOffset() const { return mTexMtxOffset; }
virtual void setTexMtxOffset(u32 offs) { mTexMtxOffset = offs; }
virtual ~J3DTexGenBlockPatched() {}
@@ -177,10 +177,10 @@ public:
virtual void setTevKColor(u32, J3DGXColor const*) {}
virtual void setTevKColor(u32, J3DGXColor) {}
virtual J3DGXColor* getTevKColor(u32) { return NULL; }
- virtual void setTevKColorSel(u32 i, const u8* pNum) {}
+ virtual void setTevKColorSel(u32 idx, const u8* pNum) {}
virtual void setTevKColorSel(u32, u8) {}
virtual u8 getTevKColorSel(u32) { return 0; }
- virtual void setTevKAlphaSel(u32 i, const u8* pNum) {}
+ virtual void setTevKAlphaSel(u32 idx, const u8* pNum) {}
virtual void setTevKAlphaSel(u32, u8) {}
virtual u8 getTevKAlphaSel(u32) { return 0; }
virtual void setTevStageNum(u8 const*) {}
@@ -189,9 +189,9 @@ public:
virtual void setTevStage(u32, J3DTevStage const*) {}
virtual void setTevStage(u32, J3DTevStage) {}
virtual J3DTevStage* getTevStage(u32) { return NULL; }
- virtual void setTevSwapModeInfo(u32 i, const J3DTevSwapModeInfo* pInfo) {}
- virtual void setTevSwapModeInfo(u32 i, J3DTevSwapModeInfo info) {}
- virtual void setTevSwapModeTable(u32 i, const J3DTevSwapModeTable* pTable) {}
+ virtual void setTevSwapModeInfo(u32 idx, const J3DTevSwapModeInfo* pInfo) {}
+ virtual void setTevSwapModeInfo(u32 idx, J3DTevSwapModeInfo info) {}
+ virtual void setTevSwapModeTable(u32 idx, const J3DTevSwapModeTable* pTable) {}
virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable) {}
virtual J3DTevSwapModeTable* getTevSwapModeTable(u32) { return NULL; }
virtual void setIndTevStage(u32, J3DIndTevStage const*) {}
@@ -232,27 +232,30 @@ public:
virtual void setTevStageNum(const u8* pNum) { mTevStageNum = *pNum; }
virtual void setTevStageNum(u8 num) { mTevStageNum = num; }
virtual u8 getTevStageNum() const { return mTevStageNum; }
- virtual void setTexNo(u32 i, const u16* pNo) { mTexNo[i] = *pNo; }
- virtual void setTexNo(u32 i, u16 no) { mTexNo[i] = no; }
- virtual u16 getTexNo(u32 i) const { return mTexNo[i]; }
- virtual void setTevOrder(u32 i, const J3DTevOrder* pOrder) { mTevOrder[i] = *pOrder; }
- virtual void setTevOrder(u32 i, J3DTevOrder order) { mTevOrder[i] = order; }
- virtual J3DTevOrder* getTevOrder(u32 i) { return &mTevOrder[i]; }
- virtual void setTevStage(u32 i, const J3DTevStage* pStage) { mTevStage[i] = *pStage; }
- virtual void setTevStage(u32 i, J3DTevStage stage) { mTevStage[i] = stage; }
- virtual J3DTevStage* getTevStage(u32 i) { return &mTevStage[i]; }
- virtual void setIndTevStage(u32 i, const J3DIndTevStage* pStage) { mIndTevStage[i] = *pStage; }
- virtual void setIndTevStage(u32 i, J3DIndTevStage stage) { mIndTevStage[i] = stage; }
- virtual J3DIndTevStage* getIndTevStage(u32 i) { return &mIndTevStage[i]; }
- virtual void setTevColor(u32 i, const J3DGXColorS10* pColor) { mTevColor[i] = *pColor; }
- virtual void setTevColor(u32 i, J3DGXColorS10 color) { mTevColor[i] = color; }
- virtual J3DGXColorS10* getTevColor(u32 i) { return &mTevColor[i]; }
- virtual void setTevKColor(u32 i, const J3DGXColor* pColor) { mTevKColor[i] = *pColor; }
- virtual void setTevKColor(u32 i, J3DGXColor color) { mTevKColor[i] = color; }
- virtual J3DGXColor* getTevKColor(u32 i) { return &mTevKColor[i]; }
- virtual void setTevKColorSel(u32 i, const u8* pSel) { mTevKColorSel[i] = *pSel; }
- virtual void setTevKColorSel(u32 i, u8 sel) { mTevKColorSel[i] = sel; }
- virtual u8 getTevKColorSel(u32 i) { return mTevKColorSel[i]; }
+ virtual void setTexNo(u32 idx, const u16* pNo) { mTexNo[idx] = *pNo; }
+ virtual void setTexNo(u32 idx, u16 no) { mTexNo[idx] = no; }
+ virtual u16 getTexNo(u32 idx) const {
+ J3D_ASSERT(1353, idx < 8, "Error : range over.");
+ return mTexNo[idx];
+ }
+ virtual void setTevOrder(u32 idx, const J3DTevOrder* pOrder) { mTevOrder[idx] = *pOrder; }
+ virtual void setTevOrder(u32 idx, J3DTevOrder order) { mTevOrder[idx] = order; }
+ virtual J3DTevOrder* getTevOrder(u32 idx) { return &mTevOrder[idx]; }
+ virtual void setTevStage(u32 idx, const J3DTevStage* pStage) { mTevStage[idx] = *pStage; }
+ virtual void setTevStage(u32 idx, J3DTevStage stage) { mTevStage[idx] = stage; }
+ virtual J3DTevStage* getTevStage(u32 idx) { return &mTevStage[idx]; }
+ virtual void setIndTevStage(u32 idx, const J3DIndTevStage* pStage) { mIndTevStage[idx] = *pStage; }
+ virtual void setIndTevStage(u32 idx, J3DIndTevStage stage) { mIndTevStage[idx] = stage; }
+ virtual J3DIndTevStage* getIndTevStage(u32 idx) { return &mIndTevStage[idx]; }
+ virtual void setTevColor(u32 idx, const J3DGXColorS10* pColor) { mTevColor[idx] = *pColor; }
+ virtual void setTevColor(u32 idx, J3DGXColorS10 color) { mTevColor[idx] = color; }
+ virtual J3DGXColorS10* getTevColor(u32 idx) { return &mTevColor[idx]; }
+ virtual void setTevKColor(u32 idx, const J3DGXColor* pColor) { mTevKColor[idx] = *pColor; }
+ virtual void setTevKColor(u32 idx, J3DGXColor color) { mTevKColor[idx] = color; }
+ virtual J3DGXColor* getTevKColor(u32 idx) { return &mTevKColor[idx]; }
+ virtual void setTevKColorSel(u32 idx, const u8* pSel) { mTevKColorSel[idx] = *pSel; }
+ virtual void setTevKColorSel(u32 idx, u8 sel) { mTevKColorSel[idx] = sel; }
+ virtual u8 getTevKColorSel(u32 idx) { return mTevKColorSel[idx]; }
virtual u32 getTexNoOffset() const { return mTexNoOffset; }
virtual u32 getTevRegOffset() const { return mTevRegOffset; }
@@ -303,42 +306,45 @@ public:
virtual void indexToPtr() { indexToPtr_private(mTexNoOffset); }
virtual u32 getType() { return 'TVB4'; }
virtual s32 countDLSize();
- virtual void setTexNo(u32 i, const u16* pNo) { mTexNo[i] = *pNo; }
- virtual void setTexNo(u32 i, u16 no) { mTexNo[i] = no; }
- virtual u16 getTexNo(u32 i) const { return mTexNo[i]; }
- virtual void setTevOrder(u32 i, const J3DTevOrder* pOrder) { mTevOrder[i] = *pOrder; }
- virtual void setTevOrder(u32 i, J3DTevOrder order) { mTevOrder[i] = order; }
- virtual J3DTevOrder* getTevOrder(u32 i) { return &mTevOrder[i]; }
- virtual void setTevColor(u32 i, const J3DGXColorS10* pColor) { mTevColor[i] = *pColor; }
- virtual void setTevColor(u32 i, J3DGXColorS10 color) { mTevColor[i] = color; }
- virtual J3DGXColorS10* getTevColor(u32 i) { return &mTevColor[i]; }
- virtual void setTevKColor(u32 i, const J3DGXColor* pColor) { mTevKColor[i] = *pColor; }
- virtual void setTevKColor(u32 i, J3DGXColor color) { mTevKColor[i] = color; }
- virtual J3DGXColor* getTevKColor(u32 i) { return &mTevKColor[i]; }
- virtual void setTevKColorSel(u32 i, const u8* pNum) { mTevKColorSel[i] = *pNum; }
- virtual void setTevKColorSel(u32 i, u8 num) { mTevKColorSel[i] = num; }
- virtual u8 getTevKColorSel(u32 i) { return mTevKColorSel[i]; }
- virtual void setTevKAlphaSel(u32 i, const u8* pNum) { mTevKAlphaSel[i] = *pNum; }
- virtual void setTevKAlphaSel(u32 i, u8 num) { mTevKAlphaSel[i] = num; }
- virtual u8 getTevKAlphaSel(u32 i) { return mTevKAlphaSel[i]; }
+ virtual void setTexNo(u32 idx, const u16* pNo) { mTexNo[idx] = *pNo; }
+ virtual void setTexNo(u32 idx, u16 no) { mTexNo[idx] = no; }
+ virtual u16 getTexNo(u32 idx) const {
+ J3D_ASSERT(2019, idx < 4, "Error : range over.");
+ return mTexNo[idx];
+ }
+ virtual void setTevOrder(u32 idx, const J3DTevOrder* pOrder) { mTevOrder[idx] = *pOrder; }
+ virtual void setTevOrder(u32 idx, J3DTevOrder order) { mTevOrder[idx] = order; }
+ virtual J3DTevOrder* getTevOrder(u32 idx) { return &mTevOrder[idx]; }
+ virtual void setTevColor(u32 idx, const J3DGXColorS10* pColor) { mTevColor[idx] = *pColor; }
+ virtual void setTevColor(u32 idx, J3DGXColorS10 color) { mTevColor[idx] = color; }
+ virtual J3DGXColorS10* getTevColor(u32 idx) { return &mTevColor[idx]; }
+ virtual void setTevKColor(u32 idx, const J3DGXColor* pColor) { mTevKColor[idx] = *pColor; }
+ virtual void setTevKColor(u32 idx, J3DGXColor color) { mTevKColor[idx] = color; }
+ virtual J3DGXColor* getTevKColor(u32 idx) { return &mTevKColor[idx]; }
+ virtual void setTevKColorSel(u32 idx, const u8* pNum) { mTevKColorSel[idx] = *pNum; }
+ virtual void setTevKColorSel(u32 idx, u8 num) { mTevKColorSel[idx] = num; }
+ virtual u8 getTevKColorSel(u32 idx) { return mTevKColorSel[idx]; }
+ virtual void setTevKAlphaSel(u32 idx, const u8* pNum) { mTevKAlphaSel[idx] = *pNum; }
+ virtual void setTevKAlphaSel(u32 idx, u8 num) { mTevKAlphaSel[idx] = num; }
+ virtual u8 getTevKAlphaSel(u32 idx) { return mTevKAlphaSel[idx]; }
virtual void setTevStageNum(const u8* pNum) { mTevStageNum = *pNum; }
virtual void setTevStageNum(u8 num) { mTevStageNum = num; }
virtual u8 getTevStageNum() const { return mTevStageNum; }
- virtual void setTevStage(u32 i, const J3DTevStage* pStage) { mTevStage[i] = *pStage; }
- virtual void setTevStage(u32 i, J3DTevStage stage) { mTevStage[i] = stage; }
- virtual J3DTevStage* getTevStage(u32 i) { return &mTevStage[i]; }
- virtual void setTevSwapModeInfo(u32 i, const J3DTevSwapModeInfo* pInfo) { mTevStage[i].setTevSwapModeInfo(*pInfo); }
- virtual void setTevSwapModeInfo(u32 i, J3DTevSwapModeInfo info) { mTevStage[i].setTevSwapModeInfo(info); }
- virtual void setTevSwapModeTable(u32 i, const J3DTevSwapModeTable* pTable) {
- mTevSwapModeTable[i] = *pTable;
+ virtual void setTevStage(u32 idx, const J3DTevStage* pStage) { mTevStage[idx] = *pStage; }
+ virtual void setTevStage(u32 idx, J3DTevStage stage) { mTevStage[idx] = stage; }
+ virtual J3DTevStage* getTevStage(u32 idx) { return &mTevStage[idx]; }
+ virtual void setTevSwapModeInfo(u32 idx, const J3DTevSwapModeInfo* pInfo) { mTevStage[idx].setTevSwapModeInfo(*pInfo); }
+ virtual void setTevSwapModeInfo(u32 idx, J3DTevSwapModeInfo info) { mTevStage[idx].setTevSwapModeInfo(info); }
+ virtual void setTevSwapModeTable(u32 idx, const J3DTevSwapModeTable* pTable) {
+ mTevSwapModeTable[idx] = *pTable;
}
- virtual void setTevSwapModeTable(u32 i, J3DTevSwapModeTable table) {
- mTevSwapModeTable[i] = table;
+ virtual void setTevSwapModeTable(u32 idx, J3DTevSwapModeTable table) {
+ mTevSwapModeTable[idx] = table;
}
- virtual J3DTevSwapModeTable* getTevSwapModeTable(u32 i) { return &mTevSwapModeTable[i]; }
- virtual void setIndTevStage(u32 i, const J3DIndTevStage* pStage) { mIndTevStage[i] = *pStage; }
- virtual void setIndTevStage(u32 i, J3DIndTevStage stage) { mIndTevStage[i] = stage; }
- virtual J3DIndTevStage* getIndTevStage(u32 i) { return &mIndTevStage[i]; }
+ virtual J3DTevSwapModeTable* getTevSwapModeTable(u32 idx) { return &mTevSwapModeTable[idx]; }
+ virtual void setIndTevStage(u32 idx, const J3DIndTevStage* pStage) { mIndTevStage[idx] = *pStage; }
+ virtual void setIndTevStage(u32 idx, J3DIndTevStage stage) { mIndTevStage[idx] = stage; }
+ virtual J3DIndTevStage* getIndTevStage(u32 idx) { return &mIndTevStage[idx]; }
virtual u32 getTexNoOffset() const { return mTexNoOffset; }
virtual u32 getTevRegOffset() const { return mTevRegOffset; }
virtual void setTevRegOffset(u32 offs) { mTevRegOffset = offs; }
@@ -378,42 +384,45 @@ public:
virtual void indexToPtr() { indexToPtr_private(mTexNoOffset); }
virtual u32 getType() { return 'TVB2'; }
virtual s32 countDLSize();
- virtual void setTexNo(u32 i, const u16* pNo) { mTexNo[i] = *pNo; }
- virtual void setTexNo(u32 i, u16 no) { mTexNo[i] = no; }
- virtual u16 getTexNo(u32 i) const { return mTexNo[i]; }
- virtual void setTevOrder(u32 i, const J3DTevOrder* pOrder) { mTevOrder[i] = *pOrder; }
- virtual void setTevOrder(u32 i, J3DTevOrder order) { mTevOrder[i] = order; }
- virtual J3DTevOrder* getTevOrder(u32 i) { return &mTevOrder[i]; }
- virtual void setTevColor(u32 i, const J3DGXColorS10* pColor) { mTevColor[i] = *pColor; }
- virtual void setTevColor(u32 i, J3DGXColorS10 color) { mTevColor[i] = color; }
- virtual J3DGXColorS10* getTevColor(u32 i) { return &mTevColor[i]; }
- virtual void setTevKColor(u32 i, const J3DGXColor* pColor) { mTevKColor[i] = *pColor; }
- virtual void setTevKColor(u32 i, J3DGXColor color) { mTevKColor[i] = color; }
- virtual J3DGXColor* getTevKColor(u32 i) { return &mTevKColor[i]; }
- virtual void setTevKColorSel(u32 i, const u8* pNum) { mTevKColorSel[i] = *pNum; }
- virtual void setTevKColorSel(u32 i, u8 num) { mTevKColorSel[i] = num; }
- virtual u8 getTevKColorSel(u32 i) { return mTevKColorSel[i]; }
- virtual void setTevKAlphaSel(u32 i, const u8* pNum) { mTevKAlphaSel[i] = *pNum; }
- virtual void setTevKAlphaSel(u32 i, u8 num) { mTevKAlphaSel[i] = num; }
- virtual u8 getTevKAlphaSel(u32 i) { return mTevKAlphaSel[i]; }
+ virtual void setTexNo(u32 idx, const u16* pNo) { mTexNo[idx] = *pNo; }
+ virtual void setTexNo(u32 idx, u16 no) { mTexNo[idx] = no; }
+ virtual u16 getTexNo(u32 idx) const {
+ J3D_ASSERT(1730, idx < 2, "Error : range over.");
+ return mTexNo[idx];
+ }
+ virtual void setTevOrder(u32 idx, const J3DTevOrder* pOrder) { mTevOrder[idx] = *pOrder; }
+ virtual void setTevOrder(u32 idx, J3DTevOrder order) { mTevOrder[idx] = order; }
+ virtual J3DTevOrder* getTevOrder(u32 idx) { return &mTevOrder[idx]; }
+ virtual void setTevColor(u32 idx, const J3DGXColorS10* pColor) { mTevColor[idx] = *pColor; }
+ virtual void setTevColor(u32 idx, J3DGXColorS10 color) { mTevColor[idx] = color; }
+ virtual J3DGXColorS10* getTevColor(u32 idx) { return &mTevColor[idx]; }
+ virtual void setTevKColor(u32 idx, const J3DGXColor* pColor) { mTevKColor[idx] = *pColor; }
+ virtual void setTevKColor(u32 idx, J3DGXColor color) { mTevKColor[idx] = color; }
+ virtual J3DGXColor* getTevKColor(u32 idx) { return &mTevKColor[idx]; }
+ virtual void setTevKColorSel(u32 idx, const u8* pNum) { mTevKColorSel[idx] = *pNum; }
+ virtual void setTevKColorSel(u32 idx, u8 num) { mTevKColorSel[idx] = num; }
+ virtual u8 getTevKColorSel(u32 idx) { return mTevKColorSel[idx]; }
+ virtual void setTevKAlphaSel(u32 idx, const u8* pNum) { mTevKAlphaSel[idx] = *pNum; }
+ virtual void setTevKAlphaSel(u32 idx, u8 num) { mTevKAlphaSel[idx] = num; }
+ virtual u8 getTevKAlphaSel(u32 idx) { return mTevKAlphaSel[idx]; }
virtual void setTevStageNum(const u8* pNum) { mTevStageNum = *pNum; }
virtual void setTevStageNum(u8 num) { mTevStageNum = num; }
virtual u8 getTevStageNum() const { return mTevStageNum; }
- virtual void setTevStage(u32 i, const J3DTevStage* pStage) { mTevStage[i] = *pStage; }
- virtual void setTevStage(u32 i, J3DTevStage stage) { mTevStage[i] = stage; }
- virtual J3DTevStage* getTevStage(u32 i) { return &mTevStage[i]; }
- virtual void setTevSwapModeInfo(u32 i, const J3DTevSwapModeInfo* pInfo) { mTevStage[i].setTevSwapModeInfo(*pInfo); }
- virtual void setTevSwapModeInfo(u32 i, J3DTevSwapModeInfo info) { mTevStage[i].setTevSwapModeInfo(info); }
- virtual void setTevSwapModeTable(u32 i, const J3DTevSwapModeTable* pTable) {
- mTevSwapModeTable[i] = *pTable;
+ virtual void setTevStage(u32 idx, const J3DTevStage* pStage) { mTevStage[idx] = *pStage; }
+ virtual void setTevStage(u32 idx, J3DTevStage stage) { mTevStage[idx] = stage; }
+ virtual J3DTevStage* getTevStage(u32 idx) { return &mTevStage[idx]; }
+ virtual void setTevSwapModeInfo(u32 idx, const J3DTevSwapModeInfo* pInfo) { mTevStage[idx].setTevSwapModeInfo(*pInfo); }
+ virtual void setTevSwapModeInfo(u32 idx, J3DTevSwapModeInfo info) { mTevStage[idx].setTevSwapModeInfo(info); }
+ virtual void setTevSwapModeTable(u32 idx, const J3DTevSwapModeTable* pTable) {
+ mTevSwapModeTable[idx] = *pTable;
}
- virtual void setTevSwapModeTable(u32 i, J3DTevSwapModeTable table) {
- mTevSwapModeTable[i] = table;
+ virtual void setTevSwapModeTable(u32 idx, J3DTevSwapModeTable table) {
+ mTevSwapModeTable[idx] = table;
}
- virtual J3DTevSwapModeTable* getTevSwapModeTable(u32 i) { return &mTevSwapModeTable[i]; }
- virtual void setIndTevStage(u32 i, const J3DIndTevStage* pStage) { mIndTevStage[i] = *pStage; }
- virtual void setIndTevStage(u32 i, J3DIndTevStage stage) { mIndTevStage[i] = stage; }
- virtual J3DIndTevStage* getIndTevStage(u32 i) { return &mIndTevStage[i]; }
+ virtual J3DTevSwapModeTable* getTevSwapModeTable(u32 idx) { return &mTevSwapModeTable[idx]; }
+ virtual void setIndTevStage(u32 idx, const J3DIndTevStage* pStage) { mIndTevStage[idx] = *pStage; }
+ virtual void setIndTevStage(u32 idx, J3DIndTevStage stage) { mIndTevStage[idx] = stage; }
+ virtual J3DIndTevStage* getIndTevStage(u32 idx) { return &mIndTevStage[idx]; }
virtual u32 getTexNoOffset() const { return mTexNoOffset; }
virtual u32 getTevRegOffset() const { return mTevRegOffset; }
virtual void setTevRegOffset(u32 offs) { mTevRegOffset = offs; }
@@ -453,42 +462,45 @@ public:
virtual void indexToPtr() { indexToPtr_private(mTexNoOffset); }
virtual u32 getType() { return 'TV16'; }
virtual s32 countDLSize();
- virtual void setTexNo(u32 i, const u16* pNo) { mTexNo[i] = *pNo; }
- virtual void setTexNo(u32 i, u16 no) { mTexNo[i] = no; }
- virtual u16 getTexNo(u32 i) const { return mTexNo[i]; }
- virtual void setTevOrder(u32 i, const J3DTevOrder* pOrder) { mTevOrder[i] = *pOrder; }
- virtual void setTevOrder(u32 i, J3DTevOrder order) { mTevOrder[i] = order; }
- virtual J3DTevOrder* getTevOrder(u32 i) { return &mTevOrder[i]; }
- virtual void setTevColor(u32 i, const J3DGXColorS10* pColor) { mTevColor[i] = *pColor; }
- virtual void setTevColor(u32 i, J3DGXColorS10 color) { mTevColor[i] = color; }
- virtual J3DGXColorS10* getTevColor(u32 i) { return &mTevColor[i]; }
- virtual void setTevKColor(u32 i, const J3DGXColor* pColor) { mTevKColor[i] = *pColor; }
- virtual void setTevKColor(u32 i, J3DGXColor color) { mTevKColor[i] = color; }
- virtual J3DGXColor* getTevKColor(u32 i) { return &mTevKColor[i]; }
- virtual void setTevKColorSel(u32 i, const u8* pNum) { mTevKColorSel[i] = *pNum; }
- virtual void setTevKColorSel(u32 i, u8 num) { mTevKColorSel[i] = num; }
- virtual u8 getTevKColorSel(u32 i) { return mTevKColorSel[i]; }
- virtual void setTevKAlphaSel(u32 i, const u8* pNum) { mTevKAlphaSel[i] = *pNum; }
- virtual void setTevKAlphaSel(u32 i, u8 num) { mTevKAlphaSel[i] = num; }
- virtual u8 getTevKAlphaSel(u32 i) { return mTevKAlphaSel[i]; }
+ virtual void setTexNo(u32 idx, const u16* pNo) { mTexNo[idx] = *pNo; }
+ virtual void setTexNo(u32 idx, u16 no) { mTexNo[idx] = no; }
+ virtual u16 getTexNo(u32 idx) const {
+ J3D_ASSERT(2308, idx < 8, "Error : range over.");
+ return mTexNo[idx];
+ }
+ virtual void setTevOrder(u32 idx, const J3DTevOrder* pOrder) { mTevOrder[idx] = *pOrder; }
+ virtual void setTevOrder(u32 idx, J3DTevOrder order) { mTevOrder[idx] = order; }
+ virtual J3DTevOrder* getTevOrder(u32 idx) { return &mTevOrder[idx]; }
+ virtual void setTevColor(u32 idx, const J3DGXColorS10* pColor) { mTevColor[idx] = *pColor; }
+ virtual void setTevColor(u32 idx, J3DGXColorS10 color) { mTevColor[idx] = color; }
+ virtual J3DGXColorS10* getTevColor(u32 idx) { return &mTevColor[idx]; }
+ virtual void setTevKColor(u32 idx, const J3DGXColor* pColor) { mTevKColor[idx] = *pColor; }
+ virtual void setTevKColor(u32 idx, J3DGXColor color) { mTevKColor[idx] = color; }
+ virtual J3DGXColor* getTevKColor(u32 idx) { return &mTevKColor[idx]; }
+ virtual void setTevKColorSel(u32 idx, const u8* pNum) { mTevKColorSel[idx] = *pNum; }
+ virtual void setTevKColorSel(u32 idx, u8 num) { mTevKColorSel[idx] = num; }
+ virtual u8 getTevKColorSel(u32 idx) { return mTevKColorSel[idx]; }
+ virtual void setTevKAlphaSel(u32 idx, const u8* pNum) { mTevKAlphaSel[idx] = *pNum; }
+ virtual void setTevKAlphaSel(u32 idx, u8 num) { mTevKAlphaSel[idx] = num; }
+ virtual u8 getTevKAlphaSel(u32 idx) { return mTevKAlphaSel[idx]; }
virtual void setTevStageNum(const u8* pNum) { mTevStageNum = *pNum; }
virtual void setTevStageNum(u8 num) { mTevStageNum = num; }
virtual u8 getTevStageNum() const { return mTevStageNum; }
- virtual void setTevStage(u32 i, const J3DTevStage* pStage) { mTevStage[i] = *pStage; }
- virtual void setTevStage(u32 i, J3DTevStage stage) { mTevStage[i] = stage; }
- virtual J3DTevStage* getTevStage(u32 i) { return &mTevStage[i]; }
- virtual void setTevSwapModeInfo(u32 i, const J3DTevSwapModeInfo* pInfo) { mTevStage[i].setTevSwapModeInfo(*pInfo); }
- virtual void setTevSwapModeInfo(u32 i, J3DTevSwapModeInfo info) { mTevStage[i].setTevSwapModeInfo(info); }
- virtual void setTevSwapModeTable(u32 i, const J3DTevSwapModeTable* pTable) {
- mTevSwapModeTable[i] = *pTable;
+ virtual void setTevStage(u32 idx, const J3DTevStage* pStage) { mTevStage[idx] = *pStage; }
+ virtual void setTevStage(u32 idx, J3DTevStage stage) { mTevStage[idx] = stage; }
+ virtual J3DTevStage* getTevStage(u32 idx) { return &mTevStage[idx]; }
+ virtual void setTevSwapModeInfo(u32 idx, const J3DTevSwapModeInfo* pInfo) { mTevStage[idx].setTevSwapModeInfo(*pInfo); }
+ virtual void setTevSwapModeInfo(u32 idx, J3DTevSwapModeInfo info) { mTevStage[idx].setTevSwapModeInfo(info); }
+ virtual void setTevSwapModeTable(u32 idx, const J3DTevSwapModeTable* pTable) {
+ mTevSwapModeTable[idx] = *pTable;
}
- virtual void setTevSwapModeTable(u32 i, J3DTevSwapModeTable table) {
- mTevSwapModeTable[i] = table;
+ virtual void setTevSwapModeTable(u32 idx, J3DTevSwapModeTable table) {
+ mTevSwapModeTable[idx] = table;
}
- virtual J3DTevSwapModeTable* getTevSwapModeTable(u32 i) { return &mTevSwapModeTable[i]; }
- virtual void setIndTevStage(u32 i, const J3DIndTevStage* pStage) { mIndTevStage[i] = *pStage; }
- virtual void setIndTevStage(u32 i, J3DIndTevStage stage) { mIndTevStage[i] = stage; }
- virtual J3DIndTevStage* getIndTevStage(u32 i) { return &mIndTevStage[i]; }
+ virtual J3DTevSwapModeTable* getTevSwapModeTable(u32 idx) { return &mTevSwapModeTable[idx]; }
+ virtual void setIndTevStage(u32 idx, const J3DIndTevStage* pStage) { mIndTevStage[idx] = *pStage; }
+ virtual void setIndTevStage(u32 idx, J3DIndTevStage stage) { mIndTevStage[idx] = stage; }
+ virtual J3DIndTevStage* getIndTevStage(u32 idx) { return &mIndTevStage[idx]; }
virtual u32 getTexNoOffset() const { return mTexNoOffset; }
virtual u32 getTevRegOffset() const { return mTevRegOffset; }
virtual void setTevRegOffset(u32 offs) { mTevRegOffset = offs; }
@@ -531,21 +543,24 @@ public:
virtual void indexToPtr() { indexToPtr_private(mTexNoOffset); }
virtual u32 getType() { return 'TVB1'; }
virtual s32 countDLSize();
- virtual void setTexNo(u32 i, const u16* pNo) { mTexNo[i] = *pNo; }
- virtual void setTexNo(u32 i, u16 no) { mTexNo[i] = no; }
- virtual u16 getTexNo(u32 i) const { return mTexNo[i]; }
- virtual void setTevOrder(u32 i, const J3DTevOrder* pOrder) { mTevOrder[i] = *pOrder; }
- virtual void setTevOrder(u32 i, J3DTevOrder order) { mTevOrder[i] = order; }
- virtual J3DTevOrder* getTevOrder(u32 i) { return &mTevOrder[i]; }
+ virtual void setTexNo(u32 idx, const u16* pNo) { mTexNo[idx] = *pNo; }
+ virtual void setTexNo(u32 idx, u16 no) { mTexNo[idx] = no; }
+ virtual u16 getTexNo(u32 idx) const {
+ J3D_ASSERT(1574, idx < 1, "Error : range over.");
+ return mTexNo[idx];
+ }
+ virtual void setTevOrder(u32 idx, const J3DTevOrder* pOrder) { mTevOrder[idx] = *pOrder; }
+ virtual void setTevOrder(u32 idx, J3DTevOrder order) { mTevOrder[idx] = order; }
+ virtual J3DTevOrder* getTevOrder(u32 idx) { return &mTevOrder[idx]; }
virtual void setTevStageNum(const u8* pNum) {}
virtual void setTevStageNum(u8 num) {}
virtual u8 getTevStageNum() const { return 1; }
- virtual void setTevStage(u32 i, const J3DTevStage* pStage) { mTevStage[i] = *pStage; }
- virtual void setTevStage(u32 i, J3DTevStage stage) { mTevStage[i] = stage; }
- virtual J3DTevStage* getTevStage(u32 i) { return &mTevStage[i]; }
- virtual void setIndTevStage(u32 i, const J3DIndTevStage* pStage) { mIndTevStage[i] = *pStage; }
- virtual void setIndTevStage(u32 i, J3DIndTevStage stage) { mIndTevStage[i] = stage; }
- virtual J3DIndTevStage* getIndTevStage(u32 i) { return &mIndTevStage[i]; }
+ virtual void setTevStage(u32 idx, const J3DTevStage* pStage) { mTevStage[idx] = *pStage; }
+ virtual void setTevStage(u32 idx, J3DTevStage stage) { mTevStage[idx] = stage; }
+ virtual J3DTevStage* getTevStage(u32 idx) { return &mTevStage[idx]; }
+ virtual void setIndTevStage(u32 idx, const J3DIndTevStage* pStage) { mIndTevStage[idx] = *pStage; }
+ virtual void setIndTevStage(u32 idx, J3DIndTevStage stage) { mIndTevStage[idx] = stage; }
+ virtual J3DIndTevStage* getIndTevStage(u32 idx) { return &mIndTevStage[idx]; }
virtual u32 getTexNoOffset() const { return mTexNoOffset; }
virtual ~J3DTevBlock1() {}
@@ -908,15 +923,15 @@ public:
virtual u32 getType() { return 'IBLF'; }
virtual void setIndTexStageNum(u8 num) { mIndTexStageNum = num; }
virtual u8 getIndTexStageNum() const { return mIndTexStageNum; }
- virtual void setIndTexOrder(u32 i, J3DIndTexOrder const* pOrder) { mIndTexOrder[i] = *pOrder; }
- virtual void setIndTexOrder(u32 i, J3DIndTexOrder order) { mIndTexOrder[i] = order; }
- virtual J3DIndTexOrder* getIndTexOrder(u32 i) { return &mIndTexOrder[i]; }
- virtual void setIndTexMtx(u32 i, J3DIndTexMtx const* pMtx) { mIndTexMtx[i] = *pMtx; }
- virtual void setIndTexMtx(u32 i, J3DIndTexMtx mtx) { mIndTexMtx[i] = mtx; }
- virtual J3DIndTexMtx* getIndTexMtx(u32 i) { return &mIndTexMtx[i]; }
- virtual void setIndTexCoordScale(u32 i, J3DIndTexCoordScale const* pScale) { mIndTexCoordScale[i] = *pScale; }
- virtual void setIndTexCoordScale(u32 i, J3DIndTexCoordScale scale) { mIndTexCoordScale[i] = scale; }
- virtual J3DIndTexCoordScale* getIndTexCoordScale(u32 i) { return &mIndTexCoordScale[i]; }
+ virtual void setIndTexOrder(u32 idx, J3DIndTexOrder const* pOrder) { mIndTexOrder[idx] = *pOrder; }
+ virtual void setIndTexOrder(u32 idx, J3DIndTexOrder order) { mIndTexOrder[idx] = order; }
+ virtual J3DIndTexOrder* getIndTexOrder(u32 idx) { return &mIndTexOrder[idx]; }
+ virtual void setIndTexMtx(u32 idx, J3DIndTexMtx const* pMtx) { mIndTexMtx[idx] = *pMtx; }
+ virtual void setIndTexMtx(u32 idx, J3DIndTexMtx mtx) { mIndTexMtx[idx] = mtx; }
+ virtual J3DIndTexMtx* getIndTexMtx(u32 idx) { return &mIndTexMtx[idx]; }
+ virtual void setIndTexCoordScale(u32 idx, J3DIndTexCoordScale const* pScale) { mIndTexCoordScale[idx] = *pScale; }
+ virtual void setIndTexCoordScale(u32 idx, J3DIndTexCoordScale scale) { mIndTexCoordScale[idx] = scale; }
+ virtual J3DIndTexCoordScale* getIndTexCoordScale(u32 idx) { return &mIndTexCoordScale[idx]; }
virtual ~J3DIndBlockFull() {}
private:
@@ -1054,20 +1069,20 @@ public:
virtual void diffLight();
virtual s32 countDLSize();
virtual u32 getType() { return 'CLON'; }
- virtual void setMatColor(u32 i, J3DGXColor const* pColor) { mMatColor[i] = *pColor; }
- virtual void setMatColor(u32 i, J3DGXColor color) { mMatColor[i] = color; }
- virtual J3DGXColor* getMatColor(u32 i) { return &mMatColor[i]; }
- virtual void setAmbColor(u32 i, J3DGXColor const* pColor) { mAmbColor[i] = *pColor; }
- virtual void setAmbColor(u32 i, J3DGXColor color) { mAmbColor[i] = color; }
- virtual J3DGXColor* getAmbColor(u32 i) { return &mAmbColor[i]; }
+ virtual void setMatColor(u32 idx, J3DGXColor const* pColor) { mMatColor[idx] = *pColor; }
+ virtual void setMatColor(u32 idx, J3DGXColor color) { mMatColor[idx] = color; }
+ virtual J3DGXColor* getMatColor(u32 idx) { return &mMatColor[idx]; }
+ virtual void setAmbColor(u32 idx, J3DGXColor const* pColor) { mAmbColor[idx] = *pColor; }
+ virtual void setAmbColor(u32 idx, J3DGXColor color) { mAmbColor[idx] = color; }
+ virtual J3DGXColor* getAmbColor(u32 idx) { return &mAmbColor[idx]; }
virtual void setColorChanNum(u8 num) { mColorChanNum = num; }
virtual void setColorChanNum(u8 const* pNum) { mColorChanNum = *pNum; }
virtual u8 getColorChanNum() const { return mColorChanNum; }
- virtual void setColorChan(u32 i, J3DColorChan const& chan) { mColorChan[i] = chan; }
- virtual void setColorChan(u32 i, J3DColorChan const* pChan) { mColorChan[i] = *pChan; }
- virtual J3DColorChan* getColorChan(u32 i) { return &mColorChan[i]; }
- virtual void setLight(u32 i, J3DLightObj* pLight) { mLight[i] = pLight; }
- virtual J3DLightObj* getLight(u32 i) { return mLight[i]; }
+ virtual void setColorChan(u32 idx, J3DColorChan const& chan) { mColorChan[idx] = chan; }
+ virtual void setColorChan(u32 idx, J3DColorChan const* pChan) { mColorChan[idx] = *pChan; }
+ virtual J3DColorChan* getColorChan(u32 idx) { return &mColorChan[idx]; }
+ virtual void setLight(u32 idx, J3DLightObj* pLight) { mLight[idx] = pLight; }
+ virtual J3DLightObj* getLight(u32 idx) { return mLight[idx]; }
virtual void setCullMode(u8 const* pMode) { mCullMode = *pMode; }
virtual void setCullMode(u8 mode) { mCullMode = mode; }
virtual u8 getCullMode() const { return mCullMode; }
@@ -1103,15 +1118,15 @@ public:
virtual void diffLight();
virtual s32 countDLSize();
virtual u32 getType() { return 'CLOF'; }
- virtual void setMatColor(u32 i, J3DGXColor const* pColor) { mMatColor[i] = *pColor; }
- virtual void setMatColor(u32 i, J3DGXColor color) { mMatColor[i] = color; }
- virtual J3DGXColor* getMatColor(u32 i) { return &mMatColor[i]; }
+ virtual void setMatColor(u32 idx, J3DGXColor const* pColor) { mMatColor[idx] = *pColor; }
+ virtual void setMatColor(u32 idx, J3DGXColor color) { mMatColor[idx] = color; }
+ virtual J3DGXColor* getMatColor(u32 idx) { return &mMatColor[idx]; }
virtual void setColorChanNum(u8 num) { mColorChanNum = num; }
virtual void setColorChanNum(u8 const* pNum) { mColorChanNum = *pNum;}
virtual u8 getColorChanNum() const { return mColorChanNum; }
- virtual void setColorChan(u32 i, J3DColorChan const& chan) { mColorChan[i] = chan; }
- virtual void setColorChan(u32 i, J3DColorChan const* pChan) { mColorChan[i] = *pChan; }
- virtual J3DColorChan* getColorChan(u32 i) { return &mColorChan[i]; }
+ virtual void setColorChan(u32 idx, J3DColorChan const& chan) { mColorChan[idx] = chan; }
+ virtual void setColorChan(u32 idx, J3DColorChan const* pChan) { mColorChan[idx] = *pChan; }
+ virtual J3DColorChan* getColorChan(u32 idx) { return &mColorChan[idx]; }
virtual void setCullMode(u8 const* pMode) { mCullMode = *pMode;}
virtual void setCullMode(u8 mode ) { mCullMode = mode; }
virtual u8 getCullMode() const { return mCullMode; }
@@ -1141,9 +1156,9 @@ public:
virtual void load();
virtual s32 countDLSize();
virtual u32 getType() { return 'CLAB'; }
- virtual void setAmbColor(u32 i, J3DGXColor const* pColor) { mAmbColor[i] = *pColor; }
- virtual void setAmbColor(u32 i, J3DGXColor color) { mAmbColor[i] = color; }
- virtual J3DGXColor* getAmbColor(u32 i) { return &mAmbColor[i]; }
+ virtual void setAmbColor(u32 idx, J3DGXColor const* pColor) { mAmbColor[idx] = *pColor; }
+ virtual void setAmbColor(u32 idx, J3DGXColor color) { mAmbColor[idx] = color; }
+ virtual J3DGXColor* getAmbColor(u32 idx) { return &mAmbColor[idx]; }
virtual ~J3DColorBlockAmbientOn() {}
protected:
diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
index 81f42efb..b379fd71 100644
--- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h
+++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
@@ -1,6 +1,7 @@
#ifndef J3DSHAPEMTX_H
#define J3DSHAPEMTX_H
+#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/mtx/mtx.h"
class J3DShapeMtx {
@@ -26,7 +27,11 @@ public:
static u8* sCurrentScaleFlag;
static u8 sNBTFlag;
- static void setCurrentPipeline(u32 pipeline) { sCurrentPipeline = pipeline; }
+ static void setCurrentPipeline(u32 pipeline) {
+ // TODO: needs to go in J3DShape.h for assert
+ J3D_ASSERT(91, pipeline < 4, "Error : range over.");
+ sCurrentPipeline = pipeline;
+ }
protected:
/* 0x04 */ u16 mUseMtxIndex;
diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h
index e43e022a..8100f78e 100644
--- a/include/JSystem/J3DGraphBase/J3DSys.h
+++ b/include/JSystem/J3DGraphBase/J3DSys.h
@@ -63,7 +63,10 @@ public:
void* getVtxCol() { return mVtxCol; }
void setVtxCol(GXColor* pVtxCol) { mVtxCol = pVtxCol; }
- void setModel(J3DModel* pModel) { mModel = pModel; }
+ void setModel(J3DModel* pModel) {
+ J3D_ASSERT(200, pModel, "Error : null pointer.");
+ mModel = pModel;
+ }
void setShapePacket(J3DShapePacket* pPacket) { mShapePacket = pPacket; }
void setMatPacket(J3DMatPacket* pPacket) { mMatPacket = pPacket; }
J3DMatPacket* getMatPacket() { return mMatPacket; }
diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h
index 19bee0e0..451dc2a3 100644
--- a/include/JSystem/J3DGraphBase/J3DTexture.h
+++ b/include/JSystem/J3DGraphBase/J3DTexture.h
@@ -4,6 +4,7 @@
#include "JSystem/J3DGraphBase/J3DGD.h"
#include "JSystem/J3DGraphBase/J3DStruct.h"
#include "JSystem/J3DGraphBase/J3DTevs.h"
+#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"
@@ -42,7 +43,10 @@ public:
void addResTIMG(u16, ResTIMG const*);
u16 getNum() const { return mNum; }
- ResTIMG* getResTIMG(u16 entry) const { return &mpRes[entry]; }
+ ResTIMG* getResTIMG(u16 entry) const {
+ J3D_ASSERT(72, entry < mNum, "Error : range over.");
+ return &mpRes[entry];
+ }
void setResTIMG(u16 entry, const ResTIMG& timg) {
mpRes[entry] = timg;
mpRes[entry].imageOffset = ((mpRes[entry].imageOffset + (u32)&timg - (u32)(mpRes + entry)));
diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h
index 3c174b19..0c121411 100644
--- a/include/JSystem/JUtility/JUTAssert.h
+++ b/include/JSystem/JUtility/JUTAssert.h
@@ -18,7 +18,11 @@
} \
}
+#ifdef DEBUG
+#define J3D_ASSERT(LINE, COND, MSG) JUT_ASSERT_MSG(LINE, (COND) != 0, MSG)
+#else
#define J3D_ASSERT(LINE, COND, MSG) (void)0
+#endif
#define JUT_WARN(LINE, ...) \
JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__); \
diff --git a/include/d/actor/d_a_obj_movebox.h b/include/d/actor/d_a_obj_movebox.h
index f25d0eb1..21746632 100644
--- a/include/d/actor/d_a_obj_movebox.h
+++ b/include/d/actor/d_a_obj_movebox.h
@@ -186,7 +186,14 @@ namespace daObjMovebox {
inline void mode_proc_call();
void chk_walk(cXyz*) { /* TODO */ }
- void set_rollCrash() { mbRollCrash = TRUE; }
+ void set_rollCrash() {
+ if (
+ mType == daObjMovebox::Act_c::TYPE_BREAKABLE_WOODEN_CRATE ||
+ mType == daObjMovebox::Act_c::TYPE_GOLDEN_CRATE
+ ) {
+ mbRollCrash = TRUE;
+ }
+ }
void prmZ_init();
void prmX_init();
diff --git a/include/d/actor/d_a_player_main.h b/include/d/actor/d_a_player_main.h
index 37c91398..aa80578d 100644
--- a/include/d/actor/d_a_player_main.h
+++ b/include/d/actor/d_a_player_main.h
@@ -296,10 +296,10 @@ public:
static void setMorfFrame(u8 frame) { m_morf_frame = frame; }
// TODO:
- static void getNowOffsetXP() {}
- static void getNowOffsetYP() {}
- static void setNowOffsetX(f32) {}
- static void setNowOffsetY(f32) {}
+ void getNowOffsetXP() {}
+ void getNowOffsetYP() {}
+ void setNowOffsetX(f32 x) { mEyePos.x = x; }
+ void setNowOffsetY(f32 y) { mEyePos.y = y; }
public:
/* 0x6C */ cXy mEyePosOld;
diff --git a/include/d/actor/d_a_salvage.h b/include/d/actor/d_a_salvage.h
index aeeb1d1a..a71d70c3 100644
--- a/include/d/actor/d_a_salvage.h
+++ b/include/d/actor/d_a_salvage.h
@@ -10,7 +10,13 @@ class daSalvage_c : public fopAc_ac_c {
public:
static int getSalvageId() { return mSalvageId; }
void setSalvageId(int) {}
- static BOOL isValidSalvageId() { return mSalvageId != -1 ? TRUE : FALSE; }
+ static BOOL isValidSalvageId() {
+ if (mSalvageId != -1) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+ }
void getSalvageKind() {}
void checkRegist(int) {}
diff --git a/include/d/d_attention.h b/include/d/d_attention.h
index 3835f62b..a0f5c1ec 100644
--- a/include/d/d_attention.h
+++ b/include/d/d_attention.h
@@ -92,7 +92,7 @@ public:
bool request(fopAc_ac_c*, f32, f32, f32, s16, int);
bool requestF(fopAc_ac_c*, s16, int);
- fpc_ProcID getLookTarget() { return mLookTargetID; }
+ fopAc_ac_c* getLookTarget() { return convPId(mLookTargetID); }
private:
/* 0x0 */ fpc_ProcID mRequestActorID;
@@ -226,8 +226,8 @@ public:
u8 getCatchChgItem() { return mCatch.getChangeItem(); }
fopAc_ac_c* getCatghTarget() { return mCatch.getCatghTarget(); }
- fopAc_ac_c* getLookTarget() { return mLook[0].convPId(mLook[0].getLookTarget()); }
- fopAc_ac_c* getLook2Target() { return mLook[1].convPId(mLook[1].getLookTarget()); }
+ fopAc_ac_c* getLookTarget() { return mLook[0].getLookTarget(); }
+ fopAc_ac_c* getLook2Target() { return mLook[1].getLookTarget(); }
fopAc_ac_c* getZHintTarget() { return mHint.getZHintTarget(); }
int ZHintRequest(fopAc_ac_c* param_1, int param_2) {
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index 92c8e05a..61fb4823 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -2176,10 +2176,6 @@ inline stage_envr_info_class* dComIfGp_getStageEnvrInfo() {
return g_dComIfG_gameInfo.play.getStage().getEnvrInfo();
}
-inline dStage_EventInfo_c* dComIfGp_getStageEventInfo() {
- return g_dComIfG_gameInfo.play.getStage().getEventInfo();
-}
-
inline stage_palet_info_class* dComIfGp_getStagePaletteInfo() {
return g_dComIfG_gameInfo.play.getStage().getPaletInfo();
}
@@ -3136,15 +3132,15 @@ inline bool dComIfGp_event_chkTalkXY() {
return g_dComIfG_gameInfo.play.getEvent().chkTalkXY();
}
-inline void dComIfGp_event_onEventFlag(s16 flag) {
+inline void dComIfGp_event_onEventFlag(u16 flag) {
g_dComIfG_gameInfo.play.getEvent().onEventFlag(flag);
}
-inline void dComIfGp_event_offEventFlag(s16 flag) {
+inline void dComIfGp_event_offEventFlag(u16 flag) {
g_dComIfG_gameInfo.play.getEvent().offEventFlag(flag);
}
-inline u16 dComIfGp_event_chkEventFlag(s16 flag) {
+inline u16 dComIfGp_event_chkEventFlag(u16 flag) {
return g_dComIfG_gameInfo.play.getEvent().chkEventFlag(flag);
}
@@ -3937,7 +3933,7 @@ inline s32 dComIfGp_particle_checkAtrCodeEffect(int code) { return g_dComIfG_gam
* === ATTENTION ===
*/
- inline dAttention_c& dComIfGp_getAttention() {
+inline dAttention_c& dComIfGp_getAttention() {
return g_dComIfG_gameInfo.play.getAttention();
}
diff --git a/include/d/d_map.h b/include/d/d_map.h
index d2de52f0..83e3668e 100644
--- a/include/d/d_map.h
+++ b/include/d/d_map.h
@@ -75,38 +75,39 @@ public:
void roomDrawRoomEnlargementSize(int, int, int, int, f32, f32, f32, f32, u8);
void roomDrawRoomRealSize(int, int, int, int, f32, f32, f32, f32, f32, f32, u8);
- inline void clrUseRoom() {}
- inline void setUseRoom() {}
- inline void checkUseRoom() {}
- inline void getEnableFlg() {}
- inline void getStageMapInfoPE() {}
- inline void getStageMapInfoCmPDot() {}
- inline void getStageMapInfoMap0_X0() {}
- inline void getStageMapInfoMap0_X1() {}
- inline void getStageMapInfoMap0_Z0() {}
- inline void getStageMapInfoMap0_Z1() {}
- inline void getStageMapInfoMap0_XC() {}
- inline void getStageMapInfoMap0_ZC() {}
- inline void getStageMapInfoMap1_X0() {}
- inline void getStageMapInfoMap1_X1() {}
- inline void getStageMapInfoMap1_Z0() {}
- inline void getStageMapInfoMap1_Z1() {}
- inline void getStageMapInfoMap1_ZC() {}
- inline void getStageMapInfoMap1_XC() {}
- inline void getStageMapInfoAlpha() {}
- inline void getMapDtP() {}
- inline void getNowDspFloorNo() {}
- inline void getMapDtSize() {}
- inline void getMap0ScaleX() {}
- inline void getMap0ScaleZ() {}
- inline void getMap1ScaleX() {}
- inline void getMap1ScaleZ() {}
- inline void getMap1Width() {}
- inline void getMap1Height() {}
+ void clrUseRoom() {}
+ void setUseRoom() {}
+ void checkUseRoom() {}
+ void getEnableFlg() {}
+ void getStageMapInfoPE() {}
+ void getStageMapInfoCmPDot() {}
+ void getStageMapInfoMap0_X0() {}
+ void getStageMapInfoMap0_X1() {}
+ void getStageMapInfoMap0_Z0() {}
+ void getStageMapInfoMap0_Z1() {}
+ void getStageMapInfoMap0_XC() {}
+ void getStageMapInfoMap0_ZC() {}
+ void getStageMapInfoMap1_X0() {}
+ void getStageMapInfoMap1_X1() {}
+ void getStageMapInfoMap1_Z0() {}
+ void getStageMapInfoMap1_Z1() {}
+ void getStageMapInfoMap1_ZC() {}
+ void getStageMapInfoMap1_XC() {}
+ void getStageMapInfoAlpha() {}
+ void getMapDtP() {}
+ void getNowDspFloorNo() {}
+ void getMapDtSize() {}
+ void getMap0ScaleX() {}
+ void getMap0ScaleZ() {}
+ void getMap1ScaleX() {}
+ void getMap1ScaleZ() {}
+ void getMap1Width() {}
+ void getMap1Height() {}
+ void setArgNo(int) {}
- inline u8 getRoomNo() { return m_no; }
- inline stage_map_info_class* getStageMapInfoP() { JUT_ASSERT(0x467, mStageMapInfoP != NULL); return mStageMapInfoP; }
- inline dMap_RoomInfo_c* getNextRoomInfoP() { return m_next; }
+ u8 getRoomNo() { return m_no; }
+ stage_map_info_class* getStageMapInfoP() { JUT_ASSERT(0x467, mStageMapInfoP != NULL); return mStageMapInfoP; }
+ dMap_RoomInfo_c* getNextRoomInfoP() { return m_next; }
/* 0x00 */ u8 m_exist;
/* 0x01 */ u8 field_0x1;
diff --git a/include/m_Do/m_Do_MemCard.h b/include/m_Do/m_Do_MemCard.h
index 24084aa7..2651d432 100644
--- a/include/m_Do/m_Do_MemCard.h
+++ b/include/m_Do/m_Do_MemCard.h
@@ -91,7 +91,7 @@ inline void mDoMemCd_ThdInit() {
g_mDoMemCd_control.ThdInit();
}
-inline void mDoMemCd_save(void* i_data, u32 param_1, u32 param_2) {
+inline void mDoMemCd_Save(void* i_data, u32 param_1, u32 param_2) {
g_mDoMemCd_control.save(i_data,param_1,param_2);
}
@@ -154,7 +154,6 @@ inline u32 mDoMemCd_getStatus(u32 status) {
inline void mDoMemCd_Format() {}
inline void mDoMemCd_Load() {}
inline void mDoMemCd_LoadSync(void*, u32, u32) {}
-inline void mDoMemCd_Save(void*, u32, u32) {}
inline void mDoMemCd_clearProbeStat() {}
inline void mDoMemCd_getDataVersion() {}
inline void mDoMemCd_getProbeStat() {}