plowSrOutline() pass by-pointer const TileTypeBitMask* instead of by-value
sizeof(TileTypeBitMask) == 32
This commit is contained in:
parent
cf0f9311ab
commit
d149c83a8a
|
|
@ -278,7 +278,7 @@ plowProcessJogFunc(edge, area)
|
||||||
startPoint.p_y = edge->e_ytop;
|
startPoint.p_y = edge->e_ytop;
|
||||||
jogTopPoint = startPoint;
|
jogTopPoint = startPoint;
|
||||||
jogTopDir = J_N;
|
jogTopDir = J_N;
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, mask, GEO_NORTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &mask, GEO_NORTH,
|
||||||
GMASK_NORTH|GMASK_WEST|GMASK_EAST,
|
GMASK_NORTH|GMASK_WEST|GMASK_EAST,
|
||||||
plowJogTopProc, (ClientData) NULL);
|
plowJogTopProc, (ClientData) NULL);
|
||||||
|
|
||||||
|
|
@ -287,7 +287,7 @@ plowProcessJogFunc(edge, area)
|
||||||
startPoint.p_y = edge->e_ybot;
|
startPoint.p_y = edge->e_ybot;
|
||||||
jogBotPoint = startPoint;
|
jogBotPoint = startPoint;
|
||||||
jogBotDir = J_N;
|
jogBotDir = J_N;
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, mask, GEO_SOUTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &mask, GEO_SOUTH,
|
||||||
GMASK_SOUTH|GMASK_WEST|GMASK_EAST,
|
GMASK_SOUTH|GMASK_WEST|GMASK_EAST,
|
||||||
plowJogBotProc, (ClientData) NULL);
|
plowJogBotProc, (ClientData) NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ prPenumbraTop(edge, rules)
|
||||||
ar.ar_rule = pr;
|
ar.ar_rule = pr;
|
||||||
ar.ar_clip.p_x = edge->e_newx + pr->pr_dist;
|
ar.ar_clip.p_x = edge->e_newx + pr->pr_dist;
|
||||||
ar.ar_clip.p_y = edge->e_ytop + pr->pr_dist;
|
ar.ar_clip.p_y = edge->e_ytop + pr->pr_dist;
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, pr->pr_ltypes, GEO_NORTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &pr->pr_ltypes, GEO_NORTH,
|
||||||
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
||||||
plowPenumbraTopProc, (ClientData) &ar);
|
plowPenumbraTopProc, (ClientData) &ar);
|
||||||
}
|
}
|
||||||
|
|
@ -256,7 +256,7 @@ prPenumbraBot(edge, rules)
|
||||||
ar.ar_clip.p_x = edge->e_newx + pr->pr_dist;
|
ar.ar_clip.p_x = edge->e_newx + pr->pr_dist;
|
||||||
ar.ar_clip.p_y = edge->e_ybot - pr->pr_dist;
|
ar.ar_clip.p_y = edge->e_ybot - pr->pr_dist;
|
||||||
TTMaskCom2(&insideTypes, &pr->pr_ltypes);
|
TTMaskCom2(&insideTypes, &pr->pr_ltypes);
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_SOUTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_SOUTH,
|
||||||
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
||||||
plowPenumbraBotProc, (ClientData) &ar);
|
plowPenumbraBotProc, (ClientData) &ar);
|
||||||
}
|
}
|
||||||
|
|
@ -512,7 +512,7 @@ prSliverTop(edge, rules)
|
||||||
*/
|
*/
|
||||||
ar.ar_slivtype = (TileType) -1;
|
ar.ar_slivtype = (TileType) -1;
|
||||||
ar.ar_lastx = ar.ar_mustmove = edge->e_x;
|
ar.ar_lastx = ar.ar_mustmove = edge->e_x;
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, pr->pr_ltypes, GEO_NORTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &pr->pr_ltypes, GEO_NORTH,
|
||||||
GMASK_NORTH|GMASK_EAST|GMASK_SOUTH,
|
GMASK_NORTH|GMASK_EAST|GMASK_SOUTH,
|
||||||
plowSliverTopExtent, (ClientData) &ar);
|
plowSliverTopExtent, (ClientData) &ar);
|
||||||
|
|
||||||
|
|
@ -524,7 +524,7 @@ prSliverTop(edge, rules)
|
||||||
* ar_lastx, or ar_clip.
|
* ar_lastx, or ar_clip.
|
||||||
*/
|
*/
|
||||||
if (ar.ar_mustmove > edge->e_x)
|
if (ar.ar_mustmove > edge->e_x)
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, pr->pr_ltypes, GEO_NORTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &pr->pr_ltypes, GEO_NORTH,
|
||||||
GMASK_SOUTH|GMASK_NORTH,
|
GMASK_SOUTH|GMASK_NORTH,
|
||||||
plowSliverTopMove, (ClientData) &ar);
|
plowSliverTopMove, (ClientData) &ar);
|
||||||
}
|
}
|
||||||
|
|
@ -568,7 +568,7 @@ prSliverBot(edge, rules)
|
||||||
ar.ar_slivtype = (TileType) -1;
|
ar.ar_slivtype = (TileType) -1;
|
||||||
ar.ar_lastx = ar.ar_mustmove = edge->e_x;
|
ar.ar_lastx = ar.ar_mustmove = edge->e_x;
|
||||||
TTMaskCom2(&insideTypes, &pr->pr_ltypes);
|
TTMaskCom2(&insideTypes, &pr->pr_ltypes);
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_SOUTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_SOUTH,
|
||||||
GMASK_NORTH|GMASK_EAST|GMASK_SOUTH,
|
GMASK_NORTH|GMASK_EAST|GMASK_SOUTH,
|
||||||
plowSliverBotExtent, (ClientData) &ar);
|
plowSliverBotExtent, (ClientData) &ar);
|
||||||
|
|
||||||
|
|
@ -580,7 +580,7 @@ prSliverBot(edge, rules)
|
||||||
* ar_lastx, or ar_clip.
|
* ar_lastx, or ar_clip.
|
||||||
*/
|
*/
|
||||||
if (ar.ar_mustmove > edge->e_x)
|
if (ar.ar_mustmove > edge->e_x)
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_SOUTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_SOUTH,
|
||||||
GMASK_SOUTH|GMASK_NORTH,
|
GMASK_SOUTH|GMASK_NORTH,
|
||||||
plowSliverBotMove, (ClientData) &ar);
|
plowSliverBotMove, (ClientData) &ar);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -577,7 +577,7 @@ prIllegalTop(edge)
|
||||||
ar.ar_slivtype = (TileType) -1;
|
ar.ar_slivtype = (TileType) -1;
|
||||||
ar.ar_clip.p_x = edge->e_newx;
|
ar.ar_clip.p_x = edge->e_newx;
|
||||||
|
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_NORTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_NORTH,
|
||||||
GMASK_EAST|GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
GMASK_EAST|GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
||||||
plowIllegalTopProc, (ClientData) &ar);
|
plowIllegalTopProc, (ClientData) &ar);
|
||||||
if (ar.ar_slivtype == (TileType) -1)
|
if (ar.ar_slivtype == (TileType) -1)
|
||||||
|
|
@ -586,7 +586,7 @@ prIllegalTop(edge)
|
||||||
startPoint.p_x = ar.ar_mustmove;
|
startPoint.p_x = ar.ar_mustmove;
|
||||||
TTMaskSetOnlyType(&insideTypes, ar.ar_slivtype);
|
TTMaskSetOnlyType(&insideTypes, ar.ar_slivtype);
|
||||||
TTMaskCom(&insideTypes);
|
TTMaskCom(&insideTypes);
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_NORTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_NORTH,
|
||||||
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
||||||
plowCoverTopProc, (ClientData) &ar);
|
plowCoverTopProc, (ClientData) &ar);
|
||||||
}
|
}
|
||||||
|
|
@ -606,7 +606,7 @@ prIllegalBot(edge)
|
||||||
ar.ar_slivtype = (TileType) -1;
|
ar.ar_slivtype = (TileType) -1;
|
||||||
ar.ar_clip.p_x = edge->e_newx;
|
ar.ar_clip.p_x = edge->e_newx;
|
||||||
|
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_SOUTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_SOUTH,
|
||||||
GMASK_EAST|GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
GMASK_EAST|GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
||||||
plowIllegalBotProc, (ClientData) &ar);
|
plowIllegalBotProc, (ClientData) &ar);
|
||||||
if (ar.ar_slivtype == (TileType) -1)
|
if (ar.ar_slivtype == (TileType) -1)
|
||||||
|
|
@ -614,7 +614,7 @@ prIllegalBot(edge)
|
||||||
|
|
||||||
startPoint.p_x = ar.ar_mustmove;
|
startPoint.p_x = ar.ar_mustmove;
|
||||||
TTMaskSetOnlyType(&insideTypes, ar.ar_slivtype);
|
TTMaskSetOnlyType(&insideTypes, ar.ar_slivtype);
|
||||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_SOUTH,
|
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_SOUTH,
|
||||||
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
||||||
plowCoverBotProc, (ClientData) &ar);
|
plowCoverBotProc, (ClientData) &ar);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -779,26 +779,27 @@ plowAtomize(pNum, rect, proc, cdata)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
plowSrOutline(pNum, startPoint, insideTypes, initialDir, dirMask, proc, cdata)
|
plowSrOutline(
|
||||||
int pNum; /* Plane # in plowYankDef to search */
|
int pNum, /* Plane # in plowYankDef to search */
|
||||||
Point *startPoint; /* Point on boundary; material of types
|
Point *startPoint, /* Point on boundary; material of types
|
||||||
* in insideTypes should be to the
|
* in insideTypes should be to the
|
||||||
* inside (as determined by initialDir
|
* inside (as determined by initialDir
|
||||||
* below).
|
* below).
|
||||||
*/
|
*/
|
||||||
TileTypeBitMask insideTypes; /* Mask of types inside the region
|
const TileTypeBitMask *insideTypesp,/* Mask of types inside the region
|
||||||
* whose outline is being traced.
|
* whose outline is being traced.
|
||||||
*/
|
*/
|
||||||
int initialDir; /* Initial direction to go from the
|
int initialDir, /* Initial direction to go from the
|
||||||
* starting point. One of GEO_NORTH,
|
* starting point. One of GEO_NORTH,
|
||||||
* or GEO_SOUTH.
|
* or GEO_SOUTH.
|
||||||
*/
|
*/
|
||||||
int dirMask; /* Mask of those directions for which
|
int dirMask, /* Mask of those directions for which
|
||||||
* we will call the client procedure.
|
* we will call the client procedure.
|
||||||
*/
|
*/
|
||||||
int (*proc)(); /* Client procedure */
|
int (*proc)(), /* Client procedure */
|
||||||
ClientData cdata; /* Argument to client procedure */
|
ClientData cdata) /* Argument to client procedure */
|
||||||
{
|
{
|
||||||
|
TileTypeBitMask insideTypes = *insideTypesp; /* TTMaskCopy(&insideTypes, insideTypesp) */
|
||||||
Outline outline;
|
Outline outline;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ PlowTest(w, cmd)
|
||||||
}
|
}
|
||||||
if (!CmdParseLayers(cmd->tx_argv[3], &okTypes))
|
if (!CmdParseLayers(cmd->tx_argv[3], &okTypes))
|
||||||
return;
|
return;
|
||||||
(void) plowSrOutline(PL_TECHDEPBASE, &editArea.r_ll, okTypes, dir,
|
(void) plowSrOutline(PL_TECHDEPBASE, &editArea.r_ll, &okTypes, dir,
|
||||||
GMASK_NORTH|GMASK_SOUTH|GMASK_EAST|GMASK_WEST,
|
GMASK_NORTH|GMASK_SOUTH|GMASK_EAST|GMASK_WEST,
|
||||||
plowShowOutline, (ClientData) &editArea);
|
plowShowOutline, (ClientData) &editArea);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ extern int plowGenRandom();
|
||||||
extern void plowQueueDone();
|
extern void plowQueueDone();
|
||||||
extern void plowQueueInit();
|
extern void plowQueueInit();
|
||||||
extern int plowSrFinalArea();
|
extern int plowSrFinalArea();
|
||||||
extern void plowSrOutline();
|
extern void plowSrOutline(int pNum, Point *startPoint, const TileTypeBitMask *insideTypesp, int initialDir, int dirMask, int (*proc)(), ClientData cdata);
|
||||||
extern int plowSrShadow();
|
extern int plowSrShadow();
|
||||||
extern int plowSrShadowBack();
|
extern int plowSrShadowBack();
|
||||||
extern int plowSrShadowInitial();
|
extern int plowSrShadowInitial();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue