diff --git a/configure.py b/configure.py index 4d10ff315..92952ff34 100644 --- a/configure.py +++ b/configure.py @@ -847,7 +847,7 @@ config.libs = [ Object(Matching, "JSystem/J2DGraph/J2DPrint.cpp"), Object(Matching, "JSystem/J2DGraph/J2DPane.cpp"), Object(Matching, "JSystem/J2DGraph/J2DScreen.cpp"), - Object(NonMatching, "JSystem/J2DGraph/J2DWindow.cpp"), + Object(Matching, "JSystem/J2DGraph/J2DWindow.cpp"), Object(Matching, "JSystem/J2DGraph/J2DPicture.cpp"), Object(Matching, "JSystem/J2DGraph/J2DTextBox.cpp"), ], diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index 5234ab7e5..a554af3a8 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -49,8 +49,13 @@ public: virtual u16 getTypeID() { return 0x10; } virtual void move(f32 x, f32 y); virtual void add(f32 x, f32 y); + + // fakematch, this getter doesn't exist + f32 resize__getMinX() const { return mBounds.i.x; } virtual void resize(f32 w, f32 h) { - mBounds.f.x = mBounds.i.x + w; + f32 x = resize__getMinX(); + x += w; + mBounds.f.x = x; mBounds.f.y = mBounds.i.y + h; } virtual bool setConnectParent(bool connected) { diff --git a/include/JSystem/J2DGraph/J2DPicture.h b/include/JSystem/J2DGraph/J2DPicture.h index bd417599a..ffa9bd5fa 100644 --- a/include/JSystem/J2DGraph/J2DPicture.h +++ b/include/JSystem/J2DGraph/J2DPicture.h @@ -103,6 +103,13 @@ public: u8 getNumTexture() { return mNumTexture; } + void setBinding(J2DBinding v) { mBinding = v; } + void setMirror(J2DMirror v) {} // untested { mFlag = (mFlag & ~0x03) | v; } + J2DMirror getMirror() const { return J2DMirror(mFlag & 0x03); } + + void setTumble(bool v) {} // untested { mFlag = (mFlag & ~0x04) | (v << 2); } + bool isTumble() const { return mFlag >> 2 & 1; } + private: /* 0x0CC */ JUTTexture* mpTexture[4]; /* 0x0DC */ u8 mNumTexture; diff --git a/src/JSystem/J2DGraph/J2DPicture.cpp b/src/JSystem/J2DGraph/J2DPicture.cpp index ff7db93d1..d9c860168 100644 --- a/src/JSystem/J2DGraph/J2DPicture.cpp +++ b/src/JSystem/J2DGraph/J2DPicture.cpp @@ -232,7 +232,7 @@ void J2DPicture::drawSelf(f32 x, f32 y, Mtx* mtx) { if (!mpTexture[0]) { return; } - drawFullSet(mScreenBounds.i.x + x, mScreenBounds.i.y + y, mBounds.getWidth(), mBounds.getHeight(), J2DBinding(mBinding), J2DMirror(mFlag & 3), mFlag >> 2 & 1, mtx); + drawFullSet(mScreenBounds.i.x + x, mScreenBounds.i.y + y, mBounds.getWidth(), mBounds.getHeight(), J2DBinding(mBinding), getMirror(), isTumble(), mtx); } /* 802D3D54-802D4074 .text drawFullSet__10J2DPictureFffff10J2DBinding9J2DMirrorbPA3_A4_f */