diff --git a/database/.DBtcontact.c.swp b/database/.DBtcontact.c.swp new file mode 100644 index 00000000..8eb84799 Binary files /dev/null and b/database/.DBtcontact.c.swp differ diff --git a/plow/PlowRules2.c b/plow/PlowRules2.c index 9d53deaa..af9e6925 100644 --- a/plow/PlowRules2.c +++ b/plow/PlowRules2.c @@ -415,13 +415,14 @@ void prContactLHS(edge) Edge *edge; /* Edge being moved (LHS is contact) */ { - int pNum, pMax; + int pNum; PlaneMask connPlanes = DBConnPlanes[edge->e_ltype]; + /* Remove the plane that has already been processed from the mask */ + connPlanes &= ~PlaneNumToMaskBit(edge->e_pNum); + /* Add the edges of the contact on its other planes */ - connPlanes &= ~(edge->e_pNum); - pMax = DBPlane(edge->e_ltype) + 1; - for (pNum = pMax - 2; pNum <= pMax; pNum++) + for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) if (PlaneMaskHasPlane(connPlanes, pNum)) (void) plowAtomize(pNum, &edge->e_rect, plowPropagateProcPtr, (ClientData) NULL); @@ -431,13 +432,14 @@ int prContactRHS(edge) Edge *edge; /* Edge being moved (RHS is contact) */ { - int pNum, pMax; + int pNum; PlaneMask connPlanes = DBConnPlanes[edge->e_rtype]; + /* Remove the plane that has already been processed from the mask */ + connPlanes &= ~PlaneNumToMaskBit(edge->e_pNum); + /* Add the edges of the contact on its other planes */ - connPlanes &= ~(edge->e_pNum); - pMax = DBPlane(edge->e_ltype) + 1; - for (pNum = pMax - 2; pNum <= pMax; pNum++) + for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) if (PlaneMaskHasPlane(connPlanes, pNum)) (void) plowAtomize(pNum, &edge->e_rect, plowPropagateProcPtr, (ClientData) NULL); diff --git a/plow/PlowYank.c b/plow/PlowYank.c index 2d6173b7..532ec4db 100644 --- a/plow/PlowYank.c +++ b/plow/PlowYank.c @@ -538,13 +538,25 @@ plowUpdatePaintTile(tile, ui) { Rect r, rtrans; TileType type = TiGetTypeExact(tile); + int pNum, pMask; r.r_ybot = BOTTOM(tile); r.r_ytop = TOP(tile); r.r_xbot = TRAILING(tile); r.r_xtop = LEADING(tile); GeoTransRect(&plowInverseTrans, &r, &rtrans); - DBPaintPlane(ui->pu_def->cd_planes[DBPlane(type)], - &rtrans, DBWriteResultTbl[type], ui); + + pMask = DBTypePlaneMaskTbl[type]; + + for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) + { + if (PlaneMaskHasPlane(pMask, pNum)) + { + ui->pu_pNum = pNum; + DBPaintPlane(ui->pu_def->cd_planes[pNum], + &rtrans, DBWriteResultTbl[type], ui); + } + } + return (0); }