diff options
author | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-16 15:46:13 -0400 |
---|---|---|
committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-16 15:46:13 -0400 |
commit | 2eeb78d1bcecf09b2a48035dc24c19a726c41819 (patch) | |
tree | 6cbebd1d1fedb919df25e5af857cc91aec2b093d | |
parent | 12396874cf3220cbf3788d86ded266f234eeda1b (diff) |
Evolution addresses
-rwxr-xr-x | engine/evolution_animation.asm | 39 | ||||
-rwxr-xr-x | engine/evolve.asm | 14 | ||||
-rw-r--r-- | wram.asm | 5 |
3 files changed, 30 insertions, 28 deletions
diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm index cce0cbd9b..d330e47c3 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 @@ -200,10 +199,10 @@ EvolutionAnimation: ; 4e5e1 .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 @@ -220,7 +219,7 @@ EvolutionAnimation: ; 4e5e1 .loop1 push bc .loop2 - ld a, [wd1ec] + ld a, [wEvolutionPicOffset] add [hl] ld [hli], a dec c @@ -269,7 +268,7 @@ EvolutionAnimation: ; 4e5e1 ; 4e7a6 .PlayEvolvedSFX: ; 4e7a6 - ld a, [Buffer4] + ld a, [wEvolutionCanceled] and a ret nz ld de, SFX_EVOLVED diff --git a/engine/evolve.asm b/engine/evolve.asm index 9a70290f2..202ad10ff 100755 --- a/engine/evolve.asm +++ b/engine/evolve.asm @@ -29,7 +29,7 @@ EvolveAfterBattle_MasterLoop cp $ff jp z, .ReturnToMap - ld [Buffer1], a + ld [wEvolutionOldSpecies], a push hl ld a, [CurPartyMon] @@ -41,7 +41,7 @@ EvolveAfterBattle_MasterLoop and a jp z, EvolveAfterBattle_MasterLoop - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] dec a ld b, 0 ld c, a @@ -204,7 +204,7 @@ EvolveAfterBattle_MasterLoop push hl ld a, [hl] - ld [Buffer2], a + ld [wEvolutionNewSpecies], a ld a, [CurPartyMon] ld hl, PartyMonNicknames call GetNick @@ -240,7 +240,7 @@ EvolveAfterBattle_MasterLoop ld a, [hl] ld [CurSpecies], a ld [TempMonSpecies], a - ld [Buffer2], a + ld [wEvolutionNewSpecies], a ld [wd265], a call GetPokemonName @@ -530,7 +530,7 @@ FillMoves: ; 424e1 ld a, [CurPartyLevel] cp b jp c, .done - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] and a jr z, .CheckMove ld a, [wd002] @@ -563,7 +563,7 @@ FillMoves: ; 424e1 ld h, d ld l, e call ShiftMoves - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] and a jr z, .ShiftedMove push de @@ -580,7 +580,7 @@ FillMoves: ; 424e1 .LearnMove: ld a, [hl] ld [de], a - ld a, [Buffer1] + ld a, [wEvolutionOldSpecies] and a jr z, .NextMove push hl @@ -2037,14 +2037,17 @@ wCurHPAnimHighHP:: db ; d1f6 ds wCurHPAnimMaxHP - @ MagikarpLength:: +wEvolutionOldSpecies:: Buffer1:: ; d1ea ds 1 MovementType:: +wEvolutionNewSpecies:: Buffer2:: ; d1eb ds 1 - +wEvolutionPicOffset:: Buffer3:: wd1ec:: ds 1 +wEvolutionCanceled:: Buffer4:: wd1ed:: ds 1 Buffer5:: |