X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fobject_factory.h;h=efda690ce2ef5c0d5e8b01c667ba929de7e65c1e;hb=d471366f1ac5e8fad47e6ce161edc4977f180704;hp=7cb3f8f02035a4bfd9ea0cc48d2c231ce0a30f66;hpb=e3bb6e46812f108f093e9ad0751a945c34b18cd3;p=supertux.git diff --git a/src/object_factory.h b/src/object_factory.h index 7cb3f8f02..efda690ce 100644 --- a/src/object_factory.h +++ b/src/object_factory.h @@ -23,24 +23,19 @@ #include #include "lisp/lisp.h" -#include "special/game_object.h" +#include "game_object.h" #include "math/vector.h" -using namespace SuperTux; - class Factory { public: + virtual ~Factory() + { } + /** Creates a new gameobject from a lisp node. * Remember to delete the objects later */ virtual GameObject* create_object(const lisp::Lisp& reader) = 0; - - // hack for now will be removed later - virtual GameObject* create_object(const Vector& ) - { - return 0; - } }; typedef std::map Factories; @@ -52,7 +47,7 @@ GameObject* create_object(const std::string& name, const Vector& pos); /** comment from Matze: * Yes I know macros are evil, but in this specific case they save * A LOT of typing and evil code duplication. - * I'll happily acceppt alternatives if someone can present me one that does + * I'll happily accept alternatives if someone can present me one that does * not involve typing 4 or more lines for each object class */ #define IMPLEMENT_FACTORY(CLASS, NAME) \