pokered/scripts/MrPsychicsHouse.asm
vulcandth d001ced41b
Add macros, constants, and labels for map scripts and text (#367)
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.
2023-07-13 21:27:56 -04:00

46 lines
927 B
NASM

MrPsychicsHouse_Script:
jp EnableAutoTextBoxDrawing
MrPsychicsHouse_TextPointers:
def_text_pointers
dw_const MrPsychicsHouseMrPsychicText, TEXT_MRPSYCHICSHOUSE_MR_PSYCHIC
MrPsychicsHouseMrPsychicText:
text_asm
CheckEvent EVENT_GOT_TM29
jr nz, .got_item
ld hl, .YouWantedThisText
call PrintText
lb bc, TM_PSYCHIC_M, 1
call GiveItem
jr nc, .bag_full
ld hl, .ReceivedTM29Text
call PrintText
SetEvent EVENT_GOT_TM29
jr .done
.bag_full
ld hl, .TM29NoRoomText
call PrintText
jr .done
.got_item
ld hl, .TM29ExplanationText
call PrintText
.done
jp TextScriptEnd
.YouWantedThisText:
text_far _MrPsychicsHouseMrPsychicYouWantedThisText
text_end
.ReceivedTM29Text:
text_far _MrPsychicsHouseMrPsychicReceivedTM29Text
sound_get_item_1
text_end
.TM29ExplanationText:
text_far _MrPsychicsHouseMrPsychicTM29ExplanationText
text_end
.TM29NoRoomText:
text_far _MrPsychicsHouseMrPsychicTM29NoRoomText
text_end