MapFeaturesH3M.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. // older, unsupported hota maps:
  59. // 1.0 -> uses SoD format
  60. // 1.1 -> uses SoD or WoG format
  61. // 1.2 -> uses custom 0x1e / 30 format
  62. bool levelHOTA0 = false; // 1.3.0
  63. bool levelHOTA1 = false; // 1.5.0
  64. bool levelHOTA2 = false; // 1.6.0
  65. bool levelHOTA3 = false; // 1.6.0
  66. // level 4 - not released publicly?
  67. bool levelHOTA5 = false; // 1.7.0
  68. bool levelHOTA6 = false; // 1.7.1
  69. bool levelHOTA7 = false; // 1.7.2
  70. bool levelHOTA8 = false; // 1.7.3
  71. bool levelHOTA9 = false; // 1.8.0
  72. };
  73. VCMI_LIB_NAMESPACE_END