CTownHandler.h 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef CTOWNHANDLER_H
  2. #define CTOWNHANDLER_H
  3. #include "CDefHandler.h"
  4. #include "CCreatureHandler.h"
  5. #include "SDL.h"
  6. #include "int3.h"
  7. #include <string>
  8. #include <vector>
  9. class CTown
  10. {
  11. public:
  12. std::string name;
  13. int bonus; //pic number
  14. };
  15. class CTownHandler
  16. {
  17. CDefHandler * smallIcons;
  18. public:
  19. CTownHandler();
  20. ~CTownHandler();
  21. std::vector<CTown> towns;
  22. void loadNames();
  23. SDL_Surface * getPic(int ID, bool fort=true, bool builded=false); //ID=-1 - blank; -2 - border; -3 - random
  24. };
  25. class CTownInstance
  26. {
  27. int type; //type of town
  28. int owner; //ID of owner
  29. int3 pos; //position
  30. CTown * town;
  31. std::string name; // name of town
  32. CCreatureSet garrison;
  33. int builded; //how many buildings has been built this turn
  34. int destroyed; //how many buildings has been destroyed this turn
  35. //TODO:
  36. //buildings
  37. //creatures to be recruited
  38. //hero in garrison
  39. //spells in mage guild
  40. };
  41. #endif //CTOWNHANDLER_H