mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-04 09:08:39 -04:00
J3DModelData 99%
just one regswap
This commit is contained in:
@@ -46,6 +46,7 @@ public:
|
||||
J3DJoint();
|
||||
void entryIn();
|
||||
void recursiveCalc();
|
||||
void addMesh(J3DMaterial*);
|
||||
|
||||
J3DMaterial* getMesh() { return mMesh; }
|
||||
u16 getJntNo() const { return mJntNo; }
|
||||
|
||||
@@ -25,16 +25,18 @@ struct J3DDrawMtxData {
|
||||
}; // Size: 0xC
|
||||
|
||||
class J3DShapeTable;
|
||||
class J3DShape;
|
||||
|
||||
class J3DJointTree {
|
||||
public:
|
||||
J3DJointTree();
|
||||
void makeHierarchy(J3DJoint*, J3DModelHierarchy const**, J3DMaterialTable*, J3DShapeTable*);
|
||||
J3DJointTree() { clear(); }
|
||||
void clear();
|
||||
void makeHierarchy(J3DNode*, const J3DModelHierarchy**, J3DMaterialTable*, J3DShape**);
|
||||
void findImportantMtxIndex();
|
||||
|
||||
virtual void calc(J3DMtxBuffer*, Vec const&, f32 const (&)[3][4]);
|
||||
virtual ~J3DJointTree();
|
||||
virtual ~J3DJointTree() {}
|
||||
|
||||
J3DDrawMtxData * getDrawMtxData() { return &mDrawMtxData; }
|
||||
u16 getWEvlpMtxNum() const { return mWEvlpMtxNum; }
|
||||
u8 getWEvlpMixMtxNum(u16 idx) const { return mWEvlpMixMtxNum[idx]; }
|
||||
u16 * getWEvlpMixIndex() const { return mWEvlpMixIndex; }
|
||||
|
||||
@@ -39,12 +39,16 @@ public:
|
||||
|
||||
J3DTexture* getTexture() const { return mTexture; }
|
||||
JUTNameTab* getTextureName() const { return mTextureName; }
|
||||
void setTexture(J3DTexture* pTexture) { mTexture = pTexture; }
|
||||
void setTextureName(JUTNameTab* pTextureName) { mTextureName = pTextureName; }
|
||||
|
||||
JUTNameTab* getMaterialName() const { return mMaterialName; }
|
||||
|
||||
u16 getMaterialNum() const { return mMaterialNum; }
|
||||
|
||||
private:
|
||||
friend class J3DJointTree;
|
||||
|
||||
/* 0x04 */ u16 mMaterialNum;
|
||||
/* 0x06 */ u16 mUniqueMatNum;
|
||||
/* 0x08 */ J3DMaterial** mMaterialNodePointer;
|
||||
|
||||
@@ -11,22 +11,29 @@
|
||||
typedef struct _GXColor GXColor;
|
||||
class JUTNameTab;
|
||||
|
||||
enum J3DMaterialCopyFlag {
|
||||
J3DMatCopyFlag_Material = 0x01,
|
||||
J3DMatCopyFlag_Texture = 0x02,
|
||||
};
|
||||
|
||||
class J3DModelData {
|
||||
public:
|
||||
void clear();
|
||||
J3DModelData();
|
||||
s32 newSharedDisplayList(u32);
|
||||
bool isDeformablePositionFormat() const;
|
||||
void indexToPtr();
|
||||
void makeSharedDL();
|
||||
void simpleCalcMaterial(u16, f32 (*)[4]);
|
||||
void syncJ3DSysPointers() const;
|
||||
void syncJ3DSysFlags() const;
|
||||
void initShapeNodes();
|
||||
void sortVcdVatCmd();
|
||||
void setMaterialTable(J3DMaterialTable*, J3DMaterialCopyFlag);
|
||||
|
||||
virtual ~J3DModelData();
|
||||
|
||||
J3DMaterialTable& getMaterialTable() { return mMaterialTable; }
|
||||
JUTNameTab* getMaterialName() const { return mMaterialTable.getMaterialName(); }
|
||||
J3DVertexData& getVertexData() { return mVertexData; }
|
||||
GXVtxAttrFmtList* getVtxAttrFmtList() const { return ((J3DVertexData*)&mVertexData)->getVtxAttrFmtList(); }
|
||||
u16 getShapeNum() const { return mShapeTable.getShapeNum(); }
|
||||
u16 getMaterialNum() const { return mMaterialTable.getMaterialNum(); }
|
||||
u16 getJointNum() const { return mJointTree.getJointNum(); }
|
||||
@@ -36,6 +43,7 @@ public:
|
||||
}
|
||||
u32 getVtxNum() const { return mVertexData.getVtxNum(); }
|
||||
u32 getNrmNum() const { return mVertexData.getNrmNum(); }
|
||||
J3DDrawMtxData * getDrawMtxData() { return mJointTree.getDrawMtxData(); }
|
||||
u8 getDrawMtxFlag(u16 idx) const { return mJointTree.getDrawMtxFlag(idx); }
|
||||
u16 getDrawMtxIndex(u16 idx) const { return mJointTree.getDrawMtxIndex(idx); }
|
||||
J3DShape* getShapeNodePointer(u16 idx) const { return mShapeTable.getShapeNodePointer(idx); }
|
||||
@@ -45,6 +53,8 @@ public:
|
||||
Mtx& getInvJointMtx(s32 idx) const { return mJointTree.getInvJointMtx(idx); }
|
||||
J3DTexture* getTexture() const { return mMaterialTable.getTexture(); }
|
||||
JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); }
|
||||
void setTexture(J3DTexture* pTexture) { mMaterialTable.setTexture(pTexture); }
|
||||
void setTextureName(JUTNameTab* pTextureName) { mMaterialTable.setTextureName(pTextureName); }
|
||||
u16 getWEvlpMtxNum() const { return mJointTree.getWEvlpMtxNum(); }
|
||||
u16* getWEvlpMixMtxIndex() const { return mJointTree.getWEvlpMixIndex(); }
|
||||
f32* getWEvlpMixWeight() const { return mJointTree.getWEvlpMixWeight(); }
|
||||
@@ -74,10 +84,6 @@ public:
|
||||
int removeMatColorAnimator(J3DAnmColor* anm) {
|
||||
return mMaterialTable.removeMatColorAnimator(anm);
|
||||
}
|
||||
void syncJ3DSys() {
|
||||
syncJ3DSysFlags();
|
||||
syncJ3DSysPointers();
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x04 */ void* mpRawData;
|
||||
|
||||
@@ -11,7 +11,8 @@ public:
|
||||
virtual void init(Vec const& param_0, Mtx*);
|
||||
virtual void entryIn();
|
||||
virtual void calcIn();
|
||||
virtual u32 getType();
|
||||
virtual void calcOut();
|
||||
virtual u32 getType() const;
|
||||
virtual ~J3DNode();
|
||||
|
||||
J3DNode();
|
||||
|
||||
@@ -8,22 +8,16 @@ class JUTNameTab;
|
||||
|
||||
class J3DShapeTable {
|
||||
public:
|
||||
J3DShapeTable() {
|
||||
inline void clear() {
|
||||
mShapeNum = 0;
|
||||
mShapeNodePointer = NULL;
|
||||
}
|
||||
|
||||
void hide();
|
||||
void show();
|
||||
void initShapeNodes(J3DDrawMtxData*, J3DVertexData*);
|
||||
void sortVcdVatCmd();
|
||||
|
||||
virtual ~J3DShapeTable();
|
||||
|
||||
u16 getShapeNum() const { return mShapeNum; }
|
||||
J3DShape* getShapeNodePointer(u16 idx) const { return mShapeNodePointer[idx]; }
|
||||
|
||||
private:
|
||||
/* 0x0 */ void *field_0x0;
|
||||
/* 0x4 */ u16 mShapeNum;
|
||||
/* 0x8 */ J3DShape** mShapeNodePointer;
|
||||
}; // Size: 0x0C
|
||||
|
||||
Reference in New Issue
Block a user