diff options
Diffstat (limited to 'tools/mapedit/src/map.h')
-rw-r--r-- | tools/mapedit/src/map.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/mapedit/src/map.h b/tools/mapedit/src/map.h index 45ec7e1..52e047d 100644 --- a/tools/mapedit/src/map.h +++ b/tools/mapedit/src/map.h | |||
@@ -3,6 +3,10 @@ | |||
3 | 3 | ||
4 | #include <string> | 4 | #include <string> |
5 | #include <exception> | 5 | #include <exception> |
6 | #include <utility> | ||
7 | #include <list> | ||
8 | #include "object.h" | ||
9 | #include <memory> | ||
6 | 10 | ||
7 | const int TILE_WIDTH = 8; | 11 | const int TILE_WIDTH = 8; |
8 | const int TILE_HEIGHT = 8; | 12 | const int TILE_HEIGHT = 8; |
@@ -39,6 +43,11 @@ class MapWriteException: public std::exception | |||
39 | std::string mapname; | 43 | std::string mapname; |
40 | }; | 44 | }; |
41 | 45 | ||
46 | struct MapObjectEntry { | ||
47 | std::shared_ptr<MapObject> object; | ||
48 | std::pair<double, double> position; | ||
49 | }; | ||
50 | |||
42 | class Map { | 51 | class Map { |
43 | public: | 52 | public: |
44 | Map(); | 53 | Map(); |
@@ -55,8 +64,10 @@ class Map { | |||
55 | bool hasUnsavedChanges() const; | 64 | bool hasUnsavedChanges() const; |
56 | void setTileAt(int x, int y, int tile); | 65 | void setTileAt(int x, int y, int tile); |
57 | int getTileAt(int x, int y) const; | 66 | int getTileAt(int x, int y) const; |
67 | std::list<MapObjectEntry> getObjects(); | ||
58 | 68 | ||
59 | private: | 69 | private: |
70 | std::list<MapObjectEntry> objects; | ||
60 | int* mapdata; | 71 | int* mapdata; |
61 | std::string title; | 72 | std::string title; |
62 | std::string leftmap; | 73 | std::string leftmap; |