1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 23:44:53 +00:00

Fix colliderinit.py to run from project root (#531)

* Now works from root but not from overlayhelpers

* Fix to run from anywhere
This commit is contained in:
Tharo 2020-12-15 23:27:35 +00:00 committed by GitHub
parent 92e9f2d370
commit 5632df406b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -2,8 +2,7 @@
from overlayhelpers import filemap
import argparse
import struct
import argparse, os, struct
"""
Enumerations
@ -472,8 +471,9 @@ def main():
print(file_result)
print()
script_dir = os.path.dirname(os.path.realpath(__file__))
cs_data = None
with open("baserom/" + file_result.name, "rb") as ovl_file:
with open(script_dir + "/../baserom/" + file_result.name, "rb") as ovl_file:
ovl_file.seek(file_result.offset)
cs_data = [i[0] for i in struct.iter_unpack(">I", bytearray(ovl_file.read()))]
if cs_data is not None: