J2DGrafContext match

This commit is contained in:
Jasper St. Pierre
2023-10-11 21:25:17 -07:00
parent 1ff5175bb7
commit 2a98b09d1a
4 changed files with 9 additions and 11 deletions
+1 -3
View File
@@ -19,9 +19,7 @@ J2DGrafContext::J2DGrafContext(f32 x, f32 y, f32 width, f32 height)
void J2DGrafContext::setPort() {
setScissor();
setup2D();
JGeometry::TBox2<f32> bounds(mBounds);
GXSetViewport(bounds.i.x, bounds.i.y, bounds.getWidth(), bounds.getHeight(), 0.0f, 1.875f);
GXSetViewport(mBounds.i.x, mBounds.i.y, mBounds.getWidth(), mBounds.getHeight(), 0.0f, 1.0f);
}
static inline void GXSetTexCoordGen(GXTexCoordID dst, GXTexGenType type, GXTexGenSrc src, u32 mtx) {
+4 -4
View File
@@ -168,11 +168,11 @@ void J2DPane::draw(float x, float y, const J2DGrafContext* pCtx, bool clip) {
if (clip) {
mDrawBounds.addPos(pParentPane->mScreenBounds.i.x, pParentPane->mScreenBounds.i.y);
mDrawBounds.intersect(pParentPane->mDrawBounds);
mDrawAlpha = mAlpha;
if (mInheritAlpha)
mDrawAlpha = (mAlpha * pParentPane->mDrawAlpha) / 0xFF;
}
mDrawAlpha = mAlpha;
if (mInheritAlpha)
mDrawAlpha = (mAlpha * pParentPane->mDrawAlpha) / 0xFF;
} else {
mScreenBounds.addPos(x, y);
makeMatrix(mBounds.i.x + x, mBounds.i.y + y);
+1 -1
View File
@@ -179,7 +179,7 @@ J2DPane * J2DScreen::search(u32 tag) {
/* 802D1180-802D12E0 .text drawSelf__9J2DScreenFffPA3_A4_f */
void J2DScreen::drawSelf(f32 x, f32 y, Mtx* pMtx) {
GXColor color = mColor;
u8 alpha = ((mColor.a * mAlpha) / 0xFF);
u8 alpha = ((color.a * mAlpha) / 0xFF);
if (alpha == 0)
return;
color.a = alpha;