savegame reorganization: implemented savegame_config for soundsources::manager
This commit is contained in:
parent
65ee9a6bb8
commit
cb3359ea88
2 changed files with 11 additions and 1 deletions
|
@ -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()),
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue