diff options
Diffstat (limited to 'tools/mapedit/src/world.h')
| -rw-r--r-- | tools/mapedit/src/world.h | 45 |
1 files changed, 45 insertions, 0 deletions
| diff --git a/tools/mapedit/src/world.h b/tools/mapedit/src/world.h new file mode 100644 index 0000000..7d796cc --- /dev/null +++ b/tools/mapedit/src/world.h | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | #ifndef WORLD_H | ||
| 2 | #define WORLD_H | ||
| 3 | |||
| 4 | class World; | ||
| 5 | |||
| 6 | #include <wx/wxprec.h> | ||
| 7 | |||
| 8 | #ifndef WX_PRECOMP | ||
| 9 | #include <wx/wx.h> | ||
| 10 | #endif | ||
| 11 | |||
| 12 | #include <wx/treectrl.h> | ||
| 13 | #include <map> | ||
| 14 | #include <memory> | ||
| 15 | #include "map.h" | ||
| 16 | #include <list> | ||
| 17 | |||
| 18 | class MapeditFrame; | ||
| 19 | |||
| 20 | class World { | ||
| 21 | public: | ||
| 22 | World(); | ||
| 23 | World(std::string filename); | ||
| 24 | std::shared_ptr<Map> newMap(); | ||
| 25 | std::shared_ptr<Map> getMap(int id) const; | ||
| 26 | void setDirty(bool dirty); | ||
| 27 | bool getDirty() const; | ||
| 28 | std::string getFilename() const; | ||
| 29 | void setParent(MapeditFrame* parent); | ||
| 30 | void save(std::string filename, wxTreeCtrl* mapTree); | ||
| 31 | Map* getLastMap() const; | ||
| 32 | std::list<std::shared_ptr<Map>> getRootMaps() const; | ||
| 33 | const std::map<int, std::shared_ptr<Map>> getMaps() const; | ||
| 34 | |||
| 35 | private: | ||
| 36 | MapeditFrame* parent; | ||
| 37 | std::map<int, std::shared_ptr<Map>> maps; | ||
| 38 | int nextMapID = 0; | ||
| 39 | bool dirty = false; | ||
| 40 | std::string filename; | ||
| 41 | int lastmap = 0; | ||
| 42 | std::list<int> rootChildren; | ||
| 43 | }; | ||
| 44 | |||
| 45 | #endif | ||
