diff --git a/tja2fumen/converters.py b/tja2fumen/converters.py index ee05b2e..8e7de99 100644 --- a/tja2fumen/converters.py +++ b/tja2fumen/converters.py @@ -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 diff --git a/tja2fumen/parsers.py b/tja2fumen/parsers.py index 7d6136c..bafd6b4 100644 --- a/tja2fumen/parsers.py +++ b/tja2fumen/parsers.py @@ -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'] diff --git a/tja2fumen/writers.py b/tja2fumen/writers.py index e8c7444..2a105f8 100644 --- a/tja2fumen/writers.py +++ b/tja2fumen/writers.py @@ -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'])