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/JSystem | |
| parent | 5e00819c5ba6ea0c7177d2f0aae29ccc7c49f55c (diff) | |
msg inline fixes, remove some fake jsystem inlines
Diffstat (limited to 'include/JSystem')
| -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 |
4 files changed, 12 insertions, 16 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 |
