diff options
author | Daniel Harding <33dannye@gmail.com> | 2021-11-15 13:31:15 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 13:31:15 -0600 |
commit | f516a91f5fa02a741631c77b9097598f466d1328 (patch) | |
tree | bac2ee5e3fad02983b061580f5c085baecb5439a /src/engine/menus/medal.asm | |
parent | 15e986d374fdd11ed0f412fbdc9b858d4c4b9f50 (diff) | |
parent | 1fd16cd27fcd4f432bfc09fc5b7a262798b72430 (diff) |
Some more bank splitting
Diffstat (limited to 'src/engine/menus/medal.asm')
-rw-r--r-- | src/engine/menus/medal.asm | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/engine/menus/medal.asm b/src/engine/menus/medal.asm new file mode 100644 index 0000000..57803e3 --- /dev/null +++ b/src/engine/menus/medal.asm @@ -0,0 +1,60 @@ +ShowMedalReceivedScreen: + sub $8 + ld c, a + ld [wWhichMedal], a + ld a, [wd291] + push af + push bc + call PauseSong + ld a, MUSIC_STOP + call PlaySong + farcall SetMainSGBBorder + call DisableLCD + call InitMenuScreen + ld a, -6 + ld [wMedalScreenYOffset], a + call LoadCollectedMedalTilemaps + pop bc + ld a, c + add a + ld c, a + ld b, $0 + ld hl, MasterMedalNames + add hl, bc + ld a, [hli] + ld [wTxRam2], a + ld a, [hl] + ld [wTxRam2 + 1], a + call FlashWhiteScreen + ld a, MUSIC_MEDAL + call PlaySong + ld a, $ff + ld [wMedalDisplayTimer], a +.flash_loop + call DoFrameIfLCDEnabled + ld a, [wMedalDisplayTimer] + inc a + ld [wMedalDisplayTimer], a + and $f + jr nz, .flash_loop + call FlashReceivedMedal + ld a, [wMedalDisplayTimer] + cp $e0 + jr nz, .flash_loop + ldtx hl, WonTheMedalText + call PrintScrollableText_NoTextBoxLabel + call WaitForSongToFinish + call ResumeSong + pop af + ld [wd291], a + ret + +MasterMedalNames: + tx GrassClubMapNameText + tx ScienceClubMapNameText + tx FireClubMapNameText + tx WaterClubMapNameText + tx LightningClubMapNameText + tx PsychicClubMapNameText + tx RockClubMapNameText + tx FightingClubMapNameText |