#include <navigationmanager.h>
|
static bool | findWalkableTile (int &x1, int &y1, const int width, const int height, const MetaTile *const tiles, const int *const data) |
|
static void | fillNum (int x, int y, const int width, const int height, const int num, const MetaTile *const tiles, int *const data) |
|
Definition at line 32 of file navigationmanager.h.
◆ NavigationManager()
NavigationManager::NavigationManager |
( |
| ) |
|
◆ ~NavigationManager()
NavigationManager::~NavigationManager |
( |
| ) |
|
◆ fillNum()
void NavigationManager::fillNum |
( |
int |
x, |
|
|
int |
y, |
|
|
const int |
width, |
|
|
const int |
height, |
|
|
const int |
num, |
|
|
const MetaTile *const |
tiles, |
|
|
int *const |
data |
|
) |
| |
|
staticprivate |
Definition at line 92 of file navigationmanager.cpp.
99 STD_VECTOR<Cell> cells;
100 cells.push_back(Cell(
x,
y));
101 while (!cells.empty())
103 const Cell cell = cells.back();
108 data[
x + width *
y] = num;
111 ptr = (
x - 1) + width *
y;
115 cells.push_back(Cell(
x - 1,
y));
122 ptr = (
x + 1) + width *
y;
126 cells.push_back(Cell(
x + 1,
y));
133 ptr =
x + width * (
y - 1);
137 cells.push_back(Cell(
x,
y - 1));
144 ptr =
x + width * (
y + 1);
148 cells.push_back(Cell(
x,
y + 1));
static const int blockWalkMask
References blockWalkMask, data, x, and y.
◆ findWalkableTile()
bool NavigationManager::findWalkableTile |
( |
int & |
x1, |
|
|
int & |
y1, |
|
|
const int |
width, |
|
|
const int |
height, |
|
|
const MetaTile *const |
tiles, |
|
|
const int *const |
data |
|
) |
| |
|
staticprivate |
◆ loadWalkLayer()
Resource * NavigationManager::loadWalkLayer |
( |
const Map *const |
map | ) |
|
|
static |
Definition at line 64 of file navigationmanager.cpp.
71 if (width < 2 || height < 2)
77 if ((tiles ==
nullptr) || (
data ==
nullptr))
const MetaTile * getMetaTiles() const
static bool findWalkableTile(int &x1, int &y1, const int width, const int height, const MetaTile *const tiles, const int *const data)
static void fillNum(int x, int y, const int width, const int height, const int num, const MetaTile *const tiles, int *const data)
References data, WalkLayer::getData(), Map::getHeight(), Map::getMetaTiles(), Map::getWidth(), x, and y.
Referenced by WalkLayerLoader::load().
The documentation for this class was generated from the following files: