Print 50-move counter in Engine-Output title
[xboard.git] / winboard / winboard.c
index 38c7c3f..87b1830 100644 (file)
@@ -2692,8 +2692,8 @@ SquareToPos(int row, int column, int * x, int * y)
 VOID\r
 DrawCoordsOnDC(HDC hdc)\r
 {\r
-  static char files[24] = {'0', '1','2','3','4','5','6','7','8','9','0','1','1','0','9','8','7','6','5','4','3','2','1','0'};\r
-  static char ranks[24] = {'l', 'k','j','i','h','g','f','e','d','c','b','a','a','b','c','d','e','f','g','h','i','j','k','l'};\r
+  static char files[] = "0123456789012345678901221098765432109876543210";\r
+  static char ranks[] = "wvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvw";\r
   char str[2] = { NULLCHAR, NULLCHAR };\r
   int oldMode, oldAlign, x, y, start, i;\r
   HFONT oldFont;\r
@@ -2702,7 +2702,7 @@ DrawCoordsOnDC(HDC hdc)
   if (!appData.showCoords)\r
     return;\r
 \r
-  start = flipView ? 1-(ONE!='1') : 23+(ONE!='1')-BOARD_HEIGHT;\r
+  start = flipView ? 1-(ONE!='1') : 45+(ONE!='1')-BOARD_HEIGHT;\r
 \r
   oldBrush = SelectObject(hdc, GetStockObject(BLACK_BRUSH));\r
   oldMode = SetBkMode(hdc, (appData.monoMode ? OPAQUE : TRANSPARENT));\r
@@ -2719,7 +2719,7 @@ DrawCoordsOnDC(HDC hdc)
     y += squareSize + lineGap;\r
   }\r
 \r
-  start = flipView ? 12-(BOARD_RGHT-BOARD_LEFT) : 12;\r
+  start = flipView ? 23-(BOARD_RGHT-BOARD_LEFT) : 23;\r
 \r
   SetTextAlign(hdc, TA_RIGHT|TA_BOTTOM);\r
   for (i = 0; i < BOARD_RGHT - BOARD_LEFT; i++) {\r
@@ -4067,10 +4067,11 @@ SetupDropMenu(HMENU hmenu)
   }\r
 }\r
 \r
-void DragPieceBegin(int x, int y)\r
+void DragPieceBegin(int x, int y, Boolean instantly)\r
 {\r
       dragInfo.lastpos.x = boardRect.left + x;\r
       dragInfo.lastpos.y = boardRect.top + y;\r
+      if(instantly) dragInfo.pos = dragInfo.lastpos;\r
       dragInfo.from.x = fromX;\r
       dragInfo.from.y = fromY;\r
       dragInfo.piece = boards[currentMove][fromY][fromX];\r
@@ -9823,6 +9824,8 @@ HistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current )
     MoveHistorySet( movelist, first, last, current, pvInfoList );\r
 \r
     EvalGraphSet( first, last, current, pvInfoList );\r
+\r
+    MakeEngineOutputTitle();\r
 }\r
 \r
 void\r