Replace some decimal constants with more descriptive hex constants.

This commit is contained in:
GoldenTails 2021-03-28 20:16:17 -05:00
parent 99c773f39e
commit 5b2abfa18d

View file

@ -1227,8 +1227,9 @@ void R_DrawSplat_8 (void)
// need!
//
// <Callum> 4194303 = (2048x2048)-1 (2048x2048 is maximum flat size)
// Why decimal? 0x3FFFF == 4194303... ~Golden
val = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
val &= 4194303;
val &= 0x3FFFF;
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 &= 0x3FFFF;
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 &= 0x3FFFF;
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 &= 0x3FFFF;
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 &= 0x3FFFF;
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 &= 0x3FFFF;
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 &= 0x3FFFF;
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 &= 0x3FFFF;
val = source[val];
if (val != TRANSPARENTPIXEL)
dest[7] = colormap[val];