From 39c5caccf8486d4a2ffc551b8acf0806fd832d4f Mon Sep 17 00:00:00 2001 From: Krow Savcik Date: Fri, 19 Jul 2024 15:52:31 +0300 Subject: feature: add UI frames --- src/canvas.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/canvas.c') diff --git a/src/canvas.c b/src/canvas.c index 9807c26..e24a404 100644 --- a/src/canvas.c +++ b/src/canvas.c @@ -18,6 +18,8 @@ uint8 is_drawing; #define HNEXT(i) (i == HISTLENGTH-1 ? 0 : i+1) #define HPREV(i) (i == 0 ? HISTLENGTH-1 : i-1) +typedef struct Layer Layer; + static Layer *layer_create(uint, uint, uint); static void layer_destroy(Layer *); static uint canvas_fill_bfs(Canvas *, int, int, uint, uint); @@ -56,10 +58,14 @@ canvas_init(uint w, uint h, void *ren) c->h = h; c->cur_col = 0; c->cur_layer = 0; + c->cur_frame = 0; c->zoom = 1; c->proj_path = NULL; c->layer_arr_cnt = 1; c->layer_arr_sz = 1; + /* TEMP: TODO */ + c->frame_arr_cnt = 4; + c->frame_arr_sz = 4; c->x = c->y = 0; c->hist_i = c->hist_s = c->hist_isend = 0; c->hist_e = HNEXT(c->hist_s); -- cgit v1.2.3