diff options
| author | Simon Tatham <anakin@pobox.com> | 2010-04-25 14:57:20 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2010-04-25 14:57:20 +0000 |
| commit | 178f87a79ef2b1fe3b80a2eca2040ef4eb7f8a5f (patch) | |
| tree | 7ed96603cc35e53bf801a5c29a859279ac9c24ca /misc.c | |
| parent | 5062bee2ec7094a13e40f4946e1a45d4dcb8b854 (diff) | |
| download | puzzles-178f87a79ef2b1fe3b80a2eca2040ef4eb7f8a5f.zip puzzles-178f87a79ef2b1fe3b80a2eca2040ef4eb7f8a5f.tar.gz puzzles-178f87a79ef2b1fe3b80a2eca2040ef4eb7f8a5f.tar.bz2 puzzles-178f87a79ef2b1fe3b80a2eca2040ef4eb7f8a5f.tar.xz | |
Patch idea from Debian, but modified considerably in implementation:
introduce a new colour in Slant (COL_FILLEDSQUARE) which is used for
the background of any grid square that has a diagonal line in it.
This makes it easier to spot the one square on a giant board you
forgot to fill in, but on the other hand I found it to look very
strange and disconcerting. So I've set the colour to be identical to
COL_BACKGROUND by default, and users who like the idea can enable it
by environment variable or by local patch.
[originally from svn r8930]
Diffstat (limited to '')
| -rw-r--r-- | misc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -187,8 +187,10 @@ void game_mkhighlight_specific(frontend *fe, float *ret, } for (i = 0; i < 3; i++) { - ret[highlight * 3 + i] = ret[background * 3 + i] * 1.2F; - ret[lowlight * 3 + i] = ret[background * 3 + i] * 0.8F; + if (highlight >= 0) + ret[highlight * 3 + i] = ret[background * 3 + i] * 1.2F; + if (lowlight >= 0) + ret[lowlight * 3 + i] = ret[background * 3 + i] * 0.8F; } } |