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 */
@@ -3,4 +3,38 @@
#include "dolphin/types.h"
struct FILE {
/* 0x00 */ u32 handle;
/* 0x04 */ u32 file_mode;
/* 0x08 */ u32 file_state;
/* 0x0C */ u8 flag;
/* 0x0D */ char char_buffer;
/* 0x0E */ char char_buffer_2;
/* 0x0F */ char ungetc_buffer[2];
/* 0x12 */ u16 ungetc_wide_buffer[2];
/* 0x18 */ u32 position;
/* 0x1C */ u8* buffer;
/* 0x20 */ u32 buffer_size;
/* 0x24 */ u8* buffer_ptr;
/* 0x28 */ u32 buffer_length;
/* 0x2C */ u32 buffer_alignment;
/* 0x30 */ u32 buffer_length2;
/* 0x34 */ u32 buffer_position;
/* 0x38 */ void* position_fn;
/* 0x3C */ void* read_fn;
/* 0x40 */ void* write_fn;
/* 0x44 */ void* close_fn;
/* 0x48 */ void* unknown;
/* 0x4C */ struct FILE* next_file;
};
struct files {
FILE stdin;
FILE stdout;
FILE stderr;
FILE empty;
};
extern files __files;
#endif /* MSL_COMMON_SRC_ANSI_FILES_H */
@@ -1,6 +1,9 @@
#ifndef MSL_COMMON_SRC_CHAR_IO_H
#define MSL_COMMON_SRC_CHAR_IO_H
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/ansi_files.h"
#include "dolphin/types.h"
extern "C" int fputs(const char*, FILE*);
#endif /* MSL_COMMON_SRC_CHAR_IO_H */
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
double fmod(double, double);
#endif /* MATH_DOUBLE_PRECISION_W_FMOD_H */
+32 -31
View File
@@ -29,7 +29,7 @@ class J2DScreen;
class J2DPane;
class J2DAnmBase;
class daAlink_lockCursor_c : public dDlst_base_c {
class daAlink_lockCursor_c {
public:
/* 80125F14 */ void create();
/* 80126358 */ void update();
@@ -2172,6 +2172,7 @@ public:
u32 i_checkModeFlg(u32 pFlag) const { return mModeFlg & pFlag; }
bool checkUpperAnime(u16 pIdx) const { return mUpperAnime[UPPER_NOW].getIdx() == pIdx; }
bool checkIronBallWaitAnime() const { return checkUpperAnime(0x19C); }
s16 checkWolfEyeUp() const { return mWolfEyeUp; }
static u8 const m_mainBckShield[80];
static u8 const m_mainBckSword[20];
@@ -2299,7 +2300,7 @@ private:
/* 0x02170 */ u8 field_0x2170[0x18];
/* 0x02188 */ dEyeHL_c mEyeHL1;
/* 0x0219C */ dEyeHL_c mEyeHL2;
/* 0x021B0 */ daPy_anmHeap_c mAnmHeap8[2];
/* 0x021B0 */ daPy_anmHeap_c mItemHeap[2];
/* 0x021D8 */ daPy_anmHeap_c mAnmHeap9;
/* 0x021EC */ u8 field_0x21ec[4];
/* 0x021F0 */ daAlink_blur_c mBlur;
@@ -2541,7 +2542,7 @@ private:
/* 0x030A6 */ s16 field_0x30a6;
/* 0x030A8 */ u16 field_0x30a8;
/* 0x030AA */ u16 field_0x30aa;
/* 0x030AC */ s16 field_0x30ac;
/* 0x030AC */ s16 mWolfEyeUp;
/* 0x030AE */ u16 field_0x30ae;
/* 0x030B0 */ s16 field_0x30b0;
/* 0x030B2 */ s16 field_0x30b2;
@@ -2801,32 +2802,32 @@ struct daAlinkHIO_anm_c {
}; // size = 0x14
struct daAlinkHIO_basic_c1 {
/* 0x00 */ s16 field_0x00;
/* 0x02 */ s16 mNeckAimAngleX;
/* 0x04 */ s16 mNeckAimAngleY;
/* 0x06 */ s16 mNeckAimAngleZ;
/* 0x00 */ bool mOneHitKill;
/* 0x02 */ s16 mNeckMaxHorizontal;
/* 0x04 */ s16 mNeckMaxUp;
/* 0x06 */ s16 mNeckMaxDown;
/* 0x08 */ s16 field_0x08;
/* 0x0A */ s16 field_0x0a;
/* 0x0C */ s16 field_0x0c;
/* 0x0E */ s16 field_0x0e;
/* 0x10 */ s16 mMetamorphoseFarAngle;
/* 0x0A */ s16 mHotspringRecoverTime;
/* 0x0C */ s16 mWiiCamSpeedV;
/* 0x0E */ s16 mWiiCamSpeedH;
/* 0x10 */ s16 mTransformBlockFarAngle;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 mAnmBlendFactor;
/* 0x1C */ f32 mWaitTurnSpeed;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ f32 field_0x24;
/* 0x28 */ f32 field_0x28;
/* 0x2C */ f32 field_0x2c;
/* 0x30 */ f32 field_0x30;
/* 0x34 */ f32 field_0x34;
/* 0x38 */ f32 field_0x38;
/* 0x3C */ f32 field_0x3c;
/* 0x40 */ f32 field_0x40;
/* 0x44 */ f32 field_0x44;
/* 0x48 */ f32 field_0x48;
/* 0x4C */ f32 field_0x4c;
/* 0x50 */ f32 mMetamorphoseNearDis;
/* 0x54 */ f32 mMetamorphoseFarDis;
/* 0x20 */ f32 mStandDefenseBlend;
/* 0x24 */ f32 mWaterSurfaceEffectHeight;
/* 0x28 */ f32 mWolfWaterSurfaceEffectHeight;
/* 0x2C */ f32 mMaxWindInfluenceDist;
/* 0x30 */ f32 mNoWindInfluenceDist;
/* 0x34 */ f32 mMaxWindSpeed;
/* 0x38 */ f32 mLavaDeathDepth;
/* 0x3C */ f32 mLinkWolfTransformSpeed;
/* 0x40 */ f32 mWolfLinkTransformSpeed;
/* 0x44 */ f32 mIndoorSpeedFactor;
/* 0x48 */ f32 mSandSinkSpeed;
/* 0x4C */ f32 mSandSurfaceSpeed;
/* 0x50 */ f32 mTransformBlockNearDis;
/* 0x54 */ f32 mTransformBlockFarDis;
};
class daAlinkHIO_basic_c0 {
@@ -2836,10 +2837,10 @@ public:
class daAlinkHIO_autoJump_c1 {
public:
/* 0x00 */ daAlinkHIO_anm_c field_0x00;
/* 0x14 */ daAlinkHIO_anm_c field_0x14;
/* 0x28 */ daAlinkHIO_anm_c field_0x28;
/* 0x3C */ daAlinkHIO_anm_c field_0x3c;
/* 0x00 */ daAlinkHIO_anm_c mJump;
/* 0x14 */ daAlinkHIO_anm_c mLand;
/* 0x28 */ daAlinkHIO_anm_c mDive;
/* 0x3C */ daAlinkHIO_anm_c mDiveUnk;
/* 0x50 */ u8 field_0x50;
/* 0x52 */ s16 field_0x52;
/* 0x54 */ s16 field_0x54;
@@ -2851,8 +2852,8 @@ public:
/* 0x68 */ f32 field_0x68;
/* 0x6C */ f32 field_0x6c;
/* 0x70 */ f32 field_0x70;
/* 0x74 */ f32 field_0x74;
/* 0x78 */ f32 field_0x78;
/* 0x74 */ f32 mGravity;
/* 0x78 */ f32 mMaxFallSpeed;
/* 0x7C */ f32 field_0x7c;
/* 0x80 */ f32 field_0x80;
/* 0x84 */ f32 field_0x84;
+14 -13
View File
@@ -41,7 +41,7 @@ public:
daPy_anmHeap_c(u32);
~daPy_anmHeap_c();
void initData();
void mallocBuffer();
void* mallocBuffer();
void createHeap(daPy_anmHeap_c::daAlinkHEAP_TYPE);
J3DAnmBase* loadData(u16);
J3DAnmBase* loadDataIdx(u16);
@@ -59,9 +59,9 @@ private:
/* 0x02 */ u16 mPriIdx;
/* 0x04 */ u16 mArcNo;
/* 0x06 */ u16 field_0x06;
/* 0x08 */ int mBufferSize;
/* 0x08 */ u32 mBufferSize;
/* 0x0C */ void* mBuffer;
/* 0x10 */ JKRHeap* mAnimeHeap;
/* 0x10 */ JKRSolidHeap* mAnimeHeap;
}; // Size = 0x14
class daPy_actorKeep_c {
@@ -167,16 +167,16 @@ public:
void checkBombItem(int);
void checkBottleItem(int);
void checkDrinkBottleItem(int);
int checkOilBottleItem(int);
void checkOpenBottleItem(int);
void checkBowItem(int);
void checkHookshotItem(int);
void checkTradeItem(int);
BOOL checkDungeonWarpItem(int);
void checkMasterSwordEquip();
static BOOL checkOilBottleItem(int);
static BOOL checkOpenBottleItem(int);
static BOOL checkBowItem(int);
static BOOL checkHookshotItem(int);
static BOOL checkTradeItem(int);
static BOOL checkDungeonWarpItem(int);
BOOL checkMasterSwordEquip();
void checkWoodShieldEquip();
void getAttentionOffsetY();
void checkNowWolfEyeUp();
f32 getAttentionOffsetY();
s16 checkNowWolfEyeUp();
void forceRestartRoom(int, u32, int);
void setFmChainPos(fopAc_ac_c*, cXyz*, int);
void cancelFmChainGrab();
@@ -386,7 +386,7 @@ public:
virtual bool checkCopyRodEquip(void) const;
virtual bool checkCutJumpMode(void) const;
inline bool getSumouCameraMode() const {
bool getSumouCameraMode() const {
bool sumouCameraMode = false;
if (field_0x560[0xA] != 0 && field_0x560[0xA] < 0x26) {
sumouCameraMode = true;
@@ -405,6 +405,7 @@ public:
void i_onEndResetFlg1(daPy_ERFLG1 pFlg) { mEndResetFlg1 |= pFlg; }
int i_checkWolf() { return i_checkNoResetFlg1(Wolf); }
BOOL i_checkEquipHeavyBoots() const { return i_checkNoResetFlg0(EquipHeavyBoots); }
inline BOOL checkNowWolf();
static u8 m_midnaActor[4];
};
+79 -43
View File
@@ -39,6 +39,12 @@ public:
u8 mTimerType;
};
class phaseParam_c {
public:
/* 0x0 */ char* field_0x0;
/* 0x4 */ JKRHeap* heap;
};
struct camera_class {};
class dComIfG_camera_info_class {
@@ -60,6 +66,8 @@ public:
};
STATIC_ASSERT(sizeof(dComIfG_camera_info_class) == 0x38);
enum PlayerPtr { LINK_PTR, HORSE_PTR };
class dComIfG_play_c {
public:
dComIfG_play_c() { this->ct(); }
@@ -100,7 +108,7 @@ public:
void* getMsgObjectClass() { return mMsgObjectClass; }
dStage_roomControl_c* getRoomControl() { return &mRoomControl; }
dStage_stageDt_c& getStage() { return mStageData; }
dEvt_control_c getEvent() { return mEvent; }
dEvt_control_c& getEvent() { return mEvent; }
daHorse_c* getHorseActor() { return (daHorse_c*)mPlayerPtr[1]; }
u8& getItemLifeCountType() { return mItemLifeCountType; }
void setItem(u8 slot, u8 i_no) {
@@ -149,21 +157,25 @@ public:
void setMaxOxygen(int max) { mMaxOxygen = max; }
u8 getDoStatus() { return mDoStatus; }
u8 getRStatus() { return mRStatus; }
inline char* getStartStageName() { return mStartStage.getName(); }
inline s8 getStartStageRoomNo() { return mStartStage.getRoomNo(); }
inline s8 getStartStageLayer() { return mStartStage.getLayer(); }
inline u8 isHeapLockFlag() { return mHeapLockFlag; }
inline void setHeapLockFlag(u8 status) { mHeapLockFlag = status; }
inline void setSubHeapLockFlag(int idx, u8 status) { mSubHeapLockFlag[idx] = status; }
inline u8 getSubHeapLockFlag(int idx) { return mSubHeapLockFlag[idx]; }
inline void offHeapLockFlag() { mHeapLockFlag = 0; }
inline JKRExpHeap* getSubExpHeap2D(int idx) { return mSubExpHeap2D[idx]; }
inline void setSubExpHeap2D(int idx, void* heap) { mSubExpHeap2D[idx] = (JKRExpHeap*)heap; }
inline void offEnableNextStage() { mNextStage.offEnable(); }
inline JKRHeap* getExpHeap2D() { return mExpHeap2D; }
inline dEvent_manager_c& getEvtManager() { return mEvtManager; }
inline dAttention_c& getAttention() { return mAttention; }
char* getStartStageName() { return mStartStage.getName(); }
s8 getStartStageRoomNo() { return mStartStage.getRoomNo(); }
s8 getStartStageLayer() { return mStartStage.getLayer(); }
u8 isHeapLockFlag() { return mHeapLockFlag; }
void setHeapLockFlag(u8 status) { mHeapLockFlag = status; }
void setSubHeapLockFlag(int idx, u8 status) { mSubHeapLockFlag[idx] = status; }
u8 getSubHeapLockFlag(int idx) { return mSubHeapLockFlag[idx]; }
void offHeapLockFlag() { mHeapLockFlag = 0; }
JKRExpHeap* getSubExpHeap2D(int idx) { return mSubExpHeap2D[idx]; }
void setSubExpHeap2D(int idx, void* heap) { mSubExpHeap2D[idx] = (JKRExpHeap*)heap; }
void offEnableNextStage() { mNextStage.offEnable(); }
JKRHeap* getExpHeap2D() { return mExpHeap2D; }
dEvent_manager_c& getEvtManager() { return mEvtManager; }
dAttention_c& getAttention() { return mAttention; }
JKRArchive* getMsgDtArchive(int idx) { return mMsgDtArchive[idx]; }
s16 getStartStagePoint() { return mStartStage.getPoint(); }
void* getPlayerPtr(int ptrIdx) { return mPlayerPtr[ptrIdx]; }
JKRArchive* getMain2DArchive() { return mMain2DArchive; }
J2DGrafContext* getCurrentGrafPort() { return mCurrentGrafPort; }
public:
/* 0x00000 */ dBgS mDBgS;
@@ -378,34 +390,12 @@ public:
/* 0x0500C */ dDlst_window_c* mCurrentWindow;
/* 0x05010 */ void* mCurrentView;
/* 0x05014 */ void* mCurrentViewport;
/* 0x05018 */ void* mCurrentGrafPort;
/* 0x05018 */ J2DGrafContext* mCurrentGrafPort;
/* 0x0501C */ void* mItemTable;
/* 0x0501D */ u8 field_0x501d[4];
/* 0x05024 */ char mLastPlayStageName[8];
};
class dRes_control_c {
public:
dRes_control_c() {}
/* 8003BFB0 */ ~dRes_control_c();
/* 8003C078 */ static int setRes(char const*, dRes_info_c*, int, char const*, u8, JKRHeap*);
/* 8003C160 */ static int syncRes(char const*, dRes_info_c*, int);
/* 8003C194 */ void deleteRes(char const*, dRes_info_c*, int);
/* 8003C37C */ void getRes(char const*, char const*, dRes_info_c*, int);
int setObjectRes(const char* name, u8 param_1, JKRHeap* heap) {
return setRes(name, &mResInfos1[0], ARRAY_SIZE(mResInfos1), "/res/Object/", param_1, heap);
}
int syncObjectRes(const char* name) {
return syncRes(name, &mResInfos1[0], ARRAY_SIZE(mResInfos1));
}
private:
/* 0x0000 */ dRes_info_c mResInfos1[0x80];
/* 0x1200 */ dRes_info_c mResInfos2[0x40];
}; // Size: 0x1B00
class dComIfG_inf_c {
public:
dComIfG_inf_c() { this->ct(); }
@@ -414,8 +404,8 @@ public:
/* 0x00000 */ dSv_info_c info;
/* 0x00F38 */ dComIfG_play_c play;
/* 0x05F64 */ dDlst_list_c draw_list_list;
/* 0x1C110 */ u8 field_0x1C114[0x1E8 - 0xA];
/* 0x05F64 */ dDlst_list_c drawlist;
/* 0x1C104 */ u8 field_0x1C104[0x1F4];
/* 0x1C2F8 */ dRes_control_c mResControl;
/* 0x1DDF8 */ u8 field_0x1ddf8; // related to fade, controls brightness
/* 0x1DDF9 */ u8 mWorldDark;
@@ -431,7 +421,7 @@ public:
/* 0x1DE0C */ u8 field_0x1de0c;
static __d_timer_info_c dComIfG_mTimerInfo;
};
}; // Size: 0x1DE10
STATIC_ASSERT(122384 == sizeof(dComIfG_inf_c));
@@ -459,6 +449,8 @@ u16 dComIfGs_getMaxLifeGauge();
void dComIfGs_setWarpMarkFlag(u8);
void dComIfGs_setSelectEquipSword(u8);
void dComIfGs_setSelectEquipShield(u8);
void* dComIfG_getStageRes(char const*);
void dComLbG_PhaseHandler(request_of_phase_process_class*, int (**param_1)(void*), void*);
inline void dComIfGp_setRStatus(u8 status, u8 flag) {
g_dComIfG_gameInfo.play.setRStatus(status, flag);
@@ -754,7 +746,7 @@ inline char* dComIfGp_getStartStageName() {
}
inline void dComIfGd_reset() {
g_dComIfG_gameInfo.draw_list_list.reset();
g_dComIfG_gameInfo.drawlist.reset();
}
inline u8 dComIfGs_getOptVibration() {
@@ -801,6 +793,10 @@ inline BOOL dComIfGs_isSaveSwitch(int i_stageNo, int i_no) {
return g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().isSwitch(i_no);
}
inline BOOL dComIfGs_isSaveSwitch(int i_no) {
return g_dComIfG_gameInfo.info.getMemory().getBit().isSwitch(i_no);
}
inline void dComIfGs_onStageBossEnemy() {
g_dComIfG_gameInfo.info.getMemory().getBit().onStageBossEnemy();
}
@@ -851,7 +847,7 @@ inline void dComIfGp_roomControl_initZone() {
g_dComIfG_gameInfo.play.getRoomControl()->initZone();
}
inline bool dComIfG_setObjectRes(const char* name, u8 param_1, JKRHeap* heap) {
inline int dComIfG_setObjectRes(const char* name, u8 param_1, JKRHeap* heap) {
return g_dComIfG_gameInfo.mResControl.setObjectRes(name, param_1, heap);
}
@@ -975,4 +971,44 @@ inline u8 dComIfGs_getArrowNum() {
return g_dComIfG_gameInfo.info.getPlayer().getItemRecord().getArrowNum();
}
inline s16 dComIfGp_getStartStagePoint() {
return g_dComIfG_gameInfo.play.getStartStagePoint();
}
inline void dComIfGs_initZone() {
g_dComIfG_gameInfo.info.initZone();
}
inline int dComIfG_deleteObjectResMain(const char* res) {
return g_dComIfG_gameInfo.mResControl.deleteObjectRes(res);
}
inline void dComIfGp_roomControl_init() {
g_dComIfG_gameInfo.play.getRoomControl()->init();
}
inline void* dComIfG_getStageRes(const char* arcName, const char* resName) {
return g_dComIfG_gameInfo.mResControl.getStageRes(arcName, resName);
}
inline void* dComIfG_getObjectRes(const char* arcName, const char* resName) {
return g_dComIfG_gameInfo.mResControl.getObjectRes(arcName, resName);
}
inline daPy_py_c* dComIfGp_getLinkPlayer() {
return (daPy_py_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR);
}
inline daAlink_c* daAlink_getAlinkActorClass() {
return (daAlink_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR);
}
inline JKRArchive* dComIfGp_getMain2DArchive() {
return g_dComIfG_gameInfo.play.getMain2DArchive();
}
inline J2DGrafContext* dComIfGp_getCurrentGrafPort() {
return g_dComIfG_gameInfo.play.getCurrentGrafPort();
}
#endif /* D_COM_D_COM_INF_GAME_H */
+186 -27
View File
@@ -1,13 +1,31 @@
#ifndef D_D_DRAWLIST_H
#define D_D_DRAWLIST_H
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/J3DGraphAnimator/J3DModel.h"
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
#include "JSystem/J3DGraphBase/J3DPacket.h"
#include "SSystem/SComponent/c_m3d_g_pla.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/gx/GXTexture.h"
#include "d/kankyo/d_kankyo.h"
#include "dolphin/gx/GX.h"
#include "dolphin/mtx/mtx44.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
struct mDoExt_3DlineMat_c {};
class mDoExt_3DlineMatSortPacket : public J3DPacket {
public:
mDoExt_3DlineMatSortPacket();
virtual void draw();
virtual ~mDoExt_3DlineMatSortPacket();
private:
/* 0x10 */ mDoExt_3DlineMat_c* mp3DlineMat;
};
class dDlst_FileInfo_c {
public:
void draw(void);
@@ -16,15 +34,112 @@ public:
private:
};
#pragma pack(push, 1)
class dDlst_peekZ_c {
public:
dDlst_peekZ_c() { field_0x0 = 0; }
/* 80056018 */ void newData(s16, s16, u32*);
/* 80056080 */ void peekData();
u8 unk[7];
}; // actual size unknown!!!
#pragma pack(pop)
/* 0x0 */ u8 field_0x0;
/* 0x2 */ u16 field_0x2;
/* 0x4 */ u32* field_0x4;
};
class dDlst_shadowSimple_c {
public:
/* 8005520C */ void draw();
/* 800553EC */ void set(cXyz*, f32, f32, cXyz*, s16, f32, _GXTexObj*);
/* 8005638C */ dDlst_shadowSimple_c();
/* 0x00 */ u8 mAlpha;
/* 0x04 */ _GXTexObj* mpTexObj;
/* 0x08 */ Mtx mVolumeMtx;
/* 0x38 */ Mtx mMtx;
}; // Size: 0x68
struct cBgD_Vtx_t {};
class dDlst_shadowPoly_c {
public:
/* 80054288 */ void set(cBgD_Vtx_t*, u16, u16, u16, cM3dGPla*);
/* 800543B4 */ void draw();
/* 0x0 */ void* field_0x0; // vtable
/* 0x4 */ u16 mCount;
/* 0x6 */ u8 field_0x6[2];
};
class dDlst_shadowTri_c {
public:
/* 80056270 */ ~dDlst_shadowTri_c();
/* 80056344 */ dDlst_shadowTri_c();
/* 0x0 */ cXyz mPos[3];
};
class dDlst_shadowRealPoly_c {
public:
/* 800569A0 */ void getTri();
/* 800569A8 */ s32 getTriMax();
/* 0x0 */ dDlst_shadowPoly_c mShadowPoly;
/* 0x8 */ dDlst_shadowTri_c mShadowTri[256];
};
class dDlst_shadowReal_c {
public:
/* 800544F0 */ void reset();
/* 80054500 */ void imageDraw(f32 (*)[4]);
/* 800545D4 */ void draw();
/* 80054BD0 */ void setShadowRealMtx(cXyz*, cXyz*, f32, f32, f32, dKy_tevstr_c*);
/* 80055028 */ void set(u32, J3DModel*, cXyz*, f32, f32, dKy_tevstr_c*, f32, f32);
/* 800551D4 */ bool add(J3DModel*);
/* 800561F8 */ ~dDlst_shadowReal_c();
/* 800562D0 */ dDlst_shadowReal_c();
private:
/* 0x0000 */ u8 mState;
/* 0x0001 */ u8 field_0x1;
/* 0x0002 */ u8 mModelNum;
/* 0x0003 */ u8 field_0x3;
/* 0x0004 */ u32 mKey;
/* 0x0008 */ Mtx mViewMtx;
/* 0x0038 */ Mtx44 mRenderProjMtx;
/* 0x0078 */ Mtx mReceiverProjMtx;
/* 0x00A8 */ dDlst_shadowRealPoly_c mShadowRealPoly;
/* 0x24B0 */ J3DModel* mpModels[38];
/* 0x2548 */ f32 mCameraZ;
/* 0x254C */ dDlst_shadowReal_c* mZsortPre;
/* 0x2550 */ dDlst_shadowReal_c* mZsortNext;
}; // Size: 0x2554
class dDlst_shadowControl_c {
public:
dDlst_shadowControl_c() { field_0x0 = 0; }
/* 80055684 */ void init();
/* 80055768 */ void reset();
/* 800557C8 */ void imageDraw(f32 (*)[4]);
/* 80055A14 */ void draw(f32 (*)[4]);
/* 80055C74 */ void setReal(u32, s8, J3DModel*, cXyz*, f32, f32, dKy_tevstr_c*);
/* 80055F1C */ void addReal(u32, J3DModel*);
/* 80055F84 */ void setSimple(cXyz*, f32, f32, cXyz*, s16, f32, _GXTexObj*);
/* 80055FE8 */ void setSimpleTex(ResTIMG const*);
static u8 mSimpleTexObj[32];
private:
/* 0x00000 */ u8 field_0x0;
/* 0x00001 */ u8 mRealNum;
/* 0x00002 */ u8 mSimpleNum;
/* 0x00004 */ dDlst_shadowReal_c* field_0x4;
/* 0x00008 */ dDlst_shadowReal_c* field_0x8;
/* 0x0000C */ dDlst_shadowSimple_c mSimple[128];
/* 0x0340C */ int mNextID;
/* 0x03410 */ dDlst_shadowReal_c mReal[8];
/* 0x15EB0 */ _GXTexObj field_0x15eb0[2];
/* 0x15EF0 */ void* field_0x15ef0;
/* 0x15EF4 */ void* field_0x15ef4;
};
class dDlst_window_c {
public:
@@ -34,28 +149,31 @@ public:
/* 80051ADC */ void setScissor(f32, f32, f32, f32);
private:
float view_port1;
float view_port2;
float view_port3;
float view_port4;
float view_port5;
float view_port6;
float scissor1;
float scissor2;
float scissor3;
float scissor4;
int camera_id;
/* 0x00 */ f32 mViewport;
/* 0x04 */ f32 field_0x04;
/* 0x08 */ f32 field_0x08;
/* 0x0C */ f32 field_0x0C;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 mScissor;
/* 0x1C */ f32 field_0x1c;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ f32 field_0x24;
/* 0x28 */ s8 mCameraID;
/* 0x29 */ s8 mMode;
};
STATIC_ASSERT(sizeof(dDlst_window_c) == 0x2C);
struct view_port_class {};
struct view_class {};
class dDlst_base_c {
public:
virtual void temp(); // temp to build OK, remove later
virtual void draw();
};
#pragma pack(push, 1)
class dDlst_list_c {
public:
/* 800560F0 */ dDlst_list_c();
@@ -67,7 +185,7 @@ public:
/* 80056710 */ void drawXluDrawList(J3DDrawBuffer*);
/* 8005674C */ void drawOpaListItem3d();
/* 80056770 */ void drawXluListItem3d();
/* 80056794 */ void set(dDlst_base_c**&, dDlst_base_c**&, dDlst_base_c*);
/* 80056794 */ int set(dDlst_base_c**&, dDlst_base_c**&, dDlst_base_c*);
/* 800567C4 */ void draw(dDlst_base_c**, dDlst_base_c**);
/* 8005681C */ void wipeIn(f32, _GXColor&);
/* 800568D8 */ void wipeIn(f32);
@@ -78,13 +196,54 @@ public:
static f32 mWipeRate;
static f32 mWipeSpeed[1 + 1 /* padding */];
// private:
/* 0x00000 */ u8 field_0x00[0x1C];
/* 0x0001C */ J3DPacket* mpPacket;
/* 0x00020 */ u8 field_0x20[0x16170];
/* 0x16180 */ dDlst_peekZ_c dlstPeekZ;
/* 0x16184 */ u8 unk_0x16194[0x1F];
}; // Size: 0x161A0
#pragma pack(pop)
private:
/* 0x00000 */ J3DDrawBuffer* mOpaListSky;
/* 0x00004 */ J3DDrawBuffer* mpXluListSky;
/* 0x00008 */ J3DDrawBuffer* mListP0;
/* 0x0000C */ J3DDrawBuffer* mOpaListBG;
/* 0x00010 */ J3DDrawBuffer* mXluListBG;
/* 0x00014 */ J3DDrawBuffer* mOpaListDarkBG;
/* 0x00018 */ J3DDrawBuffer* mXluListDarkBG;
/* 0x0001C */ J3DDrawBuffer* mOpaList;
/* 0x00020 */ J3DDrawBuffer* mXluList;
/* 0x00024 */ J3DDrawBuffer* mOpaListDark;
/* 0x00028 */ J3DDrawBuffer* mXluListDark;
/* 0x0002C */ J3DDrawBuffer* mOpaListPacket;
/* 0x00030 */ J3DDrawBuffer* mListFilter;
/* 0x00034 */ J3DDrawBuffer* mOpaListItem3d;
/* 0x00038 */ J3DDrawBuffer* mXluListItem3d;
/* 0x0003C */ J3DDrawBuffer* mOpaListInvisible;
/* 0x00040 */ J3DDrawBuffer* mXluListInvisible;
/* 0x00044 */ J3DDrawBuffer* mListZxlu;
/* 0x00048 */ J3DDrawBuffer* mList2DScreen;
/* 0x0004C */ J3DDrawBuffer* mListMiddle;
/* 0x00050 */ J3DDrawBuffer* mList3Dlast;
/* 0x00054 */ dDlst_list_c** field_0x54; // array?
/* 0x00058 */ u8 field_0x58[0xC];
/* 0x00064 */ dDlst_list_c* field_0x64;
/* 0x00068 */ dDlst_list_c** field_0x68;
/* 0x0006C */ dDlst_list_c** field_0x6c; // array?
/* 0x00070 */ u8 field_0x70[0x3C];
/* 0x000AC */ dDlst_list_c* field_0xac;
/* 0x000B0 */ dDlst_list_c** field_0xb0;
/* 0x000B4 */ dDlst_list_c** field_0xb4; // array?
/* 0x000B8 */ u8 field_0xb8[0xFC];
/* 0x001B4 */ dDlst_list_c* field_0x1b4;
/* 0x001B8 */ dDlst_list_c** field_0x1b8;
/* 0x001BC */ dDlst_list_c** field_0x1bc; // array?
/* 0x001C0 */ u8 field_0x1c0[0x7C];
/* 0x0023C */ dDlst_list_c* field_0x23c;
/* 0x00240 */ dDlst_list_c** field_0x240;
/* 0x00244 */ dDlst_window_c* mWindow;
/* 0x00248 */ view_port_class* mViewport;
/* 0x0024C */ view_class* mView;
/* 0x00250 */ u8 field_0x250[0xC];
/* 0x0025C */ dDlst_shadowControl_c mShadowControl;
/* 0x16154 */ mDoExt_3DlineMatSortPacket m3DLineMatSortPacket[3];
/* 0x16190 */ dDlst_peekZ_c mPeekZ;
/* 0x16198 */ u8 field_0x16198[8]; // might be part of peekZ
}; // Size: 0x161A0
STATIC_ASSERT(sizeof(dDlst_list_c) == 0x161A0);
#endif /* D_D_DRAWLIST_H */
+32
View File
@@ -1,6 +1,38 @@
#ifndef D_D_KANTERA_ICON_METER_H
#define D_D_KANTERA_ICON_METER_H
#include "d/com/d_com_inf_game.h"
#include "d/d_drawlist.h"
#include "d/pane/d_pane_class.h"
#include "dolphin/types.h"
class dDlst_KanteraIcon_c : public dDlst_base_c {
public:
/* 801AECB8 */ virtual void draw();
/* 801AED1C */ virtual ~dDlst_KanteraIcon_c();
void setScreen(J2DScreen* screen) { mp_scrn = screen; }
J2DScreen* getScreen() { return mp_scrn; }
private:
/* 0x04 */ J2DScreen* mp_scrn;
};
class dKantera_icon_c {
public:
/* 801AE938 */ dKantera_icon_c();
/* 801AEA68 */ void initiate();
/* 801AEB7C */ void setAlphaRate(f32);
/* 801AEBA0 */ void setPos(f32, f32);
/* 801AEBF4 */ void setScale(f32, f32);
/* 801AEC44 */ void setNowGauge(u16, u16);
/* 801AE974 */ virtual ~dKantera_icon_c();
private:
/* 0x04 */ dDlst_KanteraIcon_c* mpKanteraIcon;
/* 0x08 */ CPaneMgr* mpParent;
/* 0x0C */ CPaneMgr* mpGauge;
};
#endif /* D_D_KANTERA_ICON_METER_H */
+72 -20
View File
@@ -5,39 +5,91 @@
#include "JSystem/JKernel/JKRHeap.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_dvd_thread.h"
#include "m_Do/m_Do_ext.h"
#pragma pack(push, 1)
class dRes_info_c {
public:
/* 8003A260 */ dRes_info_c();
/* 8003A280 */ ~dRes_info_c();
/* 8003A348 */ void set(char const*, char const*, u8, JKRHeap*);
/* 8003A348 */ int set(char const*, char const*, u8, JKRHeap*);
/* 8003AB30 */ void onWarpMaterial(J3DModelData*);
/* 8003AC1C */ void offWarpMaterial(J3DModelData*);
/* 8003AD08 */ void setWarpSRT(J3DModelData*, cXyz const&, f32, f32);
/* 8003AE14 */ void loaderBasicBmd(u32, void*);
/* 8003B30C */ void loadResource();
/* 8003B30C */ int loadResource();
/* 8003B998 */ void deleteArchiveRes();
/* 8003BAC4 */ void setRes(JKRArchive*, JKRHeap*);
/* 8003BAF8 */ void setRes();
/* 8003BD2C */ void dump_long(dRes_info_c*, int);
/* 8003BE38 */ void dump(dRes_info_c*, int);
/* 8003BAC4 */ int setRes(JKRArchive*, JKRHeap*);
/* 8003BAF8 */ int setRes();
/* 8003BD2C */ static void dump_long(dRes_info_c*, int);
/* 8003BE38 */ static void dump(dRes_info_c*, int);
void* getRes(u32 resIdx) { return *(mRes + resIdx); }
int getCount() { return mCount; }
char* getArchiveName() { return mArchiveName; }
mDoDvdThd_mountArchive_c* getDMCommand() { return mDMCommand; }
JKRArchive* getArchive() { return mArchive; }
void incCount() { mCount++; }
u16 decCount() {
mCount--;
return mCount;
}
private:
u8 unk[0x24];
// u8* name;
// u32 unk4;
// u32 unk8;
// s16 reference_count;
// u8 padding[2];
// mDoDVDThd_command_c* command;
// JKRArchive* archive;
// JKRHeap* heap;
// JKRSolidHeap* solid_heap;
// void** resource_buffer;
};
#pragma pack(pop)
/* 0x00 */ char mArchiveName[11];
/* 0x0C */ u16 mCount;
/* 0x10 */ mDoDvdThd_mountArchive_c* mDMCommand;
/* 0x14 */ JKRArchive* mArchive;
/* 0x18 */ JKRHeap* heap;
/* 0x1C */ JKRSolidHeap* mDataHeap;
/* 0x20 */ void** mRes;
}; // Size: 0x24
STATIC_ASSERT(sizeof(dRes_info_c) == 0x24);
class dRes_control_c {
public:
dRes_control_c() {}
/* 8003BFB0 */ ~dRes_control_c();
/* 8003C078 */ static int setRes(char const*, dRes_info_c*, int, char const*, u8, JKRHeap*);
/* 8003C160 */ static int syncRes(char const*, dRes_info_c*, int);
/* 8003C194 */ static int deleteRes(char const*, dRes_info_c*, int);
/* 8003C37C */ static void* getRes(char const*, char const*, dRes_info_c*, int);
/* 8003C1E4 */ static dRes_info_c* getResInfo(char const*, dRes_info_c*, int);
/* 8003C260 */ static dRes_info_c* newResInfo(dRes_info_c*, int);
/* 8003C288 */ static dRes_info_c* getResInfoLoaded(char const*, dRes_info_c*, int);
/* 8003C2EC */ static void* getRes(char const*, s32, dRes_info_c*, int);
/* 8003C400 */ void getIDRes(char const*, u16, dRes_info_c*, int);
/* 8003C470 */ static int syncAllRes(dRes_info_c*, int);
/* 8003C4E4 */ int setObjectRes(char const*, void*, u32, JKRHeap*);
/* 8003C5BC */ int setStageRes(char const*, JKRHeap*);
/* 8003C638 */ void dump();
/* 8003C6B8 */ int getObjectResName2Index(char const*, char const*);
int setObjectRes(const char* name, u8 param_1, JKRHeap* heap) {
return setRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo), "/res/Object/", param_1,
heap);
}
void* getObjectRes(const char* arcName, const char* resName) {
return getRes(arcName, resName, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
}
int syncObjectRes(const char* name) {
return syncRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
}
int deleteObjectRes(const char* name) {
return deleteRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
}
void* getStageRes(const char* arcName, const char* resName) {
return getRes(arcName, resName, &mStageInfo[0], ARRAY_SIZE(mStageInfo));
}
/* 0x0000 */ dRes_info_c mObjectInfo[0x80];
/* 0x1200 */ dRes_info_c mStageInfo[0x40];
}; // Size: 0x1B00
struct J3DAnmBase {
/* 8003C734 */ ~J3DAnmBase();
+29
View File
@@ -1,6 +1,35 @@
#ifndef D_D_SELECT_ICON_H
#define D_D_SELECT_ICON_H
#include "JSystem/J2DGraph/J2DScreen.h"
#include "d/pane/d_pane_class.h"
#include "dolphin/types.h"
class dSi_HIO_c {
public:
virtual ~dSi_HIO_c();
dSi_HIO_c();
u8 field_0x4[4];
};
class dSelect_icon_c {
public:
/* 80195A3C */ void animation();
/* 80195B40 */ void setAlpha(u8);
/* 80195B70 */ void setPos(J2DPane*, f32, f32);
/* 0x00 */ u8 field_0x0[8];
/* 0x08 */ J2DScreen* field_0x8;
/* 0x0C */ CPaneMgrAlpha* field_0xc;
/* 0x10 */ CPaneMgr* field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x1C */ J2DAnmBase* field_0x1c;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ J2DAnmBase* field_0x24;
/* 0x28 */ f32 field_0x28;
/* 0x2C */ f32 field_0x2c;
};
#endif /* D_D_SELECT_ICON_H */
+71 -58
View File
@@ -2,6 +2,7 @@
#define D_D_STAGE_H
#include "JSystem/JKernel/JKRExpHeap.h"
#include "SSystem/SComponent/c_lib.h"
#include "d/kankyo/d_kankyo.h"
#include "d/save/d_save.h"
#include "dolphin/types.h"
@@ -475,9 +476,11 @@ class dStage_roomStatus_c {
public:
/* 0x000 */ dStage_roomDt_c mRoomDt;
/* 0x06C */ dKy_tevstr_c mKyTevStr;
/* 0x3F4 */ u8 unk_0x3F4[3];
/* 0x3F4 */ u8 unk_0x3F4;
/* 0x3F5 */ u8 unk_0x3F5[2];
/* 0x3F7 */ s8 mZoneNo;
/* 0x3F8 */ u8 unk_3F8[0x404 - 0x3F8];
/* 0x3F8 */ s8 mMemBlockID;
/* 0x3F9 */ s8 unk_3F9[0x404 - 0x3F9];
int getZoneNo() const { return mZoneNo; }
/* 80028360 */ ~dStage_roomStatus_c() {}
@@ -487,6 +490,10 @@ public:
STATIC_ASSERT(sizeof(dStage_roomStatus_c) == 0x404);
extern s8 struct_80450D64; // sStayNo
extern s8 sLastStayNo;
extern s8 sNextStayNo;
extern s8 sTimePass;
extern u8 data_80450D68;
class dStage_roomControl_c {
public:
@@ -505,24 +512,29 @@ public:
void init(void);
static int getZoneNo(int room);
/* 80024338 */ void initZone();
/* 80024384 */ void getStatusRoomDt(int);
/* 800243B0 */ void getMemoryBlock(int);
/* 80024384 */ dStage_roomStatus_c* getStatusRoomDt(int);
/* 800243B0 */ JKRExpHeap* getMemoryBlock(int);
/* 800243E8 */ static void setStayNo(int);
/* 80024424 */ static void setNextStayNo(int);
/* 800244E8 */ void checkRoomDisp(int) const;
/* 800244E8 */ bool checkRoomDisp(int) const;
/* 8002451C */ void loadRoom(int, u8*, bool);
/* 8002471C */ void zoneCountCheck(int) const;
/* 80024844 */ static JKRExpHeap* createMemoryBlock(int, u32);
/* 800248A8 */ void destroyMemoryBlock();
/* 8002490C */ void setArcBank(int, char const*);
/* 80024940 */ void getArcBank(int);
/* 80024954 */ void resetArchiveBank(int);
/* 8002490C */ static void setArcBank(int, char const*);
/* 80024940 */ static char* getArcBank(int);
/* 80024954 */ static int resetArchiveBank(int);
/* 80024DB0 */ static void SetTimePass(int);
static s8 GetTimePass();
inline static s8 getStayNo() { return struct_80450D64; }
s8 getMemoryBlockID(int i_roomNo) { return mStatus[i_roomNo].mMemBlockID; }
bool checkStatusFlag(int i_roomNo, u8 flag) const {
return cLib_checkBit(mStatus[i_roomNo].unk_0x3F4, flag);
}
static JKRExpHeap* mMemoryBlock[19];
static u8 mArcBank[320];
static char mArcBank[32][10];
static dStage_roomStatus_c mStatus[0x40];
static u8 mDemoArcName[10 + 2 /* padding */];
static u32 mProcID;
@@ -539,7 +551,8 @@ public:
void set(const char*, s8, s16, s8);
inline char* getName() { return mStage; }
s8 getLayer() { return mLayer; }
s8 getRoomNo() { return mRoomNo; }
s8 getRoomNo() const { return mRoomNo; }
s16 getPoint() { return mPoint; }
private:
/* 0x0 */ char mStage[8];
@@ -577,7 +590,7 @@ public:
/* 0x004 */ stage_tgsc_data_class unk_0x4[0x40];
}; // Size = 0x904
typedef void (*dStage_Func)(dStage_dt_c*, void*, int, void*);
typedef int (*dStage_Func)(dStage_dt_c*, void*, int, void*);
struct FuncTable {
char identifier[8];
@@ -586,53 +599,53 @@ struct FuncTable {
const char* dStage_getName2(s16, s8);
dStage_objectNameInf* dStage_searchName(const char*);
static void dStage_stageKeepTresureInit(dStage_dt_c*, void*, int, void*);
static void dStage_filiInfo2Init(dStage_dt_c*, void*, int, void*);
static void dStage_mapPathInitCommonLayer(dStage_dt_c*, void*, int, void*);
static void dStage_mapPathInit(dStage_dt_c*, void*, int, void*);
static void dStage_memaInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_mecoInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_stagInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_soundInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_lgtvInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_envrInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_pselectInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_paletteInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_vrboxcolInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_roomDrtgInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_tgscInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_actorInit(dStage_dt_c*, void*, int, void*);
static void dStage_layerTresureInit(dStage_dt_c*, void*, int, void*);
static void dStage_elstInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_rppnInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_rpatInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_multInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_playerInit(dStage_dt_c*, void*, int, void*);
static void dStage_cameraInit(dStage_dt_c*, void*, int, void*);
static void dStage_actorInit_always(dStage_dt_c*, void*, int, void*);
static void dStage_roomReadInit(dStage_dt_c*, void*, int, void*);
static void dStage_arrowInit(dStage_dt_c*, void*, int, void*);
static void dStage_vrboxInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_sclsInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_tgscInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_plightInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_ppntInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_pathInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_filiInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_stageDrtgInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_floorInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_dmapInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_stEventInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_soundInfoInitCL(dStage_dt_c*, void*, int, void*);
static void dStage_RoomCameraInit(dStage_dt_c*, void*, int, void*);
static void dStage_lbnkInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_actorCommonLayerInit(dStage_dt_c*, void*, int, void*);
static void dStage_roomTresureInit(dStage_dt_c*, void*, int, void*);
static void dStage_tgscCommonLayerInit(dStage_dt_c*, void*, int, void*);
static void dStage_mapEventInfoInit(dStage_dt_c*, void*, int, void*);
static void dStage_fieldMapTresureInit(dStage_dt_c*, void*, int, void*);
static void dStage_fieldMapFiliInfo2Init(dStage_dt_c*, void*, int, void*);
static void dStage_fieldMapMapPathInit(dStage_dt_c*, void*, int, void*);
static int dStage_stageKeepTresureInit(dStage_dt_c*, void*, int, void*);
static int dStage_filiInfo2Init(dStage_dt_c*, void*, int, void*);
static int dStage_mapPathInitCommonLayer(dStage_dt_c*, void*, int, void*);
static int dStage_mapPathInit(dStage_dt_c*, void*, int, void*);
static int dStage_memaInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_mecoInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_stagInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_soundInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_lgtvInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_envrInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_pselectInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_paletteInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_vrboxcolInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_roomDrtgInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_tgscInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_actorInit(dStage_dt_c*, void*, int, void*);
static int dStage_layerTresureInit(dStage_dt_c*, void*, int, void*);
static int dStage_elstInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_rppnInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_rpatInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_multInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_playerInit(dStage_dt_c*, void*, int, void*);
static int dStage_cameraInit(dStage_dt_c*, void*, int, void*);
static int dStage_actorInit_always(dStage_dt_c*, void*, int, void*);
static int dStage_roomReadInit(dStage_dt_c*, void*, int, void*);
static int dStage_arrowInit(dStage_dt_c*, void*, int, void*);
static int dStage_vrboxInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_sclsInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_tgscInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_plightInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_ppntInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_pathInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_filiInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_stageDrtgInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_floorInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_dmapInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_stEventInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_soundInfoInitCL(dStage_dt_c*, void*, int, void*);
static int dStage_RoomCameraInit(dStage_dt_c*, void*, int, void*);
static int dStage_lbnkInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_actorCommonLayerInit(dStage_dt_c*, void*, int, void*);
static int dStage_roomTresureInit(dStage_dt_c*, void*, int, void*);
static int dStage_tgscCommonLayerInit(dStage_dt_c*, void*, int, void*);
static int dStage_mapEventInfoInit(dStage_dt_c*, void*, int, void*);
static int dStage_fieldMapTresureInit(dStage_dt_c*, void*, int, void*);
static int dStage_fieldMapFiliInfo2Init(dStage_dt_c*, void*, int, void*);
static int dStage_fieldMapMapPathInit(dStage_dt_c*, void*, int, void*);
u8 dStage_roomRead_dt_c_GetReverbStage(roomRead_class&, int);
+8 -8
View File
@@ -31,12 +31,12 @@ typedef int (*SkipFunc)(void*, int);
class dEvt_control_c {
public:
dEvt_control_c();
void orderOld(u16, u16, u16, u16, void*, void*, void const*);
void order(u16, u16, u16, u16, void*, void*, s16, u8);
bool orderOld(u16, u16, u16, u16, void*, void*, void const*);
bool order(u16, u16, u16, u16, void*, void*, s16, u8);
void setParam(dEvt_order_c*);
s32 beforeFlagProc(dEvt_order_c*);
void afterFlagProc(dEvt_order_c*);
void commonCheck(dEvt_order_c*, u16, u16);
int commonCheck(dEvt_order_c*, u16, u16);
void talkCheck(dEvt_order_c*);
void talkXyCheck(dEvt_order_c*);
void catchCheck(dEvt_order_c*);
@@ -45,8 +45,8 @@ public:
void demoEnd();
s32 potentialCheck(dEvt_order_c*);
void doorCheck(dEvt_order_c*);
void itemCheck(dEvt_order_c*);
void endProc();
int itemCheck(dEvt_order_c*);
int endProc();
void change();
void entry();
void reset(void*);
@@ -60,15 +60,15 @@ public:
void skipper();
void Step();
void moveApproval(void*);
void compulsory(void*, char const*, u16);
bool compulsory(void*, char const*, u16);
void remove();
void* getStageEventDt(); // ret type probably wrong, fix later
void sceneChange(int);
u32 getPId(void*);
void convPId(unsigned int);
void getStbDemoData(char*);
void searchMapEventData(u8, s32);
void searchMapEventData(u8);
static void searchMapEventData(u8, s32);
static void searchMapEventData(u8);
s16 runningEventID(s16);
void setPt1(void*);
void setPt2(void*);
+2
View File
@@ -69,6 +69,8 @@ public:
void specialStaffProc(dEvDtStaff_c*);
/* 0x00 */ s32 mEventNum;
/* 0x04 */ u8 field_0x4[0xA0];
/* 0xA4 */ int field_0xa4;
};
class dEvDtFlag_c {
+6 -4
View File
@@ -25,8 +25,8 @@ public:
void getSubstance(dEvDtData_c*, int);
dEvent_manager_c();
~dEvent_manager_c() {}
void create();
void setObjectArchive(char*);
int create();
bool setObjectArchive(char*);
void demoInit();
void roomInit(int);
void roomFinish(int);
@@ -37,7 +37,7 @@ public:
void endProc(s16, int);
void Sequencer();
void Experts();
void getEventData(s16);
dEvDtEvent_c* getEventData(s16);
dEvDtEvent_c* getEventData(s16, int);
int getEventIdx(char const*, u8, s32);
void getEventIdx(fopAc_ac_c*, u8);
@@ -67,13 +67,15 @@ public:
void ChkPresentEnd();
void checkStartDemo();
void setStartDemo(int param_0) { mEventException.setStartDemo(param_0); }
private:
/* 0x0000 */ dEvDtBase_c mEventList[11];
/* 0x018C */ s32 mCameraPlay;
/* 0x0190 */ dEvent_exception_c mEventException;
/* 0x019C */ cXyz mGoal;
/* 0x01A8 */ u8 field_0x1a8[2];
/* 0x01AA */ u16 field_0x1aa;
/* 0x01AA */ s16 field_0x1aa;
/* 0x01AC */ u8 field_0x1ac[4];
/* 0x01B0 */ u32 field_0x1b0;
/* 0x01B4 */ u32 field_0x1b4;
+3 -1
View File
@@ -11,6 +11,8 @@
#include "dolphin/types.h"
#include "m_Do/m_Do_ext.h"
void dKankyo_DayProc();
struct LIGHT_INFLUENCE {
/* 800CFC7C */ ~LIGHT_INFLUENCE();
/* 8019F4F8 */ LIGHT_INFLUENCE();
@@ -611,7 +613,7 @@ public:
/* 0x12C2 */ u8 field_0x12c2;
/* 0x12C3 */ u8 field_0x12c3;
/* 0x12C4 */ u8 field_0x12c4;
/* 0x12C5 */ u8 field_0x12c5;
/* 0x12C5 */ u8 mWeatherPalette;
/* 0x12C6 */ u8 field_0x12c6;
/* 0x12C7 */ u8 field_0x12c7;
/* 0x12C8 */ u8 field_0x12c8;
+17 -5
View File
@@ -25,11 +25,23 @@ public:
struct J2DPicture {};
struct JMSMesgEntry_c {};
struct J2DTextBox {
/* 8021C7F4 */ void getFont() const;
};
struct JMSMesgEntry_c {
/* 0x00 */ u32 mStringOffset;
/* 0x04 */ u16 mStringId;
/* 0x06 */ u16 field_0x04;
/* 0x08 */ u8 field_0x08;
/* 0x09 */ u8 field_0x09;
/* 0x0A */ u8 field_0x0a;
/* 0x0B */ u8 field_0x0b;
/* 0x0C */ u8 field_0x0c;
/* 0x0D */ u8 field_0x0d;
/* 0x0E */ u8 field_0x0e;
/* 0x0F */ u8 field_0x0f;
/* 0x10 */ u8 field_0x10;
/* 0x11 */ u8 field_0x11;
/* 0x12 */ u8 field_0x12;
/* 0x13 */ u8 field_0x13;
}; // Size: 0x14
struct dMenu_LetterData {
u16 mSubject;
File diff suppressed because it is too large Load Diff
+27 -7
View File
@@ -1,9 +1,13 @@
#ifndef D_PANE_D_PANE_CLASS_H
#define D_PANE_D_PANE_CLASS_H
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "d/pane/d_pane_class_alpha.h"
#include "dolphin/types.h"
void dPaneClass_showNullPane(J2DScreen*);
void dPaneClass_showNullPane(J2DPane*);
class CPaneMgr : public CPaneMgrAlpha {
public:
/* 80253A18 */ virtual ~CPaneMgr();
@@ -15,28 +19,44 @@ public:
/* 80253C08 */ void initiate(J2DPane*, JKRExpHeap*);
/* 80254018 */ void childPaneGetSize(J2DPane*);
/* 80254134 */ void childPaneSetSize(J2DPane*, f32, f32);
/* 802542E8 */ void getGlobalPosX();
/* 80254364 */ void getGlobalPosY();
/* 802542E8 */ f32 getGlobalPosX();
/* 80254364 */ f32 getGlobalPosY();
/* 80254458 */ void setBlackWhite(JUtility::TColor, JUtility::TColor);
/* 802545B0 */ void paneTrans(f32, f32);
/* 80254638 */ void paneScale(f32, f32);
/* 802547CC */ void scaleAnime(s16, f32, f32, u8);
/* 802547CC */ bool scaleAnime(s16, f32, f32, u8);
/* 802548BC */ void colorAnime(s16, JUtility::TColor, JUtility::TColor, JUtility::TColor,
JUtility::TColor, u8);
/* 80254C90 */ void getGlobalVtx(J2DPane*, f32 (*)[3][4], u8, bool, s16);
/* 80254EBC */ void getGlobalVtxCenter(J2DPane*, bool, s16);
/* 80254FB8 */ void getBounds(J2DPane*);
void translate(f32 x, f32 y) { getPanePtr()->translate(x, y); }
void scale(f32 h, f32 v) { getPanePtr()->scale(h, v); }
f32 getPosX() { return getPanePtr()->getBounds().i.x; }
f32 getPosY() { return getPanePtr()->getBounds().i.y; }
f32 getSizeX() { return getPanePtr()->getWidth(); }
f32 getSizeY() { return getPanePtr()->getHeight(); }
f32 getRotateZ() { return getPanePtr()->getRotateZ(); }
f32 getInitCenterPosX() { return mInitPos.x + mInitSize.x * 0.5f; }
f32 getInitCenterPosY() { return mInitPos.y + mInitSize.y * 0.5f; }
private:
/* 0x1C */ void* field_0x1c;
/* 0x1C */ void* mpFirstStackSize;
/* 0x20 */ void* field_0x20;
/* 0x24 */ JGeometry::TVec2<f32> mInitPos;
/* 0x2C */ JGeometry::TVec2<f32> mGlobalPos;
/* 0x34 */ JGeometry::TVec2<f32> mInitSize;
/* 0x3C */ JGeometry::TVec2<f32> mInitScale;
/* 0x44 */ JGeometry::TVec2<f32> field_0x44;
/* 0x4C */ f32 field_0x4c;
/* 0x50 */ JGeometry::TVec2<f32> field_0x50;
/* 0x44 */ JGeometry::TVec2<f32> mInitTrans;
/* 0x4C */ f32 mRotateZ;
/* 0x50 */ JGeometry::TVec2<f32> mRotateOffset;
/* 0x58 */ JUtility::TColor mInitWhite;
/* 0x5C */ JUtility::TColor mInitBlack;
/* 0x60 */ s16 field_0x60;
+9 -6
View File
@@ -2,6 +2,7 @@
#define D_PANE_D_PANE_CLASS_ALPHA_H
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/J2DGraph/J2DWindow.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "dolphin/types.h"
@@ -26,7 +27,7 @@ public:
/* 802555C8 */ void show();
/* 80255608 */ void hide();
/* 8025564C */ void isVisible();
/* 80255658 */ void rateCalc(s16, s16, u8);
/* 80255658 */ f32 rateCalc(s16, s16, u8);
/* 802557D0 */ void setAlphaRate(f32);
/* 80255828 */ void getAlphaRate();
/* 80255878 */ void alphaAnime(s16, u8, u8, u8);
@@ -35,11 +36,13 @@ public:
/* 80255ACC */ void childPaneGetAlpha(J2DPane*);
/* 80255B5C */ void childPaneSetAlpha(J2DPane*, u8);
private:
/* 0x04 */ J2DPane* mPanePtr;
/* 0x08 */ JKRHeap* heap;
/* 0x0C */ void* field_0x0c;
/* 0x10 */ int field_0x10;
J2DPane* getPanePtr() { return (J2DPane*)mWindow; }
u8 getAlpha() { return getPanePtr()->getAlpha(); }
/* 0x04 */ J2DWindow* mWindow;
/* 0x08 */ JKRExpHeap* heap;
/* 0x0C */ void* mpFirstStackAlpha;
/* 0x10 */ void* field_0x10;
/* 0x14 */ s16 mChildPaneCount;
/* 0x16 */ s16 mAlphaTimer;
/* 0x18 */ u8 mInitAlpha;
+18 -3
View File
@@ -260,6 +260,13 @@ typedef enum _GXTevColorArg {
/* 0xF */ GX_CC_ZERO,
} GXTevColorArg;
typedef enum _GXTevColor {
/* 0x0 */ GX_CH_RED,
/* 0x1 */ GX_CH_BLUE,
/* 0x2 */ GX_CH_GREEN,
/* 0x3 */ GX_CH_ALPHA,
} GXTevColor;
typedef enum _GXTevScale {
/* 0x0 */ GX_CS_SCALE_1,
/* 0x1 */ GX_CS_SCALE_2,
@@ -284,7 +291,7 @@ typedef enum _GXTevAlphaArg {
/* 0x6 */ GX_CA_ZERO,
} GXTevAlphaArg;
struct GXRenderModeObj {
struct _GXRenderModeObj {
s32 vi_tv_mode;
u16 fb_width;
u16 efb_height;
@@ -418,16 +425,24 @@ typedef enum GXTlutFmt {
GX_TL_RGB5A3,
} GXTlutFmt;
enum GXCITexFmt {
/* 0x8 */ GX_TF_C4 = 8,
/* 0x8 */ GX_TF_C8,
/* 0xA */ GX_TF_C14X2
};
extern "C" {
f32 GXGetYScaleFactor(u16 efb_height, u16 xfb_height);
u16 GXGetNumXfbLines(u32 efb_height, f32 y_scale);
void GXBegin(u8, u8, u16);
void GXLoadTexObj(_GXTexObj*, _GXTexMapID);
void GXInitTexObjLOD(_GXTexObj, GXTexFilter, GXTexFilter, f32, f32, f32, s32, s32, GXAnisotropy);
void GXInitTexObj(_GXTexObj, void*, u16, u16, GXTexFmt, GXTexWrapMode, GXTexWrapMode, s32);
void GXInitTexObjLOD(_GXTexObj*, GXTexFilter, GXTexFilter, f32, f32, f32, s32, s32, GXAnisotropy);
void GXInitTexObj(_GXTexObj*, void*, u16, u16, GXTexFmt, GXTexWrapMode, GXTexWrapMode, s32);
void GXInitTlutObj(_GXTlutObj*, void*, GXTlutFmt, u16);
void GXLoadTlut(_GXTlutObj*, u32);
void GXInitTexObjCI(_GXTexObj*, void*, u16, u16, GXCITexFmt, GXTexWrapMode, GXTexWrapMode, s32,
u32);
void GXSetNumChans(u32);
void GXSetNumTevStages(u32);
+38
View File
@@ -1,6 +1,44 @@
#ifndef F_AP_F_AP_GAME_H
#define F_AP_F_AP_GAME_H
#include "JSystem/JUtility.h"
#include "dolphin/types.h"
void fapGm_After();
class fapGm_HIO_c {
public:
/* 80018944 */ fapGm_HIO_c();
/* 80018AE0 */ virtual ~fapGm_HIO_c();
/* 0x04 */ s8 field_0x04;
/* 0x05 */ u8 field_0x03[3];
/* 0x08 */ JUtility::TColor mColor;
/* 0x0C */ f32 field_0xc;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ bool mUsingHostIO;
/* 0x15 */ bool mDisplayMeter;
/* 0x16 */ bool mDisplayPrint;
/* 0x17 */ bool mDisplay2D;
/* 0x18 */ bool mDisplayParticle;
/* 0x19 */ bool mDisplayProcessID;
/* 0x1A */ bool mMemBlockOff;
/* 0x1C */ s16 mRegister0;
/* 0x1E */ s16 mRegister1;
/* 0x20 */ s16 mRegister2;
/* 0x22 */ s16 mRegister3;
/* 0x24 */ JUtility::TColor mLetterTopColor;
/* 0x28 */ JUtility::TColor mLetterBottomColor;
/* 0x2C */ JUtility::TColor mLetterTopShadowColor;
/* 0x30 */ JUtility::TColor mLetterBottomShadowColor;
/* 0x34 */ u16 mLetterPositionX;
/* 0x36 */ u16 mLetterPositionY;
/* 0x38 */ u16 mLineSpacing;
/* 0x3A */ u16 mLetterSpacing;
/* 0x3C */ u16 mLetterFontSize;
/* 0x3E */ u8 mBackgroundAlpha;
}; // Size: 0x40
extern fapGm_HIO_c g_HIO;
#endif /* F_AP_F_AP_GAME_H */
+1 -1
View File
@@ -14,7 +14,7 @@ public:
dEvt_info_c();
virtual ~dEvt_info_c();
void setEventName(char*);
void getEventName();
s16 getEventName();
void beforeProc();
void onCondition(u16);
void offCondition(u16);
+13
View File
@@ -8,6 +8,7 @@
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/types.h"
#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_iter.h"
#include "f_pc/f_pc_executor.h"
#include "f_pc/f_pc_fstcreate_req.h"
#include "f_pc/f_pc_manager.h"
@@ -99,6 +100,18 @@ inline u32 fopAcM_GetParam(const void* pActor) {
return fpcM_GetParam(pActor);
}
inline void fopAcM_OnStatus(fopAc_ac_c* pActor, u32 flag) {
pActor->mStatus |= flag;
}
inline void fopAcM_OffStatus(fopAc_ac_c* pActor, u32 flag) {
pActor->mStatus &= ~flag;
}
inline fopAc_ac_c* fopAcM_SearchByID(unsigned int id) {
return (fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)fpcSch_JudgeByID, &id);
}
void* fopAcM_FastCreate(s16 pProcTypeID, FastCreateReqFunc param_2, void* param_3, void* pData);
void fopAcM_setStageLayer(void*);
int fopAcM_setRoomLayer(void*, int);
+1
View File
@@ -6,5 +6,6 @@
extern node_lists_tree_class g_fopDwTg_Queue;
void fopDwTg_DrawQTo(create_tag_class* pTag);
void fopDwTg_CreateQueue();
#endif
+1
View File
@@ -22,5 +22,6 @@ int fopOvlpM_IsDoingReq(void);
int fopOvlpM_ClearOfReq(void);
request_base_class* fopOvlpM_Request(s16 param_1, u16 param_2);
int fopOvlpM_Cancel(void);
void fopOvlpM_Init();
#endif
+44
View File
@@ -1,6 +1,50 @@
#ifndef M_DO_M_DO_MEMCARD_H
#define M_DO_M_DO_MEMCARD_H
#include "dolphin/os/OS.h"
#include "dolphin/types.h"
#include "global.h"
class mDoMemCd_Ctrl_c {
public:
/* 8001672C */ mDoMemCd_Ctrl_c();
/* 80016730 */ void ThdInit();
/* 800167D0 */ void main();
/* 80016894 */ void update();
/* 800169B4 */ void load();
/* 80016A0C */ void restore();
/* 80016AB0 */ void LoadSync(void*, u32, u32);
/* 80016B58 */ void save(void*, u32, u32);
/* 80016BD4 */ void store();
/* 80016CE0 */ void SaveSync();
/* 80016D74 */ void getStatus(u32);
/* 80016E58 */ void command_format();
/* 80016EA8 */ void format();
/* 80016F2C */ void FormatSync();
/* 80016FB8 */ void attach();
/* 800170B8 */ void command_attach();
/* 80017110 */ void detach();
/* 80017148 */ void mount();
/* 80017274 */ void loadfile();
/* 800172D4 */ void checkspace();
/* 80017360 */ void setCardState(s32);
/* 0x0000 */ u8 field_0x0[0x1FBC];
/* 0x1FBC */ u8 field_0x1fbc;
/* 0x1FBD */ u8 mCopyToPos;
/* 0x1FBE */ u8 mProbeStat;
/* 0x1FC0 */ u32 field_0x1fc0;
/* 0x1FC4 */ u32 field_0x1fc4;
/* 0x1FC8 */ u32 field_0x1fc8;
/* 0x1FCC */ OSMutex field_0x1fcc;
/* 0x1FE4 */ OSCond field_0x1fe4;
/* 0x1FEC */ u32 mNandState;
/* 0x1FF0 */ u64 field_0x1ff0;
/* 0x1FF8 */ u32 mDataVersion;
}; // Size: 0x2000
STATIC_ASSERT(sizeof(mDoMemCd_Ctrl_c) == 8192);
extern mDoMemCd_Ctrl_c g_mDoMemCd_control;
#endif /* M_DO_M_DO_MEMCARD_H */
+8 -1
View File
@@ -3,6 +3,9 @@
#include "dolphin/types.h"
void mDoRst_reset(int, u32, int);
void mDoRst_resetCallBack(int, void*);
struct mDoRstData {
/* 0x00 */ int mReset;
/* 0x04 */ int mResetPrepare;
@@ -27,7 +30,10 @@ public:
static void set3ButtonResetPort(int port) { mResetData->m3ButtonResetPort = port; }
static void off3ButtonReset() { mResetData->m3ButtonReset = 0; }
static void offResetPrepare() { mResetData->mResetPrepare = 0; }
static void offReset() { mResetData->mReset = 0; }
static void offReset() {
mResetData->mReset = 0;
mResetData->mResetPrepare = 0;
}
static u8 getLogoScnFlag() { return mResetData->mLogoScnFlag; }
static bool isReturnToMenu() { return mResetData->mReturnToMenu; }
static bool isShutdown() { return mResetData->mShutdown; }
@@ -40,6 +46,7 @@ public:
static void onShutdown() { mResetData->mShutdown = true; }
static mDoRstData* getResetData();
static mDoRstData* i_getResetData() { return mResetData; }
static void setResetData(mDoRstData* rstData) { mResetData = rstData; }
static mDoRstData* mResetData;
+18 -3
View File
@@ -4,14 +4,15 @@
#include "JSystem/JUtility/JUTGamePad.h"
#include "SSystem/SComponent/c_API_controller_pad.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_Reset.h"
class mDoCPd_c {
public:
enum { PAD_0, PAD_1, PAD_2, PAD_3 };
void create();
void read();
void convert(interface_of_controller_pad*, JUTGamePad*);
static void create();
static void read();
static void convert(interface_of_controller_pad*, JUTGamePad*);
void LRlockCheck(interface_of_controller_pad*);
void recalibrate();
@@ -61,4 +62,18 @@ public:
static interface_of_controller_pad m_cpadInfo[4];
};
inline void mDoCPd_ANALOG_CONV(u8 analog, f32& param_1) {
param_1 = analog * (1.0f / 15.0f);
if (param_1 > 1.0f) {
param_1 = 1.0f;
}
}
inline void mDoCPd_TRIGGER_CONV(u8 analog, f32& param_1) {
param_1 = analog * 0.0071428571827709675f;
if (param_1 > 1.0f) {
param_1 = 1.0f;
}
}
#endif /* M_DO_M_DO_CONTROLLER_PAD_H */
+4 -1
View File
@@ -10,7 +10,7 @@
typedef void* (*mDoDvdThd_callback_func)(void*);
class mDoDvdThd_command_c : public node_class {
protected:
public:
/* 0x0C */ bool mIsDone;
/* 0x10 vtable*/
public:
@@ -74,6 +74,9 @@ public:
/* 80015E14 */ static mDoDvdThd_mountArchive_c* create(char const*, u8, JKRHeap*);
/* 80015EDC */ virtual s32 execute();
JKRMemArchive* getArchive() const { return mArchive; }
JKRHeap* getHeap() const { return mHeap; }
private:
/* 0x14 */ u8 mMountDirection;
/* 0x18 */ s32 mEntryNumber;
+10 -1
View File
@@ -129,7 +129,7 @@ JKRSolidHeap* mDoExt_createSolidHeapFromGame(u32, u32);
void mDoExt_destroySolidHeap(JKRSolidHeap*);
u32 mDoExt_adjustSolidHeap(JKRSolidHeap*);
void mDoExt_restoreCurrentHeap();
JKRHeap* mDoExt_getGameHeap();
JKRExpHeap* mDoExt_getGameHeap();
void mDoExt_destroySolidHeap(JKRSolidHeap*);
JKRHeap* mDoExt_setCurrentHeap(JKRHeap*);
JKRExpHeap* mDoExt_getArchiveHeap();
@@ -139,5 +139,14 @@ JKRAssertHeap* mDoExt_getAssertHeap();
JKRExpHeap* mDoExt_getCommandHeap();
JKRExpHeap* mDoExt_getZeldaHeap();
JKRExpHeap* mDoExt_getJ2dHeap();
JKRExpHeap* mDoExt_getHostIOHeap();
JKRSolidHeap* mDoExt_createSolidHeapToCurrent(JKRHeap**, u32, JKRHeap*, u32);
JKRSolidHeap* mDoExt_createSolidHeapToCurrent(u32, JKRHeap*, u32);
JKRSolidHeap* mDoExt_createSolidHeapFromGameToCurrent(u32, u32);
JKRHeap* mDoExt_getCurrentHeap();
extern JKRExpHeap* zeldaHeap;
extern JKRExpHeap* gameHeap;
extern JKRExpHeap* archiveHeap;
#endif /* M_DO_M_DO_EXT_H */
+2
View File
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
void mDoGph_Create();
#endif /* M_DO_M_DO_GRAPHIC_H */
+12
View File
@@ -1,6 +1,18 @@
#ifndef M_DO_M_DO_MACHINE_H
#define M_DO_M_DO_MACHINE_H
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JUtility/JUTGamePad.h"
#include "JSystem/JUtility/JUTVideo.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_Reset.h"
#include "m_Do/m_Do_main.h"
void myHeapCheckRecursive(JKRHeap*);
u8 mDoMch_IsProgressiveMode();
bool exceptionReadPad(u32*, u32*);
void exceptionRestart();
void myExceptionCallback(u16, OSContext*, u32, u32);
void my_SysPrintHeap(char const*, void*, u32);
#endif /* M_DO_M_DO_MACHINE_H */
+6
View File
@@ -3,4 +3,10 @@
#include "dolphin/types.h"
void print(char const*);
void dispHeapInfo();
void dispGameInfo();
void dispDateInfo();
void dispConsoleToTerminal();
#endif /* M_DO_M_DO_MACHINE_EXCEPTION_H */
+16 -3
View File
@@ -2,13 +2,18 @@
#define M_DO_M_DO_MAIN_H
#include "JSystem/JKernel/JKRExpHeap.h"
#include "dolphin/dvd/dvd.h"
#include "dolphin/types.h"
void version_check();
void* LOAD_COPYDATE(void*);
class HeapCheck {
public:
void CheckHeap1(void);
s32 getUsedCount(void) const;
void heapDisplay(void) const;
u32& getUsedCountRef() { return mUsedCount; }
u32& getTotalUsedSizeRef() { return mTotalUsedSize; }
JKRExpHeap* getHeap() { return mHeap; }
@@ -16,6 +21,11 @@ public:
void setHeapSize(u32 i_size) { mTargetHeapSize = i_size; }
s32 getMaxTotalUsedSize() { return mMaxTotalUsedSize; }
s32 getMaxTotalFreeSize() { return mMaxTotalFreeSize; }
char* getName() const { return mName; }
void saveRelBase() {
mUsedCount = getUsedCount();
mTotalUsedSize = mHeap->getTotalUsedSize();
}
private:
/* 0x00 */ char* mName;
@@ -30,10 +40,13 @@ private:
};
struct mDoMain {
static u8 COPYDATE_STRING[18 + 2 /* padding */];
static char COPYDATE_STRING[18];
static u32 memMargin;
static u8 sPowerOnTime[4]; // should be OSTime
static u8 sHungUpTime[4]; // should be OSTime
static u8 mHeapBriefType;
static OSTime sPowerOnTime;
static OSTime sHungUpTime;
};
extern s8 data_80450580;
#endif /* M_DO_M_DO_MAIN_H */
+56
View File
@@ -1,6 +1,62 @@
#ifndef M_DO_M_DO_MTX_H
#define M_DO_M_DO_MTX_H
#include "SSystem/SComponent/c_Xyz.h"
#include "SSystem/SComponent/c_sXyz.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx/quat.h"
#include "dolphin/types.h"
void mDoMtx_XYZrotS(Mtx, s16, s16, s16);
void mDoMtx_XYZrotM(Mtx, s16, s16, s16);
void mDoMtx_ZXYrotS(Mtx, s16, s16, s16);
void mDoMtx_ZXYrotM(Mtx, s16, s16, s16);
void mDoMtx_ZrotS(Mtx, s16);
void mDoMtx_YrotS(Mtx, s16);
void mDoMtx_XrotS(Mtx, s16);
class mDoMtx_stack_c {
public:
/* 8000CCC8 */ bool push();
/* 8000CD14 */ bool pop();
/* 8000CD64 */ static void transS(cXyz const&);
/* 8000CDD4 */ static void transM(cXyz const&);
/* 8000CD9C */ static void transM(f32, f32, f32);
/* 8000CE00 */ static void scaleS(cXyz const&);
/* 8000CE70 */ static void scaleM(cXyz const&);
/* 8000CE38 */ static void scaleM(f32, f32, f32);
/* 8000CE9C */ static void XYZrotS(csXyz const&);
/* 8000CED4 */ static void XYZrotM(csXyz const&);
/* 8000CF0C */ static void ZXYrotS(csXyz const&);
/* 8000CF44 */ static void ZXYrotM(csXyz const&);
/* 8000CF7C */ static void quatM(Quaternion const*);
/* 8000D070 */ ~mDoMtx_stack_c(); // inline
Mtx* get() { return &now; }
static void transS(f32 x, f32 y, f32 z) { PSMTXTrans(now, x, y, z); }
static void scaleS(f32 x, f32 y, f32 z) { PSMTXScale(now, x, y, z); }
static void XYZrotS(s16 x, s16 y, s16 z) { mDoMtx_XYZrotS(now, x, y, z); }
static void XYZrotM(s16 x, s16 y, s16 z) { mDoMtx_XYZrotM(now, x, y, z); }
static void ZXYrotS(s16 x, s16 y, s16 z) { mDoMtx_ZXYrotS(now, x, y, z); }
static void ZXYrotM(s16 x, s16 y, s16 z) { mDoMtx_ZXYrotM(now, x, y, z); }
static Mtx now;
static Mtx buffer[16];
static Mtx* next;
static Mtx* end;
};
class mDoMtx_quatStack_c {
public:
~mDoMtx_quatStack_c(); // inline
/* 0x000 */ mDoMtx_quatStack_c* field_0x0;
/* 0x004 */ mDoMtx_quatStack_c* field_0x4;
/* 0x008 */ u8 field_0x8[0xC];
/* 0x014 */ mDoMtx_quatStack_c* field_0x14;
/* 0x018 */ u8 field_0x18[0xFC];
/* 0x114 */ mDoMtx_quatStack_c* field_0x114;
/* 0x118 */ mDoMtx_quatStack_c* field_0x118;
}; // Size: 0x11C
#endif /* M_DO_M_DO_MTX_H */
+4
View File
@@ -1,6 +1,10 @@
#ifndef M_DO_M_DO_PRINTF_H
#define M_DO_M_DO_PRINTF_H
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/char_io.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
#include "dolphin/types.h"
void my_PutString(const char*);
#endif /* M_DO_M_DO_PRINTF_H */
+2
View File
@@ -10,6 +10,7 @@ char* strrchr(const char* s, int c);
char* strchr(const char* s, int c);
int strncmp(const char* s1, const char* s2, u32 n);
int strcmp(const char* s1, const char* s2);
int stricmp(const char*, const char*);
char* strcat(char* dest, const char* source);
char* strncpy(char* dest, const char* source, u32 n);
char* strcpy(char* dest, const char* source);
@@ -17,6 +18,7 @@ u32 strlen(const char* s);
int tolower(int);
int sprintf(char*, const char*, ...);
int printf(const char*, ...);
int snprintf(char*, u32, const char*, ...);
}
#endif