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/JSystem | |
| parent | 1f1900bf669a5f14afa430d95fef7f2bf28a2076 (diff) | |
d_drawlist OK, J2DPicture inline cleanup
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPicture.h | 25 | ||||
| -rw-r--r-- | include/JSystem/JUtility/TColor.h | 2 |
2 files changed, 21 insertions, 6 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 |
