- if ((dir > 0 && newstate->just_used_solve) ||
- (dir < 0 && oldstate->just_used_solve))
- return 0.0F;
- else
- return ANIM_PER_RADIUS_UNIT * sqrt(newstate->n-1);
+ /*
+ * Our game_anim_length doesn't need to modify its game_ui, so
+ * this is the real function which declares ui as const. We must
+ * wrap this for the backend structure with a version that has ui
+ * non-const, but we still need this version to call from within
+ * game_redraw which only has a const ui available.
+ */
+ return (float)(ANIM_PER_BLKSIZE_UNIT * sqrt(newstate->n-1));
+}
+
+static float game_anim_length(const game_state *oldstate,
+ const game_state *newstate, int dir, game_ui *ui)
+{
+ return game_anim_length_real(oldstate, newstate, dir, ui);
+