You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two little features would make it much easier to plug tmxrasterizer into git as a map differ:
An argument for overriding the initial search path. The problem is, when git diffs two versions of the same file, it has to put at least one of them in a temporary file, and now it doesn't know where to find any of its tilesets. I know the original full path, but I have no way to provide it.
Writing the image to stdout. This isn't strictly necessary since tempfiles are always an option, but it did surprise me a little that giving - as the outfile path literally created a file named - :)
With both, I believe you could diff a map against its committed version with a oneliner (in zsh, anyway):
I quite like this idea! To implement this, the MapFormat interface would need to be extended with an option to read a map while using a custom search path:
The JsonMapFormat can also be quite trivially extended with such an overload. For other formats, I guess providing a default implementation that ignores the custom search path would be fine for now, so we don't need to change all the implementations.
Finally, we would add a Tiled::readMap overload that takes this search path, and we can use it in TmxRasterizer.
And I don't think it'll be an issue to get - to output a PNG to standard out, either. :-)
Two little features would make it much easier to plug
tmxrasterizer
into git as a map differ:An argument for overriding the initial search path. The problem is, when git diffs two versions of the same file, it has to put at least one of them in a temporary file, and now it doesn't know where to find any of its tilesets. I know the original full path, but I have no way to provide it.
Writing the image to stdout. This isn't strictly necessary since tempfiles are always an option, but it did surprise me a little that giving
-
as the outfile path literally created a file named-
:)With both, I believe you could diff a map against its committed version with a oneliner (in zsh, anyway):
The text was updated successfully, but these errors were encountered: