Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for .world files in tmxrasterizer #2067

Merged
merged 5 commits into from
Mar 26, 2019

Conversation

RainingChain
Copy link
Contributor

With this PR, users will be able to convert a .world file into a .png file by running the command :
tmxrasterizer [options...]

This PR does not affect .tmx/.json conversion to png.

Copy link
Member

@bjorn bjorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great patch overal! I only had minor comments, which I have put inline.

src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/main.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
@bjorn
Copy link
Member

bjorn commented Mar 12, 2019

@RainingChain You seem to have marked all my comments as resolved, but have not pushed a new version of your commit. Did you forget?

@RainingChain
Copy link
Contributor Author

@RainingChain You seem to have marked all my comments as resolved, but have not pushed a new version of your commit. Did you forget?

My PR has a bug because the width of maps is not initialized upon calling WorldManager::privateLoadWorld().

I think I'll just calculate the correct map size in TmxRasterizer::renderWorld().

@bjorn
Copy link
Member

bjorn commented Mar 13, 2019

@RainingChain If you push your updated commit I can also see if I can help with that. I think the easiest would be to load each map and rely on MapRenderer::mapBoundingRect. I hope that tileset caching can ensure that this won't add too much of a performance hit.

@RainingChain
Copy link
Contributor Author

I fixed the map boundaries bug and made the changes you requested.

@bjorn bjorn merged commit 254f3c9 into mapeditor:master Mar 26, 2019
@bjorn
Copy link
Member

bjorn commented Mar 26, 2019

@RainingChain Thanks a lot!

Ruin0x11 pushed a commit to Ruin0x11/tiled that referenced this pull request May 15, 2019
@bjorn bjorn mentioned this pull request Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants