1
0
mirror of synced 2025-01-24 15:12:19 +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['length'] = len(tjaConverted['measures'])
tjaConverted['unknownMetadata'] = 0 tjaConverted['unknownMetadata'] = 0
tjaConverted['branches'] = False tjaConverted['branches'] = False
tjaConverted['scoreInit'] = tja['scoreInit']
tjaConverted['scoreDiff'] = tja['scoreDiff']
return tjaConverted return tjaConverted

View File

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

View File

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