CSemiDefHandler.h 703 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef SEMIDEF_H
  2. #define SEMIDEF_H
  3. #include "global.h"
  4. #include <string>
  5. #include "SDL.h"
  6. #include "SDL_image.h"
  7. #include <vector>
  8. struct Cimage
  9. {
  10. int groupNumber;
  11. std::string imName; //name without extension
  12. SDL_Surface * bitmap;
  13. };
  14. class CSemiDefHandler
  15. {
  16. public:
  17. int howManyImgs;
  18. std::string defName;
  19. std::vector<Cimage> ourImages;
  20. std::vector<std::string> namesOfImgs;
  21. unsigned char * buforD;
  22. static std::string nameFromType(EterrainType typ);
  23. void openImg(const char *name);
  24. void openDef(std::string name, std::string lodName, int dist=1);
  25. void readFileList(int dist = 1);
  26. void loadImages(std::string path);
  27. ~CSemiDefHandler();
  28. };
  29. #endif // SEMIDEF_H