tmxlite icon indicating copy to clipboard operation
tmxlite copied to clipboard

Not orthogonal and will not be shown

Open DFelipehDEV opened this issue 2 years ago • 3 comments

When i try to add my map to my project, it appears in the console its not orthogonal and it will not be shown, even though it is a orthogonal. If i use the map in the SFML Example it works perfectly imagem imagem imagem

DFelipehDEV avatar Jul 28 '23 15:07 DFelipehDEV

Use the debugger to step into the map loader when it loads the file - specifically look for this line:

https://github.com/fallahn/tmxlite/blob/master/tmxlite/src/Map.cpp#L155

to see what kind of orientation the map is loading.

Also check here:

https://github.com/fallahn/tmxlite/blob/master/SFMLExample/src/SFMLOrthogonalLayer.hpp#L67

The error could be misleading, as the index idx might be out of range or the layer might not be a tile layer, which prints an error about not being orthogonal when it should be printing an error about the current layer. (Technically that's a bug).

fallahn avatar Jul 30 '23 10:07 fallahn

In the debugger it says the orientation is being set to orthogonal but it says after the message "Not a valid orthogonal layer, nothing will be drawn.". I actually tried to downgrade the Tiled version and it worked. I believe the problem is maybe it is not updated to the tiled changes to their .tmx structure?

DFelipehDEV avatar Jul 30 '23 17:07 DFelipehDEV

OK, thanks! I'll have to look into it.

fallahn avatar Jul 30 '23 17:07 fallahn