Public Member Functions | Private Attributes | Static Private Attributes

soundsource::positional_source Class Reference

#include <soundsource.hpp>

Collaboration diagram for soundsource::positional_source:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 positional_source (const sourcespec &spec)
 ~positional_source ()
bool is_global ()
void update (unsigned int time, const display &disp)
void update_positions (unsigned int time, const display &disp)
int calculate_volume (const map_location &loc, const display &disp)
void write_config (config &cfg) const
 Serializes attributes as WML config.

Private Attributes

unsigned int last_played_
int min_delay_
int chance_
int loops_
const unsigned int id_
int range_
int faderange_
bool check_fogged_
bool check_shrouded_
std::string files_
std::vector< map_locationlocations_

Static Private Attributes

static unsigned int last_id = 0

Detailed Description

Definition at line 37 of file soundsource.hpp.


Constructor & Destructor Documentation

soundsource::positional_source::positional_source ( const sourcespec spec  ) 

Definition at line 120 of file soundsource.cpp.

References faderange_, and range_.

soundsource::positional_source::~positional_source (  ) 

Definition at line 137 of file soundsource.cpp.

References DISTANCE_SILENT, id_, and sound::reposition_sound().

Here is the call graph for this function:


Member Function Documentation

int soundsource::positional_source::calculate_volume ( const map_location loc,
const display disp 
)

Definition at line 200 of file soundsource.cpp.

References check_fogged_, check_shrouded_, gui2::distance(), distance_between(), DISTANCE_SILENT, faderange_, display::fogged(), display::hex_clicked_on(), display::map_area(), range_, and display::shrouded().

Referenced by update(), and update_positions().

Here is the call graph for this function:

Here is the caller graph for this function:

bool soundsource::positional_source::is_global (  ) 

Definition at line 142 of file soundsource.cpp.

References locations_.

Referenced by update_positions().

Here is the caller graph for this function:

void soundsource::positional_source::update ( unsigned int  time,
const display disp 
)

Definition at line 147 of file soundsource.cpp.

References calculate_volume(), chance_, DISTANCE_SILENT, files_, id_, sound::is_sound_playing(), last_played_, locations_, loops_, min_delay_, and sound::play_sound_positioned().

Referenced by update_positions().

Here is the call graph for this function:

Here is the caller graph for this function:

void soundsource::positional_source::update_positions ( unsigned int  time,
const display disp 
)

Definition at line 179 of file soundsource.cpp.

References calculate_volume(), id_, is_global(), sound::is_sound_playing(), locations_, sound::reposition_sound(), and update().

Here is the call graph for this function:

void soundsource::positional_source::write_config ( config cfg  )  const

Serializes attributes as WML config.

Parameters:
cfg A reference to a [sound_source] tag object.

Definition at line 220 of file soundsource.cpp.

References chance_, check_fogged_, check_shrouded_, faderange_, files_, locations_, loops_, min_delay_, range_, and write_locations().

Here is the call graph for this function:


Member Data Documentation

Definition at line 40 of file soundsource.hpp.

Referenced by update(), and write_config().

Definition at line 45 of file soundsource.hpp.

Referenced by calculate_volume(), and write_config().

Definition at line 46 of file soundsource.hpp.

Referenced by calculate_volume(), and write_config().

Definition at line 44 of file soundsource.hpp.

Referenced by calculate_volume(), positional_source(), and write_config().

Definition at line 47 of file soundsource.hpp.

Referenced by update(), and write_config().

const unsigned int soundsource::positional_source::id_ [private]

Definition at line 42 of file soundsource.hpp.

Referenced by update(), update_positions(), and ~positional_source().

unsigned int soundsource::positional_source::last_id = 0 [static, private]

Definition at line 52 of file soundsource.hpp.

Definition at line 38 of file soundsource.hpp.

Referenced by update().

Definition at line 48 of file soundsource.hpp.

Referenced by is_global(), update(), update_positions(), and write_config().

Definition at line 41 of file soundsource.hpp.

Referenced by update(), and write_config().

Definition at line 39 of file soundsource.hpp.

Referenced by update(), and write_config().

Definition at line 43 of file soundsource.hpp.

Referenced by calculate_volume(), positional_source(), and write_config().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:00 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs