1
0
mirror of synced 2025-01-24 07:04:09 +01:00

converters.py: Fixup handling of scoreInit/scoreDiff

This commit is contained in:
Viv 2023-06-02 16:33:46 -04:00
parent c7170d6f23
commit 7239a00e76
3 changed files with 4 additions and 2 deletions

View File

@ -167,5 +167,7 @@ def convertTJAToFumen(fumen, tja):
tjaConverted['length'] = len(tjaConverted['measures'])
tjaConverted['unknownMetadata'] = 0
tjaConverted['branches'] = False
tjaConverted['scoreInit'] = tja['scoreInit']
tjaConverted['scoreDiff'] = tja['scoreDiff']
return tjaConverted

View File

@ -426,7 +426,7 @@ def readFumen(fumenFile, byteOrder=None, debug=False):
note["hitsPadding"] = noteStruct[5]
else:
note['scoreInit'] = noteStruct[4]
note['scoreDiff'] = noteStruct[5] / 4.0
note['scoreDiff'] = noteStruct[5] // 4
if "scoreInit" not in song:
song["scoreInit"] = note['scoreInit']
song["scoreDiff"] = note['scoreDiff']

View File

@ -51,7 +51,7 @@ def writeFumen(file, song):
if 'hits' in note.keys():
noteStruct.extend([note["hits"], note['hitsPadding']])
else:
noteStruct.extend([note['scoreInit'], int(note['scoreDiff'] * 4)])
noteStruct.extend([note['scoreInit'], note['scoreDiff'] * 4])
# Drumroll or balloon duration
if 'duration' in note.keys():
noteStruct.append(note['duration'])