1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Split pathfinder into multiple smaller files

This commit is contained in:
Ivan Savenko
2023-06-21 13:46:09 +03:00
parent 87fcfa4add
commit bd4d2788ed
47 changed files with 2362 additions and 2076 deletions

View File

@@ -14,7 +14,9 @@
#include "../../../CCallback.h"
#include "../../../lib/mapping/CMap.h"
#include "../../../lib/mapObjects/MapObjects.h"
#include "../../../lib/PathfinderUtil.h"
#include "../../../lib/pathfinder/CPathfinder.h"
#include "../../../lib/pathfinder/PathfinderOptions.h"
#include "../../../lib/pathfinder/PathfinderUtil.h"
#include "../../../lib/CPlayerState.h"
AINodeStorage::AINodeStorage(const int3 & Sizes)

View File

@@ -10,8 +10,9 @@
#pragma once
#include "../../../lib/CPathfinder.h"
#include "../../../lib/mapObjects/CGHeroInstance.h"
#include "../../../lib/pathfinder/CGPathNode.h"
#include "../../../lib/pathfinder/INodeStorage.h"
#include "../AIUtility.h"
#include "../FuzzyHelper.h"
#include "../Goals/AbstractGoal.h"

View File

@@ -14,6 +14,8 @@
#include "Rules/AIMovementToDestinationRule.h"
#include "Rules/AIPreviousNodeRule.h"
#include "../../../lib/pathfinder/CPathfinder.h"
namespace AIPathfinding
{
std::vector<std::shared_ptr<IPathfindingRule>> makeRuleset(
@@ -41,6 +43,8 @@ namespace AIPathfinding
{
}
AIPathfinderConfig::~AIPathfinderConfig() = default;
CPathfinderHelper * AIPathfinderConfig::getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs)
{
if(!helper)

View File

@@ -12,6 +12,7 @@
#include "AINodeStorage.h"
#include "../VCAI.h"
#include "../../../lib/pathfinder/PathfinderOptions.h"
namespace AIPathfinding
{
@@ -27,6 +28,8 @@ namespace AIPathfinding
VCAI * ai,
std::shared_ptr<AINodeStorage> nodeStorage);
~AIPathfinderConfig();
virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) override;
};
}

View File

@@ -15,6 +15,7 @@
#include "../Actions/BoatActions.h"
#include "../../../../CCallback.h"
#include "../../../../lib/mapObjects/MapObjects.h"
#include "../../../../lib/pathfinder/PathfindingRules.h"
namespace AIPathfinding
{

View File

@@ -14,6 +14,7 @@
#include "../../VCAI.h"
#include "../../../../CCallback.h"
#include "../../../../lib/mapObjects/MapObjects.h"
#include "../../../../lib/pathfinder/PathfindingRules.h"
namespace AIPathfinding
{

View File

@@ -14,6 +14,7 @@
#include "../../VCAI.h"
#include "../../../../CCallback.h"
#include "../../../../lib/mapObjects/MapObjects.h"
#include "../../../../lib/pathfinder/PathfindingRules.h"
namespace AIPathfinding
{

View File

@@ -14,6 +14,7 @@
#include "../../VCAI.h"
#include "../../../../CCallback.h"
#include "../../../../lib/mapObjects/MapObjects.h"
#include "../../../../lib/pathfinder/PathfindingRules.h"
namespace AIPathfinding
{