diff options
Diffstat (limited to 'engine/oak_speech.asm')
-rwxr-xr-x | engine/oak_speech.asm | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index b1acfb65..8a537579 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -5,6 +5,8 @@ SetDefaultNames: push af ld a, [wd732] push af + ld a, [wPrinterSettings] + push af ld hl, wPlayerName ld bc, wBoxDataEnd - wPlayerName xor a @@ -13,6 +15,12 @@ SetDefaultNames: ld bc, $200 xor a call FillMemory + xor a + ld [wSurfingMinigameHiScore], a + ld [wSurfingMinigameHiScore + 1], a + ld [wSurfingMinigameHiScore + 2], a + pop af + ld [wPrinterSettings], a pop af ld [wd732], a pop af @@ -29,11 +37,11 @@ SetDefaultNames: ld hl, SonyText ld de, wRivalName ld bc, NAME_LENGTH - jp CopyData + call CopyData ; rip optimizations + ret OakSpeech: - ld a, $FF - call PlaySound ; stop music + call StopAllMusic ; stop music ld a, BANK(Music_Routes2) ld c, a ld a, MUSIC_ROUTES2 @@ -64,7 +72,7 @@ OakSpeech: call PrintText call GBFadeOutToWhite call ClearScreen - ld a, NIDORINO + ld a, PIKACHU ld [wd0b5], a ld [wcf91], a call GetMonHeader @@ -109,13 +117,13 @@ OakSpeech: ld a, SFX_SHRINK call PlaySound pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ld c, 4 call DelayFrames - ld de, RedSprite ld hl, vSprites - lb bc, BANK(RedSprite), $0C + ld de, RedSprite + ld b, BANK(RedSprite) + ld c, $0C call CopyVideoData ld de, ShrinkPic1 lb bc, BANK(ShrinkPic1), $00 @@ -133,17 +141,13 @@ OakSpeech: ld [wAudioSavedROMBank], a ld a, 10 ld [wAudioFadeOutControl], a - ld a, $FF - ld [wNewSoundID], a - call PlaySound ; stop music + call StopAllMusic ; stop music pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ld c, 20 call DelayFrames coord hl, 6, 5 - ld b, 7 - ld c, 7 + lb bc, 7, 7 call ClearScreenArea call LoadTextBoxTilePatterns ld a, 1 @@ -151,7 +155,9 @@ OakSpeech: ld c, 50 call DelayFrames call GBFadeOutToWhite - jp ClearScreen + call ClearScreen ; rip more tail-end optimizations + ret + OakSpeechText1: TX_FAR _OakSpeechText1 db "@" @@ -176,6 +182,7 @@ FadeInIntroPic: .next ld a, [hli] ld [rBGP], a + call UpdateGBCPal_BGP ld c, 10 call DelayFrames dec b @@ -197,6 +204,7 @@ MovePicLeft: ld a, %11100100 ld [rBGP], a + call UpdateGBCPal_BGP .next call DelayFrame ld a, [rWX] @@ -215,10 +223,13 @@ IntroDisplayPicCenteredOrUpperRight: push bc ld a, b call UncompressSpriteFromDE + ld a, $0 + call SwitchSRAMBankAndLatchClockData ld hl, sSpriteBuffer1 ld de, sSpriteBuffer0 ld bc, $310 call CopyData + call PrepareRTCDataAndDisableSRAM ld de, vFrontPic call InterlaceMergeSpriteBuffers pop bc |