Sorry if this isnt the right forum to post this. I wasnt sure if i should bump this thread
http://en.sfml-dev.org/forums/index.php?topic=3023.0 cos it hasnt been posted in since october.
i'm using
https://github.com/fallahn/sfml-tmxloader with sfml. I'm using it to load .tmx format tilemaps for a platforming game.
My tilemaps are the same size as the game window. I have a MapLoader object called 'ml'. When I load a map for the first time in the program, like ml.Load("level.tmx"), it loads correctly. And when i call either Game.draw(ml) or ml.Draw(Game, tmx::MapLayer::All), where 'Game' is the renderwindow, it draws the map to the whole window like this
http://i.imgur.com/mS6lR3t.png?1 which is what I want.
but if I load another map (or reload the same map) afterwards and try to draw it in the same manner, it will load the whole map, but will only draw a 10x10 grid of the tiles from the origin, like this
http://i.imgur.com/SDJ0Noo.png?1 . I can tell it's still loading the whole map because the collision detection is still working despite the tiles not being drawn. How can I make it draw the whole map again?
edit: so i'm pretty sure it is happening because SetDrawingBounds(rt.getView()) here
https://github.com/fallahn/sfml-tmxloader/blob/master/src/MapLoaderPublic.cpp#L136 is not working after the first map load? I found this out by commenting the line out, which led to the 10x10 grid occuring every time.