1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 21:04:43 +00:00
oot/tools/overlayhelpers/DamageTable.py
louist103 e455a24876
Decomp EnMb (#445)
* Fixed upstream

* Initial commit

* Matched init but broke something else

* All fixed.  Matched Init OK

* Progress

* Lots of progress

* Progress

* progress

* Progress

* progress

* fix struct size

* commit

* progress

* progress

* add comment

* merge master

* fix undefined syms

* progress

* progress

* progress

* Progress

* progress

* Finish

* Remove asm

* Clean up

* Delete some ASM

* Fix spec

* Update z_en_mb.h

* Match a few more and move func_80AA7938 to non equivilent

* asm

* no more non equiv

* matched

* asm

* review

Co-authored-by: Louis <5883445+louist103@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
2020-12-03 19:25:36 -05:00

23 lines
425 B
Python
Executable File

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))