1
0
mirror of synced 2024-11-15 09:47:34 +01:00
tja2fumen/testing/data/shoto9.zip
Viv 9ce1d76ca3
Fix branching behavior for #BRANCHSTART r songs (#46)
This PR updates the behavior for songs with drumroll branching
conditions (`#BRANCHSTART r`)

The changes include:

- Correctly setting the `branchInfo` bytes for branching conditions that
occur _after_ the first condition.
- Correctly setting the `branch_points` bytes in the header when there
are only drumroll conditions.
- Correctly setting the `branch_ratio` bytes in the header when total
notes differ between branches.
- Correctly handling #SECTION commands for a number of different corner
cases:
    1. #SECTION occurs on its own without a #BRANCHSTART
    2. #BRANCHSTART occurs with a #SECTION command
3. #BRANCHSTART occurs without a #SECTION command (and is first branch
condition)
4. #BRANCHSTART occurs without a #SECTION command (and is NOT first
branch condition)


Note: I've added `shoto9` to the test suite, but the TJA file is
structured in a way that the number of measures doesn't match the number
of fumen measures. The TJA needs to be reworked, but that's okay,
because its purpose was just to check that the branching bytes were
correct.

Fixes #40.
2023-07-19 16:47:08 -04:00

7.5 KiB