more BE stuff, fix scissors for dmap/fmap

This commit is contained in:
CraftyBoss
2026-03-21 00:56:01 -04:00
parent e22c9da163
commit 955a70db1e
6 changed files with 46 additions and 12 deletions
+16 -3
View File
@@ -275,14 +275,18 @@ void dMenu_Fmap2DBack_c::draw() {
u32 scissorLeft, scissorTop, scissorWidth, scissorHeight;
GXGetScissor(&scissorLeft, &scissorTop, &scissorWidth, &scissorHeight);
#if TARGET_PC
grafPort->scissor(mTransX, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight());
#else
grafPort->scissor(mTransX, 0.0f, FB_WIDTH, FB_HEIGHT);
#endif
grafPort->setScissor();
mpBackTex->setBlackWhite(field_0x1208, field_0x120c);
mpBackTex->setAlpha(mAlphaRate * 255.0f * g_fmapHIO.mBackgroundAlpha);
mpBackTex->draw(mTransX + mDoGph_gInf_c::getMinXF(),
mTransZ + mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getWidthF(),
mDoGph_gInf_c::getHeightF(), false, false, false);
mTransZ + mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getWidth(),
mDoGph_gInf_c::getHeight(), false, false, false);
mpBackScreen->draw(mTransX, mTransZ, grafPort);
mpBaseScreen->draw(mTransX, mTransZ, grafPort);
@@ -292,8 +296,13 @@ void dMenu_Fmap2DBack_c::draw() {
Vec vec2 = mpMapArea->getGlobalVtx(&mtx, 3, false, 0);
f32 width = mDoGph_gInf_c::getWidthF() / FB_WIDTH;
#if TARGET_PC
f32 width = mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth();
f32 height = mDoGph_gInf_c::getHeightF() / mDoGph_gInf_c::getHeight();
#else
f32 width = mDoGph_gInf_c::getWidthF() / FB_WIDTH;
f32 height = mDoGph_gInf_c::getHeightF() / FB_HEIGHT;
#endif
grafPort->scissor(mTransX + ((vec1.x - mDoGph_gInf_c::getMinXF()) / width),
mTransZ + (vec1.y / height), (vec2.x - vec1.x) / width,
@@ -2554,7 +2563,11 @@ void dMenu_Fmap2DTop_c::draw() {
J2DOrthoGraph* ctx = static_cast<J2DOrthoGraph*>(dComIfGp_getCurrentGrafPort());
ctx->setup2D();
GXGetScissor(&scissor_left, &scissor_top, &scissor_width, &scissor_height);
#if TARGET_PC
ctx->scissor(mTransX, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight());
#else
ctx->scissor(mTransX, 0.0f, FB_WIDTH, FB_HEIGHT);
#endif
ctx->setScissor();
mpTitleScreen->draw(mTransX, mTransY, ctx);
ctx->scissor(scissor_left, scissor_top, scissor_width, scissor_height);