void AnimateUserMove (Widget w, XEvent * event,
String * params, Cardinal * nParams)
{
- extern ChessSquare promoSweep;
- if(promoSweep != EmptySquare && appData.sweepSelect) PromoScroll(event->xmotion.x, event->xmotion.y); else
+ if(!PromoScroll(event->xmotion.x, event->xmotion.y))
DragPieceMove(event->xmotion.x, event->xmotion.y);
}
}
}
+void
+ChangeDragPiece(ChessSquare piece)
+{
+ Pixmap mask;
+ player.dragPiece = piece;
+ /* The piece will be drawn using its own bitmap as a matte */
+ SelectGCMask(piece, &player.pieceGC, &player.outlineGC, &mask);
+ XSetClipMask(xDisplay, player.pieceGC, mask);
+}
+
static void
DragPieceMove(x, y)
int x; int y;