From b486d1f47e0bbc1a0e3414df1f4f9193a3997300 Mon Sep 17 00:00:00 2001 From: Krow Savcik Date: Sat, 20 Jul 2024 00:22:00 +0300 Subject: feature: added frames --- src/canvas.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/canvas.h') diff --git a/src/canvas.h b/src/canvas.h index 58f20b7..f76f0a1 100644 --- a/src/canvas.h +++ b/src/canvas.h @@ -5,22 +5,24 @@ #define LAYERNAMELEN 30 struct Layer { - unsigned int *pix; unsigned int visible; char name[LAYERNAMELEN+1]; }; struct Frame { - unsigned int state; + unsigned char state; }; struct Canvas { unsigned int layer_arr_cnt, layer_arr_sz; unsigned int frame_arr_cnt, frame_arr_sz; + unsigned int cell_arr_cnt, cell_arr_sz; unsigned int cur_col, cur_layer, cur_frame; unsigned int w, h, zoom; char *proj_path; - struct Layer **layers; + struct Layer *layers; + struct Frame *frames; + unsigned int **cells; int x, y; void *back, *pres, *half_pres; struct action_pixcol *temp_pix; @@ -51,11 +53,13 @@ void canvas_point_draw(Canvas *, long int, long int); void canvas_mousel_up(Canvas *); void canvas_mousel_down(Canvas *, long int, long int); void canvas_mouse_move(Canvas *, long int, long int); -void canvas_add_layer(Canvas *, unsigned int); +unsigned char canvas_add_layer(Canvas *, unsigned int); +unsigned char canvas_add_frame(Canvas *, unsigned int); void canvas_move_x(Canvas *, long int); void canvas_move_y(Canvas *, long int); void canvas_refresh(Canvas *); void canvas_change_layer(Canvas *, unsigned int); +void canvas_change_frame(Canvas *, unsigned int); unsigned char canvas_save(Canvas *, const char *, short int); unsigned char canvas_export_png(Canvas *, const char *, void *); void action_undo(Canvas *); -- cgit v1.2.3