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;
|
||||
jogTopPoint = startPoint;
|
||||
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,
|
||||
plowJogTopProc, (ClientData) NULL);
|
||||
|
||||
|
|
@ -287,7 +287,7 @@ plowProcessJogFunc(edge, area)
|
|||
startPoint.p_y = edge->e_ybot;
|
||||
jogBotPoint = startPoint;
|
||||
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,
|
||||
plowJogBotProc, (ClientData) NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ prPenumbraTop(edge, rules)
|
|||
ar.ar_rule = pr;
|
||||
ar.ar_clip.p_x = edge->e_newx + 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,
|
||||
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_y = edge->e_ybot - pr->pr_dist;
|
||||
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,
|
||||
plowPenumbraBotProc, (ClientData) &ar);
|
||||
}
|
||||
|
|
@ -512,7 +512,7 @@ prSliverTop(edge, rules)
|
|||
*/
|
||||
ar.ar_slivtype = (TileType) -1;
|
||||
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,
|
||||
plowSliverTopExtent, (ClientData) &ar);
|
||||
|
||||
|
|
@ -524,7 +524,7 @@ prSliverTop(edge, rules)
|
|||
* ar_lastx, or ar_clip.
|
||||
*/
|
||||
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,
|
||||
plowSliverTopMove, (ClientData) &ar);
|
||||
}
|
||||
|
|
@ -568,7 +568,7 @@ prSliverBot(edge, rules)
|
|||
ar.ar_slivtype = (TileType) -1;
|
||||
ar.ar_lastx = ar.ar_mustmove = edge->e_x;
|
||||
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,
|
||||
plowSliverBotExtent, (ClientData) &ar);
|
||||
|
||||
|
|
@ -580,7 +580,7 @@ prSliverBot(edge, rules)
|
|||
* ar_lastx, or ar_clip.
|
||||
*/
|
||||
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,
|
||||
plowSliverBotMove, (ClientData) &ar);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ prIllegalTop(edge)
|
|||
ar.ar_slivtype = (TileType) -1;
|
||||
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,
|
||||
plowIllegalTopProc, (ClientData) &ar);
|
||||
if (ar.ar_slivtype == (TileType) -1)
|
||||
|
|
@ -586,7 +586,7 @@ prIllegalTop(edge)
|
|||
startPoint.p_x = ar.ar_mustmove;
|
||||
TTMaskSetOnlyType(&insideTypes, ar.ar_slivtype);
|
||||
TTMaskCom(&insideTypes);
|
||||
plowSrOutline(edge->e_pNum, &startPoint, insideTypes, GEO_NORTH,
|
||||
plowSrOutline(edge->e_pNum, &startPoint, &insideTypes, GEO_NORTH,
|
||||
GMASK_WEST|GMASK_NORTH|GMASK_SOUTH,
|
||||
plowCoverTopProc, (ClientData) &ar);
|
||||
}
|
||||
|
|
@ -606,7 +606,7 @@ prIllegalBot(edge)
|
|||
ar.ar_slivtype = (TileType) -1;
|
||||
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,
|
||||
plowIllegalBotProc, (ClientData) &ar);
|
||||
if (ar.ar_slivtype == (TileType) -1)
|
||||
|
|
@ -614,7 +614,7 @@ prIllegalBot(edge)
|
|||
|
||||
startPoint.p_x = ar.ar_mustmove;
|
||||
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,
|
||||
plowCoverBotProc, (ClientData) &ar);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -779,26 +779,27 @@ plowAtomize(pNum, rect, proc, cdata)
|
|||
*/
|
||||
|
||||
void
|
||||
plowSrOutline(pNum, startPoint, insideTypes, initialDir, dirMask, proc, cdata)
|
||||
int pNum; /* Plane # in plowYankDef to search */
|
||||
Point *startPoint; /* Point on boundary; material of types
|
||||
plowSrOutline(
|
||||
int pNum, /* Plane # in plowYankDef to search */
|
||||
Point *startPoint, /* Point on boundary; material of types
|
||||
* in insideTypes should be to the
|
||||
* inside (as determined by initialDir
|
||||
* below).
|
||||
*/
|
||||
TileTypeBitMask insideTypes; /* Mask of types inside the region
|
||||
const TileTypeBitMask *insideTypesp,/* Mask of types inside the region
|
||||
* 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,
|
||||
* 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.
|
||||
*/
|
||||
int (*proc)(); /* Client procedure */
|
||||
ClientData cdata; /* Argument to client procedure */
|
||||
int (*proc)(), /* Client procedure */
|
||||
ClientData cdata) /* Argument to client procedure */
|
||||
{
|
||||
TileTypeBitMask insideTypes = *insideTypesp; /* TTMaskCopy(&insideTypes, insideTypesp) */
|
||||
Outline outline;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ PlowTest(w, cmd)
|
|||
}
|
||||
if (!CmdParseLayers(cmd->tx_argv[3], &okTypes))
|
||||
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,
|
||||
plowShowOutline, (ClientData) &editArea);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ extern int plowGenRandom();
|
|||
extern void plowQueueDone();
|
||||
extern void plowQueueInit();
|
||||
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 plowSrShadowBack();
|
||||
extern int plowSrShadowInitial();
|
||||
|
|
|
|||
Loading…
Reference in New Issue