Matrix scrolling text animation (#283)

This commit is contained in:
Stale
2022-04-24 06:54:50 -03:00
committed by GitHub
parent 9fd7779972
commit 6245639daf
3 changed files with 285 additions and 13 deletions

View File

@@ -19,6 +19,31 @@ struct box
uint32_t right;
};
struct matrix_dot
{
int val;
bool is_head;
};
struct matrix_state
{
struct matrix_dot** grid;
int* length;
int* spaces;
int* updates;
};
struct doom_state
{
uint8_t* buf;
};
union anim_state
{
struct doom_state* doom;
struct matrix_state* matrix;
};
struct term_buf
{
uint16_t width;
@@ -34,7 +59,7 @@ struct term_buf
uint16_t box_width;
uint16_t box_height;
uint8_t* tmp_buf;
union anim_state astate;
};
void draw_init(struct term_buf* buf);