What was the problem in the end?
Loading TMX requires that you provide information for the tiles, provided in the tilesets in the .tmx file. I was loading the tileset information into a priority queue, which held a custom Object::TileSet class, and had overrode the < operator to compare gid's. However, I put
pointers of the Object::TileSet into priority queue, so it was comparing the memory of the pointers, not the gid.
To solve the problem, I just stored references to the Object::TileSet's in the queue and continued on my merry way.
Like I said, not a SFML problem, and probably not helpful to anybody in the future, so this thread can be deleted.
This is what the TileSet looks like now, I changed the operator override from
bool operator<(const TileSet &b)
to
bool operator<(const TileSet &b) const
namespace Object
{
struct TileSet
{
// ctor, dtor...
virtual ~TileSet(){}
bool operator<(const TileSet &b) const
{
return this->gid > b.gid;
}
sf::Texture* texture;
int gid, spacing, height, width;
};
}
Then I changed the priority queue from
std::priority_queue<Object::TileSet*> tileset_queue;
to
std::priority_queue<Object::TileSet> tileset_queue;