77 double m_click_distance;
87 bool m_show_debug_info{
true};
89 bool m_show_debug_info{
false};
93 volume m_sound_effects_volume;
Options for the game.
Definition game_options.h:18
starting_position_type get_starting_position() const noexcept
Get the starting position.
Definition game_options.h:46
void reset()
Reset all values to defaults.
Definition game_options.cpp:94
void set_starting_position(const starting_position_type starting_position) noexcept
Set the starting position.
Definition game_options.h:67
game_options()
Definition game_options.cpp:9
auto get_show_debug_info() const noexcept
Show the debug info.
Definition game_options.h:37
void set_music_volume(const volume &v) noexcept
Set the volume, as a percentage.
Definition game_options.h:61
auto get_damage_per_chess_move() const noexcept
Get the damage per chess move that all pieces deal.
Definition game_options.h:28
void set_game_speed(const game_speed speed) noexcept
Set the game speed.
Definition game_options.h:58
void set_show_debug_info(const bool b) noexcept
Set showing the debug info.
Definition game_options.h:64
auto get_show_occupied() const noexcept
Show the squares that are actually occupied by the piecs?
Definition game_options.h:40
void set_sound_effects_volume(const volume &v) noexcept
Set the sound effects volume, as a percentage.
Definition game_options.h:70
auto get_show_selected() const noexcept
Are selected units highlighted?
Definition game_options.h:43
double get_message_display_time_secs() const noexcept
How long log messages are displayed.
Definition game_options.h:34
const auto & get_music_volume() const noexcept
Get the music volume, as a percentage.
Definition game_options.h:49
auto get_game_speed() const noexcept
Get the game speed.
Definition game_options.h:31
auto get_click_distance() const noexcept
Get the distance the mouse must be maximally in for a click to connect to a piece.
Definition game_options.h:25
const volume & get_sound_effects_volume() const noexcept
Get the sound effects volume.
Definition game_options.h:52
A relative sound intensity.
Definition volume.h:10
void test_game_options()
Test this class and its free functions.
Definition game_options.cpp:103
void decrease_starting_position(game_options &g) noexcept
Decrease the sound effects volume.
Definition game_options.cpp:34
constexpr double get_default_message_display_time_secs() noexcept
How long log messages are displayed.
Definition game_options.h:119
const volume & get_music_volume(const game_options &g) noexcept
Get the music volume.
Definition game_options.cpp:54
void increase_music_volume(game_options &g) noexcept
Increase the music volume.
Definition game_options.cpp:79
starting_position_type get_starting_position(const game_options &g) noexcept
Get the starting position.
Definition game_options.cpp:69
constexpr double get_default_click_distance() noexcept
The default pixels distance for the mouse for a click to connect to a piece.
Definition game_options.h:116
void decrease_music_volume(game_options &g) noexcept
Decrease the music volume.
Definition game_options.cpp:24
void increase_game_speed(game_options &g) noexcept
Increase the game speed.
Definition game_options.cpp:74
bool do_show_selected(const game_options &g) noexcept
Are selected squares shown on-screen?
Definition game_options.cpp:39
void increase_sound_effects_volume(game_options &g) noexcept
Increase the sound effects volume.
Definition game_options.cpp:84
void increase_starting_position(game_options &g) noexcept
Increase the starting position.
Definition game_options.cpp:89
volume get_default_music_volume() noexcept
The default music volume.
Definition game_options.cpp:44
void decrease_sound_effects_volume(game_options &g) noexcept
Decrease the sound effects volume.
Definition game_options.cpp:29
double get_music_volume_as_percentage(const game_options &g) noexcept
Get the music volume as a percentage.
Definition game_options.cpp:59
volume get_default_sound_effects_volume() noexcept
The default sound effects volume.
Definition game_options.cpp:49
void decrease_game_speed(game_options &g) noexcept
Decrease the game speed.
Definition game_options.cpp:19
const volume & get_sound_effects_volume(const game_options &g) noexcept
Get the sound effects volume.
Definition game_options.cpp:64
game_speed
The game speed.
Definition game_speed.h:11
starting_position_type
The starting position type.
Definition starting_position_type.h:10