diff options
Diffstat (limited to 'engine/breeding.asm')
-rwxr-xr-x | engine/breeding.asm | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/engine/breeding.asm b/engine/breeding.asm index b16747089..7756d30ef 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -3,13 +3,13 @@ CheckBreedmonCompatibility: ; 16e1d ld c, $0 jp nc, .done ld a, [wBreedMon1Species] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a ld a, [wBreedMon1DVs] - ld [TempMonDVs], a + ld [wTempMonDVs], a ld a, [wBreedMon1DVs + 1] - ld [TempMonDVs + 1], a + ld [wTempMonDVs + 1], a ld a, TEMPMON - ld [MonType], a + ld [wMonType], a predef GetGender jr c, .genderless ld b, $1 @@ -19,13 +19,13 @@ CheckBreedmonCompatibility: ; 16e1d .breedmon2 push bc ld a, [wBreedMon2Species] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a ld a, [wBreedMon2DVs] - ld [TempMonDVs], a + ld [wTempMonDVs], a ld a, [wBreedMon2DVs + 1] - ld [TempMonDVs + 1], a + ld [wTempMonDVs + 1], a ld a, $3 - ld [MonType], a + ld [wMonType], a predef GetGender pop bc jr c, .genderless @@ -109,16 +109,16 @@ CheckBreedmonCompatibility: ; 16e1d ; If either mon is in the No Eggs group, ; they are not compatible. ld a, [wBreedMon2Species] - ld [CurSpecies], a + ld [wCurSpecies], a call GetBaseData - ld a, [BaseEggGroups] + ld a, [wBaseEggGroups] cp NO_EGGS * $11 jr z, .Incompatible ld a, [wBreedMon1Species] - ld [CurSpecies], a + ld [wCurSpecies], a call GetBaseData - ld a, [BaseEggGroups] + ld a, [wBaseEggGroups] cp NO_EGGS * $11 jr z, .Incompatible @@ -127,9 +127,9 @@ CheckBreedmonCompatibility: ; 16e1d ld a, [wBreedMon2Species] cp DITTO jr z, .Compatible - ld [CurSpecies], a + ld [wCurSpecies], a call GetBaseData - ld a, [BaseEggGroups] + ld a, [wBaseEggGroups] push af and $f ld b, a @@ -141,11 +141,11 @@ CheckBreedmonCompatibility: ; 16e1d ld a, [wBreedMon1Species] cp DITTO jr z, .Compatible - ld [CurSpecies], a + ld [wCurSpecies], a push bc call GetBaseData pop bc - ld a, [BaseEggGroups] + ld a, [wBaseEggGroups] push af and $f ld d, a @@ -176,8 +176,8 @@ CheckBreedmonCompatibility: ; 16e1d ; 16f3e DoEggStep:: ; 16f3e - ld de, PartySpecies - ld hl, PartyMon1Happiness + ld de, wPartySpecies + ld hl, wPartyMon1Happiness ld c, 0 .loop ld a, [de] @@ -210,10 +210,10 @@ OverworldHatchEgg:: ; 16f5e ; 16f70 HatchEggs: ; 16f70 (5:6f70) - ld de, PartySpecies - ld hl, PartyMon1Happiness + ld de, wPartySpecies + ld hl, wPartyMon1Happiness xor a - ld [CurPartyMon], a + ld [wCurPartyMon], a .loop ; 16f7a (5:6f7a) ld a, [de] @@ -233,16 +233,16 @@ HatchEggs: ; 16f70 (5:6f70) farcall SetEggMonCaughtData farcall StubbedTrainerRankings_EggsHatched - ld a, [CurPartyMon] - ld hl, PartyMon1Species + ld a, [wCurPartyMon] + ld hl, wPartyMon1Species ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes ld a, [hl] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a dec a call SetSeenAndCaughtMon - ld a, [CurPartySpecies] + ld a, [wCurPartySpecies] cp TOGEPI jr nz, .nottogepi ; set the event flag for hatching togepi @@ -253,17 +253,17 @@ HatchEggs: ; 16f70 (5:6f70) pop de - ld a, [CurPartySpecies] + ld a, [wCurPartySpecies] dec de ld [de], a ld [wd265], a - ld [CurSpecies], a + ld [wCurSpecies], a call GetPokemonName xor a ld [wd26b], a call GetBaseData - ld a, [CurPartyMon] - ld hl, PartyMon1 + ld a, [wCurPartyMon] + ld hl, wPartyMon1 ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes push hl @@ -276,7 +276,7 @@ HatchEggs: ; 16f70 (5:6f70) ld bc, MON_LEVEL add hl, bc ld a, [hl] - ld [CurPartyLevel], a + ld [wCurPartyLevel], a pop hl push hl ld bc, MON_STATUS @@ -304,22 +304,22 @@ HatchEggs: ; 16f70 (5:6f70) ld [hl], a ld hl, MON_ID add hl, bc - ld a, [PlayerID] + ld a, [wPlayerID] ld [hli], a - ld a, [PlayerID + 1] + ld a, [wPlayerID + 1] ld [hl], a - ld a, [CurPartyMon] - ld hl, PartyMonOT + ld a, [wCurPartyMon] + ld hl, wPartyMonOT ld bc, NAME_LENGTH call AddNTimes ld d, h ld e, l - ld hl, PlayerName + ld hl, wPlayerName call CopyBytes ld hl, .Text_HatchEgg call PrintText - ld a, [CurPartyMon] - ld hl, PartyMonNicknames + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames ld bc, MON_NAME_LENGTH call AddNTimes ld d, h @@ -334,22 +334,22 @@ HatchEggs: ; 16f70 (5:6f70) ld a, $1 ld [wd26b], a xor a - ld [MonType], a + ld [wMonType], a push de ld b, $0 farcall NamingScreen pop hl - ld de, StringBuffer1 + ld de, wStringBuffer1 call InitName jr .next .nonickname - ld hl, StringBuffer1 + ld hl, wStringBuffer1 ld bc, MON_NAME_LENGTH call CopyBytes .next ; 1707d (5:707d) - ld hl, CurPartyMon + ld hl, wCurPartyMon inc [hl] pop hl ld de, PARTYMON_STRUCT_LENGTH @@ -365,18 +365,18 @@ HatchEggs: ; 16f70 (5:6f70) ; Huh? @ @ text_jump UnknownText_0x1c0db0 start_asm - ld hl, VramState + ld hl, wVramState res 0, [hl] push hl push de push bc - ld a, [CurPartySpecies] + ld a, [wCurPartySpecies] push af call EggHatch_AnimationSequence ld hl, .ClearTextbox call PrintText pop af - ld [CurPartySpecies], a + ld [wCurPartySpecies], a pop bc pop de pop hl @@ -580,32 +580,32 @@ GetHeritableMoves: ; 17197 ret .ditto1 - ld a, [CurPartySpecies] + ld a, [wCurPartySpecies] push af ld a, [wBreedMon2Species] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a ld a, [wBreedMon2DVs] - ld [TempMonDVs], a + ld [wTempMonDVs], a ld a, [wBreedMon2DVs + 1] - ld [TempMonDVs + 1], a + ld [wTempMonDVs + 1], a ld a, TEMPMON - ld [MonType], a + ld [wMonType], a predef GetGender jr c, .inherit_mon2_moves jr nz, .inherit_mon2_moves jr .inherit_mon1_moves .ditto2 - ld a, [CurPartySpecies] + ld a, [wCurPartySpecies] push af ld a, [wBreedMon1Species] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a ld a, [wBreedMon1DVs] - ld [TempMonDVs], a + ld [wTempMonDVs], a ld a, [wBreedMon1DVs + 1] - ld [TempMonDVs + 1], a + ld [wTempMonDVs + 1], a ld a, TEMPMON - ld [MonType], a + ld [wMonType], a predef GetGender jr c, .inherit_mon1_moves jr nz, .inherit_mon1_moves @@ -613,13 +613,13 @@ GetHeritableMoves: ; 17197 .inherit_mon2_moves ld hl, wBreedMon2Moves pop af - ld [CurPartySpecies], a + ld [wCurPartySpecies], a ret .inherit_mon1_moves ld hl, wBreedMon1Moves pop af - ld [CurPartySpecies], a + ld [wCurPartySpecies], a ret ; 1720b @@ -643,20 +643,20 @@ GetBreedmonMovePointer: ; 1720b GetEggFrontpic: ; 17224 (5:7224) push de - ld [CurPartySpecies], a - ld [CurSpecies], a + ld [wCurPartySpecies], a + ld [wCurSpecies], a call GetBaseData - ld hl, BattleMonDVs + ld hl, wBattleMonDVs predef GetUnownLetter pop de predef_jump GetMonFrontpic GetHatchlingFrontpic: ; 1723c (5:723c) push de - ld [CurPartySpecies], a - ld [CurSpecies], a + ld [wCurPartySpecies], a + ld [wCurSpecies], a call GetBaseData - ld hl, BattleMonDVs + ld hl, wBattleMonDVs predef GetUnownLetter pop de predef_jump GetAnimatedFrontpic @@ -697,7 +697,7 @@ EggHatch_DoAnimFrame: ; 1727f (5:727f) EggHatch_AnimationSequence: ; 1728f (5:728f) ld a, [wd265] ld [wJumptableIndex], a - ld a, [CurSpecies] + ld a, [wCurSpecies] push af ld de, MUSIC_NONE call PlayMusic @@ -775,17 +775,17 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) call Hatch_ShellFragmentLoop call WaitSFX ld a, [wJumptableIndex] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a hlcoord 6, 3 ld d, $0 ld e, ANIM_MON_HATCH predef AnimateFrontpic pop af - ld [CurSpecies], a + ld [wCurSpecies], a ret Hatch_LoadFrontpicPal: ; 17363 (5:7363) - ld [PlayerHPPal], a + ld [wPlayerHPPal], a ld b, SCGB_EVOLUTION ld c, $0 jp GetSGBLayout @@ -931,7 +931,7 @@ DayCareMon1Text: ; 0x17467 DayCareMonCompatibilityText: ; 1746c push bc - ld de, StringBuffer1 + ld de, wStringBuffer1 ld bc, NAME_LENGTH call CopyBytes call CheckBreedmonCompatibility |