-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathansigame.h
59 lines (48 loc) · 1.41 KB
/
ansigame.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <string>
#include <cstring>
#include <termios.h>
#include <cctype>
#ifndef __ansigame_h_
#define __ansigame_h_
extern const int COLOR_DEPTH;
extern const int X_RESOLUTION;
extern const int Y_RESOLUTION;
// 4-bit color definitions
extern const char* BLACK;
extern const char* RED;
extern const char* GREEN;
extern const char* YELLOW;
extern const char* BLUE;
extern const char* MAGENTA;
extern const char* CYAN;
extern const char* WHITE;
extern const char* BBLACK;
extern const char* BRED;
extern const char* BGREEN;
extern const char* BYELLOW;
extern const char* BBLUE;
extern const char* BMAGENTA;
extern const char* BCYAN;
extern const char* BWHITE;
extern const char* x11_names[];
extern const int SCR_DAT_SIZE; //< for 8 bit color depth
//const int SCR_DAT_SIZE = 7;
//extern unsigned char screen_data[X_RESOLUTION * Y_RESOLUTION][SCR_DAT_SIZE];
class ANSIGame
{
public:
void main();
int clear_screen();
void wait_for_resize();
int tx_pos(int x, int y);
int tx_print(const char* p, char* fg, char* bg);
int tx_plot(const char* p, char* fg, char* bg, int x, int y);
int tx_quit();
int show_cursor(bool tf);
int draw();
void tx_plot2(const char* p, const char* fg, const char* bg, int x, int y);
void tx_draw_xpm(const char* const* data, int x, int y);
void key_echo(bool tf);
private:
};
#endif