Sound source info class. More...
#include <soundsource.hpp>
Public Member Functions | |
sourcespec (const std::string &id, const std::string &files, int min_delay, int chance) | |
Parameter-list constructor. More... | |
sourcespec (const config &cfg) | |
WML constructor. More... | |
void | write (config &cfg) const |
Serializes information into cfg as a new (appended) child of key "sound_source". More... | |
int | loops () const |
void | set_loops (int value) |
bool | check_fogged () const |
bool | check_shrouded () const |
void | set_check_fogged (bool value) |
void | set_check_shrouded (bool value) |
const std::vector< map_location > & | get_locations () const |
void | set_locations (const std::vector< map_location > &locs) |
int | full_range () const |
void | set_full_range (int value) |
int | fade_range () const |
void | set_fade_range (int value) |
int | minimum_delay () const |
void | set_minimum_delay (int value) |
int | chance () const |
void | set_chance (int value) |
const std::string & | id () const |
const std::string & | files () const |
void | set_files (const std::string &f) |
Private Attributes | |
const std::string | id_ |
std::string | files_ |
int | min_delay_ |
int | chance_ |
int | loops_ |
int | range_ |
int | faderange_ |
bool | check_fogged_ |
bool | check_shrouded_ |
std::vector< map_location > | locations_ |
Sound source info class.
Encapsulates sound source parameters, so that they're easier to pass around/extend/read.
Definition at line 115 of file soundsource.hpp.
|
inline |
Parameter-list constructor.
Definition at line 133 of file soundsource.hpp.
soundsource::sourcespec::sourcespec | ( | const config & | cfg | ) |
WML constructor.
Definition at line 237 of file soundsource.cpp.
References locations_, and read_locations().
|
inline |
|
inline |
Definition at line 161 of file soundsource.hpp.
References check_fogged_.
Referenced by impl_source_eq().
|
inline |
Definition at line 162 of file soundsource.hpp.
References check_shrouded_.
Referenced by impl_source_eq().
|
inline |
Definition at line 186 of file soundsource.hpp.
References faderange_.
Referenced by impl_source_eq().
|
inline |
|
inline |
|
inline |
Definition at line 172 of file soundsource.hpp.
References locations_.
Referenced by impl_source_eq().
|
inline |
Definition at line 204 of file soundsource.hpp.
References id_.
Referenced by soundsource::manager::add(), and impl_source_eq().
|
inline |
|
inline |
Definition at line 192 of file soundsource.hpp.
References min_delay_.
Referenced by impl_source_eq().
|
inline |
Definition at line 200 of file soundsource.hpp.
References chance_.
|
inline |
Definition at line 164 of file soundsource.hpp.
References check_fogged_.
|
inline |
Definition at line 168 of file soundsource.hpp.
References check_shrouded_.
|
inline |
Definition at line 188 of file soundsource.hpp.
References faderange_.
|
inline |
Definition at line 208 of file soundsource.hpp.
|
inline |
Definition at line 182 of file soundsource.hpp.
References range_.
|
inline |
Definition at line 176 of file soundsource.hpp.
References locations_.
|
inline |
Definition at line 157 of file soundsource.hpp.
References loops_.
|
inline |
Definition at line 194 of file soundsource.hpp.
References min_delay_.
void soundsource::sourcespec::write | ( | config & | cfg | ) | const |
Serializes information into cfg as a new (appended) child of key "sound_source".
Definition at line 223 of file soundsource.cpp.
References chance_, check_fogged_, check_shrouded_, faderange_, files_, id_, locations_, loops_, min_delay_, range_, and write_locations().
|
private |
Definition at line 121 of file soundsource.hpp.
Referenced by chance(), set_chance(), and write().
|
private |
Definition at line 126 of file soundsource.hpp.
Referenced by check_fogged(), set_check_fogged(), and write().
|
private |
Definition at line 127 of file soundsource.hpp.
Referenced by check_shrouded(), set_check_shrouded(), and write().
|
private |
Definition at line 125 of file soundsource.hpp.
Referenced by fade_range(), set_fade_range(), and write().
|
private |
Definition at line 118 of file soundsource.hpp.
Referenced by files(), set_files(), and write().
|
private |
Definition at line 117 of file soundsource.hpp.
|
private |
Definition at line 129 of file soundsource.hpp.
Referenced by get_locations(), set_locations(), sourcespec(), and write().
|
private |
Definition at line 123 of file soundsource.hpp.
Referenced by loops(), set_loops(), and write().
|
private |
Definition at line 120 of file soundsource.hpp.
Referenced by minimum_delay(), set_minimum_delay(), and write().
|
private |
Definition at line 124 of file soundsource.hpp.
Referenced by full_range(), set_full_range(), and write().