1
0
mirror of synced 2024-11-24 05:30:11 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
Viv
c0442f3721
Fix behavior for the #LEVELHOLD command (#54)
Previously, I had translated the existing levelhold behavior in
WHMHammer's tja parsing code, assuming that it would produce the correct
behavior for fumen charts. However, that is not the case -- the behavior
is completely wrong.

So, this PR takes out all the old `flag_levelhold` behavior and instead
properly sets the `branch_info` bytes whenever #LEVELHOLD is present on
a branch.

This PR also prepares `shoto9.tja` for further testing, but I'm leaving
that for later...

Fixes #52.
2023-07-27 15:02:19 -04:00
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