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

245 Commits

Author SHA1 Message Date
Viv
d99c7f5984
Convert TJA/Fumen classes into dataclasses (#57)
This branch was originally used to test out Pydantic. However, after
some profiling, I came to the conclusion that runtime type checking is
overkill for a project like this. So, instead, I'm sticking with static
typing via dataclasses.

Fixes #56.
2023-07-30 12:56:06 -04:00
Viv
03c8892243 README.md: Fix table row for A, B notes 2023-07-27 18:56:16 -04:00
Viv
4a8c6d8fb4 types.py: Sped up LUT parsing with iteration 2023-07-27 18:53:58 -04:00
Viv
e126494496 README.md: Restructure 'notes' part of table 2023-07-27 15:16:09 -04:00
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
59046c22ec Add remaining docstrings/comments 2023-07-27 13:16:44 -04:00
Viv
740ccbcd31 Fix linting issues 2023-07-26 10:17:28 -04:00
Viv
7aead6f8ef parsers.py: Simplify convoluted P1 copying logic 2023-07-25 23:30:16 -04:00
Viv
6ea74ae58b parsers.py: Simplify BPM/OFFSET logic 2023-07-25 23:21:20 -04:00
Viv
3cb25c23c7 parsers.py: Rename current_course_cached to _basename 2023-07-25 23:09:49 -04:00
Viv
24b5828833 parsers.py: Simplify if/elses in split_tja_lines_into_course()
Some highlights:

- Strip comments ahead of time
- _Only_ parse #START in split_tja_lines_into_course()
- Leave all other parsing to parse_tja_course_data()

This makes the function behavior line up with what the docstring suggests, and removes some convoluted parsing in split_tja_lines_into_course().
2023-07-25 23:08:18 -04:00
Viv
fc1b0d1bbc Start adding docstrings and fixing comments 2023-07-25 21:50:12 -04:00
Viv
09a293e59f types.py: Simplify __repr__ using inheritance 2023-07-25 19:20:10 -04:00
Viv
ec72398abe Simplify #SECTION/#BRANCHSTART logic
Previous code was unnecessarily convoluted.
2023-07-25 19:11:28 -04:00
Viv
f088e95e02 converters.py: Move computation into MeasureFumen class 2023-07-25 18:53:02 -04:00
Viv
79cca3d75e README.md: Try adding a Features section 2023-07-24 22:58:22 -04:00
Viv
7baa5ea859 README.md: Improve table spacing for mobile 2023-07-24 22:47:46 -04:00
Viv
d33562fef7 README.md: Update tja2bin crash commands 2023-07-24 17:33:24 -04:00
Viv
86f394e8ca README.md: Update sim-specific wording 2023-07-24 17:28:04 -04:00
Viv
5ca4f080d3 README.md: Clarify #LEVELHOLD status 2023-07-24 17:22:14 -04:00
Viv
a09bfb87d4 Add test for 2P commands 2023-07-24 16:55:52 -04:00
Viv
6eb3676343 Add double Kusudama test 2023-07-24 16:46:21 -04:00
Viv
276bd0b70c Add semi-support for sim-specific notes 2023-07-24 16:28:49 -04:00
Viv
f1cd73ebb9 README.md: Add table for file formats 2023-07-24 16:07:38 -04:00
Viv
45535d6fb1 README.md: Reformat tables using PyCharm 2023-07-24 16:00:04 -04:00
Viv
a4c9fb2b18 Add support for A/B notes (hands) 2023-07-24 15:57:58 -04:00
Viv
4f269630a5 Fix note.type -> note.note_type 2023-07-24 15:50:42 -04:00
Viv
9f71a801ce
Update README.md 2023-07-24 09:21:23 -04:00
Viv
e848fc9499
README.md: Make emoji platform-agnostic 2023-07-24 01:02:53 +00:00
Viv
e799e35629
test_conversion.py: Fix Pylint warnings 2023-07-24 01:00:15 +00:00
Viv
e6cf84758c
.vscode: Add files generated by Codespaces 2023-07-24 00:43:05 +00:00
Viv
cee3819efa testing/: Add test case for missing balloons 2023-07-23 12:15:05 -04:00
Viv
a979b4104a testing/: Add test case for missing balloons 2023-07-23 11:24:18 -04:00
Viv
9501058b38 converters.py: Catch errors when missing balloons 2023-07-23 11:23:35 -04:00
Viv
ca9b0d0332 testing/: Move convert() into conftest.py 2023-07-23 10:20:28 -04:00
Viv
9a24b90618 Add new test for checking dummy TJA errors 2023-07-23 10:11:42 -04:00
Viv
907ea43f16
Update README.md 2023-07-23 09:16:11 -04:00
Viv
3ae4bcc310
README.md: Play with <br> 2023-07-23 09:15:41 -04:00
Viv
ee7a3ae3cf
README.md: Remove ? from legend 2023-07-23 09:14:37 -04:00
Viv
b965633a73
README.md: Split tables into two 2023-07-23 09:11:10 -04:00
Viv
54d0ce402b
README.md: Rearrange table and fix command typos 2023-07-23 08:42:55 -04:00
Viv
eaa824cacf
README.md: Fix issues 2023-07-23 08:31:09 -04:00
Viv
2ca5406cdc
README.md: Shorten tagline 2023-07-22 21:05:26 -04:00
Viv
f4d5a52e5c
README.md: Style Note: paragraph 2023-07-22 21:03:18 -04:00
Viv
e1d562f5ef
README.md: Restructure sections, add badges, add command support
Fixes #43.
2023-07-22 20:57:51 -04:00
Viv
5e313a3549
README.md: Fix logo colors 2023-07-22 18:23:57 -04:00
Viv
9c31f41066
README.md: Add newline 2023-07-22 10:44:26 -04:00
Viv
56df81b59b
README.md: Add logo, divider, smaller headers 2023-07-22 10:41:14 -04:00
Viv
60a9e249cd parsers.py: Rename read_fumen function 2023-07-21 23:18:09 -04:00
Viv
9d0d8b9314 parsers.py: Rename parsed_tja and lines 2023-07-21 23:17:05 -04:00