X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsprite%2Fsprite_manager.hpp;h=544ee9f07d85b758d0c3474031514a72bf490c09;hb=7a0031e8f250c852743709ab06ecafe1896eefbe;hp=dcdcbf9368e10446ece966886c98c2ba59d9bb4c;hpb=5b7f9214cb929399f1a855ef5807018a9447d510;p=supertux.git diff --git a/src/sprite/sprite_manager.hpp b/src/sprite/sprite_manager.hpp index dcdcbf936..544ee9f07 100644 --- a/src/sprite/sprite_manager.hpp +++ b/src/sprite/sprite_manager.hpp @@ -1,7 +1,7 @@ // $Id$ -// +// // SuperTux -// Copyright (C) 2004 Ingo Ruhnke +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -12,7 +12,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -21,23 +21,28 @@ #define SUPERTUX_SPRITE_MANAGER_H #include +#include -#include "sprite.hpp" +class SpriteData; +class Sprite; class SpriteManager { private: - typedef std::map Sprites; - Sprites sprites; + 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); + SpriteManager(); + ~SpriteManager(); + + /** loads a sprite. */ + Sprite* create(const std::string& filename); + +private: + SpriteData* load(const std::string& filename); }; +extern SpriteManager* sprite_manager; + #endif