savegame reorganization: implemented savegame_config for soundsources::manager

This commit is contained in:
Eugen Jiresch 2009-06-03 09:07:31 +00:00
parent 65ee9a6bb8
commit cb3359ea88
2 changed files with 11 additions and 1 deletions

View file

@ -117,6 +117,13 @@ void manager::write_sourcespecs(config& cfg) const
}
}
config manager::toConfig()
{
config cfg;
write_sourcespecs(cfg);
return cfg.child("sound_source");
}
positional_source::positional_source(const sourcespec &spec) :
last_played_(0),
min_delay_(spec.minimum_delay()),

View file

@ -20,6 +20,7 @@
#include "generic_event.hpp"
#include "map_location.hpp"
#include "savegame_config.hpp"
class config;
class display;
@ -77,7 +78,7 @@ public:
void write_config(config& cfg) const;
};
class manager : public events::observer {
class manager : public events::observer, public savegame_config {
typedef std::map<std::string, positional_source *> positional_source_map;
typedef positional_source_map::iterator positional_source_iterator;
@ -108,6 +109,8 @@ public:
* "sound_source", appendend to existing content.
*/
void write_sourcespecs(config& cfg) const;
config toConfig();
};
/**