SpriteLoader.h 591 B

123456789101112131415161718192021222324252627282930
  1. #ifndef SPRITELOADER_H_INCLUDED
  2. #define SPRITELOADER_H_INCLUDED
  3. #include <iostream>
  4. #include <string>
  5. #include <map>
  6. #include <SDL/SDL.h>
  7. #undef main
  8. class SpriteLoader
  9. {
  10. public:
  11. SpriteLoader();
  12. SpriteLoader(std::string folder);
  13. ~SpriteLoader();
  14. SDL_Surface* takeSprite(std::string nom);
  15. void addSprite(std::string nom, SDL_Surface* sprite);
  16. void assignFolder(std::string folder);
  17. private:
  18. std::string m_folder;
  19. std::map<std::string, SDL_Surface*>::iterator m_it;
  20. std::map<std::string, SDL_Surface*> m_paquet;
  21. };
  22. #endif // SPRITELOADER_H_INCLUDED