diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-08-07 16:40:56 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-08-07 16:40:56 -0400 |
| commit | 07b55421f9ce2db2fecbaaa34a3e1b59d6f231a7 (patch) | |
| tree | ff592e73778c07836dbbf93912b8a2c248c6307a /include | |
| parent | 5e00819c5ba6ea0c7177d2f0aae29ccc7c49f55c (diff) | |
msg inline fixes, remove some fake jsystem inlines
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPane.h | 8 | ||||
| -rw-r--r-- | include/JSystem/JGeometry.h | 10 | ||||
| -rw-r--r-- | include/JSystem/JSupport/JSUList.h | 6 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTDataHeader.h | 4 | ||||
| -rw-r--r-- | include/f_op/f_op_scene_mng.h | 4 |
5 files changed, 14 insertions, 18 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index 81b2e28c..646c7ce3 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -54,13 +54,9 @@ public: virtual void move(f32 x, f32 y); virtual void add(f32 x, f32 y); - // fakematch, this fake inline is only needed by the J2DPane::resize call inside of J2DWindow::resize - f32 resize__getMinX() const { return mBounds.i.x; } virtual void resize(f32 w, f32 h) { - f32 x = resize__getMinX(); - x += w; - mBounds.f.x = x; - mBounds.f.y = mBounds.i.y + h; + JGeometry::TVec2<f32> size(w, h); + mBounds.setSize(size); } virtual bool setConnectParent(bool connected) { mIsConnectParent = 0; diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index 505c315c..4185b93b 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -306,6 +306,11 @@ struct TVec2 { y += other.y; } + void add(const TVec2<T>& a, const TVec2<T>& b) { + x = a.x + b.x; + y = a.y + b.y; + } + bool isAbove(const TVec2<T>& other) const { return (x >= other.x) && (y >= other.y) ? true : false; } @@ -346,9 +351,8 @@ template<> struct TBox<TVec2<f32> > { addPos(TVec2<f32>(x, y)); } - void setSize(TVec2<f32> size) { - f.x = size.x; - f.y = size.y; + void setSize(const TVec2<f32>& size) { + f.add(i, size); } void addPos(const TVec2<f32>& pos) { diff --git a/include/JSystem/JSupport/JSUList.h b/include/JSystem/JSupport/JSUList.h index f28f6082..4f00f4ec 100644 --- a/include/JSystem/JSupport/JSUList.h +++ b/include/JSystem/JSupport/JSUList.h @@ -173,15 +173,15 @@ public: JSUTree<T>* getLastChild() const { return (JSUTree<T>*)this->getLast(); } - JSUTree<T>* getNextChild() const { return (JSUTree<T>*)this->getNext(); } + JSUTree<T>* getNextChild() const { return (JSUTree<T>*)this->mNext; } - JSUTree<T>* getPrevChild() const { return (JSUTree<T>*)this->getPrev(); } + JSUTree<T>* getPrevChild() const { return (JSUTree<T>*)this->mPrev; } u32 getNumChildren() const { return this->getNumLinks(); } T* getObject() const { return (T*)this->getObjectPtr(); } - JSUTree<T>* getParent() const { return (JSUTree<T>*)this->getList(); } + JSUTree<T>* getParent() const { return (JSUTree<T>*)this->mList; } }; template <typename T> diff --git a/include/JSystem/JUtility/JUTDataHeader.h b/include/JSystem/JUtility/JUTDataHeader.h index e00ac58c..1307541a 100644 --- a/include/JSystem/JUtility/JUTDataHeader.h +++ b/include/JSystem/JUtility/JUTDataHeader.h @@ -8,10 +8,6 @@ struct JUTDataBlockHeader { /* 0x00 */ u32 mType; /* 0x04 */ u32 mSize; - - const JUTDataBlockHeader* getNext() const { // fake inline - return reinterpret_cast<const JUTDataBlockHeader*>(reinterpret_cast<const u8*>(this) + mSize); - } }; struct JUTDataFileHeader { // actual struct name unknown diff --git a/include/f_op/f_op_scene_mng.h b/include/f_op/f_op_scene_mng.h index bb14472c..aed2ee9d 100644 --- a/include/f_op/f_op_scene_mng.h +++ b/include/f_op/f_op_scene_mng.h @@ -14,7 +14,7 @@ u32 fopScnM_ReRequest(s16, u32); void fopScnM_Management(void); void fopScnM_Init(void); -inline u32 fpcM_LayerID(const void* pProc) { +inline u32 fpcM_LayerID(void* pProc) { if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)pProc)->mSubType)) { return ((scene_class*)pProc)->base.mLayer.mLayerID; } else { @@ -22,7 +22,7 @@ inline u32 fpcM_LayerID(const void* pProc) { } } -inline layer_class * fpcM_Layer(const void* pProc) { +inline layer_class* fpcM_Layer(void* pProc) { return &((process_node_class*)pProc)->mLayer; } |
