Plays back ASCII animations produced by save_animation(*.txt).
The on-disk format is a sequence of frames separated by a header
line of the form "=== Frame
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | ASCII_PLAYER_MAX_LINE | = | 1024 | |
| integer, | public, | parameter | :: | ASCII_PLAYER_DEFAULT_FPS | = | 10 |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | fps | = | ASCII_PLAYER_DEFAULT_FPS | ||
| logical, | public | :: | loop | = | .false. | ||
| logical, | public | :: | clear_screen | = | .true. | ||
| logical, | public | :: | dry_run | = | .false. | ||
| integer, | public | :: | max_loops | = | 1 |
Recognize lines of the form "=== Frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line | |||
| integer, | intent(out) | :: | frame_index |
Open a .txt animation and play frames at options%fps.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filename | |||
| type(ascii_player_options_t), | intent(in) | :: | options | |||
| integer, | intent(in), | optional | :: | out_unit | ||
| integer, | intent(out), | optional | :: | status | ||
| integer, | intent(out), | optional | :: | frames_played |
Count frames in a .txt animation without playing them.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filename | |||
| integer, | intent(out) | :: | n_frames | |||
| integer, | intent(out), | optional | :: | status |