J3DModelLoader 99%

mostly copied from TP decomp
This commit is contained in:
LagoLunatic
2023-12-18 19:54:29 -05:00
parent 3510a17d02
commit 457a32d3b8
19 changed files with 910 additions and 254 deletions
@@ -41,6 +41,9 @@ public:
virtual void reset();
virtual void change();
J3DMaterial() { initialize(); }
~J3DMaterial() {}
J3DMaterial* getNext() const { return mNext; }
void setNext(J3DMaterial* material) {mNext = material; }
J3DShape* getShape() const { return mShape; }
+3 -1
View File
@@ -34,10 +34,12 @@ private:
/* 0x4 */ ResTIMG* mpRes;
public:
J3DTexture(u16 num, ResTIMG* res) : mNum(num), mpRes(res) {}
virtual ~J3DTexture() {}
void loadGX(u16, _GXTexMapID) const;
void entryNum(u16);
void addResTIMG(u16, ResTIMG const*);
virtual ~J3DTexture();
u16 getNum() const { return mNum; }
ResTIMG* getResTIMG(u16 entry) const { return &mpRes[entry]; }
+10 -8
View File
@@ -26,18 +26,18 @@ public:
inline void clear() { mPacketNum = 0; }
void* getVtxPosArray() const { return mVtxPosArray; }
void* getVtxNrmArray() const { return mVtxNrmArray; }
void* getVtxPosArray() { return mVtxPosArray; }
void* getVtxNrmArray() { return mVtxNrmArray; }
GXColor* getVtxColorArray(u8 idx) const { return mVtxColorArray[idx]; }
void* getVtxTexCoordArray(u8 idx) const { return mVtxTexCoordArray[idx]; }
void* getVtxNBTArray() const { return mVtxNBTArray; }
void* getVtxTexCoordArray(u8 idx) { return mVtxTexCoordArray[idx]; }
void* getVtxNBTArray() { return mVtxNBTArray; }
u32 getNrmNum() const { return mNrmNum; }
u32 getVtxNum() const { return mVtxNum; }
GXVtxAttrFmtList* getVtxAttrFmtList() { return mVtxAttrFmtList; }
u8 getVtxPosFrac() { return mVtxPosFrac; }
u8 getVtxNrmFrac() { return mVtxNrmFrac; }
int getVtxPosType() { return mVtxPosType; }
int getVtxNrmType() { return mVtxNrmType; }
u8 getVtxPosFrac() const { return mVtxPosFrac; }
u8 getVtxNrmFrac() const { return mVtxNrmFrac; }
int getVtxPosType() const { return mVtxPosType; }
int getVtxNrmType() const { return mVtxNrmType; }
void setVtxPosFrac(u8 frac) { mVtxPosFrac = frac; }
void setVtxPosType(GXCompType type) { mVtxPosType = type; }
@@ -45,6 +45,8 @@ public:
void setVtxNrmType(GXCompType type) { mVtxNrmType = type; }
private:
friend class J3DModelLoader;
/* 0x00 */ u32 mVtxNum;
/* 0x04 */ u32 mNrmNum;
/* 0x08 */ u32 mColNum;