Created
May 18, 2024 17:33
-
-
Save apocalyptech/bc4fedd0888e75af14fb5877f6bd1d12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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