MapFeaturesH3M.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. private:
  16. static MapFormatFeaturesH3M getFeaturesROE();
  17. static MapFormatFeaturesH3M getFeaturesAB();
  18. static MapFormatFeaturesH3M getFeaturesSOD();
  19. static MapFormatFeaturesH3M getFeaturesCHR();
  20. static MapFormatFeaturesH3M getFeaturesWOG();
  21. static MapFormatFeaturesH3M getFeaturesHOTA(uint32_t hotaVersion);
  22. public:
  23. MapFormatFeaturesH3M() = default;
  24. static MapFormatFeaturesH3M find(EMapFormat format, uint32_t hotaVersion);
  25. // number of bytes in bitmask of appropriate type
  26. int factionsBytes;
  27. int heroesBytes;
  28. int artifactsBytes;
  29. int resourcesBytes;
  30. int skillsBytes;
  31. int spellsBytes;
  32. int buildingsBytes;
  33. // total number of elements of appropriate type
  34. int factionsCount;
  35. int heroesCount;
  36. int heroesPortraitsCount;
  37. int artifactsCount;
  38. int resourcesCount;
  39. int creaturesCount;
  40. int spellsCount;
  41. int skillsCount;
  42. int terrainsCount;
  43. int roadsCount;
  44. int riversCount;
  45. int artifactSlotsCount;
  46. int buildingsCount;
  47. // identifier that should be treated as "invalid", usually - '-1'
  48. int heroIdentifierInvalid;
  49. int artifactIdentifierInvalid;
  50. int creatureIdentifierInvalid;
  51. int spellIdentifierInvalid;
  52. // features from which map format are available
  53. bool levelROE = false;
  54. bool levelAB = false;
  55. bool levelSOD = false;
  56. bool levelCHR = false;
  57. bool levelWOG = false;
  58. bool levelHOTA0 = false;
  59. bool levelHOTA1 = false;
  60. bool levelHOTA2 = false;
  61. bool levelHOTA3 = false; // 1.6.0
  62. // level 4 - not released publicly?
  63. bool levelHOTA5 = false; // 1.7.0
  64. bool levelHOTA6 = false; // 1.7.1
  65. bool levelHOTA7 = false; // 1.7.2
  66. bool levelHOTA8 = false; // 1.7.3
  67. };
  68. VCMI_LIB_NAMESPACE_END