Skip to content

Commit 71c52fd

Browse files
committed
Merge 'Fix file select screen displaying None in the song name display when having Background music set to No music' (OoTRandomizer#2252)
# Conflicts: # Cosmetics.py
2 parents 84136ff + fd4cf2c commit 71c52fd

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Cosmetics.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -988,11 +988,14 @@ def patch_song_names(rom: Rom, settings: Settings, log: CosmeticsLog, symbols: d
988988
for index, song_name in enumerate(log.bgm.values()):
989989
if index >= 47:
990990
break
991-
if len(song_name) > 50:
992-
song_name_cropped = song_name[:50]
993-
text_bytes = [ord('?' if ord(c) >= 0x80 else c) for c in song_name_cropped]
991+
if song_name == 'None':
992+
text_bytes = [ord('\0')] * 50
994993
else:
995-
text_bytes = [ord('?' if ord(c) >= 0x80 else c) for c in song_name] + [ord('\0')] * (50 - len(song_name))
994+
if len(song_name) > 50:
995+
song_name_cropped = song_name[:50]
996+
text_bytes = [ord('?' if ord(c) >= 0x80 else c) for c in song_name_cropped]
997+
else:
998+
text_bytes = [ord('?' if ord(c) >= 0x80 else c) for c in song_name] + [ord('\0')] * (50 - len(song_name))
996999
bytes_to_write += text_bytes
9971000
rom.write_bytes(symbols['CFG_SONG_NAMES'], bytes_to_write)
9981001
log.display_custom_song_names = settings.display_custom_song_names

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '8.1.60'
1+
__version__ = '8.1.61'
22

33
# This is a supplemental version number for branches based off of main dev.
44
supplementary_version = 0

0 commit comments

Comments
 (0)