summaryrefslogtreecommitdiff
path: root/src/navigationmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/navigationmanager.cpp')
-rw-r--r--src/navigationmanager.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/navigationmanager.cpp b/src/navigationmanager.cpp
index 38dd0f718..46d930efc 100644
--- a/src/navigationmanager.cpp
+++ b/src/navigationmanager.cpp
@@ -23,12 +23,11 @@
#include "map.h"
#include "walklayer.h"
-#include "resources/resource.h"
-
static const int walkMask = (Map::BLOCKMASK_WALL | Map::BLOCKMASK_AIR
| Map::BLOCKMASK_WATER);
-namespace {
+namespace
+{
struct Cell
{
Cell(const int x0, const int y0) :
@@ -50,7 +49,7 @@ NavigationManager::~NavigationManager()
{
}
-Resource *NavigationManager::loadWalkLayer(Map *const map)
+Resource *NavigationManager::loadWalkLayer(const Map *const map)
{
if (!map)
return nullptr;
@@ -62,12 +61,12 @@ Resource *NavigationManager::loadWalkLayer(Map *const map)
WalkLayer *const walkLayer = new WalkLayer(width, height);
const MetaTile *const tiles = map->getMetaTiles();
- int *data = walkLayer->getData();
+ int *const data = walkLayer->getData();
int x = 0;
int y = 0;
int num = 1;
- while(findWalkableTile(x, y, width, height,tiles, data))
+ while (findWalkableTile(x, y, width, height, tiles, data))
{
fillNum(x, y, width, height, num, tiles, data);
num ++;