Skip to content

added PolygonRegionLoader for the AssetManager#1602

Merged
badlogic merged 5 commits intolibgdx:masterfrom
dermetfan:master
Apr 9, 2014
Merged

added PolygonRegionLoader for the AssetManager#1602
badlogic merged 5 commits intolibgdx:masterfrom
dermetfan:master

Conversation

@dermetfan
Copy link
Contributor

I felt like it may be useful, so I added the PolygonRegionLoader from libgdx-utils. I also added it to the default loaders of the AssetManager in its constructor.

The PolygonRegionLoader uses the com.badlogic.gdx.graphics.g2d.PolygonRegionLoader but is an AssetLoader. The line starting with "i " (can be configured using PolygonRegionParameters) in PSH files is used to figure out which Texture it depends on. If that line does not exist, a sibling of the PSH file with the same name and an image file name extension (like "png", "jpeg", ... can be configured) is searched.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

replaced with TimeUtils for platform compatibility

Copy link
Member

Choose a reason for hiding this comment

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

please don't refactor things like this, the original author may have a reason to use curlies, also, if and for on the same line is really bad form.

happy to merge jf you fix these changes.

@dermetfan
Copy link
Contributor Author

Ok @badlogic, the changes in total should be minimal now. Sorry for the commit mess.

badlogic added a commit that referenced this pull request Apr 9, 2014
added PolygonRegionLoader for the AssetManager
@badlogic badlogic merged commit e3e3169 into libgdx:master Apr 9, 2014
@badlogic
Copy link
Member

badlogic commented Apr 9, 2014

Cool, thanks!

@MobiDevelop
Copy link
Member

Why does this wrap the existing PolygonRegionLoader? Why not just make the existing loader a proper AssetLoader?

@badlogic
Copy link
Member

badlogic commented Apr 9, 2014

Good point. The wrapping is OK, letting the loader implement AssetLoader would be even better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants