mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
insert many many more texts
hg-commit-id: 50dfe24e0bad
This commit is contained in:
parent
95b86a5b6e
commit
b8100083ca
10773
common.asm
10773
common.asm
File diff suppressed because it is too large
Load diff
|
@ -618,6 +618,7 @@ def scan_rom_for_tx_fars_and_insert():
|
||||||
for address_bundle in address_bundles:
|
for address_bundle in address_bundles:
|
||||||
tx_far_address = address_bundle[1]
|
tx_far_address = address_bundle[1]
|
||||||
tx_far_target_address = address_bundle[0]
|
tx_far_target_address = address_bundle[0]
|
||||||
|
if tx_far_address in [0xeff2]: continue #skip
|
||||||
#if tx_far_address < 0x7627b: continue #because it stopped a few times for errors
|
#if tx_far_address < 0x7627b: continue #because it stopped a few times for errors
|
||||||
|
|
||||||
tx_far_label = "UnnamedText_%.2x" % (tx_far_address)
|
tx_far_label = "UnnamedText_%.2x" % (tx_far_address)
|
||||||
|
@ -625,6 +626,7 @@ def scan_rom_for_tx_fars_and_insert():
|
||||||
|
|
||||||
#let's also do a quick check if it might be in the file already
|
#let's also do a quick check if it might be in the file already
|
||||||
if not (": ; " + hex(tx_far_address) in analyze_incbins.asm):
|
if not (": ; " + hex(tx_far_address) in analyze_incbins.asm):
|
||||||
|
print "inserting text at " + hex(tx_far_address)
|
||||||
result = insert_text(tx_far_target_address, tx_far_target_label, apply=True)
|
result = insert_text(tx_far_target_address, tx_far_target_label, apply=True)
|
||||||
else:
|
else:
|
||||||
#we can't just pretend like it worked, because we don't know what label was used
|
#we can't just pretend like it worked, because we don't know what label was used
|
||||||
|
@ -634,16 +636,18 @@ def scan_rom_for_tx_fars_and_insert():
|
||||||
tx_far_target_label = line.split(":")[0]
|
tx_far_target_label = line.split(":")[0]
|
||||||
result = "skip"
|
result = "skip"
|
||||||
|
|
||||||
if result == True:
|
if result == True or result == None:
|
||||||
local_reset_incbins()
|
local_reset_incbins()
|
||||||
result2 = insert_text(tx_far_address, tx_far_label, apply=True)
|
result2 = insert_text(tx_far_address, tx_far_label, apply=True)
|
||||||
local_reset_incbins()
|
local_reset_incbins()
|
||||||
elif result == "skip":
|
elif result == "skip":
|
||||||
result2 = insert_text(tx_far_address, tx_far_label, apply=True)
|
print "skipping " + hex(tx_far_address)
|
||||||
local_reset_incbins()
|
# result2 = insert_text(tx_far_address, tx_far_label, apply=True)
|
||||||
|
# local_reset_incbins()
|
||||||
|
|
||||||
if not result or not result2:
|
#just skip these for now
|
||||||
sys.exit(0)
|
#if not result or not result2:
|
||||||
|
# sys.exit(0)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
#load map headers and object data
|
#load map headers and object data
|
||||||
|
|
Loading…
Reference in a new issue