40 const unsigned int id_;
64 void update(
const std::chrono::steady_clock::time_point& time,
const display &disp);
95 void remove(
const std::string &
id);
97 bool contains(
const std::string&
id);
133 sourcespec(
const std::string&
id,
const std::string&
files,
const std::chrono::milliseconds& min_delay,
int chance) :
204 const std::string&
id()
const {
return id_; }
A config object defines a single node in a WML file, with access to child nodes.
Sort-of-Singleton that many classes, both GUI and non-GUI, use to access the game data.
void handle_generic_event(const std::string &event_name)
sourcespec get(const std::string &id)
positional_source_map sources_
positional_source_map::iterator positional_source_iterator
manager(const display &disp)
void write_sourcespecs(config &cfg) const
Serializes information into cfg as new children of key "sound_source", appended to existing content.
void add(const sourcespec &source)
positional_source_map::const_iterator positional_source_const_iterator
bool contains(const std::string &id)
void remove(const std::string &id)
std::map< std::string, std::unique_ptr< positional_source > > positional_source_map
std::chrono::steady_clock::time_point last_played_
void update(const std::chrono::steady_clock::time_point &time, const display &disp)
void write_config(config &cfg) const
Serializes attributes as WML config.
std::vector< map_location > locations_
int calculate_volume(const map_location &loc, const display &disp)
positional_source(const sourcespec &spec)
static unsigned int last_id
std::chrono::milliseconds min_delay_
void update_positions(const std::chrono::steady_clock::time_point &time, const display &disp)
bool check_fogged() const
void set_check_fogged(bool value)
const std::vector< map_location > & get_locations() const
void write(config &cfg) const
Serializes information into cfg as a new (appended) child of key "sound_source".
void set_check_shrouded(bool value)
void set_locations(const std::vector< map_location > &locs)
void set_loops(int value)
const std::string & files() const
std::vector< map_location > locations_
void set_files(const std::string &f)
sourcespec(const std::string &id, const std::string &files, const std::chrono::milliseconds &min_delay, int chance)
Parameter-list constructor.
void set_minimum_delay(const std::chrono::milliseconds &value)
std::chrono::milliseconds min_delay_
void set_chance(int value)
void set_fade_range(int value)
bool check_shrouded() const
auto minimum_delay() const
const std::string & id() const
void set_full_range(int value)
std::string::const_iterator iterator
Encapsulates the map of the game.