m_Do cleanup, d_resource, drawlist stuff (#145)

* d_resource / some d_stage

* setup dDlst_list_c / d_select_icon OK

* JUTXfb / some JUTVideo + various

* some J2D classes / JUTVideo/Fader attempts

* bunch of m_Do cleanup + matches / f_ap_game OK

* mDoLib_clipper::setup OK

* most of d_meter_HIO OK

* pane_class / kantera_icon_meter
This commit is contained in:
TakaRikka
2021-09-24 08:11:10 -07:00
committed by GitHub
parent 6dcfdaf8a3
commit 7374f5f2f7
261 changed files with 6757 additions and 10882 deletions
+14 -3
View File
@@ -75,9 +75,20 @@ struct J2DAnmColor {
/* 8030AF24 */ void searchUpdateMaterialID(J2DScreen*);
};
struct J2DAnmBase {
/* 80053C94 */ ~J2DAnmBase();
/* 800569B0 */ void searchUpdateMaterialID(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 */ int mKind;
};
struct J2DAnmVtxColor {};
+33 -9
View File
@@ -3,16 +3,13 @@
#include "JSystem/JGeometry.h"
#include "JSystem/JUtility.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"
struct J2DGrafContext {
class J2DGrafContext {
public:
/* 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);
@@ -20,9 +17,36 @@ struct J2DGrafContext {
/* 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();
/* 802E95D4 */ virtual ~J2DGrafContext();
/* 802E90E4 */ virtual void place(JGeometry::TBox2<f32> const&);
/* 802E961C */ virtual void place(f32, f32, f32, f32);
/* 802E8BB4 */ virtual void setPort();
/* 802E8C44 */ virtual void setup2D();
/* 802E8E20 */ virtual void setScissor();
/* 802E9664 */ virtual bool getGrafType() const;
/* 802E966C */ virtual void setLookat();
private:
/* 0x04 */ JGeometry::TBox2<f32> mBounds;
/* 0x14 */ JGeometry::TBox2<f32> mScissorBounds;
/* 0x24 */ JUtility::TColor field_0x24;
/* 0x28 */ JUtility::TColor field_0x28;
/* 0x2C */ JUtility::TColor field_0x2c;
/* 0x30 */ JUtility::TColor field_0x30;
/* 0x34 */ u8 mLineWidth;
/* 0x38 */ JGeometry::TVec2<f32> field_0x14;
/* 0x40 */ u8 field_0x40[0x40];
/* 0x80 */ Mtx mPosMtx;
/* 0xB0 */ u8 field_0xb0;
/* 0xB1 */ u8 field_0xb1;
/* 0xB2 */ u8 field_0xb2;
/* 0xB3 */ u8 mLineBlendMode;
/* 0xB4 */ u8 mLineSrcBlendFactor;
/* 0xB5 */ u8 mLineDstBlendFactor;
/* 0xB6 */ u8 mBoxBlendMode;
/* 0xB7 */ u8 mBoxSrcBlendFactor;
/* 0xB8 */ u8 mBoxDstBlendFactor;
};
#endif /* J2DGRAFCONTEXT_H */
+19
View File
@@ -1,6 +1,25 @@
#ifndef J2DORTHOGRAPH_H
#define J2DORTHOGRAPH_H
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "dolphin/types.h"
class J2DOrthoGraph : public J2DGrafContext {
public:
/* 802E9670 */ J2DOrthoGraph();
/* 802E96D0 */ J2DOrthoGraph(f32, f32, f32, f32, f32, f32);
/* 802E980C */ void setOrtho(JGeometry::TBox2<f32> const&, f32, f32);
/* 802E987C */ void scissorBounds(JGeometry::TBox2<f32>*, JGeometry::TBox2<f32> const*);
/* 8000B118 */ virtual ~J2DOrthoGraph();
/* 802E97B4 */ virtual void setPort();
/* 802E9C88 */ virtual bool getGrafType() const;
/* 802E9840 */ virtual void setLookat();
private:
/* 0xBC */ JGeometry::TBox2<f32> mOrtho;
/* 0xCC */ f32 mNear;
/* 0xD0 */ f32 mFar;
};
#endif /* J2DORTHOGRAPH_H */
+38 -5
View File
@@ -43,8 +43,8 @@ public:
/* 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);
/* 0x3c */ virtual J2DPane* search(u64 tag);
/* 0x40 */ virtual 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);
@@ -70,6 +70,39 @@ public:
f32 getWidth() const { return mBounds.getWidth(); }
JSUTree<J2DPane>* getFirstChild() { return mPaneTree.getFirstChild(); }
const JSUTree<J2DPane>* getPaneTree() { return &mPaneTree; }
u8 getAlpha() const { return mAlpha; }
f32 getScaleX() const { return mScaleX; }
f32 getScaleY() const { return mScaleY; }
f32 getTranslateX() const { return mTranslateX; }
f32 getTranslateY() const { return mTranslateY; }
f32 getRotateZ() const { return mRotateZ; }
f32 getRotOffsetX() const { return mRotateOffsetX; }
f32 getRotOffsetY() const { return mRotateOffsetY; }
void translate(f32 transX, f32 transY) {
mTranslateX = transX;
mTranslateY = transY;
calcMtx();
}
void scale(f32 scaleH, f32 scaleV) {
mScaleX = scaleH;
mScaleY = scaleV;
calcMtx();
}
int getKind() const { return id; }
bool isVisible() const { return mVisible; }
void show() { mVisible = true; }
void initiate();
void initialize(J2DPane*, bool, u64, const JGeometry::TBox2<f32>&);
@@ -87,9 +120,9 @@ public:
void setBasePosition(J2DBasePosition position);
void setInfluencedAlpha(bool arg1, bool arg2);
void getGlbVtx(u8 arg1) const;
const J2DPane* getFirstChildPane();
const J2DPane* getNextChildPane();
const J2DPane* getParentPane();
J2DPane* getFirstChildPane();
J2DPane* getNextChildPane();
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);
+2 -2
View File
@@ -15,8 +15,8 @@ public:
/* 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);
/* 802F90A0 */ virtual J2DPane* search(u64);
/* 802F90E0 */ virtual J2DPane* searchUserInfo(u64);
/* 802F9600 */ virtual bool isUsed(ResTIMG const*);
/* 802F9620 */ virtual bool isUsed(ResFONT const*);
/* 80053BA0 */ virtual void clearAnmTransform();
+1 -1
View File
@@ -32,7 +32,7 @@ public:
/* 803002E8 */ virtual void draw(f32, f32);
/* 80300278 */ virtual void setFont(JUTFont*);
/* 8021C7F4 */ virtual void getFont() const;
/* 80254408 */ virtual void setBlack(JUtility::TColor);
/* 80254408 */ virtual bool setBlack(JUtility::TColor);
/* 80186C84 */ virtual void setWhite(JUtility::TColor);
/* 8019230C */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor);
/* 801DFA34 */ virtual void getBlack() const;
+73
View File
@@ -1,6 +1,79 @@
#ifndef J2DWINDOW_H
#define J2DWINDOW_H
#include "JSystem/J2DGraph/J2DMaterial.h"
#include "JSystem/J2DGraph/J2DPane.h"
#include "JSystem/JSupport/JSURandomInputStream.h"
#include "dolphin/types.h"
class J2DWindow : public J2DPane {
public:
struct TMaterial {
/* 0x00 */ JUTTexture* field_0x0;
/* 0x04 */ JUTTexture* field_0x4;
/* 0x08 */ JUTTexture* field_0x8;
/* 0x0C */ JUTTexture* field_0xc;
/* 0x10 */ JUTTexture* field_0x10;
}; // Size: 0x14
struct TContentsColor {
TContentsColor() {}
/* 0x0 */ JUtility::TColor field_0x0;
/* 0x4 */ JUtility::TColor field_0x4;
/* 0x8 */ JUtility::TColor field_0x8;
/* 0xC */ JUtility::TColor field_0xc;
}; // Size: 0x10
/* 802F9C10 */ J2DWindow(J2DPane*, JSURandomInputStream*, J2DMaterial*);
/* 802F9B74 */ J2DWindow(J2DPane*, JSURandomInputStream*, JKRArchive*);
/* 802F9A7C */ J2DWindow();
/* 802FA118 */ void private_readStream(J2DPane*, JSURandomInputStream*, JKRArchive*);
/* 802FA604 */ void initinfo2();
/* 802FAA5C */ void draw_private(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
/* 802FB12C */ void setContentsColor(JUtility::TColor, JUtility::TColor, JUtility::TColor,
JUtility::TColor);
/* 802FB634 */ void drawFrameTexture(JUTTexture*, f32, f32, f32, f32, u16, u16, u16, u16, bool);
/* 802FB7C8 */ void drawFrameTexture(JUTTexture*, f32, f32, bool, bool, bool);
/* 802FB868 */ void drawContentsTexture(f32, f32, f32, f32);
/* 802FBB90 */ void setTevMode(JUTTexture*, JUtility::TColor, JUtility::TColor);
/* 802FA880 */ virtual ~J2DWindow();
/* 802FBF98 */ virtual s32 getTypeID() const;
/* 802FB000 */ virtual void resize(f32, f32);
/* 802FB1D8 */ virtual void drawSelf(f32, f32);
/* 802FB240 */ virtual void drawSelf(f32, f32, f32 (*)[3][4]);
/* 802FBEDC */ virtual bool isUsed(ResTIMG const*);
/* 802FC02C */ virtual bool isUsed(ResFONT const*);
/* 802FC04C */ virtual void rewriteAlpha();
/* 802FA928 */ virtual void draw(JGeometry::TBox2<f32> const&);
/* 802FAED0 */ virtual void draw(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
/* 802FBFA0 */ virtual void draw(f32, f32, f32, f32);
/* 80254430 */ virtual bool setBlack(JUtility::TColor);
/* 802543E0 */ virtual bool setWhite(JUtility::TColor);
/* 80254568 */ virtual bool setBlackWhite(JUtility::TColor, JUtility::TColor);
/* 80254000 */ virtual JUtility::TColor getBlack() const;
/* 8025400C */ virtual JUtility::TColor getWhite() const;
/* 802FBE60 */ virtual void getFrameTexture(u8, u8) const;
/* 802FBFE8 */ virtual void getContentsTexture(u8) const;
/* 802FC000 */ virtual void getMaterial(J2DWindow::TMaterial&) const;
/* 802FC01C */ virtual bool getFrameMaterial(u8) const;
/* 802FC024 */ virtual bool getContentsMaterial() const;
/* 802FB338 */ virtual void drawContents(JGeometry::TBox2<f32> const&);
private:
/* 0x100 */ TMaterial mMaterial;
/* 0x114 */ JGeometry::TBox2<f32> field_0x114;
/* 0x124 */ JUTPalette* mPalette;
/* 0x128 */ JUtility::TColor field_0x128;
/* 0x12C */ JUtility::TColor field_0x12C;
/* 0x130 */ JUtility::TColor field_0x130;
/* 0x134 */ JUtility::TColor field_0x134;
/* 0x138 */ JUtility::TColor mWhite;
/* 0x13C */ JUtility::TColor mBlack;
/* 0x140 */ s16 field_0x140;
/* 0x142 */ s16 field_0x142;
/* 0x144 */ u8 field_0x144;
/* 0x145 */ u8 field_0x145;
}; // Size: 0x148
#endif /* J2DWINDOW_H */