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
+8
-8
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Packt ein Bild als Argonaut-.cor (Gegenstück zu cor2png.py).
|
||||
"""Packs an image as Argonaut .cor (counterpart of cor2png.py).
|
||||
|
||||
Das Bild wird auf 640x480 RGB gebracht und mit dem LZ-Schema des Spiels
|
||||
komprimiert:
|
||||
n < 0x80 -> n Bytes Rohdaten folgen (n = 1..127)
|
||||
1LLL oooo oooooooo -> kopiere L+3 Bytes (3..10) ab o Bytes (1..4095) zurück
|
||||
Aufruf: png2cor.py eingabe.png ausgabe.cor (benötigt Pillow)
|
||||
The image is converted to 640x480 RGB and compressed with the game's LZ
|
||||
scheme:
|
||||
n < 0x80 -> n bytes of raw data follow (n = 1..127)
|
||||
1LLL oooo oooooooo -> copy L+3 bytes (3..10) from o bytes (1..4095) back
|
||||
Usage: png2cor.py input.png output.cor (requires Pillow)
|
||||
"""
|
||||
import struct
|
||||
import sys
|
||||
@@ -17,7 +17,7 @@ MAXOFF, MINLEN, MAXLEN = 0x0FFF, 3, 10
|
||||
def pack(raw):
|
||||
out = bytearray()
|
||||
lit = bytearray()
|
||||
last = {} # 3-Byte-Präfix -> Liste letzter Positionen
|
||||
last = {} # 3-byte prefix -> list of recent positions
|
||||
|
||||
def flush():
|
||||
for k in range(0, len(lit), 127):
|
||||
@@ -65,4 +65,4 @@ if __name__ == '__main__':
|
||||
img = Image.open(sys.argv[1]).convert('RGB').resize((640, 480), Image.LANCZOS)
|
||||
data = pack(img.tobytes())
|
||||
open(sys.argv[2], 'wb').write(data)
|
||||
print(f'{sys.argv[2]}: {len(data)} Bytes')
|
||||
print(f'{sys.argv[2]}: {len(data)} bytes')
|
||||
Reference in new issue
Block a user