Compare commits

...

2 Commits

2 changed files with 7 additions and 16 deletions

View File

@ -16,8 +16,6 @@ typedef struct {
} tty_T; } tty_T;
void tty_init (); void tty_init ();
tty_T* tty_alloc ();
void tty_update (); void tty_update ();
uint32_t tty_write (string_t string); uint32_t tty_write (string_t string);

View File

@ -7,20 +7,13 @@
tty_T* g_tty; tty_T* g_tty;
void tty_init() { void tty_init() {
g_tty = tty_alloc(); g_tty = memory_allocate(sizeof(tty_T));
} g_tty->graphics_buffer = graphics_buffer_request(0, 0, graphics_renderer_get_width(), graphics_renderer_get_height(), GRAPHICS_BUFFER_STANDARD);
g_tty->cursor.x = 0;
tty_T* tty_alloc() { g_tty->cursor.y = 0;
tty_T* tty = memory_allocate(sizeof(tty_T)); g_tty->color = g_color_palette[COLOR_PAL_GREY_LIGHT];
g_tty->output = NULL;
tty->graphics_buffer = graphics_buffer_request(0, 0, graphics_renderer_get_width(), graphics_renderer_get_height(), GRAPHICS_BUFFER_STANDARD); pipe_init(&g_tty->input, NULL, tty_update);
tty->cursor.x = 0;
tty->cursor.y = 0;
tty->color = g_color_palette[COLOR_PAL_GREY_LIGHT];
tty->output = NULL;
pipe_init(&tty->input, NULL, tty_update);
return tty;
} }
void tty_update() { void tty_update() {