-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconstants.hpp
71 lines (51 loc) · 2.08 KB
/
constants.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef CPPBASICS_CONSTANTS_HPP
#define CPPBASICS_CONSTANTS_HPP
const float RADIUS = 40.0f;
const float CONSUMABLE_RADIUS = 20.0f;
const float ENEMY_RADIUS = 60.0f;
const float SPEED = 150.0f;
const float WINDOW_WIDTH = 800.0f;
const float WINDOW_HEIGHT = 600.0f;
const float SCENE_WIDTH = 800.0f;
const float SCENE_HEIGHT = 600.0f;
const float NORTH_BORDER = 0.0f;
const float WEST_BORDER = 0.0f;
const float EAST_BORDER = WEST_BORDER + SCENE_WIDTH;
const float SOUTH_BORDER = NORTH_BORDER + SCENE_HEIGHT;
const float PLAYER_START_X = 400.0f;
const float PLAYER_START_Y = 300.0f;
const float CONSUMABLE_START_X = 600.0f;
const float CONSUMABLE_START_Y = 150.0f;
const float ENEMY_START_X = 100.0f;
const float ENEMY_START_Y = 450.0f;
const float CONSUMABLE_WARNED_MULTIPLIER = 6.0f;
// Leaderboard constants
const float INPUTBOX_WIDTH = 400.0f;
const float INPUTBOX_HEIGHT = 50.0f;
const unsigned int INPUTNAME_FONT_SIZE = 36;
const float MAX_PLAYER_NAME_LENGTH = 16.0f;
const float MAX_LINES = 10.0f;
const unsigned int HEADER_FONT_SIZE = 36;
const float HEADER_X = 280.0f;
const float HEADER_Y = 40.0f;
const unsigned int LEADERBOARD_FONT_SIZE = 22;
const float POS_HEADER_X = 106.0f;
const float POS_HEADER_Y = HEADER_Y + 65.0f;
const float NAME_HEADER_X = 320.0f;
const float NAME_HEADER_Y = HEADER_Y + 65.0f;
const float SCORE_HEADER_X = 592.0f;
const float SCORE_HEADER_Y = HEADER_Y + 65.0f;
const float PADDING = 8.5f;
const float LEADERBOARD_WIDTH = 600.0f;
const float ROW_HEIGHT = LEADERBOARD_FONT_SIZE + PADDING * 2.0f;
const float LEADERBOARD_X = SCENE_WIDTH / 2.0f - LEADERBOARD_WIDTH / 2.0f;
const float LEADERBOARD_Y = HEADER_Y + 60.0f;
const float ONE_DIGIT_POS_OFFSET = 14.0f;
const float TWO_DIGIT_POS_OFFSET = 19.0f;
const float NAME_X_OFFSET = 60.0f;
const float ONE_DIGIT_SCORE_OFFSET = 520.0f;
const float SCORE_X_OFFSET_DIFF = 9.0f;
const float FOUR_DIGIT_SCORE_OFFSET = ONE_DIGIT_SCORE_OFFSET - SCORE_X_OFFSET_DIFF * 2;
const float FIVE_DIGIT_SCORE_OFFSET = ONE_DIGIT_SCORE_OFFSET - SCORE_X_OFFSET_DIFF * 3;
const float BORDER_OFFSET = 6.0f;
#endif // CPPBASICS_CONSTANTS_HPP