From de6302f27a5454bdc8fca2fcc2e958916826450f Mon Sep 17 00:00:00 2001 From: Steve Cotton Date: Sun, 8 Mar 2009 00:34:12 +0000 Subject: Fix tmxcopy off-by-one error translating tilesets The first tiles of each tileset got shuffled. --- tools/tmxcopy/map.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/tmxcopy/map.cpp b/tools/tmxcopy/map.cpp index d9fc8ada..1c374e25 100644 --- a/tools/tmxcopy/map.cpp +++ b/tools/tmxcopy/map.cpp @@ -155,7 +155,7 @@ Map::Map(std::string filename): { for (int s = mTilesets.size()-1; s >= 0; s--) { - if (mTilesets.at(s)->firstgid < gid) + if (mTilesets.at(s)->firstgid <= gid) { layer->at(c).tileset = s; layer->at(c).index = gid - mTilesets.at(s)->firstgid; @@ -204,6 +204,10 @@ bool Map::overwrite( Map* srcMap, std::cerr<<"Error: Area exceeds lower map border of target map!"<getNumberOfLayers() > mLayers.size()) { + std::cerr<<"Error: Source has more layers than target map"< translation; -- cgit v1.2.3-70-g09d2