diff options
| author | TakaRikka <takarikka@outlook.com> | 2022-10-04 21:17:53 -0700 |
|---|---|---|
| committer | TakaRikka <takarikka@outlook.com> | 2022-10-04 21:17:53 -0700 |
| commit | 74c248990c5cc991aff8f119efd8b733770178a7 (patch) | |
| tree | 6f44f0e2711ebc8e59f3780ea78fe2ba89c452bd /include/JSystem/J3DGraphBase | |
| parent | a3578d0c7c64b11258260bee1148d33195542c4f (diff) | |
move jasper's jsystem work over
Diffstat (limited to 'include/JSystem/J3DGraphBase')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DPacket.h | 18 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DSys.h | 3 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTransform.h | 7 |
3 files changed, 17 insertions, 11 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 463ba0d356..232db283d3 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -51,29 +51,29 @@ public: class J3DPacket { public: J3DPacket() { - mpNextSibling = NULL; + mpNextPacket = NULL; mpFirstChild = NULL; mpUserData = NULL; } void addChildPacket(J3DPacket*); - J3DPacket* getNextPacket() const { return mpNextSibling; } - void setNextPacket(J3DPacket* i_packet) { mpNextSibling = i_packet; } + J3DPacket* getNextPacket() const { return mpNextPacket; } + void setNextPacket(J3DPacket* i_packet) { mpNextPacket = i_packet; } void drawClear() { - mpNextSibling = NULL; + mpNextPacket = NULL; mpFirstChild = NULL; } void setUserArea(u32 area) { mpUserData = (void*)area; } - virtual bool entry(J3DDrawBuffer*); + virtual int entry(J3DDrawBuffer*); virtual void draw(); virtual ~J3DPacket() {} public: - /* 0x04 */ J3DPacket* mpNextSibling; + /* 0x04 */ J3DPacket* mpNextPacket; /* 0x08 */ J3DPacket* mpFirstChild; /* 0x0C */ void* mpUserData; }; // Size: 0x10 @@ -145,19 +145,21 @@ public: void endDiff(); bool isSame(J3DMatPacket*) const; + J3DMaterial* getMaterial() const { return mpMaterial; } J3DShapePacket* getShapePacket() const { return mpShapePacket; } void setShapePacket(J3DShapePacket* packet) { mpShapePacket = packet; } void setInitShapePacket(J3DShapePacket* packet) { mpInitShapePacket = packet; } + bool isChanged() const { return mDiffFlag < 0; } virtual ~J3DMatPacket(); - virtual bool entry(J3DDrawBuffer*); + virtual int entry(J3DDrawBuffer*); virtual void draw(); public: /* 0x28 */ J3DShapePacket* mpInitShapePacket; /* 0x2C */ J3DShapePacket* mpShapePacket; /* 0x30 */ J3DMaterial* mpMaterial; - /* 0x34 */ u32 mSortFlags; + /* 0x34 */ u32 mDiffFlag; /* 0x38 */ J3DTexture* mpTexture; /* 0x3C */ J3DMaterialAnm* mpMaterialAnm; }; // Size: 0x40 diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h index fd75fc48f7..01f882e3f4 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/include/JSystem/J3DGraphBase/J3DSys.h @@ -93,6 +93,9 @@ struct J3DSys { void setMaterialMode(u32 mode) { mMaterialMode = mode; } void setTexture(J3DTexture* pTex) { mTexture = pTex; } + J3DTexture* getTexture() { return mTexture; } + + void setNBTScale(Vec* scale) { mNBTScale = scale; } void onFlag(u32 flag) { mFlags |= flag; } diff --git a/include/JSystem/J3DGraphBase/J3DTransform.h b/include/JSystem/J3DGraphBase/J3DTransform.h index 1bdc7ebb88..a162bd5b7c 100644 --- a/include/JSystem/J3DGraphBase/J3DTransform.h +++ b/include/JSystem/J3DGraphBase/J3DTransform.h @@ -1,13 +1,14 @@ #ifndef J3DTRANSFORM_H #define J3DTRANSFORM_H +#include "JSystem/JGeometry.h" #include "dolphin/mtx/mtxvec.h" #include "dolphin/types.h" struct J3DTransformInfo { - /* 0x00 */ Vec mScale; - /* 0x0C */ SVec mRotation; - /* 0x14 */ Vec mTranslate; + /* 0x00 */ JGeometry::TVec3<f32> mScale; + /* 0x0C */ JGeometry::TVec3<s16> mRotation; + /* 0x14 */ JGeometry::TVec3<f32> mTranslate; }; // Size: 0x20 extern J3DTransformInfo const j3dDefaultTransformInfo; |
