Version 3.2.1: whole bank copies of voice lines, unique names, docs figures checked by tools/check_docs.py
This commit is contained in:
@@ -8,7 +8,8 @@ For every check: the SHA-1 of each touched file is taken, the change is applied
|
||||
of the editor and the CLI), read back from the game files, reverted, and the files must be byte-identical again.
|
||||
1. in-memory sound with the most copies (every copy written; once, it is shared by all languages)
|
||||
2. localized in-memory speech line of the language's voices
|
||||
3. speech line of the language's voices with prefetch heads (WAD + every head copy)
|
||||
3. speech line of the language's voices with prefetch heads (WAD + every head copy), and one that a bank
|
||||
also stores whole (WAD + every whole copy)
|
||||
4. subtitle with several copies (RDialogueEvent), and a scripted subtitle (RSubtitle, Startup.upk)
|
||||
5. menu text
|
||||
6. sound + subtitle in the same package, reverted one at a time
|
||||
@@ -82,7 +83,7 @@ def sound_round_trip(ws, s, label):
|
||||
for l, b in copies_of(ws, s):
|
||||
if l.kind == banks.MEMORY:
|
||||
ok &= b == wem + bytes(l.size - len(wem))
|
||||
else: # prefetch head of a WAD line (stored zero-padded to its size)
|
||||
else: # head or whole copy of a WAD line (zero-padded to its size)
|
||||
full = wem + bytes(max(0, ws.store.get(s.key)["orig_size"] - len(wem)))
|
||||
ok &= b == (full + bytes(l.size))[:l.size]
|
||||
ws.revert([s])
|
||||
@@ -140,7 +141,13 @@ def run_checks(game, lang, voices, td, ws, first):
|
||||
heads = [ws.catalog.by_key[k] for k in ws.catalog.heads if k in ws.catalog.by_key
|
||||
and ws.catalog.by_key[k].archive == voices]
|
||||
sound_round_trip(ws, max(heads, key=lambda s: len(ws.locations(s))),
|
||||
"3 %s speech line with prefetch heads" % lang)
|
||||
"3a %s speech line with prefetch heads" % lang)
|
||||
whole = [s for s in heads if any(l.size >= s.size for l in ws.locations(s))]
|
||||
if whole:
|
||||
sound_round_trip(ws, max(whole, key=lambda s: len(ws.locations(s))),
|
||||
"3b %s speech line also stored whole in a bank" % lang)
|
||||
else:
|
||||
check("3b %s speech line also stored whole in a bank" % lang, False, "none found")
|
||||
|
||||
tx = ws.texts
|
||||
subs = tx.subtitles(lang)
|
||||
|
||||
Reference in New Issue
Block a user