fix gbz80disasm pretty printer for non-08 scripts

hg-commit-id: 6f16741dc45f
This commit is contained in:
Bryan Bishop 2012-01-10 12:06:32 -06:00
parent 71a840c3c3
commit b6d32d9022
2 changed files with 5 additions and 2 deletions

View file

@ -548,6 +548,7 @@ asm_commands = {
"3927": "AddPokemonToParty", "3927": "AddPokemonToParty",
"3e48": "GivePokemon", "3e48": "GivePokemon",
"3dd7": "Delay3", "3dd7": "Delay3",
"3e2e": "GiveItem",
} }
def random_asm_label(): def random_asm_label():
@ -729,7 +730,9 @@ def text_asm_pretty_printer(label, address_of_08, include_08=True):
output = label + ": ; " + hex(address_of_08) + "\n" output = label + ": ; " + hex(address_of_08) + "\n"
if include_08: if include_08:
output += spacing + "db $08 ; asm\n" output += spacing + "db $08 ; asm\n"
results = output_bank_opcodes(address_of_08 + 1) results = output_bank_opcodes(address_of_08 + 1)
else:
results = output_bank_opcodes(address_of_08)
output += results[0] output += results[0]
end_address = results[1] end_address = results[1]

View file

@ -424,7 +424,7 @@ if __name__ == "__main__":
#insert_08_asm(83, 1) #insert_08_asm(83, 1)
#insert_all_08s() #insert_all_08s()
insert_asm(0x3927, "AddPokemonToParty") insert_asm(0x31cc, "LoadTrainerHeader")
print "-- FAILED ATTEMPTS --" print "-- FAILED ATTEMPTS --"
print str(failed_attempts) print str(failed_attempts)