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

Fix edge case with 2024.6+ masks #2034

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Conversation

colinator27
Copy link
Member

Description

Fixes #2033. However, note that the game for that issue is in 2024.11, so these changes will need to be pulled downstream for this to fully affect that game.

It seems that certain sprites in 2024.6, such as empty sprites, will produce bounding boxes that are inverted, which creates negative collision mask width/height values... This causes weird behavior, with collision masks being generated at strange sizes from negative calculations (the negatives coincidentally cancel each other out, giving a positive mask length).

Caveats

This may break some scripts depending on uint rather than int, but I did a search to fix as many as I could. I also updated UndertaleSprite.NewMaskEntry to take in UndertaleData, so that it can account for 2024.6 as well.

Notes

I also added two FIXMEs for the import graphics scripts that have not yet accounted for 2024.6, but that can come in later PRs.

@colinator27
Copy link
Member Author

Going to merge this in now so that downstream PRs (mostly 2024.11) have access to it (and this is pretty small).

@colinator27 colinator27 merged commit 915858a into master Feb 9, 2025
5 checks passed
@colinator27 colinator27 deleted the 2024-6-mask-edge-case branch February 9, 2025 02:07
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.

Unable to open latest beta release of Heartbound
1 participant