diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-16 21:28:46 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-16 21:28:46 -0400 |
commit | 29f818c314f86f9a842840c20d9634f0711507a6 (patch) | |
tree | 46f6445f336cc2b7c5dfc64b6f99459a97a8bc03 /tools/mapedit/src/map.h | |
parent | 8b61d93fc869ea39a78cdc134002ef11bf3e69d3 (diff) | |
download | therapy-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.h | 8 |
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; | |||
20 | const int GAME_HEIGHT = 200; | 20 | const int GAME_HEIGHT = 200; |
21 | const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; | 21 | const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; |
22 | const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1; | 22 | const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1; |
23 | const int PLAYER_WIDTH[5] = {10, 0, 0, 0, 0}; | ||
24 | const int PLAYER_HEIGHT[5] = {12, 0, 0, 0, 0}; | ||
23 | 25 | ||
24 | class MapLoadException: public std::exception | 26 | class 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 | ||
62 | class Map { | 69 | class 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); |