aboutsummaryrefslogtreecommitdiff
path: root/tracks.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-12-29 22:28:03 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-12-29 22:28:03 +0000
commit3cb919f4f7eb8a0785ace3c750a4a33987a6eb49 (patch)
tree44cf355f1ac7a8aaaf44db700960d158de743ddf /tracks.c
parentcdd24fd459d15b8a00498b284d00c202cf872022 (diff)
downloadpuzzles-3cb919f4f7eb8a0785ace3c750a4a33987a6eb49.zip
puzzles-3cb919f4f7eb8a0785ace3c750a4a33987a6eb49.tar.gz
puzzles-3cb919f4f7eb8a0785ace3c750a4a33987a6eb49.tar.bz2
puzzles-3cb919f4f7eb8a0785ace3c750a4a33987a6eb49.tar.xz
Tracks: Set the grid colour based on others
COL_GRID used to be mid-way between the usual COL_BACKGROUND and COL_TRACK_BACKGROUND. But then I changed mkhighlight() so that it didn't make COL_BACKGROUND so dark and that made the grid lines indistinguishable from the track background. Now COL_GRID is generated from COL_BACKGROUND and COL_TRACK_BACKGROUND so as long as those are sufficiently distinct from each other, COL_GRID will be distinct from both of them.
Diffstat (limited to 'tracks.c')
-rw-r--r--tracks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tracks.c b/tracks.c
index 2a593c6..2fad011 100644
--- a/tracks.c
+++ b/tracks.c
@@ -2515,12 +2515,13 @@ static float *game_colours(frontend *fe, int *ncolours)
int i;
game_mkhighlight(fe, ret, COL_BACKGROUND, -1, COL_TRACK_BACKGROUND);
+ colour_mix(&ret[COL_BACKGROUND*3], &ret[COL_TRACK_BACKGROUND*3], 0.5F,
+ &ret[COL_GRID*3]);
for (i = 0; i < 3; i++) {
ret[COL_TRACK_CLUE * 3 + i] = 0.0F;
ret[COL_TRACK * 3 + i] = 0.5F;
ret[COL_CLUE * 3 + i] = 0.0F;
- ret[COL_GRID * 3 + i] = 0.75F;
ret[COL_CURSOR * 3 + i] = 0.3F;
ret[COL_ERROR_BACKGROUND * 3 + i] = 1.0F;
}