mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-21 03:34:54 +00:00
Matrix scrolling text animation (#283)
This commit is contained in:
27
src/draw.h
27
src/draw.h
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user