indent fixes

This commit is contained in:
Amy G. Bowersox 2021-08-26 00:40:19 -06:00
parent e15bd3ab90
commit 71e9a4ff4e
2 changed files with 34 additions and 34 deletions

View File

@ -67,37 +67,37 @@ static BOOL line_clip(PINT32 output, INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT
if ((outcode1 & outcode2) != 0)
return FALSE; /* trivial rejection */
else if ((outcode1 == 0) && (outcode2 == 0))
break; /* trivial acceptance */
if (outcode1 == 0)
{
tmp = x1;
x1 = x2;
x2 = tmp;
tmp = y1;
y1 = y2;
y2 = tmp;
outcode1 = outcode2; /* we don't reference outcode2 in the rest of the loop */
}
if (outcode1 & 0x8)
{
x1 += M(x2 - x1, D(ymin - y1, y2 - y1));
y1 = ymin;
}
else if (outcode1 & 0x4)
{
x1 += M(x2 - x1, D(ymax - ONE - y1, y2 - y1));
y1 = ymax - ONE;
}
else if (outcode1 & 0x2)
{
y1 += M(y2 - y1, D(xmax - ONE - x1, x2 - x1));
x1 = xmax - ONE;
}
else if (outcode1 & 0x1)
{
y1 += M(y2 - y1, D(xmin - x1, x2 - x1));
x1 = xmin;
}
break; /* trivial acceptance */
if (outcode1 == 0)
{
tmp = x1;
x1 = x2;
x2 = tmp;
tmp = y1;
y1 = y2;
y2 = tmp;
outcode1 = outcode2; /* we don't reference outcode2 in the rest of the loop */
}
if (outcode1 & 0x8)
{
x1 += M(x2 - x1, D(ymin - y1, y2 - y1));
y1 = ymin;
}
else if (outcode1 & 0x4)
{
x1 += M(x2 - x1, D(ymax - ONE - y1, y2 - y1));
y1 = ymax - ONE;
}
else if (outcode1 & 0x2)
{
y1 += M(y2 - y1, D(xmax - ONE - x1, x2 - x1));
x1 = xmax - ONE;
}
else if (outcode1 & 0x1)
{
y1 += M(y2 - y1, D(xmin - x1, x2 - x1));
x1 = xmin;
}
}
output[0] = x1;
output[1] = y1;

View File

@ -25,7 +25,7 @@
#include "gfxobj.h"
#include "bitmap.h"
#define DCTXT_SIG_WORD 0x78744344 /* "DCtx */
#define DCTXT_SIG_WORD 0x78744344 /* "DCtx" */
/* Raster operation codes */
#define R2_BLACK 1