diff options
Diffstat (limited to 'engine/evolution_animation.asm')
-rwxr-xr-x | engine/evolution_animation.asm | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm index dc0ddd8f6..2f1c4c522 100755 --- a/engine/evolution_animation.asm +++ b/engine/evolution_animation.asm @@ -21,7 +21,7 @@ EvolutionAnimation: ; 4e5e1 pop de pop hl - ld a, [Buffer4] + ld a, [wEvolutionCanceled] and a ret z @@ -30,7 +30,7 @@ EvolutionAnimation: ; 4e5e1 ; 4e607 .EvolutionAnimation: ; 4e607 - ld a, $e4 + ld a, %11100100 ld [rOBP0], a ld de, MUSIC_NONE @@ -48,29 +48,29 @@ EvolutionAnimation: ; 4e5e1 call WaitBGMap xor a ld [hBGMapMode], a - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] ld [PlayerHPPal], a ld c, $0 call .GetSGBLayout - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] ld [CurPartySpecies], a ld [CurSpecies], a call .PlaceFrontpic ld de, VTiles2 ld hl, VTiles2 tile $31 - ld bc, $31 + ld bc, 7 * 7 call Request2bpp - ld a, $31 - ld [wd1ec], a + ld a, 7 * 7 + ld [wEvolutionPicOffset], a call .ReplaceFrontpic - ld a, [Buffer2] + ld a, [wEvolutionNewSpecies] ld [CurPartySpecies], a ld [CurSpecies], a call .LoadFrontpic - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] ld [CurPartySpecies], a ld [CurSpecies], a @@ -79,7 +79,7 @@ EvolutionAnimation: ; 4e5e1 call .check_statused jr c, .skip_cry - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] call PlayCry .skip_cry @@ -95,13 +95,12 @@ EvolutionAnimation: ; 4e5e1 jr c, .cancel_evo ld a, -7 * 7 - ld [wd1ec], a - + ld [wEvolutionPicOffset], a call .ReplaceFrontpic xor a - ld [Buffer4], a + ld [wEvolutionCanceled], a - ld a, [Buffer2] + ld a, [wEvolutionNewSpecies] ld [PlayerHPPal], a ld c, $0 @@ -136,9 +135,9 @@ EvolutionAnimation: ; 4e5e1 .cancel_evo ld a, $1 - ld [Buffer4], a + ld [wEvolutionCanceled], a - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] ld [PlayerHPPal], a ld c, $0 @@ -154,7 +153,7 @@ EvolutionAnimation: ; 4e5e1 ; 4e703 .GetSGBLayout: ; 4e703 - ld b, SCGB_0B + ld b, SCGB_EVOLUTION jp GetSGBLayout ; 4e708 @@ -187,9 +186,8 @@ EvolutionAnimation: ; 4e5e1 call .Flash pop bc inc b -rept 2 dec c -endr + dec c jr nz, .loop and a ret @@ -201,10 +199,10 @@ endr .Flash: ; 4e741 ld a, -7 * 7 ; new stage - ld [wd1ec], a + ld [wEvolutionPicOffset], a call .ReplaceFrontpic ld a, 7 * 7 ; previous stage - ld [wd1ec], a + ld [wEvolutionPicOffset], a call .ReplaceFrontpic dec b jr nz, .Flash @@ -221,7 +219,7 @@ endr .loop1 push bc .loop2 - ld a, [wd1ec] + ld a, [wEvolutionPicOffset] add [hl] ld [hli], a dec c @@ -270,7 +268,7 @@ endr ; 4e7a6 .PlayEvolvedSFX: ; 4e7a6 - ld a, [Buffer4] + ld a, [wEvolutionCanceled] and a ret nz ld de, SFX_EVOLVED @@ -320,7 +318,7 @@ endr depixel 9, 11 ld a, SPRITE_ANIM_INDEX_13 call _InitSpriteAnimStruct - ld hl, SPRITEANIMSTRUCT_0B + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld a, [wJumptableIndex] and %1110 @@ -344,9 +342,8 @@ endr ld a, [hVBlankCounter] and %1110 srl a -rept 2 inc a -endr + inc a and $7 ld b, a ld hl, Sprites + 3 ; attributes @@ -355,9 +352,9 @@ endr ld a, [hl] or b ld [hli], a -rept 3 inc hl -endr + inc hl + inc hl dec c jr nz, .loop6 pop bc |