Shape indication passed in sign bit of color (char) variable.
Boolean soughtPending = FALSE;
Boolean seekGraphUp;
#define MAX_SEEK_ADS 200
+#define SQUARE 0x80
char *seekAdList[MAX_SEEK_ADS];
int ratingList[MAX_SEEK_ADS], xList[MAX_SEEK_ADS], yList[MAX_SEEK_ADS], seekNrList[MAX_SEEK_ADS], zList[MAX_SEEK_ADS];
float tcList[MAX_SEEK_ADS];
!strstr(seekAdList[i], "bullet") &&
!strstr(seekAdList[i], "blitz") &&
!strstr(seekAdList[i], "standard") ) color = 2;
- DrawSeekDot(xList[i]=x+3*color, yList[i]=h-1-y, colorList[i]=color);
+ if(strstr(seekAdList[i], "(C) ")) color |= SQUARE; // plot computer seeks as squares
+ DrawSeekDot(xList[i]=x+3*(color&~SQUARE), yList[i]=h-1-y, colorList[i]=color);
}
void
\r
void DrawSeekDot(int x, int y, int color)\r
{\r
+ int square = color & 0x80;\r
+ color &= 0x7F;\r
HBRUSH oldBrush = SelectObject(hdcSeek, \r
color == 0 ? markerBrush : color == 1 ? darkSquareBrush : explodeBrush);\r
+ if(square)\r
+ Rectangle(hdcSeek, boardRect.left+x - squareSize/9, boardRect.top+y - squareSize/9,\r
+ boardRect.left+x + squareSize/9, boardRect.top+y + squareSize/9);\r
+ else\r
Ellipse(hdcSeek, boardRect.left+x - squareSize/8, boardRect.top+y - squareSize/8,\r
boardRect.left+x + squareSize/8, boardRect.top+y + squareSize/8);\r
SelectObject(hdcSeek, oldBrush);\r
XDrawString(xDisplay, xBoardWindow, coordGC, x, y+4, buf, strlen(buf));
}
-void DrawSeekDot(int x, int y, int color)
-{
- XFillArc(xDisplay, xBoardWindow, color == 0 ? prelineGC : color == 1 ? darkSquareGC : highlineGC,
+void DrawSeekDot(int x, int y, int colorNr)
+{
+ int square = colorNr & 0x80;
+ GC color;
+ colorNr &= 0x7F;
+ color = colorNr == 0 ? prelineGC : colorNr == 1 ? darkSquareGC : highlineGC;
+ if(square)
+ XFillRectangle(xDisplay, xBoardWindow, color,
+ x-squareSize/9, y-squareSize/9, 2*squareSize/9, 2*squareSize/9);
+ else
+ XFillArc(xDisplay, xBoardWindow, color,
x-squareSize/8, y-squareSize/8, squareSize/4, squareSize/4, 0, 64*360);
}