I think there is a bug to calculating x, y position of object in CCTMXMapInfo, CCTMXXMLParser.cpp.
x position is just stored with position offset.
int x = atoi(value) + (int)objectGroup->getPositionOffset().x;@
y position is calculating as
int y = atoi(value) + (int)objectGroup->getPositionOffset().y;
y = (int)(m_tMapSize.height * m_tTileSize.height) - y - atoi(valueForKey("height", attributeDict));
It may correct for Orthogonal map
but it is not correct for Isometric map and may also Hexagonal.
let’s say map is 30x30, tilesize is 200x100.
the location for the coord (0, 0) object in Isometric map should be the center of the very top.
It’s position is stored as following in tmx file
and in source code, following is calcuation
x = 0;
but which should be the center of position which shoud be the 2900 \~ 3100.
y = (int)(m_tMapSize.height * m_tTileSize.height) - y - atoi(valueForKey(“height”, attributeDict));
y = 30 * 100 - 0 - 100
What do you think?