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 |
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 |
Private Attributes | |
const std::string | id_ |
const 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 114 of file soundsource.hpp.
|
inline |
Parameter-list constructor.
Definition at line 132 of file soundsource.hpp.
soundsource::sourcespec::sourcespec | ( | const config & | cfg | ) |
WML constructor.
Definition at line 233 of file soundsource.cpp.
References locations_, and read_locations().
|
inline |
Definition at line 193 of file soundsource.hpp.
References chance_.
|
inline |
Definition at line 160 of file soundsource.hpp.
References check_fogged_.
|
inline |
Definition at line 161 of file soundsource.hpp.
References check_shrouded_.
|
inline |
Definition at line 181 of file soundsource.hpp.
References faderange_.
|
inline |
Definition at line 201 of file soundsource.hpp.
References files_.
|
inline |
Definition at line 175 of file soundsource.hpp.
References range_.
|
inline |
Definition at line 171 of file soundsource.hpp.
References locations_.
|
inline |
Definition at line 199 of file soundsource.hpp.
References id_.
Referenced by soundsource::manager::add().
|
inline |
Definition at line 154 of file soundsource.hpp.
References loops_.
|
inline |
Definition at line 187 of file soundsource.hpp.
References min_delay_.
Definition at line 195 of file soundsource.hpp.
|
inline |
Definition at line 163 of file soundsource.hpp.
|
inline |
Definition at line 167 of file soundsource.hpp.
Definition at line 183 of file soundsource.hpp.
Definition at line 177 of file soundsource.hpp.
Definition at line 156 of file soundsource.hpp.
Definition at line 189 of file soundsource.hpp.
Serializes information into cfg as a new (appended) child of key "sound_source".
|
private |
Definition at line 120 of file soundsource.hpp.
Referenced by chance().
|
private |
Definition at line 125 of file soundsource.hpp.
Referenced by check_fogged().
|
private |
Definition at line 126 of file soundsource.hpp.
Referenced by check_shrouded().
|
private |
Definition at line 124 of file soundsource.hpp.
Referenced by fade_range().
|
private |
Definition at line 117 of file soundsource.hpp.
Referenced by files().
|
private |
Definition at line 116 of file soundsource.hpp.
Referenced by id().
|
private |
Definition at line 128 of file soundsource.hpp.
Referenced by get_locations(), and sourcespec().
|
private |
Definition at line 122 of file soundsource.hpp.
Referenced by loops().
|
private |
Definition at line 119 of file soundsource.hpp.
Referenced by minimum_delay().
|
private |
Definition at line 123 of file soundsource.hpp.
Referenced by full_range().