Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv THIS
- data_enum(e_difficulty,
- s_difficulty_data
- g_difficulty_data
- normal
- {
- .max_waves = 50,
- .extra_levels = 0,
- .name = "Normal",
- }
- hard
- {
- .max_waves = 75,
- .extra_levels = 50,
- .name = "Hard",
- }
- insane
- {
- .max_waves = 100,
- .extra_levels = 100,
- .name = "Insane",
- }
- nightmare
- {
- .max_waves = 250,
- .extra_levels = 500,
- .name = "Nightmare",
- }
- )
- struct s_difficulty_data
- {
- int max_waves;
- int extra_levels;
- char* name;
- };
- // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv GENERATES THIS
- enum e_difficulty
- {
- e_difficulty_normal,
- e_difficulty_hard,
- e_difficulty_insane,
- e_difficulty_nightmare,
- e_difficulty_count,
- };
- global constexpr s_difficulty_data g_difficulty_data[e_difficulty_count] = {
- {
- .max_waves = 50,
- .extra_levels = 0,
- .name = "Normal",
- },
- {
- .max_waves = 75,
- .extra_levels = 50,
- .name = "Hard",
- },
- {
- .max_waves = 100,
- .extra_levels = 100,
- .name = "Insane",
- },
- {
- .max_waves = 250,
- .extra_levels = 500,
- .name = "Nightmare",
- },
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement