From: H.G. Muller Date: Wed, 29 Jun 2011 12:32:43 +0000 (+0200) Subject: Fix coords display on large boards X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0370d2ff673ad5bf2ada84787fdd6b20b41c831c;p=xboard.git Fix coords display on large boards The file indicators can now run upto 'w'. Only the lowest digit of the rank number is printed, from a table that is valid to 22. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 38c7c3f..17dccdd 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -2692,8 +2692,8 @@ SquareToPos(int row, int column, int * x, int * y) VOID DrawCoordsOnDC(HDC hdc) { - 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'}; - 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'}; + static char files[] = "0123456789012345678901221098765432109876543210"; + static char ranks[] = "wvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvw"; char str[2] = { NULLCHAR, NULLCHAR }; int oldMode, oldAlign, x, y, start, i; HFONT oldFont; @@ -2702,7 +2702,7 @@ DrawCoordsOnDC(HDC hdc) if (!appData.showCoords) return; - start = flipView ? 1-(ONE!='1') : 23+(ONE!='1')-BOARD_HEIGHT; + start = flipView ? 1-(ONE!='1') : 45+(ONE!='1')-BOARD_HEIGHT; oldBrush = SelectObject(hdc, GetStockObject(BLACK_BRUSH)); oldMode = SetBkMode(hdc, (appData.monoMode ? OPAQUE : TRANSPARENT)); @@ -2719,7 +2719,7 @@ DrawCoordsOnDC(HDC hdc) y += squareSize + lineGap; } - start = flipView ? 12-(BOARD_RGHT-BOARD_LEFT) : 12; + start = flipView ? 23-(BOARD_RGHT-BOARD_LEFT) : 23; SetTextAlign(hdc, TA_RIGHT|TA_BOTTOM); for (i = 0; i < BOARD_RGHT - BOARD_LEFT; i++) {