- Turn on GradientFill apply small hack fix to keep it out of a loop.
- Turning code off does not fix the code, 8 years later!

svn path=/trunk/; revision=75312
This commit is contained in:
James Tabor
2017-07-09 18:06:24 +00:00
parent d2fc6e6ee2
commit 1c0aedce83

View File

@@ -286,7 +286,7 @@ IntEngGradientFillRect(
x[line] = a->x; \ x[line] = a->x; \
sx[line] = a->x + pptlDitherOrg->x; \ sx[line] = a->x + pptlDitherOrg->x; \
dx[line] = abs(b->x - a->x); \ dx[line] = abs(b->x - a->x); \
dy[line] = abs(b->y - a->y); \ dy[line] = max(abs(b->y - a->y),1); \
incx[line] = LINC[b->x > a->x]; \ incx[line] = LINC[b->x > a->x]; \
ex[line] = -(dy[line]>>1); \ ex[line] = -(dy[line]>>1); \
destx[line] = b->x destx[line] = b->x
@@ -319,19 +319,19 @@ IntEngGradientFillTriangle(
{ {
SURFOBJ *psoOutput; SURFOBJ *psoOutput;
PTRIVERTEX v1, v2, v3; PTRIVERTEX v1, v2, v3;
//RECT_ENUM RectEnum; RECT_ENUM RectEnum;
//BOOL EnumMore; BOOL EnumMore;
//ULONG i; ULONG i;
POINTL Translate; POINTL Translate;
INTENG_ENTER_LEAVE EnterLeave; INTENG_ENTER_LEAVE EnterLeave;
RECTL FillRect = { 0, 0, 0, 0 }; RECTL FillRect = { 0, 0, 0, 0 };
//ULONG Color; ULONG Color;
//BOOL sx[NLINES]; BOOL sx[NLINES];
//LONG x[NLINES], dx[NLINES], dy[NLINES], incx[NLINES], ex[NLINES], destx[NLINES]; LONG x[NLINES], dx[NLINES], dy[NLINES], incx[NLINES], ex[NLINES], destx[NLINES];
//LONG c[NLINES][3], dc[NLINES][3], ec[NLINES][3], ic[NLINES][3]; /* colors on lines */ LONG c[NLINES][3], dc[NLINES][3], ec[NLINES][3], ic[NLINES][3]; /* colors on lines */
//LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3]; /* colors in triangle */ LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3]; /* colors in triangle */
//LONG sy, y, bt; LONG sy, y, bt;
v1 = (pVertex + gTriangle->Vertex1); v1 = (pVertex + gTriangle->Vertex1);
v2 = (pVertex + gTriangle->Vertex2); v2 = (pVertex + gTriangle->Vertex2);
@@ -363,94 +363,94 @@ IntEngGradientFillTriangle(
return FALSE; return FALSE;
} }
//if (VCMPCLRS(v1, v2, v3)) if (VCMPCLRS(v1, v2, v3))
//{ {
// CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0); CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
// do do
// { {
// EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum); EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
// for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++) for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
// { {
// if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents)) if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
// { {
// BOOL InY; BOOL InY;
// DOINIT(v1, v3, 0); DOINIT(v1, v3, 0);
// DOINIT(v1, v2, 1); DOINIT(v1, v2, 1);
// DOINIT(v2, v3, 2); DOINIT(v2, v3, 2);
// y = v1->y; y = v1->y;
// sy = v1->y + pptlDitherOrg->y; sy = v1->y + pptlDitherOrg->y;
// bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom); bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
// while (sy < bt) while (sy < bt)
// { {
// InY = !(sy < FillRect.top || sy >= FillRect.bottom); InY = !(sy < FillRect.top || sy >= FillRect.bottom);
// GOLINE(v1, v3, 0); GOLINE(v1, v3, 0);
// DOLINE(v1, v3, 0); DOLINE(v1, v3, 0);
// ENDLINE(v1, v3, 0); ENDLINE(v1, v3, 0);
// GOLINE(v1, v2, 1); GOLINE(v1, v2, 1);
// DOLINE(v1, v2, 1); DOLINE(v1, v2, 1);
// FILLLINE(0, 1); FILLLINE(0, 1);
// ENDLINE(v1, v2, 1); ENDLINE(v1, v2, 1);
// GOLINE(v2, v3, 2); GOLINE(v2, v3, 2);
// DOLINE(v2, v3, 2); DOLINE(v2, v3, 2);
// FILLLINE(0, 2); FILLLINE(0, 2);
// ENDLINE(23, v3, 2); ENDLINE(23, v3, 2);
// y++; y++;
// sy++; sy++;
// } }
// } }
// } }
// } while (EnumMore); } while (EnumMore);
// return IntEngLeave(&EnterLeave); return IntEngLeave(&EnterLeave);
//} }
///* fill triangle with one solid color */ /* fill triangle with one solid color */
//Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8, v1->Blue >> 8)); Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8, v1->Blue >> 8));
//CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0); CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
//do do
//{ {
// EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum); EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
// for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++) for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
// { {
// if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents)) if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
// { {
// S_INITLINE(v1, v3, 0); S_INITLINE(v1, v3, 0);
// S_INITLINE(v1, v2, 1); S_INITLINE(v1, v2, 1);
// S_INITLINE(v2, v3, 2); S_INITLINE(v2, v3, 2);
// y = v1->y; y = v1->y;
// sy = v1->y + pptlDitherOrg->y; sy = v1->y + pptlDitherOrg->y;
// bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom); bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
// while (sy < bt) while (sy < bt)
// { {
// S_GOLINE(v1, v3, 0); S_GOLINE(v1, v3, 0);
// S_DOLINE(v1, v3, 0); S_DOLINE(v1, v3, 0);
// S_ENDLINE(v1, v3, 0); S_ENDLINE(v1, v3, 0);
// S_GOLINE(v1, v2, 1); S_GOLINE(v1, v2, 1);
// S_DOLINE(v1, v2, 1); S_DOLINE(v1, v2, 1);
// S_FILLLINE(0, 1); S_FILLLINE(0, 1);
// S_ENDLINE(v1, v2, 1); S_ENDLINE(v1, v2, 1);
// S_GOLINE(v2, v3, 2); S_GOLINE(v2, v3, 2);
// S_DOLINE(v2, v3, 2); S_DOLINE(v2, v3, 2);
// S_FILLLINE(0, 2); S_FILLLINE(0, 2);
// S_ENDLINE(23, v3, 2); S_ENDLINE(23, v3, 2);
// y++; y++;
// sy++; sy++;
// } }
// } }
// } }
//} while (EnumMore); } while (EnumMore);
return IntEngLeave(&EnterLeave); return IntEngLeave(&EnterLeave);
} }