{\r
HBITMAP oldBitmap;\r
HBRUSH oldBrush;\r
+ int tmpSize;\r
\r
if (appData.blindfold) return;\r
\r
BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0,\r
sqcolor ? SRCCOPY : NOTSRCCOPY);\r
} else {\r
+ tmpSize = squareSize;\r
if(minorSize &&\r
(piece >= (int)WhiteNightrider && piece <= WhiteGrasshopper ||\r
piece >= (int)BlackNightrider && piece <= BlackGrasshopper) ) {\r
/* Bitmaps of smaller size are substituted, but we have to align them */\r
x += (squareSize - minorSize)>>1;\r
y += squareSize - minorSize - 2;\r
+ tmpSize = minorSize;\r
}\r
if (color || appData.allWhite ) {\r
oldBitmap = SelectObject(tmphdc, PieceBitmap(piece, WHITE_PIECE));\r
if( color )\r
oldBrush = SelectObject(hdc, whitePieceBrush);\r
else oldBrush = SelectObject(hdc, blackPieceBrush);\r
- BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0, 0x00B8074A);\r
+ if(appData.upsideDown && !color)\r
+ StretchBlt(hdc, x, y+tmpSize, tmpSize, -tmpSize, tmphdc, 0, 0, tmpSize, tmpSize, 0x00B8074A);\r
+ else\r
+ BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, 0x00B8074A);\r
#if 0\r
/* Use black piece color for outline of white pieces */\r
/* Not sure this looks really good (though xboard does it).\r
Maybe better to have another selectable color, default black */\r
SelectObject(hdc, blackPieceBrush); /* could have own brush */\r
SelectObject(tmphdc, PieceBitmap(piece, OUTLINE_PIECE));\r
- BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0, 0x00B8074A);\r
+ BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, 0x00B8074A);\r
#else\r
/* Use black for outline of white pieces */\r
SelectObject(tmphdc, PieceBitmap(piece, OUTLINE_PIECE));\r
- BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0, SRCAND);\r
+ if(appData.upsideDown && !color)\r
+ StretchBlt(hdc, x, y+tmpSize, tmpSize, -tmpSize, tmphdc, 0, 0, tmpSize, tmpSize, SRCAND);\r
+ else\r
+ BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, SRCAND);\r
#endif\r
} else {\r
#if 0\r
Maybe better to have another selectable color, default medium gray? */\r
oldBitmap = SelectObject(tmphdc, PieceBitmap(piece, BLACK_PIECE));\r
oldBrush = SelectObject(hdc, whitePieceBrush); /* could have own brush */\r
- BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0, 0x00B8074A);\r
+ BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, 0x00B8074A);\r
SelectObject(tmphdc, PieceBitmap(piece, SOLID_PIECE));\r
SelectObject(hdc, blackPieceBrush);\r
- BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0, 0x00B8074A);\r
+ BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, 0x00B8074A);\r
#else\r
/* Use square color for details of black pieces */\r
oldBitmap = SelectObject(tmphdc, PieceBitmap(piece, SOLID_PIECE));\r
oldBrush = SelectObject(hdc, blackPieceBrush);\r
- BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0, 0x00B8074A);\r
+ if(appData.upsideDown)\r
+ StretchBlt(hdc, x, y+tmpSize, tmpSize, -tmpSize, tmphdc, 0, 0, tmpSize, tmpSize, 0x00B8074A);\r
+ else\r
+ BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, 0x00B8074A);\r
#endif\r
}\r
SelectObject(hdc, oldBrush);\r
ShowWindow(GetDlgItem(hDlg, PB_Bishop), \r
gameInfo.variant != VariantShogi ?\r
SW_SHOW : SW_HIDE);\r
+ ShowWindow(GetDlgItem(hDlg, IDC_Yes), \r
+ gameInfo.variant == VariantShogi ?\r
+ SW_SHOW : SW_HIDE);\r
+ ShowWindow(GetDlgItem(hDlg, IDC_No), \r
+ gameInfo.variant == VariantShogi ?\r
+ SW_SHOW : SW_HIDE);\r
return TRUE;\r
\r
case WM_COMMAND: /* message: received a command */\r