summaryrefslogtreecommitdiff
path: root/scripts/RedsHouse1F.asm
diff options
context:
space:
mode:
authorDaniel Harding <33dannye@gmail.com>2019-01-13 22:38:16 -0600
committerGitHub <noreply@github.com>2019-01-13 22:38:16 -0600
commit725b86ebbec23bd1f53fd60bf0201c904fee951d (patch)
treea37f4d33c5b77635c7ff72b91a73fcd90c4af915 /scripts/RedsHouse1F.asm
parent108245cb21abb3abac051b7db84ed6c694192a61 (diff)
parentc7796024590fec48ac79756793c1a6e3b54daf8f (diff)
Merge pull request #196 from Rangi42/polishedmaps
Rename map files, labels, and constants to be consistent and work with Polished Map
Diffstat (limited to 'scripts/RedsHouse1F.asm')
-rwxr-xr-xscripts/RedsHouse1F.asm69
1 files changed, 69 insertions, 0 deletions
diff --git a/scripts/RedsHouse1F.asm b/scripts/RedsHouse1F.asm
new file mode 100755
index 00000000..b982d71c
--- /dev/null
+++ b/scripts/RedsHouse1F.asm
@@ -0,0 +1,69 @@
+RedsHouse1F_Script:
+ jp EnableAutoTextBoxDrawing
+
+RedsHouse1F_TextPointers:
+ dw RedsHouse1FText1
+ dw RedsHouse1FText2
+
+RedsHouse1FText1: ; Mom
+ TX_ASM
+ ld a, [wd72e]
+ bit 3, a
+ jr nz, .heal ; if player has received a Pokémon from Oak, heal team
+ ld hl, MomWakeUpText
+ call PrintText
+ jr .done
+.heal
+ call MomHealPokemon
+.done
+ jp TextScriptEnd
+
+MomWakeUpText:
+ TX_FAR _MomWakeUpText
+ db "@"
+
+MomHealPokemon:
+ ld hl, MomHealText1
+ call PrintText
+ call GBFadeOutToWhite
+ call ReloadMapData
+ predef HealParty
+ ld a, MUSIC_PKMN_HEALED
+ ld [wNewSoundID], a
+ call PlaySound
+.next
+ ld a, [wChannelSoundIDs]
+ cp MUSIC_PKMN_HEALED
+ jr z, .next
+ ld a, [wMapMusicSoundID]
+ ld [wNewSoundID], a
+ call PlaySound
+ call GBFadeInFromWhite
+ ld hl, MomHealText2
+ jp PrintText
+
+MomHealText1:
+ TX_FAR _MomHealText1
+ db "@"
+MomHealText2:
+ TX_FAR _MomHealText2
+ db "@"
+
+RedsHouse1FText2: ; TV
+ TX_ASM
+ ld a, [wSpriteStateData1 + 9]
+ cp SPRITE_FACING_UP
+ ld hl, TVWrongSideText
+ jr nz, .notUp
+ ld hl, StandByMeText
+.notUp
+ call PrintText
+ jp TextScriptEnd
+
+StandByMeText:
+ TX_FAR _StandByMeText
+ db "@"
+
+TVWrongSideText:
+ TX_FAR _TVWrongSideText
+ db "@"