mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 02:41:49 +00:00
Make all inline increments of dest and dsrc occur on seperate lines, for extra clarity and making it easier to identify future issues with these functions.
This commit is contained in:
parent
f6df8200d2
commit
9a02a6466c
1 changed files with 21 additions and 14 deletions
|
|
@ -836,13 +836,14 @@ void R_DrawSpan_8 (void)
|
||||||
bit = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
|
bit = (((UINT32)yposition >> nflatyshift) & nflatmask) | ((UINT32)xposition >> nflatxshift);
|
||||||
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
||||||
{
|
{
|
||||||
*dest++ = fullbright[source[bit]];
|
*dest = fullbright[source[bit]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*dest++ = colormap[source[bit]];
|
*dest = colormap[source[bit]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dest++;
|
||||||
xposition += xstep;
|
xposition += xstep;
|
||||||
yposition += ystep;
|
yposition += ystep;
|
||||||
}
|
}
|
||||||
|
|
@ -1278,15 +1279,16 @@ void R_DrawTiltedTranslucentWaterSpan_8(void)
|
||||||
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
||||||
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
||||||
{
|
{
|
||||||
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
||||||
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
dest++;
|
dest++;
|
||||||
ds_x1++;
|
ds_x1++;
|
||||||
|
dsrc++;
|
||||||
iz += ds_szp->x;
|
iz += ds_szp->x;
|
||||||
uz += ds_sup->x;
|
uz += ds_sup->x;
|
||||||
vz += ds_svp->x;
|
vz += ds_svp->x;
|
||||||
|
|
@ -1321,15 +1323,16 @@ void R_DrawTiltedTranslucentWaterSpan_8(void)
|
||||||
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
||||||
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
||||||
{
|
{
|
||||||
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
||||||
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
dest++;
|
dest++;
|
||||||
ds_x1++;
|
ds_x1++;
|
||||||
|
dsrc++;
|
||||||
u += stepu;
|
u += stepu;
|
||||||
v += stepv;
|
v += stepv;
|
||||||
}
|
}
|
||||||
|
|
@ -1346,12 +1349,12 @@ void R_DrawTiltedTranslucentWaterSpan_8(void)
|
||||||
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
||||||
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
||||||
{
|
{
|
||||||
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
||||||
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
ds_x1++;
|
ds_x1++;
|
||||||
}
|
}
|
||||||
|
|
@ -1376,15 +1379,16 @@ void R_DrawTiltedTranslucentWaterSpan_8(void)
|
||||||
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
bit = ((v >> nflatyshift) & nflatmask) | (u >> nflatxshift);
|
||||||
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
||||||
{
|
{
|
||||||
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (fullbright[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
colormap = planezlight[tiltlighting[ds_x1]] + (ds_colormap - colormaps);
|
||||||
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc++);
|
*dest = *(ds_transmap + (colormap[source[bit]] << 8) + *dsrc);
|
||||||
}
|
}
|
||||||
dest++;
|
dest++;
|
||||||
ds_x1++;
|
ds_x1++;
|
||||||
|
dsrc++;
|
||||||
u += stepu;
|
u += stepu;
|
||||||
v += stepv;
|
v += stepv;
|
||||||
}
|
}
|
||||||
|
|
@ -2354,17 +2358,18 @@ void R_DrawTranslucentWaterSpan_8(void)
|
||||||
bit = ((yposition >> nflatyshift) & nflatmask) | (xposition >> nflatxshift);
|
bit = ((yposition >> nflatyshift) & nflatmask) | (xposition >> nflatxshift);
|
||||||
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
||||||
{
|
{
|
||||||
dest[i] = fullbright[*(ds_transmap + (source[bit] << 8) + *dsrc++)];
|
dest[i] = fullbright[*(ds_transmap + (source[bit] << 8) + dsrc[i])];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dest[i] = colormap[*(ds_transmap + (source[bit] << 8) + *dsrc++)];
|
dest[i] = colormap[*(ds_transmap + (source[bit] << 8) + dsrc[i])];
|
||||||
}
|
}
|
||||||
xposition += xstep;
|
xposition += xstep;
|
||||||
yposition += ystep;
|
yposition += ystep;
|
||||||
}
|
}
|
||||||
|
|
||||||
dest += 8;
|
dest += 8;
|
||||||
|
dsrc += 8;
|
||||||
count -= 8;
|
count -= 8;
|
||||||
}
|
}
|
||||||
while (count--)
|
while (count--)
|
||||||
|
|
@ -2372,12 +2377,14 @@ void R_DrawTranslucentWaterSpan_8(void)
|
||||||
bit = ((yposition >> nflatyshift) & nflatmask) | (xposition >> nflatxshift);
|
bit = ((yposition >> nflatyshift) & nflatmask) | (xposition >> nflatxshift);
|
||||||
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
if (brightmap != NULL && brightmap[bit] == BRIGHTPIXEL)
|
||||||
{
|
{
|
||||||
*dest++ = fullbright[*(ds_transmap + (source[bit] << 8) + *dsrc++)];
|
*dest = fullbright[*(ds_transmap + (source[bit] << 8) + *dsrc)];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*dest++ = colormap[*(ds_transmap + (source[bit] << 8) + *dsrc++)];
|
*dest = colormap[*(ds_transmap + (source[bit] << 8) + *dsrc)];
|
||||||
}
|
}
|
||||||
|
dest++;
|
||||||
|
dsrc++;
|
||||||
xposition += xstep;
|
xposition += xstep;
|
||||||
yposition += ystep;
|
yposition += ystep;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue