1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Renamed army formation enum value

This commit is contained in:
Ivan Savenko
2023-04-10 14:00:34 +03:00
parent b1e7774bbd
commit 5b658462a1
3 changed files with 17 additions and 17 deletions

View File

@@ -421,7 +421,7 @@ void CCreatureSet::setFormation(bool tight)
if (tight)
formation = EArmyFormation::TIGHT;
else
formation = EArmyFormation::WIDE;
formation = EArmyFormation::LOOSE;
}
void CCreatureSet::setStackCount(const SlotID & slot, TQuantity count)

View File

@@ -204,7 +204,7 @@ public:
enum class EArmyFormation : uint8_t
{
WIDE,
LOOSE,
TIGHT
};
@@ -216,7 +216,7 @@ public:
TSlots stacks; //slots[slot_id]->> pair(creature_id,creature_quantity)
EArmyFormation formation = EArmyFormation::WIDE; //0 - wide, 1 - tight
EArmyFormation formation = EArmyFormation::LOOSE; //0 - wide, 1 - tight
CCreatureSet() = default; //Should be here to avoid compile errors
virtual ~CCreatureSet();

View File

@@ -1623,13 +1623,13 @@ CGObjectInstance * CMapLoaderH3M::readHero(const int3 & mapPosition, const Objec
bool hasGarison = reader->readBool();
if(hasGarison)
readCreatureSet(object, 7);
object->formation = static_cast<EArmyFormation>(reader->readUInt8());
assert(object->formation == EArmyFormation::WIDE || object->formation == EArmyFormation::TIGHT);
loadArtifactsOfHero(object);
object->patrol.patrolRadius = reader->readUInt8();
readCreatureSet(object, 7);
object->formation = static_cast<EArmyFormation>(reader->readUInt8());
assert(object->formation == EArmyFormation::LOOSE || object->formation == EArmyFormation::TIGHT);
loadArtifactsOfHero(object);
object->patrol.patrolRadius = reader->readUInt8();
object->patrol.patrolling = (object->patrol.patrolRadius != 0xff);
if(features.levelAB)
@@ -1952,13 +1952,13 @@ CGObjectInstance * CMapLoaderH3M::readTown(const int3 & position, std::shared_pt
bool hasGarrison = reader->readBool();
if(hasGarrison)
readCreatureSet(object, 7);
object->formation = static_cast<EArmyFormation>(reader->readUInt8());
assert(object->formation == EArmyFormation::WIDE || object->formation == EArmyFormation::TIGHT);
bool hasCustomBuildings = reader->readBool();
if(hasCustomBuildings)
readCreatureSet(object, 7);
object->formation = static_cast<EArmyFormation>(reader->readUInt8());
assert(object->formation == EArmyFormation::LOOSE || object->formation == EArmyFormation::TIGHT);
bool hasCustomBuildings = reader->readBool();
if(hasCustomBuildings)
{
reader->readBitmask(object->builtBuildings, features.buildingsBytes, features.buildingsCount, false);
reader->readBitmask(object->forbiddenBuildings, features.buildingsBytes, features.buildingsCount, false);