trying to get testing to work

This commit is contained in:
2025-01-28 12:11:56 -08:00
parent 6beb98a2c1
commit caf148175b
6 changed files with 79 additions and 5 deletions

View File

@@ -1,6 +1,9 @@
#include "tart.h"
#include <malloc.h>
struct tart_cell tart_test() {
return {{0,0,0}, {0,0,0}, 0, 't'};
}
struct tart_buffer tart_create_buffer(tart_id id, struct tart_vec2 size, struct tart_vec2 position) {
int cell_count = position.x * position.y;
struct tart_cell* cells = malloc(sizeof(struct tart_cell[cell_count]));
@@ -8,7 +11,8 @@ struct tart_buffer tart_create_buffer(tart_id id, struct tart_vec2 size, struct
return buf;
}
struct tart_cell tart_create_cell(char display, tart_byte style, struct tart_rgb foreground, struct tart_rgb background) {
return (struct tart_cell){foreground, background, style, display};
struct tart_cell b = {{0,0,0}, {0,0,0}, 0, 't'};
return b;
}
tart_byte tart_add_buffer(struct tart_window* window, struct tart_buffer buffer) {
if(window->buffer_count < 0xFF) {