CMapInfo.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "../global.h"
  3. class CMapHeader;
  4. class CCampaignHeader;
  5. struct StartInfo;
  6. class DLL_EXPORT CMapInfo
  7. {
  8. public:
  9. CMapHeader * mapHeader; //may be NULL if campaign
  10. CCampaignHeader * campaignHeader; //may be NULL if scenario
  11. StartInfo *scenarioOpts; //options with which scenario has been started (used only with saved games)
  12. std::string filename;
  13. bool lodCmpgn; //tells if this campaign is located in Lod file
  14. std::string date;
  15. int playerAmnt, //players in map
  16. humenPlayers; //players ALLOWED to be controlled by human
  17. int actualHumanPlayers; // >1 if multiplayer game
  18. CMapInfo(bool map = true);
  19. ~CMapInfo();
  20. //CMapInfo(const std::string &fname, const unsigned char *map);
  21. void setHeader(CMapHeader *header);
  22. void mapInit(const std::string &fname, const unsigned char *map);
  23. void campaignInit();
  24. void countPlayers();
  25. template <typename Handler> void serialize(Handler &h, const int Version)
  26. {
  27. h & mapHeader & campaignHeader & scenarioOpts & filename & lodCmpgn & date & playerAmnt & humenPlayers;
  28. h & actualHumanPlayers;
  29. }
  30. };