mirror of
https://github.com/leoetlino/project-restoration
synced 2025-10-05 16:22:49 +02:00
17 lines
371 B
Python
Executable File
17 lines
371 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import struct
|
|
import sys
|
|
|
|
target_path = sys.argv[1]
|
|
multiplier = float(sys.argv[2])
|
|
|
|
def va_to_file_offset(va):
|
|
return va - 0x100000
|
|
with open(target_path, "rb+") as f:
|
|
f.seek(va_to_file_offset(0x21CA14))
|
|
f.write(struct.pack('<f', 725.0 * multiplier))
|
|
|
|
f.seek(va_to_file_offset(0x21CA20))
|
|
f.write(struct.pack('<f', -715.0 * multiplier))
|