shithub: pokered

Download patch

ref: b6d32d9022e43f56dc2797cac4879f61542f3b9e
parent: 71a840c3c379dd597150e157b6e58715dcdefd97
author: Bryan Bishop <kanzure@gmail.com>
date: Tue Jan 10 07:06:32 EST 2012

fix gbz80disasm pretty printer for non-08 scripts

hg-commit-id: 6f16741dc45f


--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -548,6 +548,7 @@
     "3927": "AddPokemonToParty",
     "3e48": "GivePokemon",
     "3dd7": "Delay3",
+    "3e2e": "GiveItem",
 }
 
 def random_asm_label():
@@ -729,7 +730,9 @@
     output = label + ": ; " + hex(address_of_08) + "\n"
     if include_08:
         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]
     end_address = results[1]
 
--- a/extras/insert_texts.py
+++ b/extras/insert_texts.py
@@ -424,7 +424,7 @@
     #insert_08_asm(83, 1)
     #insert_all_08s()
 
-    insert_asm(0x3927, "AddPokemonToParty")
+    insert_asm(0x31cc, "LoadTrainerHeader")
 
     print "-- FAILED ATTEMPTS --"
     print str(failed_attempts)