ref: 737261dbcd07d9dccd1fa76b3ef43c225dad4278
parent: 8a202d6c1fd789cc56a3d6501105a09b041501da
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Dec 13 09:05:26 EST 2023
bring fullbright back
--- a/r_surf.c
+++ b/r_surf.c
@@ -279,6 +279,10 @@
addlight(pixel_t x, int lr, int lg, int lb)
{
int r, g, b, y[3];
+
+ if((x & 0xff000000U) == 0)
+ return x;
+
r = (x>>16) & 0xff;
g = (x>>8) & 0xff;
b = (x>>0) & 0xff;
--- a/unix/vid.c
+++ b/unix/vid.c
@@ -104,7 +104,7 @@
*fp = 0xff<<24 | p[0] << 16 | p[1] << 8 | p[2];
for(p = p0, x = 0; x < 256; x++, p += 3)
- q1pal[x] = 0xff<<24 | x<<24 | p[0]<<16 | p[1]<<8 | p[2];
+ q1pal[x] = (x < 256-32 ? 0xff : 0)<<24 | p[0]<<16 | p[1]<<8 | p[2];
q1pal[255] &= 0;
scr_fullupdate = 0;
--- a/vid.c
+++ b/vid.c
@@ -138,7 +138,7 @@
*fp = p[0] << 16 | p[1] << 8 | p[2];
for(p = p0, x = 0; x < 256; x++, p += 3)
- q1pal[x] = x<<24 | p[0]<<16 | p[1]<<8 | p[2];
+ q1pal[x] = (x < 256-32 ? 0xff : 0)<<24 | p[0]<<16 | p[1]<<8 | p[2];
q1pal[255] &= 0;
scr_fullupdate = 0;