From ea223f631215b102a69237615b249d2b2fec3d70 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 7 Mar 2022 16:57:22 +0900 Subject: [PATCH] [sw] Clean up use of r_rectdesc I have no idea why the struct even had a local vrect that was used for temporary storage. --- libs/video/renderer/sw/draw.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/libs/video/renderer/sw/draw.c b/libs/video/renderer/sw/draw.c index 1b3d0c0c9..b242e06c1 100644 --- a/libs/video/renderer/sw/draw.c +++ b/libs/video/renderer/sw/draw.c @@ -49,7 +49,6 @@ #include "vid_internal.h" typedef struct { - vrect_t rect; int width; int height; byte *ptexbytes; @@ -699,19 +698,14 @@ Draw_TileClear (int x, int y, int w, int h) CLIP (x, y, w, h, (int) vid.width, (int) vid.height); - r_rectdesc.rect.x = x; - r_rectdesc.rect.y = y; - r_rectdesc.rect.width = w; - r_rectdesc.rect.height = h; - - vr.y = r_rectdesc.rect.y; - height = r_rectdesc.rect.height; + vr.y = y; + height = h; tileoffsety = vr.y % r_rectdesc.height; while (height > 0) { - vr.x = r_rectdesc.rect.x; - width = r_rectdesc.rect.width; + vr.x = x; + width = w; if (tileoffsety != 0) vr.height = r_rectdesc.height - tileoffsety;