X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=lib%2Fspecial%2Fsprite_manager.h;h=2925e68df0f66cc6ba4bbb1e671391ffa4ea96e6;hb=40e6e7cdc59c09befbd2595aea0c6e10428315d4;hp=8663081760bab45227a34f28d71dbd78af19a46b;hpb=4b476ec30e7dd62249328054402d6493c20a685d;p=supertux.git diff --git a/lib/special/sprite_manager.h b/lib/special/sprite_manager.h index 866308176..2925e68df 100644 --- a/lib/special/sprite_manager.h +++ b/lib/special/sprite_manager.h @@ -22,27 +22,26 @@ #include -#include "../special/sprite.h" +#include "sprite.h" namespace SuperTux - { +{ class SpriteManager - { - private: - typedef std::map Sprites; - Sprites sprites; - public: - SpriteManager(const std::string& filename); - ~SpriteManager(); - - void load_resfile(const std::string& filename); - /** loads a sprite. - * WARNING: You must not delete the returned object. - */ - Sprite* load(const std::string& name); - }; - + { + private: + typedef std::map Sprites; + Sprites sprites; + public: + SpriteManager(const std::string& filename); + ~SpriteManager(); + + void load_resfile(const std::string& filename); + /** loads a sprite. + * (contrary to the old api you have to delete the sprite!) + */ + Sprite* create(const std::string& name); + }; } //namespace SuperTux #endif /*SUPERTUX_SPRITE_MANAGER_H*/