So, I drew in Tiled Map Editor an isometric map and add layers of object (see the pictures below in a hide).
Then I draw a map through the
tinyXml , but with the objects there was a problem. Code I get from
https://en.sfml-dev.org/forums/index.php?topic=3023.0 but modifies it somewhat for an isometric map. But I could not change the mapping of objects. To get the rect of my layer of objects, i use sf::Rect but i get an ortogonal rectangle
Object object;
object.name = objectName;
object.type = objectType;
object.sprite = sprite;
sf::Rect<float> objectRect;
objectRect.top = y;
objectRect.left = x;
objectRect.height = height;
objectRect.width = width;
object.rect = objectRect;
How can this rectangle of objects be tilted to isometric view?
The white rectangle in the picture is the visualization of my layer of objects, that is, the way it looks in my code.
Full code here
https://pastebin.com/U1NG8eKD