diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2026-02-20 03:05:23 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-20 03:05:23 -0800 |
| commit | 2113d9044b9beb0fedca17f977f2bb571c50c302 (patch) | |
| tree | d9587a03e3fb6e441cb933af41ad36c3b6eb1cd2 /include/JSystem | |
| parent | 803bc041c7e228e2b7c88afd1121550e51db3f82 (diff) | |
d_resorce debug (#3105)
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DAnimation.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DMaterial.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShape.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTevs.h | 6 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTexture.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphLoader/J3DModelLoader.h | 3 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRArchive.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRHeap.h | 4 |
8 files changed, 16 insertions, 9 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index f38c79ef9a..596e5a36e7 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -536,7 +536,7 @@ public: virtual ~J3DAnmTransformKey() {} virtual s32 getKind() const { return 8; } virtual void getTransform(u16 jointNo, J3DTransformInfo* pTransform) const { - calcTransform(mFrame, jointNo, pTransform); + calcTransform(getFrame(), jointNo, pTransform); } /* 0x20 */ int mDecShift; diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index 92ca58ef6b..8103a83087 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -75,7 +75,7 @@ public: J3DTexCoord* getTexCoord(u32 idx) { return mTexGenBlock->getTexCoord(idx); } J3DZMode* getZMode() { return mPEBlock->getZMode(); } J3DBlend* getBlend() { return mPEBlock->getBlend(); } - J3DColorChan* getColorChan(u32 idx) { return getColorBlock()->getColorChan(idx); } + J3DColorChan* getColorChan(u32 idx) { return mColorBlock->getColorChan(idx); } J3DGXColor* getMatColor(u32 i) { return mColorBlock->getMatColor(i); } void setTevColor(u32 i, const J3DGXColorS10* i_color) { mTevBlock->setTevColor(i, i_color); } diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index 151f4235ab..ed26d73694 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -180,7 +180,7 @@ public: void setDrawMtx(Mtx** pDrawMtx) { mDrawMtx = pDrawMtx; } void setNrmMtx(Mtx33** pNrmMtx) { mNrmMtx = pNrmMtx; } - void setTexMtxLoadType(u32 type) { mFlags = (mFlags & 0xFFFF0FFF) | type; } + void setTexMtxLoadType(u32 type) { mFlags = type | (mFlags & ~0xF000); } bool getNBTFlag() const { return mHasNBT; } u32 getBumpMtxOffset() const { return mBumpMtxOffset; } void setBumpMtxOffset(u32 offset) { mBumpMtxOffset = offset; } diff --git a/include/JSystem/J3DGraphBase/J3DTevs.h b/include/JSystem/J3DGraphBase/J3DTevs.h index a13b54e4a4..3d70245220 100644 --- a/include/JSystem/J3DGraphBase/J3DTevs.h +++ b/include/JSystem/J3DGraphBase/J3DTevs.h @@ -201,10 +201,12 @@ struct J3DTevOrder : public J3DTevOrderInfo { J3DTevOrder() { J3DTevOrderInfo::operator=(j3dDefaultTevOrderInfoNull); } - J3DTevOrder(const J3DTevOrderInfo& info) : J3DTevOrderInfo(info) {} + J3DTevOrder(const J3DTevOrderInfo& info) { + J3DTevOrderInfo::operator=(info); + } J3DTevOrderInfo& getTevOrderInfo() { return *this; } - u8 getTexMap() { return mTexMap; } + u8 getTexMap() const { return mTexMap; } }; extern u8 j3dTevSwapTableTable[1024]; diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h index 8c95729d66..da8276e767 100644 --- a/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/include/JSystem/J3DGraphBase/J3DTexture.h @@ -90,7 +90,7 @@ struct J3DTexCoord : public J3DTexCoordInfo { mTexMtxReg = mTexGenMtx; } void setTexCoordInfo(const J3DTexCoordInfo& info) { - __memcpy(this, &info, sizeof(J3DTexCoordInfo)); + J3DTexCoordInfo::operator=(info); } u8 getTexGenType() const { return mTexGenType; } diff --git a/include/JSystem/J3DGraphLoader/J3DModelLoader.h b/include/JSystem/J3DGraphLoader/J3DModelLoader.h index 5fff37ecad..a06260f3dc 100644 --- a/include/JSystem/J3DGraphLoader/J3DModelLoader.h +++ b/include/JSystem/J3DGraphLoader/J3DModelLoader.h @@ -26,7 +26,8 @@ struct J3DModelFileData { /* 0x04 */ u32 mMagic2; /* 0x08 */ u8 field_0x08[4]; /* 0x0C */ u32 mBlockNum; - /* 0x10 */ u8 field_0x10[0x10]; + /* 0x10 */ u8 field_0x10[0x1C - 0x10]; + /* 0x1C */ int field_0x1c; /* 0x20 */ J3DModelBlock mBlocks[1]; }; diff --git a/include/JSystem/JKernel/JKRArchive.h b/include/JSystem/JKernel/JKRArchive.h index cf4b3ef045..7402f50b13 100644 --- a/include/JSystem/JKernel/JKRArchive.h +++ b/include/JSystem/JKernel/JKRArchive.h @@ -137,7 +137,7 @@ public: u32 readIdxResource(void*, u32, u32); u32 readResource(void*, u32, u16); u32 countResource(void) const; - u32 getFileAttribute(u32) const; + u8 getFileAttribute(u32) const; SDIFileEntry* findNameResource(const char*) const; bool isSameName(CArcName&, u32, u16) const; @@ -171,7 +171,7 @@ public: u32 countFile() const { return mArcInfoBlock->num_file_entries; } s32 countDirectory() const { return mArcInfoBlock->num_nodes; } u8 getMountMode() const { return mMountMode; } - bool isFileEntry(u32 param_0) { + bool isFileEntry(u32 param_0) const { return getFileAttribute(param_0) & 1; } diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index c23b72180f..b6675f41b7 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -259,6 +259,10 @@ inline s32 JKRResizeMemBlock(JKRHeap* heap, void* ptr, u32 size) { return JKRHeap::resize(ptr, size, heap); } +inline JKRHeap* JKRFindHeap(void* ptr) { + return JKRHeap::findFromRoot(ptr); +} + inline JKRHeap* JKRGetRootHeap() { return JKRHeap::getRootHeap(); } |
