diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2021-10-24 14:35:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-24 23:35:00 +0200 |
| commit | 5020395dfd34d4dc846e3ea228f6271bfca1c72a (patch) | |
| tree | 9b553bbfc8b0807d7f860964d6044d6ccf6d1342 /include/JSystem/J2DGraph | |
| parent | b88cb8cdc0b7a8af4df22e303ff81e0e617dbc85 (diff) | |
J2D structs + print / fix GX + MSL string headers (#157)
* J2D structs + print / fix GX + MSL string headers
* remove msl_c/string.h
Diffstat (limited to 'include/JSystem/J2DGraph')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DAnimation.h | 262 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DAnmLoader.h | 62 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DMatBlock.h | 514 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DMaterial.h | 33 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DMaterialFactory.h | 66 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPictureEx.h | 96 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPrint.h | 62 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DTevs.h | 163 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DTextBoxEx.h | 50 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DWindowEx.h | 62 |
10 files changed, 1312 insertions, 58 deletions
diff --git a/include/JSystem/J2DGraph/J2DAnimation.h b/include/JSystem/J2DGraph/J2DAnimation.h index 5d43cdd324..41e7f7f92c 100644 --- a/include/JSystem/J2DGraph/J2DAnimation.h +++ b/include/JSystem/J2DGraph/J2DAnimation.h @@ -1,98 +1,250 @@ #ifndef J2DANIMATION_H #define J2DANIMATION_H -#include "dolphin/gx/GXTexture.h" +#include "JSystem/JUtility/JUTNameTab.h" +#include "JSystem/JUtility/JUTTexture.h" +#include "dolphin/gx/GX.h" #include "dolphin/types.h" +class J2DScreen; + +class J2DAnmBase { +public: + /* 80053C94 */ virtual ~J2DAnmBase(); + /* 800569B0 */ virtual void searchUpdateMaterialID(J2DScreen*); + + s16 getFrameMax() const { return mFrameMax; } + void setFrame(f32 frame) { mFrame = frame; } + +private: + /* 0x0 */ // vtable + /* 0x4 */ u8 field_0x4[2]; + /* 0x6 */ s16 mFrameMax; + /* 0x8 */ f32 mFrame; + /* 0xC */ s32 mKind; +}; // Size: 0x10 + +class J2DAnmVtxColor : public J2DAnmBase { +public: + /* 8030A358 */ virtual ~J2DAnmVtxColor(); + /* 8030363C */ virtual void getColor(u8, u16, _GXColor*) const; + +private: + /* 0x10 */ u16 mAnmTableNum[2]; + /* 0x14 */ void* mVtxColorIndexData[2]; + /* 0x1C */ void* mVtxColorIndexPointer[2]; +}; // Size: 0x24 + struct J3DTransformInfo; struct J3DTextureSRTInfo; -class J2DScreen; -struct J2DAnmVtxColorKey { - /* 8030B704 */ void getColor(u8, u16, _GXColor*) const; - /* 8030CC20 */ ~J2DAnmVtxColorKey(); -}; +class J2DAnmVtxColorKey : public J2DAnmVtxColor { + /* 8030CC20 */ virtual ~J2DAnmVtxColorKey(); + /* 8030B704 */ virtual void getColor(u8, u16, _GXColor*) const; -struct J2DAnmVtxColorFull { - /* 8030B4C4 */ void getColor(u8, u16, _GXColor*) const; - /* 8030CC8C */ ~J2DAnmVtxColorFull(); -}; +private: + /* 0x24 */ void* field_0x24[2]; + /* 0x2C */ void* field_0x2c; + /* 0x30 */ void* field_0x30; + /* 0x34 */ void* field_0x34; + /* 0x38 */ void* field_0x38; +}; // Size: 0x3C + +class J2DAnmVtxColorFull : public J2DAnmVtxColor { +public: + /* 8030CC8C */ virtual ~J2DAnmVtxColorFull(); + /* 8030B4C4 */ virtual void getColor(u8, u16, _GXColor*) const; -struct J2DAnmVisibilityFull { +private: + /* 0x24 */ void* field_0x24[2]; + /* 0x2C */ void* field_0x2c; + /* 0x30 */ void* field_0x30; + /* 0x34 */ void* field_0x34; + /* 0x38 */ void* field_0x38; +}; // Size: 0x3C + +class J2DAnmVisibilityFull : public J2DAnmBase { +public: + /* 8030A3B4 */ virtual ~J2DAnmVisibilityFull(); /* 8030C048 */ void getVisibility(u16, u8*) const; -}; -struct J2DAnmTransformKey { - /* 801959C0 */ ~J2DAnmTransformKey(); - /* 8030AAFC */ void calcTransform(f32, u16, J3DTransformInfo*) const; - /* 8030CD7C */ void getTransform(u16, J3DTransformInfo*) const; +private: + /* 0x10 */ u16 field_0x10; + /* 0x12 */ u16 field_0x12; + /* 0x14 */ void* field_0x14; + /* 0x18 */ void* field_0x18; +}; // Size: 0x1C + +class J2DAnmTransform : public J2DAnmBase { +public: + /* 80184370 */ virtual ~J2DAnmTransform(); + /* 80191130 */ virtual void getTransform(u16, J3DTransformInfo*) const; + +private: + /* 0x10 */ f32* field_0x10; + /* 0x14 */ s16* field_0x14; + /* 0x18 */ f32* field_0x18; +}; // Size: 0x1C + +class J2DAnmTransformKey : public J2DAnmTransform { +public: + /* 801959C0 */ virtual ~J2DAnmTransformKey(); + /* 8030CD7C */ virtual void getTransform(u16, J3DTransformInfo*) const; + /* 8030AAFC */ virtual void calcTransform(f32, u16, J3DTransformInfo*) const; + +private: + /* 0x1C */ u8 field_0x1c[8]; + /* 0x24 */ void* field_0x24; + /* 0x28 */ void* field_0x28; }; -struct J2DAnmTransformFull { - /* 8030A590 */ void getTransform(u16, J3DTransformInfo*) const; - /* 8030CDAC */ ~J2DAnmTransformFull(); +class J2DAnmTransformFull : public J2DAnmTransform { +public: + /* 8030CDAC */ virtual ~J2DAnmTransformFull(); + /* 8030A590 */ virtual void getTransform(u16, J3DTransformInfo*) const; + +private: + /* 0x1C */ u8 field_0x1c[6]; + /* 0x22 */ u16 field_0x22; + /* 0x24 */ void* field_0x24; }; -struct J2DAnmTextureSRTKey { - /* 80184274 */ ~J2DAnmTextureSRTKey(); +class J2DAnmTextureSRTKey : public J2DAnmBase { +public: /* 8030B9F0 */ void calcTransform(f32, u16, J3DTextureSRTInfo*) const; - /* 8030BC60 */ void searchUpdateMaterialID(J2DScreen*); + + /* 80184274 */ virtual ~J2DAnmTextureSRTKey(); + /* 8030BC60 */ virtual void searchUpdateMaterialID(J2DScreen*); + +private: + /* 0x10 */ int field_0x10; + /* 0x14 */ int field_0x14; + /* 0x18 */ u16 mUpdateMaterialNum; + /* 0x1A */ u16 field_0x1a; + /* 0x1C */ u16 field_0x1c; + /* 0x20 */ int field_0x20; + /* 0x24 */ int field_0x24; + /* 0x28 */ int field_0x28; + /* 0x2C */ u8* mUpdateTexMtxID; + /* 0x30 */ u16* mUpdateMaterialID; + /* 0x34 */ JUTNameTab field_0x34; + /* 0x44 */ u8 field_0x44[4]; + /* 0x48 */ u16 field_0x48; + /* 0x4A */ u16 field_0x4a; + /* 0x4C */ u16 field_0x4c; + /* 0x4E */ u16 field_0x4e; + /* 0x50 */ int field_0x50; + /* 0x54 */ int field_0x54; + /* 0x58 */ int field_0x58; + /* 0x5C */ int field_0x5c; + /* 0x60 */ u8 field_0x60[8]; + /* 0x68 */ JUTNameTab field_0x68; + /* 0x78 */ u8 field_0x78[4]; + /* 0x7C */ int field_0x7c; }; -struct J2DAnmTexPattern { +class J2DAnmTexPattern : public J2DAnmBase { +public: struct J2DAnmTexPatternTIMGPointer { /* 8030CB2C */ J2DAnmTexPatternTIMGPointer(); /* 8030CB3C */ ~J2DAnmTexPatternTIMGPointer(); - }; - /* 8030BD10 */ void searchUpdateMaterialID(J2DScreen*); + /* 0x0 */ ResTIMG* mRes; + /* 0x4 */ JUTPalette* mPalette; + }; // Size: 0x8 + /* 8030BEE8 */ void getTexNo(u16, u16*) const; /* 8030BF9C */ void getResTIMG(u16) const; /* 8030BFF0 */ void getPalette(u16) const; - /* 8030CB90 */ ~J2DAnmTexPattern(); + + /* 8030CB90 */ virtual ~J2DAnmTexPattern(); + /* 8030BD10 */ virtual void searchUpdateMaterialID(J2DScreen*); + +private: + /* 0x10 */ int field_0x10; + /* 0x14 */ void* mAnmTable; + /* 0x18 */ u8 field_0x18[2]; + /* 0x1A */ u16 mUpdateMaterialNum; + /* 0x1C */ u16* mUpdaterMaterialID; + /* 0x20 */ JUTNameTab field_0x20; + /* 0x30 */ J2DAnmTexPatternTIMGPointer* mTIMGPtrArray; }; -struct J2DAnmTevRegKey { - /* 801841EC */ ~J2DAnmTevRegKey(); +class J2DAnmTevRegKey : public J2DAnmBase { +public: /* 8030C0F0 */ void getTevColorReg(u16, _GXColorS10*) const; /* 8030C3B4 */ void getTevKonstReg(u16, _GXColor*) const; - /* 8030C678 */ void searchUpdateMaterialID(J2DScreen*); -}; - -struct J2DAnmColorKey { - /* 80239BE0 */ ~J2DAnmColorKey(); - /* 8030B200 */ void getColor(u16, _GXColor*) const; -}; -struct J2DAnmColorFull { - /* 8030AFC8 */ void getColor(u16, _GXColor*) const; - /* 8030CCF8 */ ~J2DAnmColorFull(); -}; + /* 801841EC */ virtual ~J2DAnmTevRegKey(); + /* 8030C678 */ virtual void searchUpdateMaterialID(J2DScreen*); -struct J2DAnmColor { - /* 801842FC */ ~J2DAnmColor(); - /* 802EB390 */ void getColor(u16, _GXColor*) const; - /* 8030AF24 */ void searchUpdateMaterialID(J2DScreen*); +private: + /* 0x10 */ u16 mCRegUpdateMaterialNum; + /* 0x12 */ u16 mKRegUpdateMaterialNum; + /* 0x14 */ u16 field_0x14; + /* 0x16 */ u16 field_0x16; + /* 0x18 */ u16 field_0x18; + /* 0x1A */ u16 field_0x1a; + /* 0x1C */ u16 field_0x1c; + /* 0x1E */ u16 field_0x1e; + /* 0x20 */ u16 field_0x20; + /* 0x22 */ u16 field_0x22; + /* 0x24 */ u16* mCRegUpdateMaterialID; + /* 0x28 */ JUTNameTab field_0x28; + /* 0x38 */ u16* mKRegUpdateMaterialID; + /* 0x3C */ JUTNameTab field_0x3c; + /* 0x4C */ void* mAnmCRegKeyTable; + /* 0x50 */ void* mAnmKRegKeyTable; + /* 0x54 */ int field_0x54; + /* 0x58 */ int field_0x58; + /* 0x5C */ int field_0x5c; + /* 0x60 */ int field_0x60; + /* 0x64 */ int field_0x64; + /* 0x68 */ int field_0x68; + /* 0x6C */ int field_0x6c; + /* 0x70 */ int field_0x70; }; -class J2DAnmBase { +class J2DAnmColor : public J2DAnmBase { public: - /* 80053C94 */ virtual ~J2DAnmBase(); - /* 800569B0 */ virtual void searchUpdateMaterialID(J2DScreen*); + /* 801842FC */ virtual ~J2DAnmColor(); + /* 8030AF24 */ virtual void searchUpdateMaterialID(J2DScreen*); + /* 802EB390 */ virtual void getColor(u16, _GXColor*) const; - s16 getFrameMax() const { return mFrameMax; } - void setFrame(f32 frame) { mFrame = frame; } +private: + /* 0x10 */ u16 field_0x10; + /* 0x10 */ u16 field_0x12; + /* 0x14 */ u16 field_0x14; + /* 0x16 */ u16 field_0x16; + /* 0x18 */ u16 mUpdateMaterialNum; + /* 0x1C */ u16* mUpdateMaterialID; + /* 0x20 */ JUTNameTab field_0x20; +}; // Size: 0x30 + +class J2DAnmColorKey : public J2DAnmColor { +public: + /* 80239BE0 */ virtual ~J2DAnmColorKey(); + /* 8030B200 */ virtual void getColor(u16, _GXColor*) const; private: - /* 0x0 */ // vtable - /* 0x4 */ u8 field_0x4[2]; - /* 0x6 */ s16 mFrameMax; - /* 0x8 */ f32 mFrame; - /* 0xC */ int mKind; + /* 0x30 */ int field_0x30; + /* 0x34 */ int field_0x34; + /* 0x38 */ int field_0x38; + /* 0x3C */ int field_0x3c; + /* 0x40 */ int field_0x40; }; -struct J2DAnmVtxColor {}; +class J2DAnmColorFull : public J2DAnmColor { +public: + /* 8030CCF8 */ virtual ~J2DAnmColorFull(); + /* 8030AFC8 */ virtual void getColor(u16, _GXColor*) const; -struct J2DAnmTransform {}; +private: + /* 0x30 */ int field_0x30; + /* 0x34 */ int field_0x34; + /* 0x38 */ int field_0x38; + /* 0x3C */ int field_0x3c; + /* 0x40 */ int field_0x40; +}; #endif /* J2DANIMATION_H */ diff --git a/include/JSystem/J2DGraph/J2DAnmLoader.h b/include/JSystem/J2DGraph/J2DAnmLoader.h index 50facee3c4..0c2f69d007 100644 --- a/include/JSystem/J2DGraph/J2DAnmLoader.h +++ b/include/JSystem/J2DGraph/J2DAnmLoader.h @@ -1,6 +1,68 @@ #ifndef J2DANMLOADER_H #define J2DANMLOADER_H +#include "JSystem/J2DGraph/J2DAnimation.h" +#include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "dolphin/types.h" +struct J2DAnmLoaderDataBase { + /* 80308A6C */ static void load(void const*); +}; + +class J2DAnmLoader { +public: + virtual void load(void const*) = 0; + virtual void setResource(J2DAnmBase*, void const*) = 0; + /* 8030A410 */ virtual ~J2DAnmLoader(); +}; + +struct J3DAnmTransformKeyData; +struct J3DAnmTextureSRTKeyData; +struct J3DAnmColorKeyData; +struct J3DAnmVtxColorKeyData; +struct J3DAnmTevRegKeyData; +struct J3DAnmTransformFullData; +struct J3DAnmColorFullData; +struct J3DAnmTexPatternFullData; +struct J3DAnmVisibilityFullData; +struct J3DAnmVtxColorFullData; + +class J2DAnmKeyLoader_v15 : public J2DAnmLoader { +public: + /* 80309290 */ J2DAnmKeyLoader_v15(); + /* 80309570 */ void readAnmTransform(J3DAnmTransformKeyData const*); + /* 80309598 */ void setAnmTransform(J2DAnmTransformKey*, J3DAnmTransformKeyData const*); + /* 80309634 */ void readAnmTextureSRT(J3DAnmTextureSRTKeyData const*); + /* 8030965C */ void setAnmTextureSRT(J2DAnmTextureSRTKey*, J3DAnmTextureSRTKeyData const*); + /* 80309848 */ void readAnmColor(J3DAnmColorKeyData const*); + /* 80309870 */ void setAnmColor(J2DAnmColorKey*, J3DAnmColorKeyData const*); + /* 8030995C */ void readAnmVtxColor(J3DAnmVtxColorKeyData const*); + /* 80309984 */ void setAnmVtxColor(J2DAnmVtxColorKey*, J3DAnmVtxColorKeyData const*); + /* 80309FDC */ void readAnmTevReg(J3DAnmTevRegKeyData const*); + /* 8030A004 */ void setAnmTevReg(J2DAnmTevRegKey*, J3DAnmTevRegKeyData const*); + + /* 80309308 */ virtual void load(void const*); + /* 80309414 */ virtual void setResource(J2DAnmBase*, void const*); + /* 803092AC */ virtual ~J2DAnmKeyLoader_v15(); +}; + +class J2DAnmFullLoader_v15 : public J2DAnmLoader { +public: + /* 80309CE8 */ J2DAnmFullLoader_v15(); + /* 80309D60 */ void readAnmTransform(J3DAnmTransformFullData const*); + /* 80309D88 */ void setAnmTransform(J2DAnmTransformFull*, J3DAnmTransformFullData const*); + /* 80309E1C */ void readAnmColor(J3DAnmColorFullData const*); + /* 80309E44 */ void setAnmColor(J2DAnmColorFull*, J3DAnmColorFullData const*); + /* 80309F10 */ void readAnmTexPattern(J3DAnmTexPatternFullData const*); + /* 80309F38 */ void setAnmTexPattern(J2DAnmTexPattern*, J3DAnmTexPatternFullData const*); + /* 8030A190 */ void readAnmVisibility(J3DAnmVisibilityFullData const*); + /* 8030A1B8 */ void setAnmVisibility(J2DAnmVisibilityFull*, J3DAnmVisibilityFullData const*); + /* 8030A234 */ void readAnmVtxColor(J3DAnmVtxColorFullData const*); + /* 8030A25C */ void setAnmVtxColor(J2DAnmVtxColorFull*, J3DAnmVtxColorFullData const*); + + /* 80309A80 */ virtual void load(void const*); + /* 80309B8C */ virtual void setResource(J2DAnmBase*, void const*); + /* 80309D04 */ virtual ~J2DAnmFullLoader_v15(); +}; + #endif /* J2DANMLOADER_H */ diff --git a/include/JSystem/J2DGraph/J2DMatBlock.h b/include/JSystem/J2DGraph/J2DMatBlock.h index 3286f66423..0333028fb5 100644 --- a/include/JSystem/J2DGraph/J2DMatBlock.h +++ b/include/JSystem/J2DGraph/J2DMatBlock.h @@ -1,6 +1,520 @@ #ifndef J2DMATBLOCK_H #define J2DMATBLOCK_H +#include "JSystem/J2DGraph/J2DTevs.h" +#include "JSystem/JUtility/JUTResFont.h" +#include "JSystem/JUtility/JUTTexture.h" +#include "JSystem/JUtility/TColor.h" #include "dolphin/types.h" +struct J2DGXColorS10 : public GXColorS10 { + /* 802F1B90 */ J2DGXColorS10(); +}; + +struct J2DTevSwapModeInfo; + +class J2DTevBlock { +public: + /* 802F2A40 */ virtual void initialize(); + /* 802EB1D0 */ virtual void setGX(); + /* 802F2A44 */ virtual void loadTexture(_GXTexMapID, u32); + virtual void getType() = 0; + virtual s32 getMaxStage() = 0; + /* 802EB1DC */ virtual void setTexNo(u32, u16); + /* 802EA170 */ virtual void getTexNo(u32) const; + /* 802F2A48 */ virtual void setFontNo(u16); + /* 802EA164 */ virtual void getFontNo() const; + /* 802F2A4C */ virtual void setTevOrder(u32, J2DTevOrder); + /* 802EA144 */ virtual bool getTevOrder(u32); + /* 802EB1D8 */ virtual void setTevColor(u32, J2DGXColorS10); + /* 802EA13C */ virtual bool getTevColor(u32); + /* 802EB1D4 */ virtual void setTevKColor(u32, JUtility::TColor); + /* 802EA15C */ virtual bool getTevKColor(u32); + /* 802F2A50 */ virtual void setTevKColorSel(u32, u8); + /* 802EA154 */ virtual bool getTevKColorSel(u32); + /* 802F2A54 */ virtual void setTevKAlphaSel(u32, u8); + /* 802EA14C */ virtual bool getTevKAlphaSel(u32); + /* 802F2A58 */ virtual void setTevStageNum(u8); + /* 802EA17C */ virtual bool getTevStageNum() const; + /* 802F2A5C */ virtual void setTevStage(u32, J2DTevStage); + /* 802EA134 */ virtual bool getTevStage(u32); + /* 802F2A60 */ virtual void setTevSwapModeInfo(u32, J2DTevSwapModeInfo); + /* 802F2A64 */ virtual void setTevSwapModeTable(u32, J2DTevSwapModeTable); + /* 802EA12C */ virtual bool getTevSwapModeTable(u32); + /* 802F2A68 */ virtual void setIndTevStage(u32, J2DIndTevStage); + /* 802EA184 */ virtual bool getIndTevStage(u32); + /* 802F2A7C */ virtual bool insertTexture(u32, ResTIMG const*); + /* 802F2A74 */ virtual bool insertTexture(u32, ResTIMG const*, JUTPalette*); + /* 802F2A6C */ virtual bool insertTexture(u32, JUTTexture*); + /* 802F2A8C */ virtual bool setTexture(u32, ResTIMG const*); + /* 802F2A84 */ virtual bool setTexture(u32, JUTTexture*); + /* 802F2A94 */ virtual bool removeTexture(u32); + /* 802F2AA4 */ virtual bool setFont(ResFONT*); + /* 802F2A9C */ virtual bool setFont(JUTFont*); + /* 802F2AAC */ virtual bool setPalette(u32, ResTLUT const*); + /* 802F2AB4 */ virtual bool prepareTexture(u8); + /* 802EB87C */ virtual bool getTexture(u32); + /* 802EB884 */ virtual bool getPalette(u32); + /* 802F2ABC */ virtual bool getFont(); + /* 802F2AC4 */ virtual void shiftDeleteFlag(u8, bool); + /* 802F2AC8 */ virtual void setUndeleteFlag(u8); + /* 802F2ACC */ virtual void setFontUndeleteFlag(); + /* 802EB184 */ virtual ~J2DTevBlock(); +}; + +class J2DTevBlock1 : public J2DTevBlock { +public: + /* 802EB88C */ J2DTevBlock1(); + + /* 802EBA50 */ virtual void initialize(); + /* 802EC328 */ virtual void setGX(); + /* 802EC570 */ virtual void loadTexture(_GXTexMapID, u32); + /* 802F27A0 */ virtual void getType(); + /* 802F27AC */ virtual s32 getMaxStage(); + /* 802F27B4 */ virtual void setTexNo(u32, u16); + /* 802F27C4 */ virtual void getTexNo(u32) const; + /* 802F27D4 */ virtual void setFontNo(u16); + /* 802F27DC */ virtual void getFontNo() const; + /* 802F27E4 */ virtual void setTevOrder(u32, J2DTevOrder); + /* 802F2808 */ virtual void getTevOrder(u32); + /* 802F281C */ virtual void setTevColor(u32, J2DGXColorS10); + /* 802F2848 */ virtual void getTevColor(u32); + /* 802F285C */ virtual void setTevKColor(u32, JUtility::TColor); + /* 802F2888 */ virtual void getTevKColor(u32); + /* 802F289C */ virtual void setTevKColorSel(u32, u8); + /* 802F28A8 */ virtual void getTevKColorSel(u32); + /* 802F28B4 */ virtual void setTevKAlphaSel(u32, u8); + /* 802F28C0 */ virtual void getTevKAlphaSel(u32); + /* 802F28CC */ virtual void setTevStageNum(u8); + /* 802F28D0 */ virtual bool getTevStageNum() const; + /* 802F28D8 */ virtual void setTevStage(u32, J2DTevStage); + /* 802F2914 */ virtual void getTevStage(u32); + /* 802F2928 */ virtual void setTevSwapModeInfo(u32, J2DTevSwapModeInfo); + /* 802F2960 */ virtual void setTevSwapModeTable(u32, J2DTevSwapModeTable); + /* 802F2970 */ virtual void getTevSwapModeTable(u32); + /* 802F2980 */ virtual void setIndTevStage(u32, J2DIndTevStage); + /* 802F2994 */ virtual void getIndTevStage(u32); + /* 802F29A8 */ virtual void insertTexture(u32, ResTIMG const*); + /* 802EBCC0 */ virtual void insertTexture(u32, ResTIMG const*, JUTPalette*); + /* 802EBDE4 */ virtual void insertTexture(u32, JUTTexture*); + /* 802EBE8C */ virtual void setTexture(u32, ResTIMG const*); + /* 802EC01C */ virtual void setTexture(u32, JUTTexture*); + /* 802EC0A8 */ virtual void removeTexture(u32); + /* 802EC124 */ virtual void setFont(ResFONT*); + /* 802EC1D8 */ virtual void setFont(JUTFont*); + /* 802EC258 */ virtual void setPalette(u32, ResTLUT const*); + /* 802EBC0C */ virtual void prepareTexture(u8); + /* 802F29D8 */ virtual void getTexture(u32); + /* 802F29F8 */ virtual void getPalette(u32); + /* 802F2A18 */ virtual void getFont(); + /* 802EC318 */ virtual void shiftDeleteFlag(u8, bool); + /* 802F2A20 */ virtual void setUndeleteFlag(u8); + /* 802F2A30 */ virtual void setFontUndeleteFlag(); + /* 802EB998 */ virtual ~J2DTevBlock1(); + +private: + /* 0x004 */ u16 mTexNo[1]; + /* 0x006 */ u16 mFontNo; + /* 0x008 */ J2DTevOrder mTevOrder[1]; + /* 0x00C */ J2DGXColorS10 mTevColor[4]; + /* 0x02C */ J2DTevStage mTevStage[1]; + /* 0x034 */ JUtility::TColor mTevKColor[4]; + /* 0x044 */ u8 mTevKColorSel[1]; + /* 0x045 */ u8 mTevKAlphaSel[1]; + /* 0x046 */ J2DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x04C */ J2DIndTevStage mIndTevStage[1]; + /* 0x050 */ JUTTexture* mTexture[1]; + /* 0x054 */ JUTPalette* mPalette[1]; + /* 0x058 */ JUTResFont* mFont; + /* 0x05C */ u8 mUndeleteFlag; +}; // Size: 0x60 + +class J2DTevBlock2 : public J2DTevBlock { +public: + /* 802EC5B8 */ J2DTevBlock2(); + + /* 802EC7A0 */ virtual void initialize(); + /* 802ED584 */ virtual void setGX(); + /* 802ED874 */ virtual void loadTexture(_GXTexMapID, u32); + /* 802F24FC */ virtual void getType(); + /* 802F2508 */ virtual s32 getMaxStage(); + /* 802F2510 */ virtual void setTexNo(u32, u16); + /* 802F2520 */ virtual void getTexNo(u32) const; + /* 802F2530 */ virtual void setFontNo(u16); + /* 802F2538 */ virtual void getFontNo() const; + /* 802F2540 */ virtual void setTevOrder(u32, J2DTevOrder); + /* 802F2564 */ virtual void getTevOrder(u32); + /* 802F2578 */ virtual void setTevColor(u32, J2DGXColorS10); + /* 802F25A4 */ virtual void getTevColor(u32); + /* 802F25B8 */ virtual void setTevKColor(u32, JUtility::TColor); + /* 802F25E4 */ virtual void getTevKColor(u32); + /* 802F25F8 */ virtual void setTevKColorSel(u32, u8); + /* 802F2604 */ virtual void getTevKColorSel(u32); + /* 802F2610 */ virtual void setTevKAlphaSel(u32, u8); + /* 802F261C */ virtual void getTevKAlphaSel(u32); + /* 802F2628 */ virtual void setTevStageNum(u8); + /* 802F2630 */ virtual void getTevStageNum() const; + /* 802F2638 */ virtual void setTevStage(u32, J2DTevStage); + /* 802F2674 */ virtual void getTevStage(u32); + /* 802F2688 */ virtual void setTevSwapModeInfo(u32, J2DTevSwapModeInfo); + /* 802F26C0 */ virtual void setTevSwapModeTable(u32, J2DTevSwapModeTable); + /* 802F26D0 */ virtual void getTevSwapModeTable(u32); + /* 802F26E0 */ virtual void setIndTevStage(u32, J2DIndTevStage); + /* 802F26F4 */ virtual void getIndTevStage(u32); + /* 802F2708 */ virtual void insertTexture(u32, ResTIMG const*); + /* 802ECAE8 */ virtual void insertTexture(u32, ResTIMG const*, JUTPalette*); + /* 802ECDE8 */ virtual void insertTexture(u32, JUTTexture*); + /* 802ECF48 */ virtual void setTexture(u32, ResTIMG const*); + /* 802ED16C */ virtual void setTexture(u32, JUTTexture*); + /* 802ED21C */ virtual void removeTexture(u32); + /* 802ED2F0 */ virtual void setFont(ResFONT*); + /* 802ED3A4 */ virtual void setFont(JUTFont*); + /* 802ED424 */ virtual void setPalette(u32, ResTLUT const*); + /* 802ECA18 */ virtual void prepareTexture(u8); + /* 802F2738 */ virtual void getTexture(u32); + /* 802F2758 */ virtual void getPalette(u32); + /* 802F2778 */ virtual void getFont(); + /* 802ED4FC */ virtual void shiftDeleteFlag(u8, bool); + /* 802F2780 */ virtual void setUndeleteFlag(u8); + /* 802F2790 */ virtual void setFontUndeleteFlag(); + /* 802EC6C8 */ virtual ~J2DTevBlock2(); + +private: + /* 0x004 */ u16 mTexNo[2]; + /* 0x008 */ u16 mFontNo; + /* 0x00A */ J2DTevOrder mTevOrder[2]; + /* 0x012 */ J2DGXColorS10 mTevColor[4]; + /* 0x032 */ u8 mTevStageNum; + /* 0x033 */ J2DTevStage mTevStage[2]; + /* 0x044 */ JUtility::TColor mTevKColor[4]; + /* 0x054 */ u8 mTevKColorSel[2]; + /* 0x056 */ u8 mTevKAlphaSel[2]; + /* 0x058 */ J2DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x05C */ J2DIndTevStage mIndTevStage[2]; + /* 0x064 */ JUTTexture* mTexture[2]; + /* 0x06C */ JUTPalette* mPalette[2]; + /* 0x064 */ JUTFont* mFont; + /* 0x078 */ u8 mUndeleteFlag; +}; // Size: 0x7C + +class J2DTevBlock4 : public J2DTevBlock { +public: + /* 802ED8BC */ J2DTevBlock4(); + + /* 802EDAC4 */ virtual void initialize(); + /* 802EEA2C */ virtual void setGX(); + /* 802EED1C */ virtual void loadTexture(_GXTexMapID, u32); + /* 802F2258 */ virtual void getType(); + /* 802F2264 */ virtual s32 getMaxStage(); + /* 802F226C */ virtual void setTexNo(u32, u16); + /* 802F227C */ virtual void getTexNo(u32) const; + /* 802F228C */ virtual void setFontNo(u16); + /* 802F2294 */ virtual void getFontNo() const; + /* 802F229C */ virtual void setTevOrder(u32, J2DTevOrder); + /* 802F22C0 */ virtual void getTevOrder(u32); + /* 802F22D4 */ virtual void setTevColor(u32, J2DGXColorS10); + /* 802F2300 */ virtual void getTevColor(u32); + /* 802F2314 */ virtual void setTevKColor(u32, JUtility::TColor); + /* 802F2340 */ virtual void getTevKColor(u32); + /* 802F2354 */ virtual void setTevKColorSel(u32, u8); + /* 802F2360 */ virtual void getTevKColorSel(u32); + /* 802F236C */ virtual void setTevKAlphaSel(u32, u8); + /* 802F2378 */ virtual void getTevKAlphaSel(u32); + /* 802F2384 */ virtual void setTevStageNum(u8); + /* 802F238C */ virtual void getTevStageNum() const; + /* 802F2394 */ virtual void setTevStage(u32, J2DTevStage); + /* 802F23D0 */ virtual void getTevStage(u32); + /* 802F23E4 */ virtual void setTevSwapModeInfo(u32, J2DTevSwapModeInfo); + /* 802F241C */ virtual void setTevSwapModeTable(u32, J2DTevSwapModeTable); + /* 802F242C */ virtual void getTevSwapModeTable(u32); + /* 802F243C */ virtual void setIndTevStage(u32, J2DIndTevStage); + /* 802F2450 */ virtual void getIndTevStage(u32); + /* 802F2464 */ virtual void insertTexture(u32, ResTIMG const*); + /* 802EDE04 */ virtual void insertTexture(u32, ResTIMG const*, JUTPalette*); + /* 802EE1D4 */ virtual void insertTexture(u32, JUTTexture*); + /* 802EE364 */ virtual void setTexture(u32, ResTIMG const*); + /* 802EE5F0 */ virtual void setTexture(u32, JUTTexture*); + /* 802EE6A0 */ virtual void removeTexture(u32); + /* 802EE798 */ virtual void setFont(ResFONT*); + /* 802EE84C */ virtual void setFont(JUTFont*); + /* 802EE8CC */ virtual void setPalette(u32, ResTLUT const*); + /* 802EDD34 */ virtual void prepareTexture(u8); + /* 802F2494 */ virtual void getTexture(u32); + /* 802F24B4 */ virtual void getPalette(u32); + /* 802F24D4 */ virtual void getFont(); + /* 802EE9A4 */ virtual void shiftDeleteFlag(u8, bool); + /* 802F24DC */ virtual void setUndeleteFlag(u8); + /* 802F24EC */ virtual void setFontUndeleteFlag(); + /* 802ED9E4 */ virtual ~J2DTevBlock4(); + +private: + /* 0x004 */ u16 mTexNo[4]; + /* 0x00C */ u16 mFontNo; + /* 0x00E */ J2DTevOrder mTevOrder[4]; + /* 0x01E */ J2DGXColorS10 mTevColor[4]; + /* 0x03E */ u8 mTevStageNum; + /* 0x03F */ J2DTevStage mTevStage[4]; + /* 0x060 */ JUtility::TColor mTevKColor[4]; + /* 0x070 */ u8 mTevKColorSel[4]; + /* 0x074 */ u8 mTevKAlphaSel[4]; + /* 0x078 */ J2DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x07C */ J2DIndTevStage mIndTevStage[4]; + /* 0x08C */ JUTTexture* mTexture[4]; + /* 0x09C */ JUTPalette* mPalette[4]; + /* 0x0AC */ JUTFont* mFont; + /* 0x0B0 */ u8 mUndeleteFlag; +}; // Size: 0xB4 + +class J2DTevBlock8 : public J2DTevBlock { +public: + /* 802EED64 */ J2DTevBlock8(); + + /* 802EEF6C */ virtual void initialize(); + /* 802EFEAC */ virtual void setGX(); + /* 802F019C */ virtual void loadTexture(_GXTexMapID, u32); + /* 802F1FB8 */ virtual void getType(); + /* 802F1FC4 */ virtual s32 getMaxStage(); + /* 802F1FCC */ virtual void setTexNo(u32, u16); + /* 802F1FDC */ virtual void getTexNo(u32) const; + /* 802F1FEC */ virtual void setFontNo(u16); + /* 802F1FF4 */ virtual void getFontNo() const; + /* 802F1FFC */ virtual void setTevOrder(u32, J2DTevOrder); + /* 802F2020 */ virtual void getTevOrder(u32); + /* 802F2034 */ virtual void setTevColor(u32, J2DGXColorS10); + /* 802F2060 */ virtual void getTevColor(u32); + /* 802F2074 */ virtual void setTevKColor(u32, JUtility::TColor); + /* 802F20A0 */ virtual void getTevKColor(u32); + /* 802F20B4 */ virtual void setTevKColorSel(u32, u8); + /* 802F20C0 */ virtual void getTevKColorSel(u32); + /* 802F20CC */ virtual void setTevKAlphaSel(u32, u8); + /* 802F20D8 */ virtual void getTevKAlphaSel(u32); + /* 802F20E4 */ virtual void setTevStageNum(u8); + /* 802F20EC */ virtual void getTevStageNum() const; + /* 802F20F4 */ virtual void setTevStage(u32, J2DTevStage); + /* 802F2130 */ virtual void getTevStage(u32); + /* 802F2144 */ virtual void setTevSwapModeInfo(u32, J2DTevSwapModeInfo); + /* 802F217C */ virtual void setTevSwapModeTable(u32, J2DTevSwapModeTable); + /* 802F218C */ virtual void getTevSwapModeTable(u32); + /* 802F219C */ virtual void setIndTevStage(u32, J2DIndTevStage); + /* 802F21B0 */ virtual void getIndTevStage(u32); + /* 802F21C4 */ virtual void insertTexture(u32, ResTIMG const*); + /* 802EF2B0 */ virtual void insertTexture(u32, ResTIMG const*, JUTPalette*); + /* 802EF67C */ virtual void insertTexture(u32, JUTTexture*); + /* 802EF80C */ virtual void setTexture(u32, ResTIMG const*); + /* 802EFA98 */ virtual void setTexture(u32, JUTTexture*); + /* 802EFB48 */ virtual void removeTexture(u32); + /* 802EFC40 */ virtual void setFont(ResFONT*); + /* 802EFCEC */ virtual void setFont(JUTFont*); + /* 802EFD68 */ virtual void setPalette(u32, ResTLUT const*); + /* 802EF1E0 */ virtual void prepareTexture(u8); + /* 802F21F4 */ virtual void getTexture(u32); + /* 802F2214 */ virtual void getPalette(u32); + /* 802F2234 */ virtual void getFont(); + /* 802EFE40 */ virtual void shiftDeleteFlag(u8, bool); + /* 802F223C */ virtual void setUndeleteFlag(u8); + /* 802F224C */ virtual void setFontUndeleteFlag(); + /* 802EEE8C */ virtual ~J2DTevBlock8(); + +private: + /* 0x004 */ u16 mTexNo[8]; + /* 0x014 */ u16 mFontNo; + /* 0x016 */ J2DTevOrder mTevOrder[8]; + /* 0x036 */ J2DGXColorS10 mTevColor[4]; + /* 0x056 */ u8 mTevStageNum; + /* 0x057 */ J2DTevStage mTevStage[8]; + /* 0x098 */ JUtility::TColor mTevKColor[4]; + /* 0x0A8 */ u8 mTevKColorSel[8]; + /* 0x0B0 */ u8 mTevKAlphaSel[8]; + /* 0x0B8 */ J2DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x0BC */ J2DIndTevStage mIndTevStage[8]; + /* 0x0DC */ JUTTexture* mTexture[8]; + /* 0x0FC */ JUTPalette* mPalette[8]; + /* 0x11C */ JUTFont* mFont; + /* 0x120 */ u8 mUndeleteFlag; + /* 0x121 */ bool mFontUndeleteFlag; +}; + +class J2DTevBlock16 : public J2DTevBlock { +public: + /* 802F01E4 */ J2DTevBlock16(); + + /* 802F03EC */ virtual void initialize(); + /* 802F132C */ virtual void setGX(); + /* 802F161C */ virtual void loadTexture(_GXTexMapID, u32); + /* 802F1D18 */ virtual void getType(); + /* 802F1D24 */ virtual s32 getMaxStage(); + /* 802F1D2C */ virtual void setTexNo(u32, u16); + /* 802F1D3C */ virtual void getTexNo(u32) const; + /* 802F1D4C */ virtual void setFontNo(u16); + /* 802F1D54 */ virtual void getFontNo() const; + /* 802F1D5C */ virtual void setTevOrder(u32, J2DTevOrder); + /* 802F1D80 */ virtual void getTevOrder(u32); + /* 802F1D94 */ virtual void setTevColor(u32, J2DGXColorS10); + /* 802F1DC0 */ virtual void getTevColor(u32); + /* 802F1DD4 */ virtual void setTevKColor(u32, JUtility::TColor); + /* 802F1E00 */ virtual void getTevKColor(u32); + /* 802F1E14 */ virtual void setTevKColorSel(u32, u8); + /* 802F1E20 */ virtual void getTevKColorSel(u32); + /* 802F1E2C */ virtual void setTevKAlphaSel(u32, u8); + /* 802F1E38 */ virtual void getTevKAlphaSel(u32); + /* 802F1E44 */ virtual void setTevStageNum(u8); + /* 802F1E4C */ virtual void getTevStageNum() const; + /* 802F1E54 */ virtual void setTevStage(u32, J2DTevStage); + /* 802F1E90 */ virtual void getTevStage(u32); + /* 802F1EA4 */ virtual void setTevSwapModeInfo(u32, J2DTevSwapModeInfo); + /* 802F1EDC */ virtual void setTevSwapModeTable(u32, J2DTevSwapModeTable); + /* 802F1EEC */ virtual void getTevSwapModeTable(u32); + /* 802F1EFC */ virtual void setIndTevStage(u32, J2DIndTevStage); + /* 802F1F10 */ virtual void getIndTevStage(u32); + /* 802F1F24 */ virtual void insertTexture(u32, ResTIMG const*); + /* 802F0730 */ virtual void insertTexture(u32, ResTIMG const*, JUTPalette*); + /* 802F0AFC */ virtual void insertTexture(u32, JUTTexture*); + /* 802F0C8C */ virtual void setTexture(u32, ResTIMG const*); + /* 802F0F18 */ virtual void setTexture(u32, JUTTexture*); + /* 802F0FC8 */ virtual void removeTexture(u32); + /* 802F10C0 */ virtual void setFont(ResFONT*); + /* 802F116C */ virtual void setFont(JUTFont*); + /* 802F11E8 */ virtual void setPalette(u32, ResTLUT const*); + /* 802F0660 */ virtual void prepareTexture(u8); + /* 802F1F54 */ virtual void getTexture(u32); + /* 802F1F74 */ virtual void getPalette(u32); + /* 802F1F94 */ virtual void getFont(); + /* 802F12C0 */ virtual void shiftDeleteFlag(u8, bool); + /* 802F1F9C */ virtual void setUndeleteFlag(u8); + /* 802F1FAC */ virtual void setFontUndeleteFlag(); + /* 802F030C */ virtual ~J2DTevBlock16(); + +private: + /* 0x004 */ u16 mTexNo[8]; + /* 0x014 */ u16 mFontNo; + /* 0x016 */ J2DTevOrder mTevOrder[16]; + /* 0x056 */ J2DGXColorS10 mTevColor[4]; + /* 0x076 */ u8 mTevStageNum; + /* 0x077 */ J2DTevStage mTevStage[16]; + /* 0x0F8 */ JUtility::TColor mTevKColor[4]; + /* 0x108 */ u8 mTevKColorSel[16]; + /* 0x118 */ u8 mTevKAlphaSel[16]; + /* 0x128 */ J2DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x12C */ J2DIndTevStage mIndTevStage[16]; + /* 0x16C */ JUTTexture* mTexture[16]; + /* 0x18C */ JUTPalette* mPalette[16]; + /* 0x1AC */ JUTFont* mFont; + /* 0x1B0 */ u8 mUndeleteFlag; + /* 0x1B1 */ bool mFontUndeleteFlag; +}; // Size: 0x1B4 + +struct J2DAlphaComp { + /* 0x0 */ u8 field_0x0; + /* 0x1 */ u8 field_0x1; + /* 0x2 */ u8 mRef0; + /* 0x3 */ u8 mRef1; +}; + +struct J2DBlendInfo { + /* 0x0 */ u8 mType; + /* 0x1 */ u8 mSrcFactor; + /* 0x2 */ u8 mDstFactor; + /* 0x3 */ u8 mOp; +}; + +struct J2DBlend { + /* 0x0 */ J2DBlendInfo mBlendInfo; +}; + +class J2DPEBlock { +public: + /* 802F17FC */ void initialize(); + /* 802F1840 */ void setGX(); + +private: + /* 0x0 */ J2DAlphaComp mAlphaComp; + /* 0x4 */ J2DBlend mBlend; + /* 0x8 */ u8 mDither; +}; + +class J2DIndBlock { +public: + /* 802EB24C */ virtual void initialize(); + /* 802EB1CC */ virtual void setGX(); + virtual void getType() = 0; + /* 802EB250 */ virtual void setIndTexStageNum(u8); + /* 802EA1A4 */ virtual bool getIndTexStageNum() const; + /* 802EB254 */ virtual void setIndTexOrder(u32, J2DIndTexOrder); + /* 802EA19C */ virtual bool getIndTexOrder(u32); + /* 802EB258 */ virtual void setIndTexMtx(u32, J2DIndTexMtx); + /* 802EA194 */ virtual bool getIndTexMtx(u32); + /* 802EB25C */ virtual void setIndTexCoordScale(u32, J2DIndTexCoordScale); + /* 802EA18C */ virtual bool getIndTexCoordScale(u32); + /* 802EB13C */ virtual ~J2DIndBlock(); +}; + +class J2DIndBlockFull : public J2DIndBlock { +public: + /* 802F1664 */ virtual void initialize(); + /* 802F1730 */ virtual void setGX(); + /* 802F1B94 */ virtual void getType(); + /* 802F1BA0 */ virtual void setIndTexStageNum(u8); + /* 802F1BA8 */ virtual void getIndTexStageNum() const; + /* 802F1BB0 */ virtual void setIndTexOrder(u32, J2DIndTexOrder); + /* 802F1BCC */ virtual void getIndTexOrder(u32); + /* 802F1BE0 */ virtual void setIndTexMtx(u32, J2DIndTexMtx); + /* 802F1C38 */ virtual void getIndTexMtx(u32); + /* 802F1C4C */ virtual void setIndTexCoordScale(u32, J2DIndTexCoordScale); + /* 802F1C68 */ virtual void getIndTexCoordScale(u32); + /* 802F1C7C */ virtual ~J2DIndBlockFull(); + +private: + /* 0x04 */ u8 mIndTexStageNum; + /* 0x05 */ J2DIndTexOrder mIndTexOrder[4]; + /* 0x10 */ J2DIndTexMtx mIndTexMtx[3]; + /* 0x64 */ J2DIndTexCoordScale mTexCoordScale[4]; +}; + +class J2DIndBlockNull : public J2DIndBlock { + /* 802EB1E0 */ virtual void setGX(); + /* 802EB1E4 */ virtual void getType(); + /* 802EB1F0 */ virtual ~J2DIndBlockNull(); +}; + +class J2DTexGenBlock { +private: + /* 0x00 */ u32 mTexGenNum; + /* 0x04 */ J2DTexCoord mTexGenCoord[8]; + /* 0x24 */ J2DTexMtx* mTexMtx[8]; + +public: + /* 802EB510 */ void initialize(); + /* 802EB570 */ void setGX(); + /* 802EB6A4 */ void setTexMtx(u32, J2DTexMtx&); + /* 802EB7E0 */ void getTexMtx(u32, J2DTexMtx&); + + /* 802EB620 */ virtual ~J2DTexGenBlock(); +}; // Size: 0x48 + +struct J2DColorChanInfo { + /* 0x0 */ u16 field_0x0; +}; + +class J2DColorChan { +public: + /* 802EB280 */ J2DColorChan(); + +private: + /* 0x0 */ J2DColorChanInfo mColorChanInfo; +}; + +class J2DColorBlock { +private: + /* 0x00 */ JUtility::TColor mMatColor[2]; + /* 0x08 */ u8 mColorChanNum; + /* 0x0A */ J2DColorChan mColorChan[4]; + /* 0x12 */ u8 mCullMode; + +public: + /* 802EB394 */ void initialize(); + /* 802EB424 */ void setGX(); + + /* 802EB0F4 */ virtual ~J2DColorBlock(); +}; + #endif /* J2DMATBLOCK_H */ diff --git a/include/JSystem/J2DGraph/J2DMaterial.h b/include/JSystem/J2DGraph/J2DMaterial.h index 065484c208..baaee0fd61 100644 --- a/include/JSystem/J2DGraph/J2DMaterial.h +++ b/include/JSystem/J2DGraph/J2DMaterial.h @@ -2,15 +2,27 @@ #define J2DMATERIAL_H #include "JSystem/J2DGraph/J2DAnimation.h" +#include "JSystem/J2DGraph/J2DMatBlock.h" +#include "dolphin/gx/GX.h" #include "dolphin/types.h" -struct J2DMaterial { +class J2DMaterial { +public: struct J2DMaterialAnmPointer { /* 802EA79C */ J2DMaterialAnmPointer(); - }; + + /* 0x00 */ int field_0x0; + /* 0x04 */ int field_0x4; + /* 0x08 */ int field_0x8; + /* 0x0C */ int field_0xc; + /* 0x10 */ u16 field_0x10; + /* 0x12 */ u16 field_0x12[8]; + /* 0x22 */ u16 field_0x22[8]; + /* 0x32 */ u16 field_0x32[4]; + /* 0x3A */ u16 field_0x3a[4]; + }; // Size: 0x44 /* 802EA1AC */ J2DMaterial(); - /* 802EA2CC */ ~J2DMaterial(); /* 802EA38C */ void setGX(); /* 802EA410 */ void createTevBlock(int, bool); /* 802EA5C4 */ void createIndBlock(int, bool); @@ -20,6 +32,21 @@ struct J2DMaterial { /* 802EAB0C */ void setAnimation(J2DAnmTevRegKey*); /* 802EA89C */ void setAnimation(J2DAnmColor*); /* 802EAC78 */ void animation(); + + /* 802EA2CC */ virtual ~J2DMaterial(); + +private: + /* 0x04 */ int field_0x4; + /* 0x08 */ int field_0x8; + /* 0x0C */ u16 mIndex; + /* 0x0E */ bool mVisible; + /* 0x0F */ u8 mMaterialAlphaCalc; + /* 0x10 */ J2DColorBlock mColorBlock; + /* 0x28 */ J2DTexGenBlock mTexGenBlock; + /* 0x70 */ J2DTevBlock* mTevBlock; + /* 0x74 */ J2DIndBlock* mIndBlock; + /* 0x78 */ J2DPEBlock mPEBlock; + /* 0x84 */ J2DMaterialAnmPointer* mAnmPointer; }; #endif /* J2DMATERIAL_H */ diff --git a/include/JSystem/J2DGraph/J2DMaterialFactory.h b/include/JSystem/J2DGraph/J2DMaterialFactory.h index 81d080a0f9..e66d8f9bdd 100644 --- a/include/JSystem/J2DGraph/J2DMaterialFactory.h +++ b/include/JSystem/J2DGraph/J2DMaterialFactory.h @@ -1,6 +1,72 @@ #ifndef J2DMATERIALFACTORY_H #define J2DMATERIALFACTORY_H +#include "JSystem/J2DGraph/J2DManage.h" +#include "JSystem/J2DGraph/J2DMaterial.h" +#include "JSystem/JKernel/JKRArchive.h" #include "dolphin/types.h" +struct J2DMaterialBlock {}; + +struct J2DMaterialInitData; +struct J2DIndInitData; +struct J2DTevSwapModeTableInfo; +struct J2DAlphaCompInfo; + +class J2DMaterialFactory { +public: + /* 802F2AD0 */ J2DMaterialFactory(J2DMaterialBlock const&); + /* 802F2C94 */ void countStages(int) const; + /* 802F2D1C */ void create(J2DMaterial*, int, u32, J2DResReference*, J2DResReference*, + JKRArchive*) const; + /* 802F362C */ void newMatColor(int, int) const; + /* 802F36CC */ void newColorChanNum(int) const; + /* 802F3704 */ void newColorChan(int, int) const; + /* 802F3758 */ void newTexGenNum(int) const; + /* 802F3790 */ void newTexCoord(int, int) const; + /* 802F3804 */ void newTexMtx(int, int) const; + /* 802F38E0 */ void newCullMode(int) const; + /* 802F3920 */ void newTexNo(int, int) const; + /* 802F3968 */ void newFontNo(int) const; + /* 802F39A8 */ void newTevOrder(int, int) const; + /* 802F3A1C */ void newTevColor(int, int) const; + /* 802F3AB4 */ void newTevKColor(int, int) const; + /* 802F3B54 */ void newTevStageNum(int) const; + /* 802F3B8C */ void newTevStage(int, int) const; + /* 802F3BEC */ void newTevSwapModeTable(int, int) const; + /* 802F3C88 */ void newIndTexStageNum(int) const; + /* 802F3CB8 */ void newIndTexOrder(int, int) const; + /* 802F3D20 */ void newIndTexMtx(int, int) const; + /* 802F3E24 */ void newIndTevStage(int, int) const; + /* 802F3F78 */ void newIndTexCoordScale(int, int) const; + /* 802F3FE0 */ void newAlphaComp(int) const; + /* 802F405C */ void newBlend(int) const; + /* 802F40D8 */ void newDither(int) const; + +private: + /* 0x00 */ int field_0x0; + /* 0x04 */ J2DMaterialInitData* field_0x4; + /* 0x08 */ u16* field_0x8; + /* 0x0C */ J2DIndInitData* field_0xc; + /* 0x10 */ GXColor* field_0x10; + /* 0x14 */ u8* field_0x14; + /* 0x18 */ J2DColorChanInfo* field_0x18; + /* 0x1C */ u8* field_0x1c; + /* 0x20 */ J2DTexCoordInfo* field_0x20; + /* 0x24 */ J2DTexMtxInfo* field_0x24; + /* 0x28 */ u16* field_0x28; + /* 0x2C */ u16* field_0x2c; + /* 0x30 */ _GXCullMode* field_0x30; + /* 0x34 */ J2DTevOrderInfo* field_0x34; + /* 0x38 */ GXColorS10* field_0x38; + /* 0x3C */ GXColor* field_0x3c; + /* 0x40 */ u8* field_0x40; + /* 0x44 */ J2DTevStageInfo* field_0x44; + /* 0x48 */ J2DTevSwapModeInfo* field_0x48; + /* 0x4C */ J2DTevSwapModeTableInfo* field_0x4c; + /* 0x50 */ J2DAlphaCompInfo* field_0x50; + /* 0x54 */ J2DBlendInfo* field_0x54; + /* 0x58 */ u8* field_0x58; +}; + #endif /* J2DMATERIALFACTORY_H */ diff --git a/include/JSystem/J2DGraph/J2DPictureEx.h b/include/JSystem/J2DGraph/J2DPictureEx.h index 00284b8045..3b83093015 100644 --- a/include/JSystem/J2DGraph/J2DPictureEx.h +++ b/include/JSystem/J2DGraph/J2DPictureEx.h @@ -1,6 +1,102 @@ #ifndef J2DPICTUREEX_H #define J2DPICTUREEX_H +#include "JSystem/J2DGraph/J2DMaterial.h" +#include "JSystem/J2DGraph/J2DPicture.h" #include "dolphin/types.h" +class J2DPictureEx : public J2DPicture { +public: + enum stage_enum {}; + + /* 803036EC */ J2DPictureEx(J2DPane*, JSURandomInputStream*, u32, J2DMaterial*); + /* 803040E4 */ void insertCommon(u8, f32); + /* 8030437C */ void isInsert(u8) const; + /* 80304728 */ void isRemove(u8) const; + /* 803052AC */ void setTevOrder(u8, u8, bool); + /* 803053E0 */ void setTevStage(u8, u8, bool); + /* 80305688 */ void setStage(J2DTevStage*, J2DPictureEx::stage_enum); + /* 80305928 */ void setTevKColor(u8); + /* 80305C70 */ void setTevKColorSel(u8); + /* 80305D18 */ void setTevKAlphaSel(u8); + /* 80305DC0 */ void shiftSetBlendRatio(u8, f32, bool, bool); + /* 80306664 */ void getBlackWhite(JUtility::TColor*, JUtility::TColor*) const; + /* 80306824 */ void isSetBlackWhite(JUtility::TColor, JUtility::TColor) const; + + /* 8030393C */ virtual ~J2DPictureEx(); + /* 80307168 */ virtual void setCullBack(bool); + /* 803069D8 */ virtual void setCullBack(_GXCullMode); + /* 803069B8 */ virtual void setAlpha(u8); + /* 80303AB4 */ virtual void drawSelf(f32, f32, f32 (*)[3][4]); + /* 80306A24 */ virtual void isUsed(ResTIMG const*); + /* 803071A4 */ virtual void isUsed(ResFONT const*); + /* 80306A0C */ virtual void rewriteAlpha(); + /* 803071C4 */ virtual void setAnimation(J2DAnmBase*); + /* 80256064 */ virtual void setAnimation(J2DAnmTransform*); + /* 80306AC4 */ virtual void setAnimation(J2DAnmColor*); + /* 80306B1C */ virtual void setAnimation(J2DAnmTexPattern*); + /* 80306AF0 */ virtual void setAnimation(J2DAnmTextureSRTKey*); + /* 80306B48 */ virtual void setAnimation(J2DAnmTevRegKey*); + /* 80306B74 */ virtual void setAnimation(J2DAnmVisibilityFull*); + /* 80306B7C */ virtual void setAnimation(J2DAnmVtxColor*); + /* 80306C70 */ virtual void animationPane(J2DAnmTransform const*); + /* 80303640 */ virtual void initiate(ResTIMG const*, ResTLUT const*); + /* 803039CC */ virtual void prepareTexture(u8); + /* 80306ED4 */ virtual void append(ResTIMG const*, f32); + /* 80303E5C */ virtual void append(ResTIMG const*, JUTPalette*, f32); + /* 80306F04 */ virtual void append(char const*, f32); + /* 80303EA4 */ virtual void append(char const*, JUTPalette*, f32); + /* 80303EEC */ virtual void append(JUTTexture*, f32); + /* 80306FF4 */ virtual void prepend(ResTIMG const*, f32); + /* 80306FC4 */ virtual void prepend(ResTIMG const*, JUTPalette*, f32); + /* 80306F94 */ virtual void prepend(char const*, f32); + /* 80306F64 */ virtual void prepend(char const*, JUTPalette*, f32); + /* 80306F34 */ virtual void prepend(JUTTexture*, f32); + /* 80307058 */ virtual void insert(ResTIMG const*, u8, f32); + /* 80303F34 */ virtual void insert(ResTIMG const*, JUTPalette*, u8, f32); + /* 80307024 */ virtual void insert(char const*, u8, f32); + /* 80303FD8 */ virtual void insert(char const*, JUTPalette*, u8, f32); + /* 80304048 */ virtual void insert(JUTTexture*, u8, f32); + /* 8030446C */ virtual void remove(u8); + /* 80304608 */ virtual void remove(); + /* 8030466C */ virtual void remove(JUTTexture*); + /* 8030708C */ virtual void draw(f32, f32, bool, bool, bool); + /* 8030477C */ virtual void draw(f32, f32, u8, bool, bool, bool); + /* 80304890 */ virtual void draw(f32, f32, f32, f32, bool, bool, bool); + /* 80304D88 */ virtual void drawOut(f32, f32, f32, f32, f32, f32); + /* 803070D0 */ virtual void drawOut(f32, f32, f32, f32, f32, f32, f32, f32); + /* 80304EF0 */ virtual void drawOut(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&); + /* 80305264 */ virtual void load(_GXTexMapID, u8); + /* 80307134 */ virtual void load(u8); + /* 80305ED4 */ virtual void setBlendColorRatio(f32, f32); + /* 80305F34 */ virtual void setBlendAlphaRatio(f32, f32); + /* 80305F94 */ virtual void changeTexture(ResTIMG const*, u8); + /* 803060DC */ virtual void changeTexture(char const*, u8); + /* 80306134 */ virtual void changeTexture(ResTIMG const*, u8, JUTPalette*); + /* 80306298 */ virtual void changeTexture(char const*, u8, JUTPalette*); + /* 803062F8 */ virtual void getTexture(u8) const; + /* 80306350 */ virtual void getTextureCount() const; + /* 80306370 */ virtual void setBlack(JUtility::TColor); + /* 803063F8 */ virtual void setWhite(JUtility::TColor); + /* 80306480 */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor); + /* 803068F8 */ virtual void getBlack() const; + /* 80306958 */ virtual void getWhite() const; + /* 80256034 */ virtual void getMaterial() const; + /* 80303B80 */ virtual void drawFullSet(f32, f32, f32, f32, f32 (*)[3][4]); + /* 80303BDC */ virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16, + s16, f32 (*)[3][4]); + /* 80306DC8 */ virtual void getUsableTlut(u8); + +private: + /* 0x150 */ J2DMaterial* mMaterial; + /* 0x154 */ u16 field_0x154; + /* 0x156 */ u16 field_0x156; + /* 0x158 */ u16 field_0x158[4]; + /* 0x160 */ f32 field_0x160[6]; // related to blend color ratio + /* 0x178 */ f32 field_0x178[6]; // related to blend alpha ratio + /* 0x190 */ u8 field_0x190; + /* 0x194 */ int field_0x194; + /* 0x198 */ int field_0x198; +}; + #endif /* J2DPICTUREEX_H */ diff --git a/include/JSystem/J2DGraph/J2DPrint.h b/include/JSystem/J2DGraph/J2DPrint.h index b4b219dadf..7d92ef4cae 100644 --- a/include/JSystem/J2DGraph/J2DPrint.h +++ b/include/JSystem/J2DGraph/J2DPrint.h @@ -1,6 +1,68 @@ #ifndef J2DPRINT_H #define J2DPRINT_H +#include "JSystem/J2DGraph/J2DTextBox.h" +#include "JSystem/JUtility/TColor.h" +#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h" #include "dolphin/types.h" +class J2DPrint { +public: + struct TSize { + /* 0x0 */ f32 field_0x0; + /* 0x4 */ f32 field_0x4; + }; + + /* 802F4394 */ J2DPrint(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor, + JUtility::TColor, JUtility::TColor); + /* 802F4658 */ static u8* setBuffer(size_t); + /* 802F46C4 */ void setFontSize(); + /* 802F475C */ void locate(f32, f32); + /* 802F4778 */ void print(f32, f32, u8, char const*, ...); + /* 802F4828 */ void printReturn(char const*, f32, f32, J2DTextBoxHBinding, J2DTextBoxVBinding, + f32, f32, u8); + /* 802F4B4C */ void parse(u8 const*, int, int, u16*, J2DPrint::TSize&, u8, bool); + /* 802F52E8 */ void doCtrlCode(int); + /* 802F5410 */ void doEscapeCode(u8 const**, u8); + /* 802F594C */ void initchar(); + /* 802F59C0 */ void getNumberS32(u8 const**, s32, s32, int); + /* 802F5AC4 */ void getNumberF32(u8 const**, f32, f32, int); + + /* 802F4420 */ virtual ~J2DPrint(); + + static const u8* mStrBuff; + static size_t mStrBuffSize; + +private: + /* 802F4468 */ void private_initiate(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor, + JUtility::TColor, JUtility::TColor, bool); + + /* 0x04 */ JUTFont* mFont; + /* 0x08 */ JUtility::TColor field_0x8; + /* 0x0C */ JUtility::TColor field_0xc; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1c; + /* 0x20 */ s16 field_0x20; + /* 0x22 */ u8 field_0x22; + /* 0x24 */ f32 field_0x24; + /* 0x28 */ f32 field_0x28; + /* 0x2C */ f32 field_0x2c; + /* 0x30 */ f32 mCursorV; + /* 0x34 */ f32 field_0x34; + /* 0x38 */ JUtility::TColor field_0x38; + /* 0x3C */ JUtility::TColor field_0x3c; + /* 0x40 */ JUtility::TColor mCharColor; + /* 0x44 */ JUtility::TColor mGradColor; + /* 0x48 */ f32 field_0x48; + /* 0x4C */ f32 field_0x4c; + /* 0x50 */ f32 mFontSizeX; + /* 0x54 */ f32 mFontSizeY; + /* 0x58 */ s16 field_0x58; + /* 0x5A */ u8 field_0x5a; +}; // Size: 0x5C + +f32 J2DPrint_print_alpha_va(J2DPrint*, u8, const char*, va_list); + #endif /* J2DPRINT_H */ diff --git a/include/JSystem/J2DGraph/J2DTevs.h b/include/JSystem/J2DGraph/J2DTevs.h index aa1f85cb8f..1019ffcb7e 100644 --- a/include/JSystem/J2DGraph/J2DTevs.h +++ b/include/JSystem/J2DGraph/J2DTevs.h @@ -1,6 +1,169 @@ #ifndef J2DTEVS_H #define J2DTEVS_H +#include "dolphin/mtx/mtxvec.h" #include "dolphin/types.h" +struct J2DTextureSRTInfo { + /* 0x00 */ f32 field_0x0; + /* 0x04 */ f32 field_0x4; + /* 0x08 */ f32 field_0x8; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ f32 field_0x10; +}; // Size: 0x14 + +struct J2DTexMtxInfo { + /* 0x00 */ u8 field_0x0; + /* 0x01 */ u8 field_0x1; + /* 0x02 */ u8 field_0x2; // padding ? + /* 0x03 */ u8 field_0x3; // padding ? + /* 0x04 */ Vec field_0x4; + /* 0x10 */ J2DTextureSRTInfo mTexSRTInfo; +}; // Size: 0x24 + +class J2DTexMtx { +public: + /* 802E9C90 */ void load(u32); + /* 802E9CC4 */ void calc(); + /* 802E9D2C */ void getTextureMtx(J2DTextureSRTInfo const&, Vec, f32 (*)[4]); + /* 802E9EBC */ void getTextureMtxMaya(J2DTextureSRTInfo const&, f32 (*)[4]); + +private: + /* 0x00 */ J2DTexMtxInfo mTexMtxInfo; + /* 0x24 */ Mtx mTexMtx; +}; + +struct J2DIndTexOrderInfo { + /* 0x0 */ u8 field_0x0; + /* 0x1 */ u8 field_0x1; +}; + +class J2DIndTexOrder { +public: + /* 802EB378 */ J2DIndTexOrder(); + /* 802EA0FC */ void load(u8); + +private: + /* 0x0 */ J2DIndTexOrderInfo mIndTexOrderInfo; +}; + +struct J2DIndTexMtxInfo { + /* 0x00 */ Mtx23 mMtx; + /* 0x18 */ u8 field_0x18; +}; + +class J2DIndTexMtx { +public: + /* 802EB2E4 */ ~J2DIndTexMtx(); + /* 802EB320 */ J2DIndTexMtx(); + /* 802EA098 */ void load(u8); + /* 802E9C90 */ void load(u32); + /* 802E9CC4 */ void calc(); + +private: + /* 0x0 */ J2DIndTexMtxInfo mIndTexMtxInfo; +}; // Size: 0x1C + +struct J2DIndTexCoordScaleInfo { + /* 0x0 */ u8 field_0x0; + /* 0x0 */ u8 field_0x1; +}; + +class J2DIndTexCoordScale { +public: + /* 802EB290 */ ~J2DIndTexCoordScale(); + /* 802EB2CC */ J2DIndTexCoordScale(); + /* 802EA0CC */ void load(u8); + +private: + /* 0x0 */ J2DIndTexCoordScaleInfo mIndTexCoordScaleInfo; +}; // Size: 0x2 + +class J2DIndTevStage { +public: + /* 802EA044 */ void load(u8); + /* 802F18A0 */ J2DIndTevStage(); + +private: + /* 0x0 */ u32 mFlags; +}; + +struct J2DTexCoordInfo { + /* 0x0 */ u8 mTexGenType; + /* 0x1 */ u8 mTexGenSrc; + /* 0x2 */ u8 mTexGenMtx; + u8 padding; // ? +}; + +class J2DTexCoord { +public: + /* 802EB260 */ J2DTexCoord(); + +private: + /* 0x0 */ J2DTexCoordInfo mTexCoordInfo; +}; + +struct J2DTevOrderInfo { + /* 0x0 */ u8 mTexCoord; + /* 0x1 */ u8 mTexMap; + /* 0x2 */ u8 mColor; +}; + +class J2DTevOrder { +public: + /* 802F1B70 */ J2DTevOrder(); + +private: + /* 0x0 */ J2DTevOrderInfo mTevOrderInfo; +}; + +struct J2DTevStageInfo { + /* 0x00 */ u8 field_0x0; + /* 0x01 */ u8 field_0x1; + /* 0x02 */ u8 field_0x2; + /* 0x03 */ u8 field_0x3; + /* 0x04 */ u8 field_0x4; + /* 0x05 */ u8 field_0x5; + /* 0x06 */ u8 field_0x6; + /* 0x07 */ u8 field_0x7; + /* 0x08 */ u8 field_0x8; + /* 0x09 */ u8 field_0x9; + /* 0x0A */ u8 field_0xa; + /* 0x0B */ u8 field_0xb; + /* 0x0C */ u8 field_0xc; + /* 0x0D */ u8 field_0xd; + /* 0x0E */ u8 field_0xe; + /* 0x0F */ u8 field_0xf; + /* 0x10 */ u8 field_0x10; + /* 0x11 */ u8 field_0x11; + /* 0x12 */ u8 field_0x12; +}; + +class J2DTevStage { +public: + /* 802F4110 */ J2DTevStage(J2DTevStageInfo const&); + /* 802F1940 */ J2DTevStage(); + /* 802F19A8 */ void setTevStageInfo(J2DTevStageInfo const&); + +private: + /* 0x0 */ u8 field_0x0; + /* 0x1 */ u8 field_0x1; + /* 0x2 */ u8 field_0x2; + /* 0x3 */ u8 field_0x3; + /* 0x4 */ u8 field_0x4; + /* 0x5 */ u8 field_0x5; + /* 0x6 */ u8 field_0x6; + /* 0x7 */ u8 field_0x7; +}; + +struct J2DTevSwapModeInfo {}; + +class J2DTevSwapModeTable { +public: + /* 802F1934 */ J2DTevSwapModeTable(); + +private: + /* 0x0 */ u8 field_0x0; +}; + #endif /* J2DTEVS_H */ diff --git a/include/JSystem/J2DGraph/J2DTextBoxEx.h b/include/JSystem/J2DGraph/J2DTextBoxEx.h index c958db6518..38e8ff0746 100644 --- a/include/JSystem/J2DGraph/J2DTextBoxEx.h +++ b/include/JSystem/J2DGraph/J2DTextBoxEx.h @@ -1,6 +1,56 @@ #ifndef J2DTEXTBOXEX_H #define J2DTEXTBOXEX_H +#include "JSystem/J2DGraph/J2DMaterial.h" +#include "JSystem/J2DGraph/J2DPrint.h" +#include "JSystem/J2DGraph/J2DTextBox.h" #include "dolphin/types.h" +class J2DTextBoxEx : public J2DTextBox { +public: + enum stage_enum {}; + + /* 803071E4 */ J2DTextBoxEx(J2DPane*, JSURandomInputStream*, u32, J2DMaterial*); + /* 80307E0C */ void setTevOrder(bool); + /* 80307EF0 */ void setTevStage(bool); + /* 80307F94 */ void setStage(J2DTevStage*, J2DTextBoxEx::stage_enum); + /* 803084CC */ void getBlackWhite(JUtility::TColor*, JUtility::TColor*) const; + /* 80308668 */ void isSetBlackWhite(JUtility::TColor, JUtility::TColor) const; + + /* 8030751C */ virtual ~J2DTextBoxEx(); + /* 803089EC */ virtual void setCullBack(bool); + /* 803087DC */ virtual void setCullBack(_GXCullMode); + /* 803087BC */ virtual void setAlpha(u8); + /* 803075AC */ virtual void drawSelf(f32, f32, f32 (*)[3][4]); + /* 80308A28 */ virtual void isUsed(ResTIMG const*); + /* 80308828 */ virtual void isUsed(ResFONT const*); + /* 80308810 */ virtual void rewriteAlpha(); + /* 80308A4C */ virtual void setAnimation(J2DAnmBase*); + /* 80256044 */ virtual void setAnimation(J2DAnmTransform*); + /* 803088B4 */ virtual void setAnimation(J2DAnmColor*); + /* 8030890C */ virtual void setAnimation(J2DAnmTexPattern*); + /* 803088E0 */ virtual void setAnimation(J2DAnmTextureSRTKey*); + /* 80308938 */ virtual void setAnimation(J2DAnmTevRegKey*); + /* 80308964 */ virtual void setAnimation(J2DAnmVisibilityFull*); + /* 80308A48 */ virtual void setAnimation(J2DAnmVtxColor*); + /* 8030896C */ virtual void animationPane(J2DAnmTransform const*); + /* 803078AC */ virtual void draw(f32, f32); + /* 80307AF0 */ virtual void draw(f32, f32, f32, J2DTextBoxHBinding); + /* 80307D5C */ virtual void setFont(JUTFont*); + /* 80307DC0 */ virtual void getFont() const; + /* 8030823C */ virtual void setBlack(JUtility::TColor); + /* 803082C4 */ virtual void setWhite(JUtility::TColor); + /* 8030834C */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor); + /* 803086FC */ virtual void getBlack() const; + /* 8030875C */ virtual void getWhite() const; + /* 80256024 */ virtual void getMaterial() const; + +private: + /* 0x134 */ u8 field_0x134[4]; + /* 0x138 */ J2DMaterial* mMaterial; + /* 0x13C */ u16 field_0x13c; + /* 0x13E */ u16 field_0x13e; + /* 0x140 */ u8 field_0x140; +}; // Size: 0x144 + #endif /* J2DTEXTBOXEX_H */ diff --git a/include/JSystem/J2DGraph/J2DWindowEx.h b/include/JSystem/J2DGraph/J2DWindowEx.h index 262c2486a9..e5f7e29f8a 100644 --- a/include/JSystem/J2DGraph/J2DWindowEx.h +++ b/include/JSystem/J2DGraph/J2DWindowEx.h @@ -1,6 +1,68 @@ #ifndef J2DWINDOWEX_H #define J2DWINDOWEX_H +#include "JSystem/J2DGraph/J2DMaterial.h" +#include "JSystem/J2DGraph/J2DWindow.h" #include "dolphin/types.h" +class J2DWindowEx : public J2DWindow { +public: + enum stage_enum {}; + + /* 80300C94 */ J2DWindowEx(J2DPane*, JSURandomInputStream*, u32, J2DMaterial*); + /* 80300F80 */ void setMinSize(); + /* 803012CC */ void draw_private(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&); + /* 80301D74 */ void drawFrameTexture(f32, f32, f32, f32, u16, u16, u16, u16, J2DMaterial*, + bool); + /* 80302284 */ void setTevOrder(bool); + /* 80302388 */ void setTevStage(bool); + /* 803024B4 */ void setStage(J2DTevStage*, J2DWindowEx::stage_enum); + /* 80302A4C */ void getBlackWhite(JUtility::TColor*, JUtility::TColor*) const; + /* 80302BE8 */ void isSetBlackWhite(JUtility::TColor, JUtility::TColor) const; + /* 8030321C */ void isNeedSetAnm(u8); + + /* 80301144 */ virtual ~J2DWindowEx(); + /* 803035C0 */ virtual void setCullBack(bool); + /* 80302D98 */ virtual void setCullBack(_GXCullMode); + /* 80302D48 */ virtual void setAlpha(u8); + /* 8030122C */ virtual void drawSelf(f32, f32, f32 (*)[3][4]); + /* 80302EDC */ virtual void isUsed(ResTIMG const*); + /* 803035FC */ virtual void isUsed(ResFONT const*); + /* 80302DF4 */ virtual void rewriteAlpha(); + /* 8030361C */ virtual void setAnimation(J2DAnmBase*); + /* 80256084 */ virtual void setAnimation(J2DAnmTransform*); + /* 80302FFC */ virtual void setAnimation(J2DAnmColor*); + /* 8030310C */ virtual void setAnimation(J2DAnmTexPattern*); + /* 80303084 */ virtual void setAnimation(J2DAnmTextureSRTKey*); + /* 80303194 */ virtual void setAnimation(J2DAnmTevRegKey*); + /* 80303274 */ virtual void setAnimation(J2DAnmVisibilityFull*); + /* 8030327C */ virtual void setAnimation(J2DAnmVtxColor*); + /* 80303370 */ virtual void animationPane(J2DAnmTransform const*); + /* 80301FC8 */ virtual void draw(JGeometry::TBox2<f32> const&); + /* 80302164 */ virtual void draw(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&); + /* 80303568 */ virtual void draw(f32, f32, f32, f32); + /* 80302764 */ virtual void setBlack(JUtility::TColor); + /* 803027EC */ virtual void setWhite(JUtility::TColor); + /* 80302874 */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor); + /* 80302C88 */ virtual void getBlack() const; + /* 80302CE8 */ virtual void getWhite() const; + /* 80302E0C */ virtual void getFrameTexture(u8, u8) const; + /* 80302E74 */ virtual void getContentsTexture(u8) const; + /* 8030353C */ virtual void getMaterial(J2DWindow::TMaterial&) const; + /* 80303510 */ virtual void getFrameMaterial(u8) const; + /* 80303534 */ virtual void getContentsMaterial() const; + /* 80301994 */ virtual void drawContents(JGeometry::TBox2<f32> const&); + +private: + /* 0x148 */ J2DMaterial* mFrameMaterial[4]; + /* 0x158 */ u16 field_0x158[4]; + /* 0x160 */ J2DMaterial* mContentsMaterial; + /* 0x164 */ u16 field_0x164; + /* 0x166 */ u16 field_0x166; + /* 0x168 */ u16 field_0x168[4]; + /* 0x170 */ u8 field_0x170; + /* 0x174 */ J2DAnmVisibilityFull* mAnmVisibilityFull; + /* 0x178 */ J2DAnmVtxColor* mAnmVtxColor; +}; + #endif /* J2DWINDOWEX_H */ |
