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

Asset discovery does not take image dimensions into account #46

Open
som1sezhi opened this issue Jun 20, 2024 · 1 comment
Open

Asset discovery does not take image dimensions into account #46

som1sezhi opened this issue Jun 20, 2024 · 1 comment
Labels
Milestone

Comments

@som1sezhi
Copy link

After looking at filename hints, if some assets are still not found yet, StepMania will look at the dimensions of the remaining images to try to match them to the remaining asset fields; see TidyUpData() in Song.cpp for the exact behavior.

Currently, simfile.assets.Assets does not look at image dimensions, leading to some assets not being found when they should be. For example, Assets fails to find the banner for ITL Online 2023/[10] SUPERHERO [SX], since the simfile #BANNER field is blank and the banner's filename is bn-superhero.png, which does not match any of the known banner filename patterns. However, the image's dimensions are 832x328, which matches this condition that allows StepMania to detect it as a banner.

As an aside, in response to this comment, I believe this behavior is why StepMania is able to find banners named bn.png, even though that name doesn't match any of the banner filename patterns. It's just that the images themselves have the right dimensions to be picked up as banners by the game.

@garcia
Copy link
Owner

garcia commented Jun 21, 2024

What a nightmare of a computer program I've decided to emulate! Thank you so much for figuring this out. I'll take a look at adding this to the 3.0 release.

@garcia garcia added this to the v3 milestone Jun 21, 2024
@garcia garcia added the bug label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants