diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-04-12 23:18:11 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-04-12 23:18:11 -0400 |
| commit | 780d4e680adcc37edc87c300f1c1951e2490a0a7 (patch) | |
| tree | 9c56419c41e6f8fcf6a0867abada6fc91a129cd9 /include | |
| parent | 1f1900bf669a5f14afa430d95fef7f2bf28a2076 (diff) | |
d_drawlist OK, J2DPicture inline cleanup
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPicture.h | 25 | ||||
| -rw-r--r-- | include/JSystem/JUtility/TColor.h | 2 | ||||
| -rw-r--r-- | include/d/d_com_inf_game.h | 6 | ||||
| -rw-r--r-- | include/d/d_drawlist.h | 17 |
4 files changed, 41 insertions, 9 deletions
diff --git a/include/JSystem/J2DGraph/J2DPicture.h b/include/JSystem/J2DGraph/J2DPicture.h index 1efedbf7..06fb257b 100644 --- a/include/JSystem/J2DGraph/J2DPicture.h +++ b/include/JSystem/J2DGraph/J2DPicture.h @@ -26,6 +26,10 @@ enum J2DMirror { class J2DPicture : public J2DPane { public: + struct TCornerColor { + // TODO + }; + J2DPicture(); J2DPicture(J2DPane*, JSURandomInputStream*); J2DPicture(const ResTIMG*); @@ -51,15 +55,21 @@ public: void initinfo(); bool insert(const ResTIMG*, u8, f32); bool insert(const char*, u8, f32); + bool append(const ResTIMG* timg, f32 param_1) { return insert(timg, mNumTexture, param_1); } + bool append(const char* name, f32 param_1) { return insert(name, mNumTexture, param_1); } bool remove(u8); + bool remove() { return remove(mNumTexture - 1); } const ResTIMG * changeTexture(const ResTIMG*, u8); const ResTIMG * changeTexture(const char*, u8); void drawFullSet(f32, f32, f32, f32, J2DBinding, J2DMirror, bool, Mtx*); void draw(f32, f32, f32, f32, bool, bool, bool); - void draw(f32 x, f32 y, bool mirrorX, bool mirrorY, bool tumble) { - if (mNumTexture > 0) + void draw(f32 x, f32 y, u8 i, bool mirrorX, bool mirrorY, bool tumble) { + if (i < mNumTexture) draw(x, y, mpTexture[0]->getWidth(), mpTexture[0]->getHeight(), mirrorX, mirrorY, tumble); } + void draw(f32 x, f32 y, bool mirrorX, bool mirrorY, bool tumble) { + draw(x, y, 0, mirrorX, mirrorY, tumble); + } void drawOut(const JGeometry::TBox2<f32>&, const JGeometry::TBox2<f32>&); void drawTexCoord(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, Mtx*); void setTevMode(); @@ -101,14 +111,19 @@ public: } void setCornerColor(JUtility::TColor c) { setCornerColor(c, c, c, c); } - u8 getNumTexture() { return mNumTexture; } - void setBinding(J2DBinding v) { mBinding = v; } void setMirror(J2DMirror v) {} // untested { mFlag = (mFlag & ~0x03) | v; } J2DMirror getMirror() const { return J2DMirror(mFlag & 0x03); } void setTumble(bool v) {} // untested { mFlag = (mFlag & ~0x04) | (v << 2); } - bool isTumble() const { return mFlag >> 2 & 1; } + bool isTumble() const { return mFlag & 0x04; } + + void load(u8 i) { mpTexture[i]->load((GXTexMapID)i); } + + // TODO + void getBlack() const {} + void getCornerColor(J2DPicture::TCornerColor&) const {} + void getWhite() const {} protected: /* 0x0CC */ JUTTexture* mpTexture[4]; diff --git a/include/JSystem/JUtility/TColor.h b/include/JSystem/JUtility/TColor.h index b0d1ccc3..a9e35a7e 100644 --- a/include/JSystem/JUtility/TColor.h +++ b/include/JSystem/JUtility/TColor.h @@ -31,4 +31,4 @@ struct TColor : public GXColor { }; } // namespace JUtility -#endif
\ No newline at end of file +#endif diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index ca679ef4..5b363318 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -507,8 +507,8 @@ public: u8 getPictureStatus() { return mPictureStatus; } void setPictureStatusOn() { mPictureStatus = 2; } - u8 getScopeMesgStatus() { return mbCamOverrideFarPlane; } - void setScopeMesgStatus(u8 status) { mbCamOverrideFarPlane = status; } + u8 getScopeMesgStatus() { return mScopeMesgStatus; } + void setScopeMesgStatus(u8 status) { mScopeMesgStatus = status; } void setCurrentGrafPort(J2DOrthoGraph* i_graf) { mCurrentGrafPort = i_graf; } void setCurrentWindow(dDlst_window_c* i_window) { mCurrentWindow = i_window; } @@ -739,7 +739,7 @@ public: /* 0x4928 */ bool mItemSwimTimerStatus; /* 0x4929 */ u8 field_0x4929; /* 0x492A */ u8 mMesgStatus; - /* 0x492B */ u8 mbCamOverrideFarPlane; + /* 0x492B */ u8 mScopeMesgStatus; /* 0x492C */ u8 field_0x492c; /* 0x492D */ u8 field_0x492d; /* 0x492E */ u8 mCurrButtonBAction; diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index d90d57d8..e0b17751 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -3,6 +3,7 @@ #include "JSystem/J3DGraphBase/J3DDrawBuffer.h" #include "JSystem/J2DGraph/J2DPicture.h" +#include "SSystem/SComponent/c_bg_s_shdw_draw.h" #include "f_op/f_op_view.h" #include "m_Do/m_Do_ext.h" #include "SSystem/SComponent/c_rnd.h" @@ -393,6 +394,22 @@ private: STATIC_ASSERT(sizeof(dDlst_shadowControl_c) == 0x15E28); +class ShdwDrawPoly_c : public cBgS_ShdwDraw { +public: + virtual ~ShdwDrawPoly_c() {} + + void setCenter(cXyz* center) { mCenter = center; } + cXyz* getCenter() { return mCenter; } + void setLightVec(cXyz* lightVec) { mLightVec = lightVec; } + cXyz* getLightVec() { return mLightVec; } + void setPoly(dDlst_shadowPoly_c* poly) { mPoly = poly; } + dDlst_shadowPoly_c* getPoly() { return mPoly; } + + /* 0x34 */ cXyz* mCenter; + /* 0x38 */ cXyz* mLightVec; + /* 0x3C */ dDlst_shadowPoly_c* mPoly; +}; // Size: 0x40 + class dDlst_mirrorPacket : public J3DPacket { public: void init(ResTIMG*); |
