From 6f0b81504d6471afe7df6adae83791cc81933ca6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 16:04:21 +0100 Subject: More unreferenced labels cleanup --- engine/breeding.asm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 234e05448..7d2209de9 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -981,8 +981,7 @@ DayCareMonCompatibilityText: ; 1746c db "@" ; 0x174b5 -DayCareMonPrintEmptyString: ; 174b5 -; unreferenced +Unreferenced_DayCareMonPrintEmptyString: ; 174b5 ld hl, .string ret ; 174b9 -- cgit v1.2.3 From d7970f749ac23786728926109be430ab732f19e6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 18:49:25 +0100 Subject: Consistent predef function names --- engine/breeding.asm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 7d2209de9..1d075ee81 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -10,7 +10,7 @@ CheckBreedmonCompatibility: ; 16e1d ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef GetGender + predef Predef_GetGender jr c, .genderless ld b, $1 jr nz, .breedmon2 @@ -26,7 +26,7 @@ CheckBreedmonCompatibility: ; 16e1d ld [TempMonDVs + 1], a ld a, $3 ld [MonType], a - predef GetGender + predef Predef_GetGender pop bc jr c, .genderless ld a, $1 @@ -289,7 +289,7 @@ HatchEggs: ; 16f70 (5:6f70) ld bc, MON_STAT_EXP - 1 add hl, bc ld b, $0 - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop bc ld hl, MON_MAXHP add hl, bc @@ -514,7 +514,7 @@ GLOBAL EggMoves cp b jr nz, .loop5 ld [wPutativeTMHMMove], a - predef CanLearnTMHMMove + predef Predef_CanLearnTMHMMove ld a, c and a jr z, .done @@ -559,7 +559,7 @@ LoadEggMove: ; 17169 ld [hl], b ld hl, wEggMonMoves ld de, wEggMonPP - predef FillPP + predef Predef_FillPP pop bc pop de ret @@ -590,7 +590,7 @@ GetHeritableMoves: ; 17197 ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef GetGender + predef Predef_GetGender jr c, .inherit_mon2_moves jr nz, .inherit_mon2_moves jr .inherit_mon1_moves @@ -606,7 +606,7 @@ GetHeritableMoves: ; 17197 ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef GetGender + predef Predef_GetGender jr c, .inherit_mon1_moves jr nz, .inherit_mon1_moves @@ -647,9 +647,9 @@ GetEggFrontpic: ; 17224 (5:7224) ld [CurSpecies], a call GetBaseData ld hl, BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter pop de - predef_jump GetMonFrontpic + predef_jump Predef_GetMonFrontpic GetHatchlingFrontpic: ; 1723c (5:723c) push de @@ -657,9 +657,9 @@ GetHatchlingFrontpic: ; 1723c (5:723c) ld [CurSpecies], a call GetBaseData ld hl, BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter pop de - predef_jump GetAnimatedFrontpicPredef + predef_jump Predef_GetAnimatedFrontpic Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) push af @@ -677,7 +677,7 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) ld a, c ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic pop af call Hatch_LoadFrontpicPal call SetPalettes @@ -779,7 +779,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) hlcoord 6, 3 ld d, $0 ld e, ANIM_MON_HATCH - predef AnimateFrontpic + predef Predef_AnimateFrontpic pop af ld [CurSpecies], a ret -- cgit v1.2.3 From aa9a0a900ddeaa79a05f1b93458a8b19ae170d69 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 20:00:14 +0100 Subject: No more mobile EQUS ret (replace with Stubbed_ + ret) --- engine/breeding.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 1d075ee81..02a86ce47 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -232,7 +232,7 @@ HatchEggs: ; 16f70 (5:6f70) push de farcall SetEggMonCaughtData - farcall TrainerRankings_EggsHatched + farcall StubbedTrainerRankings_EggsHatched ld a, [CurPartyMon] ld hl, PartyMon1Species ld bc, PARTYMON_STRUCT_LENGTH -- cgit v1.2.3 From 776b8c73963dac72d55489f69b7983ac4e365469 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 2 Jan 2018 14:48:24 -0500 Subject: Egg hatch shell framgent data is not exactly dsprite --- engine/breeding.asm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 234e05448..3baee35a5 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -860,18 +860,23 @@ Hatch_InitShellFragments: ; 173b3 (5:73b3) ret ; 173ef (5:73ef) +shell_fragment: MACRO +; y tile, y pxl, x tile, x pxl, frameset offset, jumptable index + db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5 - SPRITE_ANIM_FRAMESET_EGG_HATCH_1, \6 +ENDM + .SpriteData: ; 173ef ; Probably OAM. - dsprite 10, 4, 9, 0, $00, $3c - dsprite 11, 4, 9, 0, $01, $04 - dsprite 10, 4, 10, 0, $00, $30 - dsprite 11, 4, 10, 0, $01, $10 - dsprite 10, 4, 11, 0, $02, $24 - dsprite 11, 4, 11, 0, $03, $1c - dsprite 10, 0, 9, 4, $00, $36 - dsprite 12, 0, 9, 4, $01, $0a - dsprite 10, 0, 10, 4, $02, $2a - dsprite 12, 0, 10, 4, $03, $16 + shell_fragment 10, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $3c + shell_fragment 11, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $04 + shell_fragment 10, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $30 + shell_fragment 11, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $10 + shell_fragment 10, 4, 11, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_3, $24 + shell_fragment 11, 4, 11, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_4, $1c + shell_fragment 10, 0, 9, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $36 + shell_fragment 12, 0, 9, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $0a + shell_fragment 10, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_3, $2a + shell_fragment 12, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_4, $16 db -1 ; 17418 -- cgit v1.2.3 From 648e71832aa82d5e1c91ca9db329d23834e72603 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 2 Jan 2018 14:50:04 -0500 Subject: Comment correction --- engine/breeding.asm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 3baee35a5..6674f288d 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -861,12 +861,11 @@ Hatch_InitShellFragments: ; 173b3 (5:73b3) ; 173ef (5:73ef) shell_fragment: MACRO -; y tile, y pxl, x tile, x pxl, frameset offset, jumptable index +; y tile, y pxl, x tile, x pxl, frameset offset, ??? db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5 - SPRITE_ANIM_FRAMESET_EGG_HATCH_1, \6 ENDM .SpriteData: ; 173ef -; Probably OAM. shell_fragment 10, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $3c shell_fragment 11, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $04 shell_fragment 10, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $30 -- cgit v1.2.3 From 17f34cb29c1aeb1bb623e587e3e4cf1f1fc295fb Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 11 Jan 2018 15:36:11 -0500 Subject: Disambiguate some uses of wcf64/5/6 --- engine/breeding.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 6674f288d..df8b36e6a 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -726,11 +726,11 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) ld c, 80 call DelayFrames xor a - ld [wcf64], a + ld [wFrameCounter], a ld a, [hSCX] ld b, a .outerloop - ld hl, wcf64 + ld hl, wFrameCounter ld a, [hl] inc [hl] cp 8 @@ -791,7 +791,7 @@ Hatch_LoadFrontpicPal: ; 17363 (5:7363) jp GetSGBLayout EggHatch_CrackShell: ; 1736d (5:736d) - ld a, [wcf64] + ld a, [wFrameCounter] dec a and $7 cp $7 -- cgit v1.2.3 From 80480821142d7a7b16dd2b1a98a213e7b389af0f Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 14:30:10 -0500 Subject: Remove Predef_ prefix from routines listed in PredefPointers --- engine/breeding.asm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index e86cf5832..9fe0b8986 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -10,7 +10,7 @@ CheckBreedmonCompatibility: ; 16e1d ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef Predef_GetGender + predef GetGender jr c, .genderless ld b, $1 jr nz, .breedmon2 @@ -26,7 +26,7 @@ CheckBreedmonCompatibility: ; 16e1d ld [TempMonDVs + 1], a ld a, $3 ld [MonType], a - predef Predef_GetGender + predef GetGender pop bc jr c, .genderless ld a, $1 @@ -289,7 +289,7 @@ HatchEggs: ; 16f70 (5:6f70) ld bc, MON_STAT_EXP - 1 add hl, bc ld b, $0 - predef Predef_CalcPkmnStats + predef CalcPkmnStats pop bc ld hl, MON_MAXHP add hl, bc @@ -514,7 +514,7 @@ GLOBAL EggMoves cp b jr nz, .loop5 ld [wPutativeTMHMMove], a - predef Predef_CanLearnTMHMMove + predef CanLearnTMHMMove ld a, c and a jr z, .done @@ -559,7 +559,7 @@ LoadEggMove: ; 17169 ld [hl], b ld hl, wEggMonMoves ld de, wEggMonPP - predef Predef_FillPP + predef FillPP pop bc pop de ret @@ -590,7 +590,7 @@ GetHeritableMoves: ; 17197 ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef Predef_GetGender + predef GetGender jr c, .inherit_mon2_moves jr nz, .inherit_mon2_moves jr .inherit_mon1_moves @@ -606,7 +606,7 @@ GetHeritableMoves: ; 17197 ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef Predef_GetGender + predef GetGender jr c, .inherit_mon1_moves jr nz, .inherit_mon1_moves @@ -647,9 +647,9 @@ GetEggFrontpic: ; 17224 (5:7224) ld [CurSpecies], a call GetBaseData ld hl, BattleMonDVs - predef Predef_GetUnownLetter + predef GetUnownLetter pop de - predef_jump Predef_GetMonFrontpic + predef_jump GetMonFrontpic GetHatchlingFrontpic: ; 1723c (5:723c) push de @@ -657,9 +657,9 @@ GetHatchlingFrontpic: ; 1723c (5:723c) ld [CurSpecies], a call GetBaseData ld hl, BattleMonDVs - predef Predef_GetUnownLetter + predef GetUnownLetter pop de - predef_jump Predef_GetAnimatedFrontpic + predef_jump GetAnimatedFrontpic Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) push af @@ -677,7 +677,7 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) ld a, c ld [hGraphicStartTile], a lb bc, 7, 7 - predef Predef_PlaceGraphic + predef PlaceGraphic pop af call Hatch_LoadFrontpicPal call SetPalettes @@ -779,7 +779,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) hlcoord 6, 3 ld d, $0 ld e, ANIM_MON_HATCH - predef Predef_AnimateFrontpic + predef AnimateFrontpic pop af ld [CurSpecies], a ret -- cgit v1.2.3 From 6d20cf3e80780af15ed15acea2f7feac1ffd9705 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 23:47:45 -0500 Subject: =?UTF-8?q?"CryHeader"=20=E2=86=92=20"Cry";=20"Cry"=20=E2=86=92=20?= =?UTF-8?q?"MonCry"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/breeding.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 9fe0b8986..489154f71 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -891,7 +891,7 @@ Special_DayCareMon1: ; 17421 ld hl, DayCareMon1Text call PrintText ld a, [wBreedMon1Species] - call PlayCry + call PlayMonCry ld a, [wDayCareLady] bit 0, a jr z, DayCareMonCursor @@ -904,7 +904,7 @@ Special_DayCareMon2: ; 17440 ld hl, DayCareMon2Text call PrintText ld a, [wBreedMon2Species] - call PlayCry + call PlayMonCry ld a, [wDayCareMan] bit 0, a jr z, DayCareMonCursor -- cgit v1.2.3 From 05382d3e3c03616d6edf21833e89a8264a8cd10a Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sat, 20 Jan 2018 12:25:55 -0500 Subject: PARTY_LENGTH; MON_NAME; sgb_border.bin --- engine/breeding.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/breeding.asm') diff --git a/engine/breeding.asm b/engine/breeding.asm index 489154f71..b16747089 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -320,7 +320,7 @@ HatchEggs: ; 16f70 (5:6f70) call PrintText ld a, [CurPartyMon] ld hl, PartyMonNicknames - ld bc, PKMN_NAME_LENGTH + ld bc, MON_NAME_LENGTH call AddNTimes ld d, h ld e, l @@ -345,7 +345,7 @@ HatchEggs: ; 16f70 (5:6f70) .nonickname ld hl, StringBuffer1 - ld bc, PKMN_NAME_LENGTH + ld bc, MON_NAME_LENGTH call CopyBytes .next ; 1707d (5:707d) -- cgit v1.2.3