shithub: pokecrystal

Download patch

ref: 172a1488defdb83b342046ec24fa25388f5a5f3b
parent: 91ccb093795704042dd3c615018e5a6611bcb9bb
author: JimB16 <[email protected]>
date: Sun Aug 30 09:17:14 EDT 2015

renamed labels and added comments

--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -39,7 +39,7 @@
 	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
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -618,7 +618,7 @@
 .asm_eb3c
 	call ClearSprites
 
-	predef Functionde6e
+	predef SentPkmnIntoBox
 
 	callba Function4db83
 
--- a/main.asm
+++ b/main.asm
@@ -8799,10 +8799,11 @@
 	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 @@
 	jp nc, Functiondf42
 	inc a
 	ld [de], a
+
 	ld a, [CurPartySpecies]
 	ld [CurSpecies], a
 	ld c, a
@@ -8823,23 +8825,29 @@
 	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 @@
 	ld a, [$ffb6]
 	ld [de], a
 	inc de
+
 	xor a
 	ld b, $a
 .asm_dee5
@@ -8868,6 +8877,7 @@
 	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 @@
 	inc de
 	dec b
 	jr nz, .asm_deef
+
 	ld a, BASE_HAPPINESS
 	ld [de], a
 	inc de
@@ -8909,6 +8920,7 @@
 	call CopyBytes
 	ld b, 0
 	call Functiondcb6
+
 	call CloseSRAM
 	scf
 	ret
@@ -9482,7 +9494,7 @@
 	ld a, [CurPartySpecies]
 	ld [TempEnemyMonSpecies], a
 	callab LoadEnemyMon
-	call Functionde6e
+	call SentPkmnIntoBox
 	jp nc, Functione3d4
 	ld a, $2
 	ld [MonType], a
--- a/misc/mobile_5f.asm
+++ b/misc/mobile_5f.asm
@@ -2555,7 +2555,7 @@
 	push bc
 	push hl
 	callba LoadEnemyMon
-	callba Functionde6e
+	callba SentPkmnIntoBox
 	callba Function4db83
 	pop hl
 	pop bc