mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-18 05:08:57 -04:00
J3DShapeMtx progress
This commit is contained in:
@@ -27,13 +27,10 @@ public:
|
||||
static J3DTexMtxObj* sTexMtxObj;
|
||||
};
|
||||
|
||||
extern u8 struct_804515B0;
|
||||
extern u8 struct_804515B1;
|
||||
extern u8 struct_804515B2;
|
||||
extern u8 struct_804515B3;
|
||||
|
||||
class J3DShapeMtx {
|
||||
public:
|
||||
typedef void (J3DShapeMtx::*MtxLoadIndx)(int mtxNo, u16 index) const;
|
||||
|
||||
J3DShapeMtx(u16 useMtxIndex) : mUseMtxIndex(useMtxIndex) {}
|
||||
|
||||
void resetMtxLoadCache();
|
||||
@@ -49,25 +46,58 @@ public:
|
||||
virtual void load() const;
|
||||
virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
|
||||
|
||||
static u8 sMtxLoadPipeline[48];
|
||||
static u16 sMtxLoadCache[10 + 2 /* padding */];
|
||||
static MtxLoadIndx sMtxLoadPipeline[4];
|
||||
static u32 sCurrentPipeline;
|
||||
// static J3DScaleFlag sCurrentScaleFlag;
|
||||
static u8* sCurrentScaleFlag;
|
||||
static u8 sNBTFlag;
|
||||
static u32 sTexMtxLoadType;
|
||||
|
||||
static void setCurrentPipeline(u32 pipeline) { sCurrentPipeline = pipeline; }
|
||||
static void setLODFlag(u8 flag) { struct_804515B1 = flag; }
|
||||
static u8 getLODFlag() { return struct_804515B1; }
|
||||
static void resetMtxLoadCache();
|
||||
|
||||
private:
|
||||
protected:
|
||||
/* 0x04 */ u16 mUseMtxIndex;
|
||||
};
|
||||
|
||||
class J3DShapeMtxImm : public J3DShapeMtx {
|
||||
public:
|
||||
typedef void (J3DShapeMtxImm::*MtxLoadImm)(int mtxNo, u16 index) const;
|
||||
|
||||
J3DShapeMtxImm(u16 useMtxIndex) : J3DShapeMtx(useMtxIndex) {}
|
||||
|
||||
virtual ~J3DShapeMtxImm();
|
||||
virtual u32 getType() const;
|
||||
virtual void load() const;
|
||||
virtual void loadNrmMtx(int, u16) const;
|
||||
|
||||
void loadMtxImm_PNGP(int, u16) const;
|
||||
void loadMtxImm_PCPU(int, u16) const;
|
||||
void loadMtxImm_NCPU(int, u16) const;
|
||||
void loadMtxImm_PNCPU(int, u16) const;
|
||||
void loadMtxImm_PNGP_LOD(int, u16) const;
|
||||
|
||||
static MtxLoadImm sMtxLoadPipeline[4];
|
||||
};
|
||||
|
||||
class J3DShapeMtxMultiImm : public J3DShapeMtxImm {
|
||||
public:
|
||||
J3DShapeMtxMultiImm(u16 useMtxIndex) : J3DShapeMtxImm(useMtxIndex) {}
|
||||
|
||||
virtual ~J3DShapeMtxMultiImm();
|
||||
virtual u32 getType() const;
|
||||
virtual u32 getUseMtxNum() const;
|
||||
virtual u32 getUseMtxIndex(u16) const;
|
||||
virtual void load() const;
|
||||
virtual void loadNrmMtx(int, u16) const;
|
||||
|
||||
private:
|
||||
/* 0x6 */ u16 mUseMtxNum;
|
||||
/* 0x8 */ u16* mUseMtxIndexTable;
|
||||
};
|
||||
|
||||
class J3DShapeMtxConcatView : public J3DShapeMtx {
|
||||
public:
|
||||
typedef void (J3DShapeMtxConcatView::*MtxLoadConcatView)(int mtxNo, u16 index) const;
|
||||
|
||||
J3DShapeMtxConcatView(u16 useMtxIndex) : J3DShapeMtx(useMtxIndex) {}
|
||||
|
||||
virtual ~J3DShapeMtxConcatView();
|
||||
@@ -82,9 +112,26 @@ public:
|
||||
void loadMtxConcatView_PNCPU(int, u16) const;
|
||||
void loadMtxConcatView_PNGP_LOD(int, u16) const;
|
||||
|
||||
static u8 sMtxLoadPipeline[48];
|
||||
static u8 sMtxLoadLODPipeline[48];
|
||||
static u8 sMtxPtrTbl[8];
|
||||
static MtxLoadConcatView sMtxLoadPipeline[4];
|
||||
static Mtx * sMtxPtrTbl[2];
|
||||
};
|
||||
|
||||
class J3DShapeMtxBBoardImm : public J3DShapeMtxImm {
|
||||
public:
|
||||
J3DShapeMtxBBoardImm(u16 useMtxIndex) : J3DShapeMtxImm(useMtxIndex) {}
|
||||
|
||||
virtual ~J3DShapeMtxBBoardImm();
|
||||
virtual u32 getType() const;
|
||||
virtual void load() const;
|
||||
};
|
||||
|
||||
class J3DShapeMtxYBBoardImm : public J3DShapeMtxImm {
|
||||
public:
|
||||
J3DShapeMtxYBBoardImm(u16 useMtxIndex) : J3DShapeMtxImm(useMtxIndex) {}
|
||||
|
||||
virtual ~J3DShapeMtxYBBoardImm();
|
||||
virtual u32 getType() const;
|
||||
virtual void load() const;
|
||||
};
|
||||
|
||||
class J3DShapeMtxYBBoardConcatView : public J3DShapeMtxConcatView {
|
||||
@@ -115,7 +162,7 @@ public:
|
||||
virtual u32 getUseMtxNum() const;
|
||||
virtual u32 getUseMtxIndex(u16) const;
|
||||
virtual void load() const;
|
||||
virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
|
||||
virtual void calcNBTScale(Vec const&, Mtx33*, Mtx33*);
|
||||
|
||||
private:
|
||||
/* 0x6 */ u16 mUseMtxNum;
|
||||
@@ -141,4 +188,4 @@ private:
|
||||
/* 0x8 */ u16* mUseMtxIndexTable;
|
||||
};
|
||||
|
||||
#endif /* J3DSHAPEMTX_H */
|
||||
#endif /* J3DSHAPEMTX_H */
|
||||
|
||||
Reference in New Issue
Block a user