aboutsummaryrefslogtreecommitdiffstats
path: root/engine/events/pokecenter.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-03 09:38:52 -0400
committerGitHub <noreply@github.com>2020-07-03 09:38:52 -0400
commitc85050497c1bd062e9cd40bf5b32fa3beca366cc (patch)
tree9593ddd3ab820223ab580d5fc0ae133b485b8315 /engine/events/pokecenter.asm
parentActually run .travis/webhook.sh (diff)
parentAdd engine/movie/oak_speech/ subdirectory (diff)
downloadpokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.gz
pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.xz
pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.zip
Merge pull request #256 from Rangi42/master
Add subdirectories to engine/ similar to pokecrystal
Diffstat (limited to 'engine/events/pokecenter.asm')
-rwxr-xr-xengine/events/pokecenter.asm68
1 files changed, 68 insertions, 0 deletions
diff --git a/engine/events/pokecenter.asm b/engine/events/pokecenter.asm
new file mode 100755
index 00000000..f340e06d
--- /dev/null
+++ b/engine/events/pokecenter.asm
@@ -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 [wSpriteStateData1 + $12], a ; make the nurse turn to face the machine
+ call Delay3
+ predef HealParty
+ callba 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 PlaySound
+ ld hl, PokemonFightingFitText
+ call PrintText
+ ld a, $14
+ ld [wSpriteStateData1 + $12], 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:
+ TX_FAR _PokemonCenterWelcomeText
+ db "@"
+
+ShallWeHealYourPokemonText:
+ TX_DELAY
+ TX_FAR _ShallWeHealYourPokemonText
+ db "@"
+
+NeedYourPokemonText:
+ TX_FAR _NeedYourPokemonText
+ db "@"
+
+PokemonFightingFitText:
+ TX_FAR _PokemonFightingFitText
+ db "@"
+
+PokemonCenterFarewellText:
+ TX_DELAY
+ TX_FAR _PokemonCenterFarewellText
+ db "@"