Merge branch 'golden-nitpicks-use-of-base-10' into 'next'

Use more readable hex constants in the Software Renderer splat and floorsprite drawers.

See merge request STJr/SRB2!1442
This commit is contained in:
Nev3r 2021-06-01 02:29:53 -04:00
commit 9e7d619a5b

View file

@ -1227,8 +1227,9 @@ void R_DrawSplat_8 (void)
// need!
//
// <Callum> 4194303 = (2048x2048)-1 (2048x2048 is maximum flat size)
// Why decimal? 0x3FFFFF == 4194303... ~Golden
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[0] = colormap[val];
@ -1236,7 +1237,7 @@ void R_DrawSplat_8 (void)
yposition += ystep;
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[1] = colormap[val];
@ -1244,7 +1245,7 @@ void R_DrawSplat_8 (void)
yposition += ystep;
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[2] = colormap[val];
@ -1252,7 +1253,7 @@ void R_DrawSplat_8 (void)
yposition += ystep;
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[3] = colormap[val];
@ -1260,7 +1261,7 @@ void R_DrawSplat_8 (void)
yposition += ystep;
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[4] = colormap[val];
@ -1268,7 +1269,7 @@ void R_DrawSplat_8 (void)
yposition += ystep;
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[5] = colormap[val];
@ -1276,7 +1277,7 @@ void R_DrawSplat_8 (void)
yposition += ystep;
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[6] = colormap[val];
@ -1284,7 +1285,7 @@ void R_DrawSplat_8 (void)
yposition += ystep;
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[7] = colormap[val];