#include <soundsource.hpp>
Private Member Functions | |
positional_source (const sourcespec &spec) | |
~positional_source () | |
void | update (unsigned int time, const display &disp) |
void | update_positions (unsigned int time, const display &disp) |
void | add_location (const gamemap::location &loc) |
void | remove_location (const gamemap::location &loc) |
void | replace_location (const gamemap::location &oldloc, const gamemap::location &newloc) |
int | calculate_volume (const gamemap::location &loc, const display &disp) |
Private Attributes | |
unsigned int | _last_played |
unsigned int | _min_delay |
unsigned int | _chance |
unsigned int | _loops |
const unsigned int | _id |
unsigned int | _range |
unsigned int | _faderange |
bool | _check_fogged |
std::string | _files |
std::vector< gamemap::location > | _locations |
Static Private Attributes | |
static unsigned int | last_id = 0 |
Friends | |
class | manager |
Definition at line 36 of file soundsource.hpp.
soundsource::positional_source::positional_source | ( | const sourcespec & | spec | ) | [private] |
soundsource::positional_source::~positional_source | ( | ) | [private] |
Definition at line 113 of file soundsource.cpp.
References _id, DISTANCE_SILENT, and sound::reposition_sound().
void soundsource::positional_source::update | ( | unsigned int | time, | |
const display & | disp | |||
) | [private] |
Definition at line 118 of file soundsource.cpp.
References _chance, _files, _id, _last_played, _locations, _loops, _min_delay, calculate_volume(), DISTANCE_SILENT, sound::is_sound_playing(), and sound::play_sound_positioned().
Referenced by update_positions().
void soundsource::positional_source::update_positions | ( | unsigned int | time, | |
const display & | disp | |||
) | [private] |
Definition at line 150 of file soundsource.cpp.
References _check_fogged, _id, _locations, calculate_volume(), DISTANCE_SILENT, display::fogged(), sound::is_sound_playing(), sound::reposition_sound(), display::shrouded(), and update().
void soundsource::positional_source::add_location | ( | const gamemap::location & | loc | ) | [private] |
void soundsource::positional_source::remove_location | ( | const gamemap::location & | loc | ) | [private] |
void soundsource::positional_source::replace_location | ( | const gamemap::location & | oldloc, | |
const gamemap::location & | newloc | |||
) | [private] |
int soundsource::positional_source::calculate_volume | ( | const gamemap::location & | loc, | |
const display & | disp | |||
) | [private] |
Definition at line 170 of file soundsource.cpp.
References _faderange, _range, distance_between(), DISTANCE_SILENT, display::hex_clicked_on(), and display::map_area().
Referenced by update(), and update_positions().
friend class manager [friend] |
Definition at line 37 of file soundsource.hpp.
unsigned int soundsource::positional_source::_last_played [private] |
unsigned int soundsource::positional_source::_min_delay [private] |
unsigned int soundsource::positional_source::_chance [private] |
unsigned int soundsource::positional_source::_loops [private] |
const unsigned int soundsource::positional_source::_id [private] |
Definition at line 43 of file soundsource.hpp.
Referenced by update(), update_positions(), and ~positional_source().
unsigned int soundsource::positional_source::_range [private] |
Definition at line 44 of file soundsource.hpp.
Referenced by calculate_volume(), and positional_source().
unsigned int soundsource::positional_source::_faderange [private] |
Definition at line 45 of file soundsource.hpp.
Referenced by calculate_volume(), and positional_source().
bool soundsource::positional_source::_check_fogged [private] |
std::string soundsource::positional_source::_files [private] |
std::vector<gamemap::location> soundsource::positional_source::_locations [private] |
Definition at line 48 of file soundsource.hpp.
Referenced by add_location(), update(), and update_positions().
unsigned int soundsource::positional_source::last_id = 0 [static, private] |
Definition at line 52 of file soundsource.hpp.
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |