mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-29 10:50:53 -04:00
d_drawlist OK, J2DPicture inline cleanup
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -31,4 +31,4 @@ struct TColor : public GXColor {
|
||||
};
|
||||
} // namespace JUtility
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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*);
|
||||
|
||||
Reference in New Issue
Block a user