All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
SumPathLength Struct Reference

Public Member Functions

 SumPathLength (PathInfo *info)
bool operator() (int32_t iX, int32_t iY, C4Object *TransferTarget)

Detailed Description

Definition at line 2057 of file C4GameScript.cpp.

Constructor & Destructor Documentation

SumPathLength::SumPathLength ( PathInfo info)

Definition at line 2059 of file C4GameScript.cpp.

2059 : pPathInfo(info) {}

Member Function Documentation

bool SumPathLength::operator() ( int32_t  iX,
int32_t  iY,
C4Object TransferTarget 

Definition at line 2060 of file C4GameScript.cpp.

References Distance(), PathInfo::ilen, PathInfo::ilx, and PathInfo::ily.

2061  {
2062  pPathInfo->ilen += Distance(pPathInfo->ilx, pPathInfo->ily, iX, iY);
2063  pPathInfo->ilx = iX;
2064  pPathInfo->ily = iY;
2065  return true;
2066  }
int32_t Distance(int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2)
Definition: Standard.cpp:25

Here is the call graph for this function:

The documentation for this struct was generated from the following file: