From 461350baf4b165e8f8c8090ef2b3b61a6ff31e82 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 df99ab2e6..b0e3a18b6 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 @@ -476,12 +476,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 32fc7a016..295cff401 100644 --- a/src/r_data.h +++ b/src/r_data.h @@ -65,9 +65,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);