paul@1 | 1 | #ifndef __SHAPES_H__ |
paul@1 | 2 | #define __SHAPES_H__ |
paul@1 | 3 | |
paul@1 | 4 | #define ROW0 0x0001 |
paul@1 | 5 | #define ROW1 0x0002 |
paul@1 | 6 | #define ROW2 0x0004 |
paul@1 | 7 | #define ROW3 0x0008 |
paul@1 | 8 | #define ROW4 0x0010 |
paul@1 | 9 | #define ROW5 0x0020 |
paul@1 | 10 | #define ROW6 0x0040 |
paul@1 | 11 | #define ROW7 0x0080 |
paul@1 | 12 | #define ROW8 0x0100 |
paul@1 | 13 | #define ROW9 0x0200 |
paul@1 | 14 | #define ROW10 0x0400 |
paul@1 | 15 | #define ROW11 0x0800 |
paul@1 | 16 | #define ROW12 0x1000 |
paul@1 | 17 | #define ROW13 0x2000 |
paul@1 | 18 | #define ROW14 0x4000 |
paul@1 | 19 | #define ROW15 0x8000 |
paul@1 | 20 | |
paul@1 | 21 | #define TOP_HORIZONTAL ROW0 |
paul@1 | 22 | #define UPPER_RIGHT_VERTICAL ROW1 |
paul@1 | 23 | #define LOWER_RIGHT_VERTICAL ROW2 |
paul@1 | 24 | #define BOTTOM_HORIZONTAL ROW3 |
paul@1 | 25 | #define LOWER_LEFT_VERTICAL ROW4 |
paul@1 | 26 | #define UPPER_LEFT_VERTICAL ROW5 |
paul@1 | 27 | #define LEFT_MIDDLE_HORIZONTAL ROW6 |
paul@1 | 28 | #define RIGHT_MIDDLE_HORIZONTAL ROW7 |
paul@1 | 29 | #define UPPER_LEFT_DIAGONAL ROW8 |
paul@1 | 30 | #define UPPER_CENTRE_VERTICAL ROW9 |
paul@1 | 31 | #define UPPER_RIGHT_DIAGONAL ROW10 |
paul@1 | 32 | #define LOWER_RIGHT_DIAGONAL ROW11 |
paul@1 | 33 | #define LOWER_CENTRE_VERTICAL ROW12 |
paul@1 | 34 | #define LOWER_LEFT_DIAGONAL ROW13 |
paul@1 | 35 | #define DECIMAL_POINT ROW14 |
paul@1 | 36 | |
paul@1 | 37 | #define TOP_EDGE TOP_HORIZONTAL |
paul@1 | 38 | #define UPPER_ELEMENTS (UPPER_LEFT_VERTICAL | UPPER_RIGHT_VERTICAL | UPPER_LEFT_DIAGONAL | UPPER_RIGHT_DIAGONAL | UPPER_CENTRE_VERTICAL) |
paul@1 | 39 | #define MIDDLE_ELEMENTS (LEFT_MIDDLE_HORIZONTAL | RIGHT_MIDDLE_HORIZONTAL) |
paul@1 | 40 | #define LOWER_ELEMENTS (LOWER_LEFT_VERTICAL | LOWER_RIGHT_VERTICAL | LOWER_LEFT_DIAGONAL | LOWER_RIGHT_DIAGONAL | LOWER_CENTRE_VERTICAL) |
paul@1 | 41 | #define BOTTOM_EDGE BOTTOM_HORIZONTAL |
paul@1 | 42 | |
paul@1 | 43 | #define LEFT_EDGE (LOWER_LEFT_VERTICAL | UPPER_LEFT_VERTICAL) |
paul@1 | 44 | #define LEFT_ELEMENTS (LEFT_MIDDLE_HORIZONTAL | UPPER_LEFT_DIAGONAL | LOWER_LEFT_DIAGONAL) |
paul@1 | 45 | #define CENTRE_ELEMENTS (UPPER_CENTRE_VERTICAL | LOWER_CENTRE_VERTICAL) |
paul@1 | 46 | #define RIGHT_ELEMENTS (RIGHT_MIDDLE_HORIZONTAL | UPPER_RIGHT_DIAGONAL | LOWER_RIGHT_DIAGONAL) |
paul@1 | 47 | #define RIGHT_EDGE (LOWER_RIGHT_VERTICAL | UPPER_RIGHT_VERTICAL) |
paul@1 | 48 | |
paul@1 | 49 | #define OUTER_FRAME (TOP_HORIZONTAL | RIGHT_EDGE | BOTTOM_HORIZONTAL | LEFT_EDGE) |
paul@1 | 50 | #define PLUS (LEFT_MIDDLE_HORIZONTAL | RIGHT_MIDDLE_HORIZONTAL | UPPER_CENTRE_VERTICAL | LOWER_CENTRE_VERTICAL) |
paul@1 | 51 | #define DIAGONALS (UPPER_LEFT_DIAGONAL | UPPER_RIGHT_DIAGONAL | LOWER_RIGHT_DIAGONAL | LOWER_LEFT_DIAGONAL) |
paul@1 | 52 | #define INNER_ELEMENTS (PLUS | DIAGONALS) |
paul@1 | 53 | #define HORIZONTALS (TOP_HORIZONTAL | BOTTOM_HORIZONTAL | LEFT_MIDDLE_HORIZONTAL | RIGHT_MIDDLE_HORIZONTAL) |
paul@1 | 54 | |
paul@1 | 55 | #define UPPER_TRIANGLE (TOP_HORIZONTAL | UPPER_LEFT_DIAGONAL | UPPER_RIGHT_DIAGONAL) |
paul@1 | 56 | #define LOWER_TRIANGLE (BOTTOM_HORIZONTAL | LOWER_LEFT_DIAGONAL | LOWER_RIGHT_DIAGONAL) |
paul@1 | 57 | #define LEFT_TRIANGLE (UPPER_LEFT_VERTICAL | LOWER_LEFT_VERTICAL | UPPER_LEFT_DIAGONAL | LOWER_LEFT_DIAGONAL) |
paul@1 | 58 | #define UPPER_LEFT_TRIANGLE (UPPER_LEFT_VERTICAL | UPPER_LEFT_DIAGONAL | LEFT_MIDDLE_HORIZONTAL) |
paul@1 | 59 | #define LOWER_LEFT_TRIANGLE (LOWER_LEFT_VERTICAL | LOWER_LEFT_DIAGONAL | LEFT_MIDDLE_HORIZONTAL) |
paul@1 | 60 | #define RIGHT_TRIANGLE (UPPER_RIGHT_VERTICAL | LOWER_RIGHT_VERTICAL | UPPER_RIGHT_DIAGONAL | LOWER_RIGHT_DIAGONAL) |
paul@1 | 61 | #define UPPER_RIGHT_TRIANGLE (UPPER_RIGHT_VERTICAL | UPPER_RIGHT_DIAGONAL | RIGHT_MIDDLE_HORIZONTAL) |
paul@1 | 62 | #define LOWER_RIGHT_TRIANGLE (LOWER_RIGHT_VERTICAL | LOWER_RIGHT_DIAGONAL | RIGHT_MIDDLE_HORIZONTAL) |
paul@1 | 63 | |
paul@1 | 64 | #endif /* __SHAPES_H__ */ |