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

SimfilePack.banner()'s behaviour can differ from game if multiple images are present #44

Open
jesseyao89 opened this issue Feb 3, 2024 · 0 comments
Milestone

Comments

@jesseyao89
Copy link

Stumbled upon this when I created a SimfilePack using the ITG Level Asian pack and found that banner() gave cdtitle-tetaes.png instead of the expected bn.png. This doesn't seem to happen consistently, however.

I decided to try and investigate this. My C++ knowledge is pretty lacking, but from looking through the StepMania code, I suspect the data structure ultimately being iterated through to find the pack banner file is an std::set, which apparently maintains an order on its elements, in this case alphabetically by filename. Therefore, we pick the alphabetically first file satisfying the required conditions to be the pack banner, which seems to match up with the behaviour I observed testing the game manually. In contrast, os.listdir() (what simfile uses) does not guarantee its results will be ordered at all, which I think this is where this discrepancy came from. This might need a more thorough investigation to figure out the exact behaviours, though.

@garcia garcia added this to the v3 milestone Jun 18, 2024
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

No branches or pull requests

2 participants