-
Notifications
You must be signed in to change notification settings - Fork 435
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
FlxAtlasFrames#fromLibGdx(): fix offset for whitespace-stripped atlases #1923
Conversation
Catch up with upstream.
FlxTilemapTest: add a basic test for loadMapFromGraphic()
Catch up with upstream.
Fix VCR to record simultaneous keys+mouse, closes HaxeFlixel#1739 (HaxeFlixel#1825)
Catch up with upstream.
Catch up with upstream.
Catch up with upstream.
Add function to get sound length.
Revert "Add function to get sound length."
I'm going to wait on this one until libgdx/libgdx#4288 gets a reply.. I'm not familiar with the format at all. |
Sure, if you want. But with flixel how it is now, it produces funny output like this: This PR fixes that. Whether libgdx folk think that's how it should work or not, currently there's a mismatch between libgdx's output and what flixel does with it. If they change libgdx, that would be the time to change flixel back, I think. If they don't, it's fixed. (Actually, the output's even funnier looking with debug drawing on if you compare with the original unpacked sprites, because she's stuck to the top of the debug box on every frame rather than rooted near the bottom.) |
The TexturePackerAtlas demo simply doesn't have any assets that use this feature? I didn't notice any issues there. |
You mean the demo? It has one that uses a libgdx atlas (although maybe not with whitespace stripping used? not sure), but you'll only notice on sprites that aren't vertically centred, if you also know exactly where you expect the sprite to be (debug mode boxes help here.) |
Correction, I think the demo does not use a whitespace-stripped atlas: https://github.com/HaxeFlixel/flixel-demos/blob/master/Editors/TexturePackerAtlas/assets/libgdx/test-me.pack#L11 and similar lines all have no offset. The offset tells where the smaller image is, within the extra transparency of the original image. |
I think it would be good if we had an example with this issue in the demo. |
(Edit, sorry, first demo I made did not show the problem quite as obviously as the above, so I just used the above graphics.) Windows source for the demo is here if anyone needs to test libgdx output. Includes yesterday's nightly of the standalone packer: PR for the demo is at HaxeFlixel/flixel-demos#245 |
With the demo updated to showcase the bug (and working correctly with your changes), I actually feel fairly confident merging this. Thanks! |
No description provided.