engine.c: formatting changes

The bulk are whitespace changes; the only exception is a
"if (expr) { stmt; }" --> "if (expr) stmt;"

git-svn-id: https://svn.eduke32.com/eduke32@2353 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-02-18 17:55:27 +00:00
parent a534cb19bd
commit 72cc7cebec
1 changed files with 266 additions and 249 deletions

View File

@ -6241,10 +6241,14 @@ static void drawmaskwall(int16_t damaskwallcnt)
wallmost(uwall,z,sectnum,(uint8_t)0);
wallmost(uplc,z,(int32_t)wal->nextsector,(uint8_t)0);
for (x=xb1[z]; x<=xb2[z]; x++) if (uplc[x] > uwall[x]) uwall[x] = uplc[x];
for (x=xb1[z]; x<=xb2[z]; x++)
if (uplc[x] > uwall[x])
uwall[x] = uplc[x];
wallmost(dwall,z,sectnum,(uint8_t)1);
wallmost(dplc,z,(int32_t)wal->nextsector,(uint8_t)1);
for (x=xb1[z]; x<=xb2[z]; x++) if (dplc[x] < dwall[x]) dwall[x] = dplc[x];
for (x=xb1[z]; x<=xb2[z]; x++)
if (dplc[x] < dwall[x])
dwall[x] = dplc[x];
prepwall(z,wal);
globalorientation = (int32_t)wal->cstat;
@ -6364,12 +6368,20 @@ static void fillpolygon(int32_t npoints)
if (day2 > day1)
{
x1 += mulscale12((day1<<12)+4095-y1,xinc);
for (y=day1; y<day2; y++) { if (!dotp2[y]) { x1 += xinc; continue; } *dotp2[y]++ = (x1>>12); x1 += xinc; }
for (y=day1; y<day2; y++)
{
if (!dotp2[y]) { x1 += xinc; continue; }
*dotp2[y]++ = (x1>>12); x1 += xinc;
}
}
else
{
x2 += mulscale12((day2<<12)+4095-y2,xinc);
for (y=day2; y<day1; y++) { if (!dotp1[y]) { x2 += xinc; continue; } *dotp1[y]++ = (x2>>12); x2 += xinc; }
for (y=day2; y<day1; y++)
{
if (!dotp1[y]) { x2 += xinc; continue; }
*dotp1[y]++ = (x2>>12); x2 += xinc;
}
}
}
}
@ -7340,7 +7352,9 @@ static void initfastcolorlookup(int32_t rscale, int32_t gscale, int32_t bscale)
pal1 = (char *)&palette[768-3];
for (i=255; i>=0; i--,pal1-=3)
{
j = (pal1[0]>>3)*FASTPALGRIDSIZ*FASTPALGRIDSIZ+(pal1[1]>>3)*FASTPALGRIDSIZ+(pal1[2]>>3)+FASTPALGRIDSIZ*FASTPALGRIDSIZ+FASTPALGRIDSIZ+1;
j = (pal1[0]>>3)*FASTPALGRIDSIZ*FASTPALGRIDSIZ
+ (pal1[1]>>3)*FASTPALGRIDSIZ + (pal1[2]>>3)
+ FASTPALGRIDSIZ*FASTPALGRIDSIZ + FASTPALGRIDSIZ+1;
if (colhere[j>>3]&pow2char[j&7]) colnext[i] = colhead[j]; else colnext[i] = -1;
colhead[j] = i;
colhere[j>>3] |= pow2char[j&7];
@ -7418,7 +7432,10 @@ int32_t getclosestcol(int32_t r, int32_t g, int32_t b)
int32_t i, j, k, dist, mindist, retcol;
char *pal1;
j = (r>>3)*FASTPALGRIDSIZ*FASTPALGRIDSIZ+(g>>3)*FASTPALGRIDSIZ+(b>>3)+FASTPALGRIDSIZ*FASTPALGRIDSIZ+FASTPALGRIDSIZ+1;
j = (r>>3)*FASTPALGRIDSIZ*FASTPALGRIDSIZ
+ (g>>3)*FASTPALGRIDSIZ + (b>>3)
+ FASTPALGRIDSIZ*FASTPALGRIDSIZ
+ FASTPALGRIDSIZ+1;
mindist = min(rdist[coldist[r&7]+64+8],gdist[coldist[g&7]+64+8]);
mindist = min(mindist,bdist[coldist[b&7]+64+8]);
mindist++;
@ -12168,9 +12185,9 @@ int32_t clipmove(vec3_t *pos, int16_t *sectnum,
//Side blocker
if ((x2-x1)*((pos->x)-x1) + (y2-y1)*((pos->y)-y1) < 0)
{ addclipline(x1-day,y1+dax,x1+dax,y1+day,(int16_t)j+49152); }
addclipline(x1-day,y1+dax,x1+dax,y1+day,(int16_t)j+49152);
else if ((x1-x2)*((pos->x)-x2) + (y1-y2)*((pos->y)-y2) < 0)
{ addclipline(x2+day,y2-dax,x2-dax,y2-day,(int16_t)j+49152); }
addclipline(x2+day,y2-dax,x2-dax,y2-day,(int16_t)j+49152);
}
}
break;