mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 22:22:05 -04:00
Hyrule field speedhack and shiftability fixes
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user