From 25240241e91dc913d20fbb93aa4acc9433dda6a0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Mar 2015 20:58:02 -0400 Subject: Map editor can now save and load (but not edit) entities in maps --- tools/mapedit/src/map.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools/mapedit/src/map.h') 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 @@ #include #include +#include +#include +#include "object.h" +#include const int TILE_WIDTH = 8; const int TILE_HEIGHT = 8; @@ -39,6 +43,11 @@ class MapWriteException: public std::exception std::string mapname; }; +struct MapObjectEntry { + std::shared_ptr object; + std::pair position; +}; + class Map { public: Map(); @@ -55,8 +64,10 @@ class Map { bool hasUnsavedChanges() const; void setTileAt(int x, int y, int tile); int getTileAt(int x, int y) const; + std::list getObjects(); private: + std::list objects; int* mapdata; std::string title; std::string leftmap; -- cgit 1.4.1