1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

Removed unused imports and other minor improvements (#1602)

* Removed unused imports and other minor improvements

* revert tools/ZAPD/ZAPD/genbuildinfo.py

* revert diff.py

* Update sym_info.py

* revert asm_processor/

---------

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
adaliaramon 2024-01-11 17:04:53 +01:00 committed by GitHub
parent 1a8772e540
commit 6eb3bf401c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 13 additions and 21 deletions

View File

@ -47,7 +47,7 @@ def firstDiffMain():
buildFolder = Path("build") / args.version buildFolder = Path("build") / args.version
BUILTROM = Path(f"oot-{args.version}.z64") BUILTROM = Path(f"oot-{args.version}.z64")
BUILTMAP = buildFolder / f"z64.map" BUILTMAP = buildFolder / "z64.map"
EXPECTEDROM = Path("baserom.z64") EXPECTEDROM = Path("baserom.z64")
EXPECTEDMAP = "expected" / BUILTMAP EXPECTEDMAP = "expected" / BUILTMAP

View File

@ -108,7 +108,7 @@ def format_files(src_files: List[str], extra_files: List[str], nb_jobs: int):
if nb_jobs != 1: if nb_jobs != 1:
print(f"Formatting files with {nb_jobs} jobs") print(f"Formatting files with {nb_jobs} jobs")
else: else:
print(f"Formatting files with a single job (consider using -j to make this faster)") print("Formatting files with a single job (consider using -j to make this faster)")
# Format files in chunks to improve performance while still utilizing jobs # Format files in chunks to improve performance while still utilizing jobs
file_chunks = list(list_chunks(src_files, (len(src_files) // nb_jobs) + 1)) file_chunks = list(list_chunks(src_files, (len(src_files) // nb_jobs) + 1))

View File

@ -2,7 +2,6 @@
import argparse import argparse
import json import json
import csv
import git import git
import os import os
import re import re

View File

@ -17,7 +17,7 @@ def symInfoMain():
args = parser.parse_args() args = parser.parse_args()
BUILTMAP = Path(f"build") / "gc-eu-mq-dbg" / f"z64.map" BUILTMAP = Path("build") / "gc-eu-mq-dbg" / "z64.map"
mapPath = BUILTMAP mapPath = BUILTMAP
if args.use_expected: if args.use_expected:

View File

@ -2,7 +2,6 @@
import os import os
import re import re
import sys
script_dir = os.path.dirname(os.path.realpath(__file__)) script_dir = os.path.dirname(os.path.realpath(__file__))
root_dir = script_dir + "/../" root_dir = script_dir + "/../"

View File

@ -2,7 +2,6 @@
import os import os
import re import re
import sys
import struct import struct
script_dir = os.path.dirname(os.path.realpath(__file__)) script_dir = os.path.dirname(os.path.realpath(__file__))

View File

@ -5,7 +5,7 @@ import sys
import struct import struct
import argparse import argparse
import re import re
from overlayhelpers.filemap import FileResult, GetFromVRam, GetFromRom from overlayhelpers.filemap import GetFromVRam
ICHAIN_MACROS = [ ICHAIN_MACROS = [
'ICHAIN_U8', 'ICHAIN_U8',

View File

@ -3,7 +3,7 @@
import os import os
import struct import struct
import argparse import argparse
from filemap import FileResult, GetFromVRam, GetFromRom from filemap import GetFromVRam, GetFromRom
T_DEFAULT = '' T_DEFAULT = ''
TType1 = 'Type1' TType1 = 'Type1'
@ -244,7 +244,7 @@ def GetColliderStr(data, off, type):
else: else:
cBase[i] = '0x{0:02X}'.format(cBase[i]) cBase[i] = '0x{0:02X}'.format(cBase[i])
return cf[1].format(*cBase); return cf[1].format(*cBase)
def GetItems(data, off, count, structf, fmt, size): def GetItems(data, off, count, structf, fmt, size):
result = '' result = ''

View File

@ -2,7 +2,7 @@
import os import os
import argparse import argparse
from filemap import FileResult, GetFromVRam, GetFromRom from filemap import GetFromVRam, GetFromRom
damage_types = [ damage_types = [
'Deku nut', 'Deku nut',

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
import struct
import json import json
table = None table = None
@ -82,9 +81,9 @@ def CreateTable():
json.dump(dict, table) json.dump(dict, table)
def AddressLookup(lookupTable, addr): def AddressLookup(lookupTable, addr):
start = 0; start = 0
end = 0; end = 0
key = None; key = None
for k, v in lookupTable.items(): for k, v in lookupTable.items():
if addr >= k: if addr >= k:

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
import struct import struct
import sys
SIMPLIFY_OUTPUT = True SIMPLIFY_OUTPUT = True
OVL_KALEIDO_SCOPE_RAM = 0x80813820 OVL_KALEIDO_SCOPE_RAM = 0x80813820
@ -88,7 +87,7 @@ for name, numMaps in SCENES:
cstr = "" cstr = ""
cstr += f"PauseMapMarksData gPauseMapMarkDataTable[] = {{\n" cstr += "PauseMapMarksData gPauseMapMarkDataTable[] = {\n"
for scenemap in scenemaps: for scenemap in scenemaps:
for mapId, map in enumerate(scenemap[1]): for mapId, map in enumerate(scenemap[1]):
cstr += IND(1) + f"// {scenemap[0]} map {mapId}\n" cstr += IND(1) + f"// {scenemap[0]} map {mapId}\n"

View File

@ -43,7 +43,7 @@ def GetMapsPerScene(ptrs):
def GetPoints(data, ptr, numPoints): def GetPoints(data, ptr, numPoints):
points = [] points = []
off = RamToOff(ptr); off = RamToOff(ptr)
for i in range(numPoints): for i in range(numPoints):
points.append(struct.unpack_from(">bBB", data[off:off+3])) points.append(struct.unpack_from(">bBB", data[off:off+3]))
off = off + 3 off = off + 3

View File

@ -37,7 +37,7 @@ def get_func_data(funcdata,i):
funcname = argdata[0].split(' ')[1] funcname = argdata[0].split(' ')[1]
for x in range(len(argdata)): for x in range(len(argdata)):
if(argdata[x].count('sfxId')): if(argdata[x].count('sfxId')):
break; break
if(x == len(argdata) - 1): if(x == len(argdata) - 1):
print('sfxId not found in ', funcname) print('sfxId not found in ', funcname)
return None,-1 return None,-1

View File

@ -1,8 +1,5 @@
#!/usr/bin/python3 #!/usr/bin/python3
import os
import sys
import struct
import argparse import argparse
import re import re