simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Dec 29 23:04:07 GMT 2022


TL;DR:
  cdd24fd Expose colour_mix() to backends (and others)
  3cb919f Tracks: Set the grid colour based on others

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Ben Harris <bjh21 at bjh21.me.uk>
Date:           2022-12-29 23:04:07

commit cdd24fd459d15b8a00498b284d00c202cf872022
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=cdd24fd459d15b8a00498b284d00c202cf872022;hp=425942c852f22d7d94f7643696522d32c0b02067
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Dec 17 22:50:52 2022 +0000

    Expose colour_mix() to backends (and others)
    
    Quite a few backends currently generate colours by multiplying the
    foreground colour by a fraction, effectively mixing it with black.  On a
    black background, this might be reasonably replaced by mixing the
    background colour with white, but that's rather arithmetically fiddly.
    Happily, I already have a function for that and just need to expose it.

 devel.but | 14 ++++++++++++++
 misc.c    |  3 +--
 puzzles.h |  3 +++
 3 files changed, 18 insertions(+), 2 deletions(-)

commit 3cb919f4f7eb8a0785ace3c750a4a33987a6eb49
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=3cb919f4f7eb8a0785ace3c750a4a33987a6eb49;hp=cdd24fd459d15b8a00498b284d00c202cf872022
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Thu Dec 29 22:28:03 2022 +0000

    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.

 tracks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list