Corrected the "bridge" operator, which failed to check for "false"

tile corners in the check area to find areas needing bridges.
This prevents generation of unnecessary bridging geometry;  and
since the error made the check rotation-dependent, this may
resolve some "parent and child disagree on CIF" errors.
This commit is contained in:
Tim Edwards 2021-07-28 09:40:36 -04:00
parent 11c53bb6d5
commit 55bf0ebd54
2 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
8.3.191
8.3.192

View File

@ -1840,12 +1840,15 @@ cifBridgeCheckFunc(tile, brcs)
switch (dir) {
case BRIDGE_NW:
/* Ignore tile if NW corner is not in the search area */
for (tp1 = RT(tile); LEFT(tp1) > LEFT(tile); tp1 = BL(tp1));
if (LEFT(tile) <= brcs->area->r_xbot || TOP(tile) >= brcs->area->r_ytop)
break;
/* Check that this is not a false corner */
else if (TiGetBottomType(tp1) == TiGetTopType(tile))
break;
/* Ignore tile if split, and SE corner is clipped */
if (TiGetRightType(tile) == checktype || TiGetBottomType(tile) == checktype)
break;
for (tp1 = RT(tile); LEFT(tp1) > LEFT(tile); tp1 = BL(tp1));
for (tp2 = BL(tile); TOP(tp2) < TOP(tile); tp2 = RT(tp2));
if ((TiGetBottomType(tp1) == checktype) &&
(TiGetRightType(tp2) == checktype))
@ -1856,12 +1859,15 @@ cifBridgeCheckFunc(tile, brcs)
break;
case BRIDGE_SW:
/* Ignore tile if SW corner is not in the search area */
tp1 = LB(tile);
if (LEFT(tile) <= brcs->area->r_xbot || BOTTOM(tile) <= brcs->area->r_ybot)
break;
/* Check that this is not a false corner */
else if (TiGetTopType(tp1) == TiGetBottomType(tile))
break;
/* Ignore tile if split, and NE corner is clipped */
if (TiGetRightType(tile) == checktype || TiGetTopType(tile) == checktype)
break;
tp1 = LB(tile);
tp2 = BL(tile);
if ((TiGetTopType(tp1) == checktype) ||
(TiGetRightType(tp2) == checktype))