-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasc_file.hpp
53 lines (38 loc) · 939 Bytes
/
asc_file.hpp
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
#ifndef ASCII_PAINT_ASC_LOAD_HPP
#define ASCII_PAINT_ASC_LOAD_HPP
struct AscRgb {
int r;
int g;
int b;
};
class AscFile {
public:
AscFile();
~AscFile();
int load(char *filename);
int save(char *filename);
int getWidth();
int getHeight();
void setSize(int width, int height);
void setChar(int x, int y, unsigned char chr);
void setFore(int x, int y, int r, int g, int b);
void setFore(int x, int y, AscRgb f);
void setBack(int x, int y, int r, int g, int b);
void setBack(int x, int y, AscRgb b);
void setSolid(int x, int y, bool solid);
void setWalkable(int x, int y, bool walkable);
unsigned char getChar(int x, int y);
AscRgb getFore(int x, int y);
AscRgb getBack(int x, int y);
bool getSolid(int x, int y);
bool getWalkable(int x, int y);
private:
int width;
int height;
AscRgb *fore;
AscRgb *back;
unsigned char *chars;
bool *solid;
bool *walkable;
};
#endif