shithub: pokecrystal

Download patch

ref: a082f314b362d86f1a82f6a413abf15c1df964f3
parent: 42a0396b6afe0fba553ac51d65852f7a29cf846c
author: yenatch <[email protected]>
date: Mon Nov 18 15:48:00 EST 2013

evolution animation

--- a/main.asm
+++ b/main.asm
@@ -54256,7 +54256,7 @@
 	ld a, $1
 	ld [hBGMapMode], a
 	call ClearSprites
-	callba Function4e5e1
+	callba EvolutionAnimation
 	push af
 	call ClearSprites
 	pop af
@@ -63228,7 +63228,7 @@
 INCBIN "baserom.gbc",$4e5da,$4e5e1 - $4e5da
 
 
-Function4e5e1: ; 4e5e1
+EvolutionAnimation: ; 4e5e1
 	push hl
 	push de
 	push bc
@@ -63238,7 +63238,9 @@
 	push af
 	ld a, [BaseDexNo]
 	push af
-	call Function4e607
+
+	call _EvolutionAnimation
+
 	pop af
 	ld [BaseDexNo], a
 	pop af
@@ -63248,40 +63250,49 @@
 	pop bc
 	pop de
 	pop hl
+
 	ld a, [$d1ed]
 	and a
 	ret z
+
 	scf
 	ret
 ; 4e607
 
-Function4e607: ; 4e607
+_EvolutionAnimation: ; 4e607
 	ld a, $e4
 	ld [rOBP0], a
-	ld de, $0000
+
+	ld de, MUSIC_NONE
 	call PlayMusic
+
 	callba Function8cf53
-	ld de, $6831
+
+	ld de, EvolutionGFX
 	ld hl, VTiles0
-	ld bc, $1308
+	ld bc, BANK(EvolutionGFX) << 8 + 8
 	call Request2bpp
+
 	xor a
 	ld [Danger], a
 	call WaitBGMap
 	xor a
 	ld [hBGMapMode], a
-	ld a, [MagikarpLength]
+	ld a, [Buffer1]
 	ld [PlayerHPPal], a
+
 	ld c, $0
 	call Function4e703
-	ld a, [MagikarpLength]
+	ld a, [Buffer1]
 	ld [CurPartySpecies], a
 	ld [CurSpecies], a
 	call Function4e708
+
 	ld de, VTiles2
 	ld hl, $9310
 	ld bc, $0031
 	call Request2bpp
+
 	ld a, $31
 	ld [$d1ec], a
 	call Function4e755
@@ -63289,32 +63300,40 @@
 	ld [CurPartySpecies], a
 	ld [CurSpecies], a
 	call Function4e711
-	ld a, [MagikarpLength]
+	ld a, [Buffer1]
 	ld [CurPartySpecies], a
 	ld [CurSpecies], a
+
 	ld a, $1
 	ld [hBGMapMode], a
 	call Function4e794
 	jr c, .asm_4e67c
-	ld a, [MagikarpLength]
+
+	ld a, [Buffer1]
 	call Function37ce
 
 .asm_4e67c
-	ld de, $0022
+	ld de, MUSIC_EVOLUTION
 	call PlayMusic
-	ld c, $50
+
+	ld c, 80
 	call DelayFrames
+
 	ld c, $1
 	call Function4e703
 	call Function4e726
 	jr c, .asm_4e6df
+
 	ld a, $cf
 	ld [$d1ec], a
+
 	call Function4e755
 	xor a
 	ld [$d1ed], a
+
 	ld a, [Buffer2]
 	ld [PlayerHPPal], a
+
 	ld c, $0
 	call Function4e703
 	call Function4e7a6
@@ -63321,6 +63340,7 @@
 	callba Function8cf53
 	call Function4e794
 	jr c, .asm_4e6de
+
 	ld a, [$c2c6]
 	push af
 	ld a, $1
@@ -63327,6 +63347,7 @@
 	ld [$c2c6], a
 	ld a, [CurPartySpecies]
 	push af
+
 	ld a, [PlayerHPPal]
 	ld [CurPartySpecies], a
 	ld hl, $c4cf
@@ -63334,6 +63355,7 @@
 	ld e, $4
 	ld a, $47
 	call Predef
+
 	pop af
 	ld [CurPartySpecies], a
 	pop af
@@ -63346,8 +63368,10 @@
 .asm_4e6df
 	ld a, $1
 	ld [$d1ed], a
-	ld a, [MagikarpLength]
+
+	ld a, [Buffer1]
 	ld [PlayerHPPal], a
+
 	ld c, $0
 	call Function4e703
 	call Function4e7a6
@@ -63354,6 +63378,7 @@
 	callba Function8cf53
 	call Function4e794
 	ret c
+
 	ld a, [PlayerHPPal]
 	call Function37ce
 	ret