refacotr (TTY): removed not needed function tty_alloc

This commit is contained in:
antifallobst 2023-05-01 01:14:14 +02:00
parent 33713a805a
commit 66e6b0d3f8
2 changed files with 7 additions and 16 deletions

View File

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

View File

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