converters.py
: Fixup handling of scoreInit/scoreDiff
This commit is contained in:
parent
c7170d6f23
commit
7239a00e76
@ -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
|
||||
|
@ -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']
|
||||
|
@ -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'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user