#include <sstream>
#include <stdexcept>
+#include "lisp/lisp.h"
+#include "lisp/parser.h"
#include "object_factory.h"
Factories* object_factories = 0;
return i->second->create_object(reader);
}
+GameObject* create_object(const std::string& name, const Vector& pos)
+{
+ std::stringstream lisptext;
+ lisptext << "(" << name
+ << " (x " << pos.x << ")"
+ << " (y " << pos.y << "))";
+
+ lisp::Parser parser;
+ std::auto_ptr<lisp::Lisp> lisp (parser.parse(lisptext));
+ return create_object(name, *lisp);
+}