-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypedefs.cpp
More file actions
65 lines (53 loc) · 1009 Bytes
/
typedefs.cpp
File metadata and controls
65 lines (53 loc) · 1009 Bytes
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
60
61
62
63
64
65
#include"conio2.h"
#define START_P_X 1
#define START_P_Y 8
#define START_M_X 1
#define START_M_Y 1
#define UP 0x48
#define DOWN 0x50
#define LEFT 0x4b
#define RIGHT 0x4d
#define ESC 0x1b
#define ENTER 0x0d
#define CONSOLE_BACKGROUND BLACK
#define TEXT_COLOR DARKGRAY
#define DEFAULT_MATRIX WHITE
#define MAX_NAME 40
typedef enum
{
END,
DEFAULT,
DRAW,
DRAW_LINE,
DRAW_RECTANGLE,
NEW_FILE,
OPEN_FILE,
SELECT_AREA,
COPY,
FILL
}status_t;
typedef struct
{
int x;
int y;
}coordinate_t;
typedef struct
{
char key_code[32] = "kod klawisza: 0x";
int arrows = 0;
coordinate_t co = {START_M_X, START_M_Y};
}menu_t;
typedef struct
{
coordinate_t co = {START_P_X, START_P_Y};
char value = '*';
int background = BLACK;
int colors[16] = {'0','1','2','3','4','5','6','7','8','9','q','w','e','r','t','y'};
}cursor_t;
typedef struct
{
char name[MAX_NAME];
int w=1,h=1;
char **pixels;
status_t status = DEFAULT;
}picture_t;