1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Pathfinder: Fix style

* Fix naming style for methods and classes:
	Use camelCase for methods and PascalCase for classes as
	code style demands it. And use sneak_case for methods that
	are not member of a class.
* Replace "* " with " *" for Pointers
* Same for references
* Put function body opening braces on new line
* Other misc minor non functional style improvements
This commit is contained in:
est31 2016-04-01 01:52:17 +02:00
parent 46e5ef4e9a
commit ac8bb457aa
3 changed files with 211 additions and 192 deletions

View file

@ -41,26 +41,26 @@ typedef enum {
DIR_XM,
DIR_ZP,
DIR_ZM
} path_directions;
} PathDirections;
/** List of supported algorithms */
typedef enum {
DIJKSTRA, /**< Dijkstra shortest path algorithm */
A_PLAIN, /**< A* algorithm using heuristics to find a path */
A_PLAIN_NP /**< A* algorithm without prefetching of map data */
} algorithm;
PA_DIJKSTRA, /**< Dijkstra shortest path algorithm */
PA_PLAIN, /**< A* algorithm using heuristics to find a path */
PA_PLAIN_NP /**< A* algorithm without prefetching of map data */
} PathAlgorithm;
/******************************************************************************/
/* declarations */
/******************************************************************************/
/** c wrapper function to use from scriptapi */
std::vector<v3s16> get_Path(ServerEnvironment* env,
std::vector<v3s16> get_path(ServerEnvironment *env,
v3s16 source,
v3s16 destination,
unsigned int searchdistance,
unsigned int max_jump,
unsigned int max_drop,
algorithm algo);
PathAlgorithm algo);
#endif /* PATHFINDER_H_ */