mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-14 12:24:16 -04:00
msg inline fixes, remove some fake jsystem inlines
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user