1
0
mirror of synced 2024-11-27 22:40:49 +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,16 +343,11 @@ def readFumen(fumenFile, exclude_empty_measures=False):
note.hits = noteStruct[4]
note.hitsPadding = noteStruct[5]
else:
note.scoreInit = noteStruct[4]
note.scoreDiff = noteStruct[5] // 4
if not song.scoreInit:
song.scoreInit = note.scoreInit
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]
song.scoreInit = note.scoreInit = noteStruct[4]
song.scoreDiff = note.scoreDiff = noteStruct[5] // 4
# Drumroll/balloon duration
note.duration = noteStruct[6]
# Seek forward 8 bytes to account for padding bytes at the end of drumrolls
if noteType == 0x6 or noteType == 0x9 or noteType == 0x62: