00001 #ifndef LIBW32C_H 00002 #define LIBW32C_H 00003 00004 #ifndef USE_TILE 00005 00006 #include <string> 00007 #include <stdarg.h> 00008 #include <stdio.h> 00009 00010 typedef unsigned short screen_buffer_t; 00011 00012 class crawl_view_buffer; 00013 00014 void init_libw32c(void); 00015 void deinit_libw32c(void); 00016 00017 int get_number_of_lines(); 00018 int get_number_of_cols(); 00019 00020 void set_cursor_enabled(bool enabled); 00021 bool is_cursor_enabled(); 00022 00023 void clrscr(void); 00024 void clear_to_end_of_line(); 00025 void gotoxy_sys(int x, int y); 00026 void textcolor(int c); 00027 void textattr(int c); 00028 void cprintf(const char *format, ...); 00029 // void cprintf(const char *s); 00030 void set_string_input(bool value); 00031 bool set_buffering(bool value); 00032 int get_console_string(char *buf, int maxlen); 00033 void print_timings(void); 00034 00035 void window(int x, int y, int lx, int ly); 00036 int wherex(void); 00037 int wherey(void); 00038 void putch(char c); 00039 void putwch(unsigned c); 00040 int getch(void); 00041 int getch_ck(void); 00042 int kbhit(void); 00043 void delay(int ms); 00044 void textbackground(int c); 00045 void puttext(int x, int y, const crawl_view_buffer &vbuf); 00046 void update_screen(); 00047 00048 void enable_smart_cursor(bool cursor); 00049 bool is_smart_cursor_enabled(); 00050 void set_mouse_enabled(bool enabled); 00051 00052 inline void put_colour_ch(int colour, unsigned ch) 00053 { 00054 textattr(colour); 00055 putwch(ch); 00056 } 00057 00058 #endif 00059 00060 #endif