Skip to content

Commit

Permalink
d_ovlp_fade4 work
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Jul 13, 2024
1 parent 19f9d52 commit 31c60bc
Show file tree
Hide file tree
Showing 3 changed files with 317 additions and 62 deletions.
67 changes: 44 additions & 23 deletions include/d/d_ovlp_fade4.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ class dDlst_snapShot2_c : public dDlst_base_c {
~dDlst_snapShot2_c() {}
void draw();

/* 0x04 */ void* field_0x4;
/* 0x08 */ u16 field_0x8;
/* 0x0A */ u16 field_0xa;
void init(void* imagePtr, u16 w, u16 h) { mImagePtr = imagePtr; mWidth = w; mHeight = h; }
void setImagePtr(void* imagePtr) { mImagePtr = imagePtr; }
void setWd(u16 w) { mWidth = w; }
void setHt(u16 h) { mHeight = h; }
u16 getWd() { return mWidth; }
u16 getHt() { return mHeight; }

/* 0x04 */ void* mImagePtr;
/* 0x08 */ u16 mWidth;
/* 0x0A */ u16 mHeight;
};

class dDlst_2Dt_Sp_c : public dDlst_base_c {
Expand All @@ -20,17 +27,25 @@ class dDlst_2Dt_Sp_c : public dDlst_base_c {
void draw();
void init(ResTIMG*, f32, f32, f32, f32, GXColor);

/* 0x04 */ GXTexObj field_0x4;
/* 0x24 */ ResTIMG* field_0x24;
/* 0x28 */ void* field_0x28;
/* 0x2C */ u32 field_0x2c;
/* 0x30 */ u32 field_0x30;
/* 0x34 */ f32 field_0x34;
/* 0x38 */ f32 field_0x38;
/* 0x3C */ f32 field_0x3c;
/* 0x40 */ f32 field_0x40;
/* 0x44 */ GXColor field_0x44;
/* 0x48 */ f32 field_0x48;
void setPos(f32 x, f32 y) { mPosX = x; mPosY = y; }
void setWidth(f32 w) { mWidth = w; }
void setHeight(f32 h) { mHeight = h; }
void setImageWidth(u32 w) { mImageWidth = w; }
void setImageHeight(u32 h) { mImageHeight = h; }
void setImagePtr(void* v) { mImagePtr = v; }
void setPer(f32 f) { mPercent = f; }

/* 0x04 */ GXTexObj mTexObj;
/* 0x24 */ ResTIMG* mTimg;
/* 0x28 */ void* mImagePtr;
/* 0x2C */ u32 mImageWidth;
/* 0x30 */ u32 mImageHeight;
/* 0x34 */ f32 mPosX;
/* 0x38 */ f32 mPosY;
/* 0x3C */ f32 mWidth;
/* 0x40 */ f32 mHeight;
/* 0x44 */ GXColor mColor;
/* 0x48 */ f32 mPercent;
};

class dDlst_2DtEff1_c : public dDlst_base_c {
Expand All @@ -40,15 +55,15 @@ class dDlst_2DtEff1_c : public dDlst_base_c {
void draw();

/* 0x004 */ f32 field_0x4;
/* 0x008 */ u8 field_0x8[0xC - 0x8];
/* 0x008 */ u8 field_0x8;
/* 0x00C */ dDlst_snapShot2_c field_0xc;
/* 0x018 */ dDlst_2Dt_Sp_c field_0x18;
/* 0x064 */ dDlst_snapShot2_c field_0x64;
/* 0x070 */ dDlst_2Dt_Sp_c field_0x70;
/* 0x0BC */ dDlst_snapShot2_c field_0xbc;
/* 0x0C8 */ dDlst_2Dt_Sp_c field_0xc8;
/* 0x114 */ short field_0x114;
/* 0x118 */ short field_0x118;
/* 0x114 */ u16 field_0x114;
/* 0x116 */ u16 field_0x116;
};

class dOvlpFd4_c : public overlap_task_class {
Expand All @@ -61,22 +76,28 @@ class dOvlpFd4_c : public overlap_task_class {
void execNextSnap();
void execFadeIn();

/* 0x0CC */ void (dOvlpFd4_c::*field_0xcc)();
/* 0x0D8 */ void (dOvlpFd4_c::*field_0xd8)();
typedef void (dOvlpFd4_c::*DrawFunc)();
typedef void (dOvlpFd4_c::*ExecuteFunc)();

void setDraw(DrawFunc func) { mDrawFunc = func; }
void setExecute(ExecuteFunc func) { mExecuteFunc = func; }

/* 0x0CC */ ExecuteFunc mExecuteFunc;
/* 0x0D8 */ DrawFunc mDrawFunc;
/* 0x0E4 */ dDlst_snapShot2_c field_0xe4;
/* 0x0F0 */ dDlst_snapShot2_c field_0xf0;
/* 0x0FC */ dDlst_2Dt_Sp_c field_0xfc;
/* 0x148 */ dDlst_2Dt_Sp_c field_0x148;
/* 0x194 */ dDlst_2DtEff1_c field_0x194;
/* 0x194 */ dDlst_2DtEff1_c tEff1_dlst;
/* 0x2AC */ u8 field_0x2ac;
/* 0x2AD */ u8 field_0x2ad;
/* 0x2AE */ u8 field_0x2ae;
/* 0x2B0 */ short field_0x2b0;
/* 0x2AE */ s8 field_0x2ae;
/* 0x2B0 */ s16 field_0x2b0;
/* 0x2B4 */ f32 field_0x2b4;
/* 0x2B8 */ u8 field_0x2b8[0x2BC - 0x2B8];
/* 0x2BC */ f32 field_0x2bc;
/* 0x2C0 */ u8 field_0x2c0;
/* 0x2C1 */ u8 field_0x2c1;
/* 0x2C1 */ s8 field_0x2c1;
/* 0x2C2 */ u8 field_0x2c2[0x2C8 - 0x2C2];
/* 0x2C8 */ f32 field_0x2c8;
/* 0x2CC */ u8 field_0x2cc;
Expand Down
1 change: 1 addition & 0 deletions include/dolphin/gx/GXTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ void GXInitTexObjCI(GXTexObj* obj, void* image, u16 width, u16 height, GXCITexFm
void GXInitTexObjLOD(GXTexObj* obj, GXTexFilter min_filter, GXTexFilter max_filter, f32 min_lod,
f32 max_lod, f32 lod_bias, GXBool bias_clamp, GXBool edge_lod,
GXAnisotropy aniso);
void* GXGetTexObjData(GXTexObj* obj);
u16 GXGetTexObjWidth(GXTexObj* obj);
u16 GXGetTexObjHeight(GXTexObj* obj);
GXTexFmt GXGetTexObjFmt(GXTexObj* obj);
Expand Down
Loading

0 comments on commit 31c60bc

Please sign in to comment.