diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-08-16 18:05:17 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-16 18:05:17 -0400 |
| commit | e389a9b814baaabdbf497cd32edcdd2c30d3ff3f (patch) | |
| tree | 56ad6749c02048448a4f5ce90688efdc7dab1dbe /include/JSystem | |
| parent | 2d094c263e6145e69e254ec8ad4e71e3ea95a72b (diff) | |
demo work (#1172)
* Some d_message demo matches
* More demo matches
* fix jpn
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJoint.h | 18 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DPacket.h | 18 |
2 files changed, 25 insertions, 11 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index 6f46ba1b..bc0bd18f 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -133,14 +133,14 @@ class J3DJoint : public J3DNode { public: void initialize(); void addMesh(J3DMaterial*); - void calcIn(); - void calcOut(); - void entryIn(); - u32 getType() const { return 'NJNT'; } + virtual void calcIn(); + virtual void calcOut(); + virtual void entryIn(); + virtual u32 getType() const { return 'NJNT'; } void recursiveCalc(); J3DJoint() { initialize(); } - ~J3DJoint() {} + virtual ~J3DJoint() {} J3DMaterial* getMesh() { return mMesh; } u16 getJntNo() const { return mJntNo; } @@ -176,4 +176,12 @@ private: /* 0x60 */ J3DMaterial* mMesh; }; // Size: 0x64 +inline BOOL checkScaleOne(Vec v) { + if (v.x == 1.0f && v.y == 1.0f && v.z == 1.0f) { + return TRUE; + } else { + return FALSE; + } +} + #endif /* J3DJOINT_H */ diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index d934eefd..a33d01c4 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -3,6 +3,7 @@ #include "JSystem/J3DGraphBase/J3DDrawBuffer.h" #include "JSystem/J3DGraphBase/J3DSys.h" +#include "JSystem/JUtility/JUTAssert.h" #include "dolphin/gd/GDBase.h" #include "dolphin/types.h" @@ -197,15 +198,20 @@ public: void beginDiff(); void endDiff(); - J3DMaterial* getMaterial() const { return mpMaterial; } - J3DShapePacket* getShapePacket() const { return mpShapePacket; } + J3DMaterial* getMaterial() { return mpMaterial; } + J3DShapePacket* getShapePacket() { return mpShapePacket; } void setShapePacket(J3DShapePacket* packet) { mpShapePacket = packet; } - void setMaterial(J3DMaterial* pMaterial) { mpMaterial = pMaterial; } + void setMaterial(J3DMaterial* pMaterial) { + J3D_ASSERT(646, pMaterial != NULL, "Error : null pointer."); + mpMaterial = pMaterial; + } void setTexture(J3DTexture* pTexture) { mpTexture = pTexture; } void setInitShapePacket(J3DShapePacket* packet) { mpInitShapePacket = packet; } - void setMaterialAnmID(J3DMaterialAnm* materialAnm) { mpMaterialAnm = materialAnm; } - bool isChanged() const { return mDiffFlag & 0x80000000; } - bool isEnabled_Diff() const { return mpInitShapePacket->getDisplayListObj() != NULL; } + void setMaterialAnmID(u32 materialAnm) { mpMaterialAnm = (J3DMaterialAnm*)materialAnm; } + void setMaterialID(u32 id) { mDiffFlag = id; } + bool isChanged() { return mDiffFlag & 0x80000000; } + bool isEnabled_Diff() { return mpInitShapePacket->getDisplayListObj() != NULL; } + J3DTexture* getTexture() { return mpTexture; } virtual ~J3DMatPacket(); virtual int entry(J3DDrawBuffer* param_1) { |
