summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-10 02:11:54 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-10 02:11:54 -0600
commit468d065715f0ff89dc59bae90aa857d1ea34ec59 (patch)
treec6e2741db081d42ee3a0bd511c03749685197df5
parente8fdd637b600cfc886e37d0bff40fcba1430c720 (diff)
call $3927 -> call AddPokemonToParty
hg-commit-id: a4ec02195797
-rw-r--r--extras/gbz80disasm.py2
-rw-r--r--extras/insert_texts.py2
-rw-r--r--pokered.asm22
3 files changed, 20 insertions, 6 deletions
diff --git a/extras/gbz80disasm.py b/extras/gbz80disasm.py
index 76eaab36..be52cb52 100644
--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -712,4 +712,4 @@ if __name__ == "__main__":
#0x18f96 is PalletTownText1
#0x19B5D is BluesHouseText1
- print output_bank_opcodes(0x3e48)[0]
+ print output_bank_opcodes(0x3927)[0]
diff --git a/extras/insert_texts.py b/extras/insert_texts.py
index 1e190545..9c73dc7b 100644
--- a/extras/insert_texts.py
+++ b/extras/insert_texts.py
@@ -424,7 +424,7 @@ if __name__ == "__main__":
#insert_08_asm(83, 1)
#insert_all_08s()
- insert_asm(0x3e48, "GivePokemon")
+ insert_asm(0x3927, "AddPokemonToParty")
print "-- FAILED ATTEMPTS --"
print str(failed_attempts)
diff --git a/pokered.asm b/pokered.asm
index 58da1c95..d72577f2 100644
--- a/pokered.asm
+++ b/pokered.asm
@@ -1359,7 +1359,21 @@ GetName: ; 376B
ld [$2000],a
ret
-INCBIN "baserom.gbc",$37DF,$3A87 - $37DF
+INCBIN "baserom.gbc",$37df,$3927 - $37df
+
+AddPokemonToParty: ; 0x3927
+ push hl
+ push de
+ push bc
+ ld b, $3
+ ld hl, $72e5
+ call $35d6
+ pop bc
+ pop de
+ pop hl
+ ret
+
+INCBIN "baserom.gbc",$3936,$3A87 - $3936
AddNTimes: ; 3A87
; add bc to hl a times
@@ -4717,7 +4731,7 @@ ItemUseBall: ;03:5687
xor a
ld [$cc49],a
call CleanLCD_OAM
- call $3927 ;add mon to Party
+ call AddPokemonToParty ;add mon to Party
jr .End\@
.sendToBox\@ ;$5907
call CleanLCD_OAM
@@ -10024,7 +10038,7 @@ ReadTrainer: ; 5C53
ld a,1
ld [$CC49],a
push hl
- call $3927
+ call AddPokemonToParty
pop hl
jr .LoopTrainerData\@
.SpecialTrainer\@
@@ -10041,7 +10055,7 @@ ReadTrainer: ; 5C53
ld a,1
ld [$CC49],a
push hl
- call $3927
+ call AddPokemonToParty
pop hl
jr .SpecialTrainer\@
.AddLoneAttack\@