diff options
Diffstat (limited to 'engine/pokemon/learn_move.asm')
-rw-r--r-- | engine/pokemon/learn_move.asm | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm index 8e852fd4..d365acd4 100644 --- a/engine/pokemon/learn_move.asm +++ b/engine/pokemon/learn_move.asm @@ -121,18 +121,17 @@ TryingToLearn: ld hl, WhichMoveToForgetText call PrintText hlcoord 4, 7 - ld b, 4 - ld c, 14 + lb bc, 4, 14 call TextBoxBorder hlcoord 6, 8 ld de, wMovesString - ldh a, [hFlagsFFF6] + ldh a, [hFlagsFFFA] set 2, a - ldh [hFlagsFFF6], a + ldh [hFlagsFFFA], a call PlaceString - ldh a, [hFlagsFFF6] + ldh a, [hFlagsFFFA] res 2, a - ldh [hFlagsFFF6], a + ldh [hFlagsFFFA], a ld hl, wTopMenuItemY ld a, 8 ld [hli], a ; wTopMenuItemY @@ -146,10 +145,10 @@ TryingToLearn: ld a, A_BUTTON | B_BUTTON ld [hli], a ; wMenuWatchedKeys ld [hl], 0 ; wLastMenuItem - ld hl, hFlagsFFF6 + ld hl, hFlagsFFFA set 1, [hl] call HandleMenuInput - ld hl, hFlagsFFF6 + ld hl, hFlagsFFFA res 1, [hl] push af call LoadScreenTilesFromBuffer1 @@ -206,11 +205,36 @@ TryingToLearnText: text_end OneTwoAndText: +; bugfix: In Red/Blue, the SFX_SWAP sound was played in the wrong bank, which played an incorrect sound +; Yellow has fixed this by swapping to the correct bank text_far _OneTwoAndText text_pause text_asm + push af + push bc + push de + push hl + ld a, $1 + ld [wMuteAudioAndPauseMusic], a + call DelayFrame + ld a, [wAudioROMBank] + push af + ld a, BANK(SFX_Swap_1) + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a + call WaitForSoundToFinish ld a, SFX_SWAP - call PlaySoundWaitForCurrent + call PlaySound + call WaitForSoundToFinish + pop af + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a + xor a + ld [wMuteAudioAndPauseMusic], a + pop hl + pop de + pop bc + pop af ld hl, PoofText ret |