Files
beluga/src/buffer.c
T
Arthur Barraux f3bd5dd1c9 Color theming
2026-01-22 14:00:47 +01:00

21 lines
440 B
C

#include "../include/data.h"
#include <string.h>
int new_buffer(enum buffer_type type, char *filename, int x, int y, int width,
int height) {
// Create a new buffer
struct buffer_t *buffer = &E.buffers[E.number_of_buffer];
buffer->type = type;
if (type == FILE_BUFF) {
strcpy(buffer->filename, filename);
}
buffer->width = width, buffer->height = height;
buffer->x = x, buffer->y = y;
return 1;
}