summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J2DGraph/J2DGrafContext.h35
-rw-r--r--include/JSystem/J3DGraphBase/J3DShapeMtx.h123
-rw-r--r--include/JSystem/JUtility/JUTGraphFifo.h10
-rw-r--r--include/JSystem/JUtility/JUTPalette.h10
-rw-r--r--include/JSystem/JUtility/JUTResource.h12
-rw-r--r--include/JSystem/JUtility/JUTTexture.h21
6 files changed, 94 insertions, 117 deletions
diff --git a/include/JSystem/J2DGraph/J2DGrafContext.h b/include/JSystem/J2DGraph/J2DGrafContext.h
index 1d41b509..244aaf56 100644
--- a/include/JSystem/J2DGraph/J2DGrafContext.h
+++ b/include/JSystem/J2DGraph/J2DGrafContext.h
@@ -14,33 +14,32 @@ public:
/* 0x2 */ u8 mDstFactor;
};
-
- /* 802E8B08 */ J2DGrafContext(f32 x, f32 y, f32 width, f32 height);
- /* 802E90C0 */ void scissor(JGeometry::TBox2<f32> const& bounds);
+ J2DGrafContext(f32 x, f32 y, f32 width, f32 height);
+ void scissor(JGeometry::TBox2<f32> const& bounds);
void setColor(JUtility::TColor c) { this->setColor(c, c, c, c); }
- /* 802E9118 */ void setColor(JUtility::TColor colorTL, JUtility::TColor colorTR,
- JUtility::TColor colorBR, JUtility::TColor colorBL);
- /* 802E9234 */ void setLineWidth(u8);
- /* 802E9260 */ void fillBox(JGeometry::TBox2<f32> const& box);
- /* 802E9368 */ void drawFrame(JGeometry::TBox2<f32> const& box);
- /* 802E9488 */ void line(JGeometry::TVec2<f32> start, JGeometry::TVec2<f32> end);
- /* 802E9564 */ void lineTo(JGeometry::TVec2<f32> pos);
+ void setColor(JUtility::TColor colorTL, JUtility::TColor colorTR, JUtility::TColor colorBR,
+ JUtility::TColor colorBL);
+ void setLineWidth(u8);
+ void fillBox(JGeometry::TBox2<f32> const& box);
+ void drawFrame(JGeometry::TBox2<f32> const& box);
+ void line(JGeometry::TVec2<f32> start, JGeometry::TVec2<f32> end);
+ void lineTo(JGeometry::TVec2<f32> pos);
void lineTo(f32 x, f32 y) { this->lineTo(JGeometry::TVec2<f32>(x, y)); }
void moveTo(f32 x, f32 y) { this->moveTo(JGeometry::TVec2<f32>(x, y)); }
void moveTo(JGeometry::TVec2<f32> pos) { mPrevPos = pos; }
- /* 802E95D4 */ virtual ~J2DGrafContext() {}
- /* 802E90E4 */ virtual void place(JGeometry::TBox2<f32> const& bounds);
- /* 802E961C */ virtual void place(f32 x, f32 y, f32 width, f32 height) {
+ virtual ~J2DGrafContext() {}
+ virtual void place(JGeometry::TBox2<f32> const& bounds);
+ virtual void place(f32 x, f32 y, f32 width, f32 height) {
JGeometry::TBox2<f32> box(x, y, x + width, y + height);
this->place(box);
}
- /* 802E8BB4 */ virtual void setPort();
- /* 802E8C44 */ virtual void setup2D();
- /* 802E8E20 */ virtual void setScissor();
- /* 802E9664 */ virtual s32 getGrafType() const { return 0; }
- /* 802E966C */ virtual void setLookat() {}
+ virtual void setPort();
+ virtual void setup2D();
+ virtual void setScissor();
+ virtual s32 getGrafType() const { return 0; }
+ virtual void setLookat() {}
public:
/* 0x04 */ JGeometry::TBox2<f32> mBounds;
diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
index 5f23e39d..029e73ec 100644
--- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h
+++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
@@ -11,12 +11,12 @@ public:
Mtx& getMtx(u16 idx) { return mpTexMtx[idx]; }
private:
- /* 0x00 */ Mtx *mpTexMtx;
+ /* 0x00 */ Mtx* mpTexMtx;
};
class J3DDifferedTexMtx {
public:
- /* 8031322C */ static void loadExecute(f32 const (*)[4]);
+ static void loadExecute(f32 const (*)[4]);
static inline void load(Mtx m) {
if (sTexGenBlock != NULL)
@@ -34,22 +34,20 @@ extern u8 struct_804515B3;
class J3DShapeMtx {
public:
- J3DShapeMtx(u16 useMtxIndex)
- : mUseMtxIndex(useMtxIndex)
- {}
-
- /* 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 u32 getType() const;
- /* 80273E08 */ virtual u32 getUseMtxNum() const;
- /* 8031459C */ virtual u32 getUseMtxIndex(u16) const;
- /* 80313B94 */ virtual void load() const;
- /* 80313BF0 */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
+ J3DShapeMtx(u16 useMtxIndex) : mUseMtxIndex(useMtxIndex) {}
+
+ void resetMtxLoadCache();
+ void loadMtxIndx_PNGP(int, u16) const;
+ void loadMtxIndx_PCPU(int, u16) const;
+ void loadMtxIndx_NCPU(int, u16) const;
+ void loadMtxIndx_PNCPU(int, u16) const;
+
+ virtual ~J3DShapeMtx();
+ virtual u32 getType() const;
+ virtual u32 getUseMtxNum() const;
+ virtual u32 getUseMtxIndex(u16) const;
+ virtual void load() const;
+ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
static u8 sMtxLoadPipeline[48];
static u16 sMtxLoadCache[10 + 2 /* padding */];
@@ -69,21 +67,19 @@ private:
class J3DShapeMtxConcatView : public J3DShapeMtx {
public:
- J3DShapeMtxConcatView(u16 useMtxIndex)
- : J3DShapeMtx(useMtxIndex)
- {}
-
- /* 80314730 */ virtual ~J3DShapeMtxConcatView();
- /* 803147E0 */ virtual u32 getType() const;
- /* 80313C54 */ virtual void load() const;
- /* 80314598 */ virtual void loadNrmMtx(int, u16) const;
- /* 80313D28 */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
-
- /* 80313828 */ void loadMtxConcatView_PNGP(int, u16) const;
- /* 803138C8 */ void loadMtxConcatView_PCPU(int, u16) const;
- /* 8031396C */ void loadMtxConcatView_NCPU(int, u16) const;
- /* 80313A14 */ void loadMtxConcatView_PNCPU(int, u16) const;
- /* 80313AC8 */ void loadMtxConcatView_PNGP_LOD(int, u16) const;
+ J3DShapeMtxConcatView(u16 useMtxIndex) : J3DShapeMtx(useMtxIndex) {}
+
+ virtual ~J3DShapeMtxConcatView();
+ virtual u32 getType() const;
+ virtual void load() const;
+ virtual void loadNrmMtx(int, u16) const;
+ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
+
+ void loadMtxConcatView_PNGP(int, u16) const;
+ void loadMtxConcatView_PCPU(int, u16) const;
+ void loadMtxConcatView_NCPU(int, u16) const;
+ void loadMtxConcatView_PNCPU(int, u16) const;
+ void loadMtxConcatView_PNGP_LOD(int, u16) const;
static u8 sMtxLoadPipeline[48];
static u8 sMtxLoadLODPipeline[48];
@@ -92,40 +88,33 @@ public:
class J3DShapeMtxYBBoardConcatView : public J3DShapeMtxConcatView {
public:
- J3DShapeMtxYBBoardConcatView(u16 useMtxIndex)
- : J3DShapeMtxConcatView(useMtxIndex)
- {}
+ J3DShapeMtxYBBoardConcatView(u16 useMtxIndex) : J3DShapeMtxConcatView(useMtxIndex) {}
- /* 80314520 */ virtual ~J3DShapeMtxYBBoardConcatView();
- /* 803147E0 */ virtual u32 getType() const;
- /* 803143E4 */ virtual void load() const;
+ virtual ~J3DShapeMtxYBBoardConcatView();
+ virtual u32 getType() const;
+ virtual void load() const;
};
class J3DShapeMtxBBoardConcatView : public J3DShapeMtxConcatView {
public:
- J3DShapeMtxBBoardConcatView(u16 useMtxIndex)
- : J3DShapeMtxConcatView(useMtxIndex)
- {}
+ J3DShapeMtxBBoardConcatView(u16 useMtxIndex) : J3DShapeMtxConcatView(useMtxIndex) {}
- /* 803145A4 */ virtual ~J3DShapeMtxBBoardConcatView();
- /* 803147E0 */ virtual u32 getType() const;
- /* 803142D4 */ virtual void load() const;
+ virtual ~J3DShapeMtxBBoardConcatView();
+ virtual u32 getType() const;
+ virtual void load() const;
};
class J3DShapeMtxMulti : public J3DShapeMtx {
public:
J3DShapeMtxMulti(u16 useMtxIndex, u16 useMtxNum, u16* useMtxIndexTable)
- : J3DShapeMtx(useMtxIndex)
- , mUseMtxNum(useMtxNum)
- , mUseMtxIndexTable(useMtxIndexTable)
- {}
-
- /* 803146B0 */ virtual ~J3DShapeMtxMulti();
- /* 803147E0 */ virtual u32 getType() const;
- /* 80273E08 */ virtual u32 getUseMtxNum() const;
- /* 8031459C */ virtual u32 getUseMtxIndex(u16) const;
- /* 80313E4C */ virtual void load() const;
- /* 80313EEC */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
+ : J3DShapeMtx(useMtxIndex), mUseMtxNum(useMtxNum), mUseMtxIndexTable(useMtxIndexTable) {}
+
+ virtual ~J3DShapeMtxMulti();
+ virtual u32 getType() const;
+ virtual u32 getUseMtxNum() const;
+ virtual u32 getUseMtxIndex(u16) const;
+ virtual void load() const;
+ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
private:
/* 0x6 */ u16 mUseMtxNum;
@@ -135,18 +124,16 @@ private:
class J3DShapeMtxMultiConcatView : public J3DShapeMtxConcatView {
public:
J3DShapeMtxMultiConcatView(u16 useMtxIndex, u16 useMtxNum, u16* useMtxIndexTable)
- : J3DShapeMtxConcatView(useMtxIndex)
- , mUseMtxNum(useMtxNum)
- , mUseMtxIndexTable(useMtxIndexTable)
- {}
-
- /* 8031461C */ virtual ~J3DShapeMtxMultiConcatView();
- /* 803147E0 */ virtual u32 getType() const;
- /* 80273E08 */ virtual u32 getUseMtxNum() const;
- /* 8031459C */ virtual u32 getUseMtxIndex(u16) const;
- /* 80313FA4 */ virtual void load() const;
- /* 803146AC */ virtual void loadNrmMtx(int, u16) const;
- /* 8031419C */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
+ : J3DShapeMtxConcatView(useMtxIndex), mUseMtxNum(useMtxNum),
+ mUseMtxIndexTable(useMtxIndexTable) {}
+
+ virtual ~J3DShapeMtxMultiConcatView();
+ virtual u32 getType() const;
+ virtual u32 getUseMtxNum() const;
+ virtual u32 getUseMtxIndex(u16) const;
+ virtual void load() const;
+ virtual void loadNrmMtx(int, u16) const;
+ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
private:
/* 0x6 */ u16 mUseMtxNum;
diff --git a/include/JSystem/JUtility/JUTGraphFifo.h b/include/JSystem/JUtility/JUTGraphFifo.h
index 6304ec0a..aab9ae64 100644
--- a/include/JSystem/JUtility/JUTGraphFifo.h
+++ b/include/JSystem/JUtility/JUTGraphFifo.h
@@ -5,9 +5,8 @@
class JUTGraphFifo {
public:
- /* 802DEB58 */ JUTGraphFifo(u32);
-
- /* 802DEC34 */ virtual ~JUTGraphFifo();
+ JUTGraphFifo(u32);
+ virtual ~JUTGraphFifo();
void getGpStatus() {
GXGetGPStatus((GXBool*)&mGpStatus[0], (GXBool*)&mGpStatus[1], (GXBool*)&mGpStatus[2],
@@ -21,6 +20,7 @@ public:
void save() { GXSaveCPUFifo(this->mFifo); }
+ static bool sInitiated;
static JUTGraphFifo* sCurrentFifo;
static bool mGpStatus[5];
@@ -31,6 +31,8 @@ private:
/* 0x10 */ u8 field_0x10[0xC];
};
-inline void JUTCreateFifo(u32 bufSize) { new JUTGraphFifo(bufSize); }
+inline void JUTCreateFifo(u32 bufSize) {
+ new JUTGraphFifo(bufSize);
+}
#endif /* JUTGRAPHFIFO_H */
diff --git a/include/JSystem/JUtility/JUTPalette.h b/include/JSystem/JUtility/JUTPalette.h
index 4a3d297b..2eb54750 100644
--- a/include/JSystem/JUtility/JUTPalette.h
+++ b/include/JSystem/JUtility/JUTPalette.h
@@ -18,13 +18,11 @@ public:
this->storeTLUT(p1, p2, p3, p4, p5);
}
- JUTPalette(GXTlut tlutNo, ResTLUT* p_tlutRes) {
- storeTLUT(tlutNo, p_tlutRes);
- }
+ JUTPalette(GXTlut tlutNo, ResTLUT* p_tlutRes) { storeTLUT(tlutNo, p_tlutRes); }
- /* 802DE890 */ void storeTLUT(_GXTlut, ResTLUT*);
- /* 802DE91C */ void storeTLUT(_GXTlut, _GXTlutFmt, JUTTransparency, u16, void*);
- /* 802DE95C */ bool load();
+ void storeTLUT(_GXTlut, ResTLUT*);
+ void storeTLUT(_GXTlut, _GXTlutFmt, JUTTransparency, u16, void*);
+ bool load();
u8 getTlutName() const { return mTlutName; }
u8 getFormat() const { return mFormat; }
diff --git a/include/JSystem/JUtility/JUTResource.h b/include/JSystem/JUtility/JUTResource.h
index 8a6b3120..a352d9af 100644
--- a/include/JSystem/JUtility/JUTResource.h
+++ b/include/JSystem/JUtility/JUTResource.h
@@ -8,9 +8,9 @@ class JSUInputStream;
class JUTResReference {
private:
- /* 0x001 */ u8 mType;
- /* 0x002 */ u8 mNameLength;
- /* 0x003 */ char mName[0x100];
+ /* 0x0 */ u8 mType;
+ /* 0x1 */ u8 mNameLength;
+ /* 0x2 */ char mName[0x100];
public:
enum ResType {
@@ -21,10 +21,8 @@ public:
RESTYPE_Unk4 = 4,
};
JUTResReference() { mType = 0; }
- /* 802DE078 */ void* getResource(JSUInputStream*, u32, JKRArchive*);
- /* 802DE120 */ void* getResource(void const*, u32, JKRArchive*);
- /* 802DE1BC */ void* getResource(u32, JKRArchive*);
+ void* getResource(JSUInputStream*, u32, JKRArchive*);
+ void* getResource(u32, JKRArchive*);
};
-// only rough size known due to getPointer__7J2DPaneFP20JSURandomInputStreamUlP10JKRArchive
#endif /* JUTRESOURCE_H */
diff --git a/include/JSystem/JUtility/JUTTexture.h b/include/JSystem/JUtility/JUTTexture.h
index f55f3217..40629f5e 100644
--- a/include/JSystem/JUtility/JUTTexture.h
+++ b/include/JSystem/JUtility/JUTTexture.h
@@ -68,29 +68,22 @@ public:
void setCaptureFlag(bool flag) { mFlags &= 2 | flag; }
u8 getCaptureFlag() const { return mFlags & 1; }
u8 getEmbPaletteDelFlag() const { return mFlags & 2; }
- void setEmbPaletteDelFlag(bool flag) { mFlags = (mFlags & 1) | (flag << 1);}
+ void setEmbPaletteDelFlag(bool flag) { mFlags = (mFlags & 1) | (flag << 1); }
u8 getTlutName() const { return mTlutName; }
bool operator==(const JUTTexture& other) {
- return mTexInfo == other.mTexInfo
- && field_0x2c == other.field_0x2c
- && mWrapS == other.mWrapS
- && mWrapT == other.mWrapT
- && mMinFilter == other.mMinFilter
- && mMagFilter == other.mMagFilter
- && mMinLOD == other.mMinLOD
- && mMinLOD == other.mMinLOD
- && mLODBias == other.mLODBias;
- }
- bool operator!=(const JUTTexture& other) {
- return !operator==(other);
+ return mTexInfo == other.mTexInfo && mAttachedPalette == other.mAttachedPalette &&
+ mWrapS == other.mWrapS && mWrapT == other.mWrapT && mMinFilter == other.mMinFilter &&
+ mMagFilter == other.mMagFilter && mMinLOD == other.mMinLOD &&
+ mMinLOD == other.mMinLOD && mLODBias == other.mLODBias;
}
+ bool operator!=(const JUTTexture& other) { return !operator==(other); }
private:
/* 0x00 */ GXTexObj mTexObj;
/* 0x20 */ const ResTIMG* mTexInfo;
/* 0x24 */ void* mTexData;
/* 0x28 */ JUTPalette* mEmbPalette;
- /* 0x2C */ JUTPalette* field_0x2c;
+ /* 0x2C */ JUTPalette* mAttachedPalette;
/* 0x30 */ u8 mWrapS;
/* 0x31 */ u8 mWrapT;
/* 0x32 */ u8 mMinFilter;