1
SFML projects / Re: 'Tiled' Tile-map Loader
« on: February 12, 2013, 08:52:36 am »
Thanks! Looks like I had some problem loading the objects. The program never really accepted that some objects had GID and some did not. But looks like it works now with the help of your:
EDIT*
I've been thinking, after a lot of searching in the code example you posted, I only see that you can draw the "normal" layers, but if I wanna draw the object tile (if I have one) can I like put it all in a if/else to have the code go one way if there is a "normal" layer or the other if there is a object layer.
Really been stuck on this today.
Thanks
int gid = (objectElement->Attribute("gid")) ? atoi(objectElement->Attribute("gid")): 0;
EDIT*
I've been thinking, after a lot of searching in the code example you posted, I only see that you can draw the "normal" layers, but if I wanna draw the object tile (if I have one) can I like put it all in a if/else to have the code go one way if there is a "normal" layer or the other if there is a object layer.
Really been stuck on this today.
Thanks