diff --git a/ui.c b/ui.c index 3fab951..d39a0aa 100644 --- a/ui.c +++ b/ui.c @@ -1 +1,30 @@ +#include +#include #include "ui.h" + +typedef struct { + char* msg; + int* var; +}Linei; + +static unsigned int ln_count = 0; + +static Linei* lines = NULL; + +void initUI() +{ + lines = (Linei*)malloc(sizeof(Linei) * ++ln_count); +} + +void addLinei(char* msg, int* var) +{ + if (!lines) return; + if (ln_count >1) lines = realloc(lines, sizeof(Linei) * ++ln_count); + Linei line = { msg, var }; + lines[ln_count-1] = line; +} + +void drawUI() +{ +} + diff --git a/ui.h b/ui.h index 934cbf7..c6e75de 100644 --- a/ui.h +++ b/ui.h @@ -1,6 +1,10 @@ #ifndef UI_H #define UI_H +void initUI(); +void addLinei(char* msg, int* var); + +void drawUI(); #endif