summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimB16 <f1@jimb.de>2015-08-30 13:17:14 +0200
committerJimB16 <f1@jimb.de>2015-08-30 13:17:14 +0200
commit172a1488defdb83b342046ec24fa25388f5a5f3b (patch)
tree5f930894aa6cbbe53f8683905fe1b759699ad580
parent91ccb093795704042dd3c615018e5a6611bcb9bb (diff)
renamed labels and added comments
-rw-r--r--engine/predef.asm2
-rw-r--r--items/item_effects.asm2
-rw-r--r--main.asm18
-rw-r--r--misc/mobile_5f.asm2
4 files changed, 18 insertions, 6 deletions
diff --git a/engine/predef.asm b/engine/predef.asm
index 22e323246..9ee46bf47 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -39,7 +39,7 @@ PredefPointers:: ; 856b
add_predef Functiond88c
add_predef Functionda96
add_predef Functiondb3f ; $8
- add_predef Functionde6e
+ add_predef SentPkmnIntoBox
add_predef GiveEgg
add_predef Functionc6e0
add_predef Functione167
diff --git a/items/item_effects.asm b/items/item_effects.asm
index 8c574da88..27fb17dee 100644
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -618,7 +618,7 @@ endr
.asm_eb3c
call ClearSprites
- predef Functionde6e
+ predef SentPkmnIntoBox
callba Function4db83
diff --git a/main.asm b/main.asm
index 50ef4ef3e..76d8881e0 100644
--- a/main.asm
+++ b/main.asm
@@ -8799,10 +8799,11 @@ Functionde44: ; de44
call AddNTimes
ld bc, sBoxMon1End - sBoxMon1
jp CopyBytes
-; de6e
-Functionde6e: ; de6e
+SentPkmnIntoBox: ; de6e
+; Sents the Pkmn into one of Bills Boxes
+; the data comes mainly from 'EnemyMon:'
ld a, BANK(sBoxCount)
call GetSRAMBank
ld de, sBoxCount
@@ -8811,6 +8812,7 @@ Functionde6e: ; de6e
jp nc, Functiondf42
inc a
ld [de], a
+
ld a, [CurPartySpecies]
ld [CurSpecies], a
ld c, a
@@ -8823,23 +8825,29 @@ Functionde6e: ; de6e
ld [de], a
inc a
jr nz, .asm_de85
+
call GetBaseData
call ShiftBoxMon
+
ld hl, PlayerName
ld de, sBoxMonOT
ld bc, NAME_LENGTH
call CopyBytes
+
ld a, [CurPartySpecies]
ld [wd265], a
call GetPokemonName
+
ld de, sBoxMonNicknames
ld hl, StringBuffer1
ld bc, PKMN_NAME_LENGTH
call CopyBytes
+
ld hl, EnemyMon
ld de, sBoxMon1
ld bc, 1 + 1 + NUM_MOVES ; species + item + moves
call CopyBytes
+
ld hl, PlayerID
ld a, [hli]
ld [de], a
@@ -8861,6 +8869,7 @@ Functionde6e: ; de6e
ld a, [$ffb6]
ld [de], a
inc de
+
xor a
ld b, $a
.asm_dee5
@@ -8868,6 +8877,7 @@ Functionde6e: ; de6e
inc de
dec b
jr nz, .asm_dee5
+
ld hl, EnemyMonDVs
ld b, 2 + NUM_MOVES ; DVs and PP ; EnemyMonHappiness - EnemyMonDVs
.asm_deef
@@ -8876,6 +8886,7 @@ Functionde6e: ; de6e
inc de
dec b
jr nz, .asm_deef
+
ld a, BASE_HAPPINESS
ld [de], a
inc de
@@ -8909,6 +8920,7 @@ Functionde6e: ; de6e
call CopyBytes
ld b, 0
call Functiondcb6
+
call CloseSRAM
scf
ret
@@ -9482,7 +9494,7 @@ GivePoke:: ; e277
ld a, [CurPartySpecies]
ld [TempEnemyMonSpecies], a
callab LoadEnemyMon
- call Functionde6e
+ call SentPkmnIntoBox
jp nc, Functione3d4
ld a, $2
ld [MonType], a
diff --git a/misc/mobile_5f.asm b/misc/mobile_5f.asm
index c8a2d1092..9c38fbb27 100644
--- a/misc/mobile_5f.asm
+++ b/misc/mobile_5f.asm
@@ -2555,7 +2555,7 @@ Function17e026: ; 17e026
push bc
push hl
callba LoadEnemyMon
- callba Functionde6e
+ callba SentPkmnIntoBox
callba Function4db83
pop hl
pop bc