From 9903ec03fba55b76c94ac9572cc01c4fb0a8fd89 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Fri, 7 Dec 2012 20:13:20 +0400 Subject: [PATCH] Make R_NOTEXTURE 256x256 pixels. So that sky surfaces with missing texture are drawn properly. --- src/refresh/sw/image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/refresh/sw/image.c b/src/refresh/sw/image.c index a8e9eea87..58c8d3ea9 100644 --- a/src/refresh/sw/image.c +++ b/src/refresh/sw/image.c @@ -138,7 +138,7 @@ void R_BuildGammaTable(void) } } -#define NTX 16 +#define NTX 256 static void R_CreateNotexture(void) { @@ -160,9 +160,9 @@ static void R_CreateNotexture(void) for (m = 0; m < 4; m++) { p = (uint32_t *)ntx->pixels[m]; - for (y = 0; y < (16 >> m); y++) { - for (x = 0; x < (16 >> m); x++) { - if ((y < (8 >> m)) ^ (x < (8 >> m))) + for (y = 0; y < (NTX >> m); y++) { + for (x = 0; x < (NTX >> m); x++) { + if ((x ^ y) & (1 << (3 - m))) *p++ = U32_BLACK; else *p++ = U32_WHITE;