chiark / gitweb /
RFH: tracks: Grid line width problems
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Sep 2017 23:24:33 +0000 (00:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 29 Sep 2017 13:27:22 +0000 (14:27 +0100)
commit8949d7312a84ad4d2d7df59be9bad27d747acd2a
treee96d68033cfd0f8c1c93a5ffe2ddd74953a2f9d7
parentfdd2f8b4cb2692186ad9829af59aae7e63e32cc1
RFH: tracks: Grid line width problems

The #define BORDER_WIDTH is not used.  It seems to have been intended
for the grid width (since there's BORDER for the actual border).

In this commit I have tried to introduce use of BORDER_WIDTH to the
four places where the grid is drawn, changing draw_line to
draw_thick_line.

I have also increased the BORDER_WIDTH value dramatically to show the
effect.  (IMO a sensible value would be TILE_SIZE/16, like
LINE_THICK, but:)

Unfortunately, the has some drawing artefacts at the corners.  And,
empirically, the grid line width which appears is about half that
which has been specified in the #define.  I guess the drawing code in
tracks contains a number of hardcoded "1" values that relate to the
grid line thickness, although of course these are hard to search for.

I find the game which results from the current setting to be somewhat
more playable than the unpatched version, and the artefacts are
cosmetic, but this change is clearly not correct (or, at least,
unfinished) and should not be applied as-is.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tracks.c