diff --git a/src/draw.c b/src/draw.c index 1b40b5a..1908ad3 100644 --- a/src/draw.c +++ b/src/draw.c @@ -69,6 +69,7 @@ void draw_init(struct term_buf* buf) } static void doom_free(struct term_buf* buf); +static void matrix_free(struct term_buf* buf); void draw_free(struct term_buf* buf) { @@ -79,6 +80,9 @@ void draw_free(struct term_buf* buf) case 0: doom_free(buf); break; + case 1: + matrix_free(buf); + break; } } } @@ -513,6 +517,16 @@ static void doom_free(struct term_buf* buf) free(buf->astate.doom); } +static void matrix_init(struct term_buf* buf) +{ + // TODO +} + +static void matrix_free(struct term_buf* buf) +{ + // TODO +} + void animate_init(struct term_buf* buf) { if (config.animate) @@ -524,6 +538,11 @@ void animate_init(struct term_buf* buf) doom_init(buf); break; } + case 1: + { + matrix_init(buf); + break; + } } } } @@ -591,6 +610,11 @@ static void doom(struct term_buf* term_buf) } } +static void matrix(struct term_buf* buf) +{ + // TODO +} + void animate(struct term_buf* buf) { buf->width = tb_width(); @@ -605,6 +629,11 @@ void animate(struct term_buf* buf) doom(buf); break; } + case 1: + { + matrix(buf); + break; + } } } } diff --git a/src/draw.h b/src/draw.h index 1258596..e6d02f5 100644 --- a/src/draw.h +++ b/src/draw.h @@ -18,6 +18,20 @@ struct box u32 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 { u8* buf;