From e3605abcebab39ae7623a2db2e76f4aaa97d0234 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Thu, 11 Jul 2024 13:53:26 -0400 Subject: [PATCH] Fix vertices for bottom strip in seamless pause background patch --- patches/fixes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/fixes.c b/patches/fixes.c index 0dad6b9..6eaf864 100644 --- a/patches/fixes.c +++ b/patches/fixes.c @@ -35,11 +35,11 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num s32 cur_y; u32 row; - cur_y = PAGE_BG_HEIGHT / 2; + cur_y = (PAGE_BG_HEIGHT + 2) / 2; // 2 verts per row plus 2 extra verts at the start and the end. for (row = 0; row < RECOMP_PAGE_ROW_COUNT + 2; row++) { - s32 next_y = MAX(cur_y - RECOMP_PAGE_ROW_HEIGHT, -PAGE_BG_HEIGHT / 2); + s32 next_y = MAX(cur_y - RECOMP_PAGE_ROW_HEIGHT, -(PAGE_BG_HEIGHT + 2) / 2); vtx[4 * row + 0].v.ob[0] = -PAGE_BG_WIDTH / 2; vtx[4 * row + 1].v.ob[0] = PAGE_BG_WIDTH / 2; @@ -234,7 +234,7 @@ Gfx* KaleidoScope_DrawPageSections(Gfx* gfx, Vtx* vertices, TexturePtr* textures // Draw the rows. for (u32 bg_row = 0; bg_row < RECOMP_PAGE_ROW_COUNT; bg_row++) { - u32 cur_row_height = MIN(RECOMP_PAGE_ROW_HEIGHT, PAGE_BG_HEIGHT - bg_row * RECOMP_PAGE_ROW_HEIGHT); + u32 cur_row_height = MIN(RECOMP_PAGE_ROW_HEIGHT, PAGE_BG_HEIGHT + 1 - bg_row * RECOMP_PAGE_ROW_HEIGHT); gDPLoadTextureTile(gfx++, *cur_image, G_IM_FMT_IA, G_IM_SIZ_8b, // fmt, siz PAGE_BG_WIDTH + 2, PAGE_BG_HEIGHT + 2, // width, height