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:
MineTec committed 2026-11-07 10:51:14 +01:00
1 parent 86fe26d786
commit 526f6072f6
36 files changed
+1553 -1544

No files matched your search

+14 -14
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
"""MAP-Chunk von Level-WADs parsen/schreiben (Lama/Croc-2-Engine, PC).
"""Parse/write the MAP chunk of level WADs (Lama/Croc 2 engine, PC).
Nachgebaut aus groove.exe FUN_0042ac50 (MAP-Lader). Hängt ab von
WFPC-Flags (u32 im WFPC-Chunk, Bits 0x10000, 0x10000000, 0x200000, 0x4000000, 0x10)
TRAK-Modell-Vertexzahlen (Vertexfarben-Block).
Siehe notes/objects.md.
Reimplemented from groove.exe FUN_0042ac50 (MAP loader). Depends on
WFPC flags (u32 in the WFPC chunk, bits 0x10000, 0x10000000, 0x200000, 0x4000000, 0x10)
TRAK model vertex counts (vertex colour block).
See notes/objects.md.
"""
import struct
@@ -27,16 +27,16 @@ class R:
def trak_vertcounts(trak):
"""TRAK: u32 n, n x 0x84-Header (u16 @0x6c = Vertexzahl), dann Daten."""
"""TRAK: u32 n, n x 0x84-Header (u16 @0x6c = vertex count), then data."""
n = struct.unpack_from('<I', trak, 0)[0]
return [struct.unpack_from('<H', trak, 4 + i * 0x84 + 0x6c)[0] for i in range(n)]
# Feldnamen
# field names
TILE = ('x', 'y', 'z', 'rot', 'b', 'alt') # 3 f32 + 3 u32
LIGHT = '11I3IH4I2IHHI' # 90 Byte
PATHNODE = 'IIHHH5I' # 34 Byte
STRAT = '3H3iIIi4Iiih' + 'H' # 58 Byte (s.u.)
LIGHT = '11I3IH4I2IHHI' # 90 bytes
PATHNODE = 'IIHHH5I' # 34 bytes
STRAT = '3H3iIIi4Iiih' + 'H' # 58 bytes (see below)
def parse(d, wfpc, vcounts):
@@ -45,7 +45,7 @@ def parse(d, wfpc, vcounts):
nt, W, H = r.f('3I')
m['W'], m['H'] = W, H
m['tiles'] = [r.f('3f3I') for _ in range(nt)]
n = r.u32(); m['list1'] = list(r.f('%dI' % n)) # von Strats per Index referenziert
n = r.u32(); m['list1'] = list(r.f('%dI' % n)) # referenced by strats via index
n = r.u32(); m['lights'] = [r.f(LIGHT) for _ in range(n)]
n = r.u32(); m['nodes'] = [r.f(PATHNODE) for _ in range(n)]
m['tab32'] = r.f('64I') # 32 x (u32,u32) -> DAT_006da350
@@ -56,11 +56,11 @@ def parse(d, wfpc, vcounts):
if wfpc & 0x10000:
n = r.u32(); alts = [r.f('5I') for _ in range(n)]
m['alts'] = alts
# Vertexfarben: je Tile nv u32 (Byte3 = Frames), ggf. weitere Frames; dann Alt-Modell
# vertex colours: nv u32 per tile (byte 3 = frames), more frames if any; then alt model
altidx = [i for i, t in enumerate(m['tiles']) if t[5]]
altmap = dict(zip(altidx, alts))
start = r.o
split = [] # Vertexfarben-Bytes je Tile (inkl. Alt-Modell)
split = [] # vertex colour bytes per tile (incl. alt model)
for i in range(nt):
t0 = r.o
for mdl in [m['tilemodel'][i]] + ([altmap[i][4]] if i in altmap else []):
@@ -96,7 +96,7 @@ def parse(d, wfpc, vcounts):
def build(m, wfpc):
"""Gegenstück zu parse(); m['vcol'] muss zu tilemodel/alts passen (Rohbytes)."""
"""Counterpart of parse(); m['vcol'] must match tilemodel/alts (raw bytes)."""
P = struct.pack
o = [P('<3I', len(m['tiles']), m['W'], m['H'])]
o += [P('<3f3I', *t) for t in m['tiles']]