1
0
mirror of synced 2024-11-30 23:57:16 +01:00
Commit Graph

25 Commits

Author SHA1 Message Date
Viv
35ba7bfeba parsetja.py: Move parseLine function down
My main focus will be rewriting the `getCourse` function, so I want it to be at the top.
2023-06-02 17:43:58 -04:00
Viv
355d3a10f9 parsetja.py: Condense parseLine function 2023-06-02 17:43:58 -04:00
Viv
f77f31dcd0 parsetja.py: Condense global lists to save space 2023-06-02 17:43:58 -04:00
Viv
0cd8c93922 parsetja.py: Simplify the parseTJA function
No real functionality changes, just making the function simpler and easier to understand.
2023-06-02 17:43:58 -04:00
Viv
93dd1355f8 Add TJA parser (translated from JavaScript)
Source: https://github.com/WHMHammer/tja-tools/blob/master/src/js/parseTJA.js
2023-06-02 17:43:58 -04:00
Viv
8fa6295efa tja2fumen.py: Add TODOs for reverse engineering fumens 2023-06-02 17:43:58 -04:00
Viv
3b2111ae31 tja2fumen.py: Fix assumption about drumroll padding bytes
The 8 bytes after a drumroll are NOT just padding, as
`fumen2osu.py` assumed. There is some kind of metadata here;
I just need to determine what it stands for.
2023-06-02 17:43:58 -04:00
Viv
0c95ff11f3 tja2fumen.py: Account for additional unknown metadata
I'm not sure what these 4 bytes represent yet.
2023-06-02 17:43:58 -04:00
Viv
0995de89ae tja2fumen.py: Add function to validate rewritten fumens 2023-06-02 17:43:58 -04:00
Viv
9879cd9b7c tja2fumen.py: Rewrite song information to fumen files
On at least one song I've tested, this creates a perfect match,
meaning that we now have the ability to create a fumen file
from a "song" object.

The next challenge is reading TJA files into "song" objects.
2023-06-02 17:43:58 -04:00
Viv
adbc81a9c2 tja2fumen.py: Store additional metadata in song objects
The original `readFumen()` function ignored storing information
that was irrelevant for writing osu files.

Now, however, we store this information for the purposes of
*writing* valid fumen files.

Although much of this information is probably irrelevant, doing so
ensures that we can get a 1:1 match between input and output,
which builds a solid foundation for converting TJAs to fumens.
2023-06-02 17:43:58 -04:00
Viv
9fe28513d5 tja2fumen.py: Read the "unknown" part of the header
This seems to contain metadata that was ignored by the
original `readFumen()` function. I'm curious to explore
what these values represent, and how they vary from
fumen to fumen.
2023-06-02 17:43:58 -04:00
Viv
4995a4bee1 tja2fumen.py: Differentiate between note types
Having multiple note values map to identical strings
(e.g. "Don", "Ka", "DON", "KA") caused issues when
writing these strings back to .fumen files.

So, we make sure that each note type has a unique
string associated with it.
2023-06-02 17:43:58 -04:00
Viv
42f302eff0 tja2fumen.py: Add workaround for deo_n.bin song
I think this file has inaccurate metadata, so I've added a workaround
so that it will still parse.
2023-06-02 17:43:58 -04:00
Viv
f586372343 tja2fumen.py: Add new note types for Wii1/Wii4/PS4
I still don't know what these note types represent in the song,
but I'll figure it out later on!
2023-06-02 17:43:58 -04:00
Viv
48b9ae488f tja2fumen.py: Add new checkValidHeader function
This runs successfully against all 1800+ UM4 fumens.
2023-06-02 17:43:58 -04:00
Viv
ddce1b53de tja2fumen.py: Add extensive comments to readFumen()
Some lines of code were rearranged for clarity purposes.
2023-06-02 17:43:58 -04:00
Viv
9fe0fceced tja2fumen.py: Refactor readStruct and provide documentation 2023-06-02 17:43:58 -04:00
Viv
8c707a50d2 tja2fumen.py: Make noteTypes a global constant 2023-06-02 17:43:58 -04:00
Viv
a1f1f8407a tja2fumen.py: Replace debugPrint with exception for debugging 2023-06-02 17:43:58 -04:00
Viv
a8b50c554c tja2fumen.py: Replace writeOsu with a debug breakpoint 2023-06-02 17:43:58 -04:00
Viv
d08cde8061 tja2fumen.py: Rename fumen2osu_version 2023-06-02 17:43:57 -04:00
Viv
55875aa1ff tja2fumen.py: Fix linting issues 2023-06-02 17:43:57 -04:00
Viv
9b1ee88510 tja2fumen.py: Convert tabs to spaces 2023-06-02 17:43:57 -04:00
Viv
7e7591e688 Use fumen2osu as a baseline for tja2fumen 2023-06-02 17:43:57 -04:00