translated the remaining german notes, python comments, help and messages to english (in-game strings, parsed report lines and cli values stay german)
This commit is contained in:
1 parent
86fe26d786
commit
526f6072f6
36 files changed
+1553
-1544
No files matched your search
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""TEXT-Chunk -> PNG-Seiten (+ texinfo.txt) und zurück.
|
||||
"""TEXT chunk -> PNG pages (+ texinfo.txt) and back.
|
||||
text_export.py export level.wad outdir # pageNN_fXX.png, texinfo.txt
|
||||
text_export.py import level.wad outdir neu.wad # geänderte PNGs zurückschreiben
|
||||
text_export.py import level.wad outdir new.wad # write modified PNGs back
|
||||
"""
|
||||
import glob
|
||||
import os
|
||||
@@ -33,7 +33,7 @@ def main():
|
||||
f.write('# idx flags page clut x0 x1 y0 y1\n')
|
||||
for i, e in enumerate(T.tex_entries(t['tail'])):
|
||||
f.write(f'{i} {e[0]:#06x} {e[1]} {e[2]:#04x} {e[3]} {e[4]} {e[5]} {e[6]}\n')
|
||||
print(f'{len(t["pages"])} Seiten, {len(T.tex_entries(t["tail"]))} Texturen -> {out}')
|
||||
print(f'{len(t["pages"])} pages, {len(T.tex_entries(t["tail"]))} textures -> {out}')
|
||||
elif cmd == 'import':
|
||||
for fn in glob.glob(f'{out}/page*.png'):
|
||||
i = int(re.search(r'page(\d+)', fn).group(1))
|
||||
@@ -41,13 +41,13 @@ def main():
|
||||
img = np.asarray(Image.open(fn).convert('RGBA'))
|
||||
assert img.shape[:2] == (p['h'], p['w']), fn
|
||||
new = T.rgba_to_abgr1555(img)
|
||||
# unveränderte Pixel exakt erhalten (Rundung 8->5 Bit verlustfrei rückwärts)
|
||||
# keep unchanged pixels exactly (8->5 bit rounding is not lossless in reverse)
|
||||
old = T.abgr1555_to_rgba(p['px'])
|
||||
same = (old == img).all(-1)
|
||||
p['px'] = np.where(same, p['px'], new).astype(np.uint16)
|
||||
tc[1] = T.build(t)
|
||||
wadtool.write(sys.argv[4], ch)
|
||||
print('geschrieben:', sys.argv[4])
|
||||
print('written:', sys.argv[4])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in new issue
Block a user