#!/usr/bin/env python3 """ decode_anim2.py -- second-pass decode: 0x1d split by word1 (the real handle), full DCS body dump (matrix + parent/sibling/child tree), zone/view bodies, init argv, 0x1c hex, and ASCII strings on the wire. """ import sys, struct from collections import defaultdict from vrboard import Assembler, A from decode_anim import find_framed_start, TYPE def main(): path = sys.argv[1] if len(sys.argv) > 1 else "capture.raw.bin" data = open(path, "rb").read() asm = Assembler(); asm.feed(data[find_framed_start(data):]) types = {} flushes = defaultdict(list) anim = defaultdict(list) # w1 -> [(frame, w0, floats)] op1c = [] init_argv = None frame = 0 for m in asm: if m.iserver: continue a, p = m.action, m.payload if a == A.init: init_argv = p elif a == A.create and len(p) >= 8: typ, h = struct.unpack_from('= 56: w0, w1 = struct.unpack_from('=6 chars) in framed region ===") import re for mt in re.finditer(rb'[ -~]{6,}', data[find_framed_start(data):]): print(" ", mt.group().decode('latin1')) if __name__ == '__main__': main()