Rev 5231 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5231 | Rev 5238 | ||
---|---|---|---|
1 | #ifndef DEFINES_H |
1 | #ifndef DEFINES_H |
2 | #define DEFINES_H |
2 | #define DEFINES_H |
3 | 3 | ||
4 | #include |
4 | #include |
5 | #include |
5 | #include |
6 | #include |
6 | #include |
7 | #include |
7 | #include |
8 | 8 | ||
9 | inline void enable_scancode(); |
9 | inline void enable_scancode(); |
10 | inline void clear_key_buffer(); |
10 | inline void clear_key_buffer(); |
11 | inline void vsync(); |
11 | inline void vsync(); |
- | 12 | ||
- | 13 | inline __u32 text_length_px(__u32 len); |
|
12 | 14 | ||
13 | #define false (0) |
15 | #define false (0) |
14 | #define true (1) |
16 | #define true (1) |
15 | 17 | ||
16 | #define FONT_WIDTH (5) |
18 | #define FONT_WIDTH (5) |
17 | #define FONT_HEIGHT (9) |
19 | #define FONT_HEIGHT (9) |
18 | 20 | ||
19 | #define ANI_DELAY (2) // time between animation redraw |
21 | #define ANI_DELAY (2) // time between animation redraw |
20 | #define ANI_APPEAR_STEP (15) // default step for appear animation |
22 | #define ANI_APPEAR_STEP (15) // default step for appear animation |
21 | #define ANI_MOVE_STEP (25) // default step for move animation |
23 | #define ANI_MOVE_STEP (25) // default step for move animation |
22 | 24 | ||
23 | #define START_COUNT (2) // tiles count for new game |
25 | #define START_COUNT (2) // tiles count for new game |
24 | 26 | ||
25 | #define WND_WIDTH (400) // main window width |
27 | #define WND_WIDTH (400) // main window width |
26 | #define WND_HEIGHT (400) // main window height |
28 | #define WND_HEIGHT (400) // main window height |
27 | 29 | ||
28 | #define GAME_BORDER (30) // minimum border size around board |
30 | #define GAME_BORDER (30) // minimum border size around board |
29 | #define GAME_BG_COLOR (0x34FAF8EF) // main window background color |
31 | #define GAME_BG_COLOR (0xFAF8EF) // main window background color |
30 | 32 | ||
31 | #define SCORE_HEIGHT (21) // minimum height for score text |
33 | #define SCORE_HEIGHT (21) // minimum height for score text |
32 | 34 | ||
33 | #define BOARD_SPACING (10) // spacing between cells |
35 | #define BOARD_SPACING (10) // spacing between cells |
34 | #define BOARD_COUNT (4) // row and column count |
36 | #define BOARD_COUNT (4) // row and column count |
35 | #define BOARD_MAP_SIZE (16) // cells total count (row * column) |
37 | #define BOARD_MAP_SIZE (16) // cells total count (row * column) |
36 | #define BOARD_BG_COLOR (0xBBADA0) // board color |
38 | #define BOARD_BG_COLOR (0xBBADA0) // board color |
37 | 39 | ||
38 | #define CELL_COLOR (0xCDC0B4) // cell color |
40 | #define CELL_COLOR (0xCDC0B4) // cell color |
39 | 41 | ||
40 | #endif // DEFINES_H |
42 | #endif // DEFINES_H |