diff options
Diffstat (limited to 'tools/tmxcopy/map.hpp')
-rw-r--r-- | tools/tmxcopy/map.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/tmxcopy/map.hpp b/tools/tmxcopy/map.hpp index 4b0ab59a..d6cd3d1a 100644 --- a/tools/tmxcopy/map.hpp +++ b/tools/tmxcopy/map.hpp @@ -78,6 +78,17 @@ struct Tile { return (tileset == -1); } + + /* This is to allow std::map<Tile,Tile> */ + bool operator< (const Tile& b) const + { + return ((tileset < b.tileset) || (index < b.index)); + } + + bool operator!= (const Tile& b) const + { + return ((tileset != b.tileset) || (index != b.index)); + } }; typedef std::vector<Tile> LayerTiles; @@ -131,6 +142,13 @@ class Map int destX, int destY, int destWidth, int destHeight, const ConfigurationOptions& config); + /** + * Translates a layer - using the template, generates collision from visible layers (for example). + * TODO - avoid confusion with the math term "translate" + */ + bool translateAllLayers(Map* templateMap, const std::string& destLayerName, + const ConfigurationOptions& config); + int save(std::string filename); int getNumberOfLayers() { return mLayers.size(); } |