X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject_factory.cpp;h=5335140591183e14d87feeebe271f4d373830c56;hb=dd9fdb809ad6effa216e4483f099a48ab2814352;hp=afae27fee9449ddd8b0cd709e8f461f8859f832d;hpb=07ddaed2a657e4d2a3d038fed223fc5827159caf;p=supertux.git diff --git a/src/object_factory.cpp b/src/object_factory.cpp index afae27fee..533514059 100644 --- a/src/object_factory.cpp +++ b/src/object_factory.cpp @@ -25,6 +25,7 @@ #include "lisp/lisp.hpp" #include "lisp/parser.hpp" #include "object_factory.hpp" +#include "math/vector.hpp" Factories* object_factories = 0; @@ -46,8 +47,10 @@ GameObject* create_object(const std::string& name, const Vector& pos) lisptext << "(" << name << " (x " << pos.x << ")" << " (y " << pos.y << "))"; - + lisp::Parser parser; - std::auto_ptr lisp (parser.parse(lisptext)); - return create_object(name, *lisp); + const lisp::Lisp* lisp = parser.parse(lisptext, "create_object"); + GameObject* object = create_object(name, *lisp); + + return object; }