mirror of
https://github.com/pret/pokered.git
synced 2024-10-23 06:58:24 +00:00
d001ced41b
This introduces `def_script_pointers`, `def_text_pointers`, and `object_const_def` macros, and applies them to all maps. Most other map labels have also been identified.
70 lines
1.4 KiB
NASM
70 lines
1.4 KiB
NASM
RedsHouse1F_Script:
|
|
jp EnableAutoTextBoxDrawing
|
|
|
|
RedsHouse1F_TextPointers:
|
|
def_text_pointers
|
|
dw_const RedsHouse1FMomText, TEXT_REDSHOUSE1F_MOM
|
|
dw_const RedsHouse1FTVText, TEXT_REDSHOUSE1F_TV
|
|
|
|
RedsHouse1FMomText:
|
|
text_asm
|
|
ld a, [wd72e]
|
|
bit 3, a ; received a Pokémon from Oak?
|
|
jr nz, .heal
|
|
ld hl, .WakeUpText
|
|
call PrintText
|
|
jr .done
|
|
.heal
|
|
call RedsHouse1FMomHealScript
|
|
.done
|
|
jp TextScriptEnd
|
|
|
|
.WakeUpText:
|
|
text_far _RedsHouse1FMomWakeUpText
|
|
text_end
|
|
|
|
RedsHouse1FMomHealScript:
|
|
ld hl, RedsHouse1FMomYouShouldRestText
|
|
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, RedsHouse1FMomLookingGreatText
|
|
jp PrintText
|
|
|
|
RedsHouse1FMomYouShouldRestText:
|
|
text_far _RedsHouse1FMomYouShouldRestText
|
|
text_end
|
|
RedsHouse1FMomLookingGreatText:
|
|
text_far _RedsHouse1FMomLookingGreatText
|
|
text_end
|
|
|
|
RedsHouse1FTVText:
|
|
text_asm
|
|
ld a, [wSpritePlayerStateData1FacingDirection]
|
|
cp SPRITE_FACING_UP
|
|
ld hl, .WrongSideText
|
|
jr nz, .got_text
|
|
ld hl, .StandByMeMovieText
|
|
.got_text
|
|
call PrintText
|
|
jp TextScriptEnd
|
|
|
|
.StandByMeMovieText:
|
|
text_far _RedsHouse1FTVStandByMeMovieText
|
|
text_end
|
|
|
|
.WrongSideText:
|
|
text_far _RedsHouse1FTVWrongSideText
|
|
text_end
|