From 7c27cf23746bff5d6c2e66fb91e407e0d48839fb Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 25 Jan 2010 22:42:15 +0100 Subject: [PATCH] Extensive bugfix of promotion pseudo-popup With holdings the pieces were offsetted vertically in stead of horizontally, and in shogi the pieces were not put on the promo board at all. Also the choice in shogi had to be translated into + or =, while in crazyhouse the promoted forms did not translate to chracters well, so now the basic types are shown in the pseudo-popup instead. --- backend.c | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/backend.c b/backend.c index 1a94cf7..122c8fd 100644 --- a/backend.c +++ b/backend.c @@ -6097,7 +6097,7 @@ UserMoveEvent(fromX, fromY, toX, toY, promoChar) } void -PromoDialog(int h, int w, Board board, Boolean clearBoard) +PromoDialog(int h, int w, Board board, Boolean clearBoard, char *title, int x, int y) { // dummy routine to mimic with pseudo-popup what front-end should do: // display a popup with h x w mini-board, and divert any mouse clicks // on it to the back-end routines RightClick and LeftClick, just @@ -6113,7 +6113,7 @@ Board promoBoard; int promotionChoice = 0; void -PiecePopUp() +PiecePopUp(int x, int y) { int i, j, h, w, nWhite=0, nBlack=0; ChessSquare list[EmptySquare]; @@ -6133,7 +6133,7 @@ PiecePopUp() for(i=0; i