diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-29 21:16:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-30 14:43:34 +0300 |
commit | 9a39234015f092c5eb0f461da91689e71bf43943 (patch) | |
tree | e798f45bc08f3015020972a2db0f015eb8cc0c42 /src/navigationmanager.cpp | |
parent | 23a3e48c33b14cc0bda0eb3fda361961e8d6172c (diff) | |
download | plus-9a39234015f092c5eb0f461da91689e71bf43943.tar.gz plus-9a39234015f092c5eb0f461da91689e71bf43943.tar.bz2 plus-9a39234015f092c5eb0f461da91689e71bf43943.tar.xz plus-9a39234015f092c5eb0f461da91689e71bf43943.zip |
Fix code style.
Diffstat (limited to 'src/navigationmanager.cpp')
-rw-r--r-- | src/navigationmanager.cpp | 48 |
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; +} |