diff --git a/configure.py b/configure.py index 7f393a445..2776122ad 100644 --- a/configure.py +++ b/configure.py @@ -198,6 +198,7 @@ def ActorRel(status, rel_name): "objects": [ Object(NonMatching, "JSystem/JFramework/JFWDisplay.cpp"), Object(NonMatching, "JSystem/JFramework/JFWSystem.cpp"), + Object(NonMatching, "JSystem/J3DGraphBase/J3DPacket.cpp"), Object(Matching, "JSystem/J3DU/J3DUDL.cpp"), Object(NonMatching, "JSystem/JParticle/JPATexture.cpp"), Object(Matching, "JSystem/JKernel/JKRFile.cpp"), diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h index 69ad60894..3c31c7511 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -29,6 +29,10 @@ struct J3DUnkCalc2 { typedef void (*J3DCalcCallBack)(J3DModel*, u32 timing); +class J3DMatPacket; +class J3DShapePacket; +class J3DVisibilityManager; + class J3DModel { public: J3DModel() { @@ -39,32 +43,32 @@ class J3DModel { entryModelData(param_0, param_1, param_2); } - /* 800CFFF4 */ void setBaseTRMtx(f32 (*)[4]); - /* 80327100 */ void initialize(); - /* 80327184 */ s32 entryModelData(J3DModelData*, u32, u32); - /* 80327300 */ s32 createShapePacket(J3DModelData*); - /* 803273CC */ s32 createMatPacket(J3DModelData*, u32); - /* 803275FC */ s32 newDifferedDisplayList(u32); - /* 8032767C */ void lock(); - /* 803276B4 */ void unlock(); - /* 803279A0 */ void diff(); - /* 80327A2C */ s32 setDeformData(J3DDeformData*, u32); - /* 80327AA0 */ s32 setSkinDeform(J3DSkinDeform*, u32); - /* 80327BD4 */ void calcAnmMtx(); - /* 80327C58 */ void calcWeightEnvelopeMtx(); - /* 80328190 */ void calcNrmMtx(); - /* 803281B4 */ void calcBumpMtx(); - /* 803282B8 */ void calcBBoardMtx(); - /* 803282EC */ void prepareShapePackets(); + void setBaseTRMtx(f32 (*)[4]); + void initialize(); + s32 entryModelData(J3DModelData*, u32, u32); + s32 createShapePacket(J3DModelData*); + s32 createMatPacket(J3DModelData*, u32); + s32 newDifferedDisplayList(u32); + void lock(); + void unlock(); + void diff(); + s32 setDeformData(J3DDeformData*, u32); + s32 setSkinDeform(J3DSkinDeform*, u32); + void calcAnmMtx(); + void calcWeightEnvelopeMtx(); + void calcNrmMtx(); + void calcBumpMtx(); + void calcBBoardMtx(); + void prepareShapePackets(); MtxP getAnmMtx(int); - /* 80327CA4 */ virtual void update(); - /* 80327E4C */ virtual void entry(); - /* 80327CF0 */ virtual void calc(); - /* 803276EC */ virtual void calcMaterial(); - /* 80327858 */ virtual void calcDiffTexMtx(); - /* 80327F40 */ virtual void viewCalc(); - /* 80328350 */ virtual ~J3DModel(); + virtual void update(); + virtual void entry(); + virtual void calc(); + virtual void calcMaterial(); + virtual void calcDiffTexMtx(); + virtual void viewCalc(); + virtual ~J3DModel(); J3DModelData* getModelData() { return mModelData; } @@ -78,39 +82,42 @@ class J3DModel { void i_setBaseTRMtx(Mtx m) { MTXCopy(m, mBaseTransformMtx); } u32 getMtxCalcMode() const { return mFlags & 0x03; } J3DVertexBuffer* getVertexBuffer() const { return (J3DVertexBuffer*)&mVertexBuffer; } - J3DMatPacket* getMatPacket(u16 idx) const { return &mMatPacket[idx]; } - J3DShapePacket* getShapePacket(u16 idx) const { return &mShapePacket[idx]; } - J3DMtxBuffer* getMtxBuffer() const { return mMtxBuffer; } - Mtx33* getBumpMtxPtr(int idx) const { return mMtxBuffer->getBumpMtxPtr(idx); } - Mtx33* getNrmMtxPtr() const { return mMtxBuffer->getNrmMtxPtr(); } - Mtx* getDrawMtxPtr() const { return mMtxBuffer->getDrawMtxPtr(); } + J3DMatPacket* getMatPacket(u16 idx) const { return &mpMatPacket[idx]; } + J3DShapePacket* getShapePacket(u16 idx) const { return &mpShapePacket[idx]; } + // Mtx33* getBumpMtxPtr(int idx) const { return mMtxBuffer->getBumpMtxPtr(idx); } + Mtx33* getNrmMtxPtr() const { return mpNrmMtxBuf[1][mCurrentViewNo]; } + Mtx* getDrawMtxPtr() const { return mpDrawMtxBuf[1][mCurrentViewNo]; } void setBaseScale(const Vec& scale) { mBaseScale = scale; } void setUserArea(u32 area) { mUserArea = area; } u32 getUserArea() const { return mUserArea; } Vec* getBaseScale() { return &mBaseScale; } - void setAnmMtx(int i, Mtx m) { mMtxBuffer->setAnmMtx(i, m); } - - // is there a better way to handle inlines with same name as non-inlines? - MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); } - void i_setAnmMtx(int p1, Mtx mtx) { mMtxBuffer->setAnmMtx(p1, mtx); } - - /* 0x04 */ J3DModelData* mModelData; - /* 0x08 */ u32 mFlags; - /* 0x0C */ u32 mDiffFlag; - /* 0x10 */ J3DCalcCallBack mCalcCallBack; - /* 0x14 */ u32 mUserArea; - /* 0x18 */ Vec mBaseScale; - /* 0x24 */ Mtx mBaseTransformMtx; - /* 0x54 */ Mtx mInternalView; - /* 0x84 */ J3DMtxBuffer* mMtxBuffer; - /* 0x88 */ J3DVertexBuffer mVertexBuffer; - /* 0xC0 */ J3DMatPacket* mMatPacket; - /* 0xC4 */ J3DShapePacket* mShapePacket; - /* 0xC8 */ J3DDeformData* mDeformData; - /* 0xCC */ J3DSkinDeform* mSkinDeform; - /* 0xD0 */ J3DVtxColorCalc* mVtxColorCalc; - /* 0xD4 */ J3DUnkCalc1* mUnkCalc1; - /* 0xD8 */ J3DUnkCalc2* mUnkCalc2; + + /* 0x004 */ J3DModelData* mModelData; + /* 0x008 */ u32 mFlags; + /* 0x00C */ u32 mDiffFlag; + /* 0x010 */ J3DCalcCallBack mCalcCallBack; + /* 0x014 */ u32 mUserArea; + /* 0x018 */ Vec mBaseScale; + /* 0x024 */ Mtx mBaseTransformMtx; + /* 0x054 */ Mtx mInternalView; + /* 0x084 */ u8* mpScaleFlagArr; + /* 0x088 */ u8* mpEvlpScaleFlagArr; + /* 0x08C */ Mtx* mpNodeMtx; + /* 0x090 */ Mtx* mpWeightEnvMtx; + /* 0x094 */ Mtx** mpDrawMtxBuf[2]; + /* 0x09C */ Mtx33** mpNrmMtxBuf[2]; + /* 0x0A4 */ Mtx33*** mpBumpMtxArr[2]; + /* 0x0AC */ u32 mMtxBufferFlag; + /* 0x0B0 */ u32 mCurrentViewNo; + /* 0x0B4 */ J3DMatPacket* mpMatPacket; + /* 0x0B8 */ J3DShapePacket* mpShapePacket; + /* 0x0BC */ J3DDeformData* mpDeformData; + /* 0x0C0 */ J3DSkinDeform* mpSkinDeform; + /* 0x0C4 */ void * pad4[2]; + /* 0x0CC */ J3DVertexBuffer mVertexBuffer; + /* 0x104 */ J3DVisibilityManager * mpVisibilityManager; }; +STATIC_ASSERT(sizeof(J3DModel) == 0x108); + #endif /* J3DMODEL_H */ diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 5e9b562d4..a726d1bc1 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -7,11 +7,11 @@ #include "dolphin/types.h" struct J3DGXColorS10 : public GXColorS10 { - /* 8000E460 */ J3DGXColorS10() {} + J3DGXColorS10() {} }; struct J3DGXColor : public GXColor { - /* 8000E538 */ J3DGXColor() {} + J3DGXColor() {} }; struct J3DNBTScale : public J3DNBTScaleInfo { @@ -27,31 +27,28 @@ extern const J3DNBTScaleInfo j3dDefaultNBTScaleInfo; class J3DTexGenBlock { public: - /* 80317354 */ virtual void reset(J3DTexGenBlock*); + virtual void reset(J3DTexGenBlock*); virtual void calc(f32 const (*)[4]) = 0; - virtual void calcWithoutViewMtx(f32 const (*)[4]) = 0; - virtual void calcPostTexMtx(f32 const (*)[4]) = 0; - virtual void calcPostTexMtxWithoutViewMtx(f32 const (*)[4]) = 0; virtual void load() = 0; virtual void patch() = 0; virtual void diff(u32) = 0; virtual void diffTexMtx() = 0; virtual void diffTexGen() = 0; - /* 803172FC */ virtual s32 countDLSize(); + virtual s32 countDLSize(); virtual u32 getType() = 0; - /* 8031741C */ virtual void setTexGenNum(u32 const*); - /* 8000E0D0 */ virtual void setTexGenNum(u32); - /* 8000DFE8 */ virtual u32 getTexGenNum() const; - /* 8000E0CC */ virtual void setTexCoord(u32, J3DTexCoord const*); - /* 8000DFE0 */ virtual J3DTexCoord* getTexCoord(u32); - /* 8003AB2C */ virtual void setTexMtx(u32, J3DTexMtx*); - /* 8000DFD8 */ virtual J3DTexMtx* getTexMtx(u32); - /* 80317424 */ virtual void setNBTScale(J3DNBTScale const*); - /* 80317420 */ virtual void setNBTScale(J3DNBTScale); - /* 80317334 */ virtual J3DNBTScale* getNBTScale(); - /* 80317428 */ virtual bool getTexMtxOffset() const; - /* 80317430 */ virtual void setTexMtxOffset(u32); - /* 803171DC */ virtual ~J3DTexGenBlock(); + virtual void setTexGenNum(u32 const*); + virtual void setTexGenNum(u32); + virtual u32 getTexGenNum() const; + virtual void setTexCoord(u32, J3DTexCoord const*); + virtual J3DTexCoord* getTexCoord(u32); + virtual void setTexMtx(u32, J3DTexMtx*); + virtual J3DTexMtx* getTexMtx(u32); + virtual void setNBTScale(J3DNBTScale const*); + virtual void setNBTScale(J3DNBTScale); + virtual J3DNBTScale* getNBTScale(); + virtual bool getTexMtxOffset() const; + virtual void setTexMtxOffset(u32); + virtual ~J3DTexGenBlock(); }; class J3DTexGenBlockPatched : public J3DTexGenBlock { @@ -59,30 +56,30 @@ class J3DTexGenBlockPatched : public J3DTexGenBlock { J3DTexGenBlockPatched() { initialize(); } - /* 80317644 */ void initialize(); - - /* 80320084 */ virtual void reset(J3DTexGenBlock*); - /* 803213C0 */ virtual void calc(f32 const (*)[4]); - /* 80321584 */ virtual void calcWithoutViewMtx(f32 const (*)[4]); - /* 803216D8 */ virtual void calcPostTexMtx(f32 const (*)[4]); - /* 8032181C */ virtual void calcPostTexMtxWithoutViewMtx(f32 const (*)[4]); - /* 80322E70 */ virtual void load(); - /* 8031AA88 */ virtual void patch(); - /* 8031AC68 */ virtual void diff(u32); - /* 8031ACD0 */ virtual void diffTexMtx(); - /* 8031AD30 */ virtual void diffTexGen(); - /* 80317B9C */ virtual s32 countDLSize(); - /* 80322E74 */ virtual u32 getType(); - /* 80322D3C */ virtual void setTexGenNum(u32 const*); - /* 80322D34 */ virtual void setTexGenNum(u32); - /* 80322D48 */ virtual u32 getTexGenNum() const; - /* 80322D50 */ virtual void setTexCoord(u32, J3DTexCoord const*); - /* 80322D64 */ virtual J3DTexCoord* getTexCoord(u32); - /* 80322D78 */ virtual void setTexMtx(u32, J3DTexMtx*); - /* 80322D88 */ virtual J3DTexMtx* getTexMtx(u32); - /* 80322D98 */ virtual bool getTexMtxOffset() const; - /* 80322DA0 */ virtual void setTexMtxOffset(u32); - /* 80317180 */ virtual ~J3DTexGenBlockPatched(); + void initialize(); + + virtual void reset(J3DTexGenBlock*); + virtual void calc(f32 const (*)[4]); + virtual void calcWithoutViewMtx(f32 const (*)[4]); + virtual void calcPostTexMtx(f32 const (*)[4]); + virtual void calcPostTexMtxWithoutViewMtx(f32 const (*)[4]); + virtual void load(); + virtual void patch(); + virtual void diff(u32); + virtual void diffTexMtx(); + virtual void diffTexGen(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setTexGenNum(u32 const*); + virtual void setTexGenNum(u32); + virtual u32 getTexGenNum() const; + virtual void setTexCoord(u32, J3DTexCoord const*); + virtual J3DTexCoord* getTexCoord(u32); + virtual void setTexMtx(u32, J3DTexMtx*); + virtual J3DTexMtx* getTexMtx(u32); + virtual bool getTexMtxOffset() const; + virtual void setTexMtxOffset(u32); + virtual ~J3DTexGenBlockPatched(); private: /* 0x04 */ u32 mTexGenNum; @@ -96,17 +93,17 @@ class J3DTexGenBlockBasic : public J3DTexGenBlockPatched { J3DTexGenBlockBasic() : mNBTScale(j3dDefaultNBTScaleInfo) { initialize(); } - /* 803176A4 */ void initialize(); - - /* 803202DC */ virtual void reset(J3DTexGenBlock*); - /* 8031A9E8 */ virtual void load(); - /* 8031ABC0 */ virtual void patch(); - /* 80317BAC */ virtual s32 countDLSize(); - /* 80322C6C */ virtual u32 getType(); - /* 80322C9C */ virtual void setNBTScale(J3DNBTScale const*); - /* 80322C78 */ virtual void setNBTScale(J3DNBTScale); - /* 80322CC0 */ virtual J3DNBTScale* getNBTScale(); - /* 80322CC8 */ virtual ~J3DTexGenBlockBasic(); + void initialize(); + + virtual void reset(J3DTexGenBlock*); + virtual void load(); + virtual void patch(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setNBTScale(J3DNBTScale const*); + virtual void setNBTScale(J3DNBTScale); + virtual J3DNBTScale* getNBTScale(); + virtual ~J3DTexGenBlockBasic(); private: /* 0x5C */ J3DNBTScale mNBTScale; @@ -117,17 +114,17 @@ class J3DTexGenBlock4 : public J3DTexGenBlockPatched { J3DTexGenBlock4() : mNBTScale(j3dDefaultNBTScaleInfo) { initialize(); } - /* 80317674 */ void initialize(); - - /* 803201A0 */ virtual void reset(J3DTexGenBlock*); - /* 8031A948 */ virtual void load(); - /* 8031AB18 */ virtual void patch(); - /* 80317BA4 */ virtual s32 countDLSize(); - /* 80322DA8 */ virtual u32 getType(); - /* 80322DD8 */ virtual void setNBTScale(J3DNBTScale const*); - /* 80322DB4 */ virtual void setNBTScale(J3DNBTScale); - /* 80322DFC */ virtual J3DNBTScale* getNBTScale(); - /* 80322E04 */ virtual ~J3DTexGenBlock4(); + void initialize(); + + virtual void reset(J3DTexGenBlock*); + virtual void load(); + virtual void patch(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setNBTScale(J3DNBTScale const*); + virtual void setNBTScale(J3DNBTScale); + virtual J3DNBTScale* getNBTScale(); + virtual ~J3DTexGenBlock4(); private: /* 0x5C */ J3DNBTScale mNBTScale; @@ -135,62 +132,62 @@ class J3DTexGenBlock4 : public J3DTexGenBlockPatched { class J3DTevBlock { public: - /* 80317350 */ virtual void reset(J3DTevBlock*); - /* 80317330 */ virtual void load(); - /* 8031CD44 */ virtual void diff(u32); - /* 80321948 */ virtual void diffTexNo(); - /* 80321938 */ virtual void diffTevReg(); - /* 80321944 */ virtual void diffTexCoordScale(); - /* 80321940 */ virtual void diffTevStage(); - /* 8032193C */ virtual void diffTevStageIndirect(); - /* 8000DBD4 */ virtual void patch(); - /* 8032353C */ virtual void patchTexNo(); - /* 80323540 */ virtual void patchTevReg(); - /* 8000DBC8 */ virtual void patchTexNoAndTexCoordScale(); + virtual void reset(J3DTevBlock*); + virtual void load(); + virtual void diff(u32); + virtual void diffTexNo(); + virtual void diffTevReg(); + virtual void diffTexCoordScale(); + virtual void diffTevStage(); + virtual void diffTevStageIndirect(); + virtual void patch(); + virtual void patchTexNo(); + virtual void patchTevReg(); + virtual void patchTexNoAndTexCoordScale(); virtual void ptrToIndex() = 0; virtual void indexToPtr() = 0; virtual u32 getType() = 0; - /* 8031730C */ virtual s32 countDLSize(); - /* 80323544 */ virtual void setTexNo(u32, u16 const*); - /* 8000E0AC */ virtual void setTexNo(u32, u16); - /* 8000DF94 */ virtual u16 getTexNo(u32) const; - /* 80323548 */ virtual void setTevOrder(u32, J3DTevOrder const*); - /* 8000E0BC */ virtual void setTevOrder(u32, J3DTevOrder); - /* 8000DFB8 */ virtual J3DTevOrder* getTevOrder(u32); - /* 80110E80 */ virtual void setTevColor(u32, J3DGXColorS10 const*); - /* 8000E0C4 */ virtual void setTevColor(u32, J3DGXColorS10); - /* 8000DFC8 */ virtual _GXColorS10* getTevColor(u32); - /* 800732AC */ virtual void setTevKColor(u32, J3DGXColor const*); - /* 8000E0C0 */ virtual void setTevKColor(u32, J3DGXColor); - /* 8000DFC0 */ virtual _GXColor* getTevKColor(u32); - /* 80322950 */ virtual void setTevKColorSel(u32, u8 const*); - /* 8000E0B8 */ virtual void setTevKColorSel(u32, u8); - /* 8000DFB0 */ virtual bool getTevKColorSel(u32); - /* 80322954 */ virtual void setTevKAlphaSel(u32, u8 const*); - /* 8000E0B4 */ virtual void setTevKAlphaSel(u32, u8); - /* 8000DFA8 */ virtual bool getTevKAlphaSel(u32); - /* 8032354C */ virtual void setTevStageNum(u8 const*); - /* 8000E0C8 */ virtual void setTevStageNum(u8); - /* 8000DFD0 */ virtual u8 getTevStageNum() const; - /* 80323550 */ virtual void setTevStage(u32, J3DTevStage const*); - /* 8000E0A8 */ virtual void setTevStage(u32, J3DTevStage); - /* 8000DF8C */ virtual bool getTevStage(u32); - /* 8032295C */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 80322958 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 80322960 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 8000E0B0 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 8000DFA0 */ virtual bool getTevSwapModeTable(u32); - /* 80323554 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); - /* 8000E0A4 */ virtual void setIndTevStage(u32, J3DIndTevStage); - /* 8000DF84 */ virtual bool getIndTevStage(u32); - /* 80323558 */ virtual bool getTexNoOffset() const; - /* 80322964 */ virtual bool getTevRegOffset() const; - /* 80321FE0 */ virtual void setTexNoOffset(u32); - /* 8032296C */ virtual void setTevRegOffset(u32); - /* 80317224 */ virtual ~J3DTevBlock(); + virtual s32 countDLSize(); + virtual void setTexNo(u32, u16 const*); + virtual void setTexNo(u32, u16); + virtual u16 getTexNo(u32) const; + virtual void setTevOrder(u32, J3DTevOrder const*); + virtual void setTevOrder(u32, J3DTevOrder); + virtual J3DTevOrder* getTevOrder(u32); + virtual void setTevColor(u32, J3DGXColorS10 const*); + virtual void setTevColor(u32, J3DGXColorS10); + virtual _GXColorS10* getTevColor(u32); + virtual void setTevKColor(u32, J3DGXColor const*); + virtual void setTevKColor(u32, J3DGXColor); + virtual _GXColor* getTevKColor(u32); + virtual void setTevKColorSel(u32, u8 const*); + virtual void setTevKColorSel(u32, u8); + virtual bool getTevKColorSel(u32); + virtual void setTevKAlphaSel(u32, u8 const*); + virtual void setTevKAlphaSel(u32, u8); + virtual bool getTevKAlphaSel(u32); + virtual void setTevStageNum(u8 const*); + virtual void setTevStageNum(u8); + virtual u8 getTevStageNum() const; + virtual void setTevStage(u32, J3DTevStage const*); + virtual void setTevStage(u32, J3DTevStage); + virtual bool getTevStage(u32); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + virtual bool getTevSwapModeTable(u32); + virtual void setIndTevStage(u32, J3DIndTevStage const*); + virtual void setIndTevStage(u32, J3DIndTevStage); + virtual bool getIndTevStage(u32); + virtual bool getTexNoOffset() const; + virtual bool getTevRegOffset() const; + virtual void setTexNoOffset(u32); + virtual void setTevRegOffset(u32); + virtual ~J3DTevBlock(); private: - /* 8031E098 */ void indexToPtr_private(u32); + void indexToPtr_private(u32); /* 0x4 */ u32 mTexNoOffset; }; @@ -200,51 +197,51 @@ class J3DTevBlockPatched : public J3DTevBlock { J3DTevBlockPatched() { initialize(); } - /* 803176E0 */ void initialize(); - - /* 80320418 */ virtual void reset(J3DTevBlock*); - /* 80322970 */ virtual void load(); - /* 8031CE00 */ virtual void diffTexNo(); - /* 8031D028 */ virtual void diffTevReg(); - /* 8031D0C4 */ virtual void diffTexCoordScale(); - /* 8031CE64 */ virtual void diffTevStage(); - /* 8031CF78 */ virtual void diffTevStageIndirect(); - /* 8031C228 */ virtual void patch(); - /* 8031BF4C */ virtual void patchTexNo(); - /* 8031BFE0 */ virtual void patchTevReg(); - /* 8031C0AC */ virtual void patchTexNoAndTexCoordScale(); - /* 8031DFB4 */ virtual void ptrToIndex(); - /* 80322974 */ virtual void indexToPtr(); - /* 80322998 */ virtual u32 getType(); - /* 80317BB4 */ virtual s32 countDLSize(); - /* 803229D0 */ virtual void setTexNo(u32, u16 const*); - /* 803229C0 */ virtual void setTexNo(u32, u16); - /* 803229E4 */ virtual u16 getTexNo(u32) const; - /* 80322A08 */ virtual void setTevOrder(u32, J3DTevOrder const*); - /* 803229F4 */ virtual void setTevOrder(u32, J3DTevOrder); - /* 80322A1C */ virtual J3DTevOrder* getTevOrder(u32); - /* 80322B24 */ virtual void setTevColor(u32, J3DGXColorS10 const*); - /* 80322AF8 */ virtual void setTevColor(u32, J3DGXColorS10); - /* 80322B50 */ virtual GXColorS10* getTevColor(u32); - /* 80322B90 */ virtual void setTevKColor(u32, J3DGXColor const*); - /* 80322B64 */ virtual void setTevKColor(u32, J3DGXColor); - /* 80322BBC */ virtual GXColor* getTevKColor(u32); - /* 80322BDC */ virtual void setTevKColorSel(u32, u8 const*); - /* 80322BD0 */ virtual void setTevKColorSel(u32, u8); - /* 80322BEC */ virtual bool getTevKColorSel(u32); - /* 803229AC */ virtual void setTevStageNum(u8 const*); - /* 803229A4 */ virtual void setTevStageNum(u8); - /* 803229B8 */ virtual u8 getTevStageNum() const; - /* 80322A6C */ virtual void setTevStage(u32, J3DTevStage const*); - /* 80322A30 */ virtual void setTevStage(u32, J3DTevStage); - /* 80322AA8 */ virtual bool getTevStage(u32); - /* 80322AD0 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); - /* 80322ABC */ virtual void setIndTevStage(u32, J3DIndTevStage); - /* 80322AE4 */ virtual bool getIndTevStage(u32); - /* 80322BF8 */ virtual bool getTexNoOffset() const; - /* 80322C00 */ virtual bool getTevRegOffset() const; - /* 80322C08 */ virtual void setTevRegOffset(u32); - /* 80322C10 */ virtual ~J3DTevBlockPatched(); + void initialize(); + + virtual void reset(J3DTevBlock*); + virtual void load(); + virtual void diffTexNo(); + virtual void diffTevReg(); + virtual void diffTexCoordScale(); + virtual void diffTevStage(); + virtual void diffTevStageIndirect(); + virtual void patch(); + virtual void patchTexNo(); + virtual void patchTevReg(); + virtual void patchTexNoAndTexCoordScale(); + virtual void ptrToIndex(); + virtual void indexToPtr(); + virtual u32 getType(); + virtual s32 countDLSize(); + virtual void setTexNo(u32, u16 const*); + virtual void setTexNo(u32, u16); + virtual u16 getTexNo(u32) const; + virtual void setTevOrder(u32, J3DTevOrder const*); + virtual void setTevOrder(u32, J3DTevOrder); + virtual J3DTevOrder* getTevOrder(u32); + virtual void setTevColor(u32, J3DGXColorS10 const*); + virtual void setTevColor(u32, J3DGXColorS10); + virtual GXColorS10* getTevColor(u32); + virtual void setTevKColor(u32, J3DGXColor const*); + virtual void setTevKColor(u32, J3DGXColor); + virtual GXColor* getTevKColor(u32); + virtual void setTevKColorSel(u32, u8 const*); + virtual void setTevKColorSel(u32, u8); + virtual bool getTevKColorSel(u32); + virtual void setTevStageNum(u8 const*); + virtual void setTevStageNum(u8); + virtual u8 getTevStageNum() const; + virtual void setTevStage(u32, J3DTevStage const*); + virtual void setTevStage(u32, J3DTevStage); + virtual bool getTevStage(u32); + virtual void setIndTevStage(u32, J3DIndTevStage const*); + virtual void setIndTevStage(u32, J3DIndTevStage); + virtual bool getIndTevStage(u32); + virtual bool getTexNoOffset() const; + virtual bool getTevRegOffset() const; + virtual void setTevRegOffset(u32); + virtual ~J3DTevBlockPatched(); private: /* 0x08 */ u16 mTexNo[8]; @@ -259,7 +256,7 @@ class J3DTevBlockPatched : public J3DTevBlock { }; // Size: 0xD8 class J3DTevBlockNull : public J3DTevBlock { - /* 803176D4 */ void initialize(); + void initialize(); }; class J3DTevBlock4 : public J3DTevBlock { @@ -267,59 +264,59 @@ class J3DTevBlock4 : public J3DTevBlock { J3DTevBlock4() { initialize(); } - /* 803178EC */ void initialize(); - - /* 8032098C */ virtual void reset(J3DTevBlock*); - /* 8031B4C0 */ virtual void load(); - /* 8031D758 */ virtual void diffTexNo(); - /* 8031D7BC */ virtual void diffTevReg(); - /* 8031DA1C */ virtual void diffTexCoordScale(); - /* 8031D858 */ virtual void diffTevStage(); - /* 8031D96C */ virtual void diffTevStageIndirect(); - /* 8031C9D0 */ virtual void patch(); - /* 8031C6F4 */ virtual void patchTexNo(); - /* 8031C788 */ virtual void patchTevReg(); - /* 8031C854 */ virtual void patchTexNoAndTexCoordScale(); - /* 80321FE8 */ virtual void ptrToIndex(); - /* 80321FEC */ virtual void indexToPtr(); - /* 80322010 */ virtual u32 getType(); - /* 80317BCC */ virtual s32 countDLSize(); - /* 8032202C */ virtual void setTexNo(u32, u16 const*); - /* 8032201C */ virtual void setTexNo(u32, u16); - /* 80322040 */ virtual u16 getTexNo(u32) const; - /* 80322064 */ virtual void setTevOrder(u32, J3DTevOrder const*); - /* 80322050 */ virtual void setTevOrder(u32, J3DTevOrder); - /* 80322078 */ virtual J3DTevOrder* getTevOrder(u32); - /* 803220B8 */ virtual void setTevColor(u32, J3DGXColorS10 const*); - /* 8032208C */ virtual void setTevColor(u32, J3DGXColorS10); - /* 803220E4 */ virtual GXColorS10* getTevColor(u32); - /* 80322124 */ virtual void setTevKColor(u32, J3DGXColor const*); - /* 803220F8 */ virtual void setTevKColor(u32, J3DGXColor); - /* 80322150 */ virtual GXColor* getTevKColor(u32); - /* 80322170 */ virtual void setTevKColorSel(u32, u8 const*); - /* 80322164 */ virtual void setTevKColorSel(u32, u8); - /* 80322180 */ virtual bool getTevKColorSel(u32); - /* 80322198 */ virtual void setTevKAlphaSel(u32, u8 const*); - /* 8032218C */ virtual void setTevKAlphaSel(u32, u8); - /* 803221A8 */ virtual bool getTevKAlphaSel(u32); - /* 803221BC */ virtual void setTevStageNum(u8 const*); - /* 803221B4 */ virtual void setTevStageNum(u8); - /* 803221C8 */ virtual u8 getTevStageNum() const; - /* 8032220C */ virtual void setTevStage(u32, J3DTevStage const*); - /* 803221D0 */ virtual void setTevStage(u32, J3DTevStage); - /* 80322248 */ virtual bool getTevStage(u32); - /* 80322294 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 8032225C */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 803222DC */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 803222CC */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 803222EC */ virtual bool getTevSwapModeTable(u32); - /* 80322310 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); - /* 803222FC */ virtual void setIndTevStage(u32, J3DIndTevStage); - /* 80322324 */ virtual bool getIndTevStage(u32); - /* 80322338 */ virtual bool getTexNoOffset() const; - /* 80322340 */ virtual bool getTevRegOffset() const; - /* 80322348 */ virtual void setTevRegOffset(u32); - /* 80322350 */ virtual ~J3DTevBlock4(); + void initialize(); + + virtual void reset(J3DTevBlock*); + virtual void load(); + virtual void diffTexNo(); + virtual void diffTevReg(); + virtual void diffTexCoordScale(); + virtual void diffTevStage(); + virtual void diffTevStageIndirect(); + virtual void patch(); + virtual void patchTexNo(); + virtual void patchTevReg(); + virtual void patchTexNoAndTexCoordScale(); + virtual void ptrToIndex(); + virtual void indexToPtr(); + virtual u32 getType(); + virtual s32 countDLSize(); + virtual void setTexNo(u32, u16 const*); + virtual void setTexNo(u32, u16); + virtual u16 getTexNo(u32) const; + virtual void setTevOrder(u32, J3DTevOrder const*); + virtual void setTevOrder(u32, J3DTevOrder); + virtual J3DTevOrder* getTevOrder(u32); + virtual void setTevColor(u32, J3DGXColorS10 const*); + virtual void setTevColor(u32, J3DGXColorS10); + virtual GXColorS10* getTevColor(u32); + virtual void setTevKColor(u32, J3DGXColor const*); + virtual void setTevKColor(u32, J3DGXColor); + virtual GXColor* getTevKColor(u32); + virtual void setTevKColorSel(u32, u8 const*); + virtual void setTevKColorSel(u32, u8); + virtual bool getTevKColorSel(u32); + virtual void setTevKAlphaSel(u32, u8 const*); + virtual void setTevKAlphaSel(u32, u8); + virtual bool getTevKAlphaSel(u32); + virtual void setTevStageNum(u8 const*); + virtual void setTevStageNum(u8); + virtual u8 getTevStageNum() const; + virtual void setTevStage(u32, J3DTevStage const*); + virtual void setTevStage(u32, J3DTevStage); + virtual bool getTevStage(u32); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + virtual bool getTevSwapModeTable(u32); + virtual void setIndTevStage(u32, J3DIndTevStage const*); + virtual void setIndTevStage(u32, J3DIndTevStage); + virtual bool getIndTevStage(u32); + virtual bool getTexNoOffset() const; + virtual bool getTevRegOffset() const; + virtual void setTevRegOffset(u32); + virtual ~J3DTevBlock4(); private: /* 0x08 */ u16 mTexNo[4]; @@ -340,59 +337,59 @@ class J3DTevBlock2 : public J3DTevBlock { J3DTevBlock2() { initialize(); } - /* 80317810 */ void initialize(); - - /* 803206AC */ virtual void reset(J3DTevBlock*); - /* 8031AFA4 */ virtual void load(); - /* 8031D3D0 */ virtual void diffTexNo(); - /* 8031D434 */ virtual void diffTevReg(); - /* 8031D694 */ virtual void diffTexCoordScale(); - /* 8031D4D0 */ virtual void diffTevStage(); - /* 8031D5E4 */ virtual void diffTevStageIndirect(); - /* 8031C6A8 */ virtual void patch(); - /* 8031C3F8 */ virtual void patchTexNo(); - /* 8031C48C */ virtual void patchTevReg(); - /* 8031C558 */ virtual void patchTexNoAndTexCoordScale(); - /* 803223AC */ virtual void ptrToIndex(); - /* 803223B0 */ virtual void indexToPtr(); - /* 803223D4 */ virtual u32 getType(); - /* 80317BC4 */ virtual s32 countDLSize(); - /* 803223F0 */ virtual void setTexNo(u32, u16 const*); - /* 803223E0 */ virtual void setTexNo(u32, u16); - /* 80322404 */ virtual u16 getTexNo(u32) const; - /* 80322428 */ virtual void setTevOrder(u32, J3DTevOrder const*); - /* 80322414 */ virtual void setTevOrder(u32, J3DTevOrder); - /* 8032243C */ virtual J3DTevOrder* getTevOrder(u32); - /* 8032247C */ virtual void setTevColor(u32, J3DGXColorS10 const*); - /* 80322450 */ virtual void setTevColor(u32, J3DGXColorS10); - /* 803224A8 */ virtual GXColorS10* getTevColor(u32); - /* 803224E8 */ virtual void setTevKColor(u32, J3DGXColor const*); - /* 803224BC */ virtual void setTevKColor(u32, J3DGXColor); - /* 80322514 */ virtual GXColor* getTevKColor(u32); - /* 80322534 */ virtual void setTevKColorSel(u32, u8 const*); - /* 80322528 */ virtual void setTevKColorSel(u32, u8); - /* 80322544 */ virtual bool getTevKColorSel(u32); - /* 8032255C */ virtual void setTevKAlphaSel(u32, u8 const*); - /* 80322550 */ virtual void setTevKAlphaSel(u32, u8); - /* 8032256C */ virtual bool getTevKAlphaSel(u32); - /* 80322580 */ virtual void setTevStageNum(u8 const*); - /* 80322578 */ virtual void setTevStageNum(u8); - /* 8032258C */ virtual u8 getTevStageNum() const; - /* 803225D0 */ virtual void setTevStage(u32, J3DTevStage const*); - /* 80322594 */ virtual void setTevStage(u32, J3DTevStage); - /* 8032260C */ virtual bool getTevStage(u32); - /* 80322658 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 80322620 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 803226A0 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 80322690 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 803226B0 */ virtual bool getTevSwapModeTable(u32); - /* 803226D4 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); - /* 803226C0 */ virtual void setIndTevStage(u32, J3DIndTevStage); - /* 803226E8 */ virtual bool getIndTevStage(u32); - /* 803226FC */ virtual bool getTexNoOffset() const; - /* 80322704 */ virtual bool getTevRegOffset() const; - /* 8032270C */ virtual void setTevRegOffset(u32); - /* 80322714 */ virtual ~J3DTevBlock2(); + void initialize(); + + virtual void reset(J3DTevBlock*); + virtual void load(); + virtual void diffTexNo(); + virtual void diffTevReg(); + virtual void diffTexCoordScale(); + virtual void diffTevStage(); + virtual void diffTevStageIndirect(); + virtual void patch(); + virtual void patchTexNo(); + virtual void patchTevReg(); + virtual void patchTexNoAndTexCoordScale(); + virtual void ptrToIndex(); + virtual void indexToPtr(); + virtual u32 getType(); + virtual s32 countDLSize(); + virtual void setTexNo(u32, u16 const*); + virtual void setTexNo(u32, u16); + virtual u16 getTexNo(u32) const; + virtual void setTevOrder(u32, J3DTevOrder const*); + virtual void setTevOrder(u32, J3DTevOrder); + virtual J3DTevOrder* getTevOrder(u32); + virtual void setTevColor(u32, J3DGXColorS10 const*); + virtual void setTevColor(u32, J3DGXColorS10); + virtual GXColorS10* getTevColor(u32); + virtual void setTevKColor(u32, J3DGXColor const*); + virtual void setTevKColor(u32, J3DGXColor); + virtual GXColor* getTevKColor(u32); + virtual void setTevKColorSel(u32, u8 const*); + virtual void setTevKColorSel(u32, u8); + virtual bool getTevKColorSel(u32); + virtual void setTevKAlphaSel(u32, u8 const*); + virtual void setTevKAlphaSel(u32, u8); + virtual bool getTevKAlphaSel(u32); + virtual void setTevStageNum(u8 const*); + virtual void setTevStageNum(u8); + virtual u8 getTevStageNum() const; + virtual void setTevStage(u32, J3DTevStage const*); + virtual void setTevStage(u32, J3DTevStage); + virtual bool getTevStage(u32); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + virtual bool getTevSwapModeTable(u32); + virtual void setIndTevStage(u32, J3DIndTevStage const*); + virtual void setIndTevStage(u32, J3DIndTevStage); + virtual bool getIndTevStage(u32); + virtual bool getTexNoOffset() const; + virtual bool getTevRegOffset() const; + virtual void setTevRegOffset(u32); + virtual ~J3DTevBlock2(); private: /* 0x08 */ u16 mTexNo[2]; @@ -413,59 +410,59 @@ class J3DTevBlock16 : public J3DTevBlock { J3DTevBlock16() { initialize(); } - /* 80317A00 */ void initialize(); - - /* 80320E24 */ virtual void reset(J3DTevBlock*); - /* 8031BA04 */ virtual void load(); - /* 8031DB14 */ virtual void diffTexNo(); - /* 8031DB78 */ virtual void diffTevReg(); - /* 8031DDD8 */ virtual void diffTexCoordScale(); - /* 8031DC14 */ virtual void diffTevStage(); - /* 8031DD28 */ virtual void diffTevStageIndirect(); - /* 8031CCF8 */ virtual void patch(); - /* 8031CA1C */ virtual void patchTexNo(); - /* 8031CAB0 */ virtual void patchTevReg(); - /* 8031CB7C */ virtual void patchTexNoAndTexCoordScale(); - /* 8031DED0 */ virtual void ptrToIndex(); - /* 80321C20 */ virtual void indexToPtr(); - /* 80321C44 */ virtual u32 getType(); - /* 80317BD4 */ virtual s32 countDLSize(); - /* 80321C60 */ virtual void setTexNo(u32, u16 const*); - /* 80321C50 */ virtual void setTexNo(u32, u16); - /* 80321C74 */ virtual u16 getTexNo(u32) const; - /* 80321C98 */ virtual void setTevOrder(u32, J3DTevOrder const*); - /* 80321C84 */ virtual void setTevOrder(u32, J3DTevOrder); - /* 80321CAC */ virtual J3DTevOrder* getTevOrder(u32); - /* 80321CEC */ virtual void setTevColor(u32, J3DGXColorS10 const*); - /* 80321CC0 */ virtual void setTevColor(u32, J3DGXColorS10); - /* 80321D18 */ virtual GXColorS10* getTevColor(u32); - /* 80321D58 */ virtual void setTevKColor(u32, J3DGXColor const*); - /* 80321D2C */ virtual void setTevKColor(u32, J3DGXColor); - /* 80321D84 */ virtual GXColor* getTevKColor(u32); - /* 80321DA4 */ virtual void setTevKColorSel(u32, u8 const*); - /* 80321D98 */ virtual void setTevKColorSel(u32, u8); - /* 80321DB4 */ virtual bool getTevKColorSel(u32); - /* 80321DCC */ virtual void setTevKAlphaSel(u32, u8 const*); - /* 80321DC0 */ virtual void setTevKAlphaSel(u32, u8); - /* 80321DDC */ virtual bool getTevKAlphaSel(u32); - /* 80321DE8 */ virtual void setTevStageNum(u8); - /* 80321DF0 */ virtual void setTevStageNum(u8 const*); - /* 80321DFC */ virtual u8 getTevStageNum() const; - /* 80321E40 */ virtual void setTevStage(u32, J3DTevStage const*); - /* 80321E04 */ virtual void setTevStage(u32, J3DTevStage); - /* 80321E7C */ virtual bool getTevStage(u32); - /* 80321EC8 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 80321E90 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 80321F10 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 80321F00 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 80321F20 */ virtual bool getTevSwapModeTable(u32); - /* 80321F44 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); - /* 80321F30 */ virtual void setIndTevStage(u32, J3DIndTevStage); - /* 80321F58 */ virtual bool getIndTevStage(u32); - /* 80321F6C */ virtual bool getTexNoOffset() const; - /* 80321F74 */ virtual bool getTevRegOffset() const; - /* 80321F7C */ virtual void setTevRegOffset(u32); - /* 80321F84 */ virtual ~J3DTevBlock16(); + void initialize(); + + virtual void reset(J3DTevBlock*); + virtual void load(); + virtual void diffTexNo(); + virtual void diffTevReg(); + virtual void diffTexCoordScale(); + virtual void diffTevStage(); + virtual void diffTevStageIndirect(); + virtual void patch(); + virtual void patchTexNo(); + virtual void patchTevReg(); + virtual void patchTexNoAndTexCoordScale(); + virtual void ptrToIndex(); + virtual void indexToPtr(); + virtual u32 getType(); + virtual s32 countDLSize(); + virtual void setTexNo(u32, u16 const*); + virtual void setTexNo(u32, u16); + virtual u16 getTexNo(u32) const; + virtual void setTevOrder(u32, J3DTevOrder const*); + virtual void setTevOrder(u32, J3DTevOrder); + virtual J3DTevOrder* getTevOrder(u32); + virtual void setTevColor(u32, J3DGXColorS10 const*); + virtual void setTevColor(u32, J3DGXColorS10); + virtual GXColorS10* getTevColor(u32); + virtual void setTevKColor(u32, J3DGXColor const*); + virtual void setTevKColor(u32, J3DGXColor); + virtual GXColor* getTevKColor(u32); + virtual void setTevKColorSel(u32, u8 const*); + virtual void setTevKColorSel(u32, u8); + virtual bool getTevKColorSel(u32); + virtual void setTevKAlphaSel(u32, u8 const*); + virtual void setTevKAlphaSel(u32, u8); + virtual bool getTevKAlphaSel(u32); + virtual void setTevStageNum(u8); + virtual void setTevStageNum(u8 const*); + virtual u8 getTevStageNum() const; + virtual void setTevStage(u32, J3DTevStage const*); + virtual void setTevStage(u32, J3DTevStage); + virtual bool getTevStage(u32); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + virtual bool getTevSwapModeTable(u32); + virtual void setIndTevStage(u32, J3DIndTevStage const*); + virtual void setIndTevStage(u32, J3DIndTevStage); + virtual bool getIndTevStage(u32); + virtual bool getTexNoOffset() const; + virtual bool getTevRegOffset() const; + virtual void setTevRegOffset(u32); + virtual ~J3DTevBlock16(); private: /* 0x008 */ u16 mTexNo[8]; @@ -486,40 +483,40 @@ class J3DTevBlock1 : public J3DTevBlock { J3DTevBlock1() { initialize(); } - /* 803177E8 */ void initialize(); - - /* 803205D4 */ virtual void reset(J3DTevBlock*); - /* 8031AD64 */ virtual void load(); - /* 8031D1BC */ virtual void diffTexNo(); - /* 8031D1F4 */ virtual void diffTevReg(); - /* 8031D368 */ virtual void diffTexCoordScale(); - /* 8031D1F8 */ virtual void diffTevStage(); - /* 8031D2E8 */ virtual void diffTevStageIndirect(); - /* 8031C3CC */ virtual void patch(); - /* 8031C274 */ virtual void patchTexNo(); - /* 8031C2E4 */ virtual void patchTevReg(); - /* 8031C2E8 */ virtual void patchTexNoAndTexCoordScale(); - /* 80322770 */ virtual void ptrToIndex(); - /* 80322774 */ virtual void indexToPtr(); - /* 80322798 */ virtual u32 getType(); - /* 80317BBC */ virtual s32 countDLSize(); - /* 803227B4 */ virtual void setTexNo(u32, u16 const*); - /* 803227A4 */ virtual void setTexNo(u32, u16); - /* 803227C8 */ virtual u16 getTexNo(u32) const; - /* 803227EC */ virtual void setTevOrder(u32, J3DTevOrder const*); - /* 803227D8 */ virtual void setTevOrder(u32, J3DTevOrder); - /* 80322800 */ virtual J3DTevOrder* getTevOrder(u32); - /* 80322818 */ virtual void setTevStageNum(u8 const*); - /* 80322814 */ virtual void setTevStageNum(u8); - /* 8032281C */ virtual u8 getTevStageNum() const; - /* 80322860 */ virtual void setTevStage(u32, J3DTevStage const*); - /* 80322824 */ virtual void setTevStage(u32, J3DTevStage); - /* 8032289C */ virtual bool getTevStage(u32); - /* 803228C4 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); - /* 803228B0 */ virtual void setIndTevStage(u32, J3DIndTevStage); - /* 803228D8 */ virtual bool getIndTevStage(u32); - /* 803228EC */ virtual bool getTexNoOffset() const; - /* 803228F4 */ virtual ~J3DTevBlock1(); + void initialize(); + + virtual void reset(J3DTevBlock*); + virtual void load(); + virtual void diffTexNo(); + virtual void diffTevReg(); + virtual void diffTexCoordScale(); + virtual void diffTevStage(); + virtual void diffTevStageIndirect(); + virtual void patch(); + virtual void patchTexNo(); + virtual void patchTevReg(); + virtual void patchTexNoAndTexCoordScale(); + virtual void ptrToIndex(); + virtual void indexToPtr(); + virtual u32 getType(); + virtual s32 countDLSize(); + virtual void setTexNo(u32, u16 const*); + virtual void setTexNo(u32, u16); + virtual u16 getTexNo(u32) const; + virtual void setTevOrder(u32, J3DTevOrder const*); + virtual void setTevOrder(u32, J3DTevOrder); + virtual J3DTevOrder* getTevOrder(u32); + virtual void setTevStageNum(u8 const*); + virtual void setTevStageNum(u8); + virtual u8 getTevStageNum() const; + virtual void setTevStage(u32, J3DTevStage const*); + virtual void setTevStage(u32, J3DTevStage); + virtual bool getTevStage(u32); + virtual void setIndTevStage(u32, J3DIndTevStage const*); + virtual void setIndTevStage(u32, J3DIndTevStage); + virtual bool getIndTevStage(u32); + virtual bool getTexNoOffset() const; + virtual ~J3DTevBlock1(); private: /* 0x08 */ u16 mTexNo[1]; @@ -621,59 +618,59 @@ struct J3DAlphaComp { class J3DPEBlock { public: - /* 80317348 */ virtual void reset(J3DPEBlock*); + virtual void reset(J3DPEBlock*); virtual void load() = 0; - /* 8000DBCC */ virtual void patch(); - /* 80317344 */ virtual void diff(u32); - /* 8031735C */ virtual void diffFog(); - /* 80317360 */ virtual void diffBlend(); + virtual void patch(); + virtual void diff(u32); + virtual void diffFog(); + virtual void diffBlend(); virtual s32 countDLSize(); virtual u32 getType() = 0; - /* 80317368 */ virtual void setFog(J3DFog); - /* 80317364 */ virtual void setFog(J3DFog*); - /* 8000DF5C */ virtual J3DFog* getFog(); - /* 8031736C */ virtual void setAlphaComp(J3DAlphaComp const*); - /* 8000E01C */ virtual void setAlphaComp(J3DAlphaComp const&); - /* 8000DF54 */ virtual J3DAlphaComp* getAlphaComp(); - /* 80317370 */ virtual void setBlend(J3DBlend const*); - /* 8000E018 */ virtual void setBlend(J3DBlend const&); - /* 8000DF4C */ virtual bool getBlend(); - /* 80317374 */ virtual void setZMode(J3DZMode const*); - /* 8000E014 */ virtual void setZMode(J3DZMode); - /* 8000DF44 */ virtual J3DZMode* getZMode(); - /* 80317378 */ virtual void setZCompLoc(u8 const*); - /* 8000E010 */ virtual void setZCompLoc(u8); - /* 8000DF3C */ virtual bool getZCompLoc() const; - /* 80317380 */ virtual void setDither(u8 const*); - /* 8031737C */ virtual void setDither(u8); - /* 80317384 */ virtual bool getDither() const; - /* 8031738C */ virtual bool getFogOffset() const; - /* 80317394 */ virtual void setFogOffset(u32); + virtual void setFog(J3DFog); + virtual void setFog(J3DFog*); + virtual J3DFog* getFog(); + virtual void setAlphaComp(J3DAlphaComp const*); + virtual void setAlphaComp(J3DAlphaComp const&); + virtual J3DAlphaComp* getAlphaComp(); + virtual void setBlend(J3DBlend const*); + virtual void setBlend(J3DBlend const&); + virtual bool getBlend(); + virtual void setZMode(J3DZMode const*); + virtual void setZMode(J3DZMode); + virtual J3DZMode* getZMode(); + virtual void setZCompLoc(u8 const*); + virtual void setZCompLoc(u8); + virtual bool getZCompLoc() const; + virtual void setDither(u8 const*); + virtual void setDither(u8); + virtual bool getDither() const; + virtual bool getFogOffset() const; + virtual void setFogOffset(u32); virtual ~J3DPEBlock(); }; class J3DPEBlockXlu : public J3DPEBlock { public: - /* 8031E98C */ virtual void load(); - /* 80317BF4 */ virtual s32 countDLSize(); - /* 80323258 */ virtual u32 getType(); - /* 80323264 */ virtual ~J3DPEBlockXlu(); + virtual void load(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual ~J3DPEBlockXlu(); }; class J3DPEBlockTexEdge : public J3DPEBlock { public: - /* 8031E6C8 */ virtual void load(); - /* 80317BEC */ virtual s32 countDLSize(); - /* 803232C0 */ virtual u32 getType(); - /* 803232CC */ virtual ~J3DPEBlockTexEdge(); + virtual void load(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual ~J3DPEBlockTexEdge(); }; class J3DPEBlockOpa : public J3DPEBlock { public: - /* 8031E408 */ virtual void load(); - /* 80317BE4 */ virtual s32 countDLSize(); - /* 80323328 */ virtual u32 getType(); - /* 80323334 */ virtual ~J3DPEBlockOpa(); + virtual void load(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual ~J3DPEBlockOpa(); }; class J3DPEBlockFull : public J3DPEBlock { @@ -681,37 +678,37 @@ class J3DPEBlockFull : public J3DPEBlock { J3DPEBlockFull() { initialize(); } - /* 80317B58 */ void initialize(); - - /* 8032129C */ virtual void reset(J3DPEBlock*); - /* 8031F3C0 */ virtual void load(); - /* 8031F890 */ virtual void patch(); - /* 8031FCA0 */ virtual void diff(u32); - /* 8031F940 */ virtual void diffFog(); - /* 8031F9B8 */ virtual void diffBlend(); - /* 80317C04 */ virtual s32 countDLSize(); - /* 8032194C */ virtual u32 getType(); - /* 8032197C */ virtual void setFog(J3DFog); - /* 80321958 */ virtual void setFog(J3DFog*); - /* 803219A0 */ virtual J3DFog* getFog(); - /* 803219C4 */ virtual void setAlphaComp(J3DAlphaComp const*); - /* 803219A8 */ virtual void setAlphaComp(J3DAlphaComp const&); - /* 803219E0 */ virtual J3DAlphaComp* getAlphaComp(); - /* 803219F4 */ virtual void setBlend(J3DBlend const*); - /* 803219E8 */ virtual void setBlend(J3DBlend const&); - /* 80321A00 */ virtual bool getBlend(); - /* 80321A14 */ virtual void setZMode(J3DZMode const*); - /* 80321A08 */ virtual void setZMode(J3DZMode); - /* 80321A20 */ virtual J3DZMode* getZMode(); - /* 80321A30 */ virtual void setZCompLoc(u8 const*); - /* 80321A28 */ virtual void setZCompLoc(u8); - /* 80321A3C */ virtual bool getZCompLoc() const; - /* 80321A4C */ virtual void setDither(u8 const*); - /* 80321A44 */ virtual void setDither(u8); - /* 80321A58 */ virtual bool getDither() const; - /* 80321A60 */ virtual bool getFogOffset() const; - /* 80321A68 */ virtual void setFogOffset(u32); - /* 80321A70 */ virtual ~J3DPEBlockFull(); + void initialize(); + + virtual void reset(J3DPEBlock*); + virtual void load(); + virtual void patch(); + virtual void diff(u32); + virtual void diffFog(); + virtual void diffBlend(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setFog(J3DFog); + virtual void setFog(J3DFog*); + virtual J3DFog* getFog(); + virtual void setAlphaComp(J3DAlphaComp const*); + virtual void setAlphaComp(J3DAlphaComp const&); + virtual J3DAlphaComp* getAlphaComp(); + virtual void setBlend(J3DBlend const*); + virtual void setBlend(J3DBlend const&); + virtual bool getBlend(); + virtual void setZMode(J3DZMode const*); + virtual void setZMode(J3DZMode); + virtual J3DZMode* getZMode(); + virtual void setZCompLoc(u8 const*); + virtual void setZCompLoc(u8); + virtual bool getZCompLoc() const; + virtual void setDither(u8 const*); + virtual void setDither(u8); + virtual bool getDither() const; + virtual bool getFogOffset() const; + virtual void setFogOffset(u32); + virtual ~J3DPEBlockFull(); private: /* 0x04 */ J3DFog mFog; @@ -728,30 +725,30 @@ class J3DPEBlockFogOff : public J3DPEBlock { J3DPEBlockFogOff() { initialize(); } - /* 80317B34 */ void initialize(); - - /* 803211B4 */ virtual void reset(J3DPEBlock*); - /* 8031EC50 */ virtual void load(); - /* 80321ACC */ virtual void diff(u32); - /* 8031F0D8 */ virtual void diffBlend(); - /* 80317BFC */ virtual s32 countDLSize(); - /* 80321B00 */ virtual u32 getType(); - /* 80321B28 */ virtual void setAlphaComp(J3DAlphaComp const*); - /* 80321B0C */ virtual void setAlphaComp(J3DAlphaComp const&); - /* 80321B44 */ virtual J3DAlphaComp* getAlphaComp(); - /* 80321B58 */ virtual void setBlend(J3DBlend const*); - /* 80321B4C */ virtual void setBlend(J3DBlend const&); - /* 80321B64 */ virtual bool getBlend(); - /* 80321B78 */ virtual void setZMode(J3DZMode const*); - /* 80321B6C */ virtual void setZMode(J3DZMode); - /* 80321B84 */ virtual J3DZMode* getZMode(); - /* 80321B94 */ virtual void setZCompLoc(u8 const*); - /* 80321B8C */ virtual void setZCompLoc(u8); - /* 80321BA0 */ virtual bool getZCompLoc() const; - /* 80321BB0 */ virtual void setDither(u8 const*); - /* 80321BA8 */ virtual void setDither(u8); - /* 80321BBC */ virtual bool getDither() const; - /* 80321BC4 */ virtual ~J3DPEBlockFogOff(); + void initialize(); + + virtual void reset(J3DPEBlock*); + virtual void load(); + virtual void diff(u32); + virtual void diffBlend(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setAlphaComp(J3DAlphaComp const*); + virtual void setAlphaComp(J3DAlphaComp const&); + virtual J3DAlphaComp* getAlphaComp(); + virtual void setBlend(J3DBlend const*); + virtual void setBlend(J3DBlend const&); + virtual bool getBlend(); + virtual void setZMode(J3DZMode const*); + virtual void setZMode(J3DZMode); + virtual J3DZMode* getZMode(); + virtual void setZCompLoc(u8 const*); + virtual void setZCompLoc(u8); + virtual bool getZCompLoc() const; + virtual void setDither(u8 const*); + virtual void setDither(u8); + virtual bool getDither() const; + virtual ~J3DPEBlockFogOff(); private: /* 0x04 */ J3DAlphaComp mAlphaComp; @@ -762,8 +759,8 @@ class J3DPEBlockFogOff : public J3DPEBlock { }; // Size: 0x10 struct J3DIndTexCoordScale { - /* 8000E024 */ ~J3DIndTexCoordScale(); - /* 8000E0E4 */ J3DIndTexCoordScale(); + ~J3DIndTexCoordScale(); + J3DIndTexCoordScale(); /* 0x0 */ u8 mScaleS; /* 0x1 */ u8 mScaleT; @@ -772,15 +769,15 @@ struct J3DIndTexCoordScale { }; struct J3DIndTexMtx { - /* 8000E064 */ ~J3DIndTexMtx(); - /* 8000E0F0 */ J3DIndTexMtx(); + ~J3DIndTexMtx(); + J3DIndTexMtx(); /* 0x00 */ Mtx23 mOffsetMtx; /* 0x18 */ u8 mScaleExp; }; // Size: 0x1C struct J3DIndTexOrder { - /* 8000E128 */ J3DIndTexOrder(); + J3DIndTexOrder(); /* 0x0 */ u8 mMap; /* 0x1 */ u8 mCoord; @@ -790,23 +787,23 @@ struct J3DIndTexOrder { class J3DIndBlock { public: - /* 8031734C */ virtual void reset(J3DIndBlock*); + virtual void reset(J3DIndBlock*); virtual void diff(u32) = 0; virtual void load() = 0; - /* 80317314 */ virtual s32 countDLSize(); + virtual s32 countDLSize(); virtual u32 getType() = 0; - /* 8000E0A0 */ virtual void setIndTexStageNum(u8); - /* 8000DF7C */ virtual u8 getIndTexStageNum() const; - /* 80317410 */ virtual void setIndTexOrder(u32, J3DIndTexOrder); - /* 8031740C */ virtual void setIndTexOrder(u32, J3DIndTexOrder const*); - /* 8000DF74 */ virtual bool getIndTexOrder(u32); - /* 80317414 */ virtual void setIndTexMtx(u32, J3DIndTexMtx const*); - /* 8000E060 */ virtual void setIndTexMtx(u32, J3DIndTexMtx); - /* 8000DF6C */ virtual bool getIndTexMtx(u32); - /* 8000E020 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale); - /* 80317418 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); - /* 8000DF64 */ virtual bool getIndTexCoordScale(u32); - /* 8031726C */ virtual ~J3DIndBlock(); + virtual void setIndTexStageNum(u8); + virtual u8 getIndTexStageNum() const; + virtual void setIndTexOrder(u32, J3DIndTexOrder); + virtual void setIndTexOrder(u32, J3DIndTexOrder const*); + virtual bool getIndTexOrder(u32); + virtual void setIndTexMtx(u32, J3DIndTexMtx const*); + virtual void setIndTexMtx(u32, J3DIndTexMtx); + virtual bool getIndTexMtx(u32); + virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale); + virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); + virtual bool getIndTexCoordScale(u32); + virtual ~J3DIndBlock(); }; class J3DIndBlockFull : public J3DIndBlock { @@ -814,25 +811,25 @@ class J3DIndBlockFull : public J3DIndBlock { J3DIndBlockFull() { initialize(); } - /* 80317B28 */ void initialize(); - - /* 803210B0 */ virtual void reset(J3DIndBlock*); - /* 8031E328 */ virtual void diff(u32); - /* 8031E12C */ virtual void load(); - /* 80317BDC */ virtual s32 countDLSize(); - /* 80323390 */ virtual u32 getType(); - /* 8032339C */ virtual void setIndTexStageNum(u8); - /* 803233A4 */ virtual u8 getIndTexStageNum() const; - /* 803233AC */ virtual void setIndTexOrder(u32, J3DIndTexOrder); - /* 803233C0 */ virtual void setIndTexOrder(u32, J3DIndTexOrder const*); - /* 803233D4 */ virtual bool getIndTexOrder(u32); - /* 8032341C */ virtual void setIndTexMtx(u32, J3DIndTexMtx const*); - /* 803233E8 */ virtual void setIndTexMtx(u32, J3DIndTexMtx); - /* 80323450 */ virtual bool getIndTexMtx(u32); - /* 80323478 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); - /* 80323464 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale); - /* 8032348C */ virtual bool getIndTexCoordScale(u32); - /* 803234A0 */ virtual ~J3DIndBlockFull(); + void initialize(); + + virtual void reset(J3DIndBlock*); + virtual void diff(u32); + virtual void load(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setIndTexStageNum(u8); + virtual u8 getIndTexStageNum() const; + virtual void setIndTexOrder(u32, J3DIndTexOrder); + virtual void setIndTexOrder(u32, J3DIndTexOrder const*); + virtual bool getIndTexOrder(u32); + virtual void setIndTexMtx(u32, J3DIndTexMtx const*); + virtual void setIndTexMtx(u32, J3DIndTexMtx); + virtual bool getIndTexMtx(u32); + virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); + virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale); + virtual bool getIndTexCoordScale(u32); + virtual ~J3DIndBlockFull(); private: /* 0x04 */ u8 mIndTexStageNum; @@ -843,11 +840,11 @@ class J3DIndBlockFull : public J3DIndBlock { class J3DIndBlockNull : public J3DIndBlock { public: - /* 803173A0 */ virtual void reset(J3DIndBlock*); - /* 80317398 */ virtual void diff(u32); - /* 8031739C */ virtual void load(); - /* 803173A4 */ virtual u32 getType(); - /* 803173B0 */ virtual ~J3DIndBlockNull(); + virtual void reset(J3DIndBlock*); + virtual void diff(u32); + virtual void load(); + virtual u32 getType(); + virtual ~J3DIndBlockNull(); }; struct J3DColorChanInfo { @@ -860,7 +857,7 @@ struct J3DColorChanInfo { }; struct J3DColorChan { - /* 8000E47C */ J3DColorChan(); + J3DColorChan(); u8 getLightMask() { return (((mColorChanID & 0x7800) >> 7) | (mColorChanID & 0x3c) >> 2); } void setLightMask(u8 param_1) { mColorChanID = (mColorChanID & ~0x3c) | ((param_1 & 0xf) << 2); @@ -872,40 +869,40 @@ struct J3DColorChan { class J3DColorBlock { public: - /* 80317324 */ virtual void load(); - /* 80317358 */ virtual void reset(J3DColorBlock*); - /* 8031733C */ virtual void patch(); - /* 80317434 */ virtual void patchMatColor(); - /* 8000DBD0 */ virtual void patchLight(); - /* 80317340 */ virtual void diff(u32); - /* 80317438 */ virtual void diffAmbColor(); - /* 8031743C */ virtual void diffMatColor(); - /* 80317440 */ virtual void diffColorChan(); - /* 80317444 */ virtual void diffLightObj(u32); - /* 80317304 */ virtual s32 countDLSize(); + virtual void load(); + virtual void reset(J3DColorBlock*); + virtual void patch(); + virtual void patchMatColor(); + virtual void patchLight(); + virtual void diff(u32); + virtual void diffAmbColor(); + virtual void diffMatColor(); + virtual void diffColorChan(); + virtual void diffLightObj(u32); + virtual s32 countDLSize(); virtual u32 getType() = 0; - /* 80317448 */ virtual void setMatColor(u32, J3DGXColor const*); - /* 8000E0DC */ virtual void setMatColor(u32, J3DGXColor); - /* 8000E000 */ virtual _GXColor* getMatColor(u32); - /* 801A4C0C */ virtual void setAmbColor(u32, J3DGXColor const*); - /* 8000E0D4 */ virtual void setAmbColor(u32, J3DGXColor); - /* 8000DFF0 */ virtual bool getAmbColor(u32); - /* 8000E0E0 */ virtual void setColorChanNum(u8); - /* 8031744C */ virtual void setColorChanNum(u8 const*); - /* 8000E008 */ virtual u8 getColorChanNum() const; - /* 8000E0D8 */ virtual void setColorChan(u32, J3DColorChan const&); - /* 80317450 */ virtual void setColorChan(u32, J3DColorChan const*); - /* 8000DFF8 */ virtual J3DColorChan* getColorChan(u32); - /* 801A4C08 */ virtual void setLight(u32, J3DLightObj*); - /* 80317454 */ virtual bool getLight(u32); - /* 80317460 */ virtual void setCullMode(u8 const*); - /* 8031745C */ virtual void setCullMode(u8); - /* 80317328 */ virtual s32 getCullMode() const; - /* 80317464 */ virtual bool getMatColorOffset() const; - /* 8031746C */ virtual bool getColorChanOffset() const; - /* 80317474 */ virtual void setMatColorOffset(u32); - /* 80317478 */ virtual void setColorChanOffset(u32); - /* 80317138 */ virtual ~J3DColorBlock(); + virtual void setMatColor(u32, J3DGXColor const*); + virtual void setMatColor(u32, J3DGXColor); + virtual _GXColor* getMatColor(u32); + virtual void setAmbColor(u32, J3DGXColor const*); + virtual void setAmbColor(u32, J3DGXColor); + virtual bool getAmbColor(u32); + virtual void setColorChanNum(u8); + virtual void setColorChanNum(u8 const*); + virtual u8 getColorChanNum() const; + virtual void setColorChan(u32, J3DColorChan const&); + virtual void setColorChan(u32, J3DColorChan const*); + virtual J3DColorChan* getColorChan(u32); + virtual void setLight(u32, J3DLightObj*); + virtual bool getLight(u32); + virtual void setCullMode(u8 const*); + virtual void setCullMode(u8); + virtual s32 getCullMode() const; + virtual bool getMatColorOffset() const; + virtual bool getColorChanOffset() const; + virtual void setMatColorOffset(u32); + virtual void setColorChanOffset(u32); + virtual ~J3DColorBlock(); }; class J3DColorBlockLightOn : public J3DColorBlock { @@ -913,42 +910,42 @@ class J3DColorBlockLightOn : public J3DColorBlock { J3DColorBlockLightOn() { initialize(); } - /* 80317580 */ void initialize(); - - /* 803187F4 */ virtual void load(); - /* 8031FF34 */ virtual void reset(J3DColorBlock*); - /* 803194E8 */ virtual void patch(); - /* 80319534 */ virtual void patchMatColor(); - /* 803196E0 */ virtual void patchLight(); - /* 8031A13C */ virtual void diff(u32); - /* 8031A1DC */ virtual void diffAmbColor(); - /* 8031A358 */ virtual void diffMatColor(); - /* 8031A4D4 */ virtual void diffColorChan(); - /* 8031A8E0 */ virtual void diffLightObj(u32); - /* 80317B94 */ virtual s32 countDLSize(); - /* 80322E80 */ virtual u32 getType(); - /* 80322EB8 */ virtual void setMatColor(u32, J3DGXColor const*); - /* 80322E8C */ virtual void setMatColor(u32, J3DGXColor); - /* 80322EE4 */ virtual GXColor* getMatColor(u32); - /* 80322F24 */ virtual void setAmbColor(u32, J3DGXColor const*); - /* 80322EF8 */ virtual void setAmbColor(u32, J3DGXColor); - /* 80322F50 */ virtual bool getAmbColor(u32); - /* 80322F70 */ virtual void setColorChanNum(u8); - /* 80322F64 */ virtual void setColorChanNum(u8 const*); - /* 80322F78 */ virtual u8 getColorChanNum() const; - /* 80322F94 */ virtual void setColorChan(u32, J3DColorChan const&); - /* 80322F80 */ virtual void setColorChan(u32, J3DColorChan const*); - /* 80322FA8 */ virtual J3DColorChan* getColorChan(u32); - /* 80322FBC */ virtual void setLight(u32, J3DLightObj*); - /* 80322FCC */ virtual bool getLight(u32); - /* 80322FE4 */ virtual void setCullMode(u8 const*); - /* 80322FDC */ virtual void setCullMode(u8); - /* 80322FF0 */ virtual s32 getCullMode() const; - /* 80322FF8 */ virtual bool getMatColorOffset() const; - /* 80323000 */ virtual bool getColorChanOffset() const; - /* 80323008 */ virtual void setMatColorOffset(u32); - /* 80323010 */ virtual void setColorChanOffset(u32); - /* 80323018 */ virtual ~J3DColorBlockLightOn(); + void initialize(); + + virtual void load(); + virtual void reset(J3DColorBlock*); + virtual void patch(); + virtual void patchMatColor(); + virtual void patchLight(); + virtual void diff(u32); + virtual void diffAmbColor(); + virtual void diffMatColor(); + virtual void diffColorChan(); + virtual void diffLightObj(u32); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setMatColor(u32, J3DGXColor const*); + virtual void setMatColor(u32, J3DGXColor); + virtual GXColor* getMatColor(u32); + virtual void setAmbColor(u32, J3DGXColor const*); + virtual void setAmbColor(u32, J3DGXColor); + virtual bool getAmbColor(u32); + virtual void setColorChanNum(u8); + virtual void setColorChanNum(u8 const*); + virtual u8 getColorChanNum() const; + virtual void setColorChan(u32, J3DColorChan const&); + virtual void setColorChan(u32, J3DColorChan const*); + virtual J3DColorChan* getColorChan(u32); + virtual void setLight(u32, J3DLightObj*); + virtual bool getLight(u32); + virtual void setCullMode(u8 const*); + virtual void setCullMode(u8); + virtual s32 getCullMode() const; + virtual bool getMatColorOffset() const; + virtual bool getColorChanOffset() const; + virtual void setMatColorOffset(u32); + virtual void setColorChanOffset(u32); + virtual ~J3DColorBlockLightOn(); private: /* 0x04 */ J3DGXColor mMatColor[2]; @@ -966,35 +963,35 @@ class J3DColorBlockLightOff : public J3DColorBlock { J3DColorBlockLightOff() { initialize(); } - /* 8031747C */ void initialize(); - - /* 80317C0C */ virtual void load(); - /* 8031FD08 */ virtual void reset(J3DColorBlock*); - /* 80318EB4 */ virtual void patch(); - /* 80318F00 */ virtual void patchMatColor(); - /* 803190AC */ virtual void patchLight(); - /* 80319B4C */ virtual void diff(u32); - /* 80319BB4 */ virtual void diffMatColor(); - /* 80319D30 */ virtual void diffColorChan(); - /* 80317B84 */ virtual s32 countDLSize(); - /* 80323560 */ virtual u32 getType(); - /* 80323184 */ virtual void setMatColor(u32, J3DGXColor const*); - /* 80323158 */ virtual void setMatColor(u32, J3DGXColor); - /* 803231B0 */ virtual GXColor* getMatColor(u32); - /* 803231D0 */ virtual void setColorChanNum(u8); - /* 803231C4 */ virtual void setColorChanNum(u8 const*); - /* 803231D8 */ virtual u8 getColorChanNum() const; - /* 803231F4 */ virtual void setColorChan(u32, J3DColorChan const&); - /* 803231E0 */ virtual void setColorChan(u32, J3DColorChan const*); - /* 80323208 */ virtual J3DColorChan* getColorChan(u32); - /* 80323224 */ virtual void setCullMode(u8 const*); - /* 8032321C */ virtual void setCullMode(u8); - /* 80323230 */ virtual s32 getCullMode() const; - /* 80323238 */ virtual bool getMatColorOffset() const; - /* 80323240 */ virtual bool getColorChanOffset() const; - /* 80323248 */ virtual void setMatColorOffset(u32); - /* 80323250 */ virtual void setColorChanOffset(u32); - /* 803170DC */ virtual ~J3DColorBlockLightOff(); + void initialize(); + + virtual void load(); + virtual void reset(J3DColorBlock*); + virtual void patch(); + virtual void patchMatColor(); + virtual void patchLight(); + virtual void diff(u32); + virtual void diffMatColor(); + virtual void diffColorChan(); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setMatColor(u32, J3DGXColor const*); + virtual void setMatColor(u32, J3DGXColor); + virtual GXColor* getMatColor(u32); + virtual void setColorChanNum(u8); + virtual void setColorChanNum(u8 const*); + virtual u8 getColorChanNum() const; + virtual void setColorChan(u32, J3DColorChan const&); + virtual void setColorChan(u32, J3DColorChan const*); + virtual J3DColorChan* getColorChan(u32); + virtual void setCullMode(u8 const*); + virtual void setCullMode(u8); + virtual s32 getCullMode() const; + virtual bool getMatColorOffset() const; + virtual bool getColorChanOffset() const; + virtual void setMatColorOffset(u32); + virtual void setColorChanOffset(u32); + virtual ~J3DColorBlockLightOff(); private: /* 0x04 */ J3DGXColor mMatColor[2]; @@ -1010,16 +1007,16 @@ class J3DColorBlockAmbientOn : public J3DColorBlockLightOff { J3DColorBlockAmbientOn() { initialize(); } - /* 803174DC */ void initialize(); - - /* 8031816C */ virtual void load(); - /* 8031FDE4 */ virtual void reset(J3DColorBlock*); - /* 80317B8C */ virtual s32 countDLSize(); - /* 80323074 */ virtual u32 getType(); - /* 803230AC */ virtual void setAmbColor(u32, J3DGXColor const*); - /* 80323080 */ virtual void setAmbColor(u32, J3DGXColor); - /* 803230D8 */ virtual bool getAmbColor(u32); - /* 803230EC */ virtual ~J3DColorBlockAmbientOn(); + void initialize(); + + virtual void load(); + virtual void reset(J3DColorBlock*); + virtual s32 countDLSize(); + virtual u32 getType(); + virtual void setAmbColor(u32, J3DGXColor const*); + virtual void setAmbColor(u32, J3DGXColor); + virtual bool getAmbColor(u32); + virtual ~J3DColorBlockAmbientOn(); private: /* 0x20 */ J3DGXColor mAmbColor[2]; diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index 1c5853f76..6f6ed6721 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -12,35 +12,34 @@ class J3DMaterialAnm; class J3DMaterial { public: - /* 803157A0 */ static J3DColorBlock* createColorBlock(u32); - /* 803159A0 */ static J3DTexGenBlock* createTexGenBlock(u32); - /* 80315B04 */ static J3DTevBlock* createTevBlock(int); - /* 80315E78 */ static J3DIndBlock* createIndBlock(int); - /* 80315F60 */ static J3DPEBlock* createPEBlock(u32, u32); - /* 80316100 */ static u32 calcSizeColorBlock(u32); - /* 80316150 */ static u32 calcSizeTexGenBlock(u32); - /* 8031617C */ static u32 calcSizeTevBlock(int); - /* 803161C4 */ static u32 calcSizeIndBlock(int); - /* 803161D8 */ static u32 calcSizePEBlock(u32, u32); - /* 80316240 */ void initialize(); - /* 80316290 */ u32 countDLSize(); - /* 80316344 */ void makeDisplayList_private(J3DDisplayListObj*); - /* 80316AB0 */ void setCurrentMtx(); - /* 80316AC8 */ void calcCurrentMtx(); - /* 80316D68 */ void copy(J3DMaterial*); - /* 80316E90 */ s32 newSharedDisplayList(u32); - /* 80316F24 */ s32 newSingleSharedDisplayList(u32); + static J3DColorBlock* createColorBlock(u32); + static J3DTexGenBlock* createTexGenBlock(u32); + static J3DTevBlock* createTevBlock(int); + static J3DIndBlock* createIndBlock(int); + static J3DPEBlock* createPEBlock(u32, u32); + static u32 calcSizeColorBlock(u32); + static u32 calcSizeTexGenBlock(u32); + static u32 calcSizeTevBlock(int); + static u32 calcSizeIndBlock(int); + static u32 calcSizePEBlock(u32, u32); + void initialize(); + u32 countDLSize(); + void makeDisplayList_private(J3DDisplayListObj*); + void setCurrentMtx(); + void calcCurrentMtx(); + void copy(J3DMaterial*); + s32 newSharedDisplayList(u32); + s32 newSingleSharedDisplayList(u32); - /* 803169DC */ virtual void calc(f32 const (*)[4]); - /* 80316A54 */ virtual void calcDiffTexMtx(f32 const (*)[4]); - /* 80316620 */ virtual void makeDisplayList(); - /* 80316668 */ virtual void makeSharedDisplayList(); - /* 8031668C */ virtual void load(); - /* 803166DC */ virtual void loadSharedDL(); - /* 80316740 */ virtual void patch(); - /* 803167D8 */ virtual void diff(u32); - /* 80316E14 */ virtual void reset(); - /* 80316E70 */ virtual void change(); + virtual void calc(f32 const (*)[4]); + virtual void makeDisplayList(); + virtual void makeSharedDisplayList(); + virtual void load(); + virtual void loadSharedDL(); + virtual void patch(); + virtual void diff(u32); + virtual void reset(); + virtual void change(); J3DMaterial* getNext() const { return mNext; } J3DShape* getShape() const { return mShape; } diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 07b970329..278fb9186 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -30,7 +30,7 @@ inline int calcDifferedBufferSize_TexMtxSize(int param_1) { } inline int calcDifferedBufferSize_TexGenSize(int param_1) { - return param_1 * 0x3d + 10; + return param_1 * 0x39 + 5; } inline u32 getDiffFlag_TexNoNum(u32 param_1) { @@ -146,16 +146,24 @@ class J3DDrawPacket : public J3DPacket { void offFlag(u32 flag) { mFlags &= ~flag; } void lock() { onFlag(LOCKED); } void unlock() { offFlag(LOCKED); } - J3DTexMtxObj* getTexMtxObj() const { return mpTexMtxObj; } bool isLocked() const { return checkFlag(1); } public: /* 0x10 */ u32 mFlags; /* 0x14 */ char mPad0[0x0C]; // unk /* 0x20 */ J3DDisplayListObj* mpDisplayListObj; - /* 0x24 */ J3DTexMtxObj* mpTexMtxObj; }; // Size: 0x28 +class J3DCallBackPacket : public J3DPacket { +public: + ~J3DCallBackPacket(); + virtual void draw(); + +public: + typedef void (*CallBack)(J3DCallBackPacket * pPacket, u32 timing); + CallBack mpCallBack; +}; + class J3DShapePacket : public J3DDrawPacket { public: J3DShapePacket(); @@ -169,20 +177,22 @@ class J3DShapePacket : public J3DDrawPacket { void setShape(J3DShape* pShape) { mpShape = pShape; } void setModel(J3DModel* pModel) { mpModel = pModel; } - void setMtxBuffer(J3DMtxBuffer* pMtxBuffer) { mpMtxBuffer = pMtxBuffer; } - void setBaseMtxPtr(Mtx* pMtx) { mpBaseMtxPtr = pMtx; } + void setDrawMtx(Mtx** pDrawMtx) { mpDrawMtx = pDrawMtx; } + void setNrmMtx(Mtx33** pNrmMtx) { mpNrmMtx = pNrmMtx; } J3DShape* getShape() const { return mpShape; } J3DModel* getModel() const { return mpModel; } - Mtx* getBaseMtxPtr() const { return mpBaseMtxPtr; } public: - /* 0x28 */ J3DShape* mpShape; - /* 0x2C */ J3DMtxBuffer* mpMtxBuffer; + /* 0x24 */ J3DShape* mpShape; + /* 0x28 */ Mtx** mpDrawMtx; + /* 0x2C */ Mtx33** mpNrmMtx; /* 0x30 */ Mtx* mpBaseMtxPtr; - /* 0x34 */ u32 mDiffFlag; - /* 0x38 */ J3DModel* mpModel; -}; // Size: 0x3C + /* 0x34 */ u32* mpCurrentViewNo; + /* 0x38 */ u32 mDiffFlag; + /* 0x3C */ u8* mpScaleFlagArray; + /* 0x40 */ J3DModel* mpModel; +}; // Size: 0x44 class J3DMatPacket : public J3DDrawPacket { public: diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 8631eb97f..ebeae303a 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -180,9 +180,11 @@ class dComIfG_play_c { /* 0x47EC */ JKRArchive* mpCamResArchive; /* 0x47F0 */ JKRArchive* mpSwimResArchive; /* 0x47F4 */ JKRArchive* mpWindResArchive; +#if VERSION != VERSION_JP /* 0x47F8 */ JKRArchive* mpEnglishTextArchive; /* 0x47FC */ JKRArchive* mpHyruleTextArchive; - /* 0x4800 */ u8 field_0x4800[0x4824 - 0x4800]; +#endif + /* 0x4800 */ u8 mpCARDHeap[0x24]; /* 0x4824 */ dPa_control_c* mParticle; /* 0x4828 */ dDemo_manager_c* mDemo; /* 0x482C */ dMagma_packet_c* mpMagmaPacket; diff --git a/src/JSystem/J3DGraphBase/J3DPacket.cpp b/src/JSystem/J3DGraphBase/J3DPacket.cpp index 5ba43ec21..ee5e48a5e 100644 --- a/src/JSystem/J3DGraphBase/J3DPacket.cpp +++ b/src/JSystem/J3DGraphBase/J3DPacket.cpp @@ -4,176 +4,402 @@ // #include "JSystem/J3DGraphBase/J3DPacket.h" -#include "dolphin/types.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" +#include "JSystem/J3DGraphBase/J3DSys.h" +#include "JSystem/J3DGraphAnimator/J3DModel.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "MSL_C/string.h" +#include "dolphin/gx/GX.h" +#include "dolphin/os/OS.h" /* 802DAE1C-802DAE9C .text newDisplayList__17J3DDisplayListObjFUl */ -void J3DDisplayListObj::newDisplayList(unsigned long) { - /* Nonmatching */ +J3DError J3DDisplayListObj::newDisplayList(u32 capacity) { + mCapacity = ALIGN_NEXT(capacity, 0x20); + mpData[0] = new (0x20) char[mCapacity]; + mpData[1] = new (0x20) char[mCapacity]; + mSize = 0; + + if (mpData[0] == NULL || mpData[1] == NULL) + return kJ3DError_Alloc; + + return kJ3DError_Success; } /* 802DAE9C-802DAF00 .text newSingleDisplayList__17J3DDisplayListObjFUl */ -void J3DDisplayListObj::newSingleDisplayList(unsigned long) { - /* Nonmatching */ +J3DError J3DDisplayListObj::newSingleDisplayList(u32 capacity) { + mCapacity = ALIGN_NEXT(capacity, 0x20); + mpData[0] = new (0x20) char[mCapacity]; + mpData[1] = mpData[0]; + mSize = 0; + + if (mpData[0] == NULL) + return kJ3DError_Alloc; + + return kJ3DError_Success; } /* 802DAF00-802DAF78 .text single_To_Double__17J3DDisplayListObjFv */ -void J3DDisplayListObj::single_To_Double() { - /* Nonmatching */ +J3DError J3DDisplayListObj::single_To_Double() { + if (mpData[0] == mpData[1]) { + mpData[1] = new (0x20) char[mCapacity]; + + if (mpData[1] == NULL) + return kJ3DError_Alloc; + + memcpy(mpData[1], mpData[0], mCapacity); + DCStoreRange(mpData[1], mCapacity); + } + + return kJ3DError_Success; } /* 802DAF78-802DAF98 .text setSingleDisplayList__17J3DDisplayListObjFPvUl */ -void J3DDisplayListObj::setSingleDisplayList(void*, unsigned long) { - /* Nonmatching */ +void J3DDisplayListObj::setSingleDisplayList(void* pDLData, u32 size) { + mCapacity = ALIGN_NEXT(size, 0x20); + mpData[0] = pDLData; + mpData[1] = mpData[0]; + mSize = size; } /* 802DAF98-802DAFAC .text swapBuffer__17J3DDisplayListObjFv */ void J3DDisplayListObj::swapBuffer() { - /* Nonmatching */ + void* pTmp = mpData[0]; + mpData[0] = mpData[1]; + mpData[1] = pTmp; } /* 802DAFAC-802DAFD8 .text callDL__17J3DDisplayListObjCFv */ void J3DDisplayListObj::callDL() const { - /* Nonmatching */ + GXCallDisplayList(mpData[0], mSize); } +GDLObj J3DDisplayListObj::sGDLObj; +s32 J3DDisplayListObj::sInterruptFlag; + /* 802DAFD8-802DB02C .text beginDL__17J3DDisplayListObjFv */ void J3DDisplayListObj::beginDL() { - /* Nonmatching */ + swapBuffer(); + sInterruptFlag = OSDisableInterrupts(); + GDInitGDLObj(&sGDLObj, (u8*)mpData[0], mCapacity); + GDSetCurrent(&sGDLObj); } /* 802DB02C-802DB088 .text endDL__17J3DDisplayListObjFv */ -void J3DDisplayListObj::endDL() { - /* Nonmatching */ +u32 J3DDisplayListObj::endDL() { + GDPadCurr32(); + OSRestoreInterrupts(sInterruptFlag); + mSize = GDGetGDLObjOffset(&sGDLObj); + GDFlushCurrToMem(); + GDSetCurrent(NULL); + return mSize; } /* 802DB088-802DB0A8 .text beginPatch__17J3DDisplayListObjFv */ void J3DDisplayListObj::beginPatch() { - /* Nonmatching */ + beginDL(); } /* 802DB0A8-802DB0E4 .text endPatch__17J3DDisplayListObjFv */ -void J3DDisplayListObj::endPatch() { - /* Nonmatching */ +u32 J3DDisplayListObj::endPatch() { + OSRestoreInterrupts(sInterruptFlag); + GDSetCurrent(NULL); + return mSize; } /* 802DB0E4-802DB0EC .text isSame__9J3DPacketCFP12J3DMatPacket */ -void J3DPacket::isSame(J3DMatPacket*) const { - /* Nonmatching */ +bool J3DPacket::isSame(J3DMatPacket*) const { + return false; } /* 802DB0EC-802DB0F4 .text entry__9J3DPacketFP13J3DDrawBuffer */ -void J3DPacket::entry(J3DDrawBuffer*) { - /* Nonmatching */ +int J3DPacket::entry(J3DDrawBuffer*) { + return 1; } /* 802DB0F4-802DB114 .text addChildPacket__9J3DPacketFP9J3DPacket */ -void J3DPacket::addChildPacket(J3DPacket*) { - /* Nonmatching */ +void J3DPacket::addChildPacket(J3DPacket* pPacket) { + if (mpFirstChild == NULL) { + mpFirstChild = pPacket; + } else { + pPacket->mpNextPacket = mpFirstChild; + mpFirstChild = pPacket; + } } /* 802DB114-802DB1A0 .text draw__17J3DCallBackPacketFv */ void J3DCallBackPacket::draw() { - /* Nonmatching */ + if (mpCallBack != NULL) + mpCallBack(this, 0); + + for (J3DPacket * pPacket = mpFirstChild; pPacket != NULL; pPacket = pPacket->getNextPacket()) + pPacket->draw(); + + if (mpCallBack != NULL) + mpCallBack(this, 1); } /* 802DB1A0-802DB1D4 .text __ct__13J3DDrawPacketFv */ J3DDrawPacket::J3DDrawPacket() { - /* Nonmatching */ + mFlags = 0; + mpDisplayListObj = NULL; } /* 802DB1D4-802DB230 .text __dt__13J3DDrawPacketFv */ J3DDrawPacket::~J3DDrawPacket() { - /* Nonmatching */ } /* 802DB230-802DB2BC .text newDisplayList__13J3DDrawPacketFUl */ -void J3DDrawPacket::newDisplayList(unsigned long) { - /* Nonmatching */ +J3DError J3DDrawPacket::newDisplayList(u32 size) { + mpDisplayListObj = new J3DDisplayListObj(); + + if (mpDisplayListObj == NULL) + return kJ3DError_Alloc; + + J3DError ret = mpDisplayListObj->newDisplayList(size); + if (ret != kJ3DError_Success) + return ret; + + return kJ3DError_Success; } /* 802DB2BC-802DB348 .text newSingleDisplayList__13J3DDrawPacketFUl */ -void J3DDrawPacket::newSingleDisplayList(unsigned long) { - /* Nonmatching */ +J3DError J3DDrawPacket::newSingleDisplayList(u32 size) { + mpDisplayListObj = new J3DDisplayListObj(); + + if (mpDisplayListObj == NULL) + return kJ3DError_Alloc; + + J3DError ret = mpDisplayListObj->newSingleDisplayList(size); + if (ret != kJ3DError_Success) + return ret; + + return kJ3DError_Success; } /* 802DB348-802DB36C .text draw__13J3DDrawPacketFv */ void J3DDrawPacket::draw() { - /* Nonmatching */ + mpDisplayListObj->callDL(); } /* 802DB36C-802DB3C4 .text __ct__12J3DMatPacketFv */ J3DMatPacket::J3DMatPacket() { - /* Nonmatching */ + mpInitShapePacket = NULL; + mpMaterial = NULL; + mDiffFlag = -1; + mpTexture = NULL; + mpMaterialAnm = NULL; } /* 802DB3C4-802DB424 .text __dt__12J3DMatPacketFv */ J3DMatPacket::~J3DMatPacket() { - /* Nonmatching */ } /* 802DB424-802DB444 .text addShapePacket__12J3DMatPacketFP14J3DShapePacket */ -void J3DMatPacket::addShapePacket(J3DShapePacket*) { - /* Nonmatching */ +void J3DMatPacket::addShapePacket(J3DShapePacket* pShape) { + if (mpShapePacket == NULL) { + mpShapePacket = pShape; + } else { + pShape->mpNextPacket = mpShapePacket; + mpShapePacket = pShape; + } } /* 802DB444-802DB46C .text beginDiff__12J3DMatPacketFv */ void J3DMatPacket::beginDiff() { - /* Nonmatching */ + mpInitShapePacket->mpDisplayListObj->beginDL(); } /* 802DB46C-802DB494 .text endDiff__12J3DMatPacketFv */ void J3DMatPacket::endDiff() { - /* Nonmatching */ + mpInitShapePacket->mpDisplayListObj->endDL(); } /* 802DB494-802DB524 .text draw__12J3DMatPacketFv */ void J3DMatPacket::draw() { - /* Nonmatching */ + j3dSys.setTexture(mpTexture); + j3dSys.setMatPacket(this); + + mpMaterial->load(); + J3DShapePacket* packet = getShapePacket(); + + J3DShape* shape = packet->getShape(); + shape->loadPreDrawSetting(); + + while (packet != NULL) { + if (packet->getDisplayListObj() != NULL) { + packet->getDisplayListObj()->callDL(); + } + + packet->drawFast(); + packet = (J3DShapePacket*)packet->getNextPacket(); + } + + shape->resetVcdVatCache(); } /* 802DB524-802DB584 .text __ct__14J3DShapePacketFv */ J3DShapePacket::J3DShapePacket() { - /* Nonmatching */ + mpShape = NULL; + mpDrawMtx = NULL; + mpNrmMtx = NULL; + mpBaseMtxPtr = NULL; + mpCurrentViewNo = &j3dDefaultViewNo; + mpScaleFlagArray = NULL; + mpModel = NULL; } /* 802DB584-802DB5E4 .text __dt__14J3DShapePacketFv */ J3DShapePacket::~J3DShapePacket() { - /* Nonmatching */ } +u32 sDifferedRegister[] = { + 0x00000001, 0x00000002, 0x01000000, 0x10000000, 0x20000000, 0x02000000, 0x08000000, +}; + +s32 sSizeOfDiffered[] = { + 13, 21, 120, 55, 15, 19, 45, +}; + /* 802DB5E4-802DB7CC .text calcDifferedBufferSize__14J3DShapePacketFUl */ -void J3DShapePacket::calcDifferedBufferSize(unsigned long) { - /* Nonmatching */ +u32 J3DShapePacket::calcDifferedBufferSize(u32 flag) { + int iVar5 = 0; + for (int i = 0; i < 7; i++) { + if ((flag & sDifferedRegister[i]) != 0) { + iVar5 += sSizeOfDiffered[i]; + } + } + + iVar5 += getDiffFlag_LightObjNum(flag) * 0x48; + u32 uVar2 = getDiffFlag_TexGenNum(flag); + if (uVar2 != 0) { + u32 local_4c = mpShape->getMaterial()->getTexGenNum(); + if (uVar2 > local_4c) { + local_4c = uVar2; + } + + if ((flag & 0x1000)) { + iVar5 += calcDifferedBufferSize_TexGenSize(local_4c); + } else { + iVar5 += calcDifferedBufferSize_TexMtxSize(local_4c); + } + } + + uVar2 = getDiffFlag_TexNoNum(flag); + if (uVar2 != 0) { + u8 local_58; + if (mpShape->getMaterial()->getTevStageNum() > 8) { + local_58 = 8; + } else { + local_58 = mpShape->getMaterial()->getTevStageNum(); + } + u32 local_50 = local_58; + local_50 = uVar2 > local_50 ? uVar2 : local_50; + if ((flag & 0x4000000)) { + iVar5 += calcDifferedBufferSize_TexNoAndTexCoordScaleSize(local_50); + } else { + iVar5 += calcDifferedBufferSize_TexNoSize(local_50); + } + } + + uVar2 = getDiffFlag_TevStageNum(flag); + if (uVar2 != 0) { + u8 local_58; + if (mpShape->getMaterial()->getTevStageNum() > 8) { + local_58 = 8; + } else { + local_58 = mpShape->getMaterial()->getTevStageNum(); + } + u32 local_50 = local_58; + local_50 = uVar2 > local_50 ? uVar2 : local_50; + iVar5 += calcDifferedBufferSize_TevStageSize(local_50); + if (flag & 0x8000000) { + iVar5 += calcDifferedBufferSize_TevStageDirectSize(local_50); + } + } + + return ALIGN_NEXT(iVar5, 0x20); } /* 802DB7CC-802DB818 .text newDifferedDisplayList__14J3DShapePacketFUl */ -void J3DShapePacket::newDifferedDisplayList(unsigned long) { - /* Nonmatching */ +J3DError J3DShapePacket::newDifferedDisplayList(u32 flag) { + mDiffFlag = flag; + u32 bufSize = calcDifferedBufferSize(flag); + J3DError error = newDisplayList(bufSize); + + if (error != kJ3DError_Success) { + return error; + } + + setDisplayListObj(getDisplayListObj()); + return kJ3DError_Success; } /* 802DB818-802DB890 .text prepareDraw__14J3DShapePacketCFv */ void J3DShapePacket::prepareDraw() const { - /* Nonmatching */ + mpModel->getVertexBuffer()->setArray(); + j3dSys.setModel(mpModel); + j3dSys.setShapePacket((J3DShapePacket*)this); + + mpShape->setScaleFlagArray(mpScaleFlagArray); + mpShape->setDrawMtx(mpDrawMtx); + mpShape->setNrmMtx(mpNrmMtx); + mpShape->setCurrentViewNoPtr(mpCurrentViewNo); } /* 802DB890-802DB8F8 .text draw__14J3DShapePacketFv */ void J3DShapePacket::draw() { - /* Nonmatching */ + if (!checkFlag(J3DShpFlag_Hidden) && mpShape != NULL) { + prepareDraw(); + +#if 0 + if (mpTexMtxObj != NULL) { + J3DMaterial* material = mpShape->getMaterial(); + J3DDifferedTexMtx::sTexGenBlock = material->getTexGenBlock(); + J3DDifferedTexMtx::sTexMtxObj = getTexMtxObj(); + } else { + J3DDifferedTexMtx::sTexGenBlock = NULL; + } +#endif + + if (mpDisplayListObj != NULL) { + mpDisplayListObj->callDL(); + } + + mpShape->draw(); + } } /* 802DB8F8-802DB950 .text drawFast__14J3DShapePacketFv */ void J3DShapePacket::drawFast() { - /* Nonmatching */ + if (!checkFlag(J3DShpFlag_Hidden) && mpShape != NULL) { + prepareDraw(); + +#if 0 + if (mpTexMtxObj != NULL) { + J3DMaterial* material = mpShape->getMaterial(); + J3DDifferedTexMtx::sTexGenBlock = material->getTexGenBlock(); + J3DDifferedTexMtx::sTexMtxObj = getTexMtxObj(); + } else { + J3DDifferedTexMtx::sTexGenBlock = NULL; + } +#endif + + mpShape->drawFast(); + } } /* 802DB950-802DB978 .text isSame__12J3DMatPacketCFP12J3DMatPacket */ -void J3DMatPacket::isSame(J3DMatPacket*) const { - /* Nonmatching */ +bool J3DMatPacket::isSame(J3DMatPacket* pOther) const { + bool isSame = false; + + if (mDiffFlag == pOther->mDiffFlag && !(mDiffFlag >> 0x1F)) { + isSame = true; + } + return isSame; } /* 802DB978-802DB97C .text draw__9J3DPacketFv */ void J3DPacket::draw() { - /* Nonmatching */ } /* 802DB97C-802DB9D8 .text __dt__17J3DCallBackPacketFv */ diff --git a/src/d/actor/d_a_swc00.cpp b/src/d/actor/d_a_swc00.cpp index c789f16fb..0bbc99bf1 100644 --- a/src/d/actor/d_a_swc00.cpp +++ b/src/d/actor/d_a_swc00.cpp @@ -76,9 +76,9 @@ static actor_method_class l_daSwc00_Method = { }; extern actor_process_profile_definition g_profile_SWC00 = { - -3, + fpcLy_CURRENT_e, 7, - 0xFFFD, + fpcPi_CURRENT_e, PROC_SWC00, &g_fpcLf_Method.mBase, sizeof(swc00_class),