1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-10 19:13:42 +00:00

[ntsc-1.2] Match z_vismono.c (#2091)

* [ntsc-1.2] Match z_vismono.c

* change match to use height

Co-authored-by: cadmic <cadmic24@gmail.com>

---------

Co-authored-by: cadmic <cadmic24@gmail.com>
This commit is contained in:
Dragorn421 2024-08-26 20:14:50 +02:00 committed by GitHub
parent 3795574878
commit af7bbf9dad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)