simon-git: puzzles (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Aug 15 08:11:41 BST 2024


TL;DR:
  2a57df6 Consolidate duplicate implementations of `compare_integers`
  a993fd4 Clarify documentation of draw_polygon()'s coordinate format.

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2024-08-15 08:11:41

commit 2a57df6be92bd119d80361ec2176856ca7fee4da
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=2a57df6be92bd119d80361ec2176856ca7fee4da;hp=1c1899ee1c4e0a83808998359addb1efb66322f8
Author: Franklin Wei <franklin at rockbox.org>
Date:   Sun Aug 11 17:26:52 2024 -0400

    Consolidate duplicate implementations of `compare_integers`
    
    Both Inertia and Twiddle previously included static implementations of this
    exact same function, which was passed to `qsort()` as a comparator. With
    this change, a single global implementation is provided in misc.c, which
    will hopefully reduce code duplication going forward.
    
    I'm refactoring this in preparation for the upcoming fallback polygon fill
    function, which I'm about to add.

 devel.but | 10 ++++++++++
 inertia.c | 12 ------------
 misc.c    | 11 +++++++++++
 puzzles.h |  3 +++
 twiddle.c | 14 +-------------
 5 files changed, 25 insertions(+), 25 deletions(-)

commit a993fd45ebe67946e165cbe579bc3e3a596dcded
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=a993fd45ebe67946e165cbe579bc3e3a596dcded;hp=2a57df6be92bd119d80361ec2176856ca7fee4da
Author: Franklin Wei <franklin at rockbox.org>
Date:   Sun Aug 11 20:57:51 2024 -0400

    Clarify documentation of draw_polygon()'s coordinate format.
    
    Previously, this function's documentation just stated that `coords`
    contained the X and Y coordinates of the polygon's vertices, without
    specifying in what order they were listed. Thus, it would have been
    reasonable to (wrongly) assume that all the X coordinates were listed
    in the first half of the array, followed by all the Y coordinates.
    
    Now it's clear that each point's X and Y coordinates are stored
    directly next to each other, and in that order.

 devel.but | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list