diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2022-08-30 14:22:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-30 15:22:17 -0600 |
| commit | f8979749e3ef8e8cacf2ea8f474c7f23fc5cb6b3 (patch) | |
| tree | 69659df2105266e9b26a4d50b9a2d610b3e437a2 /include/JSystem/J2DGraph/J2DTextBox.h | |
| parent | bc30d007e11458a198c5725626a10bb06a5da536 (diff) | |
j2d / map_path work, d_drawlist / d_attention cleanup (#208)
* work on fop actor / actor mng, daalink, d_a_obj_item
* d_a_title mostly decompiled
* daalink / d_event / JMessage / dmsg_out_font work
* msg_scrn_base / msg_scrn_boss
* some work on mDo machine, d_menu_save, d_tresure, and various
* remove asm
* progress
* finish d_menu_save / d_pane_class_alpha / d_pane_class / rename some data
* rename more data
* remove asm / progress
* match all of d_pane_class
* fixes / some dKankyo doc
* bunch of j2d work. d_drawlist / d_attention cleanup
* progress / asm
* cleanup wip
* decompile JStage
* setup some more JStudio structs
* set up d_demo classes
* some d_demo work
* cleanup dolphin os stuff
* some initial dEvent documentation
* some At collision documentation
* match JUTConsole::doDraw
* dbgs work / split up some of d_a_alink into .inc files
* d_a_alink_spinner work
Diffstat (limited to 'include/JSystem/J2DGraph/J2DTextBox.h')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DTextBox.h | 54 |
1 files changed, 43 insertions, 11 deletions
diff --git a/include/JSystem/J2DGraph/J2DTextBox.h b/include/JSystem/J2DGraph/J2DTextBox.h index 6535cfc1eb..67d1d663d3 100644 --- a/include/JSystem/J2DGraph/J2DTextBox.h +++ b/include/JSystem/J2DGraph/J2DTextBox.h @@ -17,6 +17,29 @@ enum J2DTextBoxHBinding { /* 0x2 */ HBIND_LEFT }; +struct J2DTbxBlockHeader { + /* 0x00 */ u32 mTag; + /* 0x04 */ s32 mSize; +}; + +struct J2DTextBoxInfo { + /* 0x00 */ u16 field_0x0; + /* 0x02 */ u16 field_0x2; + /* 0x04 */ u16 mMaterialNum; + /* 0x06 */ s16 mCharSpace; + /* 0x08 */ s16 mLineSpace; + /* 0x0A */ u16 mFontSizeX; + /* 0x0C */ u16 mFontSizeY; + /* 0x0E */ u8 mHBind; + /* 0x0F */ u8 mVBind; + /* 0x10 */ u32 mCharColor; + /* 0x14 */ u32 mGradColor; + /* 0x18 */ u8 mConnected; + /* 0x19 */ char field_0x19[3]; + /* 0x1C */ u16 field_0x1c; + /* 0x1E */ u16 field_0x1e; +}; // Size: 0x20 + class J2DTextBox : public J2DPane { public: struct TFontSize { @@ -33,13 +56,13 @@ public: /* 80300C70 */ virtual bool isUsed(ResTIMG const*); /* 80300BFC */ virtual bool isUsed(ResFONT const*); /* 80300C90 */ virtual void rewriteAlpha(); - /* 80300490 */ virtual void draw(f32, f32, f32, J2DTextBoxHBinding); /* 803002E8 */ virtual void draw(f32, f32); + /* 80300490 */ virtual void draw(f32, f32, f32, J2DTextBoxHBinding); /* 80300278 */ virtual void setFont(JUTFont*); /* 8021C7F4 */ virtual JUTFont* getFont() const; /* 80254408 */ virtual bool setBlack(JUtility::TColor); - /* 80186C84 */ virtual void setWhite(JUtility::TColor); - /* 8019230C */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor); + /* 80186C84 */ virtual bool setWhite(JUtility::TColor); + /* 8019230C */ virtual bool setBlackWhite(JUtility::TColor, JUtility::TColor); /* 801DFA34 */ virtual JUtility::TColor getBlack() const; /* 801DFA28 */ virtual JUtility::TColor getWhite() const; /* 8025602C */ virtual bool getMaterial() const; @@ -63,7 +86,7 @@ public: } else { x = 0.0f; } - field_0x11c = x; + mFontSizeX = x; f32 y; if (sizeY > 0.0f) { @@ -71,13 +94,13 @@ public: } else { y = 0.0f; } - field_0x120 = y; + mFontSizeY = y; } void setFontSize(TFontSize size) { setFontSize(size.mSizeX, size.mSizeY); } void getFontSize(TFontSize& size) const { - size.mSizeX = field_0x11c; - size.mSizeY = field_0x120; + size.mSizeX = mFontSizeX; + size.mSizeY = mFontSizeY; } void setCharSpace(f32 space) { mCharSpacing = space; } @@ -85,7 +108,15 @@ public: void setLineSpace(f32 space) { mLineSpacing = space; } f32 getLineSpace() const { return mLineSpacing; } -private: + J2DTextBoxVBinding getVBinding() const { + return (J2DTextBoxVBinding)(mFlags & 3); + } + + J2DTextBoxHBinding getHBinding() const { + return (J2DTextBoxHBinding)((mFlags >> 2) & 3); + } + +// private: /* 0x0100 */ JUTFont* mFont; /* 0x0104 */ JUtility::TColor mCharColor; /* 0x0108 */ JUtility::TColor mGradientColor; @@ -93,14 +124,15 @@ private: /* 0x0110 */ f32 field_0x110; /* 0x0114 */ f32 mCharSpacing; /* 0x0118 */ f32 mLineSpacing; - /* 0x011C */ f32 field_0x11c; - /* 0x0120 */ f32 field_0x120; + /* 0x011C */ f32 mFontSizeX; + /* 0x0120 */ f32 mFontSizeY; /* 0x0124 */ char* mStringPtr; /* 0x0128 */ JUtility::TColor mWhiteColor; /* 0x012C */ JUtility::TColor mBlackColor; /* 0x0130 */ u8 mFlags; /* 0x0131 */ bool mTextFontOwned; /* 0x0132 */ s16 mStringLength; -}; + /* 0x0134 */ u8 field_0x134[4]; +}; // Size: 0x138 #endif /* J2DTEXTBOX_H */ |
