diff --git a/lib/VCMI_lib.cbp b/lib/VCMI_lib.cbp
index f0c645d65..989d3b8ea 100644
--- a/lib/VCMI_lib.cbp
+++ b/lib/VCMI_lib.cbp
@@ -145,6 +145,10 @@
+
+
+
+
@@ -215,10 +219,6 @@
-
-
-
-
diff --git a/lib/VCMI_lib.vcxproj b/lib/VCMI_lib.vcxproj
index fe4756448..707d0d284 100644
--- a/lib/VCMI_lib.vcxproj
+++ b/lib/VCMI_lib.vcxproj
@@ -211,8 +211,8 @@
-
-
+
+
@@ -415,8 +415,8 @@
-
-
+
+
diff --git a/lib/VCMI_lib.vcxproj.filters b/lib/VCMI_lib.vcxproj.filters
index 3262ffbc5..cfa080696 100644
--- a/lib/VCMI_lib.vcxproj.filters
+++ b/lib/VCMI_lib.vcxproj.filters
@@ -267,8 +267,8 @@
-
-
+
+
@@ -686,10 +686,10 @@
Header Files
-
+
Header Files
-
+
Header Files
diff --git a/lib/battle/AccessibilityInfo.cpp b/lib/battle/AccessibilityInfo.cpp
index b45ed9ca8..48b86f9a8 100644
--- a/lib/battle/AccessibilityInfo.cpp
+++ b/lib/battle/AccessibilityInfo.cpp
@@ -7,9 +7,9 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "AccessibilityInfo.h"
-#include "CStack.h"
+#include "../CStack.h"
bool AccessibilityInfo::accessible(BattleHex tile, const CStack * stack) const
{
diff --git a/lib/battle/BattleAction.cpp b/lib/battle/BattleAction.cpp
index d08517401..72c093f6e 100644
--- a/lib/battle/BattleAction.cpp
+++ b/lib/battle/BattleAction.cpp
@@ -8,9 +8,9 @@
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "BattleAction.h"
-#include "CStack.h"
+#include "../CStack.h"
using namespace Battle;
diff --git a/lib/battle/BattleAttackInfo.cpp b/lib/battle/BattleAttackInfo.cpp
index 05fd2c477..e719a7f5f 100644
--- a/lib/battle/BattleAttackInfo.cpp
+++ b/lib/battle/BattleAttackInfo.cpp
@@ -7,9 +7,9 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "BattleAttackInfo.h"
-#include "CStack.h"
+#include "../CStack.h"
BattleAttackInfo::BattleAttackInfo(const CStack * Attacker, const CStack * Defender, bool Shooting)
diff --git a/lib/battle/BattleHex.cpp b/lib/battle/BattleHex.cpp
index 51601ec2a..328257bad 100644
--- a/lib/battle/BattleHex.cpp
+++ b/lib/battle/BattleHex.cpp
@@ -7,7 +7,7 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "BattleHex.h"
BattleHex::BattleHex() : hex(INVALID) {}
diff --git a/lib/battle/BattleInfo.cpp b/lib/battle/BattleInfo.cpp
index 518491b96..f9ea7453f 100644
--- a/lib/battle/BattleInfo.cpp
+++ b/lib/battle/BattleInfo.cpp
@@ -7,13 +7,13 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "BattleInfo.h"
-#include "CStack.h"
-#include "CHeroHandler.h"
-#include "NetPacks.h"
-#include "filesystem/Filesystem.h"
-#include "mapObjects/CGTownInstance.h"
+#include "../CStack.h"
+#include "../CHeroHandler.h"
+#include "../NetPacks.h"
+#include "../filesystem/Filesystem.h"
+#include "../mapObjects/CGTownInstance.h"
const CStack * BattleInfo::getNextStack() const
{
diff --git a/lib/battle/CBattleInfoCallback.cpp b/lib/battle/CBattleInfoCallback.cpp
index 513add877..712b05ffc 100644
--- a/lib/battle/CBattleInfoCallback.cpp
+++ b/lib/battle/CBattleInfoCallback.cpp
@@ -7,13 +7,13 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "CBattleInfoCallback.h"
-#include "CStack.h"
+#include "../CStack.h"
#include "BattleInfo.h"
-#include "NetPacks.h"
-#include "spells/CSpellHandler.h"
-#include "mapObjects/CGTownInstance.h"
+#include "../NetPacks.h"
+#include "../spells/CSpellHandler.h"
+#include "../mapObjects/CGTownInstance.h"
namespace SiegeStuffThatShouldBeMovedToHandlers // <=== TODO
{
diff --git a/lib/battle/CBattleInfoEssentials.cpp b/lib/battle/CBattleInfoEssentials.cpp
index 97edb4d56..1c0e22000 100644
--- a/lib/battle/CBattleInfoEssentials.cpp
+++ b/lib/battle/CBattleInfoEssentials.cpp
@@ -7,12 +7,12 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "CBattleInfoEssentials.h"
-#include "CStack.h"
+#include "../CStack.h"
#include "BattleInfo.h"
-#include "NetPacks.h"
-#include "mapObjects/CGTownInstance.h"
+#include "../NetPacks.h"
+#include "../mapObjects/CGTownInstance.h"
ETerrainType CBattleInfoEssentials::battleTerrainType() const
{
diff --git a/lib/battle/CCallbackBase.cpp b/lib/battle/CCallbackBase.cpp
index fdddaf636..989f95081 100644
--- a/lib/battle/CCallbackBase.cpp
+++ b/lib/battle/CCallbackBase.cpp
@@ -7,10 +7,10 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "CCallbackBase.h"
#include "BattleInfo.h"
-#include "CGameState.h"
+#include "../CGameState.h"
bool CCallbackBase::duringBattle() const
{
diff --git a/lib/battle/CObstacleInstance.cpp b/lib/battle/CObstacleInstance.cpp
index 7c3e34f11..800536708 100644
--- a/lib/battle/CObstacleInstance.cpp
+++ b/lib/battle/CObstacleInstance.cpp
@@ -1,9 +1,9 @@
-#include "StdInc.h"
+#include "../StdInc.h"
#include "CObstacleInstance.h"
-#include "CHeroHandler.h"
-#include "CTownHandler.h"
-#include "VCMI_Lib.h"
-#include "spells/CSpellHandler.h"
+#include "../CHeroHandler.h"
+#include "../CTownHandler.h"
+#include "../VCMI_Lib.h"
+#include "../spells/CSpellHandler.h"
/*
* CObstacleInstance.cpp, part of VCMI engine
diff --git a/lib/battle/CPlayerBattleCallback.cpp b/lib/battle/CPlayerBattleCallback.cpp
index 150a75f38..757e95c8a 100644
--- a/lib/battle/CPlayerBattleCallback.cpp
+++ b/lib/battle/CPlayerBattleCallback.cpp
@@ -7,10 +7,10 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "CPlayerBattleCallback.h"
-#include "CStack.h"
-#include "CGameState.h"
+#include "../CStack.h"
+#include "../CGameState.h"
bool CPlayerBattleCallback::battleCanFlee() const
{
diff --git a/lib/battle/ReachabilityInfo.cpp b/lib/battle/ReachabilityInfo.cpp
index 191ef21a0..eb1c32490 100644
--- a/lib/battle/ReachabilityInfo.cpp
+++ b/lib/battle/ReachabilityInfo.cpp
@@ -8,9 +8,9 @@
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "ReachabilityInfo.h"
-#include "CStack.h"
+#include "../CStack.h"
ReachabilityInfo::Parameters::Parameters()
diff --git a/lib/SideInBattle.cpp b/lib/battle/SideInBattle.cpp
similarity index 75%
rename from lib/SideInBattle.cpp
rename to lib/battle/SideInBattle.cpp
index a0db160f5..baee31d35 100644
--- a/lib/SideInBattle.cpp
+++ b/lib/battle/SideInBattle.cpp
@@ -7,9 +7,9 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "SideInBattle.h"
-#include "mapObjects/CArmedInstance.h"
+#include "../mapObjects/CArmedInstance.h"
SideInBattle::SideInBattle()
{
@@ -20,7 +20,7 @@ SideInBattle::SideInBattle()
enchanterCounter = 0;
}
-void SideInBattle::init(const CGHeroInstance *Hero, const CArmedInstance *Army)
+void SideInBattle::init(const CGHeroInstance * Hero, const CArmedInstance * Army)
{
hero = Hero;
armyObject = Army;
diff --git a/lib/SideInBattle.h b/lib/battle/SideInBattle.h
similarity index 71%
rename from lib/SideInBattle.h
rename to lib/battle/SideInBattle.h
index e2514e844..c70285f15 100644
--- a/lib/SideInBattle.h
+++ b/lib/battle/SideInBattle.h
@@ -8,7 +8,7 @@
*
*/
#pragma once
-#include "GameConstants.h"
+#include "../GameConstants.h"
class CGHeroInstance;
class CArmedInstance;
@@ -16,15 +16,15 @@ class CArmedInstance;
struct DLL_LINKAGE SideInBattle
{
PlayerColor color;
- const CGHeroInstance *hero; //may be NULL if army is not commanded by hero
- const CArmedInstance *armyObject; //adv. map object with army that participates in battle; may be same as hero
+ const CGHeroInstance * hero; //may be NULL if army is not commanded by hero
+ const CArmedInstance * armyObject; //adv. map object with army that participates in battle; may be same as hero
ui8 castSpellsCount; //how many spells each side has cast this turn
std::vector usedSpellsHistory; //every time hero casts spell, it's inserted here -> eagle eye skill
si16 enchanterCounter; //tends to pass through 0, so sign is needed
SideInBattle();
- void init(const CGHeroInstance *Hero, const CArmedInstance *Army);
+ void init(const CGHeroInstance * Hero, const CArmedInstance * Army);
template void serialize(Handler &h, const int version)
diff --git a/lib/SiegeInfo.cpp b/lib/battle/SiegeInfo.cpp
similarity index 56%
rename from lib/SiegeInfo.cpp
rename to lib/battle/SiegeInfo.cpp
index 1d5bf7338..735b2d3f1 100644
--- a/lib/SiegeInfo.cpp
+++ b/lib/battle/SiegeInfo.cpp
@@ -7,13 +7,13 @@
* Full text of license available in license.txt file, in main folder
*
*/
-#include "StdInc.h"
+#include "../StdInc.h"
#include "SiegeInfo.h"
SiegeInfo::SiegeInfo()
{
- for (int i = 0; i < wallState.size(); ++i)
+ for(int i = 0; i < wallState.size(); ++i)
{
wallState[i] = EWallState::NONE;
}
@@ -22,14 +22,18 @@ SiegeInfo::SiegeInfo()
EWallState::EWallState SiegeInfo::applyDamage(EWallState::EWallState state, unsigned int value)
{
- if (value == 0)
+ if(value == 0)
return state;
- switch (applyDamage(state, value - 1))
+ switch(applyDamage(state, value - 1))
{
- case EWallState::INTACT : return EWallState::DAMAGED;
- case EWallState::DAMAGED : return EWallState::DESTROYED;
- case EWallState::DESTROYED : return EWallState::DESTROYED;
- default: return EWallState::NONE;
+ case EWallState::INTACT:
+ return EWallState::DAMAGED;
+ case EWallState::DAMAGED:
+ return EWallState::DESTROYED;
+ case EWallState::DESTROYED:
+ return EWallState::DESTROYED;
+ default:
+ return EWallState::NONE;
}
}
diff --git a/lib/SiegeInfo.h b/lib/battle/SiegeInfo.h
similarity index 91%
rename from lib/SiegeInfo.h
rename to lib/battle/SiegeInfo.h
index c0ceb1401..4d38413ec 100644
--- a/lib/SiegeInfo.h
+++ b/lib/battle/SiegeInfo.h
@@ -8,7 +8,7 @@
*
*/
#pragma once
-#include "GameConstants.h"
+#include "../GameConstants.h"
//only for use in BattleInfo
struct DLL_LINKAGE SiegeInfo