mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 07:02:17 +13:00
Merge branch 'master' of https://github.com/pret/pokered
This commit is contained in:
commit
e8dd755e18
3702 changed files with 163333 additions and 159040 deletions
68
engine/events/pokecenter.asm
Normal file
68
engine/events/pokecenter.asm
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
DisplayPokemonCenterDialogue_::
|
||||
call SaveScreenTilesToBuffer1 ; save screen
|
||||
ld hl, PokemonCenterWelcomeText
|
||||
call PrintText
|
||||
ld hl, wd72e
|
||||
bit 2, [hl]
|
||||
set 1, [hl]
|
||||
set 2, [hl]
|
||||
jr nz, .skipShallWeHealYourPokemon
|
||||
ld hl, ShallWeHealYourPokemonText
|
||||
call PrintText
|
||||
.skipShallWeHealYourPokemon
|
||||
call YesNoChoicePokeCenter ; yes/no menu
|
||||
ld a, [wCurrentMenuItem]
|
||||
and a
|
||||
jr nz, .declinedHealing ; if the player chose No
|
||||
call SetLastBlackoutMap
|
||||
call LoadScreenTilesFromBuffer1 ; restore screen
|
||||
ld hl, NeedYourPokemonText
|
||||
call PrintText
|
||||
ld a, $18
|
||||
ld [wSprite01StateData1ImageIndex], a ; make the nurse turn to face the machine
|
||||
call Delay3
|
||||
predef HealParty
|
||||
farcall AnimateHealingMachine ; do the healing machine animation
|
||||
xor a
|
||||
ld [wAudioFadeOutControl], a
|
||||
ld a, [wAudioSavedROMBank]
|
||||
ld [wAudioROMBank], a
|
||||
ld a, [wMapMusicSoundID]
|
||||
ld [wLastMusicSoundID], a
|
||||
ld [wNewSoundID], a
|
||||
call PlayMusic
|
||||
ld hl, PokemonFightingFitText
|
||||
call PrintText
|
||||
ld a, $14
|
||||
ld [wSprite01StateData1ImageIndex], a ; make the nurse bow
|
||||
ld c, a
|
||||
call DelayFrames
|
||||
jr .done
|
||||
.declinedHealing
|
||||
call LoadScreenTilesFromBuffer1 ; restore screen
|
||||
.done
|
||||
ld hl, PokemonCenterFarewellText
|
||||
call PrintText
|
||||
jp UpdateSprites
|
||||
|
||||
PokemonCenterWelcomeText:
|
||||
text_far _PokemonCenterWelcomeText
|
||||
text_end
|
||||
|
||||
ShallWeHealYourPokemonText:
|
||||
text_pause
|
||||
text_far _ShallWeHealYourPokemonText
|
||||
text_end
|
||||
|
||||
NeedYourPokemonText:
|
||||
text_far _NeedYourPokemonText
|
||||
text_end
|
||||
|
||||
PokemonFightingFitText:
|
||||
text_far _PokemonFightingFitText
|
||||
text_end
|
||||
|
||||
PokemonCenterFarewellText:
|
||||
text_pause
|
||||
text_far _PokemonCenterFarewellText
|
||||
text_end
|
||||
Loading…
Add table
Add a link
Reference in a new issue