writers.py
: Fix bug with large score_diff values
This commit is contained in:
parent
d4c3abb672
commit
3dbf82309e
@ -41,7 +41,9 @@ def write_fumen(path_out: str, song: FumenCourse) -> None:
|
|||||||
if note.hits:
|
if note.hits:
|
||||||
extra_vals = [note.hits, note.hits_padding]
|
extra_vals = [note.hits, note.hits_padding]
|
||||||
else:
|
else:
|
||||||
extra_vals = [note.score_init, note.score_diff * 4]
|
# Max value for H -> 0xffff -> 65535
|
||||||
|
extra_vals = [min(65535, note.score_init),
|
||||||
|
min(65535, note.score_diff * 4)]
|
||||||
note_struct.extend(extra_vals)
|
note_struct.extend(extra_vals)
|
||||||
note_struct.append(note.duration)
|
note_struct.append(note.duration)
|
||||||
write_struct(file, song.header.order,
|
write_struct(file, song.header.order,
|
||||||
|
Loading…
Reference in New Issue
Block a user