#ifndef _CONSOLE_H_
#define _CONSOLE_H_

#define MAX_LINES       18
#define MAX_LENGTH      200
#define MAX_TEXT_WIDTH  600 // in pixels

typedef struct c_line {
  char text[MAX_LENGTH];
  struct c_line *next;
} c_line;

/* initializes console and allocates memory */
void console_init();

/* checks the pressed key and handles it */
void console_keypress(int key);

/* render input line and console lines */
void render_console(BITMAP *bmp);

/* addline to console buffer */
void console_addline(char *newline);

/* addchar to input box */
void input_addchar(int scancode);

BITMAP *color_line(char *line);

#endif
