diff options
author | David Robillard <d@drobilla.net> | 2007-02-01 05:07:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-01 05:07:13 +0000 |
commit | ed85b5c7d96e40ada730614cb69776672738c87b (patch) | |
tree | 9aee0a533ae8f815e48e3fdf6a48013fe31f1f3c /src/main.cpp | |
parent | 822c1f64098b5d81aaa8b4c7d6f75901d9f431f2 (diff) | |
download | machina-ed85b5c7d96e40ada730614cb69776672738c87b.tar.gz machina-ed85b5c7d96e40ada730614cb69776672738c87b.tar.bz2 machina-ed85b5c7d96e40ada730614cb69776672738c87b.zip |
Partially implemented loading (from RDF files).
git-svn-id: http://svn.drobilla.net/lad/machina@272 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9b4511b..79809e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,29 +19,24 @@ #include "Node.hpp" #include "Action.hpp" #include "Edge.hpp" +#include "Loader.hpp" using namespace std; using namespace Machina; -Node* create_debug_node(const string& name, FrameCount duration) +int +main(int argc, char** argv) { - // leaks like a sieve, obviously - - Node* n = new Node(duration); - PrintAction* a_enter = new PrintAction(string("> ") + name); - PrintAction* a_exit = new PrintAction(string("< ")/* + name*/); + if (argc != 2) + return -1; - n->add_enter_action(a_enter); - n->add_exit_action(a_exit); + Loader l; + SharedPtr<Machine> m = l.load(argv[1]); - return n; -} + m->activate(); - -int -main()//int argc, char** argv) -{ + /* Machine m(1); Node* n1 = create_debug_node("1", 1); @@ -50,12 +45,13 @@ main()//int argc, char** argv) m.initial_node()->add_outgoing_edge(new Edge(n1)); n1->add_outgoing_edge(new Edge(n2)); n2->add_outgoing_edge(new Edge(m.initial_node())); + */ Timestamp t = 0; - while (t < 80) { - m.process(10); - t += 10; + while (t < 4000) { + m->process(1000); + t += 1000; } return 0; |