Fumofumotris/rewrite/c/terminal.h

26 lines
369 B
C
Raw Normal View History

2024-05-24 05:36:13 +00:00
#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);