adding rendering

This commit is contained in:
2025-02-01 14:35:06 -08:00
parent 4d81feab16
commit 9e75987c2b
2 changed files with 42 additions and 11 deletions

View File

@@ -24,7 +24,7 @@ extern "C" {
#define NULL_CELL (struct tart_cell){{0,0,0},{0,0,0},0,0,0}
#define TART_CELL_DATA_SIZE 16 // todo add number
#else
#define NULL_CELL (struct tart_cell){0,0,0,0,0}
#define NULL_CELL (struct tart_cell){0,0,0,0}
#define TART_CELL_DATA_SIZE 16
#endif
#define TART_OK 0
@@ -99,7 +99,6 @@ struct tart_cell {
struct tart_rgb background;
tart_byte style;
char display;
char* compiled;
};
#else
struct tart_cell {
@@ -107,7 +106,6 @@ struct tart_cell {
tart_byte background;
tart_byte style;
char display;
char* compiled;
};
#endif
@@ -133,8 +131,6 @@ struct tart_buffer {
struct tart_vec2 size;
struct tart_vec2 position;
struct tart_cell* cells;
char* data;
int data_count;
};
/* Tart Window
@@ -145,6 +141,8 @@ struct tart_window {
struct tart_buffer buffers[0xFF+1];
tart_byte buffer_count;
struct tart_vec2 size;
char* data;
int data_count;
};
struct tart_window tart_create_window();
@@ -165,6 +163,10 @@ struct tart_buffer* tart_get_buffer(struct tart_window*, tart_byte);
struct tart_cell* tart_get_cell(struct tart_buffer*, int);
struct tart_cell tart_set_cell(struct tart_buffer*, struct tart_cell,int);
tart_byte tart_draw_window(struct tart_window*, char*);
tart_byte tart_add_cells_to_buffer(struct tart_buffer*, struct tart_cell*);
#ifdef __cplusplus
}
#endif