summary refs log tree commit diff stats
path: root/tools/mapedit/src/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mapedit/src/map.h')
-rw-r--r--tools/mapedit/src/map.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/mapedit/src/map.h b/tools/mapedit/src/map.h index 5753cae..df3e237 100644 --- a/tools/mapedit/src/map.h +++ b/tools/mapedit/src/map.h
@@ -20,6 +20,8 @@ const int GAME_WIDTH = 320;
20const int GAME_HEIGHT = 200; 20const int GAME_HEIGHT = 200;
21const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; 21const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH;
22const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1; 22const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1;
23const int PLAYER_WIDTH[5] = {10, 0, 0, 0, 0};
24const int PLAYER_HEIGHT[5] = {12, 0, 0, 0, 0};
23 25
24class MapLoadException: public std::exception 26class MapLoadException: public std::exception
25{ 27{
@@ -57,6 +59,11 @@ struct MapObjectEntry {
57 { 59 {
58 return (object == other.object) && (position == other.position); 60 return (object == other.object) && (position == other.position);
59 } 61 }
62
63 bool operator!=(MapObjectEntry& other) const
64 {
65 return (object != other.object) && (position != other.position);
66 }
60}; 67};
61 68
62class Map { 69class Map {
@@ -77,6 +84,7 @@ class Map {
77 wxTreeItemId getTreeItemId() const; 84 wxTreeItemId getTreeItemId() const;
78 std::list<std::shared_ptr<Map>> getChildren() const; 85 std::list<std::shared_ptr<Map>> getChildren() const;
79 bool getExpanded() const; 86 bool getExpanded() const;
87 World* getWorld() const;
80 88
81 void setTitle(std::string title, bool dirty = true); 89 void setTitle(std::string title, bool dirty = true);
82 void setTileAt(int x, int y, int tile, bool dirty = true); 90 void setTileAt(int x, int y, int tile, bool dirty = true);