mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
Finished restoring the plow function to the original capability.
However, various updates are needed to match changes in magic over the years, including handling of non-manhattan geometry, and handling of added DRC rules such as surround and extend.
This commit is contained in:
Binary file not shown.
+10
-8
@@ -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);
|
||||
|
||||
+14
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user