From d122f80d53d292e27aebf054b294a51b6e374980 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 11 Oct 2025 21:20:42 +0200 Subject: [PATCH] cache vid.height --- src/r_draw_span.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/r_draw_span.cpp b/src/r_draw_span.cpp index b9d81b646..c0381faf3 100644 --- a/src/r_draw_span.cpp +++ b/src/r_draw_span.cpp @@ -120,6 +120,8 @@ static void R_DrawSpanTemplate(drawspandata_t* ds) intptr_t count = (ds->x2 - ds->x1 + 1); //size_t i; + const INT32 stride = vid.height; + xposition = ds->xfrac; yposition = ds->yfrac; xstep = ds->xstep; ystep = ds->ystep; @@ -178,8 +180,8 @@ static void R_DrawSpanTemplate(drawspandata_t* ds) *dest = R_DrawSpanPixel(ds, dsrc, colormap, bit, source); - dest += vid.height; - dsrc += vid.height; + dest += stride; + dsrc += stride; xposition += xstep; yposition += ystep;