1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00
oot/tools/overlayhelpers/DamageTable.py
petrie911 bf9a1aadd9
En_Dh (#474)
* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* ZAP2 stuff

* ZAP why

* ZAP again

* Is this where I make a Mr Hands joke?

* Manos: the Hands of Fate

* cleanup

* and format
2020-12-02 14:58:57 -05:00

22 lines
425 B
Python

import struct
ROM_ADDR = 0xDA3210
COUNT = 1
rom = open("../../baserom.z64", "rb")
rom.seek(ROM_ADDR)
data = bytearray(rom.read(0x20 * COUNT))
rom.close()
valFormat = "0x{:02X}"
sfmt = ""
for i in range(4):
sfmt += valFormat + ", "
for i in range(3):
sfmt += sfmt
sfmt = "{{ {{ " + sfmt + "}} }},"
for i in range(COUNT):
line = struct.unpack_from(">32B", data, i * 0x20)
print(sfmt.format(*line))