diff options
Diffstat (limited to 'library.h')
-rw-r--r-- | library.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -13,13 +13,15 @@ extern sf::RenderWindow window; template <typename ObjT> -shared_ptr<Object> instance_create(int x,int y){ - shared_ptr<Object> ptr(new ObjT(x,y)); - global.objects.push_back(ptr); +Object* instance_create(int x,int y){ + Object *ptr=new ObjT(x,y); + global.objects.insert(ptr); ptr->create(); return ptr; } +void instance_destroy(Object *obj); + void draw_text(int x,int y,const char *s); void draw_textf(int x,int y,const char *format,...) __attribute__((format (printf, 3, 4))); |