1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Implemented parsing of HotA h3m header

This commit is contained in:
Ivan Savenko
2023-04-03 18:56:49 +03:00
parent f93335d678
commit 838d45b32c
4 changed files with 76 additions and 33 deletions

View File

@@ -27,7 +27,9 @@ MapFormatFeaturesH3M MapFormatFeaturesH3M::find(EMapFormat format)
return getFeaturesSOD();
case EMapFormat::WOG:
return getFeaturesWOG();
case EMapFormat::HOTA:
//case EMapFormat::HOTA1: //TODO: find such maps? Not present in current HotA release (1.6)
//case EMapFormat::HOTA2:
case EMapFormat::HOTA3:
return getFeaturesHOTA();
default:
throw std::runtime_error("Invalid map format!");
@@ -116,6 +118,14 @@ MapFormatFeaturesH3M MapFormatFeaturesH3M::getFeaturesHOTA()
MapFormatFeaturesH3M result = getFeaturesSOD();
result.levelHOTA = true;
result.factionsCount = 10; // + Cove
result.creaturesCount = 162; // + Cove + neutrals
result.artifactsCount = 161; // + HotA artifacts
result.heroesBytes = 24;
result.heroesCount = 179; // + Cove
result.heroesPortraitsCount = 186; // + Cove
return result;
}