diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-11 13:54:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-11 13:54:40 +0300 |
commit | 51627b2d480b39025be709fb98210c8388add513 (patch) | |
tree | c9f75eacefb9afad46a91d9a883c9d861526a68a /src/resources/map/map.cpp | |
parent | ad42810bb9484f4930252ecc34b91d83f37e3293 (diff) | |
download | plus-51627b2d480b39025be709fb98210c8388add513.tar.gz plus-51627b2d480b39025be709fb98210c8388add513.tar.bz2 plus-51627b2d480b39025be709fb98210c8388add513.tar.xz plus-51627b2d480b39025be709fb98210c8388add513.zip |
Extract Location into separate file.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r-- | src/resources/map/map.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index c753b0202..1a95fced8 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -43,6 +43,8 @@ #include "resources/resourcemanager.h" #include "resources/subimage.h" +#include "resources/map/location.h" + #include "utils/delete2.h" #include "utils/dtor.h" #include "utils/mkdir.h" @@ -56,30 +58,6 @@ #include "debug.h" -/** - * A location on a tile map. Used for pathfinding, open list. - */ -struct Location final -{ - /** - * Constructor. - */ - Location(const int px, const int py, MetaTile *const ptile): - x(px), y(py), tile(ptile) - {} - - /** - * Comparison operator. - */ - bool operator< (const Location &loc) const - { - return tile->Fcost > loc.tile->Fcost; - } - - int x, y; - MetaTile *tile; -}; - class ActorFunctuator final { public: |