r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
GameConfig.hpp
Go to the documentation of this file.
1///
2/// @file GameConfig.hpp
3/// @brief Configuration constants for the game
4/// @namespace cli
5///
6
7#pragma once
8
9namespace cli
10{
11 namespace GameConfig
12 {
13 namespace Screen
14 {
15 inline constexpr float SPAWN_X = 1950.0f;
16 inline constexpr float MIN_Y = 50.0f;
17 inline constexpr float MAX_Y = 1030.0f;
18 inline constexpr float REMOVE_X = -100.0f;
19 inline constexpr float REMOVE_MIN_Y = -50.0f;
20 inline constexpr float REMOVE_MAX_Y = 1130.0f;
21 } // namespace Screen
22 namespace Player
23 {
24 inline constexpr float SPEED = 500.0f;
25 inline constexpr float DIAGONAL_SPEED_MULTIPLIER = 0.707f;
26 inline constexpr float SPRITE_WIDTH = 33.0f;
27 inline constexpr float SPRITE_HEIGHT = 17.0f;
28 inline constexpr float SCALE = 2.0f;
29 inline constexpr int FRAMES_PER_ROW = 5;
30 inline constexpr int TOTAL_FRAMES = 5;
31 } // namespace Player
32 namespace Projectile
33 {
34 namespace Basic
35 {
36 inline constexpr float SPEED = 800.0f;
37 inline constexpr float DAMAGE = 10.0f;
38 inline constexpr float LIFETIME = 3.0f;
39 inline constexpr float SCALE = 1.0f;
40 inline constexpr float FIRE_COOLDOWN = 0.3f;
41 inline constexpr float SPRITE_WIDTH = 16.0f;
42 inline constexpr float SPRITE_HEIGHT = 8.0f;
43 } // namespace Basic
44
45 namespace Supercharged
46 {
47 inline constexpr float SPEED = 1200.0f;
48 inline constexpr float DAMAGE = 25.0f;
49 inline constexpr float LIFETIME = 5.0f;
50 inline constexpr float SCALE = 1.5f;
51 inline constexpr float FIRE_COOLDOWN = 0.2f;
52 inline constexpr float CHARGE_TIME = 0.5f;
53 inline constexpr float SPRITE_WIDTH = 29.0f;
54 inline constexpr float SPRITE_HEIGHT = 24.0f;
55 inline constexpr int ANIMATION_FRAMES = 4;
56 inline constexpr float ANIMATION_DURATION = 0.15f;
57 } // namespace Supercharged
58 } // namespace Projectile
59 namespace Animation
60 {
61 inline constexpr float FRAME_DURATION = 0.1f;
62 }
63 namespace Beam
64 {
65 inline constexpr float MAX_CHARGE = 1.0f;
66 inline constexpr float CHARGE_RATE = 1.0f;
67 inline constexpr float BAR_WIDTH = 120.0f;
68 inline constexpr float BAR_HEIGHT = 12.0f;
69 inline constexpr float BAR_X = 10.0f;
70 inline constexpr float BAR_Y = 10.0f;
71 } // namespace Beam
72 namespace LoadingAnimation
73 {
74 inline constexpr float SPRITE_WIDTH = 29.0f;
75 inline constexpr float SPRITE_HEIGHT = 24.0f;
76 inline constexpr int ANIMATION_FRAMES = 4;
77 inline constexpr float ANIMATION_DURATION = 0.15f;
78 inline constexpr float OFFSET_X = 40.0f;
79 inline constexpr float OFFSET_Y = 0.0f;
80 } // namespace LoadingAnimation
81 namespace Enemy
82 {
83 namespace Easy
84 {
85 inline constexpr float HEALTH = 1.0f;
86 inline constexpr float DAMAGE = 5.0f;
87 inline constexpr float SPEED = 80.0f;
88 inline constexpr float SPRITE_WIDTH = 32.0f;
89 inline constexpr float SPRITE_HEIGHT = 32.0f;
90 inline constexpr float SCALE = 2.0f;
91 inline constexpr float SHOOT_COOLDOWN = 2.0f;
92 inline constexpr float SPAWN_RATE = 2.0f;
93 inline constexpr int ANIMATION_FRAMES = 4;
94 inline constexpr float ANIMATION_DURATION = 0.5f;
95 inline constexpr int FRAMES_PER_ROW = 4;
96 } // namespace Easy
97 } // namespace Enemy
98 namespace Explosion
99 {
100 inline constexpr float SPRITE_WIDTH = 32.0f;
101 inline constexpr float SPRITE_HEIGHT = 32.0f;
102 inline constexpr int ANIMATION_FRAMES = 4;
103 inline constexpr float ANIMATION_DURATION = 0.1f;
104 inline constexpr int FRAMES_PER_ROW = 4;
105 inline constexpr float LIFETIME = 0.4f;
106 inline constexpr float SCALE = 2.0f;
107 } // namespace Explosion
108 namespace Asteroid
109 {
110 namespace Small
111 {
112 inline constexpr float HEALTH = 20.0f;
113 inline constexpr float SPEED = 80.0f;
114 inline constexpr float SPRITE_WIDTH = 18.0f;
115 inline constexpr float SPRITE_HEIGHT = 18.0f;
116 inline constexpr float SCALE = 2.0f;
117 inline constexpr float ROTATION_SPEED = 90.0f;
118 inline constexpr float SPAWN_RATE = 1.0f;
119 inline constexpr int ANIMATION_FRAMES = 11;
120 inline constexpr float ANIMATION_DURATION = 0.5f;
121 inline constexpr int FRAMES_PER_ROW = 11;
122 } // namespace Small
123
124 namespace Medium
125 {
126 inline constexpr float HEALTH = 40.0f;
127 inline constexpr float SPEED = 60.0f;
128 inline constexpr float SPRITE_WIDTH = 32.0f;
129 inline constexpr float SPRITE_HEIGHT = 32.0f;
130 inline constexpr float SCALE = 1.0f;
131 inline constexpr float ROTATION_SPEED = 60.0f;
132 inline constexpr float SPAWN_RATE = 2.0f;
133 } // namespace Medium
134
135 namespace Large
136 {
137 inline constexpr float HEALTH = 80.0f;
138 inline constexpr float SPEED = 40.0f;
139 inline constexpr float SPRITE_WIDTH = 64.0f;
140 inline constexpr float SPRITE_HEIGHT = 64.0f;
141 inline constexpr float SCALE = 1.5f;
142 inline constexpr float ROTATION_SPEED = 30.0f;
143 inline constexpr float SPAWN_RATE = 4.0f;
144 } // namespace Large
145 } // namespace Asteroid
146 namespace Hitbox
147 {
148 inline constexpr float PLAYER_RADIUS = 20.0f;
149 inline constexpr float ENEMY_RADIUS = 15.0f;
150 inline constexpr float PROJECTILE_BASIC_RADIUS = 5.0f;
151 inline constexpr float PROJECTILE_SUPERCHARGED_RADIUS = 8.0f;
152 inline constexpr float ASTEROID_SMALL_RADIUS = 25.0f;
153 inline constexpr float ASTEROID_MEDIUM_RADIUS = 40.0f;
154 inline constexpr float ASTEROID_LARGE_RADIUS = 60.0f;
155 } // namespace Hitbox
156 } // namespace GameConfig
157} // namespace cli
constexpr float FRAME_DURATION
constexpr float CHARGE_RATE
constexpr float BAR_WIDTH
constexpr float BAR_HEIGHT
constexpr float MAX_CHARGE
constexpr float BAR_X
constexpr float BAR_Y
constexpr float SHOOT_COOLDOWN
constexpr float SPRITE_HEIGHT
constexpr float ANIMATION_DURATION
constexpr float ANIMATION_DURATION
constexpr float SPRITE_HEIGHT
constexpr float SPRITE_WIDTH
constexpr float ASTEROID_MEDIUM_RADIUS
constexpr float ASTEROID_SMALL_RADIUS
constexpr float PROJECTILE_BASIC_RADIUS
constexpr float ASTEROID_LARGE_RADIUS
constexpr float PLAYER_RADIUS
constexpr float ENEMY_RADIUS
constexpr float PROJECTILE_SUPERCHARGED_RADIUS
constexpr float DIAGONAL_SPEED_MULTIPLIER
constexpr float SCALE
constexpr float SPRITE_WIDTH
constexpr int FRAMES_PER_ROW
constexpr float SPRITE_HEIGHT
constexpr int TOTAL_FRAMES
constexpr float SPEED
constexpr float REMOVE_X
constexpr float MIN_Y
constexpr float REMOVE_MIN_Y
constexpr float REMOVE_MAX_Y
constexpr float MAX_Y
constexpr float SPAWN_X