From af7bbf9dad0c717308c8ebfd99977e149ab6e088 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Mon, 26 Aug 2024 20:14:50 +0200 Subject: [PATCH] [ntsc-1.2] Match z_vismono.c (#2091) * [ntsc-1.2] Match z_vismono.c * change match to use height Co-authored-by: cadmic --------- Co-authored-by: cadmic --- src/code/z_vismono.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/code/z_vismono.c b/src/code/z_vismono.c index b0c91de601..b169f5b026 100644 --- a/src/code/z_vismono.c +++ b/src/code/z_vismono.c @@ -96,8 +96,7 @@ Gfx* VisMono_DesaturateDList(VisMono* this, Gfx* gfx) { // Its position in texture image space is shifted along +S by 2 gDPSetTile(gfx++, G_IM_FMT_CI, G_IM_SIZ_8b, SCREEN_WIDTH * 2 * G_IM_SIZ_8b_LINE_BYTES / 8, 0x0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 0, 0, G_TX_NOMIRROR | G_TX_CLAMP, 0, 0); - gDPSetTileSize(gfx++, G_TX_RENDERTILE, 2 << 2, 0, (SCREEN_WIDTH * 2 + 1) << 2, - (VISMONO_CFBFRAG_HEIGHT - 1) << 2); + gDPSetTileSize(gfx++, G_TX_RENDERTILE, 2 << 2, 0, ((SCREEN_WIDTH * 2) + 1) << 2, (height - 1) << 2); // Set texel 1 to be a CI8 image with width `SCREEN_WIDTH * 2` and height `VISMONO_CFBFRAG_HEIGHT` // Its position in texture image space is shifted along +S by 1 @@ -105,7 +104,7 @@ Gfx* VisMono_DesaturateDList(VisMono* this, Gfx* gfx) { // ignored for CI8 texture sampling. gDPSetTile(gfx++, G_IM_FMT_CI, G_IM_SIZ_8b, SCREEN_WIDTH * 2 * G_IM_SIZ_8b_LINE_BYTES / 8, 0x0, 1, 1, G_TX_NOMIRROR | G_TX_CLAMP, 0, 0, G_TX_NOMIRROR | G_TX_CLAMP, 0, 0); - gDPSetTileSize(gfx++, 1, 1 << 2, 0, (SCREEN_WIDTH * 2) << 2, (VISMONO_CFBFRAG_HEIGHT - 1) << 2); + gDPSetTileSize(gfx++, 1, 1 << 2, 0, (SCREEN_WIDTH * 2) << 2, (height - 1) << 2); // Draw a `SCREEN_WIDTH` wide, `height` high rectangle. // Texture coordinate T (vertical) starts at 0 and changes by one each line (dtdy = 1)