MapFeaturesH3M.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * MapFeaturesH3M.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. VCMI_LIB_NAMESPACE_BEGIN
  12. enum class EMapFormat : uint8_t;
  13. struct MapFormatFeaturesH3M
  14. {
  15. public:
  16. static MapFormatFeaturesH3M find(EMapFormat format, uint32_t hotaVersion);
  17. static MapFormatFeaturesH3M getFeaturesROE();
  18. static MapFormatFeaturesH3M getFeaturesAB();
  19. static MapFormatFeaturesH3M getFeaturesSOD();
  20. static MapFormatFeaturesH3M getFeaturesCHR();
  21. static MapFormatFeaturesH3M getFeaturesWOG();
  22. static MapFormatFeaturesH3M getFeaturesHOTA(uint32_t hotaVersion);
  23. MapFormatFeaturesH3M() = default;
  24. // number of bytes in bitmask of appropriate type
  25. int factionsBytes;
  26. int heroesBytes;
  27. int artifactsBytes;
  28. int resourcesBytes;
  29. int skillsBytes;
  30. int spellsBytes;
  31. int buildingsBytes;
  32. // total number of elements of appropriate type
  33. int factionsCount;
  34. int heroesCount;
  35. int heroesPortraitsCount;
  36. int artifactsCount;
  37. int resourcesCount;
  38. int creaturesCount;
  39. int spellsCount;
  40. int skillsCount;
  41. int terrainsCount;
  42. int roadsCount;
  43. int riversCount;
  44. int artifactSlotsCount;
  45. int buildingsCount;
  46. // identifier that should be treated as "invalid", usually - '-1'
  47. int heroIdentifierInvalid;
  48. int artifactIdentifierInvalid;
  49. int creatureIdentifierInvalid;
  50. int spellIdentifierInvalid;
  51. // features from which map format are available
  52. bool levelROE = false;
  53. bool levelAB = false;
  54. bool levelSOD = false;
  55. bool levelCHR = false;
  56. bool levelWOG = false;
  57. bool levelHOTA0 = false;
  58. bool levelHOTA1 = false;
  59. bool levelHOTA2 = false;
  60. bool levelHOTA3 = false; // 1.6.0
  61. // level 4 - not released publicly?
  62. bool levelHOTA5 = false; // 1.7.0
  63. bool levelHOTA6 = false; // 1.7.1
  64. bool levelHOTA7 = false; // 1.7.2
  65. };
  66. VCMI_LIB_NAMESPACE_END