From f2d68b075c3cb62dcfed5e30804bb0c8add84715 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 8 Jul 2025 13:48:04 +0200 Subject: [PATCH] texturewidthmask can be static --- src/r_data.c | 6 +++--- src/r_data.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/r_data.c b/src/r_data.c index 058177307..f3731c3fc 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -103,7 +103,7 @@ static UINT32 **texturecolumnofs; // column offset lookup table for each texture UINT8 **texturecache; // graphics data for each generated full-size texture // texture width is a power of 2, so it can easily repeat along sidedefs using a simple mask -INT32 *texturewidthmask; +static INT32 *texturewidthmask; fixed_t *textureheight; // needed for texture pegging @@ -475,12 +475,12 @@ UINT8 *R_GetColumn(fixed_t tex, INT32 col) data = texturecache[tex]; - const INT16 texwidth = textures[tex]->width; - if (texturewidthmask[tex]) col &= texturewidthmask[tex]; // set by load textures else { + const INT16 texwidth = textures[tex]->width; + // Odd width texture, cannot just mask. // Sometime gets colnum = -1 or = width, even without tiling. // Test LostCiv, Map 20, crates. diff --git a/src/r_data.h b/src/r_data.h index 575866478..58afc34d0 100644 --- a/src/r_data.h +++ b/src/r_data.h @@ -64,9 +64,6 @@ typedef struct extern texture_t **textures; extern UINT8 **texturecache; // graphics data for each generated full-size texture -// texture width is a power of 2, so it can easily repeat along sidedefs using a simple mask -extern INT32 *texturewidthmask; - extern fixed_t *textureheight; // needed for texture pegging UINT32 ASTBlendPixel(RGBA_t background, RGBA_t foreground, int style, UINT8 alpha);