summaryrefslogtreecommitdiff
path: root/src/navigationmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-29 21:16:55 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-30 14:43:34 +0300
commit9a39234015f092c5eb0f461da91689e71bf43943 (patch)
treee798f45bc08f3015020972a2db0f015eb8cc0c42 /src/navigationmanager.cpp
parent23a3e48c33b14cc0bda0eb3fda361961e8d6172c (diff)
downloadmanaverse-9a39234015f092c5eb0f461da91689e71bf43943.tar.gz
manaverse-9a39234015f092c5eb0f461da91689e71bf43943.tar.bz2
manaverse-9a39234015f092c5eb0f461da91689e71bf43943.tar.xz
manaverse-9a39234015f092c5eb0f461da91689e71bf43943.zip
Fix code style.
Diffstat (limited to 'src/navigationmanager.cpp')
-rw-r--r--src/navigationmanager.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/navigationmanager.cpp b/src/navigationmanager.cpp
index cf078e06f..de05c62db 100644
--- a/src/navigationmanager.cpp
+++ b/src/navigationmanager.cpp
@@ -80,30 +80,6 @@ Resource *NavigationManager::loadWalkLayer(const Map *const map)
return walkLayer;
}
-#endif
-
-bool NavigationManager::findWalkableTile(int &x1, int &y1,
- const int width,
- const int height,
- const MetaTile *const tiles,
- const int *const data)
-{
- for (int y = 0; y < height; y ++)
- {
- const int y2 = y * width;
- for (int x = 0; x < width; x ++)
- {
- const int ptr = x + y2;
- if (!(tiles[ptr].blockmask & blockWalkMask) && !data[ptr])
- {
- x1 = x;
- y1 = y;
- return true;
- }
- }
- }
- return false;
-}
void NavigationManager::fillNum(int x, int y,
const int width,
@@ -168,3 +144,27 @@ void NavigationManager::fillNum(int x, int y,
}
}
}
+#endif
+
+bool NavigationManager::findWalkableTile(int &x1, int &y1,
+ const int width,
+ const int height,
+ const MetaTile *const tiles,
+ const int *const data)
+{
+ for (int y = 0; y < height; y ++)
+ {
+ const int y2 = y * width;
+ for (int x = 0; x < width; x ++)
+ {
+ const int ptr = x + y2;
+ if (!(tiles[ptr].blockmask & blockWalkMask) && !data[ptr])
+ {
+ x1 = x;
+ y1 = y;
+ return true;
+ }
+ }
+ }
+ return false;
+}