#include "stage.h"
using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
Sequencer::Sequencer(float bpm):
started(false),
void Sequencer::Loader::segment(float start, float end)
{
- SegmentLoader ldr(obj, start, end);
+ SegmentLoader ldr(obj, start, end, demo);
load_sub_with(ldr);
}
demo(d)
{
for(const auto &t: obj.action_types)
- add(t.first, t.second->get_loader_func());
+ add(t.first, t.second->get_def_loader_func());
}
void Sequencer::ActionDefLoader::finished()
}
-Sequencer::SegmentLoader::SegmentLoader(Sequencer &s, float b, float e):
+Sequencer::SegmentLoader::SegmentLoader(Sequencer &s, float b, float e, Demo &d):
ObjectLoader<Sequencer>(s),
start_beat(b),
- end_beat(e)
+ end_beat(e),
+ demo(d)
{
add("apply", &SegmentLoader::apply);
+ for(const auto &t: obj.action_types)
+ add(t.first, t.second->get_loader_func());
}
void Sequencer::SegmentLoader::apply(const string &n)
{
obj.add_action(*get_item(obj.named_actions, n), start_beat, end_beat);
}
+
+} // namespace DemoScene
+} // namespace Msp