From b9b567e024ad4326b5352a7f193a424f54c9cfd2 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Fri, 31 May 2024 18:46:36 -0400 Subject: [PATCH] Fix texcoords for seamless pause background patch --- patches/fixes.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/patches/fixes.c b/patches/fixes.c index f46bb86..f99920b 100644 --- a/patches/fixes.c +++ b/patches/fixes.c @@ -58,13 +58,13 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num #define PIXEL_OFFSET ((1 << 4)) vtx[4 * row + 0].v.tc[0] = PIXEL_OFFSET; - vtx[4 * row + 0].v.tc[1] = (1 << 5) + PIXEL_OFFSET; + vtx[4 * row + 0].v.tc[1] = PIXEL_OFFSET; vtx[4 * row + 1].v.tc[0] = PAGE_BG_WIDTH * (1 << 5) + PIXEL_OFFSET; - vtx[4 * row + 1].v.tc[1] = (1 << 5) + PIXEL_OFFSET; + vtx[4 * row + 1].v.tc[1] = PIXEL_OFFSET; vtx[4 * row + 2].v.tc[0] = PIXEL_OFFSET; - vtx[4 * row + 2].v.tc[1] = (cur_y - next_y + 1) * (1 << 5) + PIXEL_OFFSET; + vtx[4 * row + 2].v.tc[1] = (cur_y - next_y) * (1 << 5) + PIXEL_OFFSET; vtx[4 * row + 3].v.tc[0] = PAGE_BG_WIDTH * (1 << 5) + PIXEL_OFFSET; - vtx[4 * row + 3].v.tc[1] = (cur_y - next_y + 1) * (1 << 5) + PIXEL_OFFSET; + vtx[4 * row + 3].v.tc[1] = (cur_y - next_y) * (1 << 5) + PIXEL_OFFSET; vtx[4 * row + 0].v.cn[0] = vtx[4 * row + 1].v.cn[0] = vtx[4 * row + 2].v.cn[0] = vtx[4 * row + 3].v.cn[0] = 0; vtx[4 * row + 0].v.cn[1] = vtx[4 * row + 1].v.cn[1] = vtx[4 * row + 2].v.cn[1] = vtx[4 * row + 3].v.cn[1] = 0; @@ -245,7 +245,7 @@ Gfx* KaleidoScope_DrawPageSections(Gfx* gfx, Vtx* vertices, TexturePtr* textures G_IM_FMT_IA, G_IM_SIZ_8b, // fmt, siz PAGE_BG_WIDTH + 2, PAGE_BG_HEIGHT + 2, // width, height 0, (bg_row + 0) * RECOMP_PAGE_ROW_HEIGHT, // uls, ult - PAGE_BG_WIDTH + 2, (bg_row + 1) * RECOMP_PAGE_ROW_HEIGHT + 2, // lrs, lrt + PAGE_BG_WIDTH + 2 - 1, (bg_row + 1) * RECOMP_PAGE_ROW_HEIGHT + 2 - 1, // lrs, lrt 0, // pal G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, @@ -253,8 +253,8 @@ Gfx* KaleidoScope_DrawPageSections(Gfx* gfx, Vtx* vertices, TexturePtr* textures gDPSetTileSize(gfx++, G_TX_RENDERTILE, 0 << G_TEXTURE_IMAGE_FRAC, 0 << G_TEXTURE_IMAGE_FRAC, - (PAGE_BG_WIDTH + 2) <