msg inline fixes, remove some fake jsystem inlines

This commit is contained in:
LagoLunatic
2026-08-07 16:40:56 -04:00
parent 5e00819c5b
commit 07b55421f9
15 changed files with 95 additions and 119 deletions
+2 -6
View File
@@ -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;
+7 -3
View File
@@ -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) {
+3 -3
View File
@@ -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>
-4
View File
@@ -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
+2 -2
View File
@@ -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;
}