diff options
author | Astatin <[email protected]> | 2025-08-07 16:53:50 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-08-07 16:53:50 +0200 |
commit | 41b5858e855c68e01bf388e54abd82661e846585 (patch) | |
tree | dc552e5de42e033f49cb9774c7f1af2b737a5fc0 /scripts | |
parent | 162fad62713d6b2e175c4cd5d7e53ebe7dedef11 (diff) |
Add heal sound effect + remove useless tile loads
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/cut-recording-cycle.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/cut-recording-cycle.py b/scripts/cut-recording-cycle.py new file mode 100644 index 0000000..ba1491b --- /dev/null +++ b/scripts/cut-recording-cycle.py @@ -0,0 +1,21 @@ +import sys + +file = open(sys.argv[1], "rb") +output_file = open(sys.argv[2], "wb") +cycle = int(sys.argv[3]) + +last_cycle_update = 0 +while True: + next_cycle_update_buf = file.read(16) + if len(next_cycle_update_buf) < 16: + break + inputs = file.read(2) + + next_cycle_update = int.from_bytes(next_cycle_update_buf, byteorder="little", signed=False) + print("CYCLES: %d, input1: %08x, input2: %08x" % (next_cycle_update, inputs[0], inputs[1])) + + if next_cycle_update > cycle: + break + + output_file.write(next_cycle_update.to_bytes(16, byteorder="little", signed=False)) + output_file.write(inputs) |