diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-05-30 07:55:27 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-05-30 07:55:27 +0000 |
| commit | 0f423f0b3a0bfaaac37fa2dba23794629088836f (patch) | |
| tree | d2bcaf42d70fa6d6dcff84413f84f17a123d92c9 /twiddle.c | |
| parent | 8fa365a7b4c3f044ab6daa96a707051f091d6296 (diff) | |
| download | puzzles-0f423f0b3a0bfaaac37fa2dba23794629088836f.zip puzzles-0f423f0b3a0bfaaac37fa2dba23794629088836f.tar.gz puzzles-0f423f0b3a0bfaaac37fa2dba23794629088836f.tar.bz2 puzzles-0f423f0b3a0bfaaac37fa2dba23794629088836f.tar.xz | |
Infrastructure change: game_anim_length and game_flash_length now
both get passed a pointer to the game_ui. This means that if they
need to note down information for the redraw function about what
_type_ of flash or animation is required, they now have somewhere to
do so.
[originally from svn r5858]
Diffstat (limited to 'twiddle.c')
| -rw-r--r-- | twiddle.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -942,7 +942,7 @@ static int highlight_colour(float angle) } static float game_anim_length(game_state *oldstate, game_state *newstate, - int dir) + int dir, game_ui *ui) { if ((dir > 0 && newstate->just_used_solve) || (dir < 0 && oldstate->just_used_solve)) @@ -952,7 +952,7 @@ static float game_anim_length(game_state *oldstate, game_state *newstate, } static float game_flash_length(game_state *oldstate, game_state *newstate, - int dir) + int dir, game_ui *ui) { if (!oldstate->completed && newstate->completed && !oldstate->used_solve && !newstate->used_solve) @@ -1012,7 +1012,7 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate, */ if (oldstate) { float angle; - float anim_max = game_anim_length(oldstate, state, dir); + float anim_max = game_anim_length(oldstate, state, dir, ui); if (dir > 0) { lastx = state->lastx; |