Hyrule field speedhack and shiftability fixes

This commit is contained in:
jdflyer
2022-01-17 20:00:12 -07:00
parent 824a9eabc9
commit ecc987f34c
5 changed files with 131 additions and 83 deletions
+7
View File
@@ -104,9 +104,16 @@ def lcf_generate(output_path,shiftable,map_file):
addr = symbol['addr']
if shiftable==True:
for line in map_file:
literals_found = []
if type(symbol['name'])==str and line.find(' '+symbol['name']+' ')!=-1 and name[0] != "@" or type(symbol['label']) == str and line.find(' '+symbol['label']+' ')!=-1:
linesplit = line.split()
if len(linesplit) > 3 and linesplit[2]!="NOT":
if line.find("lit_")!=-1:
lbl = symbol['label']
for literal in literals_found:
if literal == lbl:
print("Warning! two literals with the same name found!\n"+lbl)
literals_found.append(symbol['label'])
addr = int(linesplit[2],16)
file.write(f"\t\"{symbol['label']}\" = 0x{addr:08X};\n")
else: