* Fix several Doxygen comments and assign some to the group pathfinding

* Use ARRAY_SIZE(nodeArray[x]) to determine the amount of elements in nodeArray[x], instead of ARRAY_SIZE(nodeArray)
 * Add Dennis Luxen's comment from patch #1059


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4840 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-04-28 17:33:17 +00:00
parent ffd381cd63
commit eedd38bd80
1 changed files with 12 additions and 6 deletions

View File

@ -43,7 +43,9 @@ static SDWORD astarOuter, astarRemove;
*/
int astarInner = 0;
/** The structure to store a node of the route in the hash table
/** The structure to store a node of the route in node table
*
* @ingroup pathfinding
*/
typedef struct _fp_node
{
@ -59,7 +61,7 @@ typedef struct _fp_node
#define NT_OPEN 1
#define NT_CLOSED 2
/** List of open nodes in the hash table
/** List of open nodes
*/
static FP_NODE* psOpen;
@ -136,7 +138,7 @@ static void fpathTableReset(void)
for (x = 0; x < ARRAY_SIZE(nodeArray); ++x)
{
for (y = 0; y < ARRAY_SIZE(nodeArray); ++y)
for (y = 0; y < ARRAY_SIZE(nodeArray[x]); ++y)
{
if (nodeArray[x][y])
{
@ -486,9 +488,13 @@ static FP_NODE *psNearest, *psRoute;
if (psRoute)
{
// get the route in the correct order
// If as I suspect this is to reverse the list, then it's my suspicion that
// we could route from destination to source as opposed to source to
// destination. We could then save the reversal. to risky to try now...Alex M
// If as I suspect this is to reverse the list, then it's my suspicion that
// we could route from destination to source as opposed to source to
// destination. We could then save the reversal. to risky to try now...Alex M
//
// The idea is impractical, because you can't guarentee that the target is
// reachable. As I see it, this is the reason why psNearest got introduced.
// -- Dennis L.
psParent = NULL;
for(psCurr=psRoute; psCurr; psCurr=psNext)
{