CCampaignHandler.h 1004 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __CCAMPAIGNHANDLER_H__
  2. #define __CCAMPAIGNHANDLER_H__
  3. #include "../global.h"
  4. #include <string>
  5. #include <vector>
  6. /*
  7. * CCampaignHandler.h, part of VCMI engine
  8. *
  9. * Authors: listed in file AUTHORS in main folder
  10. *
  11. * License: GNU General Public License v2.0 or later
  12. * Full text of license available in license.txt file, in main folder
  13. *
  14. */
  15. class DLL_EXPORT CCampaignHeader
  16. {
  17. public:
  18. si32 version; //5 - AB, 6 - SoD, WoG - ?!?
  19. ui8 mapVersion; //CampText.txt's format
  20. std::string name, description;
  21. ui8 difficultyChoosenByPlayer;
  22. ui8 music; //CmpMusic.txt, start from 0
  23. template <typename Handler> void serialize(Handler &h, const int formatVersion)
  24. {
  25. h & version & mapVersion & name & description & difficultyChoosenByPlayer & music;
  26. }
  27. };
  28. class DLL_EXPORT CCampaignHandler
  29. {
  30. CCampaignHeader getHeader( const std::string & name, int size );
  31. public:
  32. std::vector<CCampaignHeader> getCampaignHeaders();
  33. };
  34. #endif __CCAMPAIGNHANDLER_H__