Skip to content

Instantly share code, notes, and snippets.

@apocalyptech
Created May 18, 2024 17:33
Show Gist options
  • Save apocalyptech/bc4fedd0888e75af14fb5877f6bd1d12 to your computer and use it in GitHub Desktop.
Save apocalyptech/bc4fedd0888e75af14fb5877f6bd1d12 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
# vim: set expandtab tabstop=4 shiftwidth=4:
import os
import sys
import struct
for filename in sorted(os.listdir('.')):
if '-save1-' in filename:
with open(filename, 'rb') as df:
df.seek(0x1D8)
ticks = struct.unpack('<I', df.read(4))
df.seek(0x3C0)
floats = struct.unpack('<ffffffff', df.read(4*8))
df.seek(0x3F8)
floats2 = struct.unpack('<ff', df.read(4*2))
print(','.join([str(f) for f in ticks+floats+floats2]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment