From 2bd8093de9677a20fe507fd4030c6a3b05c6c102 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 24 Nov 2015 20:00:16 +0100 Subject: [PATCH] Try to load bitmaps for all pieces (WB) WinBoard only contains build-in bitmaps for the first 22 piece types, and also only associated filenames with those that can be used to provide external images. Now a new naming convention for piece images is introduced, like piece22_49s.bmp for a 49x49 bitmap for solid piece 22. All pieces that were not loaded according to the old convention now try to find images with this naming convention if a -pieceImageDirectory is defined. --- winboard/winboard.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index 1a20060..4f3b4c2 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -2589,10 +2589,12 @@ InitDrawingSizes(BoardSize boardSize, int flags) piece = (ChessSquare) ((int) piece + 1)) { if (pieceBitmap[i][piece] != NULL) DeleteObject(pieceBitmap[i][piece]); + pieceBitmap[i][piece] = NULL; } } fontBitmapSquareSize = 0; /* [HGM] render: make sure pieces will be recreated, as we might need others now */ + // Orthodox Chess pieces pieceBitmap[0][WhitePawn] = DoLoadBitmap(hInst, "p", squareSize, "s"); pieceBitmap[0][WhiteKnight] = DoLoadBitmap(hInst, "n", squareSize, "s"); @@ -2797,6 +2799,15 @@ InitDrawingSizes(BoardSize boardSize, int flags) pieceBitmap[2][WhiteSilver] = DoLoadBitmap(hInst, "sw", squareSize, "w"); minorSize = 0; } + + if(appData.pieceDirectory[0]) for(i=WhitePawn; ihf); JAWS_SILENCE @@ -7987,6 +7999,7 @@ Enables gnuEnables[] = { { IDM_Annotate, MF_BYCOMMAND|MF_GRAYED }, { IDM_NewChat, MF_BYCOMMAND|MF_GRAYED }, + // Needed to switch from ncp to GNU mode on Engine Load { ACTION_POS, MF_BYPOSITION|MF_ENABLED }, { IDM_MachineWhite, MF_BYCOMMAND|MF_ENABLED }, -- 1.7.0.4