by H.G.Muller » 17 Feb 2020, 21:39
Sorry for the late reply; I overlooked your posting until now.
That tar ball contains both the source code of XBoard and WinBoard. These share a lot of code, the so-called 'back-end', most source files in the root directory. But there are various 'front-ends', one for Windows, in the winboard directory, and two for Linux / OSX, in the gtk and xaw directories. To compile WinBoard you would go to the winboard folder and run "make -f makefile.gcc" there. This would combine the winboard/*.c files with the back-end *.c files in the root into a single Windows .exe file.
The function that draws the board is DrawPosition() in the file winboard/winboard.c. This calls DrawBoardOnDC(), which in a loop over squares at some point calculates a square_color as 0 or 1. This is passed to DrawPieceOnDC() to specify whether the background color should be the lightSquareColor or dakSquareColor.