Corrected the CIF "close" function to accommodate non-manhattan

geometry.
This commit is contained in:
Tim Edwards 2020-11-10 10:26:01 -05:00
parent 61188031cb
commit 904a60423e
2 changed files with 8 additions and 6 deletions

View File

@ -1 +1 @@
8.3.78
8.3.79

View File

@ -2004,6 +2004,7 @@ cifGatherFunc(tile, atotal, mode)
if ((*atotal != INFINITY) && (*atotal < growDistance))
locarea = (dlong)(area.r_xtop - area.r_xbot)
* (dlong)(area.r_ytop - area.r_ybot);
if (IsSplit(tile)) locarea /= 2;
if (locarea > (dlong)INFINITY)
*atotal = INFINITY;
else
@ -2011,7 +2012,8 @@ cifGatherFunc(tile, atotal, mode)
}
else if (mode == CLOSE_FILL)
{
DBPaintPlane(cifPlane, &area, CIFPaintTable, (PaintUndoInfo *)NULL);
DBNMPaintPlane(cifPlane, TiGetTypeExact(tile), &area, CIFPaintTable,
(PaintUndoInfo *)NULL);
CIFTileOps++;
}
@ -2024,25 +2026,25 @@ cifGatherFunc(tile, atotal, mode)
/* Check top */
if (area.r_ytop != TiPlaneRect.r_ytop)
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp = BL(tp))
if (tp->ti_client == cdata && TiGetType(tp) == TT_SPACE)
if (tp->ti_client == cdata && TiGetBottomType(tp) == TT_SPACE)
cifGatherFunc(tp, atotal, mode);
/* Check bottom */
if (area.r_ybot != TiPlaneRect.r_ybot)
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp = TR(tp))
if (tp->ti_client == cdata && TiGetType(tp) == TT_SPACE)
if (tp->ti_client == cdata && TiGetTopType(tp) == TT_SPACE)
cifGatherFunc(tp, atotal, mode);
/* Check left */
if (area.r_xbot != TiPlaneRect.r_xbot)
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp = RT(tp))
if (tp->ti_client == cdata && TiGetType(tp) == TT_SPACE)
if (tp->ti_client == cdata && TiGetRightType(tp) == TT_SPACE)
cifGatherFunc(tp, atotal, mode);
/* Check right */
if (area.r_xtop != TiPlaneRect.r_xtop)
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp = LB(tp))
if (tp->ti_client == cdata && TiGetType(tp) == TT_SPACE)
if (tp->ti_client == cdata && TiGetLeftType(tp) == TT_SPACE)
cifGatherFunc(tp, atotal, mode);
return 0;