Subtitles and menu text sections in the editor

This commit is contained in:
2026-10-09 22:42:50 +02:00
parent ef68edbe45
commit a10593ec24
9 changed files with 816 additions and 31 deletions

View File

@@ -50,6 +50,13 @@ def smoke_test(game_dir=None, report=None):
assert read_target(out, s.target) == wem
print("pipeline OK: %s (%s), %d sounds loaded, re-encoded %d bytes (limit %d), injected into a temp copy"
% (s.name, s.archive, len(ws.catalog.sounds), len(wem), ws.limit(s)))
lang = ws.game.language()
b = next((x for x in ws.catalog.sounds if x.archive == "BANK"), None)
if b:
audio.decode_wem(ws.current_bytes(b))
subs = ws.texts.subtitles(lang) if lang in ws.texts.subtitle_languages() else []
print("texts OK: %d subtitles, %d menu texts (%s); in-memory sound decoded: %s"
% (len(subs), len(ws.texts.menu(lang)), lang, b.name if b else "none"))
return 0