plowSrShadowBack() pass by-pointer const TileTypeBitMask* instead of by-value
sizeof(TileTypeBitMask) == 32
This commit is contained in:
parent
cfd71f1b5d
commit
86bb97948f
|
|
@ -189,12 +189,12 @@ plowProcessJog(edge, area)
|
||||||
* it returns 1 and aborts. We must therefore iterate until no more
|
* it returns 1 and aborts. We must therefore iterate until no more
|
||||||
* jogs are eliminated.
|
* jogs are eliminated.
|
||||||
*/
|
*/
|
||||||
while (plowSrShadowBack(edge->e_pNum, &r, DBSpaceBits,
|
while (plowSrShadowBack(edge->e_pNum, &r, &DBSpaceBits,
|
||||||
plowProcessJogFunc, (ClientData) area))
|
plowProcessJogFunc, (ClientData) area))
|
||||||
/* Nothing */;
|
/* Nothing */;
|
||||||
|
|
||||||
/* Scan to next edge between space and material */
|
/* Scan to next edge between space and material */
|
||||||
(void) plowSrShadowBack(edge->e_pNum, &r, DBAllButSpaceBits,
|
(void) plowSrShadowBack(edge->e_pNum, &r, &DBAllButSpaceBits,
|
||||||
plowJogPropagateLeft, (ClientData) NULL);
|
plowJogPropagateLeft, (ClientData) NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -372,7 +372,7 @@ plowProcessJogFunc(edge, area)
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
plowJogEraseList = (LinkedRect *) NULL;
|
plowJogEraseList = (LinkedRect *) NULL;
|
||||||
if (plowSrShadowBack(newedge.e_pNum, &r, mask,
|
if (plowSrShadowBack(newedge.e_pNum, &r, &mask,
|
||||||
plowJogDragLHS, INT2CD(newedge.e_newx - width)) == 0)
|
plowJogDragLHS, INT2CD(newedge.e_newx - width)) == 0)
|
||||||
{
|
{
|
||||||
/* Success: first paint to extend the RHS of the jog */
|
/* Success: first paint to extend the RHS of the jog */
|
||||||
|
|
|
||||||
|
|
@ -512,16 +512,17 @@ plowShadowInitialRHS(tp, s, bottomLeft)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
plowSrShadowBack(pNum, area, okTypes, proc, cdata)
|
plowSrShadowBack(
|
||||||
int pNum; /* Plane from plowYankDef to search */
|
int pNum, /* Plane from plowYankDef to search */
|
||||||
Rect *area; /* Area to search. Edges coincident with the
|
Rect *area, /* Area to search. Edges coincident with the
|
||||||
* left-hand side of this area are not seen;
|
* left-hand side of this area are not seen;
|
||||||
* they must lie to the right of area->r_xbot.
|
* they must lie to the right of area->r_xbot.
|
||||||
*/
|
*/
|
||||||
TileTypeBitMask okTypes;
|
const TileTypeBitMask *okTypesp,
|
||||||
int (*proc)(); /* Function to apply at each edge */
|
int (*proc)(), /* Function to apply at each edge */
|
||||||
ClientData cdata; /* Additional argument to pass to (*proc)() */
|
ClientData cdata) /* Additional argument to pass to (*proc)() */
|
||||||
{
|
{
|
||||||
|
TileTypeBitMask okTypes = *okTypesp; /* TTMaskCopy(&okTypes, okTypesp) */
|
||||||
Plane *plane = plowYankDef->cd_planes[pNum];
|
Plane *plane = plowYankDef->cd_planes[pNum];
|
||||||
struct shadow s;
|
struct shadow s;
|
||||||
Tile *tp;
|
Tile *tp;
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ PlowTest(w, cmd)
|
||||||
saveDef = plowYankDef;
|
saveDef = plowYankDef;
|
||||||
plowYankDef = def;
|
plowYankDef = def;
|
||||||
(void) plowSrShadowBack(PL_TECHDEPBASE, &editArea,
|
(void) plowSrShadowBack(PL_TECHDEPBASE, &editArea,
|
||||||
okTypes, plowShowShadow, (ClientData) def);
|
&okTypes, plowShowShadow, (ClientData) def);
|
||||||
plowYankDef = saveDef;
|
plowYankDef = saveDef;
|
||||||
break;
|
break;
|
||||||
case PC_SHADOW:
|
case PC_SHADOW:
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,7 @@ extern void plowQueueInit();
|
||||||
extern int plowSrFinalArea();
|
extern int plowSrFinalArea();
|
||||||
extern void plowSrOutline(int pNum, Point *startPoint, const TileTypeBitMask *insideTypesp, int initialDir, int dirMask, int (*proc)(), ClientData cdata);
|
extern void plowSrOutline(int pNum, Point *startPoint, const TileTypeBitMask *insideTypesp, int initialDir, int dirMask, int (*proc)(), ClientData cdata);
|
||||||
extern int plowSrShadow(int pNum, Rect *area, const TileTypeBitMask *okTypesp, int (*proc)(), ClientData cdata);
|
extern int plowSrShadow(int pNum, Rect *area, const TileTypeBitMask *okTypesp, int (*proc)(), ClientData cdata);
|
||||||
extern int plowSrShadowBack();
|
extern int plowSrShadowBack(int pNum, Rect *area, const TileTypeBitMask *okTypesp, int (*proc)(), ClientData cdata);
|
||||||
extern int plowSrShadowInitial();
|
extern int plowSrShadowInitial();
|
||||||
extern bool plowYankMore();
|
extern bool plowYankMore();
|
||||||
extern void PlowRandomTest();
|
extern void PlowRandomTest();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue