diff --git a/AI/Nullkiller/Analyzers/BuildAnalyzer.cpp b/AI/Nullkiller/Analyzers/BuildAnalyzer.cpp index 1259dd97b..8318718c8 100644 --- a/AI/Nullkiller/Analyzers/BuildAnalyzer.cpp +++ b/AI/Nullkiller/Analyzers/BuildAnalyzer.cpp @@ -9,7 +9,6 @@ */ #include "../StdInc.h" #include "../Engine/Nullkiller.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../Engine/Nullkiller.h" namespace NKAI diff --git a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp index 9b8e891fb..83bb0a02b 100644 --- a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp +++ b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp @@ -8,7 +8,8 @@ * */ #include "../StdInc.h" -#include "lib/mapping/CMap.h" //for victory conditions +#include "DangerHitMapAnalyzer.h" + #include "../Engine/Nullkiller.h" namespace NKAI diff --git a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.h b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.h index 9696d4213..660dfd593 100644 --- a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.h +++ b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.h @@ -14,6 +14,8 @@ namespace NKAI { +struct AIPath; + struct HitMapInfo { static HitMapInfo NoTreat; diff --git a/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp b/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp index 4d09c2971..3aee0dcbf 100644 --- a/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp +++ b/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp @@ -12,7 +12,6 @@ #include "../Goals/ExecuteHeroChain.h" #include "../AIGateway.h" #include "../Engine/Nullkiller.h" -#include "lib/mapping/CMap.h" //for victory conditions namespace NKAI { diff --git a/AI/Nullkiller/Behaviors/BuildingBehavior.cpp b/AI/Nullkiller/Behaviors/BuildingBehavior.cpp index 29868a9ac..2b9fac6d6 100644 --- a/AI/Nullkiller/Behaviors/BuildingBehavior.cpp +++ b/AI/Nullkiller/Behaviors/BuildingBehavior.cpp @@ -15,7 +15,6 @@ #include "../Goals/Composition.h" #include "../Goals/BuildThis.h" #include "../Goals/SaveResources.h" -#include "lib/mapping/CMap.h" //for victory conditions #include "lib/CPathfinder.h" #include "../Engine/Nullkiller.h" diff --git a/AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp b/AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp index 366f5f076..519e66936 100644 --- a/AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp +++ b/AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp @@ -13,7 +13,6 @@ #include "../AIUtility.h" #include "../Goals/BuyArmy.h" #include "../Engine/Nullkiller.h" -#include "lib/mapping/CMap.h" //for victory conditions #include "lib/CPathfinder.h" namespace NKAI diff --git a/AI/Nullkiller/Behaviors/DefenceBehavior.cpp b/AI/Nullkiller/Behaviors/DefenceBehavior.cpp index da5e5f34e..3fafc819d 100644 --- a/AI/Nullkiller/Behaviors/DefenceBehavior.cpp +++ b/AI/Nullkiller/Behaviors/DefenceBehavior.cpp @@ -21,7 +21,6 @@ #include "../Goals/CaptureObject.h" #include "../Markers/DefendTown.h" #include "../Goals/ExchangeSwapTownHeroes.h" -#include "lib/mapping/CMap.h" //for victory conditions #include "lib/CPathfinder.h" namespace NKAI diff --git a/AI/Nullkiller/Behaviors/GatherArmyBehavior.cpp b/AI/Nullkiller/Behaviors/GatherArmyBehavior.cpp index b2005d5f1..d50b6018b 100644 --- a/AI/Nullkiller/Behaviors/GatherArmyBehavior.cpp +++ b/AI/Nullkiller/Behaviors/GatherArmyBehavior.cpp @@ -16,7 +16,6 @@ #include "../Markers/ArmyUpgrade.h" #include "GatherArmyBehavior.h" #include "../AIUtility.h" -#include "lib/mapping/CMap.h" //for victory conditions #include "lib/CPathfinder.h" namespace NKAI diff --git a/AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp b/AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp index 950ce9cd0..81952ad8d 100644 --- a/AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp +++ b/AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp @@ -13,7 +13,6 @@ #include "../AIUtility.h" #include "../Goals/RecruitHero.h" #include "../Goals/ExecuteHeroChain.h" -#include "lib/mapping/CMap.h" //for victory conditions #include "lib/CPathfinder.h" namespace NKAI diff --git a/AI/Nullkiller/Behaviors/StartupBehavior.cpp b/AI/Nullkiller/Behaviors/StartupBehavior.cpp index 448b2386e..e29f29cb7 100644 --- a/AI/Nullkiller/Behaviors/StartupBehavior.cpp +++ b/AI/Nullkiller/Behaviors/StartupBehavior.cpp @@ -15,7 +15,6 @@ #include "../Goals/RecruitHero.h" #include "../Goals/ExecuteHeroChain.h" #include "../Goals/ExchangeSwapTownHeroes.h" -#include "lib/mapping/CMap.h" //for victory conditions #include "lib/mapObjects/MapObjects.h" //for victory conditions #include "lib/CPathfinder.h" #include "../Engine/Nullkiller.h" diff --git a/AI/Nullkiller/Goals/AbstractGoal.cpp b/AI/Nullkiller/Goals/AbstractGoal.cpp index 0c42bae84..c63482230 100644 --- a/AI/Nullkiller/Goals/AbstractGoal.cpp +++ b/AI/Nullkiller/Goals/AbstractGoal.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "AbstractGoal.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/Nullkiller/Goals/AdventureSpellCast.cpp b/AI/Nullkiller/Goals/AdventureSpellCast.cpp index c5d44f577..41b2764dc 100644 --- a/AI/Nullkiller/Goals/AdventureSpellCast.cpp +++ b/AI/Nullkiller/Goals/AdventureSpellCast.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "AdventureSpellCast.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" namespace NKAI diff --git a/AI/Nullkiller/Goals/BuildBoat.cpp b/AI/Nullkiller/Goals/BuildBoat.cpp index 8c28b43f9..23a031939 100644 --- a/AI/Nullkiller/Goals/BuildBoat.cpp +++ b/AI/Nullkiller/Goals/BuildBoat.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "BuildBoat.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../Behaviors/CaptureObjectsBehavior.h" diff --git a/AI/Nullkiller/Goals/BuildThis.cpp b/AI/Nullkiller/Goals/BuildThis.cpp index 8f411ab68..102e72f59 100644 --- a/AI/Nullkiller/Goals/BuildThis.cpp +++ b/AI/Nullkiller/Goals/BuildThis.cpp @@ -11,7 +11,6 @@ #include "BuildThis.h" #include "../AIGateway.h" #include "../AIUtility.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/Nullkiller/Goals/CompleteQuest.cpp b/AI/Nullkiller/Goals/CompleteQuest.cpp index 9a83c69a7..cbffabad2 100644 --- a/AI/Nullkiller/Goals/CompleteQuest.cpp +++ b/AI/Nullkiller/Goals/CompleteQuest.cpp @@ -11,7 +11,6 @@ #include "CompleteQuest.h" #include "../Behaviors/CaptureObjectsBehavior.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/VCMI_Lib.h" #include "../../../lib/CGeneralTextHandler.h" diff --git a/AI/Nullkiller/Goals/Composition.cpp b/AI/Nullkiller/Goals/Composition.cpp index caaef64b7..3d54e1fdf 100644 --- a/AI/Nullkiller/Goals/Composition.cpp +++ b/AI/Nullkiller/Goals/Composition.cpp @@ -11,7 +11,6 @@ #include "Composition.h" #include "../AIGateway.h" #include "../AIUtility.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/Nullkiller/Goals/DismissHero.cpp b/AI/Nullkiller/Goals/DismissHero.cpp index 09d5ceab5..303c502b3 100644 --- a/AI/Nullkiller/Goals/DismissHero.cpp +++ b/AI/Nullkiller/Goals/DismissHero.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "DismissHero.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" namespace NKAI diff --git a/AI/Nullkiller/Goals/ExchangeSwapTownHeroes.cpp b/AI/Nullkiller/Goals/ExchangeSwapTownHeroes.cpp index d18975550..7ca29c847 100644 --- a/AI/Nullkiller/Goals/ExchangeSwapTownHeroes.cpp +++ b/AI/Nullkiller/Goals/ExchangeSwapTownHeroes.cpp @@ -11,7 +11,6 @@ #include "ExchangeSwapTownHeroes.h" #include "ExecuteHeroChain.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../Engine/Nullkiller.h" diff --git a/AI/Nullkiller/Goals/ExecuteHeroChain.cpp b/AI/Nullkiller/Goals/ExecuteHeroChain.cpp index 4268a5296..c9cbe04a9 100644 --- a/AI/Nullkiller/Goals/ExecuteHeroChain.cpp +++ b/AI/Nullkiller/Goals/ExecuteHeroChain.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "ExecuteHeroChain.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../Engine/Nullkiller.h" diff --git a/AI/Nullkiller/Goals/RecruitHero.cpp b/AI/Nullkiller/Goals/RecruitHero.cpp index ab596f801..d84ef002e 100644 --- a/AI/Nullkiller/Goals/RecruitHero.cpp +++ b/AI/Nullkiller/Goals/RecruitHero.cpp @@ -11,7 +11,6 @@ #include "Goals.h" #include "../AIGateway.h" #include "../AIUtility.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/Nullkiller/Goals/SaveResources.cpp b/AI/Nullkiller/Goals/SaveResources.cpp index 42ed04c52..46f5cfe44 100644 --- a/AI/Nullkiller/Goals/SaveResources.cpp +++ b/AI/Nullkiller/Goals/SaveResources.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "SaveResources.h" #include "../AIGateway.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../Behaviors/CaptureObjectsBehavior.h" diff --git a/AI/Nullkiller/Pathfinding/Actions/BattleAction.cpp b/AI/Nullkiller/Pathfinding/Actions/BattleAction.cpp index 70a4b1063..b85bff624 100644 --- a/AI/Nullkiller/Pathfinding/Actions/BattleAction.cpp +++ b/AI/Nullkiller/Pathfinding/Actions/BattleAction.cpp @@ -12,7 +12,6 @@ #include "BattleAction.h" #include "../../AIGateway.h" #include "../../Goals/CompleteQuest.h" -#include "../../../../lib/mapping/CMap.h" //for victory conditions namespace NKAI { diff --git a/AI/Nullkiller/Pathfinding/Actions/BoatActions.cpp b/AI/Nullkiller/Pathfinding/Actions/BoatActions.cpp index 214c0d366..e80ee0e03 100644 --- a/AI/Nullkiller/Pathfinding/Actions/BoatActions.cpp +++ b/AI/Nullkiller/Pathfinding/Actions/BoatActions.cpp @@ -14,7 +14,6 @@ #include "../../Goals/CaptureObject.h" #include "../../Goals/Invalid.h" #include "../../Goals/BuildBoat.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" #include "BoatActions.h" diff --git a/AI/Nullkiller/Pathfinding/Actions/BoatActions.h b/AI/Nullkiller/Pathfinding/Actions/BoatActions.h index a1634b09b..92249eb78 100644 --- a/AI/Nullkiller/Pathfinding/Actions/BoatActions.h +++ b/AI/Nullkiller/Pathfinding/Actions/BoatActions.h @@ -11,7 +11,6 @@ #pragma once #include "SpecialAction.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace NKAI diff --git a/AI/Nullkiller/Pathfinding/Actions/BuyArmyAction.cpp b/AI/Nullkiller/Pathfinding/Actions/BuyArmyAction.cpp index 27d3b1cfa..683f42246 100644 --- a/AI/Nullkiller/Pathfinding/Actions/BuyArmyAction.cpp +++ b/AI/Nullkiller/Pathfinding/Actions/BuyArmyAction.cpp @@ -12,7 +12,6 @@ #include "BuyArmyAction.h" #include "../../AIGateway.h" #include "../../Goals/CompleteQuest.h" -#include "../../../../lib/mapping/CMap.h" //for victory conditions namespace NKAI { diff --git a/AI/Nullkiller/Pathfinding/Actions/QuestAction.cpp b/AI/Nullkiller/Pathfinding/Actions/QuestAction.cpp index 5deb87e7b..a552ff2af 100644 --- a/AI/Nullkiller/Pathfinding/Actions/QuestAction.cpp +++ b/AI/Nullkiller/Pathfinding/Actions/QuestAction.cpp @@ -12,7 +12,6 @@ #include "QuestAction.h" #include "../../AIGateway.h" #include "../../Goals/CompleteQuest.h" -#include "../../../../lib/mapping/CMap.h" //for victory conditions namespace NKAI { diff --git a/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.cpp b/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.cpp index 25c2acc5c..2304e39dd 100644 --- a/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.cpp +++ b/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "../../Goals/AdventureSpellCast.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" #include "TownPortalAction.h" diff --git a/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.h b/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.h index 1afc58cb6..cfb43cc70 100644 --- a/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.h +++ b/AI/Nullkiller/Pathfinding/Actions/TownPortalAction.h @@ -11,7 +11,6 @@ #pragma once #include "SpecialAction.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" #include "../../Goals/AdventureSpellCast.h" diff --git a/AI/Nullkiller/Pathfinding/Actors.cpp b/AI/Nullkiller/Pathfinding/Actors.cpp index 0721e6f3f..92a53b0cd 100644 --- a/AI/Nullkiller/Pathfinding/Actors.cpp +++ b/AI/Nullkiller/Pathfinding/Actors.cpp @@ -12,7 +12,6 @@ #include "../AIGateway.h" #include "../Engine/Nullkiller.h" #include "../../../CCallback.h" -#include "../../../lib/mapping/CMap.h" #include "../../../lib/mapObjects/MapObjects.h" #include "Actions/BuyArmyAction.h" diff --git a/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h b/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h index dd79f1b53..c1b57b530 100644 --- a/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h +++ b/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h @@ -14,7 +14,6 @@ #include "../../AIGateway.h" #include "../Actions/BoatActions.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace NKAI diff --git a/AI/Nullkiller/Pathfinding/Rules/AIMovementAfterDestinationRule.h b/AI/Nullkiller/Pathfinding/Rules/AIMovementAfterDestinationRule.h index 31c0b1449..27cde5494 100644 --- a/AI/Nullkiller/Pathfinding/Rules/AIMovementAfterDestinationRule.h +++ b/AI/Nullkiller/Pathfinding/Rules/AIMovementAfterDestinationRule.h @@ -13,7 +13,6 @@ #include "../AINodeStorage.h" #include "../../AIGateway.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace NKAI diff --git a/AI/Nullkiller/Pathfinding/Rules/AIMovementToDestinationRule.h b/AI/Nullkiller/Pathfinding/Rules/AIMovementToDestinationRule.h index 1ae5ff862..65cfa4678 100644 --- a/AI/Nullkiller/Pathfinding/Rules/AIMovementToDestinationRule.h +++ b/AI/Nullkiller/Pathfinding/Rules/AIMovementToDestinationRule.h @@ -13,7 +13,6 @@ #include "../AINodeStorage.h" #include "../../AIGateway.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace NKAI diff --git a/AI/Nullkiller/Pathfinding/Rules/AIPreviousNodeRule.h b/AI/Nullkiller/Pathfinding/Rules/AIPreviousNodeRule.h index c337827e7..22b4ef89c 100644 --- a/AI/Nullkiller/Pathfinding/Rules/AIPreviousNodeRule.h +++ b/AI/Nullkiller/Pathfinding/Rules/AIPreviousNodeRule.h @@ -13,7 +13,6 @@ #include "../AINodeStorage.h" #include "../../AIGateway.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace NKAI diff --git a/AI/VCAI/Goals/AbstractGoal.cpp b/AI/VCAI/Goals/AbstractGoal.cpp index 3ea9d1d76..8275b89ee 100644 --- a/AI/VCAI/Goals/AbstractGoal.cpp +++ b/AI/VCAI/Goals/AbstractGoal.cpp @@ -14,7 +14,6 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/AdventureSpellCast.cpp b/AI/VCAI/Goals/AdventureSpellCast.cpp index b0c49ff81..cd78ea671 100644 --- a/AI/VCAI/Goals/AdventureSpellCast.cpp +++ b/AI/VCAI/Goals/AdventureSpellCast.cpp @@ -12,7 +12,7 @@ #include "../VCAI.h" #include "../FuzzyHelper.h" #include "../AIhelper.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapObjects/CGTownInstance.h" #include "../../../lib/CPathfinder.h" extern boost::thread_specific_ptr cb; diff --git a/AI/VCAI/Goals/Build.cpp b/AI/VCAI/Goals/Build.cpp index 66eb13f40..c0d0e5155 100644 --- a/AI/VCAI/Goals/Build.cpp +++ b/AI/VCAI/Goals/Build.cpp @@ -16,7 +16,7 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapObjects/CGTownInstance.h" #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/BuildBoat.cpp b/AI/VCAI/Goals/BuildBoat.cpp index dce6e8c89..f5828005f 100644 --- a/AI/VCAI/Goals/BuildBoat.cpp +++ b/AI/VCAI/Goals/BuildBoat.cpp @@ -12,7 +12,6 @@ #include "../VCAI.h" #include "../FuzzyHelper.h" #include "../AIhelper.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" extern boost::thread_specific_ptr cb; diff --git a/AI/VCAI/Goals/BuildThis.cpp b/AI/VCAI/Goals/BuildThis.cpp index 68145538f..5223ed39c 100644 --- a/AI/VCAI/Goals/BuildThis.cpp +++ b/AI/VCAI/Goals/BuildThis.cpp @@ -15,7 +15,7 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapObjects/CGTownInstance.h" #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/CollectRes.cpp b/AI/VCAI/Goals/CollectRes.cpp index 49742fdce..976f26143 100644 --- a/AI/VCAI/Goals/CollectRes.cpp +++ b/AI/VCAI/Goals/CollectRes.cpp @@ -15,7 +15,7 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapObjects/CGMarket.h" #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/CompleteQuest.cpp b/AI/VCAI/Goals/CompleteQuest.cpp index 571ed9e1c..ff02c9adb 100644 --- a/AI/VCAI/Goals/CompleteQuest.cpp +++ b/AI/VCAI/Goals/CompleteQuest.cpp @@ -12,7 +12,7 @@ #include "../VCAI.h" #include "../FuzzyHelper.h" #include "../AIhelper.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapObjects/CQuest.h" #include "../../../lib/CPathfinder.h" extern boost::thread_specific_ptr cb; diff --git a/AI/VCAI/Goals/Conquer.cpp b/AI/VCAI/Goals/Conquer.cpp index 8ac127dc1..c6808fe4f 100644 --- a/AI/VCAI/Goals/Conquer.cpp +++ b/AI/VCAI/Goals/Conquer.cpp @@ -15,7 +15,6 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/Explore.cpp b/AI/VCAI/Goals/Explore.cpp index 89b97da1c..0300a6105 100644 --- a/AI/VCAI/Goals/Explore.cpp +++ b/AI/VCAI/Goals/Explore.cpp @@ -15,7 +15,6 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" #include "../../../lib/CPlayerState.h" diff --git a/AI/VCAI/Goals/GatherArmy.cpp b/AI/VCAI/Goals/GatherArmy.cpp index 34c6c78d5..a226a99c6 100644 --- a/AI/VCAI/Goals/GatherArmy.cpp +++ b/AI/VCAI/Goals/GatherArmy.cpp @@ -15,7 +15,7 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapObjects/CGTownInstance.h" #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/GatherTroops.cpp b/AI/VCAI/Goals/GatherTroops.cpp index d4c884c71..f2f2a28b4 100644 --- a/AI/VCAI/Goals/GatherTroops.cpp +++ b/AI/VCAI/Goals/GatherTroops.cpp @@ -15,7 +15,7 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapObjects/CGTownInstance.h" #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/RecruitHero.cpp b/AI/VCAI/Goals/RecruitHero.cpp index 314efb3b6..f40b66d6a 100644 --- a/AI/VCAI/Goals/RecruitHero.cpp +++ b/AI/VCAI/Goals/RecruitHero.cpp @@ -15,7 +15,6 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/VisitHero.cpp b/AI/VCAI/Goals/VisitHero.cpp index 2638880e5..efb4840d3 100644 --- a/AI/VCAI/Goals/VisitHero.cpp +++ b/AI/VCAI/Goals/VisitHero.cpp @@ -17,8 +17,6 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions - extern boost::thread_specific_ptr cb; extern boost::thread_specific_ptr ai; diff --git a/AI/VCAI/Goals/VisitObj.cpp b/AI/VCAI/Goals/VisitObj.cpp index 91d0d887d..ec5ad68df 100644 --- a/AI/VCAI/Goals/VisitObj.cpp +++ b/AI/VCAI/Goals/VisitObj.cpp @@ -15,7 +15,6 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/VisitTile.cpp b/AI/VCAI/Goals/VisitTile.cpp index c804a2800..70c05a6f8 100644 --- a/AI/VCAI/Goals/VisitTile.cpp +++ b/AI/VCAI/Goals/VisitTile.cpp @@ -15,7 +15,6 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Goals/Win.cpp b/AI/VCAI/Goals/Win.cpp index 5fc7a4bc3..2cbe511ca 100644 --- a/AI/VCAI/Goals/Win.cpp +++ b/AI/VCAI/Goals/Win.cpp @@ -15,7 +15,8 @@ #include "../FuzzyHelper.h" #include "../ResourceManager.h" #include "../BuildingManager.h" -#include "../../../lib/mapping/CMap.h" //for victory conditions +#include "../../../lib/mapping/CMapHeader.h" //for victory conditions +#include "../../../lib/mapObjects/CGTownInstance.h" #include "../../../lib/CPathfinder.h" #include "../../../lib/StringConstants.h" diff --git a/AI/VCAI/Pathfinding/AIPathfinder.cpp b/AI/VCAI/Pathfinding/AIPathfinder.cpp index 0b52a9ece..5c5f1e644 100644 --- a/AI/VCAI/Pathfinding/AIPathfinder.cpp +++ b/AI/VCAI/Pathfinding/AIPathfinder.cpp @@ -11,7 +11,7 @@ #include "AIPathfinder.h" #include "AIPathfinderConfig.h" #include "../../../CCallback.h" -#include "../../../lib/mapping/CMap.h" +#include "../../../lib/mapping/CMapDefines.h" std::vector> AIPathfinder::storagePool; std::map> AIPathfinder::storageMap; diff --git a/AI/VCAI/Pathfinding/Actions/BoatActions.cpp b/AI/VCAI/Pathfinding/Actions/BoatActions.cpp index f6077d3f0..50df68395 100644 --- a/AI/VCAI/Pathfinding/Actions/BoatActions.cpp +++ b/AI/VCAI/Pathfinding/Actions/BoatActions.cpp @@ -11,7 +11,6 @@ #include "StdInc.h" #include "../../Goals/AdventureSpellCast.h" #include "../../Goals/BuildBoat.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" #include "BoatActions.h" @@ -58,4 +57,4 @@ namespace AIPathfinding return hero->getSpellCost(summonBoat.toSpell()); } -} \ No newline at end of file +} diff --git a/AI/VCAI/Pathfinding/Actions/BoatActions.h b/AI/VCAI/Pathfinding/Actions/BoatActions.h index 7ac594488..114478fcb 100644 --- a/AI/VCAI/Pathfinding/Actions/BoatActions.h +++ b/AI/VCAI/Pathfinding/Actions/BoatActions.h @@ -11,7 +11,6 @@ #pragma once #include "ISpecialAction.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace AIPathfinding @@ -69,4 +68,4 @@ namespace AIPathfinding virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override; }; -} \ No newline at end of file +} diff --git a/AI/VCAI/Pathfinding/Actions/TownPortalAction.cpp b/AI/VCAI/Pathfinding/Actions/TownPortalAction.cpp index 99a195069..6063f12c5 100644 --- a/AI/VCAI/Pathfinding/Actions/TownPortalAction.cpp +++ b/AI/VCAI/Pathfinding/Actions/TownPortalAction.cpp @@ -10,7 +10,6 @@ #include "StdInc.h" #include "../../Goals/AdventureSpellCast.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" #include "TownPortalAction.h" @@ -21,4 +20,4 @@ Goals::TSubgoal TownPortalAction::whatToDo(const HeroPtr & hero) const const CGTownInstance * targetTown = target; // const pointer is not allowed in settown return Goals::sptr(Goals::AdventureSpellCast(hero, SpellID::TOWN_PORTAL).settown(targetTown).settile(targetTown->visitablePos())); -} \ No newline at end of file +} diff --git a/AI/VCAI/Pathfinding/Actions/TownPortalAction.h b/AI/VCAI/Pathfinding/Actions/TownPortalAction.h index f8e0c81af..8d587e052 100644 --- a/AI/VCAI/Pathfinding/Actions/TownPortalAction.h +++ b/AI/VCAI/Pathfinding/Actions/TownPortalAction.h @@ -11,7 +11,6 @@ #pragma once #include "ISpecialAction.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" #include "../../Goals/AdventureSpellCast.h" @@ -30,4 +29,4 @@ namespace AIPathfinding virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override; }; -} \ No newline at end of file +} diff --git a/AI/VCAI/Pathfinding/PathfindingManager.cpp b/AI/VCAI/Pathfinding/PathfindingManager.cpp index 615d68096..e418a6dd3 100644 --- a/AI/VCAI/Pathfinding/PathfindingManager.cpp +++ b/AI/VCAI/Pathfinding/PathfindingManager.cpp @@ -13,7 +13,8 @@ #include "AIPathfinderConfig.h" #include "../Goals/Goals.h" #include "../../../lib/CGameInfoCallback.h" -#include "../../../lib/mapping/CMap.h" +#include "../../../lib/mapping/CMapDefines.h" +#include "../../../lib/mapObjects/CQuest.h" PathfindingManager::PathfindingManager(CPlayerSpecificInfoCallback * CB, VCAI * AI) : ai(AI), cb(CB) diff --git a/AI/VCAI/Pathfinding/Rules/AILayerTransitionRule.h b/AI/VCAI/Pathfinding/Rules/AILayerTransitionRule.h index 804722842..033e2e1a4 100644 --- a/AI/VCAI/Pathfinding/Rules/AILayerTransitionRule.h +++ b/AI/VCAI/Pathfinding/Rules/AILayerTransitionRule.h @@ -14,7 +14,6 @@ #include "../../VCAI.h" #include "../Actions/BoatActions.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace AIPathfinding diff --git a/AI/VCAI/Pathfinding/Rules/AIMovementAfterDestinationRule.h b/AI/VCAI/Pathfinding/Rules/AIMovementAfterDestinationRule.h index b8d87e602..639bfe55e 100644 --- a/AI/VCAI/Pathfinding/Rules/AIMovementAfterDestinationRule.h +++ b/AI/VCAI/Pathfinding/Rules/AIMovementAfterDestinationRule.h @@ -13,7 +13,6 @@ #include "../AINodeStorage.h" #include "../../VCAI.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace AIPathfinding diff --git a/AI/VCAI/Pathfinding/Rules/AIMovementToDestinationRule.h b/AI/VCAI/Pathfinding/Rules/AIMovementToDestinationRule.h index 6f0e8ac01..58c535c60 100644 --- a/AI/VCAI/Pathfinding/Rules/AIMovementToDestinationRule.h +++ b/AI/VCAI/Pathfinding/Rules/AIMovementToDestinationRule.h @@ -13,7 +13,6 @@ #include "../AINodeStorage.h" #include "../../VCAI.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace AIPathfinding diff --git a/AI/VCAI/Pathfinding/Rules/AIPreviousNodeRule.h b/AI/VCAI/Pathfinding/Rules/AIPreviousNodeRule.h index d97aa53b5..bb3945c8b 100644 --- a/AI/VCAI/Pathfinding/Rules/AIPreviousNodeRule.h +++ b/AI/VCAI/Pathfinding/Rules/AIPreviousNodeRule.h @@ -13,7 +13,6 @@ #include "../AINodeStorage.h" #include "../../VCAI.h" #include "../../../../CCallback.h" -#include "../../../../lib/mapping/CMap.h" #include "../../../../lib/mapObjects/MapObjects.h" namespace AIPathfinding diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index bab146d6c..413e80593 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -53,13 +53,14 @@ #include "../lib/spells/CSpellHandler.h" #include "../lib/CTownHandler.h" #include "../lib/mapObjects/CObjectClassesHandler.h" // For displaying correct UI when interacting with objects +#include "../lib/mapObjects/CGTownInstance.h" +#include "../lib/mapObjects/MiscObjects.h" #include "../lib/CStack.h" #include "../lib/JsonNode.h" #include "CMusicHandler.h" #include "../lib/CondSh.h" #include "../lib/NetPacksBase.h" #include "../lib/NetPacks.h"//todo: remove -#include "../lib/mapping/CMap.h" #include "../lib/VCMIDirs.h" #include "../lib/CStopWatch.h" #include "../lib/StartInfo.h" diff --git a/client/CServerHandler.cpp b/client/CServerHandler.cpp index cbafa8fad..eb7c3b031 100644 --- a/client/CServerHandler.cpp +++ b/client/CServerHandler.cpp @@ -42,7 +42,6 @@ #include "../lib/StartInfo.h" #include "../lib/VCMIDirs.h" #include "../lib/mapping/CCampaignHandler.h" -#include "../lib/mapping/CMap.h" #include "../lib/mapping/CMapInfo.h" #include "../lib/mapObjects/MiscObjects.h" #include "../lib/rmg/CMapGenOptions.h" diff --git a/client/adventureMap/AdventureMapInterface.cpp b/client/adventureMap/AdventureMapInterface.cpp index 174a37c13..77d36d2ec 100644 --- a/client/adventureMap/AdventureMapInterface.cpp +++ b/client/adventureMap/AdventureMapInterface.cpp @@ -37,8 +37,9 @@ #include "../../lib/CGeneralTextHandler.h" #include "../../lib/spells/CSpellHandler.h" #include "../../lib/mapObjects/CGHeroInstance.h" +#include "../../lib/mapObjects/CGTownInstance.h" #include "../../lib/CPathfinder.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapDefines.h" std::shared_ptr adventureInt; diff --git a/client/lobby/CCampaignInfoScreen.cpp b/client/lobby/CCampaignInfoScreen.cpp index a686b5b47..56183b31c 100644 --- a/client/lobby/CCampaignInfoScreen.cpp +++ b/client/lobby/CCampaignInfoScreen.cpp @@ -15,7 +15,7 @@ #include "../../lib/CGeneralTextHandler.h" #include "../../lib/StartInfo.h" #include "../../lib/mapping/CMapInfo.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapHeader.h" #include "../gui/CGuiHandler.h" #include "../CGameInfo.h" #include "../CPlayerInterface.h" diff --git a/client/lobby/CSavingScreen.cpp b/client/lobby/CSavingScreen.cpp index 11392a6e6..e5ca83b55 100644 --- a/client/lobby/CSavingScreen.cpp +++ b/client/lobby/CSavingScreen.cpp @@ -25,7 +25,7 @@ #include "../../lib/StartInfo.h" #include "../../lib/filesystem/Filesystem.h" #include "../../lib/mapping/CMapInfo.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapHeader.h" CSavingScreen::CSavingScreen() : CSelectionBase(ESelectionScreen::saveGame) diff --git a/client/lobby/CScenarioInfoScreen.cpp b/client/lobby/CScenarioInfoScreen.cpp index 0223337df..acccf2da4 100644 --- a/client/lobby/CScenarioInfoScreen.cpp +++ b/client/lobby/CScenarioInfoScreen.cpp @@ -23,7 +23,7 @@ #include "../../lib/CGeneralTextHandler.h" #include "../../lib/StartInfo.h" #include "../../lib/mapping/CMapInfo.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapHeader.h" CScenarioInfoScreen::CScenarioInfoScreen() { diff --git a/client/lobby/CSelectionBase.cpp b/client/lobby/CSelectionBase.cpp index b2020a2b0..ab58f2a86 100644 --- a/client/lobby/CSelectionBase.cpp +++ b/client/lobby/CSelectionBase.cpp @@ -43,7 +43,7 @@ #include "../../lib/CThreadHelper.h" #include "../../lib/filesystem/Filesystem.h" #include "../../lib/mapping/CMapInfo.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapHeader.h" #include "../../lib/serializer/Connection.h" ISelectionScreenInfo::ISelectionScreenInfo(ESelectionScreen ScreenType) diff --git a/client/lobby/OptionsTab.cpp b/client/lobby/OptionsTab.cpp index 0b32dda1a..af87207f0 100644 --- a/client/lobby/OptionsTab.cpp +++ b/client/lobby/OptionsTab.cpp @@ -29,8 +29,8 @@ #include "../../lib/CArtHandler.h" #include "../../lib/CTownHandler.h" #include "../../lib/CHeroHandler.h" -#include "../../lib/mapping/CMap.h" #include "../../lib/mapping/CMapInfo.h" +#include "../../lib/mapping/CMapHeader.h" OptionsTab::OptionsTab() : humanPlayers(0) { diff --git a/client/lobby/RandomMapTab.cpp b/client/lobby/RandomMapTab.cpp index eac1d79dd..c203d903c 100644 --- a/client/lobby/RandomMapTab.cpp +++ b/client/lobby/RandomMapTab.cpp @@ -27,7 +27,7 @@ #include "../../lib/CGeneralTextHandler.h" #include "../../lib/mapping/CMapInfo.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapHeader.h" #include "../../lib/mapping/MapFormat.h" #include "../../lib/rmg/CMapGenOptions.h" #include "../../lib/CModHandler.h" diff --git a/client/lobby/SelectionTab.cpp b/client/lobby/SelectionTab.cpp index c07b366bd..5aeb71ca4 100644 --- a/client/lobby/SelectionTab.cpp +++ b/client/lobby/SelectionTab.cpp @@ -36,7 +36,7 @@ #include "../../lib/GameSettings.h" #include "../../lib/filesystem/Filesystem.h" #include "../../lib/mapping/CMapInfo.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapHeader.h" #include "../../lib/mapping/MapFormat.h" #include "../../lib/mapping/CCampaignHandler.h" #include "../../lib/serializer/Connection.h" diff --git a/client/mainmenu/CMainMenu.cpp b/client/mainmenu/CMainMenu.cpp index 6d2cda6ff..c3971b13f 100644 --- a/client/mainmenu/CMainMenu.cpp +++ b/client/mainmenu/CMainMenu.cpp @@ -46,7 +46,6 @@ #include "../../lib/filesystem/Filesystem.h" #include "../../lib/filesystem/CCompressedStream.h" #include "../../lib/VCMIDirs.h" -#include "../../lib/mapping/CMap.h" #include "../../lib/CStopWatch.h" #include "../../lib/NetPacksLobby.h" #include "../../lib/CThreadHelper.h" diff --git a/client/mapView/MapRenderer.cpp b/client/mapView/MapRenderer.cpp index 8098ea7bf..80057ea7d 100644 --- a/client/mapView/MapRenderer.cpp +++ b/client/mapView/MapRenderer.cpp @@ -27,7 +27,7 @@ #include "../../lib/TerrainHandler.h" #include "../../lib/mapObjects/CGHeroInstance.h" #include "../../lib/mapObjects/MiscObjects.h" -#include "../../lib/mapping/CMap.h" +#include "../../lib/mapping/CMapDefines.h" struct NeighborTilesInfo { diff --git a/client/mapView/MapView.cpp b/client/mapView/MapView.cpp index 06d3d7cc6..8779c5176 100644 --- a/client/mapView/MapView.cpp +++ b/client/mapView/MapView.cpp @@ -30,7 +30,6 @@ #include "../../lib/CConfigHandler.h" #include "../../lib/mapObjects/CGHeroInstance.h" -#include "../../lib/mapping/CMap.h" BasicMapView::~BasicMapView() = default; diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index 4b76528a8..1ab9d3d26 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -46,6 +46,7 @@ #include "../../CCallback.h" #include "../lib/mapObjects/CGHeroInstance.h" +#include "../lib/mapObjects/CGTownInstance.h" #include "../lib/CArtHandler.h" #include "../lib/CBuildingHandler.h" #include "../lib/CConfigHandler.h" @@ -63,7 +64,6 @@ #include "../lib/CTownHandler.h" #include "../lib/GameConstants.h" #include "../lib/bonuses/Bonus.h" -#include "../lib/mapping/CMap.h" #include "../lib/NetPacksBase.h" #include "../lib/StartInfo.h" #include "../lib/TextOperations.h" diff --git a/lib/StartInfo.cpp b/lib/StartInfo.cpp index 071c8dc14..44f0050c3 100644 --- a/lib/StartInfo.cpp +++ b/lib/StartInfo.cpp @@ -12,10 +12,11 @@ #include "CGeneralTextHandler.h" #include "CModHandler.h" +#include "VCMI_Lib.h" #include "rmg/CMapGenOptions.h" #include "mapping/CMapInfo.h" #include "mapping/CCampaignHandler.h" -#include "mapping/CMap.h" +#include "mapping/CMapHeader.h" #include "mapping/CMapService.h" VCMI_LIB_NAMESPACE_BEGIN diff --git a/lib/mapObjects/CommonConstructors.cpp b/lib/mapObjects/CommonConstructors.cpp index b13d3ade5..43b7eb5d7 100644 --- a/lib/mapObjects/CommonConstructors.cpp +++ b/lib/mapObjects/CommonConstructors.cpp @@ -14,7 +14,7 @@ #include "CGHeroInstance.h" #include "CBank.h" #include "../TerrainHandler.h" -#include "../mapping/CMap.h" +#include "../mapping/CMapDefines.h" #include "../CHeroHandler.h" #include "../CGeneralTextHandler.h" #include "../CCreatureHandler.h" diff --git a/lib/mapping/CMapEditManager.cpp b/lib/mapping/CMapEditManager.cpp index ed6e6b3aa..650205aac 100644 --- a/lib/mapping/CMapEditManager.cpp +++ b/lib/mapping/CMapEditManager.cpp @@ -15,7 +15,6 @@ #include "../mapObjects/CGHeroInstance.h" #include "../VCMI_Lib.h" #include "CDrawRoadsOperation.h" -#include "../mapping/CMap.h" #include "CMapOperation.h" VCMI_LIB_NAMESPACE_BEGIN diff --git a/lib/mapping/CMapInfo.cpp b/lib/mapping/CMapInfo.cpp index 67cf3ebc7..61fe20123 100644 --- a/lib/mapping/CMapInfo.cpp +++ b/lib/mapping/CMapInfo.cpp @@ -14,7 +14,7 @@ #include "../StartInfo.h" #include "../GameConstants.h" #include "CMapService.h" -#include "CMap.h" +#include "CMapHeader.h" #include "CCampaignHandler.h" #include "MapFormat.h" diff --git a/lib/mapping/CMapService.cpp b/lib/mapping/CMapService.cpp index 91cb833c3..105fb3377 100644 --- a/lib/mapping/CMapService.cpp +++ b/lib/mapping/CMapService.cpp @@ -17,6 +17,7 @@ #include "../filesystem/CMemoryBuffer.h" #include "../CModHandler.h" #include "../Languages.h" +#include "../VCMI_Lib.h" #include "CMap.h" #include "MapFormat.h" diff --git a/lib/mapping/MapFeaturesH3M.cpp b/lib/mapping/MapFeaturesH3M.cpp index 4ec517d8d..3cdf44b41 100644 --- a/lib/mapping/MapFeaturesH3M.cpp +++ b/lib/mapping/MapFeaturesH3M.cpp @@ -11,7 +11,6 @@ #include "StdInc.h" #include "MapFeaturesH3M.h" -#include "CMap.h" #include "MapFormat.h" VCMI_LIB_NAMESPACE_BEGIN diff --git a/lib/mapping/MapReaderH3M.cpp b/lib/mapping/MapReaderH3M.cpp index 3277e310a..42aff1077 100644 --- a/lib/mapping/MapReaderH3M.cpp +++ b/lib/mapping/MapReaderH3M.cpp @@ -12,7 +12,7 @@ #include "MapReaderH3M.h" #include "../filesystem/CBinaryReader.h" -#include "CMap.h" +#include "../int3.h" VCMI_LIB_NAMESPACE_BEGIN diff --git a/lib/registerTypes/RegisterTypes.cpp b/lib/registerTypes/RegisterTypes.cpp index 94b8436e5..3970abe57 100644 --- a/lib/registerTypes/RegisterTypes.cpp +++ b/lib/registerTypes/RegisterTypes.cpp @@ -14,7 +14,6 @@ #include "../mapping/CMapInfo.h" #include "../StartInfo.h" #include "../CGameState.h" -#include "../mapping/CMap.h" #include "../mapObjects/CObjectHandler.h" #include "../CCreatureHandler.h" #include "../spells/CSpellHandler.h" diff --git a/lib/registerTypes/TypesClientPacks1.cpp b/lib/registerTypes/TypesClientPacks1.cpp index 305f53e56..ff702295c 100644 --- a/lib/registerTypes/TypesClientPacks1.cpp +++ b/lib/registerTypes/TypesClientPacks1.cpp @@ -12,7 +12,6 @@ #include "../StartInfo.h" #include "../CGameState.h" -#include "../mapping/CMap.h" #include "../CModHandler.h" #include "../mapObjects/CObjectHandler.h" #include "../CCreatureHandler.h" diff --git a/lib/registerTypes/TypesClientPacks2.cpp b/lib/registerTypes/TypesClientPacks2.cpp index 5d8400b80..a28f9f58d 100644 --- a/lib/registerTypes/TypesClientPacks2.cpp +++ b/lib/registerTypes/TypesClientPacks2.cpp @@ -14,7 +14,6 @@ #include "../CStack.h" #include "../battle/BattleInfo.h" #include "../CGameState.h" -#include "../mapping/CMap.h" #include "../CModHandler.h" #include "../mapObjects/CObjectHandler.h" #include "../CCreatureHandler.h" diff --git a/lib/registerTypes/TypesMapObjects1.cpp b/lib/registerTypes/TypesMapObjects1.cpp index 690248cd5..53e40ceaa 100644 --- a/lib/registerTypes/TypesMapObjects1.cpp +++ b/lib/registerTypes/TypesMapObjects1.cpp @@ -12,7 +12,6 @@ #include "../StartInfo.h" #include "../CGameState.h" -#include "../mapping/CMap.h" #include "../CModHandler.h" #include "../mapObjects/CObjectHandler.h" #include "../CCreatureHandler.h" diff --git a/lib/registerTypes/TypesMapObjects2.cpp b/lib/registerTypes/TypesMapObjects2.cpp index cc3a05e47..694790502 100644 --- a/lib/registerTypes/TypesMapObjects2.cpp +++ b/lib/registerTypes/TypesMapObjects2.cpp @@ -14,7 +14,6 @@ #include "../CStack.h" #include "../battle/BattleInfo.h" #include "../CGameState.h" -#include "../mapping/CMap.h" #include "../CModHandler.h" #include "../mapObjects/CObjectHandler.h" #include "../CCreatureHandler.h" diff --git a/lib/registerTypes/TypesMapObjects3.cpp b/lib/registerTypes/TypesMapObjects3.cpp index fbac38dc0..bb94179d6 100644 --- a/lib/registerTypes/TypesMapObjects3.cpp +++ b/lib/registerTypes/TypesMapObjects3.cpp @@ -12,7 +12,6 @@ #include "../StartInfo.h" #include "../CGameState.h" -#include "../mapping/CMap.h" #include "../CModHandler.h" #include "../mapObjects/CObjectHandler.h" #include "../CCreatureHandler.h" diff --git a/lib/registerTypes/TypesServerPacks.cpp b/lib/registerTypes/TypesServerPacks.cpp index 82d00d4f0..86494f7d5 100644 --- a/lib/registerTypes/TypesServerPacks.cpp +++ b/lib/registerTypes/TypesServerPacks.cpp @@ -12,7 +12,6 @@ #include "../StartInfo.h" #include "../CGameState.h" -#include "../mapping/CMap.h" #include "../CModHandler.h" #include "../mapObjects/CObjectHandler.h" #include "../CCreatureHandler.h" diff --git a/lib/rmg/CMapGenOptions.cpp b/lib/rmg/CMapGenOptions.cpp index c8072daab..112e6d450 100644 --- a/lib/rmg/CMapGenOptions.cpp +++ b/lib/rmg/CMapGenOptions.cpp @@ -11,7 +11,7 @@ #include "StdInc.h" #include "CMapGenOptions.h" -#include "../mapping/CMap.h" +#include "../mapping/CMapHeader.h" #include "CRmgTemplateStorage.h" #include "CRmgTemplate.h" #include "CRandomGenerator.h" diff --git a/lib/rmg/CRmgTemplate.cpp b/lib/rmg/CRmgTemplate.cpp index 385211759..dbe407845 100644 --- a/lib/rmg/CRmgTemplate.cpp +++ b/lib/rmg/CRmgTemplate.cpp @@ -13,7 +13,6 @@ #include #include "CRmgTemplate.h" -#include "../mapping/CMap.h" #include "../VCMI_Lib.h" #include "../CTownHandler.h" #include "../CModHandler.h" diff --git a/lib/rmg/modificators/ConnectionsPlacer.cpp b/lib/rmg/modificators/ConnectionsPlacer.cpp index 52de5fb32..c18276bc0 100644 --- a/lib/rmg/modificators/ConnectionsPlacer.cpp +++ b/lib/rmg/modificators/ConnectionsPlacer.cpp @@ -13,10 +13,8 @@ #include "../CMapGenerator.h" #include "../RmgMap.h" #include "../../TerrainHandler.h" -#include "../../mapping/CMap.h" #include "../../mapping/CMapEditManager.h" #include "../../mapObjects/CObjectClassesHandler.h" -#include "../RmgPath.h" #include "../RmgObject.h" #include "ObjectManager.h" #include "../Functions.h" diff --git a/lib/rmg/modificators/MinePlacer.cpp b/lib/rmg/modificators/MinePlacer.cpp index 412a03991..dde5b9b46 100644 --- a/lib/rmg/modificators/MinePlacer.cpp +++ b/lib/rmg/modificators/MinePlacer.cpp @@ -10,10 +10,8 @@ #include "ConnectionsPlacer.h" #include "../CMapGenerator.h" #include "../RmgMap.h" -#include "../../mapping/CMap.h" #include "../../mapping/CMapEditManager.h" #include "../../mapObjects/CObjectClassesHandler.h" -#include "../../spells/CSpellHandler.h" //for choosing random spells #include "../RmgPath.h" #include "../RmgObject.h" #include "ObjectManager.h" @@ -95,4 +93,4 @@ bool MinePlacer::placeMines(ObjectManager & manager) return true; } -VCMI_LIB_NAMESPACE_END \ No newline at end of file +VCMI_LIB_NAMESPACE_END diff --git a/lib/rmg/modificators/ObjectManager.cpp b/lib/rmg/modificators/ObjectManager.cpp index ebda0f0af..87d2726ba 100644 --- a/lib/rmg/modificators/ObjectManager.cpp +++ b/lib/rmg/modificators/ObjectManager.cpp @@ -19,7 +19,6 @@ #include "ConnectionsPlacer.h" #include "TownPlacer.h" #include "MinePlacer.h" -#include "TreasurePlacer.h" #include "QuestArtifactPlacer.h" #include "../../CCreatureHandler.h" #include "../../mapObjects/CommonConstructors.h" diff --git a/lib/rmg/modificators/RoadPlacer.cpp b/lib/rmg/modificators/RoadPlacer.cpp index 690c529b8..2ecd74a89 100644 --- a/lib/rmg/modificators/RoadPlacer.cpp +++ b/lib/rmg/modificators/RoadPlacer.cpp @@ -14,11 +14,9 @@ #include "ObstaclePlacer.h" #include "../Functions.h" #include "../CMapGenerator.h" -#include "../RmgMap.h" #include "../threadpool/MapProxy.h" -#include "../../mapping/CMapEditManager.h" #include "../../CModHandler.h" -#include "../RmgPath.h" +#include "../../mapping/CMapEditManager.h" VCMI_LIB_NAMESPACE_BEGIN diff --git a/lib/rmg/modificators/WaterAdopter.cpp b/lib/rmg/modificators/WaterAdopter.cpp index 1c6158161..732b2557d 100644 --- a/lib/rmg/modificators/WaterAdopter.cpp +++ b/lib/rmg/modificators/WaterAdopter.cpp @@ -12,7 +12,6 @@ #include "WaterAdopter.h" #include "../CMapGenerator.h" #include "../RmgMap.h" -#include "../../mapping/CMap.h" #include "../../mapping/CMapEditManager.h" #include "../../mapObjects/CObjectClassesHandler.h" #include "../RmgPath.h" diff --git a/lib/rmg/modificators/WaterProxy.cpp b/lib/rmg/modificators/WaterProxy.cpp index 4d95aaec4..08b15257f 100644 --- a/lib/rmg/modificators/WaterProxy.cpp +++ b/lib/rmg/modificators/WaterProxy.cpp @@ -45,7 +45,7 @@ void WaterProxy::process() for([[maybe_unused]] const auto & t : zone.area().getTilesVector()) { assert(map.isOnMap(t)); - assert(map.map().getTile(t).terType->getId() == zone.getTerrainType()); + assert(map.getTile(t).terType->getId() == zone.getTerrainType()); } for(const auto & z : map.getZones()) diff --git a/lib/rmg/modificators/WaterRoutes.cpp b/lib/rmg/modificators/WaterRoutes.cpp index 791ab6366..4a2f0e108 100644 --- a/lib/rmg/modificators/WaterRoutes.cpp +++ b/lib/rmg/modificators/WaterRoutes.cpp @@ -13,7 +13,6 @@ #include "WaterProxy.h" #include "../CMapGenerator.h" #include "../RmgMap.h" -#include "../../mapping/CMap.h" #include "../../mapping/CMapEditManager.h" #include "../../mapObjects/CObjectClassesHandler.h" #include "../RmgPath.h" diff --git a/lib/serializer/Connection.cpp b/lib/serializer/Connection.cpp index ec00d5c63..9cd40d54c 100644 --- a/lib/serializer/Connection.cpp +++ b/lib/serializer/Connection.cpp @@ -11,7 +11,7 @@ #include "Connection.h" #include "../registerTypes/RegisterTypes.h" -#include "../mapping/CMap.h" +#include "../mapping/CMapHeader.h" #include "../CGameState.h" #include diff --git a/mapeditor/inspector/questwidget.cpp b/mapeditor/inspector/questwidget.cpp index ba2af6a38..bd1329f46 100644 --- a/mapeditor/inspector/questwidget.cpp +++ b/mapeditor/inspector/questwidget.cpp @@ -16,6 +16,7 @@ #include "../lib/CCreatureHandler.h" #include "../lib/CHeroHandler.h" #include "../lib/StringConstants.h" +#include "../lib/mapping/CMap.h" QuestWidget::QuestWidget(const CMap & _map, CGSeerHut & _sh, QWidget *parent) : QDialog(parent), diff --git a/mapeditor/inspector/questwidget.h b/mapeditor/inspector/questwidget.h index e9538738c..cef1ad551 100644 --- a/mapeditor/inspector/questwidget.h +++ b/mapeditor/inspector/questwidget.h @@ -11,7 +11,6 @@ #include "../StdInc.h" #include #include "../lib/mapObjects/CQuest.h" -#include "../lib/mapping/CMap.h" namespace Ui { class QuestWidget; diff --git a/mapeditor/inspector/rewardswidget.cpp b/mapeditor/inspector/rewardswidget.cpp index a8f01cf05..7f3d335b7 100644 --- a/mapeditor/inspector/rewardswidget.cpp +++ b/mapeditor/inspector/rewardswidget.cpp @@ -16,6 +16,7 @@ #include "../lib/CArtHandler.h" #include "../lib/CCreatureHandler.h" #include "../lib/StringConstants.h" +#include "../lib/mapping/CMap.h" RewardsWidget::RewardsWidget(const CMap & m, CGPandoraBox & p, QWidget *parent) : QDialog(parent), diff --git a/mapeditor/inspector/rewardswidget.h b/mapeditor/inspector/rewardswidget.h index cda6af543..422c31768 100644 --- a/mapeditor/inspector/rewardswidget.h +++ b/mapeditor/inspector/rewardswidget.h @@ -12,7 +12,6 @@ #include #include "../lib/mapObjects/CGPandoraBox.h" #include "../lib/mapObjects/CQuest.h" -#include "../lib/mapping/CMap.h" namespace Ui { class RewardsWidget; diff --git a/mapeditor/mapcontroller.cpp b/mapeditor/mapcontroller.cpp index 7551abe39..aa62d7674 100644 --- a/mapeditor/mapcontroller.cpp +++ b/mapeditor/mapcontroller.cpp @@ -14,6 +14,7 @@ #include "../lib/mapping/CMapService.h" #include "../lib/mapping/CMap.h" #include "../lib/mapping/CMapEditManager.h" +#include "../lib/mapping/ObstacleProxy.h" #include "../lib/TerrainHandler.h" #include "../lib/mapObjects/CObjectClassesHandler.h" #include "../lib/CSkillHandler.h" diff --git a/mapeditor/mapcontroller.h b/mapeditor/mapcontroller.h index cf59f32de..1c602c0a0 100644 --- a/mapeditor/mapcontroller.h +++ b/mapeditor/mapcontroller.h @@ -12,8 +12,13 @@ #include "maphandler.h" #include "mapview.h" -#include "../lib/mapping/CMap.h" -#include "../lib/rmg/modificators/ObstaclePlacer.h" + +#include "../lib/CModVersion.h" + +VCMI_LIB_NAMESPACE_BEGIN +using ModCompatibilityInfo = std::map; +class EditorObstaclePlacer; +VCMI_LIB_NAMESPACE_END class MainWindow; class MapController diff --git a/mapeditor/maphandler.h b/mapeditor/maphandler.h index 02af3a59b..2372f29f1 100644 --- a/mapeditor/maphandler.h +++ b/mapeditor/maphandler.h @@ -12,7 +12,7 @@ //code is copied from vcmiclient/mapHandler.h with minimal changes #include "StdInc.h" -#include "../lib/mapping/CMap.h" +#include "../lib/int3.h" #include "Animation.h" #include @@ -22,7 +22,9 @@ VCMI_LIB_NAMESPACE_BEGIN class CGObjectInstance; +class CGHeroInstance; class CGBoat; +class CMap; class PlayerColor; VCMI_LIB_NAMESPACE_END diff --git a/mapeditor/mapsettings.h b/mapeditor/mapsettings.h index bd7a79826..faf074043 100644 --- a/mapeditor/mapsettings.h +++ b/mapeditor/mapsettings.h @@ -12,6 +12,7 @@ #include #include "mapcontroller.h" +#include "../lib/mapping/CMap.h" namespace Ui { class MapSettings; diff --git a/mapeditor/mapview.cpp b/mapeditor/mapview.cpp index 6d91481ae..cecbdd98d 100644 --- a/mapeditor/mapview.cpp +++ b/mapeditor/mapview.cpp @@ -14,6 +14,7 @@ #include #include "mapcontroller.h" #include "../lib/mapObjects/CObjectClassesHandler.h" +#include "../lib/mapping/CMap.h" MinimapView::MinimapView(QWidget * parent): QGraphicsView(parent) diff --git a/mapeditor/playerparams.cpp b/mapeditor/playerparams.cpp index fe3aded39..ebf29c9b2 100644 --- a/mapeditor/playerparams.cpp +++ b/mapeditor/playerparams.cpp @@ -14,6 +14,8 @@ #include "../lib/CTownHandler.h" #include "../lib/StringConstants.h" +#include "../lib/mapping/CMap.h" + PlayerParams::PlayerParams(MapController & ctrl, int playerId, QWidget *parent) : QWidget(parent), ui(new Ui::PlayerParams), diff --git a/mapeditor/playerparams.h b/mapeditor/playerparams.h index 6fddf1b29..2aaff5384 100644 --- a/mapeditor/playerparams.h +++ b/mapeditor/playerparams.h @@ -11,7 +11,7 @@ #pragma once #include -#include "../lib/mapping/CMap.h" +#include "../lib/mapping/CMapHeader.h" #include "mapcontroller.h" namespace Ui { diff --git a/mapeditor/playersettings.cpp b/mapeditor/playersettings.cpp index ffe2c1f7c..9c5fa89c2 100644 --- a/mapeditor/playersettings.cpp +++ b/mapeditor/playersettings.cpp @@ -14,6 +14,8 @@ #include "playerparams.h" #include "mainwindow.h" +#include "../lib/mapping/CMap.h" + PlayerSettings::PlayerSettings(MapController & ctrl, QWidget *parent) : QDialog(parent), ui(new Ui::PlayerSettings), diff --git a/mapeditor/scenelayer.cpp b/mapeditor/scenelayer.cpp index cbfd842ce..5b4076608 100644 --- a/mapeditor/scenelayer.cpp +++ b/mapeditor/scenelayer.cpp @@ -12,6 +12,7 @@ #include "scenelayer.h" #include "mainwindow.h" #include "../lib/mapping/CMapEditManager.h" +#include "../lib/mapping/CMap.h" #include "inspector/inspector.h" #include "mapview.h" #include "mapcontroller.h" diff --git a/mapeditor/validator.cpp b/mapeditor/validator.cpp index 6ac82994e..92950f0d4 100644 --- a/mapeditor/validator.cpp +++ b/mapeditor/validator.cpp @@ -12,6 +12,7 @@ #include "validator.h" #include "mapcontroller.h" #include "ui_validator.h" +#include "../lib/mapping/CMap.h" #include "../lib/mapObjects/MapObjects.h" #include "../lib/CHeroHandler.h" #include "../lib/CModHandler.h" diff --git a/mapeditor/validator.h b/mapeditor/validator.h index dc10ffa69..ee455ba08 100644 --- a/mapeditor/validator.h +++ b/mapeditor/validator.h @@ -11,7 +11,10 @@ #pragma once #include -#include "../lib/mapping/CMap.h" + +VCMI_LIB_NAMESPACE_BEGIN +class CMap; +VCMI_LIB_NAMESPACE_END namespace Ui { class Validator; diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp index 561260555..e91cdbabf 100644 --- a/server/CVCMIServer.cpp +++ b/server/CVCMIServer.cpp @@ -25,7 +25,7 @@ #include "zlib.h" #include "CVCMIServer.h" #include "../lib/StartInfo.h" -#include "../lib/mapping/CMap.h" +#include "../lib/mapping/CMapHeader.h" #include "../lib/rmg/CMapGenOptions.h" #include "../lib/NetPackVisitor.h" #include "LobbyNetPackVisitors.h" diff --git a/server/NetPacksServer.cpp b/server/NetPacksServer.cpp index 267f159fb..480acdacf 100644 --- a/server/NetPacksServer.cpp +++ b/server/NetPacksServer.cpp @@ -12,7 +12,7 @@ #include "CGameHandler.h" #include "../lib/IGameCallback.h" -#include "../lib/mapping/CMap.h" +#include "../lib/mapObjects/CGTownInstance.h" #include "../lib/CGameState.h" #include "../lib/battle/BattleInfo.h" #include "../lib/battle/BattleAction.h"