diff options
| author | Dien-Nhung Nguyen <kein@kienlab.com> | 2024-08-27 20:08:24 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-27 15:08:24 +0200 |
| commit | c95faf32a6a98975828717d596ff51dedeecdf56 (patch) | |
| tree | 8fe52862e0c34bfe82509adf0c98a8e57056d4c7 /src/animation.h | |
| parent | f5874d607315ff88b27414299089b8528b5bb07c (diff) | |
Add animations (#15)
* animation: add xbm animations
* refactor: correct framebuffer terminology
* animation: add animations and effect
* animation: timing with TMOS scheduler
Diffstat (limited to 'src/animation.h')
| -rw-r--r-- | src/animation.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/animation.h b/src/animation.h new file mode 100644 index 0000000..cd8ea8e --- /dev/null +++ b/src/animation.h @@ -0,0 +1,34 @@ +#ifndef __ANIMATION_H__ +#define __ANIMATION_H__ + +#include <stdint.h> + +#include "xbm.h" + +int ani_xbm_next_frame(xbm_t *xbm, uint16_t *fb, int col, int row); +int ani_xbm_scroll_up(xbm_t *xbm, int vh, uint16_t *fb, int col, int row); +int ani_xbm_scrollup_pad( xbm_t *xbm, int vh, int pt, int pb, + uint16_t *fb, int col, int row); +int ani_xbm_scrollup_inf(xbm_t *xbm, uint16_t *fb, + int vh, int col, int row); + +void fb_fill(uint16_t *fb, uint16_t v); +void ani_shift_y(bm_t *bm, uint16_t *fb, int dir, int frame); + +void ani_scroll_x(bm_t *bm, uint16_t *fb, int dir); +void ani_scroll_y(bm_t *bm, uint16_t *fb); + +void ani_scroll_left(bm_t *bm, uint16_t *fb); +void ani_scroll_right(bm_t *bm, uint16_t *fb); +void ani_scroll_up(bm_t *bm, uint16_t *fb); +void ani_scroll_down(bm_t *bm, uint16_t *fb); +void ani_fixed(bm_t *bm, uint16_t *fb); +void ani_laser(bm_t *bm, uint16_t *fb); +void ani_snowflake(bm_t *bm, uint16_t *fb); +void ani_animation(bm_t *bm, uint16_t *fb); +void ani_picture(bm_t *bm, uint16_t *fb); + +void ani_marque(bm_t *bm, uint16_t *fb, int step); +void ani_flash(bm_t *bm, uint16_t *fb, int step); + +#endif /* __ANIMATION_H__ */ |