Tiled: Fix tmx2snes version check and update tmj files #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Please wait before to accept this PR, still in progress
This change fixes the problem of tmx2snes when it tries to check if the version of the tmj file (tiled) is supported.
This error is due to the fact that we are trying to compare versions using floats (see #238).
Here the error:
convert map tiled ... map_1_1.m16 /home/kobenairb/workspace/tests/pvsneslib-last/devkitsnes/tools/tmx2snes map_1_1.tmj tiles.map tmx2snes: Loading map: [map_1_1.tmj] tmx2snes: error 'the export version you used (1.9) is not yet supported. The tool supports only the versions from 1.9 to 1.1.'
This change includes the patch in tmx2snes to corretcly handle the version and the update of tmj files (tiled).
I used the latest version of Tiled to do this (1.10.2).
Note In version 1.10.2, it seems that the class property becomes type in the objects list. I updated tmx2snes according to this change. I will retest again in 1.9 and try to find from which minor version the change is introduced.
One possibility would be to no longer accept a version range but simply ensure that the version of the tmj file is greater than or equal to the latest version of Tiled, i.e. 1.10.2 and update our documentation. To see together.
I also updated the tmx2snes version to 1.0.1.
I think this change requires a review, I'm not convinced of the relevance of my method to transform a float into 2 integers.
I might also be better off using #define to initialize supported versions rather than magic numbers:
Version minExportSupportedVersion = {1, 9}; Version maxExportSupportedVersion = {1, 10};
I tested the impacted roms, everything seems okay to me but a double or triple check would be preferable
My apologies for the formatting of tmx2snes.c which makes reviewing more complicated.