diff options
author | Krow Savcik <krow@savcik.xyz> | 2024-07-20 00:22:00 +0300 |
---|---|---|
committer | Krow Savcik <krow@savcik.xyz> | 2024-07-20 00:22:00 +0300 |
commit | b486d1f47e0bbc1a0e3414df1f4f9193a3997300 (patch) | |
tree | f754d3939cffdcf68ab6a3e8bc87cc933368cee5 /src/canvas.h | |
parent | 689d8faa8638c1d14f79c7960afe3139bd042f96 (diff) |
feature: added frames
Diffstat (limited to 'src/canvas.h')
-rw-r--r-- | src/canvas.h | 12 |
1 files changed, 8 insertions, 4 deletions
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 *); |