diff options
Diffstat (limited to 'screenbuffer.h')
-rw-r--r-- | screenbuffer.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/screenbuffer.h b/screenbuffer.h new file mode 100644 index 0000000..49cc5c5 --- /dev/null +++ b/screenbuffer.h @@ -0,0 +1,24 @@ +#pragma once + +using namespace std; + + +class ScreenBuffer{ + int W,H; + char *prevscreen,*screen; + int curx=0,cury=0; + + void printstr(const char *buf); + +public: + ScreenBuffer(int W,int H); + ~ScreenBuffer(); + + void moveto(int x,int y); + int printf(const char *format,...) __attribute__((format (printf, 2, 3))); + int mvprintf(int x,int y,const char *format,...) __attribute__((format (printf, 4, 5))); + + void draw(); + + void emergencyDeinit(); +}; |