src/npf.h
branchgamebalance
changeset 9906 6f41b8713b65
parent 9895 7bd07f43b0e3
child 6719 4cc327ad39d5
--- a/src/npf.h	Sun Apr 01 09:38:43 2007 +0000
+++ b/src/npf.h	Thu Apr 19 14:43:25 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file npf.h */
+
 #ifndef NPF_H
 #define NPF_H
 
@@ -9,9 +11,9 @@
 #include "vehicle.h"
 #include "tile.h"
 
-//mowing grass
+/* mowing grass */
 enum {
-	NPF_HASH_BITS = 12, /* The size of the hash used in pathfinding. Just changing this value should be sufficient to change the hash size. Should be an even value. */
+	NPF_HASH_BITS = 12, ///< The size of the hash used in pathfinding. Just changing this value should be sufficient to change the hash size. Should be an even value.
 	/* Do no change below values */
 	NPF_HASH_SIZE = 1 << NPF_HASH_BITS,
 	NPF_HASH_HALFBITS = NPF_HASH_BITS / 2,
@@ -35,33 +37,38 @@
 	NPF_INFINITE_PENALTY = 1000 * NPF_TILE_LENGTH
 };
 
-struct NPFFindStationOrTileData { /* Meant to be stored in AyStar.targetdata */
-	TileIndex dest_coords; /* An indication of where the station is, for heuristic purposes, or the target tile */
-	StationID station_index; /* station index we're heading for, or INVALID_STATION when we're heading for a tile */
+/* Meant to be stored in AyStar.targetdata */
+struct NPFFindStationOrTileData {
+	TileIndex dest_coords;   ///< An indication of where the station is, for heuristic purposes, or the target tile
+	StationID station_index; ///< station index we're heading for, or INVALID_STATION when we're heading for a tile
 };
 
-enum { /* Indices into AyStar.userdata[] */
-	NPF_TYPE = 0, /* Contains a TransportTypes value */
-	NPF_OWNER, /* Contains an Owner value */
-	NPF_RAILTYPES, /* Contains a bitmask the compatible RailTypes of the engine when NPF_TYPE == TRANSPORT_RAIL. Unused otherwise. */
+/* Indices into AyStar.userdata[] */
+enum {
+	NPF_TYPE = 0,  ///< Contains a TransportTypes value
+	NPF_OWNER,     ///< Contains an Owner value
+	NPF_RAILTYPES, ///< Contains a bitmask the compatible RailTypes of the engine when NPF_TYPE == TRANSPORT_RAIL. Unused otherwise.
 };
 
-enum { /* Indices into AyStarNode.userdata[] */
-	NPF_TRACKDIR_CHOICE = 0, /* The trackdir chosen to get here */
+/* Indices into AyStarNode.userdata[] */
+enum {
+	NPF_TRACKDIR_CHOICE = 0, ///< The trackdir chosen to get here
 	NPF_NODE_FLAGS,
 };
 
-enum NPFNodeFlag { /* Flags for AyStarNode.userdata[NPF_NODE_FLAGS]. Use NPFGetBit() and NPFGetBit() to use them. */
-	NPF_FLAG_SEEN_SIGNAL, /* Used to mark that a signal was seen on the way, for rail only */
-	NPF_FLAG_REVERSE, /* Used to mark that this node was reached from the second start node, if applicable */
-	NPF_FLAG_LAST_SIGNAL_RED, /* Used to mark that the last signal on this path was red */
+/* Flags for AyStarNode.userdata[NPF_NODE_FLAGS]. Use NPFGetBit() and NPFGetBit() to use them. */
+enum NPFNodeFlag {
+	NPF_FLAG_SEEN_SIGNAL,     ///< Used to mark that a signal was seen on the way, for rail only
+	NPF_FLAG_REVERSE,         ///< Used to mark that this node was reached from the second start node, if applicable
+	NPF_FLAG_LAST_SIGNAL_RED, ///< Used to mark that the last signal on this path was red
 };
 
-struct NPFFoundTargetData { /* Meant to be stored in AyStar.userpath */
-	uint best_bird_dist; /* The best heuristic found. Is 0 if the target was found */
-	uint best_path_dist; /* The shortest path. Is (uint)-1 if no path is found */
-	Trackdir best_trackdir; /* The trackdir that leads to the shortest path/closest birds dist */
-	AyStarNode node; /* The node within the target the search led us to */
+/* Meant to be stored in AyStar.userpath */
+struct NPFFoundTargetData {
+	uint best_bird_dist;    ///< The best heuristic found. Is 0 if the target was found
+	uint best_path_dist;    ///< The shortest path. Is (uint)-1 if no path is found
+	Trackdir best_trackdir; ///< The trackdir that leads to the shortest path/closest birds dist
+	AyStarNode node;        ///< The node within the target the search led us to
 };
 
 /* These functions below are _not_ re-entrant, in favor of speed! */