Pyrogenesis
13997
|
Tile-based algorithm for CCmpPathfinder. More...
#include "precompiled.h"
#include "CCmpPathfinder_Common.h"
#include "ps/Profile.h"
#include "renderer/TerrainOverlay.h"
#include "simulation2/helpers/PriorityQueue.h"
Go to the source code of this file.
Classes | |
struct | PathfindTile |
Tile data for A* computation. More... | |
class | PathfinderOverlay |
Terrain overlay for pathfinder debugging. More... | |
struct | PathfinderState |
Macros | |
#define | PATHFIND_STATS 0 |
#define | USE_DIAGONAL_MOVEMENT 1 |
Typedefs | |
typedef PriorityQueueHeap < std::pair< u16, u16 >, u32 > | PriorityQueue |
Functions | |
static bool | AtGoal (u16 i, u16 j, const ICmpPathfinder::Goal &goal) |
static u32 | CalculateHeuristic (u16 i, u16 j, u16 iGoal, u16 jGoal, u16 rGoal) |
static u32 | CalculateCostDelta (u16 pi, u16 pj, u16 i, u16 j, PathfindTileGrid *tempGrid, u32 tileCost) |
static void | ProcessNeighbour (u16 pi, u16 pj, u16 i, u16 j, u32 pg, PathfinderState &state) |
Variables | |
const u32 | g_CostPerTile = 256 |
Tile-based algorithm for CCmpPathfinder.
This is a fairly naive algorithm and could probably be improved substantially (hopefully without needing to change the interface much).
Definition in file CCmpPathfinder_Tile.cpp.
#define PATHFIND_STATS 0 |
Definition at line 35 of file CCmpPathfinder_Tile.cpp.
#define USE_DIAGONAL_MOVEMENT 1 |
Definition at line 37 of file CCmpPathfinder_Tile.cpp.
typedef PriorityQueueHeap<std::pair<u16, u16>, u32> PriorityQueue |
Definition at line 33 of file CCmpPathfinder_Tile.cpp.
|
static |
Definition at line 218 of file CCmpPathfinder_Tile.cpp.
|
static |
Definition at line 258 of file CCmpPathfinder_Tile.cpp.
Definition at line 232 of file CCmpPathfinder_Tile.cpp.
|
static |
Definition at line 291 of file CCmpPathfinder_Tile.cpp.
const u32 g_CostPerTile = 256 |
Definition at line 41 of file CCmpPathfinder_Tile.cpp.