- {
- private:
- typedef std::map<std::string, Sprite*> 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<std::string, SpriteData*> 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);
+ };