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

parsers.py: Condense readFumen

This commit is contained in:
Viv 2023-07-19 17:52:41 -04:00
parent 45a1774221
commit 604ae94742

View File

@ -343,15 +343,10 @@ def readFumen(fumenFile, exclude_empty_measures=False):
note.hits = noteStruct[4] note.hits = noteStruct[4]
note.hitsPadding = noteStruct[5] note.hitsPadding = noteStruct[5]
else: else:
note.scoreInit = noteStruct[4] song.scoreInit = note.scoreInit = noteStruct[4]
note.scoreDiff = noteStruct[5] // 4 song.scoreDiff = note.scoreDiff = noteStruct[5] // 4
if not song.scoreInit:
song.scoreInit = note.scoreInit # Drumroll/balloon duration
song.scoreDiff = note.scoreDiff
if noteType == 0x6 or noteType == 0x9 or noteType == 0xa or noteType == 0xc:
# Drumroll and balloon duration in ms
note.duration = noteStruct[6]
else:
note.duration = noteStruct[6] note.duration = noteStruct[6]
# Seek forward 8 bytes to account for padding bytes at the end of drumrolls # Seek forward 8 bytes to account for padding bytes at the end of drumrolls