Skip to content

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

@jesseyao89

Description

@jesseyao89

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions