#include <C4PathFinder.h>
Public Types | |
typedef std::function< bool(int32_t x, int32_t y)> | PointFreeFn |
typedef std::function< bool(int32_t x, int32_t y, C4Object *transfer_object)> | SetWaypointFn |
Public Member Functions | |
C4PathFinder () | |
~C4PathFinder () | |
void | Draw (C4TargetFacet &cgo) |
void | Clear () |
void | Default () |
void | Init (PointFreeFn fnPointFree, C4TransferZones *pTransferZones=nullptr) |
bool | Find (int32_t iFromX, int32_t iFromY, int32_t iToX, int32_t iToY, SetWaypointFn fnSetWaypoint) |
void | EnableTransferZones (bool fEnabled) |
void | SetLevel (int iLevel) |
Friends | |
class | C4PathFinderRay |
Definition at line 27 of file C4PathFinder.h.
typedef std::function<bool(int32_t x, int32_t y)> C4PathFinder::PointFreeFn |
Definition at line 34 of file C4PathFinder.h.
typedef std::function<bool(int32_t x, int32_t y, C4Object *transfer_object)> C4PathFinder::SetWaypointFn |
Definition at line 35 of file C4PathFinder.h.
C4PathFinder::C4PathFinder | ( | ) |
Definition at line 537 of file C4PathFinder.cpp.
References Default().
C4PathFinder::~C4PathFinder | ( | ) |
Definition at line 542 of file C4PathFinder.cpp.
References Clear().
void C4PathFinder::Clear | ( | ) |
Definition at line 558 of file C4PathFinder.cpp.
References C4PathFinderRay::Next.
Referenced by C4Game::Clear(), Find(), and ~C4PathFinder().
void C4PathFinder::Default | ( | ) |
Definition at line 547 of file C4PathFinder.cpp.
Referenced by C4PathFinder(), and C4Game::Default().
void C4PathFinder::Draw | ( | C4TargetFacet & | cgo | ) |
Definition at line 582 of file C4PathFinder.cpp.
References C4TransferZones::Draw(), and C4PathFinderRay::Next.
Referenced by C4Viewport::Draw().
void C4PathFinder::EnableTransferZones | ( | bool | fEnabled | ) |
Definition at line 572 of file C4PathFinder.cpp.
Referenced by C4Command::MoveTo().
bool C4PathFinder::Find | ( | int32_t | iFromX, |
int32_t | iFromY, | ||
int32_t | iToX, | ||
int32_t | iToY, | ||
SetWaypointFn | fnSetWaypoint | ||
) |
Definition at line 623 of file C4PathFinder.cpp.
References C4PF_Direction_Left, C4PF_Direction_Right, and Clear().
Referenced by C4Command::MoveTo().
void C4PathFinder::Init | ( | PointFreeFn | fnPointFree, |
C4TransferZones * | pTransferZones = nullptr |
||
) |
Definition at line 565 of file C4PathFinder.cpp.
void C4PathFinder::SetLevel | ( | int | iLevel | ) |
Definition at line 577 of file C4PathFinder.cpp.
References Clamp().
Referenced by C4Command::MoveTo().
|
friend |
Definition at line 29 of file C4PathFinder.h.