1
0
mirror of synced 2024-11-15 01:47:34 +01:00

Add semi-support for sim-specific notes

This commit is contained in:
Viv 2023-07-24 16:28:49 -04:00
parent f1cd73ebb9
commit 276bd0b70c
5 changed files with 33 additions and 4 deletions

View File

@ -63,7 +63,7 @@ If there is an unsupported feature that you would like support for, please make
|-------------------------------------------------|-----------|---------|----------------------------------------------------------------------| |-------------------------------------------------|-----------|---------|----------------------------------------------------------------------|
| `0`, `1`, `2`, `3`, `4` `5`, `6`, `7`, `8`, `9` | `✅` | `✅` | | | `0`, `1`, `2`, `3`, `4` `5`, `6`, `7`, `8`, `9` | `✅` | `✅` | |
| `A`, `B` | `✅` | `❌` | | | `A`, `B` | `✅` | `❌` | |
| `F` | `❔` | `❔` | Hidden ADLIB note. | | `C`, `D`, `E`, `F`, `G`, `H`, `I` | `⚠️` | `❌` | Replaced by normal notes/rolls in tja2fumen. |
| `9000,`<br>`9008,` | `⚪️` | `❔` | Double Kusudama note to reset accuracy. | | `9000,`<br>`9008,` | `⚪️` | `❔` | Double Kusudama note to reset accuracy. |
| `#START`, `#END` | `✅` | `✅` | | | `#START`, `#END` | `✅` | `✅` | |
| `#START P1`, `START P2` | `✅` | `❔` | | | `#START P1`, `START P2` | `✅` | `❔` | |

View File

@ -1,4 +1,5 @@
TJA_NOTE_TYPES = { TJA_NOTE_TYPES = {
'0': 'Blank',
'1': 'Don', '1': 'Don',
'2': 'Ka', '2': 'Ka',
'3': 'DON', '3': 'DON',
@ -10,6 +11,13 @@ TJA_NOTE_TYPES = {
'9': 'Kusudama', '9': 'Kusudama',
'A': 'DON2', # hands 'A': 'DON2', # hands
'B': 'KA2', # hands 'B': 'KA2', # hands
'C': 'Blank', # bombs
'D': 'Drumroll', # fuse roll
'E': 'DON2', # red + green single hit
'F': 'Ka', # ADLib (hidden note)
'G': 'KA2', # red + green double hit
'H': 'DRUMROLL', # double roll
'I': 'Drumroll', # green roll
} }
FUMEN_NOTE_TYPES = { FUMEN_NOTE_TYPES = {

View File

@ -249,7 +249,8 @@ def parse_tja_course_data(course):
for branch_name, branch in course.branches.items(): for branch_name, branch in course.branches.items():
for measure in branch: for measure in branch:
notes = [TJAData('note', TJA_NOTE_TYPES[note], i) notes = [TJAData('note', TJA_NOTE_TYPES[note], i)
for i, note in enumerate(measure.notes) if note != '0'] for i, note in enumerate(measure.notes) if
TJA_NOTE_TYPES[note] != 'Blank']
events = measure.events events = measure.events
while notes or events: while notes or events:
if events and notes: if events and notes:

View File

@ -0,0 +1,19 @@
// This song contains only basic notes.
BPM:120
OFFSET:-1.00
COURSE:Oni
LEVEL:10
BALLOON:8,8
SCOREINIT:400
SCOREDIFF:100
#START
C0C0,
D008,
E0E0,
F0F0,
G0G0,
H008,
I008,
#END

View File

@ -9,6 +9,7 @@ from conftest import convert
@pytest.mark.parametrize('id_song,err_msg', [ @pytest.mark.parametrize('id_song,err_msg', [
['basic_song', None], ['basic_song', None],
['notes_hands', None], ['notes_hands', None],
['notes_sim_only', None],
['missing_score', None], ['missing_score', None],
['missing_balloon', "Not enough values for 'BALLOON:"], ['missing_balloon', "Not enough values for 'BALLOON:"],
['missing_course', "Invalid COURSE value:"], ['missing_course', "Invalid COURSE value:"],