From c7d2623f2b6dd7e71e53b8a47a63088dd35e1af2 Mon Sep 17 00:00:00 2001 From: Alaux <73968015+MrAlaux@users.noreply.github.com> Date: Wed, 18 Oct 2023 04:38:58 -0300 Subject: [PATCH] Fix slight screen melt inconsistency across resolutions (#1229) --- src/f_wipe.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/f_wipe.c b/src/f_wipe.c index 488cdb39..d5d7abae 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -78,6 +78,7 @@ static int *y; static int wipe_initMelt(int width, int height, int ticks) { int i; + const int hires_size = 1 << hires; // copy start screen to main screen memcpy(wipe_scr, wipe_scr_start, width*height); @@ -89,16 +90,16 @@ static int wipe_initMelt(int width, int height, int ticks) // setup initial column positions (y<0 => not ready to scroll yet) y = (int *) Z_Malloc(width*sizeof(int), PU_STATIC, 0); - y[0] = -(M_Random()%16); + y[0] = -(M_Random()%16) * hires_size; for (i=1;i 0) y[i] = 0; else - if (y[i] == -16) - y[i] = -15; + if (y[i] == -16 * hires_size) + y[i] = -15 * hires_size; } return 0; }