| 384 | } |
| 385 | |
| 386 | void J2DWindowEx::drawFrameTexture(f32 x, f32 y, f32 width, f32 height, u16 p5, u16 p6, u16 p7, u16 p8, J2DMaterial* material, bool p10) |
| 387 | { |
| 388 | if (material != nullptr && material->isVisible()) { |
| 389 | f32 dVar15 = x + width; |
| 390 | f32 dVar14 = y + height; |
| 391 | if (p10) { |
| 392 | material->setGX(); |
| 393 | } |
| 394 | JUTColor aTStack_84(0xffffffff); |
| 395 | J2DPane* parentPane = getParentPane(); |
| 396 | if (material->getColorBlock()->getColorChan(1)->getMatSrc() == 1) { |
| 397 | if (material->getMaterialAlphaCalc() == 1) { |
| 398 | u8 uVar11 = 0xff; |
| 399 | if (material->getColorBlock()->getMatColor(0) != 0) { |
| 400 | uVar11 = material->getColorBlock()->getMatColor(0)->a; |
| 401 | } |
| 402 | if (parentPane != nullptr && mIsInfluencedAlpha != 0) { |
| 403 | uVar11 = ((uVar11 * parentPane->mColorAlpha) / 0xff); |
| 404 | } |
| 405 | aTStack_84 = JUTColor((u32)uVar11 | 0xffffff00); |
| 406 | } |
| 407 | } else if (parentPane != nullptr && mIsInfluencedAlpha != 0 && p10) { |
| 408 | int matColorAlpha = material->getColorBlock()->getMatColor(0)->a; |
| 409 | int colorAlpha = parentPane->mColorAlpha; |
| 410 | GXSetChanMatColor(GX_ALPHA0, JUTColor((matColorAlpha * colorAlpha / 0xff) & 0xff)); |
| 411 | } |
| 412 | GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0); |
| 413 | GXBegin(GX_QUADS, GX_VTXFMT0, 4); |
| 414 | |
| 415 | f32 zero = 0.0f; |
| 416 | GXPosition3f32(x, y, zero); |
| 417 | GXColor1u32(aTStack_84); |
| 418 | GXTexCoord2u16(p7, p8); |
| 419 | |
| 420 | GXPosition3f32(dVar15, y, zero); |
| 421 | GXColor1u32(aTStack_84); |
| 422 | GXTexCoord2u16(p5, p8); |
| 423 | |
| 424 | GXPosition3f32(dVar15, dVar14, zero); |
| 425 | GXColor1u32(aTStack_84); |
| 426 | GXTexCoord2u16(p5, p6); |
| 427 | |
| 428 | GXPosition3f32(x, dVar14, zero); |
| 429 | GXColor1u32(aTStack_84); |
| 430 | GXTexCoord2u16(p7, p6); |
| 431 | GXEnd(); |
| 432 | GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0); |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | void J2DWindowEx::draw(const JGeometry::TBox2f& p1) |
| 437 | { |
nothing calls this directly
no test coverage detected