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
BUILTROM = Path(f"oot-{args.version}.z64")
BUILTMAP = buildFolder / f"z64.map"
BUILTMAP = buildFolder / "z64.map"
EXPECTEDROM = Path("baserom.z64")
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:
print(f"Formatting files with {nb_jobs} jobs")
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
file_chunks = list(list_chunks(src_files, (len(src_files) // nb_jobs) + 1))

View File

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

View File

@ -17,7 +17,7 @@ def symInfoMain():
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
if args.use_expected:

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
import os
import struct
import argparse
from filemap import FileResult, GetFromVRam, GetFromRom
from filemap import GetFromVRam, GetFromRom
T_DEFAULT = ''
TType1 = 'Type1'
@ -244,7 +244,7 @@ def GetColliderStr(data, off, type):
else:
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):
result = ''

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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