summaryrefslogtreecommitdiff
path: root/src/resources/map/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-11 13:54:40 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-11 13:54:40 +0300
commit51627b2d480b39025be709fb98210c8388add513 (patch)
treec9f75eacefb9afad46a91d9a883c9d861526a68a /src/resources/map/map.cpp
parentad42810bb9484f4930252ecc34b91d83f37e3293 (diff)
downloadmv-51627b2d480b39025be709fb98210c8388add513.tar.gz
mv-51627b2d480b39025be709fb98210c8388add513.tar.bz2
mv-51627b2d480b39025be709fb98210c8388add513.tar.xz
mv-51627b2d480b39025be709fb98210c8388add513.zip
Extract Location into separate file.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r--src/resources/map/map.cpp26
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: