summary refs log tree commit diff stats
path: root/tools/mapedit/src/map.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 21:28:46 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 21:28:46 -0400
commit29f818c314f86f9a842840c20d9634f0711507a6 (patch)
tree46f6445f336cc2b7c5dfc64b6f99459a97a8bc03 /tools/mapedit/src/map.h
parent8b61d93fc869ea39a78cdc134002ef11bf3e69d3 (diff)
downloadtherapy-29f818c314f86f9a842840c20d9634f0711507a6.tar.gz
therapy-29f818c314f86f9a842840c20d9634f0711507a6.tar.bz2
therapy-29f818c314f86f9a842840c20d9634f0711507a6.zip
Added tool to map editor to set game starting position
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);