forked from 400plus/400plus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
af_patterns.h
64 lines (50 loc) · 2.42 KB
/
af_patterns.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
60
61
62
63
64
#ifndef AF_PATTERNS_H_
#define AF_PATTERNS_H_
#define AF_PATTERN_NONE 0
#define AF_PATTERN_CENTER AF_POINT_C
#define AF_PATTERN_SQUARE AF_POINT_C | AF_POINT_TL | AF_POINT_TR | AF_POINT_BL | AF_POINT_BR
#define AF_PATTERN_TOP AF_POINT_T
#define AF_PATTERN_TOPTRIANGLE AF_POINT_T | AF_POINT_TL | AF_POINT_TR
#define AF_PATTERN_TOPDIAMOND AF_POINT_T | AF_POINT_TL | AF_POINT_TR | AF_POINT_C
#define AF_PATTERN_TOPHALF AF_POINT_T | AF_POINT_TL | AF_POINT_TR | AF_POINT_C | AF_POINT_L | AF_POINT_R
#define AF_PATTERN_BOTTOM AF_POINT_B
#define AF_PATTERN_BOTTOMTRIANGLE AF_POINT_B | AF_POINT_BL | AF_POINT_BR
#define AF_PATTERN_BOTTOMDIAMOND AF_POINT_B | AF_POINT_BL | AF_POINT_BR | AF_POINT_C
#define AF_PATTERN_BOTTOMHALF AF_POINT_B | AF_POINT_BL | AF_POINT_BR | AF_POINT_C | AF_POINT_L | AF_POINT_R
#define AF_PATTERN_TOPLEFT AF_POINT_TL
#define AF_PATTERN_TOPRIGHT AF_POINT_TR
#define AF_PATTERN_BOTTOMLEFT AF_POINT_BL
#define AF_PATTERN_BOTTOMRIGHT AF_POINT_BR
#define AF_PATTERN_LEFT AF_POINT_L
#define AF_PATTERN_LEFTTRIANGLE AF_POINT_L | AF_POINT_TL | AF_POINT_BL
#define AF_PATTERN_LEFTDIAMOND AF_POINT_L | AF_POINT_TL | AF_POINT_BL | AF_POINT_C
#define AF_PATTERN_LEFTHALF AF_POINT_L | AF_POINT_TL | AF_POINT_BL | AF_POINT_C | AF_POINT_T | AF_POINT_B
#define AF_PATTERN_RIGHT AF_POINT_R
#define AF_PATTERN_RIGHTTRIANGLE AF_POINT_R | AF_POINT_TR | AF_POINT_BR
#define AF_PATTERN_RIGHTDIAMOND AF_POINT_R | AF_POINT_TR | AF_POINT_BR | AF_POINT_C
#define AF_PATTERN_RIGHTHALF AF_POINT_R | AF_POINT_TR | AF_POINT_BR | AF_POINT_C | AF_POINT_T | AF_POINT_B
#define AF_PATTERN_HLINE AF_POINT_C | AF_POINT_L | AF_POINT_R
#define AF_PATTERN_VLINE AF_POINT_C | AF_POINT_T | AF_POINT_B
#define AF_PATTERN_ALL AF_POINT_C | AF_POINT_T | AF_POINT_B | AF_POINT_TL | AF_POINT_TR | AF_POINT_BL | AF_POINT_BR | AF_POINT_L | AF_POINT_R
typedef struct {
int pattern;
int next_center;
int next_top;
int next_bottom;
int next_left;
int next_right;
} pattern_map_item_t;
typedef enum {
DIRECTION_CENTER,
DIRECTION_UP,
DIRECTION_DOWN,
DIRECTION_LEFT,
DIRECTION_RIGHT
} direction_t;
extern void afp_enter (void);
extern void afp_center (void);
extern void afp_top (void);
extern void afp_bottom (void);
extern void afp_left (void);
extern void afp_right (void);
#endif /* AF_PATTERNS_H_ */