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 */
+24 -17
View File
@@ -40,6 +40,12 @@ public:
/* 0x0C */ Mtx* mMatrices[5];
};
class J3DMtxBuffer;
class J3DVertexBuffer;
class J3DMatPacket;
class J3DShapePacket;
class J3DVtxColorCalc;
class J3DModel {
public:
/* 800CFFF4 */ void setBaseTRMtx(f32 (*)[4]);
@@ -50,25 +56,26 @@ public:
/* 803275FC */ void newDifferedDisplayList(u32);
/* 8032767C */ void lock();
/* 803276B4 */ void unlock();
/* 803276EC */ void calcMaterial();
/* 80327858 */ void calcDiffTexMtx();
/* 803279A0 */ void diff();
/* 80327A2C */ void setDeformData(J3DDeformData*, u32);
/* 80327AA0 */ void setSkinDeform(J3DSkinDeform*, u32);
/* 80327BD4 */ void calcAnmMtx();
/* 80327C58 */ void calcWeightEnvelopeMtx();
/* 80327CA4 */ void update();
/* 80327CF0 */ void calc();
/* 80327E4C */ void entry();
/* 80327F40 */ void viewCalc();
/* 80328190 */ void calcNrmMtx();
/* 803281B4 */ void calcBumpMtx();
/* 803282B8 */ void calcBBoardMtx();
/* 803282EC */ void prepareShapePackets();
/* 80328350 */ ~J3DModel();
Mtx* getAnmMtx(int p1);
Mtx* getAnmMtx(int);
// better way to handle inlines with same name as non-inlines?
/* 80327CA4 */ void update();
/* 80327E4C */ void entry();
/* 80327CF0 */ void calc();
/* 803276EC */ void calcMaterial();
/* 80327858 */ void calcDiffTexMtx();
/* 80327F40 */ void viewCalc();
/* 80328350 */ ~J3DModel();
// is there a better way to handle inlines with same name as non-inlines?
Mtx* i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); }
/* 0x00 */ void* vtable;
@@ -76,17 +83,17 @@ public:
/* 0x08 */ u32 mFlags;
/* 0x0C */ u32 field_0x0c;
/* 0x10 */ int field_0x10;
/* 0x14 */ int mUserData;
/* 0x18 */ Vec mPosition;
/* 0x14 */ void* mUserArea;
/* 0x18 */ Vec mBaseScale;
/* 0x24 */ Mtx mBaseTransformMtx;
/* 0x54 */ Mtx mInternalView;
/* 0x84 */ J3DMtxBuffer* mMtxBuffer;
/* 0x88 */ void* mVertexBuffer;
/* 0xC0 */ void* mMaterialPacket;
/* 0xC4 */ void* mShapePacket;
/* 0xC8 */ void* mDeformData;
/* 0xCC */ void* mSkinDeform;
/* 0xD0 */ void* mVtxColorCalc;
/* 0x88 */ J3DVertexBuffer* mVertexBuffer;
/* 0xC0 */ J3DMatPacket* mMatPacket;
/* 0xC4 */ J3DShapePacket* mShapePacket;
/* 0xC8 */ J3DDeformData* mDeformData;
/* 0xCC */ J3DSkinDeform* mSkinDeform;
/* 0xD0 */ J3DVtxColorCalc* mVtxColorCalc;
/* 0xD4 */ u8 field_0xd4[8];
};
@@ -15,6 +15,7 @@ typedef void (*J3DDrawBuffer_DrawFunc)(const J3DDrawBuffer* this_);
class J3DDrawBuffer {
public:
J3DDrawBuffer() { initialize(); }
~J3DDrawBuffer();
void initialize();
J3DError allocBuffer(u32);
+6
View File
@@ -39,6 +39,12 @@ public:
class J3DPacket {
public:
J3DPacket() {
mpNextSibling = NULL;
mpFirstChild = NULL;
mpUserData = NULL;
}
void addChildPacket(J3DPacket* pChild);
inline void clear() {
+67
View File
@@ -1,6 +1,73 @@
#ifndef J3DSHAPE_H
#define J3DSHAPE_H
#include "JSystem/J3DGraphBase/J3DShapeDraw.h"
#include "JSystem/J3DGraphBase/J3DShapeMtx.h"
#include "dolphin/gx/GX.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
class J3DCurrentMtxInfo {
public:
u32 mMtxIdxRegA;
u32 mMtxIdxRegB;
};
class J3DCurrentMtx : public J3DCurrentMtxInfo {
public:
u32 getMtxIdxRegA() const { return mMtxIdxRegA; }
u32 getMtxIdxRegB() const { return mMtxIdxRegB; }
};
class J3DMaterial;
class J3DVertexData;
class J3DDrawMtxData;
class J3DShape {
public:
/* 80314B48 */ void initialize();
/* 80314BB8 */ void addTexMtxIndexInDL(_GXAttr, u32);
/* 80314CBC */ void addTexMtxIndexInVcd(_GXAttr);
/* 80314DA8 */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
/* 80314E28 */ void countBumpMtxNum() const;
/* 80314EEC */ void loadVtxArray() const;
/* 80314F5C */ void isSameVcdVatCmd(J3DShape*);
/* 80314F98 */ void makeVtxArrayCmd();
/* 80315260 */ void makeVcdVatCmd();
/* 80315300 */ void loadPreDrawSetting() const;
/* 80315398 */ void setArrayAndBindPipeline() const;
/* 803155E0 */ virtual void draw() const;
/* 8031544C */ virtual void drawFast() const;
/* 80315628 */ virtual void simpleDraw() const;
/* 803156AC */ virtual void simpleDrawCache() const;
static void resetVcdVatCache() { sOldVcdVatCmd = NULL; }
static void* sOldVcdVatCmd;
private:
/* 0x04 */ J3DMaterial* mMaterial;
/* 0x08 */ u16 mIndex;
/* 0x0A */ u16 mMtxGroupNum;
/* 0x0C */ u32 mFlags;
/* 0x10 */ f32 mRadius;
/* 0x14 */ Vec mMin;
/* 0x20 */ Vec mMax;
/* 0x2C */ void* mVcdVatCmd;
/* 0x30 */ _GXAttr* mVtxDesc;
/* 0x34 */ bool mHasNBT;
/* 0x38 */ J3DShapeMtx* mShapeMtx;
/* 0x3C */ J3DShapeDraw* mShapeDraw;
/* 0x40 */ J3DCurrentMtx mCurrentMtx;
/* 0x48 */ bool mHasPNMTXIdx;
/* 0x4C */ J3DVertexData* mVertexData;
/* 0x50 */ J3DDrawMtxData* mDrawMtxData;
/* 0x54 */ u8* mScaleFlagArray;
/* 0x58 */ Mtx* mDrawMtx;
/* 0x5C */ Mtx* mNrmMtx;
/* 0x60 */ u32* mCurrentViewNo;
/* 0x64 */ u32 mBumpMtxOffset;
};
#endif /* J3DSHAPE_H */
@@ -3,4 +3,18 @@
#include "dolphin/types.h"
class J3DShapeDraw {
public:
/* 80314924 */ void countVertex(u32);
/* 80314974 */ void addTexMtxIndexInDL(u32, u32, u32);
/* 80314ABC */ J3DShapeDraw(u8 const*, u32);
/* 80314AD4 */ void draw() const;
/* 80314B00 */ virtual ~J3DShapeDraw();
private:
/* 0x04 */ u32 mDisplayListSize;
/* 0x08 */ void* mDisplayList;
};
#endif /* J3DSHAPEDRAW_H */
@@ -1,6 +1,32 @@
#ifndef J3DSHAPEMTX_H
#define J3DSHAPEMTX_H
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
class J3DShapeMtx {
public:
/* 803130A8 */ void resetMtxLoadCache();
/* 803130E4 */ void loadMtxIndx_PNGP(int, u16) const;
/* 80313128 */ void loadMtxIndx_PCPU(int, u16) const;
/* 80313188 */ void loadMtxIndx_NCPU(int, u16) const;
/* 803131D4 */ void loadMtxIndx_PNCPU(int, u16) const;
/* 80314798 */ virtual ~J3DShapeMtx();
/* 803147E0 */ virtual void getType() const;
/* 80273E08 */ virtual bool getUseMtxNum() const;
/* 8031459C */ virtual void getUseMtxIndex(u16) const;
/* 80313B94 */ virtual void load() const;
/* 80313BF0 */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
static u8 sMtxLoadPipeline[48];
static u8 sMtxLoadCache[20 + 4 /* padding */];
static u8 sCurrentPipeline[4];
static u8 sCurrentScaleFlag[4];
static u8 sTexMtxLoadType[4];
private:
/* 0x04 */ u16 mUseMtxIndex;
};
#endif /* J3DSHAPEMTX_H */
+32 -4
View File
@@ -12,9 +12,28 @@ enum J3DError {
struct _GXTexCacheSize {};
class J3DMtxCalc;
class J3DModel;
class J3DMatPacket;
class J3DShapePacket;
class J3DShape;
class J3DDrawBuffer;
class J3DTexture;
struct J3DSys {
Mtx mMtx;
u8 _30[0x11C - 0x30];
/* 0x00 */ Mtx mMtx;
/* 0x30 */ J3DMtxCalc* mMtxCalc;
/* 0x34 */ u32 mFlags;
/* 0x38 */ J3DModel* mModel;
/* 0x3C */ J3DMatPacket* mMatPacket;
/* 0x40 */ J3DShapePacket* mShapePacket;
/* 0x44 */ J3DShape* mShape;
/* 0x48 */ J3DDrawBuffer* mDrawBuffer[2];
/* 0x50 */ u32 mDrawMode;
/* 0x54 */ u32 mMaterialMode;
/* 0x58 */ J3DTexture* mTexture;
u8 field_0x5c[0x11C - 0x5C];
/* 8030FDE8 */ J3DSys();
/* 8030FEC0 */ void loadPosMtxIndx(int, u16) const;
/* 8030FEE4 */ void loadNrmMtxIndx(int, u16) const;
@@ -29,10 +48,19 @@ struct J3DSys {
/* 80310D44 */ void reinitIndStages();
/* 80310E3C */ void reinitPixelProc();
static u8 mCurrentMtx[48];
enum DrawMode {
/* 0x3 */ OPA_TEX_EDGE = 3,
/* 0x4 */ XLU,
};
void setDrawModeOpaTexEdge() { mDrawMode = OPA_TEX_EDGE; }
void setDrawModeXlu() { mDrawMode = XLU; }
static Mtx mCurrentMtx;
static f32 mCurrentS[3];
static f32 mParentS[3];
static u8 sTexCoordScaleTable[64 + 4 /* padding */];
static u16 sTexCoordScaleTable[34];
};
extern J3DSys j3dSys;
+5
View File
@@ -13,6 +13,11 @@ public:
/* 802738FC */ u32 clip(f32 const (*)[4], Vec, f32) const;
/* 80273A44 */ u32 clip(f32 const (*)[4], Vec*, Vec*) const;
void setFovy(f32 fovy) { mFovY = fovy; }
void setAspect(f32 aspect) { mAspect = aspect; }
void setNear(f32 near) { mNear = near; }
void setFar(f32 far) { mFar = far; }
private:
Vec _04;
Vec _10;
+30
View File
@@ -1,6 +1,36 @@
#ifndef JFWSYSTEM_H
#define JFWSYSTEM_H
#include "JSystem/JUtility/JUTConsole.h"
#include "dolphin/types.h"
struct JFWSystem {
struct CSetUpParam {
static u32 maxStdHeaps;
static u32 sysHeapSize;
static u32 fifoBufSize;
static u32 aramAudioBufSize;
static u32 aramGraphBufSize;
static u32 streamPriority;
static u32 decompPriority;
static u32 aPiecePriority;
static void* systemFontRes;
static void* renderMode;
static u32 exConsoleBufferSize[1 + 1 /* padding */];
};
/* 80271CD0 */ void firstInit();
/* 80271D18 */ void init();
static JUTConsole* getSystemConsole() { return systemConsole; }
static u8 rootHeap[4];
static u8 systemHeap[4];
static u8 mainThread[4];
static u8 debugPrint[4];
static u8 systemFont[4];
static u8 systemConsoleManager[4];
static JUTConsole* systemConsole;
};
#endif /* JFWSYSTEM_H */
+21
View File
@@ -3,4 +3,25 @@
#include "dolphin/types.h"
namespace JGadget {
struct TLinkListNode {
TLinkListNode* mNext;
TLinkListNode* mPrev;
};
struct TNodeLinkList {
struct iterator {};
/* 802DCA1C */ ~TNodeLinkList();
/* 802DCAA0 */ void erase(JGadget::TNodeLinkList::iterator, JGadget::TNodeLinkList::iterator);
/* 802DCA58 */ void erase(JGadget::TNodeLinkList::iterator);
/* 802DCB08 */ void splice(JGadget::TNodeLinkList::iterator, JGadget::TNodeLinkList&,
JGadget::TNodeLinkList::iterator);
/* 802DCBA8 */ void Insert(JGadget::TNodeLinkList::iterator, JGadget::TLinkListNode*);
/* 802DCBD4 */ void Erase(JGadget::TLinkListNode*);
/* 802DCBF8 */ void Remove(JGadget::TLinkListNode*);
};
}; // namespace JGadget
#endif /* LINKLIST_H */
+16 -10
View File
@@ -20,15 +20,15 @@ struct SArcHeader {
};
struct SArcDataInfo {
u32 num_nodes;
u32 node_offset;
u32 num_file_entries;
u32 file_entry_offset;
u32 string_table_length;
u32 string_table_offset;
u16 next_free_file_id;
bool sync_file_ids_and_indices;
u8 field_1b[5];
/* 0x00 */ u32 num_nodes;
/* 0x04 */ u32 node_offset;
/* 0x08 */ u32 num_file_entries;
/* 0x0C */ u32 file_entry_offset;
/* 0x10 */ u32 string_table_length;
/* 0x14 */ u32 string_table_offset;
/* 0x18 */ u16 next_free_file_id;
/* 0x1A */ bool sync_file_ids_and_indices;
/* 0x1B */ u8 field_1b[5];
};
inline u32 read_big_endian_u32(void* ptr) {
@@ -135,6 +135,7 @@ public:
u32 getFileAttribute(u32) const;
u32 getMountMode() const { return mMountMode; }
SDIFileEntry* findNameResource(const char*) const;
protected:
bool isSameName(CArcName&, u32, u16) const;
@@ -143,7 +144,6 @@ protected:
SDIFileEntry* findTypeResource(u32, const char*) const;
SDIFileEntry* findFsResource(const char*, u32) const;
SDIFileEntry* findIdxResource(u32) const;
SDIFileEntry* findNameResource(const char*) const;
SDIFileEntry* findPtrResource(const void*) const;
SDIFileEntry* findIdResource(u16) const;
@@ -165,6 +165,8 @@ public:
/* vt[18] */ virtual void setExpandSize(SDIFileEntry*, u32);
/* vt[19] */ virtual u32 getExpandSize(SDIFileEntry*) const;
u32 countFile() const { return mArcInfoBlock->num_file_entries; }
protected:
/* 0x00 */ // vtable
/* 0x04 */ // JKRFileLoader
@@ -174,7 +176,11 @@ protected:
/* 0x40 */ s32 mEntryNum;
/* 0x44 */ SArcDataInfo* mArcInfoBlock;
/* 0x48 */ SDirEntry* mNodes;
public:
/* 0x4C */ SDIFileEntry* mFiles;
protected:
/* 0x50 */ s32* mExpandedSize;
/* 0x54 */ char* mStringTable;
/* 0x58 */ u32 field_0x58;
+1
View File
@@ -101,6 +101,7 @@ public:
void removeDisposer(JKRDisposer* disposer) { mDisposerList.remove(&disposer->mLink); }
void lock() { OSLockMutex(&mMutex); }
void unlock() { OSUnlockMutex(&mMutex); }
u32 getHeapSize() { return mSize; }
protected:
/* 0x00 */ // vtable
+2
View File
@@ -83,6 +83,8 @@ public:
JSUList(bool init) : JSUPtrList(init) {}
~JSUList() {}
bool append(JSULink<T>* link) { return this->JSUPtrList::append((JSUPtrLink*)link); }
bool prepend(JSULink<T>* link) { return this->JSUPtrList::prepend((JSUPtrLink*)link); }
+67
View File
@@ -1,6 +1,73 @@
#ifndef JUTCONSOLE_H
#define JUTCONSOLE_H
#include "JSystem/JGadget/linklist.h"
#include "JSystem/JKernel/JKRDisposer.h"
#include "JSystem/JUtility.h"
#include "JSystem/JUtility/JUTFont.h"
#include "dolphin/types.h"
class JUTConsole : public JKRDisposer {
public:
enum EConsoleType {};
/* 802E73E4 */ void create(unsigned int, void*, u32);
/* 802E7354 */ void create(unsigned int, unsigned int, JKRHeap*);
/* 802E746C */ JUTConsole(unsigned int, unsigned int, bool);
/* 802E75CC */ void getObjectSizeFromBufferSize(unsigned int, unsigned int);
/* 802E75DC */ void getLineFromObjectSize(u32, unsigned int);
/* 802E75EC */ void clear();
/* 802E7648 */ void doDraw(JUTConsole::EConsoleType) const;
/* 802E7BB8 */ void print_f(char const*, ...);
/* 802E7C38 */ void print(char const*);
/* 802E7F7C */ void dumpToTerminal(unsigned int);
/* 802E80A8 */ void scroll(int);
/* 802E8184 */ void getUsedLine() const;
/* 802E81A8 */ int getLineOffset() const;
/* 802E755C */ virtual ~JUTConsole();
void setOutput(u32 output) { mOutput = output; }
u32 getOutput() const { return mOutput; }
void setPosition(int x, int y) {
mPositionX = x;
mPositionY = y;
}
int getPositionY() const { return mPositionY; }
int getPositionX() const { return mPositionX; }
bool isVisible() const { return mVisible; }
void setVisible(bool visible) { mVisible = visible; }
private:
/* 0x18 */ JGadget::TLinkListNode mListNode;
/* 0x20 */ u32 field_0x20;
/* 0x24 */ u32 field_0x24;
/* 0x28 */ u32 field_0x28;
/* 0x2C */ bool field_0x2c;
/* 0x30 */ int field_0x30;
/* 0x34 */ int field_0x34;
/* 0x38 */ int field_0x38;
/* 0x3C */ int field_0x3c;
/* 0x40 */ int mPositionX;
/* 0x44 */ int mPositionY;
/* 0x48 */ u32 mHeight;
/* 0x4C */ JUTFont* mFont;
/* 0x50 */ f32 mFontSizeX;
/* 0x54 */ f32 mFontSizeY;
/* 0x58 */ int mOutput;
/* 0x5C */ JUtility::TColor field_0x5c;
/* 0x60 */ JUtility::TColor field_0x60;
/* 0x64 */ int field_0x64;
/* 0x68 */ bool mVisible;
/* 0x69 */ bool field_0x69;
/* 0x6A */ bool field_0x6a;
/* 0x6B */ bool field_0x6b;
}; // Size: 0x6C
#endif /* JUTCONSOLE_H */
+24
View File
@@ -1,6 +1,30 @@
#ifndef JUTDBPRINT_H
#define JUTDBPRINT_H
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTFont.h"
#include "dolphin/types.h"
class JUTDbPrint {
public:
/* 802E0148 */ JUTDbPrint(JUTFont*, JKRHeap*);
/* 802E0190 */ void start(JUTFont*, JKRHeap*);
/* 802E0204 */ void changeFont(JUTFont*);
/* 802E021C */ void enter(int, int, int, char const*, int);
/* 802E02DC */ void flush(int, int, int, int);
/* 802E02A4 */ void flush();
/* 802E0440 */ void drawString(int, int, int, u8 const*);
static JUTDbPrint* getManager() { return sDebugPrint; }
void setVisible(bool visible) { mVisible = visible; }
static JUTDbPrint* sDebugPrint;
private:
/* 0x00 */ JUTDbPrint* mNext;
/* 0x04 */ JUTFont* mFont;
/* 0x08 */ JUtility::TColor mColor;
/* 0x0C */ bool mVisible;
};
#endif /* JUTDBPRINT_H */
+24 -6
View File
@@ -1,6 +1,8 @@
#ifndef JUTEXCEPTION_H
#define JUTEXCEPTION_H
#include "JSystem/JKernel/JKRThread.h"
#include "JSystem/JUtility/JUTGamePad.h"
#include "dolphin/gx/GX.h"
#include "dolphin/os/OS.h"
#include "dolphin/types.h"
@@ -16,13 +18,13 @@ struct JUTDirectPrint {
/* 802E456C */ void changeFrameBuffer(void*, u16, u16);
};
struct JUTException {
class JUTException /* : public JKRThread */ {
public:
struct EInfoPage {};
// TODO: return types are probably wrong
/* 802E1D5C */ JUTException(JUTDirectPrint*);
/* 802E1E40 */ void create(JUTDirectPrint*);
/* 802E1EA8 */ void run();
/* 802E1FCC */ void errorHandler(u16, OSContext*, u32, u32);
/* 802E20C0 */ void panic_f_va(char const*, int, char const*, __va_list_struct*);
/* 802E21FC */ static void panic_f(char const*, int, char const*, ...);
@@ -38,9 +40,9 @@ struct JUTException {
/* 802E2DAC */ void showSRR0Map(OSContext*);
/* 802E2E70 */ void printDebugInfo(JUTException::EInfoPage, u16, OSContext*, u32, u32);
/* 802E2F18 */ void isEnablePad() const;
/* 802E2F54 */ void readPad(u32*, u32*);
/* 802E2F54 */ bool readPad(u32*, u32*);
/* 802E34C0 */ void printContext(u16, OSContext*, u32, u32);
/* 802E3980 */ void waitTime(s32);
/* 802E3980 */ static void waitTime(s32);
/* 802E3A08 */ void createFB();
/* 802E3AEC */ void setPreUserCallback(void (*)(u16, OSContext*, u32, u32));
/* 802E3AFC */ void setPostUserCallback(void (*)(u16, OSContext*, u32, u32));
@@ -48,13 +50,18 @@ struct JUTException {
/* 802E3BA0 */ void queryMapAddress(char*, u32, s32, u32*, u32*, char*, u32, bool, bool);
/* 802E3C90 */ void queryMapAddress_single(char*, u32, s32, u32*, u32*, char*, u32, bool, bool);
/* 802E3FEC */ void createConsole(void*, u32);
/* 802E40EC */ ~JUTException();
/* 802E40EC */ virtual ~JUTException();
/* 802E1EA8 */ virtual void run();
static JUTException* getManager() { return sErrorManager; }
void setTraceSuppress(u32 param_0) { mTraceSuppress = param_0; }
static u8 sMessageQueue[32];
static void* sCpuExpName[17];
static u8 sMapFileList[12 + 4 /* padding */];
static u8 sMessageBuffer[4 + 4 /* padding */];
static u8 sErrorManager[4];
static JUTException* sErrorManager;
static u8 sPreUserCallback[4];
static u8 sPostUserCallback[4];
static u8 sConsoleBuffer[4];
@@ -62,6 +69,17 @@ struct JUTException {
static u8 sConsole[4];
static u8 msr[4];
static u8 fpscr[4];
/* 0x00 */ JKRThread field_0x0; // should be inherited
/* 0x80 */ JUTDirectPrint* field_0x80;
/* 0x84 */ JUTGamePad* field_0x84;
/* 0x88 */ s32 field_0x88;
/* 0x8C */ s32 field_0x8c;
/* 0x90 */ s32 field_0x90;
/* 0x94 */ u32 mTraceSuppress;
/* 0x98 */ u32 field_0x98;
/* 0x9C */ u32 field_0x9c;
/* 0xA0 */ u32 field_0xa0;
};
#endif /* JUTEXCEPTION_H */
+27
View File
@@ -1,6 +1,33 @@
#ifndef JUTFADER_H
#define JUTFADER_H
#include "JSystem/JGeometry.h"
#include "JSystem/JUtility.h"
#include "dolphin/types.h"
class JUTFader {
public:
enum EStatus {
UNKSTATUS_M1 = -1,
};
/* 802E5530 */ JUTFader(int, int, int, int, JUtility::TColor);
/* 802E55DC */ void control();
/* 802E57D0 */ void setStatus(JUTFader::EStatus, int);
/* 802E5840 */ virtual ~JUTFader();
/* 802E576C */ virtual bool startFadeIn(int);
/* 802E579C */ virtual bool startFadeOut(int);
/* 802E56DC */ virtual void draw();
private:
/* 0x04 */ s32 mStatus;
/* 0x08 */ u16 field_0x8;
/* 0x0A */ u16 field_0xa;
/* 0x0C */ JUtility::TColor mColor;
/* 0x10 */ JGeometry::TBox2<f32> mBox;
/* 0x20 */ EStatus mEStatus;
/* 0x24 */ u32 field_0x24;
};
#endif /* JUTFADER_H */
+107 -55
View File
@@ -26,6 +26,9 @@ enum {
};
}
extern bool struct_80451500;
extern bool struct_80451501; // sResetOccured
struct JUTGamePad : public JKRDisposer {
public:
// TODO: fix types
@@ -44,49 +47,98 @@ public:
enum EStickMode {};
enum EWhichStick {};
// typedef u32 EPadPort;
enum EPadPort { Port_1 = 0, Port_2 = 0, Port_3 = 0, Port_4 = 0 };
enum EPadPort { Port_1, Port_2, Port_3, Port_4 };
JUTGamePad(JUTGamePad::EPadPort port);
virtual ~JUTGamePad();
void initList();
static s32 init();
void clear();
void read();
static void read();
void assign();
void checkResetCallback(OSTime unk); // todo: weird arg
void update();
void stopPatternedRumble() { this->rumble.stopPatternedRumble(this->pad_port); }
void stopPatternedRumble() { mRumble.stopPatternedRumble(mPortNum); }
static void checkResetSwitch();
static void clearForReset();
static JUTGamePad* getGamePad(int pad_index);
static bool recalibrate(/*PADMask*/ u32 pad_mask);
static void setAnalogMode(u32 mode) {
sAnalogMode = mode;
PADSetAnalogMode(mode);
}
static void clearResetOccurred() { struct_80451501 = false; }
static void setResetCallback(callbackFn callback, void* param_0) {
C3ButtonReset::sCallback = callback;
C3ButtonReset::sCallbackArg = param_0;
}
u32 getButton() const { return mButton.mButton; }
u32 getTrigger() const { return mButton.mTrigger; }
f32 getMainStickX() const { return mMainStick.mPosX; }
f32 getMainStickY() const { return mMainStick.mPosY; }
f32 getMainStickValue() const { return mMainStick.mValue; }
s16 getMainStickAngle() const { return mMainStick.mAngle; }
f32 getSubStickX() const { return mSubStick.mPosX; }
f32 getSubStickY() const { return mSubStick.mPosY; }
f32 getSubStickValue() const { return mSubStick.mValue; }
s16 getSubStickAngle() const { return mSubStick.mAngle; }
u8 getAnalogA() const { return mButton.mAnalogA; }
u8 getAnalogB() const { return mButton.mAnalogB; }
u8 getAnalogL() const { return mButton.mAnalogL; }
u8 getAnalogR() const { return mButton.mAnalogR; }
s8 getErrorStatus() const { return mErrorStatus; }
u32 testTrigger(u32 button) const { return mButton.mTrigger & button; }
bool isPushing3ButtonReset() const {
bool isPushingReset = false;
if (mPortNum != -1 && mButtonReset.mReset != false) {
isPushingReset = true;
}
return isPushingReset;
}
struct CButton {
CButton();
CButton(); // inline
void clear();
u32 update(PADStatus const*, u32 unk);
void setRepeat(u32 unk0, u32 unk1, u32 unk2);
u32 mButtonFlags;
u32 mPressedButtonFlags;
u32 mReleasedButtonFlags;
u8 mAnalogARaw;
u8 mAnalogBRaw;
u8 mTriggerLeftRaw;
u8 mTriggerRightRaw;
f32 mTriggerLeft;
f32 mTriggerRight;
u32 field_0x18; // padding?
u32 field_0x1c;
u32 field_0x20;
u32 field_0x24;
u32 field_0x28;
u32 field_0x2c;
};
/* 0x00 */ u32 mButton;
/* 0x04 */ u32 mTrigger; // Pressed Buttons
/* 0x08 */ u32 mRelease; // Released Buttons
/* 0x0C */ u8 mAnalogA;
/* 0x0D */ u8 mAnalogB;
/* 0x0E */ u8 mAnalogL;
/* 0x0F */ u8 mAnalogR;
/* 0x10 */ f32 mAnalogLf;
/* 0x14 */ f32 mAnalogRf;
/* 0x18 */ u32 mRepeat;
/* 0x1C */ u32 field_0x1c;
/* 0x20 */ u32 field_0x20;
/* 0x24 */ u32 field_0x24;
/* 0x28 */ u32 field_0x28;
/* 0x2C */ u32 field_0x2c;
}; // Size: 0x30
struct C3ButtonReset {
// TODO: fix types
@@ -96,26 +148,28 @@ public:
static void* sCallbackArg;
static OSTime sThreshold;
static s32 sResetOccurredPort;
};
/* 0x0 */ bool mReset;
}; // Size: 0x4
struct CStick {
static f32 sPressPoint;
static f32 sReleasePoint;
CStick();
CStick(); // inline
void clear();
void clear(JUTGamePad* pad);
u32 update(s8 unk0, s8 unk1, JUTGamePad::EStickMode mode, JUTGamePad::EWhichStick stick,
u32 unk2);
u32 getButton(u32 unk);
float mPosX;
float mPosY;
float mValue;
s16 mAngle;
s8 field_0xe;
s8 field_0xf;
};
/* 0x0 */ f32 mPosX;
/* 0x4 */ f32 mPosY;
/* 0x8 */ f32 mValue;
/* 0xC */ s16 mAngle;
/* 0xE */ s8 field_0xe;
/* 0xF */ s8 field_0xf;
}; // Size: 0x10
struct CRumble {
static PADMask sChannelMask[4];
@@ -137,30 +191,28 @@ public:
void startPatternedRumble(void* unk0, ERumble rumble, u32 unk1);
void stopPatternedRumble(s16 pad_port);
void stopPatternedRumbleAtThePeriod();
static void setEnabled(/*PADMask*/ u32 pad_mask);
static void setEnabled(u32 pad_mask);
u32 field_0x0;
u32 field_0x4;
u8* field_0x8;
u32 field_0xc;
u8* field_0x10;
};
/* 0x00 */ u32 field_0x0;
/* 0x04 */ u32 field_0x4;
/* 0x08 */ u8* field_0x8;
/* 0x0C */ u32 field_0xc;
/* 0x10 */ u8* field_0x10;
}; // Size: 0x14
CButton buttons;
CStick control_stick;
CStick c_stick;
CRumble rumble;
s16 pad_port;
s8 error_value;
u8 pad0;
JSUPtrLink ptr_link;
u8 unk0[8];
u8 field_0x98;
u8 unk1[3];
u8 reset_flag;
u8 pad1[3];
OSTime reset_time;
u8 field_0xa8;
/* 0x18 */ CButton mButton;
/* 0x48 */ CStick mMainStick;
/* 0x58 */ CStick mSubStick;
/* 0x68 */ CRumble mRumble;
/* 0x7C */ s16 mPortNum;
/* 0x7E */ s8 mErrorStatus;
/* 0x80 */ JSULink<JUTGamePad> mLink;
/* 0x90 */ u32 mPadRecord;
/* 0x94 */ u32 mPadReplay;
/* 0x98 */ C3ButtonReset mButtonReset;
/* 0x9C */ u8 field_0x9c[4];
/* 0xA0 */ OSTime mResetTime;
/* 0xA8 */ u8 field_0xa8;
friend class CRumble;
};
+2 -2
View File
@@ -23,8 +23,8 @@ struct ResTIMG { /* Acts as the header to image data. Usually texture data immed
u8 maxAnisotropy;
u8 minFilter;
u8 magFilter;
u8 minLOD;
u8 maxLOD;
s8 minLOD;
s8 maxLOD;
u8 mipmapCount;
u8 unknown;
s16 LODBias;
+28 -29
View File
@@ -6,40 +6,16 @@
#include "dolphin/types.h"
#include "dolphin/vi/vi.h"
// TODO: placeholder
struct _GXRenderModeObj {};
struct JUTVideo {
static JUTVideo* sManager;
// TODO: figure out type
static u8 sVideoLastTick[4];
static u8 sVideoInterval[4];
class JUTVideo {
public:
typedef void (*CallbackFn)(void);
JUTVideo(_GXRenderModeObj const*);
virtual ~JUTVideo();
typedef void (*CallbackFn)(void);
// struct JUTVideo_vtable * vtable;
GXRenderModeObj* render_object;
u32 field_0x8;
u32 retrace_count;
u32 field_0x10;
u32 field_0x14;
u32 field_0x18;
VIRetraceCallback pre_retrace_callback;
VIRetraceCallback post_retrace_callback;
CallbackFn unknown_callback_1;
CallbackFn unknown_callback_2;
bool set_black;
u8 padding[3];
s32 set_black_frame_counter;
OSMessage message;
OSMessageQueue message_queue;
// TODO: return types not confirmed
/* 802E4C54 */ void createManager(_GXRenderModeObj const*);
/* 802E4CAC */ void destroyManager();
/* 802E4C54 */ static JUTVideo* createManager(_GXRenderModeObj const*);
/* 802E4CAC */ static void destroyManager();
/* 802E4E50 */ void preRetraceProc(u32);
/* 802E5088 */ void drawDoneStart();
/* 802E50B0 */ void dummyNoDrawWait();
@@ -47,6 +23,29 @@ struct JUTVideo {
/* 802E5144 */ void postRetraceProc(u32);
/* 802E5198 */ void setRenderMode(_GXRenderModeObj const*);
/* 802E5210 */ void waitRetraceIfNeed();
static JUTVideo* getManager() { return sManager; }
_GXRenderModeObj* getRenderMode() const { return mRenderObj; }
static JUTVideo* sManager;
static u32 sVideoLastTick;
static u32 sVideoInterval;
private:
/* 0x04 */ _GXRenderModeObj* mRenderObj;
/* 0x08 */ u32 field_0x8;
/* 0x0C */ u32 mRetraceCount;
/* 0x10 */ u32 field_0x10;
/* 0x14 */ u32 field_0x14;
/* 0x18 */ u32 field_0x18;
/* 0x1C */ VIRetraceCallback mPreRetraceCallback;
/* 0x20 */ VIRetraceCallback mPostRetraceCallback;
/* 0x24 */ CallbackFn unknown_callback_1;
/* 0x28 */ CallbackFn unknown_callback_2;
/* 0x2C */ bool mSetBlack;
/* 0x30 */ s32 mSetBlackFrameCount;
/* 0x34 */ OSMessage mMessage;
/* 0x38 */ OSMessageQueue mMessageQueue;
};
#endif /* JUTVIDEO_H */
+32
View File
@@ -1,6 +1,38 @@
#ifndef JUTXFB_H
#define JUTXFB_H
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTVideo.h"
#include "dolphin/types.h"
class JUTXfb {
public:
enum EXfbNumber { // TODO: placeholder
UNK_0 = 0,
UNK_1 = 1,
UNK_2 = 2,
UNK_3 = 3,
};
/* 802E5214 */ void clearIndex();
/* 802E5228 */ void common_init(int);
/* 802E5260 */ JUTXfb(_GXRenderModeObj const*, JKRHeap*, JUTXfb::EXfbNumber);
/* 802E5308 */ ~JUTXfb();
/* 802E5378 */ void delXfb(int);
/* 802E53B8 */ static JUTXfb* createManager(JKRHeap*, JUTXfb::EXfbNumber);
/* 802E5424 */ static void destroyManager();
/* 802E5454 */ void initiate(u16, u16, JKRHeap*, JUTXfb::EXfbNumber);
static JUTXfb* sManager;
private:
/* 0x00 */ void* mBuffer[3];
/* 0x0C */ bool mXfbAllocated[3];
/* 0x10 */ s32 mBufferNum;
/* 0x14 */ s16 mDrawingXfbIndex;
/* 0x16 */ s16 mDrawnXfbIndex;
/* 0x18 */ s16 mDisplayingXfbIndex;
/* 0x1C */ s32 mSDrawingFlag;
};
#endif /* JUTXFB_H */