mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Fix screen size issues, letterbox, fade, etc (#30)
This commit is contained in:
@@ -4170,8 +4170,12 @@ void Message_DrawSceneTitleCard(PlayState* play, Gfx** gfxP) {
|
||||
gDPSetEnvColor(gfx++, 140, 40, 160, 255);
|
||||
gDPLoadTextureBlock(gfx++, gSceneTitleCardGradientTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 1, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, 6, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPTextureRectangle(gfx++, 0, XREG(77) << 2, 320 << 2, (XREG(77) + XREG(76)) << 2, G_TX_RENDERTILE, 0, 0, 204,
|
||||
1 << 10);
|
||||
// #region 2S2H [Cosmetic] Account for different aspect ratios than 4:3 for title card
|
||||
// gSPTextureRectangle(gfx++, 0, XREG(77) << 2, 320 << 2, (XREG(77) + XREG(76)) << 2, G_TX_RENDERTILE, 0, 0, 204,
|
||||
// 1 << 10);
|
||||
f32 tileOffset = 204.0f / ((320.0f + (OTRGetDimensionFromRightEdge(0) * 2.0f)) / 320.0f);
|
||||
gSPWideTextureRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(0) << 2, XREG(77) << 2, OTRGetRectDimensionFromRightEdge(320) << 2, (XREG(77) + XREG(76)) << 2, G_TX_RENDERTILE, 8, 0, (u32)tileOffset - 1, 1 << 10);
|
||||
// #endregion
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
||||
gDPSetEnvColor(gfx++, 0, 0, 0, 255);
|
||||
|
||||
+10
-6
@@ -1511,17 +1511,21 @@ void func_8012CF0C(GraphicsContext* gfxCtx, s32 clearFb, s32 clearZb, u8 r, u8 g
|
||||
|
||||
masterGfx = gGfxMasterDL->clearFillRect;
|
||||
|
||||
gDPFillRectangle(&masterGfx[0], 0, 0, gCfbWidth - 1, gCfbHeight - 1);
|
||||
gDPPipeSync(&masterGfx[1]);
|
||||
gSPEndDisplayList(&masterGfx[2]);
|
||||
// #region 2S2H [Cosmetic] Account for different aspect ratios than 4:3
|
||||
gDPFillWideRectangle(masterGfx++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetRectDimensionFromRightEdge(gCfbWidth - 1), gCfbHeight - 1);
|
||||
gDPPipeSync(&masterGfx[2]);
|
||||
gSPEndDisplayList(&masterGfx[3]);
|
||||
// #endregion
|
||||
|
||||
// General Fillrect?
|
||||
|
||||
masterGfx = gGfxMasterDL->fillRect;
|
||||
|
||||
gDPFillRectangle(&masterGfx[0], 0, 0, gCfbWidth, gCfbHeight);
|
||||
gDPPipeSync(&masterGfx[1]);
|
||||
gSPEndDisplayList(&masterGfx[2]);
|
||||
// #region 2S2H [Cosmetic] Account for different aspect ratios than 4:3
|
||||
gDPFillWideRectangle(masterGfx++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetRectDimensionFromRightEdge(gCfbWidth), gCfbHeight);
|
||||
gDPPipeSync(&masterGfx[2]);
|
||||
gSPEndDisplayList(&masterGfx[3]);
|
||||
// #endregion
|
||||
|
||||
// Sync SP Segments with current CPU Segments
|
||||
|
||||
|
||||
@@ -85,15 +85,17 @@ void ShrinkWindow_Draw(GraphicsContext* gfxCtx) {
|
||||
gDPSetCycleType(gfx++, G_CYC_FILL);
|
||||
gDPSetRenderMode(gfx++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor(gfx++, (GPACK_RGBA5551(0, 0, 0, 1) << 16) | GPACK_RGBA5551(0, 0, 0, 1));
|
||||
gDPFillRectangle(gfx++, 0, 0, gScreenWidth - 1, letterboxSize - 1);
|
||||
gDPFillRectangle(gfx++, 0, gScreenHeight - letterboxSize, gScreenWidth - 1, gScreenHeight - 1);
|
||||
// #region 2S2H [Cosmetic] Account for different aspect ratios than 4:3
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), letterboxSize - 1);
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(0), gScreenHeight - letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - 1);
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetCycleType(gfx++, G_CYC_1CYCLE);
|
||||
gDPSetRenderMode(gfx++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, 0);
|
||||
gDPFillRectangle(gfx++, 0, letterboxSize, gScreenWidth, letterboxSize + 1);
|
||||
gDPFillRectangle(gfx++, 0, gScreenHeight - letterboxSize - 1, gScreenWidth, gScreenHeight - letterboxSize);
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(0), letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth), letterboxSize + 1);
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(0), gScreenHeight - letterboxSize - 1, OTRGetRectDimensionFromRightEdge(gScreenWidth), gScreenHeight - letterboxSize);
|
||||
// #endregion
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
OVERLAY_DISP = gfx++;
|
||||
@@ -111,16 +113,18 @@ void ShrinkWindow_Draw(GraphicsContext* gfxCtx) {
|
||||
gDPSetRenderMode(gfx++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor(gfx++, (GPACK_RGBA5551(0, 0, 0, 1) << 16) | GPACK_RGBA5551(0, 0, 0, 1));
|
||||
|
||||
gDPFillRectangle(gfx++, 0, 0, pillarboxSize - 1, gScreenHeight - 1);
|
||||
gDPFillRectangle(gfx++, gScreenWidth - pillarboxSize, 0, gScreenWidth - 1, gScreenHeight - 1);
|
||||
// #region 2S2H [Cosmetic] Account for different aspect ratios than 4:3
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetRectDimensionFromRightEdge(pillarboxSize - 1), gScreenHeight - 1);
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(gScreenWidth - pillarboxSize), 0, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - 1);
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetCycleType(gfx++, G_CYC_1CYCLE);
|
||||
gDPSetRenderMode(gfx++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
gDPFillRectangle(gfx++, pillarboxSize, 0, pillarboxSize + 2, gScreenHeight);
|
||||
gDPFillRectangle(gfx++, gScreenWidth - pillarboxSize - 2, 0, gScreenWidth - pillarboxSize, gScreenHeight);
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(pillarboxSize), 0, pillarboxSize + 2, gScreenHeight);
|
||||
gDPFillWideRectangle(gfx++, OTRGetRectDimensionFromLeftEdge(gScreenWidth - pillarboxSize - 2), 0, OTRGetRectDimensionFromRightEdge(gScreenWidth - pillarboxSize), gScreenHeight);
|
||||
// #endregion
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
OVERLAY_DISP = gfx++;
|
||||
|
||||
Reference in New Issue
Block a user