Fumofumotris/rewrite/c/terminal.h
2024-05-24 00:36:13 -05:00

26 lines
369 B
C

#pragma once
#include "fumocommon.h"
#include "allocator.h"
#define UTF8_MAX_SIZE 4
struct Color4 {
u8 bg : 4;
u8 fg : 4;
};
struct Terminal {
struct Color4 *col4s;
char (*utf8s)[UTF8_MAX_SIZE];
char *out;
usize wid;
usize hgt;
};
void CreateTerminal(Alloc *pool, struct Terminal *term, usize wid, usize hgt);
usize TerminalPrint(struct Terminal *term);