OpenClonk
 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 2059 of file C4GameScript.cpp.

Constructor & Destructor Documentation

SumPathLength::SumPathLength ( PathInfo info)
inlineexplicit

Definition at line 2061 of file C4GameScript.cpp.

2061 : pPathInfo(info) {}

Member Function Documentation

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

Definition at line 2062 of file C4GameScript.cpp.

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

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

Here is the call graph for this function:


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