Przeglądaj źródła

Nullkiller: try to fix build

Andrii Danylchenko 4 lat temu
rodzic
commit
3e9bf9b662

+ 2 - 1
AI/Nullkiller/Analyzers/ArmyManager.h

@@ -16,7 +16,8 @@
 #include "../../lib/VCMI_Lib.h"
 #include "../../lib/CTownHandler.h"
 #include "../../lib/CBuildingHandler.h"
-#include "VCAI.h"
+
+class Nullkiller;
 
 struct SlotInfo
 {

+ 1 - 1
AI/Nullkiller/Analyzers/BuildAnalyzer.cpp

@@ -8,7 +8,7 @@
 *
 */
 #include "StdInc.h"
-#include "BuildAnalyzer.h"
+#include "../Engine/Nullkiller.h"
 #include "lib/mapping/CMap.h" //for victory conditions
 
 extern boost::thread_specific_ptr<CCallback> cb;

+ 1 - 1
AI/Nullkiller/Analyzers/BuildAnalyzer.h

@@ -9,7 +9,7 @@
 */
 #pragma once
 
-#include "../VCAI.h"
+#include "../AIUtility.h"
 #include "../../../lib/ResourceSet.h"
 
 

+ 0 - 1
AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp

@@ -8,7 +8,6 @@
 *
 */
 #include "StdInc.h"
-#include "DangerHitMapAnalyzer.h"
 #include "lib/mapping/CMap.h" //for victory conditions
 #include "../Engine/Nullkiller.h"
 

+ 1 - 1
AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.h

@@ -9,7 +9,7 @@
 */
 #pragma once
 
-#include "../VCAI.h"
+#include "../AIUtility.h"
 
 struct HitMapInfo
 {

+ 0 - 1
AI/Nullkiller/Analyzers/HeroManager.cpp

@@ -9,7 +9,6 @@
 */
 
 #include "StdInc.h"
-#include "HeroManager.h"
 #include "../Engine/Nullkiller.h"
 #include "../../CCallback.h"
 #include "../../lib/mapObjects/MapObjects.h"

+ 0 - 1
AI/Nullkiller/Analyzers/HeroManager.h

@@ -16,7 +16,6 @@
 #include "../../lib/VCMI_Lib.h"
 #include "../../lib/CTownHandler.h"
 #include "../../lib/CBuildingHandler.h"
-#include "VCAI.h"
 
 class DLL_EXPORT IHeroManager //: public: IAbstractManager
 {

+ 1 - 0
AI/Nullkiller/Behaviors/CaptureObjectsBehavior.h

@@ -12,6 +12,7 @@
 #include "../../../lib/VCMI_Lib.h"
 #include "../AIUtility.h"
 #include "../Goals/CGoal.h"
+#include "../Pathfinding/AINodeStorage.h"
 
 namespace Goals
 {

+ 1 - 1
AI/Nullkiller/Behaviors/CompleteQuestBehavior.h

@@ -10,9 +10,9 @@
 #pragma once
 
 #include "../AIUtility.h"
-#include "../../../lib/VCMI_Lib.h"
 #include "../../../CCallback.h"
 #include "../Goals/CGoal.h"
+#include "../../../lib/CGameState.h"
 
 namespace Goals
 {

+ 0 - 1
AI/Nullkiller/Engine/AIMemory.cpp

@@ -9,7 +9,6 @@
 */
 #include "StdInc.h"
 #include "AIMemory.h"
-#include "../../../lib/mapObjects/MapObjects.h"
 
 void AIMemory::removeFromMemory(const CGObjectInstance * obj)
 {

+ 2 - 7
AI/Nullkiller/Engine/AIMemory.h

@@ -9,13 +9,8 @@
 */
 #pragma once
 
-#include "PriorityEvaluator.h"
-#include "../Analyzers/DangerHitMapAnalyzer.h"
-#include "../Analyzers/BuildAnalyzer.h"
-#include "../Analyzers/ArmyManager.h"
-#include "../Analyzers/HeroManager.h"
-#include "../Analyzers/ObjectClusterizer.h"
-#include "../Goals/AbstractGoal.h"
+#include "../AIUtility.h"
+#include "../../../lib/mapObjects/MapObjects.h"
 
 class AIMemory
 {

+ 1 - 2
AI/Nullkiller/Engine/PriorityEvaluator.cpp

@@ -8,9 +8,9 @@
 *
 */
 #include "StdInc.h"
-#include "PriorityEvaluator.h"
 #include <limits>
 
+#include "Nullkiller.h"
 #include "../../../lib/mapObjects/MapObjects.h"
 #include "../../../lib/mapObjects/CommonConstructors.h"
 #include "../../../lib/CCreatureHandler.h"
@@ -19,7 +19,6 @@
 #include "../../../lib/VCMI_Lib.h"
 #include "../../../CCallback.h"
 #include "../../../lib/filesystem/Filesystem.h"
-#include "../Engine/Nullkiller.h"
 #include "../Goals/ExecuteHeroChain.h"
 #include "../Goals/UnlockCluster.h"
 #include "../Goals/BuildThis.h"

+ 3 - 0
AI/Nullkiller/Engine/PriorityEvaluator.h

@@ -10,8 +10,11 @@
 #pragma once
 #include "fl/Headers.h"
 #include "../Goals/CGoal.h"
+#include "../Pathfinding/AIPathfinder.h"
 
 class BuildingInfo;
+class Nullkiller;
+class CGWitchHut;
 
 class RewardEvaluator
 {

+ 43 - 0
AI/Nullkiller/Goals/AbstractGoal.h

@@ -183,3 +183,46 @@ namespace Goals
 		virtual ~ITask() {}
 	};
 }
+
+class cannotFulfillGoalException : public std::exception
+{
+	std::string msg;
+
+public:
+	explicit cannotFulfillGoalException(crstring _Message)
+		: msg(_Message)
+	{
+	}
+
+	virtual ~cannotFulfillGoalException() throw ()
+	{
+	};
+
+	const char * what() const throw () override
+	{
+		return msg.c_str();
+	}
+};
+
+class goalFulfilledException : public std::exception
+{
+	std::string msg;
+
+public:
+	Goals::TSubgoal goal;
+
+	explicit goalFulfilledException(Goals::TSubgoal Goal)
+		: goal(Goal)
+	{
+		msg = goal->toString();
+	}
+
+	virtual ~goalFulfilledException() throw ()
+	{
+	};
+
+	const char * what() const throw () override
+	{
+		return msg.c_str();
+	}
+};

+ 0 - 1
AI/Nullkiller/Goals/CGoal.h

@@ -10,7 +10,6 @@
 #pragma once
 
 #include "AbstractGoal.h"
-#include "../VCAI.h"
 
 struct HeroPtr;
 class VCAI;

+ 1 - 0
AI/Nullkiller/Goals/ExecuteHeroChain.h

@@ -10,6 +10,7 @@
 #pragma once
 
 #include "CGoal.h"
+#include "../Pathfinding/AIPathfinder.h"
 
 namespace Goals
 {

+ 1 - 0
AI/Nullkiller/Pathfinding/Actions/BoatActions.cpp

@@ -9,6 +9,7 @@
 */
 
 #include "StdInc.h"
+#include "../../VCAI.h"
 #include "../../Goals/AdventureSpellCast.h"
 #include "../../Behaviors/CaptureObjectsBehavior.h"
 #include "../../Goals/BuildBoat.h"

+ 1 - 1
AI/Nullkiller/Pathfinding/Actions/BoatActions.h

@@ -58,7 +58,7 @@ namespace AIPathfinding
 		{
 		}
 
-		virtual bool canAct(const AIPathNode * source) const;
+		virtual bool canAct(const AIPathNode * source) const override;
 
 		virtual void execute(const CGHeroInstance * hero) const override;
 

+ 1 - 0
AI/Nullkiller/StdInc.h

@@ -1,2 +1,3 @@
 #pragma  once
 #include "../../Global.h"
+#include "../../CCallback.h"

+ 2 - 4
AI/Nullkiller/VCAI.cpp

@@ -8,8 +8,6 @@
  *
  */
 #include "StdInc.h"
-#include "VCAI.h"
-#include "Goals/Goals.h"
 
 #include "../../lib/UnlockGuard.h"
 #include "../../lib/mapObjects/MapObjects.h"
@@ -22,8 +20,8 @@
 #include "../../lib/serializer/BinarySerializer.h"
 #include "../../lib/serializer/BinaryDeserializer.h"
 
-#include "Engine/Nullkiller.h"
-
+#include "VCAI.h"
+#include "Goals/Goals.h"
 
 class CGVisitableOPW;
 

+ 1 - 45
AI/Nullkiller/VCAI.h

@@ -23,11 +23,10 @@
 #include "../../lib/spells/CSpellHandler.h"
 #include "../../lib/CondSh.h"
 #include "Pathfinding/AIPathfinder.h"
+#include "Engine/Nullkiller.h"
 
 struct QuestInfo;
 
-class Nullkiller;
-
 class AIStatus
 {
 	boost::mutex mx;
@@ -308,46 +307,3 @@ public:
 		//myCB is restored after load by init call
 	}
 };
-
-class cannotFulfillGoalException : public std::exception
-{
-	std::string msg;
-
-public:
-	explicit cannotFulfillGoalException(crstring _Message)
-		: msg(_Message)
-	{
-	}
-
-	virtual ~cannotFulfillGoalException() throw ()
-	{
-	};
-
-	const char * what() const throw () override
-	{
-		return msg.c_str();
-	}
-};
-
-class goalFulfilledException : public std::exception
-{
-	std::string msg;
-
-public:
-	Goals::TSubgoal goal;
-
-	explicit goalFulfilledException(Goals::TSubgoal Goal)
-		: goal(Goal)
-	{
-		msg = goal->toString();
-	}
-
-	virtual ~goalFulfilledException() throw ()
-	{
-	};
-
-	const char * what() const throw () override
-	{
-		return msg.c_str();
-	}
-};