1 #ifndef _CONSOLE_TYPE_H 2 #define _CONSOLE_TYPE_H 3 4 #include <SDL2/SDL.h> 5 #include "game/protos/scene.h" 6 7 typedef struct console_t { 8 font font; 9 list history; 10 int histpos; 11 int histpos_changed; 12 char output[4810]; 13 unsigned int output_head, output_tail, output_pos; 14 int output_overflowing; 15 char input[41]; 16 surface background; 17 int isopen; 18 int ownsinput; 19 int ypos; 20 unsigned int ticks, dir; 21 hashmap cmds; // string -> command 22 } console; 23 24 typedef struct command_t { 25 command_func func; 26 const char *doc; 27 } command; 28 29 // Console State 30 extern console *con; 31 32 #endif // _CONSOLE_TYPE_H 33