diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2022-01-25 12:24:14 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-25 21:24:14 +0100 |
| commit | 612f26c132280da43ecfa5fa8c8cc32966f06eb6 (patch) | |
| tree | ac20d071712cf830ec526222c98d340d90721f77 /include/JSystem | |
| parent | 6f4d068f1d7c5a9f25f1920e64e5b10dc29aea07 (diff) | |
d_kankyo_wether / d_eye_hl (#178)
* d_eye_hl / d_kankyo_wether wip
* more d_kankyo_wether + format
* remove asm
* some d_kankyo wip
* fix dccs vtable
* some m_Do_graphic / d_meter2_draw work
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPane.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPicture.h | 4 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DTextBox.h | 21 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DModel.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DModelData.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DPacket.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DSys.h | 17 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTexture.h | 5 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRArchive.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRFileLoader.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRHeap.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTGamePad.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTProcBar.h | 2 |
14 files changed, 62 insertions, 7 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index 73a920ee42..59b6a63e05 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -103,6 +103,7 @@ public: bool isVisible() const { return mVisible; } void show() { mVisible = true; } + void hide() { mVisible = false; } void initiate(); void initialize(J2DPane*, bool, u64, const JGeometry::TBox2<f32>&); diff --git a/include/JSystem/J2DGraph/J2DPicture.h b/include/JSystem/J2DGraph/J2DPicture.h index 2dca4ac374..d75a2b2f2e 100644 --- a/include/JSystem/J2DGraph/J2DPicture.h +++ b/include/JSystem/J2DGraph/J2DPicture.h @@ -63,8 +63,8 @@ public: /* 80053C6C */ virtual void setBlack(JUtility::TColor); /* 80053C44 */ virtual void setWhite(JUtility::TColor); /* 8018BEE0 */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor); - /* 801DFA4C */ virtual void getBlack() const; - /* 801DFA40 */ virtual void getWhite() const; + /* 801DFA4C */ virtual JUtility::TColor getBlack() const; + /* 801DFA40 */ virtual JUtility::TColor getWhite() const; /* 8025603C */ virtual bool getMaterial() const; /* 802FDBFC */ virtual void drawFullSet(f32, f32, f32, f32, Mtx*); /* 802FE380 */ virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16, diff --git a/include/JSystem/J2DGraph/J2DTextBox.h b/include/JSystem/J2DGraph/J2DTextBox.h index b2170c014f..a6b47e64a9 100644 --- a/include/JSystem/J2DGraph/J2DTextBox.h +++ b/include/JSystem/J2DGraph/J2DTextBox.h @@ -19,6 +19,11 @@ enum J2DTextBoxHBinding { class J2DTextBox : public J2DPane { public: + struct TFontSize { + /* 0x0 */ f32 mSizeX; + /* 0x4 */ f32 mSizeY; + }; + /* 803001E0 */ virtual ~J2DTextBox(); /* 80300C68 */ virtual s32 getTypeID() const; /* 80300AF8 */ virtual void resize(f32, f32); @@ -51,6 +56,22 @@ public: /* 8030074C */ s32 setString(s16, char const*, ...); /* 80300660 */ s32 setString(char const*, ...); + void setFontSize(f32 sizeX, f32 sizeY) { + if (sizeX > 0.0f) { + sizeX = 0.0f; + } + field_0x11c = sizeX; + + if (sizeY > 0.0f) { + sizeY = 0.0f; + } + field_0x120 = sizeY; + } + + void setFontSize(TFontSize size) { setFontSize(size.mSizeX, size.mSizeY); } + + void setCharSpace(f32 space) { mCharSpacing = space; } + private: /* 0x0100 */ JUTFont* mFont; /* 0x0104 */ JUtility::TColor mCharColor; diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h b/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h index 9582221280..5802a1040b 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h +++ b/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h @@ -30,6 +30,7 @@ public: J3DMaterial* getMaterialNodePointer(u16 idx) const { return mMaterialNodePointer[idx]; } J3DTexture* getTexture() const { return mTexture; } + JUTNameTab* getTextureName() const { return mTextureName; } u16 getMaterialNum() const { return mMaterialNum; } diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h index 7cadb05f28..26c7ec72a2 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -67,6 +67,7 @@ public: J3DShapePacket* getShapePacket(u16 idx) const { return &mShapePacket[idx]; } Mtx33* getBumpMtxPtr(int idx) const { return mMtxBuffer->getBumpMtxPtr(idx); } Mtx33* getNrmMtxPtr() const { return mMtxBuffer->getNrmMtxPtr(); } + void setBaseScale(const Vec& scale) { mBaseScale = scale; } // is there a better way to handle inlines with same name as non-inlines? MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); } diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/include/JSystem/J3DGraphAnimator/J3DModelData.h index d20d6de50a..12e98f3869 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModelData.h +++ b/include/JSystem/J3DGraphAnimator/J3DModelData.h @@ -34,6 +34,7 @@ public: J3DJoint* getJointNodePointer(u16 idx) const { return mJointTree.getJointNodePointer(idx); } J3DJointTree& getJointTree() { return mJointTree; } J3DTexture* getTexture() const { return mMaterialTable.getTexture(); } + JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); } u16 getWEvlpMtxNum() const { return mJointTree.getWEvlpMtxNum(); } void* getVtxPosArray() const { return mVertexData.getVtxPosArray(); } void* getVtxNrmArray() const { return mVertexData.getVtxNrmArray(); } diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 21bb39e83a..3ed3fe2804 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -66,7 +66,7 @@ public: virtual bool entry(J3DDrawBuffer*); virtual void draw(); - virtual ~J3DPacket(); + virtual ~J3DPacket() {} public: /* 0x04 */ J3DPacket* mpNextSibling; diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h index 8dfca2d554..0f947d0a34 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/include/JSystem/J3DGraphBase/J3DSys.h @@ -11,6 +11,11 @@ enum J3DError { kJ3DError_Alloc = 4, }; +enum J3DSysDrawBuffer { + /* 0x0 */ OPA_BUFFER, + /* 0x1 */ XLU_BUFFER +}; + class J3DMtxCalc; class J3DModel; class J3DMatPacket; @@ -64,7 +69,7 @@ struct J3DSys { /* 0x4 */ XLU, }; - Mtx* getViewMtx() { return &mViewMtx; } + MtxP getViewMtx() { return mViewMtx; } void setDrawModeOpaTexEdge() { mDrawMode = OPA_TEX_EDGE; } @@ -102,6 +107,16 @@ struct J3DSys { GXSetArray(GX_NRM_MTX_ARRAY, mModelNrmMtx, sizeof(*mModelNrmMtx)); } + // Type 0: Opa Buffer + // Type 1: Xlu Buffer + void setDrawBuffer(J3DDrawBuffer* buffer, int type) { mDrawBuffer[type] = buffer; } + + // Type 0: Opa Buffer + // Type 1: Xlu Buffer + J3DDrawBuffer* getDrawBuffer(int type) { return mDrawBuffer[type]; } + + void setViewMtx(Mtx m) { PSMTXCopy(m, mViewMtx); } + static Mtx mCurrentMtx; static Vec mCurrentS; static Vec mParentS; diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h index 93e098842f..f62d2e2d9f 100644 --- a/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/include/JSystem/J3DGraphBase/J3DTexture.h @@ -9,13 +9,16 @@ class J3DTexture { private: /* 0x0 */ u16 mNum; - /* 0x4 */ ResTIMG** mpRes; + /* 0x4 */ ResTIMG* mpRes; public: /* 8031204C */ void loadGX(u16, _GXTexMapID) const; /* 803121A4 */ void entryNum(u16); /* 8031221C */ void addResTIMG(u16, ResTIMG const*); /* 803366A4 */ virtual ~J3DTexture(); + + u16 getNum() const { return mNum; } + ResTIMG* getResTIMG(u16 entry) const { return &mpRes[entry]; } }; struct J3DTextureSRTInfo { diff --git a/include/JSystem/JKernel/JKRArchive.h b/include/JSystem/JKernel/JKRArchive.h index 19411ebf9c..9c413274ec 100644 --- a/include/JSystem/JKernel/JKRArchive.h +++ b/include/JSystem/JKernel/JKRArchive.h @@ -218,4 +218,8 @@ inline JKRCompression JKRConvertAttrToCompressionType(u32 attr) { return JKRArchive::convertAttrToCompressionType(attr); } +inline void* JKRGetTypeResource(u32 tag, const char* name, JKRArchive* arc) { + return JKRArchive::getGlbResource(tag, name, arc); +} + #endif
\ No newline at end of file diff --git a/include/JSystem/JKernel/JKRFileLoader.h b/include/JSystem/JKernel/JKRFileLoader.h index 4af9531298..afe86b085d 100644 --- a/include/JSystem/JKernel/JKRFileLoader.h +++ b/include/JSystem/JKernel/JKRFileLoader.h @@ -54,4 +54,8 @@ public: static JSUList<JKRFileLoader> sVolumeList; }; +inline void* JKRGetNameResource(const char* name, JKRFileLoader* loader) { + return JKRFileLoader::getGlbResource(name, loader); +} + #endif /* JKRFILELOADER_H */ diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index 82de079c08..74fd1e2840 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -221,8 +221,8 @@ inline JKRHeap* JKRGetCurrentHeap() { return JKRHeap::getCurrentHeap(); } -inline u32 JKRGetMemBlockSize(JKRHeap* heap,void* block) { - return JKRHeap::getSize(block,heap); +inline u32 JKRGetMemBlockSize(JKRHeap* heap, void* block) { + return JKRHeap::getSize(block, heap); } #endif /* JKRHEAP_H */ diff --git a/include/JSystem/JUtility/JUTGamePad.h b/include/JSystem/JUtility/JUTGamePad.h index 5bfc6e650d..456bd345d9 100644 --- a/include/JSystem/JUtility/JUTGamePad.h +++ b/include/JSystem/JUtility/JUTGamePad.h @@ -124,6 +124,8 @@ public: return isPushingReset; } + static s8 getPortStatus(u32 port) { return mPadStatus[port].error; } + struct CButton { CButton(); // inline void clear(); diff --git a/include/JSystem/JUtility/JUTProcBar.h b/include/JSystem/JUtility/JUTProcBar.h index d302840927..cd412da9d2 100644 --- a/include/JSystem/JUtility/JUTProcBar.h +++ b/include/JSystem/JUtility/JUTProcBar.h @@ -66,6 +66,8 @@ public: void idleStart() { mIdle.start(255, 129, 30); } void idleEnd() { mIdle.end(); } void setCostFrame(int frame) { mCostFrame = frame; } + void setVisible(bool visible) { mVisible = visible; } + void setVisibleHeapBar(bool visible) { mHeapBarVisible = visible; } static JUTProcBar* getManager() { return sManager; } |
