aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2021-09-13 11:09:54 +0100
committerSimon Tatham <anakin@pobox.com>2021-09-13 11:13:08 +0100
commit42cbd7688a7f05e0a5d56a603a04293307c1e1b2 (patch)
tree021b6394749d95da0105a58c35abf44817fa4c1b
parent88358f064351e867c73e46783a239265ff9fef7a (diff)
downloadpuzzles-42cbd7688a7f05e0a5d56a603a04293307c1e1b2.zip
puzzles-42cbd7688a7f05e0a5d56a603a04293307c1e1b2.tar.gz
puzzles-42cbd7688a7f05e0a5d56a603a04293307c1e1b2.tar.bz2
puzzles-42cbd7688a7f05e0a5d56a603a04293307c1e1b2.tar.xz
Add missing documentation of 'int dir' parameters.
This integer parameter appears in all of the game's anim_length, flash_length and redraw methods, but the documentation only described it properly in the section for anim_length. The section for flash_length refers you to anim_length for the description of all the parameters, but unhelpfully, it did so without a conveniently clickable (in HTML) cross-reference. And the section for game_redraw missed out the description of 'int dir' completely, which is particularly unhelpful since that's the function most likely to actually need to care about it! (Even if forward and reversed move animations look different, they _probably_ still have the same duration, so it's more likely that anim_length would ignore 'dir' and redraw would use it than vice versa.)
-rw-r--r--devel.but10
1 files changed, 9 insertions, 1 deletions
diff --git a/devel.but b/devel.but
index 76d6efa..9c1d1c1 100644
--- a/devel.but
+++ b/devel.but
@@ -1275,7 +1275,7 @@ activity, so that the victory flash in Net is not cancelled by that
final locking move.
The input parameters to \cw{flash_length()} are exactly the same as
-the ones to \cw{anim_length()}.
+the ones to \cw{anim_length()}: see \k{backend-anim-length}.
Just like \cw{anim_length()}, when this function is called, it may
rely on \cw{changed_state()} having been called previously, so if it
@@ -1392,6 +1392,14 @@ that the animation has already been running. If \c{oldstate} is
\cw{NULL}, then \c{anim_time} is unused (and will hopefully be set
to zero to avoid confusion).
+\c{dir} specifies the chronological order of those states: if it is
+positive, then the transition is the result of a move or a redo (and
+so \c{newstate} is the later of the two moves), whereas if it is
+negative then the transition is the result of an undo (so that
+\c{newstate} is the \e{earlier} move). This allows move animations
+that are not time-symmetric (such as Inertia, where gems are consumed
+during the animation) to be drawn the right way round.
+
\c{flash_time}, if it is is non-zero, denotes that the game is in
the middle of a flash, and gives the time since the start of the
flash. See \k{backend-flash-length} for general discussion of