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:
		| @@ -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) | ||||
|   | ||||
| @@ -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(); | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user