summaryrefslogtreecommitdiff
path: root/include/JSystem/J2DGraph
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2021-08-28 07:25:03 -0700
committerGitHub <noreply@github.com>2021-08-28 16:25:03 +0200
commitdaf45f768d9ae091a97dce1be8d048ac2b7bd54c (patch)
tree138798649ad35cb95ff5a0dd49bc7884ed6cdff0 /include/JSystem/J2DGraph
parente14b04c54a40e95f0117df44f1186f2d44799ac7 (diff)
move J2D / JUTResFont (#144)
* move some JSystem and meter2_info stuff * more J2D / JUTTexture / JUTPalette * setup dScnKy_env_light_c
Diffstat (limited to 'include/JSystem/J2DGraph')
-rw-r--r--include/JSystem/J2DGraph/J2DAnimation.h81
-rw-r--r--include/JSystem/J2DGraph/J2DGrafContext.h22
-rw-r--r--include/JSystem/J2DGraph/J2DManage.h12
-rw-r--r--include/JSystem/J2DGraph/J2DMaterial.h19
-rw-r--r--include/JSystem/J2DGraph/J2DPane.h129
-rw-r--r--include/JSystem/J2DGraph/J2DPicture.h108
-rw-r--r--include/JSystem/J2DGraph/J2DScreen.h58
-rw-r--r--include/JSystem/J2DGraph/J2DTextBox.h66
8 files changed, 495 insertions, 0 deletions
diff --git a/include/JSystem/J2DGraph/J2DAnimation.h b/include/JSystem/J2DGraph/J2DAnimation.h
index 3c13cd5f26..8f79a04d04 100644
--- a/include/JSystem/J2DGraph/J2DAnimation.h
+++ b/include/JSystem/J2DGraph/J2DAnimation.h
@@ -1,6 +1,87 @@
#ifndef J2DANIMATION_H
#define J2DANIMATION_H
+#include "dolphin/gx/GXTexture.h"
#include "dolphin/types.h"
+struct J3DTransformInfo;
+struct J3DTextureSRTInfo;
+class J2DScreen;
+
+struct J2DAnmVtxColorKey {
+ /* 8030B704 */ void getColor(u8, u16, _GXColor*) const;
+ /* 8030CC20 */ ~J2DAnmVtxColorKey();
+};
+
+struct J2DAnmVtxColorFull {
+ /* 8030B4C4 */ void getColor(u8, u16, _GXColor*) const;
+ /* 8030CC8C */ ~J2DAnmVtxColorFull();
+};
+
+struct J2DAnmVisibilityFull {
+ /* 8030C048 */ void getVisibility(u16, u8*) const;
+};
+
+struct J2DAnmTransformKey {
+ /* 801959C0 */ ~J2DAnmTransformKey();
+ /* 8030AAFC */ void calcTransform(f32, u16, J3DTransformInfo*) const;
+ /* 8030CD7C */ void getTransform(u16, J3DTransformInfo*) const;
+};
+
+struct J2DAnmTransformFull {
+ /* 8030A590 */ void getTransform(u16, J3DTransformInfo*) const;
+ /* 8030CDAC */ ~J2DAnmTransformFull();
+};
+
+struct J2DAnmTextureSRTKey {
+ /* 80184274 */ ~J2DAnmTextureSRTKey();
+ /* 8030B9F0 */ void calcTransform(f32, u16, J3DTextureSRTInfo*) const;
+ /* 8030BC60 */ void searchUpdateMaterialID(J2DScreen*);
+};
+
+struct J2DAnmTexPattern {
+ struct J2DAnmTexPatternTIMGPointer {
+ /* 8030CB2C */ J2DAnmTexPatternTIMGPointer();
+ /* 8030CB3C */ ~J2DAnmTexPatternTIMGPointer();
+ };
+
+ /* 8030BD10 */ void searchUpdateMaterialID(J2DScreen*);
+ /* 8030BEE8 */ void getTexNo(u16, u16*) const;
+ /* 8030BF9C */ void getResTIMG(u16) const;
+ /* 8030BFF0 */ void getPalette(u16) const;
+ /* 8030CB90 */ ~J2DAnmTexPattern();
+};
+
+struct J2DAnmTevRegKey {
+ /* 801841EC */ ~J2DAnmTevRegKey();
+ /* 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();
+};
+
+struct J2DAnmColor {
+ /* 801842FC */ ~J2DAnmColor();
+ /* 802EB390 */ void getColor(u16, _GXColor*) const;
+ /* 8030AF24 */ void searchUpdateMaterialID(J2DScreen*);
+};
+
+struct J2DAnmBase {
+ /* 80053C94 */ ~J2DAnmBase();
+ /* 800569B0 */ void searchUpdateMaterialID(J2DScreen*);
+};
+
+struct J2DAnmVtxColor {};
+
+struct J2DAnmTransform {};
+
#endif /* J2DANIMATION_H */
diff --git a/include/JSystem/J2DGraph/J2DGrafContext.h b/include/JSystem/J2DGraph/J2DGrafContext.h
index de1fca9aaa..5a8d084bdc 100644
--- a/include/JSystem/J2DGraph/J2DGrafContext.h
+++ b/include/JSystem/J2DGraph/J2DGrafContext.h
@@ -1,6 +1,28 @@
#ifndef J2DGRAFCONTEXT_H
#define J2DGRAFCONTEXT_H
+#include "JSystem/JGeometry.h"
+#include "JSystem/JUtility.h"
#include "dolphin/types.h"
+struct J2DGrafContext {
+ /* 802E8B08 */ J2DGrafContext(f32, f32, f32, f32);
+ /* 802E8BB4 */ void setPort();
+ /* 802E8C44 */ void setup2D();
+ /* 802E8E20 */ void setScissor();
+ /* 802E90C0 */ void scissor(JGeometry::TBox2<f32> const&);
+ /* 802E90E4 */ void place(JGeometry::TBox2<f32> const&);
+ /* 802E961C */ void place(f32, f32, f32, f32);
+ /* 802E9118 */ void setColor(JUtility::TColor, JUtility::TColor, JUtility::TColor,
+ JUtility::TColor);
+ /* 802E9234 */ void setLineWidth(u8);
+ /* 802E9260 */ void fillBox(JGeometry::TBox2<f32> const&);
+ /* 802E9368 */ void drawFrame(JGeometry::TBox2<f32> const&);
+ /* 802E9488 */ void line(JGeometry::TVec2<f32>, JGeometry::TVec2<f32>);
+ /* 802E9564 */ void lineTo(JGeometry::TVec2<f32>);
+ /* 802E95D4 */ ~J2DGrafContext();
+ /* 802E9664 */ bool getGrafType() const;
+ /* 802E966C */ void setLookat();
+};
+
#endif /* J2DGRAFCONTEXT_H */
diff --git a/include/JSystem/J2DGraph/J2DManage.h b/include/JSystem/J2DGraph/J2DManage.h
index b17c623296..6222e2139b 100644
--- a/include/JSystem/J2DGraph/J2DManage.h
+++ b/include/JSystem/J2DGraph/J2DManage.h
@@ -1,6 +1,18 @@
#ifndef J2DMANAGE_H
#define J2DMANAGE_H
+#include "JSystem/JSupport/JSUInputStream.h"
#include "dolphin/types.h"
+struct J2DResReference {
+ /* 8030CF10 */ void getResReference(u16) const;
+ /* 8030CF44 */ void getName(u16) const;
+};
+
+class J2DDataManage {
+public:
+ /* 8030CE18 */ void get(char const*);
+ /* 8030CE7C */ void get(JSUInputStream*);
+};
+
#endif /* J2DMANAGE_H */
diff --git a/include/JSystem/J2DGraph/J2DMaterial.h b/include/JSystem/J2DGraph/J2DMaterial.h
index 767753657c..065484c208 100644
--- a/include/JSystem/J2DGraph/J2DMaterial.h
+++ b/include/JSystem/J2DGraph/J2DMaterial.h
@@ -1,6 +1,25 @@
#ifndef J2DMATERIAL_H
#define J2DMATERIAL_H
+#include "JSystem/J2DGraph/J2DAnimation.h"
#include "dolphin/types.h"
+struct J2DMaterial {
+ struct J2DMaterialAnmPointer {
+ /* 802EA79C */ J2DMaterialAnmPointer();
+ };
+
+ /* 802EA1AC */ J2DMaterial();
+ /* 802EA2CC */ ~J2DMaterial();
+ /* 802EA38C */ void setGX();
+ /* 802EA410 */ void createTevBlock(int, bool);
+ /* 802EA5C4 */ void createIndBlock(int, bool);
+ /* 802EA84C */ void makeAnmPointer();
+ /* 802EA94C */ void setAnimation(J2DAnmTextureSRTKey*);
+ /* 802EAA2C */ void setAnimation(J2DAnmTexPattern*);
+ /* 802EAB0C */ void setAnimation(J2DAnmTevRegKey*);
+ /* 802EA89C */ void setAnimation(J2DAnmColor*);
+ /* 802EAC78 */ void animation();
+};
+
#endif /* J2DMATERIAL_H */
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h
index aa1cd96a7e..093b44ff94 100644
--- a/include/JSystem/J2DGraph/J2DPane.h
+++ b/include/JSystem/J2DGraph/J2DPane.h
@@ -1,6 +1,135 @@
#ifndef J2DPANE_H
#define J2DPANE_H
+#include "JSystem/J2DGraph/J2DAnimation.h"
+#include "JSystem/J2DGraph/J2DGrafContext.h"
+#include "JSystem/JGeometry.h"
+#include "JSystem/JKernel/JKRArchive.h"
+#include "JSystem/JSupport/JSUList.h"
+#include "JSystem/JSupport/JSURandomInputStream.h"
+#include "JSystem/JUtility/JUTFont.h"
+#include "JSystem/JUtility/JUTResFont.h"
+#include "JSystem/JUtility/JUTTexture.h"
+#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"
+class J2DScreen;
+
+enum J2DRotateAxis {
+ /* 0x78 */ ROTATE_X = 'x',
+ /* 0x79 */ ROTATE_Y = 'y',
+ /* 0x7A */ ROTATE_Z = 'z'
+};
+
+enum J2DBasePosition {};
+
+class J2DPane {
+public:
+ J2DPane();
+ J2DPane(J2DPane*, bool, u64, const JGeometry::TBox2<f32>&);
+ J2DPane(u64, const JGeometry::TBox2<f32>&);
+ J2DPane(J2DPane* other, JSURandomInputStream* stream, u8 arg3);
+ virtual ~J2DPane();
+
+ /* 0x0c */ virtual s32 getTypeID() const;
+ /* 0x10 */ virtual void move(f32 x, f32 y);
+ /* 0x14 */ virtual void add(f32 x, f32 y);
+ /* 0x18 */ virtual void resize(f32 x, f32 y);
+ /* 0x1c */ virtual void setCullBack(bool cull);
+ /* 0x20 */ virtual void setCullBack(_GXCullMode cmode);
+ /* 0x24 */ virtual void setAlpha(u8);
+ /* 0x28 */ virtual bool setConnectParent(bool connected);
+ /* 0x2c */ virtual void calcMtx();
+ /* 0x30 */ virtual void update();
+ /* 0x34 */ virtual void drawSelf(f32 arg1, f32 arg2);
+ /* 0x38 */ virtual void drawSelf(f32 arg1, f32 arg2, Mtx* mtx);
+ /* 0x3c */ virtual const J2DPane* search(u64 tag);
+ /* 0x40 */ virtual const J2DPane* searchUserInfo(u64 tag);
+ /* 0x44 */ virtual void makeMatrix(f32, f32);
+ /* 0x48 */ virtual void makeMatrix(f32 a, f32 b, f32 c, f32 d);
+ /* 0x4c */ virtual bool isUsed(const ResTIMG* timg);
+ /* 0x50 */ virtual bool isUsed(const ResFONT* font);
+ /* 0x54 */ virtual void clearAnmTransform();
+ /* 0x58 */ virtual void rewriteAlpha();
+ /* 0x5c */ virtual void setAnimation(J2DAnmBase* anm);
+ /* 0x60 */ virtual void setAnimation(J2DAnmTransform* anm);
+ /* 0x64 */ virtual void setAnimation(J2DAnmColor* anm);
+ /* 0x68 */ virtual void setAnimation(J2DAnmTexPattern* anm);
+ /* 0x6c */ virtual void setAnimation(J2DAnmTextureSRTKey* anm);
+ /* 0x70 */ virtual void setAnimation(J2DAnmTevRegKey* anm);
+ /* 0x74 */ virtual void setAnimation(J2DAnmVisibilityFull* anm);
+ /* 0x78 */ virtual void setAnimation(J2DAnmVtxColor* anm);
+ /* 0x7c */ virtual const J2DAnmTransform* animationTransform(const J2DAnmTransform* transform);
+ /* 0x80 */ virtual void setVisibileAnimation(J2DAnmVisibilityFull* visibility);
+ /* 0x84 */ virtual void setAnimationVF(J2DAnmVisibilityFull* visibility);
+ /* 0x88 */ virtual void setVtxColorAnimation(J2DAnmVtxColor* vtx_color);
+ /* 0x8c */ virtual void setAnimationVC(J2DAnmVtxColor* vtx_color);
+ /* 0x90 */ virtual const J2DAnmTransform* animationPane(const J2DAnmTransform* transform);
+
+ f32 getHeight() const { return mBounds.getHeight(); }
+ f32 getWidth() const { return mBounds.getWidth(); }
+ JSUTree<J2DPane>* getFirstChild() { return mPaneTree.getFirstChild(); }
+ const JSUTree<J2DPane>* getPaneTree() { return &mPaneTree; }
+
+ void initiate();
+ void initialize(J2DPane*, bool, u64, const JGeometry::TBox2<f32>&);
+ void initialize(u64 tag, const JGeometry::TBox2<f32>& dim);
+ void makePaneStream(J2DPane* other, JSURandomInputStream* stream);
+ void changeUseTrans(J2DPane* other);
+ bool appendChild(J2DPane* child);
+ bool insertChild(J2DPane* before, J2DPane* child);
+ void draw(f32 a1, f32 a2, const J2DGrafContext* ctx, bool a4, bool a5);
+ void place(const JGeometry::TBox2<f32>& dim);
+ JGeometry::TBox2<f32>& getBounds();
+ void rotate(f32 offsetX, f32 offsetY, J2DRotateAxis axis, f32 angle);
+ void rotate(f32 angle);
+ void clip(const JGeometry::TBox2<f32>& bounds);
+ void setBasePosition(J2DBasePosition position);
+ void setInfluencedAlpha(bool arg1, bool arg2);
+ void getGlbVtx(u8 arg1) const;
+ const J2DPane* getFirstChildPane();
+ const J2DPane* getNextChildPane();
+ const J2DPane* getParentPane();
+ void makePaneExStream(J2DPane* other, JSURandomInputStream* stream);
+ static s16 J2DCast_F32_to_S16(f32 value, u8 arg2);
+ void* getPointer(JSURandomInputStream* stream, u32 size, JKRArchive* archive);
+ void animationTransform();
+ void updateTransform(const J2DAnmTransform* transform);
+
+ static f32 static_mBounds[4];
+
+public:
+ /* 0x04 */ u16 _4;
+ /* 0x06 */ u8 _6[2];
+ /* 0x08 */ int id;
+ /* 0x0C */ u8 _c[4];
+ /* 0x10 */ u64 mInfoTag;
+ /* 0x18 */ u64 mUserInfoTag;
+ /* 0x20 */ JGeometry::TBox2<f32> mBounds;
+ /* 0x30 */ JGeometry::TBox2<f32> mGlobalBounds;
+ /* 0x40 */ JGeometry::TBox2<f32> mClipRect;
+ /* 0x50 */ Mtx mPositionMtx;
+ /* 0x80 */ Mtx mGlobalMtx;
+ /* 0xB0 */ bool mVisible;
+ /* 0xB1 */ u8 mCullMode;
+ /* 0xB2 */ u8 mAlpha;
+ /* 0xB3 */ u8 mColorAlpha;
+ /* 0xB4 */ bool mIsInfluencedAlpha;
+ /* 0xB5 */ bool mConnected;
+ /* 0xB6 */ char mRotAxis;
+ /* 0xB7 */ u8 mBasePosition;
+ /* 0xB8 */ f32 mRotateX;
+ /* 0xBC */ f32 mRotateY;
+ /* 0xC0 */ f32 mRotateZ;
+ /* 0xC4 */ f32 mRotateOffsetX;
+ /* 0xC8 */ f32 mRotateOffsetY;
+ /* 0xCC */ f32 mScaleX;
+ /* 0xD0 */ f32 mScaleY;
+ /* 0xD4 */ f32 mTranslateX;
+ /* 0xD8 */ f32 mTranslateY;
+ /* 0xDC */ JSUTree<J2DPane> mPaneTree;
+ /* 0xF8 */ const J2DAnmTransform* mTransform;
+ /* 0xFC */ u32 _fc;
+};
+
#endif /* J2DPANE_H */
diff --git a/include/JSystem/J2DGraph/J2DPicture.h b/include/JSystem/J2DGraph/J2DPicture.h
index 8eed8588ed..2dca4ac374 100644
--- a/include/JSystem/J2DGraph/J2DPicture.h
+++ b/include/JSystem/J2DGraph/J2DPicture.h
@@ -1,6 +1,114 @@
#ifndef J2DPICTURE_H
#define J2DPICTURE_H
+#include "JSystem/J2DGraph/J2DPane.h"
+#include "JSystem/J2DGraph/J2DScreen.h"
+#include "JSystem/JUtility/JUTTexture.h"
#include "dolphin/types.h"
+enum J2DMirror {
+ /* 0x0 */ MIRROR0, // temp, figure out later
+};
+
+enum J2DBinding {
+ /* 0xF */ BIND15 = 15, // temp, figure out later
+};
+
+class J2DPicture : public J2DPane {
+public:
+ /* 802FCFF0 */ virtual ~J2DPicture();
+ /* 802FF2E8 */ virtual s32 getTypeID() const;
+ /* 802FDB28 */ virtual void drawSelf(f32, f32);
+ /* 802FDB90 */ virtual void drawSelf(f32, f32, Mtx*);
+ /* 802FF09C */ virtual bool isUsed(ResTIMG const*);
+ /* 802FF63C */ virtual bool isUsed(ResFONT const*);
+ /* 802FF65C */ virtual void rewriteAlpha();
+ /* 802FCCDC */ virtual void initiate(ResTIMG const*, ResTLUT const*);
+ /* 802FD098 */ virtual bool prepareTexture(u8);
+ /* 801BDD40 */ virtual void append(ResTIMG const*, f32);
+ /* 802FF238 */ virtual void append(ResTIMG const*, JUTPalette*, f32);
+ /* 80020338 */ virtual void append(char const*, f32);
+ /* 802FF2F0 */ virtual void append(char const*, JUTPalette*, f32);
+ /* 802FF208 */ virtual void append(JUTTexture*, f32);
+ /* 802FF3E0 */ virtual void prepend(ResTIMG const*, f32);
+ /* 802FF3B0 */ virtual void prepend(ResTIMG const*, JUTPalette*, f32);
+ /* 802FF380 */ virtual void prepend(char const*, f32);
+ /* 802FF350 */ virtual void prepend(char const*, JUTPalette*, f32);
+ /* 802FF320 */ virtual void prepend(JUTTexture*, f32);
+ /* 801BDD70 */ virtual void insert(ResTIMG const*, u8, f32);
+ /* 802FD168 */ virtual void insert(ResTIMG const*, JUTPalette*, u8, f32);
+ /* 80020368 */ virtual void insert(char const*, u8, f32);
+ /* 802FD4B4 */ virtual void insert(char const*, JUTPalette*, u8, f32);
+ /* 802FD524 */ virtual void insert(JUTTexture*, u8, f32);
+ /* 802FD6F4 */ virtual int remove(u8);
+ /* 802FF410 */ virtual int remove();
+ /* 802FD814 */ virtual void remove(JUTTexture*);
+ /* 802FF4E0 */ virtual void draw(f32, f32, bool, bool, bool);
+ /* 802FF448 */ virtual void draw(f32, f32, u8, bool, bool, bool);
+ /* 802FDC70 */ virtual void draw(f32, f32, f32, f32, bool, bool, bool);
+ /* 802FF588 */ virtual void drawOut(f32, f32, f32, f32, f32, f32);
+ /* 802FF524 */ virtual void drawOut(f32, f32, f32, f32, f32, f32, f32, f32);
+ /* 802FDF88 */ virtual void drawOut(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
+ /* 802FF29C */ virtual void load(_GXTexMapID, u8);
+ /* 802FF268 */ virtual void load(u8);
+ /* 800202CC */ virtual void setBlendRatio(f32, f32);
+ /* 802FEA74 */ virtual void setBlendColorRatio(f32, f32);
+ /* 802FEA9C */ virtual void setBlendAlphaRatio(f32, f32);
+ /* 802FD874 */ virtual void changeTexture(ResTIMG const*, u8);
+ /* 802FD964 */ virtual void changeTexture(char const*, u8);
+ /* 802FD9BC */ virtual void changeTexture(ResTIMG const*, u8, JUTPalette*);
+ /* 802FDAC8 */ virtual void changeTexture(char const*, u8, JUTPalette*);
+ /* 800539DC */ virtual void getTexture(u8) const;
+ /* 802FF634 */ virtual u8 getTextureCount() const;
+ /* 80053C6C */ virtual void setBlack(JUtility::TColor);
+ /* 80053C44 */ virtual void setWhite(JUtility::TColor);
+ /* 8018BEE0 */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor);
+ /* 801DFA4C */ virtual void getBlack() const;
+ /* 801DFA40 */ virtual void getWhite() const;
+ /* 8025603C */ virtual bool getMaterial() const;
+ /* 802FDBFC */ virtual void drawFullSet(f32, f32, f32, f32, Mtx*);
+ /* 802FE380 */ virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16,
+ s16, Mtx*);
+ /* 802FF100 */ virtual void getUsableTlut(u8);
+
+ /* 802FC800 */ J2DPicture(u64, JGeometry::TBox2<f32> const&, ResTIMG const*, ResTLUT const*);
+ /* 802FC708 */ J2DPicture(ResTIMG const*);
+ /* 802FC118 */ J2DPicture(J2DPane*, JSURandomInputStream*, JKRArchive*);
+ /* 802FC050 */ J2DPicture();
+ /* 802FC1D4 */ J2DPicture(J2DPane*, JSURandomInputStream*, J2DMaterial*);
+ /* 802FC8E8 */ void private_readStream(J2DPane*, JSURandomInputStream*, JKRArchive*);
+ /* 802FCD70 */ void private_initiate(ResTIMG const*, ResTLUT const*);
+ /* 802FCE9C */ void initinfo();
+ /* 802FE5D0 */ void setTevMode();
+ /* 802FEA60 */ static void swap(f32&, f32&);
+ /* 802FEAC4 */ void setBlendKonstColor();
+ /* 802FEB94 */ void setBlendKonstAlpha();
+ /* 802FEC64 */ void getNewColor(JUtility::TColor*);
+ /* 802FED84 */ void setTexCoord(JGeometry::TVec2<s16>*, JUTTexture const*, J2DBinding,
+ J2DMirror, bool);
+ /* 802FED44 */ void setTexCoord(JUTTexture const*, J2DBinding, J2DMirror, bool);
+ /* 802FF1D0 */ u8 getTlutID(ResTIMG const*, u8);
+
+ void setCornerColor(JUtility::TColor c0, JUtility::TColor c1, JUtility::TColor c2,
+ JUtility::TColor c3) {
+ mCornerColor[0] = c0;
+ mCornerColor[1] = c1;
+ mCornerColor[2] = c2;
+ mCornerColor[3] = c3;
+ }
+
+private:
+ /* 0x100 */ JUTTexture* mTexture[2];
+ /* 0x108 */ u8 mTextureCount;
+ /* 0x109 */ u8 field_0x109;
+ /* 0x10A */ JGeometry::TVec2<s16> field_0x10a[4];
+ /* 0x11C */ f32 field_0x11c[4];
+ /* 0x12C */ JUTPalette* field_0x12c;
+ /* 0x130 */ JUtility::TColor mWhite;
+ /* 0x134 */ JUtility::TColor mBlack;
+ /* 0x138 */ JUtility::TColor mCornerColor[4];
+ /* 0x148 */ JUtility::TColor field_0x148;
+ /* 0x14C */ JUtility::TColor field_0x14c;
+};
+
#endif /* J2DPICTURE_H */
diff --git a/include/JSystem/J2DGraph/J2DScreen.h b/include/JSystem/J2DGraph/J2DScreen.h
index ef3e43079d..27f5c55161 100644
--- a/include/JSystem/J2DGraph/J2DScreen.h
+++ b/include/JSystem/J2DGraph/J2DScreen.h
@@ -1,6 +1,64 @@
#ifndef J2DSCREEN_H
#define J2DSCREEN_H
+#include "JSystem/J2DGraph/J2DManage.h"
+#include "JSystem/J2DGraph/J2DMaterial.h"
+#include "JSystem/J2DGraph/J2DPane.h"
+#include "JSystem/JUtility/JUTNameTab.h"
#include "dolphin/types.h"
+struct J2DScrnBlockHeader {};
+
+class J2DScreen : public J2DPane {
+public:
+ /* 802F8540 */ virtual ~J2DScreen();
+ /* 802F9A18 */ virtual s32 getTypeID() const;
+ /* 802F9A20 */ virtual void calcMtx();
+ /* 802F9120 */ virtual void drawSelf(f32, f32, Mtx*);
+ /* 802F90A0 */ virtual const J2DPane* search(u64);
+ /* 802F90E0 */ virtual const J2DPane* searchUserInfo(u64);
+ /* 802F9600 */ virtual bool isUsed(ResTIMG const*);
+ /* 802F9620 */ virtual bool isUsed(ResFONT const*);
+ /* 80053BA0 */ virtual void clearAnmTransform();
+ /* 802F9704 */ virtual void setAnimation(J2DAnmColor*);
+ /* 80192414 */ virtual void setAnimation(J2DAnmTransform*);
+ /* 802F9798 */ virtual void setAnimation(J2DAnmTextureSRTKey*);
+ /* 802F99A8 */ virtual void setAnimation(J2DAnmVtxColor*);
+ /* 802F9838 */ virtual void setAnimation(J2DAnmTexPattern*);
+ /* 802F99C8 */ virtual void setAnimation(J2DAnmVisibilityFull*);
+ /* 802F98CC */ virtual void setAnimation(J2DAnmTevRegKey*);
+ /* 802F9A54 */ virtual void setAnimation(J2DAnmBase*);
+ /* 802F9A74 */ virtual void setAnimationVF(J2DAnmVisibilityFull*);
+ /* 802F9A78 */ virtual void setAnimationVC(J2DAnmVtxColor*);
+ /* 802F99E8 */ virtual void createPane(J2DScrnBlockHeader const&, JSURandomInputStream*,
+ J2DPane*, u32);
+ /* 802F8B98 */ virtual void createPane(J2DScrnBlockHeader const&, JSURandomInputStream*,
+ J2DPane*, u32, JKRArchive*);
+
+ /* 802F8498 */ J2DScreen();
+ /* 802F85A8 */ void clean();
+ /* 802F8648 */ void setPriority(char const*, u32, JKRArchive*);
+ /* 802F8748 */ bool setPriority(JSURandomInputStream*, u32, JKRArchive*);
+ /* 802F8778 */ bool private_set(JSURandomInputStream*, u32, JKRArchive*);
+ /* 802F8834 */ bool checkSignature(JSURandomInputStream*);
+ /* 802F8894 */ void getScreenInformation(JSURandomInputStream*);
+ /* 802F8990 */ void makeHierarchyPanes(J2DPane*, JSURandomInputStream*, u32, JKRArchive*);
+ /* 802F8ED4 */ void draw(f32, f32, J2DGrafContext const*);
+ /* 802F9280 */ void getResReference(JSURandomInputStream*, u32);
+ /* 802F937C */ void createMaterial(JSURandomInputStream*, u32, JKRArchive*);
+ /* 802F9640 */ static void* getNameResource(char const*);
+ /* 802F9690 */ void animation();
+
+ static J2DDataManage* mDataManage;
+
+private:
+ /* 0x100 */ bool mScissor;
+ /* 0x102 */ u16 mMaterialNum;
+ /* 0x104 */ J2DMaterial* mMaterials;
+ /* 0x108 */ J2DResReference* field_0x108;
+ /* 0x10C */ J2DResReference* field_0x10c;
+ /* 0x110 */ JUTNameTab* mNameTable;
+ /* 0x114 */ u32 field_0x114;
+};
+
#endif /* J2DSCREEN_H */
diff --git a/include/JSystem/J2DGraph/J2DTextBox.h b/include/JSystem/J2DGraph/J2DTextBox.h
index 90e31c1877..d58cfe1669 100644
--- a/include/JSystem/J2DGraph/J2DTextBox.h
+++ b/include/JSystem/J2DGraph/J2DTextBox.h
@@ -1,6 +1,72 @@
#ifndef J2DTEXTBOX_H
#define J2DTEXTBOX_H
+#include "JSystem/J2DGraph/J2DMaterial.h"
+#include "JSystem/J2DGraph/J2DPane.h"
#include "dolphin/types.h"
+enum J2DTextBoxVBinding {
+ /* 0x0 */ VBIND_CENTER,
+ /* 0x1 */ VBIND_BOTTOM,
+ /* 0x2 */ VBIND_TOP
+};
+
+enum J2DTextBoxHBinding {
+ /* 0x0 */ HBIND_CENTER,
+ /* 0x1 */ HBIND_RIGHT,
+ /* 0x2 */ HBIND_LEFT
+};
+
+class J2DTextBox : public J2DPane {
+public:
+ /* 803001E0 */ virtual ~J2DTextBox();
+ /* 80300C68 */ virtual s32 getTypeID() const;
+ /* 80300AF8 */ virtual void resize(f32, f32);
+ /* 80300870 */ virtual bool setConnectParent(bool);
+ /* 80300950 */ virtual void drawSelf(f32, f32, Mtx*);
+ /* 803008E8 */ virtual void drawSelf(f32, f32);
+ /* 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);
+ /* 80300278 */ virtual void setFont(JUTFont*);
+ /* 8021C7F4 */ virtual void getFont() const;
+ /* 80254408 */ virtual void setBlack(JUtility::TColor);
+ /* 80186C84 */ virtual void setWhite(JUtility::TColor);
+ /* 8019230C */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor);
+ /* 801DFA34 */ virtual void getBlack() const;
+ /* 801DFA28 */ virtual void getWhite() const;
+ /* 8025602C */ virtual bool getMaterial() const;
+
+ /* 802FFBC4 */ J2DTextBox(u64, JGeometry::TBox2<f32> const&, ResFONT const*, char const*, s16,
+ J2DTextBoxHBinding, J2DTextBoxVBinding);
+ /* 802FF6D8 */ J2DTextBox(J2DPane*, JSURandomInputStream*, JKRArchive*);
+ /* 802FF75C */ J2DTextBox(J2DPane*, JSURandomInputStream*, u32, J2DMaterial*);
+ /* 802FF660 */ J2DTextBox();
+ /* 802FFC58 */ void initiate(ResFONT const*, char const*, s16, J2DTextBoxHBinding,
+ J2DTextBoxVBinding);
+ /* 802FFE88 */ void private_readStream(J2DPane*, JSURandomInputStream*, JKRArchive*);
+ /* 80300658 */ char* getStringPtr() const;
+ /* 8030074C */ s32 setString(s16, char const*, ...);
+ /* 80300660 */ s32 setString(char const*, ...);
+
+private:
+ /* 0x0100 */ JUTFont* mFont;
+ /* 0x0104 */ JUtility::TColor mCharColor;
+ /* 0x0108 */ JUtility::TColor mGradientColor;
+ /* 0x010C */ f32 field_0x10c;
+ /* 0x0110 */ f32 field_0x110;
+ /* 0x0114 */ f32 mCharSpacing;
+ /* 0x0118 */ f32 mLineSpacing;
+ /* 0x011C */ f32 field_0x11c;
+ /* 0x0120 */ f32 field_0x120;
+ /* 0x0124 */ char* mStringPtr;
+ /* 0x0128 */ JUtility::TColor mWhiteColor;
+ /* 0x012C */ JUtility::TColor mBlackColor;
+ /* 0x0130 */ u8 mFlags;
+ /* 0x0131 */ bool mTextFontOwned;
+ /* 0x0132 */ s16 mStringLength;
+};
+
#endif /* J2DTEXTBOX_H */